From 7cb978e4b9b2ea4f13df08b4fafcd2326c5c29b6 Mon Sep 17 00:00:00 2001 From: Kimtaehyeong Date: Thu, 28 Nov 2024 15:22:07 +0900 Subject: [PATCH 1/3] Addition of multi-series color candle function --- src/charts/BoxCandleStick.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/charts/BoxCandleStick.js b/src/charts/BoxCandleStick.js index 876f15979..86a5b11a7 100644 --- a/src/charts/BoxCandleStick.js +++ b/src/charts/BoxCandleStick.js @@ -217,8 +217,9 @@ class BoxCandleStick extends Bar { let j = indexes.j let isPositive = true - let colorPos = w.config.plotOptions.candlestick.colors.upward - let colorNeg = w.config.plotOptions.candlestick.colors.downward + let realIndex = indexes.realIndex + let colorPos = w.config.plotOptions.candlestick.colors.upward[realIndex] + let colorNeg = w.config.plotOptions.candlestick.colors.downward[realIndex] let color = '' if (this.isBoxPlot) { @@ -226,7 +227,6 @@ class BoxCandleStick extends Bar { } const yRatio = this.yRatio[indexes.translationsIndex] - let realIndex = indexes.realIndex const ohlc = this.getOHLCValue(realIndex, j) let l1 = zeroH From 8f215bac172c1aac94bf3f88ebef06d6a32e455a Mon Sep 17 00:00:00 2001 From: Kimtaehyeong Date: Thu, 28 Nov 2024 15:29:36 +0900 Subject: [PATCH 2/3] build --- dist/apexcharts.amd.js | 2 +- dist/apexcharts.amd.js.LICENSE.txt | 4 +- dist/apexcharts.common.js | 8 +- dist/apexcharts.esm.js | 8 +- dist/apexcharts.js | 73 +++-- dist/apexcharts.min.js | 8 +- yarn.lock | 495 ++++++++++++++++++----------- 7 files changed, 371 insertions(+), 227 deletions(-) diff --git a/dist/apexcharts.amd.js b/dist/apexcharts.amd.js index ff24b4e5e..a92cdaffa 100644 --- a/dist/apexcharts.amd.js +++ b/dist/apexcharts.amd.js @@ -1,2 +1,2 @@ /*! For license information please see apexcharts.amd.js.LICENSE.txt */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ApexCharts=e():t.ApexCharts=e()}(self,(()=>(()=>{var t={532:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",i=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),i&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),i&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,i,n,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),n&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=n):u[4]="".concat(n)),e.push(u))}},e}},547:t=>{"use strict";t.exports=function(t){return t[1]}},521:()=>{window.TreemapSquared={},function(){"use strict";window.TreemapSquared.generate=function(){function t(e,r,i,n){this.xoffset=e,this.yoffset=r,this.height=n,this.width=i,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,r=[],i=this.xoffset,n=this.yoffset,a=o(t)/this.height,s=o(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var i=e/this.height,n=this.width-i;r=new t(this.xoffset+i,this.yoffset,n,this.height)}else{var o=e/this.width,a=this.height-o;r=new t(this.xoffset,this.yoffset+o,this.width,a)}return r}}function e(e,i,n,a,s){a=void 0===a?0:a,s=void 0===s?0:s;var l=r(function(t,e){var r,i=[],n=e/o(t);for(r=0;r=i(n,r))}(e,l=t[0],s)?(e.push(l),r(t.slice(1),e,n,a)):(c=n.cutArea(o(e),a),a.push(n.getCoordinates(e)),r(t,[],c,a)),a;a.push(n.getCoordinates(e))}function i(t,e){var r=Math.min.apply(Math,t),i=Math.max.apply(Math,t),n=o(t);return Math.max(Math.pow(e,2)*i/Math.pow(n,2),Math.pow(n,2)/(Math.pow(e,2)*r))}function n(t){return t&&t.constructor===Array}function o(t){var e,r=0;for(e=0;e{"use strict";r.r(e),r.d(e,{default:()=>s});var i=r(547),n=r.n(i),o=r(532),a=r.n(o)()(n());a.push([t.id,'@keyframes opaque {\n 0% {\n opacity: 0\n }\n\n to {\n opacity: 1\n }\n}\n\n@keyframes resizeanim {\n\n 0%,\n to {\n opacity: 0\n }\n}\n\n.apexcharts-canvas {\n position: relative;\n direction: ltr !important;\n user-select: none\n}\n\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, .5);\n box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)\n}\n\n.apexcharts-inner {\n position: relative\n}\n\n.apexcharts-text tspan {\n font-family: inherit\n}\n\nrect.legend-mouseover-inactive,\n.legend-mouseover-inactive rect,\n.legend-mouseover-inactive path,\n.legend-mouseover-inactive circle,\n.legend-mouseover-inactive line,\n.legend-mouseover-inactive text.apexcharts-yaxis-title-text,\n.legend-mouseover-inactive text.apexcharts-yaxis-label {\n transition: .15s ease all;\n opacity: .2\n}\n\n.apexcharts-legend-text {\n padding-left: 15px;\n margin-left: -15px;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255, 255, 255, .96)\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30, 30, 30, .8)\n}\n\n.apexcharts-tooltip * {\n font-family: inherit\n}\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #eceff1;\n border-bottom: 1px solid #ddd\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0, 0, 0, .7);\n border-bottom: 1px solid #333\n}\n\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-z-value {\n display: inline-block;\n margin-left: 5px;\n font-weight: 600\n}\n\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-z-value:empty,\n.apexcharts-tooltip-title:empty {\n display: none\n}\n\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px\n}\n\n.apexcharts-tooltip-goals-group,\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n display: flex\n}\n\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px\n}\n\n.apexcharts-tooltip-marker {\n width: 12px;\n height: 12px;\n position: relative;\n top: 0;\n margin-right: 10px;\n border-radius: 50%\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,\n.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px\n}\n\n.apexcharts-custom-tooltip,\n.apexcharts-tooltip-box {\n padding: 4px 8px\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}',""]);const s=a},161:(t,e,r)=>{var i=r(72),n=r(2);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.id,n,""]]);var o=(i(t.id,n,{insert:"head",singleton:!1}),n.locals?n.locals:{});t.exports=o},72:(t,e,r)=>{"use strict";var i,n=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),o={};function a(t,e,r){for(var i=0;i{t.exports=''},627:t=>{t.exports=''},606:t=>{t.exports=''},75:t=>{t.exports=''},646:t=>{t.exports=''},802:t=>{t.exports=''},541:t=>{t.exports=''}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var o=e[i]={id:i,exports:{}};return t[i](o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nc=void 0;var i={};return(()=>{"use strict";r.r(i),r.d(i,{default:()=>Fy});var t={};r.r(t),r.d(t,{cx:()=>Yr,cy:()=>Hr,height:()=>Br,rx:()=>Rr,ry:()=>zr,width:()=>Fr,x:()=>Xr,y:()=>Dr});var e={};r.r(e),r.d(e,{from:()=>si,to:()=>li});var n={};r.r(n),r.d(n,{MorphArray:()=>Vi,height:()=>$i,width:()=>Zi,x:()=>Ui,y:()=>qi});var o={};r.r(o),r.d(o,{array:()=>xo,clear:()=>wo,move:()=>So,plot:()=>ko,size:()=>Ao});var a={};r.r(a),r.d(a,{amove:()=>$a,ax:()=>qa,ay:()=>Za,build:()=>Ja,center:()=>Ua,cx:()=>Ga,cy:()=>Va,length:()=>Fa,move:()=>Wa,plain:()=>Ha,x:()=>Ba,y:()=>Na});var s={};function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t,e){for(var r=0;rXs,dx:()=>Ds,dy:()=>Ys,height:()=>Hs,move:()=>Fs,size:()=>Bs,width:()=>Ns,x:()=>Ws,y:()=>Gs});var h=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,i;return e=t,r=[{key:"shadeRGBColor",value:function(t,e){var r=e.split(","),i=t<0?0:255,n=t<0?-1*t:t,o=parseInt(r[0].slice(4),10),a=parseInt(r[1],10),s=parseInt(r[2],10);return"rgb("+(Math.round((i-o)*n)+o)+","+(Math.round((i-a)*n)+a)+","+(Math.round((i-s)*n)+s)+")"}},{key:"shadeHexColor",value:function(t,e){var r=parseInt(e.slice(1),16),i=t<0?0:255,n=t<0?-1*t:t,o=r>>16,a=r>>8&255,s=255&r;return"#"+(16777216+65536*(Math.round((i-o)*n)+o)+256*(Math.round((i-a)*n)+a)+(Math.round((i-s)*n)+s)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,r){return t.isColorHex(r)?this.shadeHexColor(e,r):this.shadeRGBColor(e,r)}}],i=[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===l(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,r=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var r="",i=t<0?"-":"",n=e[0].replace(".",""),o=Number(e[1])+1;if(o<0){for(r=i+"0.";o++;)r+="0";return r+n.replace(/^-/,"")}for(o-=n.length;o--;)r+="0";return n+r}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),r=t.clientHeight,i=t.clientWidth;return r-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[i-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),r]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var r=t.replace("#","");r=r.match(new RegExp("(.{"+r.length/3+"})","g"));for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:"x",r=t.toString().slice();return r.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,r){if(r>=t.length)for(var i=r-t.length+1;i--;)t.push(void 0);return t.splice(r,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t.style.key=e[r])}},{key:"preciseAddition",value:function(t,e){var r=(String(t).split(".")[1]||"").length,i=(String(e).split(".")[1]||"").length,n=Math.pow(10,Math.max(r,i));return(Math.round(t*n)+Math.round(e*n))/n}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,i=Math.pow(10,r-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*i),e=Math.round(Math.abs(e)*i);e;){var n=e;e=t%e,t=n}return t/i}},{key:"getPrimeFactors",value:function(t){for(var e=[],r=2;t>=2;)t%r==0?(e.push(r),t/=r):r++;return e}},{key:"mod",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,i=Math.pow(10,r-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*i))%(e=Math.round(Math.abs(e)*i))/i}}],r&&c(e.prototype,r),i&&c(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const f=h;function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function p(t,e){for(var r=0;r-1||n.indexOf("NaN")>-1)&&(n=u()),(!o.trim()||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=u()),c.globals.shouldAnimate||(a=1),t.plot(n).animate(1,s).plot(n).animate(a,s).plot(o).after((function(){f.isNumber(r)?r===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&l.animationCompleted(t):"none"!==i&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&e===c.globals.series.length-1||c.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}],r&&p(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function y(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||m(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function m(t,e){if(t){if("string"==typeof t)return x(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(t,e):void 0}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return o=t.done,t},e:function(t){a=!0,n=t},f:function(){try{o||null==e.return||e.return()}finally{if(a)throw n}}}}(t);try{for(i.s();!(r=i.n()).done;)k(r.value,e)}catch(t){i.e(t)}finally{i.f()}}else if("object"!==v(t))O(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(var n in t)k(n,t[n])}function A(t){return w[t]||{}}function O(t){S.push.apply(S,y(t))}function P(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function C(t,e,r){return(e=function(t){var e=function(t){if("object"!=T(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==T(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function T(t){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T(t)}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r2&&void 0!==arguments[2]?arguments[2]:{},i=function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:Y;return B.document.createElementNS(e,t)}function Z(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t instanceof W)return t;if("object"===G(t))return Q(t);if(null==t)return new V[U];if("string"==typeof t&&"<"!==t.charAt(0))return Q(B.document.querySelector(t));var r=e?B.document.createElement("div"):q("svg");return r.innerHTML=t,t=Q(r.firstChild),r.removeChild(r.firstChild),t}function $(t,e){return e&&(e instanceof B.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:q(t)}function J(t){if(!t)return null;if(t.instance instanceof W)return t.instance;if("#document-fragment"===t.nodeName)return new V.Fragment(t);var e=I(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":V[e]||(e="Dom"),new V[e](t)}var Q=J;function K(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.name,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return V[e]=t,r&&(V[U]=t),O(Object.getOwnPropertyNames(t.prototype)),t}var tt=1e3;function et(t){return"Svgjs"+I(t)+tt++}function rt(t){for(var e=t.children.length-1;e>=0;e--)rt(t.children[e]);return t.id?(t.id=et(t.nodeName),t):t}function it(t,e){var r,i;for(i=(t=Array.isArray(t)?t:[t]).length-1;i>=0;i--)for(r in e)t[i].prototype[r]=e[r]}function nt(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;it.length)&&(e=t.length);for(var r=0,i=Array(e);rt.length)&&(e=t.length);for(var r=0,i=Array(e);rt.length)&&(e=t.length);for(var r=0,i=Array(e);r1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}k("Dom",{classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(bt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),k("Dom",{css:function(t,e){var r={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){var e=t.split(/\s*:\s*/);r[e[0]]=e[1]})),r;if(arguments.length<2){if(Array.isArray(t)){var i,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return mt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(t);try{for(n.s();!(i=n.n()).done;){var o=i.value,a=o;r[o]=this.node.style.getPropertyValue(a)}}catch(t){n.e(t)}finally{n.f()}return r}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"===vt(t))for(var s in t)this.node.style.setProperty(s,null==t[s]||dt.test(t[s])?"":t[s])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||dt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),k("Dom",{data:function(t,e,r){if(null==t)return this.data(M(function(t){var e,r=t.length,i=[];for(e=0;e=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(i=o.n()).done;){var a=i.value;n[a]=this.data(a)}}catch(t){o.e(t)}finally{o.f()}return n}if("object"===xt(t))for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===r||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),k("Dom",{remember:function(t,e){if("object"===St(arguments[0]))for(var r in t)this.remember(r,t[r]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(var t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});var Mt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.init.apply(this,arguments)}var e,r,i;return e=t,r=[{key:"cmyk",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=Math.min(1-i,1-n,1-o);return 1===a?new t(0,0,0,1,"cmyk"):new t((1-i-a)/(1-a),(1-n-a)/(1-a),(1-o-a)/(1-a),a,"cmyk")}},{key:"hsl",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=Math.max(i,n,o),s=Math.min(i,n,o),l=(a+s)/2,c=a===s,u=a-s;return new t(360*(c?0:a===i?((n-o)/u+(n.5?u/(2-a-s):u/(a+s)),100*l,"hsl")}},{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"rgb";if(t=t||0,this.space)for(var o in this.space)delete this[this.space[o]];if("number"==typeof t)n="string"==typeof i?i:n,i="string"==typeof i?0:i,Object.assign(this,{_a:t,_b:e,_c:r,_d:i,space:n});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){var a=function(t,e){var r=Tt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Tt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Tt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Tt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Tt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Tt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return r.space=e||r.space,r}(t,e);Object.assign(this,a)}else if("string"==typeof t)if(ft.test(t)){var s=t.replace(ut,""),l=At(st.exec(s).slice(1,4).map((function(t){return parseInt(t)})),3),c=l[0],u=l[1],h=l[2];Object.assign(this,{_a:c,_b:u,_c:h,_d:0,space:"rgb"})}else{if(!ht.test(t))throw Error("Unsupported string format, can't construct Color");var f=at.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map((function(t){return parseInt(t,16)})),d=At(f,4),p=d[1],g=d[2],b=d[3];Object.assign(this,{_a:p,_b:g,_c:b,_d:0,space:"rgb"})}var y=this._a,v=this._b,m=this._c,x=this._d,w="rgb"===this.space?{r:y,g:v,b:m}:"xyz"===this.space?{x:y,y:v,z:m}:"hsl"===this.space?{h:y,s:v,l:m}:"lab"===this.space?{l:y,a:v,b:m}:"lch"===this.space?{l:y,c:v,h:m}:"cmyk"===this.space?{c:y,m:v,y:m,k:x}:{};Object.assign(this,w)}},{key:"lab",value:function(){var e=this.xyz(),r=e.x,i=e.y;return new t(116*i-16,500*(r-i),200*(i-e.z),"lab")}},{key:"lch",value:function(){var e=this.lab(),r=e.l,i=e.a,n=e.b,o=Math.sqrt(Math.pow(i,2)+Math.pow(n,2)),a=180*Math.atan2(n,i)/Math.PI;return a<0&&(a=360-(a*=-1)),new t(r,o,a,"lch")}},{key:"rgb",value:function(){if("rgb"===this.space)return this;if("lab"===(E=this.space)||"xyz"===E||"lch"===E){var e=this.x,r=this.y,i=this.z;if("lab"===this.space||"lch"===this.space){var n=this.l,o=this.a,a=this.b;if("lch"===this.space){var s=this.c,l=this.h,c=Math.PI/180;o=s*Math.cos(c*l),a=s*Math.sin(c*l)}var u=(n+16)/116,h=o/500+u,f=u-a/200,d=16/116,p=.008856,g=7.787;e=.95047*(Math.pow(h,3)>p?Math.pow(h,3):(h-d)/g),r=1*(Math.pow(u,3)>p?Math.pow(u,3):(u-d)/g),i=1.08883*(Math.pow(f,3)>p?Math.pow(f,3):(f-d)/g)}var b=3.2406*e+-1.5372*r+-.4986*i,y=-.9689*e+1.8758*r+.0415*i,v=.0557*e+-.204*r+1.057*i,m=Math.pow,x=.0031308;return new t(255*(b>x?1.055*m(b,1/2.4)-.055:12.92*b),255*(y>x?1.055*m(y,1/2.4)-.055:12.92*y),255*(v>x?1.055*m(v,1/2.4)-.055:12.92*v))}if("hsl"===this.space){var w=this.h,S=this.s,k=this.l;if(w/=360,k/=100,0==(S/=100))return new t(k*=255,k,k);var A=k<.5?k*(1+S):k+S-k*S,O=2*k-A;return new t(255*Et(O,A,w+1/3),255*Et(O,A,w),255*Et(O,A,w-1/3))}if("cmyk"===this.space){var P=this.c,C=this.m,j=this.y,T=this.k;return new t(255*(1-Math.min(1,P*(1-T)+T)),255*(1-Math.min(1,C*(1-T)+T)),255*(1-Math.min(1,j*(1-T)+T)))}return this;var E}},{key:"toArray",value:function(){return[this._a,this._b,this._c,this._d,this.space]}},{key:"toHex",value:function(){var t=At(this._clamped().map(jt),3),e=t[0],r=t[1],i=t[2];return"#".concat(e).concat(r).concat(i)}},{key:"toRgb",value:function(){var t=At(this._clamped(),3),e=t[0],r=t[1],i=t[2];return"rgb(".concat(e,",").concat(r,",").concat(i,")")}},{key:"toString",value:function(){return this.toHex()}},{key:"xyz",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,s=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,l=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,c=(.4124*a+.3576*s+.1805*l)/.95047,u=(.2126*a+.7152*s+.0722*l)/1,h=(.0193*a+.1192*s+.9505*l)/1.08883;return new t(c>.008856?Math.pow(c,1/3):7.787*c+16/116,u>.008856?Math.pow(u,1/3):7.787*u+16/116,h>.008856?Math.pow(h,1/3):7.787*h+16/116,"xyz")}},{key:"_clamped",value:function(){var t=this.rgb(),e=t._a,r=t._b,i=t._c,n=Math.max,o=Math.min,a=Math.round;return[e,r,i].map((function(t){return n(0,o(a(t),255))}))}}],i=[{key:"isColor",value:function(e){return e&&(e instanceof t||this.isRgb(e)||this.test(e))}},{key:"isRgb",value:function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}},{key:"random",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"vibrant",r=arguments.length>1?arguments[1]:void 0,i=Math.random,n=Math.round,o=Math.sin,a=Math.PI;if("vibrant"===e)return new t(24*i()+57,38*i()+45,360*i(),"lch");if("sine"===e)return new t(n(80*o(2*a*(r=null==r?i():r)/.5+.01)+150),n(50*o(2*a*r/.5+4.6)+200),n(100*o(2*a*r/.5+2.3)+150));if("pastel"===e)return new t(8*i()+86,17*i()+9,360*i(),"lch");if("dark"===e)return new t(10+10*i(),50*i()+86,360*i(),"lch");if("rgb"===e)return new t(255*i(),255*i(),255*i());if("lab"===e)return new t(100*i(),256*i()-128,256*i()-128,"lab");if("grey"===e){var s=255*i();return new t(s,s,s)}throw new Error("Unsupported random color mode")}},{key:"test",value:function(t){return"string"==typeof t&&(ht.test(t)||ft.test(t))}}],r&&Pt(e.prototype,r),i&&Pt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Lt(t){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lt(t)}function It(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.a,i=this.b,n=this.c,o=this.d,a=this.e,s=this.f,l=r*o-i*n,c=l>0?1:-1,u=c*Math.sqrt(r*r+i*i),h=Math.atan2(c*i,c*r),f=180/Math.PI*h,d=Math.cos(h),p=Math.sin(h),g=(r*n+i*o)/l,b=n*u/(g*r-i)||o*u/(g*i+r);return{scaleX:u,scaleY:b,shear:g,rotate:f,translateX:a-t+t*d*u+e*(g*d*u-p*b),translateY:s-e+t*p*u+e*(g*p*u+d*b),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}},{key:"equals",value:function(e){if(e===this)return!0;var r=new t(e);return Yt(this.a,r.a)&&Yt(this.b,r.b)&&Yt(this.c,r.c)&&Yt(this.d,r.d)&&Yt(this.e,r.e)&&Yt(this.f,r.f)}},{key:"flip",value:function(t,e){return this.clone().flipO(t,e)}},{key:"flipO",value:function(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}},{key:"init",value:function(e){var r=t.fromArray([1,0,0,1,0,0]);return e=e instanceof ar?e.matrixify():"string"==typeof e?t.fromArray(e.split(bt).map(parseFloat)):Array.isArray(e)?t.fromArray(e):"object"===zt(e)&&t.isMatrixLike(e)?e:"object"===zt(e)?(new t).transform(e):6===arguments.length?t.fromArray([].slice.call(arguments)):r,this.a=null!=e.a?e.a:r.a,this.b=null!=e.b?e.b:r.b,this.c=null!=e.c?e.c:r.c,this.d=null!=e.d?e.d:r.d,this.e=null!=e.e?e.e:r.e,this.f=null!=e.f?e.f:r.f,this}},{key:"inverse",value:function(){return this.clone().inverseO()}},{key:"inverseO",value:function(){var t=this.a,e=this.b,r=this.c,i=this.d,n=this.e,o=this.f,a=t*i-e*r;if(!a)throw new Error("Cannot invert "+this);var s=i/a,l=-e/a,c=-r/a,u=t/a,h=-(s*n+c*o),f=-(l*n+u*o);return this.a=s,this.b=l,this.c=c,this.d=u,this.e=h,this.f=f,this}},{key:"lmultiply",value:function(t){return this.clone().lmultiplyO(t)}},{key:"lmultiplyO",value:function(e){var r=e instanceof t?e:new t(e);return t.matrixMultiply(r,this,this)}},{key:"multiply",value:function(t){return this.clone().multiplyO(t)}},{key:"multiplyO",value:function(e){var r=e instanceof t?e:new t(e);return t.matrixMultiply(this,r,this)}},{key:"rotate",value:function(t,e,r){return this.clone().rotateO(t,e,r)}},{key:"rotateO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t=L(t);var i=Math.cos(t),n=Math.sin(t),o=this.a,a=this.b,s=this.c,l=this.d,c=this.e,u=this.f;return this.a=o*i-a*n,this.b=a*i+o*n,this.c=s*i-l*n,this.d=l*i+s*n,this.e=c*i-u*n+r*n-e*i+e,this.f=u*i+c*n-e*n-r*i+r,this}},{key:"scale",value:function(){var t;return(t=this.clone()).scaleO.apply(t,arguments)}},{key:"scaleO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(i=r,r=e,e=t);var n=this.a,o=this.b,a=this.c,s=this.d,l=this.e,c=this.f;return this.a=n*t,this.b=o*e,this.c=a*t,this.d=s*e,this.e=l*t-r*t+r,this.f=c*e-i*e+i,this}},{key:"shear",value:function(t,e,r){return this.clone().shearO(t,e,r)}},{key:"shearO",value:function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.a,i=this.b,n=this.c,o=this.d,a=this.e,s=this.f;return this.a=r+i*t,this.c=n+o*t,this.e=a+s*t-e*t,this}},{key:"skew",value:function(){var t;return(t=this.clone()).skewO.apply(t,arguments)}},{key:"skewO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(i=r,r=e,e=t),t=L(t),e=L(e);var n=Math.tan(t),o=Math.tan(e),a=this.a,s=this.b,l=this.c,c=this.d,u=this.e,h=this.f;return this.a=a+s*n,this.b=s+a*o,this.c=l+c*n,this.d=c+l*o,this.e=u+h*n-i*n,this.f=h+u*o-r*o,this}},{key:"skewX",value:function(t,e,r){return this.skew(t,0,e,r)}},{key:"skewY",value:function(t,e,r){return this.skew(0,t,e,r)}},{key:"toArray",value:function(){return[this.a,this.b,this.c,this.d,this.e,this.f]}},{key:"toString",value:function(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}},{key:"transform",value:function(e){if(t.isMatrixLike(e))return new t(e).multiplyO(this);var r=t.formatTransforms(e),i=new Rt(r.ox,r.oy).transform(this),n=i.x,o=i.y,a=(new t).translateO(r.rx,r.ry).lmultiplyO(this).translateO(-n,-o).scaleO(r.scaleX,r.scaleY).skewO(r.skewX,r.skewY).shearO(r.shear).rotateO(r.theta).translateO(n,o);if(isFinite(r.px)||isFinite(r.py)){var s=new Rt(n,o).transform(a),l=isFinite(r.px)?r.px-s.x:0,c=isFinite(r.py)?r.py-s.y:0;a.translateO(l,c)}return a.translateO(r.tx,r.ty),a}},{key:"translate",value:function(t,e){return this.clone().translateO(t,e)}},{key:"translateO",value:function(t,e){return this.e+=t||0,this.f+=e||0,this}},{key:"valueOf",value:function(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}],i=[{key:"formatTransforms",value:function(t){var e="both"===t.flip||!0===t.flip,r=t.flip&&(e||"x"===t.flip)?-1:1,i=t.flip&&(e||"y"===t.flip)?-1:1,n=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,o=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,a=t.scale&&t.scale.length?t.scale[0]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleX)?t.scaleX*r:r,s=t.scale&&t.scale.length?t.scale[1]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleY)?t.scaleY*i:i,l=t.shear||0,c=t.rotate||t.theta||0,u=new Rt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),h=u.x,f=u.y,d=new Rt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=d.x,g=d.y,b=new Rt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=b.x,v=b.y,m=new Rt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:a,scaleY:s,skewX:n,skewY:o,shear:l,theta:c,rx:m.x,ry:m.y,tx:y,ty:v,ox:h,oy:f,px:p,py:g}}},{key:"fromArray",value:function(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}},{key:"isMatrixLike",value:function(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}},{key:"matrixMultiply",value:function(t,e,r){var i=t.a*e.a+t.c*e.b,n=t.b*e.a+t.d*e.b,o=t.a*e.c+t.c*e.d,a=t.b*e.c+t.d*e.d,s=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return r.a=i,r.b=n,r.c=o,r.d=a,r.e=s,r.f=l,r}}],r&&Xt(e.prototype,r),i&&Xt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ft(){if(!Ft.nodes){var t=Z().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");var e=t.path().node;Ft.nodes={svg:t,path:e}}if(!Ft.nodes.svg.node.parentNode){var r=B.document.body||B.document.documentElement;Ft.nodes.svg.addTo(r)}return Ft.nodes}function Bt(t){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bt(t)}function Nt(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s1?e-1:0),i=1;it.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];return t instanceof Array?t:t.trim().split(bt).map(parseFloat)}},{key:"toArray",value:function(){return Array.prototype.concat.apply([],this)}},{key:"toSet",value:function(){return new Set(this)}},{key:"toString",value:function(){return this.join(" ")}},{key:"valueOf",value:function(){var t=[];return t.push.apply(t,Pe(this)),t}}],r&&je(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Ee(Array));function Re(t){return Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Re(t)}function ze(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.writeDataToDom();var r=this.node.cloneNode(t);return e&&(r=rt(r)),new this.constructor(r)}},{key:"each",value:function(t,e){var r,i,n=this.children();for(r=0,i=n.length;r=0}},{key:"html",value:function(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}},{key:"id",value:function(t){return void 0!==t||this.node.id||(this.node.id=et(this.type)),this.attr("id",t)}},{key:"index",value:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}},{key:"last",value:function(){return J(this.node.lastChild)}},{key:"matches",value:function(t){var e=this.node,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return r&&r.call(e,t)}},{key:"parent",value:function(t){var e=this;if(!e.node.parentNode)return null;if(e=J(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=J(e.node.parentNode));return e}},{key:"put",value:function(t,e){return t=Z(t),this.add(t,e),t}},{key:"putIn",value:function(t,e){return Z(t).add(this,e)}},{key:"remove",value:function(){return this.parent()&&this.parent().removeElement(this),this}},{key:"removeElement",value:function(t){return this.node.removeChild(t.node),this}},{key:"replace",value:function(t){return t=Z(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}},{key:"round",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=Math.pow(10,t),i=this.attr(e);for(var n in i)"number"==typeof i[n]&&(i[n]=Math.round(i[n]*r)/r);return this.attr(i),this}},{key:"svg",value:function(t,e){return this.xml(t,e,Y)}},{key:"toString",value:function(){return this.id()}},{key:"words",value:function(t){return this.node.textContent=t,this}},{key:"wrap",value:function(t){var e=this.parent();if(!e)return this.addTo(t);var r=e.index(this);return e.put(t,r).put(this)}},{key:"writeDataToDom",value:function(){return this.each((function(){this.writeDataToDom()})),this}},{key:"xml",value:function(t,e,r){if("boolean"==typeof t&&(r=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();var i=this;if(null!=t){if(i=J(i.node.cloneNode(!0)),e){var n=t(i);if(i=n||i,!1===n)return""}i.each((function(){var e=t(this),r=e||this;!1===e?this.remove():e&&this!==r&&this.replace(r)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;var o=q("wrapper",r),a=B.document.createDocumentFragment();o.innerHTML=t;for(var s=o.children.length;s--;)a.appendChild(o.firstElementChild);var l=this.parent();return e?this.replace(a)&&l:this.add(a)}}],r&&We(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Se);function Je(t){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Je(t)}function Qe(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(e=this.node.attributes);try{for(o.s();!(n=o.n()).done;){var a=n.value;t[a.nodeName]=pt.test(a.nodeValue)?parseFloat(a.nodeValue):a.nodeValue}}catch(t){o.e(t)}finally{o.f()}return t}if(t instanceof Array)return t.reduce((function(t,e){return t[e]=i.attr(e),t}),{});if("object"===Ye(t)&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ae[t]:pt.test(e)?parseFloat(e):e;"number"==typeof(e=Be.reduce((function(e,r){return r(t,e,i)}),e))?e=new De(e):Fe.has(t)&&Mt.isColor(e)?e=new Mt(e):e.constructor===Array&&(e=new _e(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof r?this.node.setAttributeNS(r,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return oe(t,this.node)},findOne:function(t){return J(this.node.querySelector(t))}}),K($e,"Dom");var ar=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&er(t,e)}(n,t);var e,r,i=rr(n);function n(t,e){var r,o,a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=i.call(this,t,e)).dom={},r.node.instance=ir(r),(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&r.setData(null!==(o=null!==(a=JSON.parse(t.getAttribute("data-svgjs")))&&void 0!==a?a:JSON.parse(t.getAttribute("svgjs:data")))&&void 0!==o?o:{}),r}return e=n,r=[{key:"center",value:function(t,e){return this.cx(t).cy(e)}},{key:"cx",value:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}},{key:"cy",value:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}},{key:"defs",value:function(){var t=this.root();return t&&t.defs()}},{key:"dmove",value:function(t,e){return this.dx(t).dy(e)}},{key:"dx",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.x(new De(t).plus(this.x()))}},{key:"dy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.y(new De(t).plus(this.y()))}},{key:"getEventHolder",value:function(){return this}},{key:"height",value:function(t){return this.attr("height",t)}},{key:"move",value:function(t,e){return this.x(t).y(e)}},{key:"parents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.root(),e="string"==typeof t;e||(t=Z(t));for(var r=new ie,i=this;(i=i.parent())&&i.node!==B.document&&"#document-fragment"!==i.nodeName&&(r.push(i),e||i.node!==t.node)&&(!e||!i.matches(t));)if(i.node===this.root().node)return null;return r}},{key:"reference",value:function(t){if(!(t=this.attr(t)))return null;var e=(t+"").match(lt);return e?Z(e[1]):null}},{key:"root",value:function(){var t=this.parent(V[U]);return t&&t.root()}},{key:"setData",value:function(t){return this.dom=t,this}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.width(new De(r.width)).height(new De(r.height))}},{key:"width",value:function(t){return this.attr("width",t)}},{key:"writeDataToDom",value:function(){return D(this,this.dom),tr(or(n.prototype),"writeDataToDom",this).call(this)}},{key:"x",value:function(t){return this.attr("x",t)}},{key:"y",value:function(t){return this.attr("y",t)}}],r&&Qe(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}($e);function sr(t){return sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sr(t)}it(ar,{bbox:function(){var t=Ut(this,(function(t){return t.getBBox()}),(function(t){try{var e=t.clone().addTo(Ft().svg).show(),r=e.node.getBBox();return e.remove(),r}catch(e){throw new Error('Getting bbox of element "'.concat(t.node.nodeName,'" is not possible: ').concat(e.toString()))}}));return new Vt(t)},rbox:function(t){var e=Ut(this,(function(t){return t.getBoundingClientRect()}),(function(t){throw new Error('Getting rbox of element "'.concat(t.node.nodeName,'" is not possible'))})),r=new Vt(e);return t?r.transform(t.screenCTM().inverseO()):r.addOffset()},inside:function(t,e){var r=this.bbox();return t>r.x&&e>r.y&&t=0;e--)null!=r[lr[t][e]]&&this.attr(lr.prefix(t,lr[t][e]),r[lr[t][e]]);return this},k(["Element","Runner"],r)})),k(["Element","Runner"],{matrix:function(t,e,r,i,n,o){return null==t?new Ht(this):this.attr("transform",new Ht(t,e,r,i,n,o))},rotate:function(t,e,r){return this.transform({rotate:t,ox:e,oy:r},!0)},skew:function(t,e,r,i){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:r},!0):this.transform({skew:[t,e],ox:r,oy:i},!0)},shear:function(t,e,r){return this.transform({shear:t,ox:e,oy:r},!0)},scale:function(t,e,r,i){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:r},!0):this.transform({scale:[t,e],ox:r,oy:i},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"both",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"center";return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),k("radius",{radius:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return"radialGradient"===(this._element||this).type?this.attr("r",new De(t)):this.rx(t).ry(e)}}),k("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Rt(this.node.getPointAtLength(t))}}),k(["Element","Runner"],{font:function(t,e){if("object"===sr(t)){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),k("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),k("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(ct).slice(0,-1).map((function(t){var e=t.trim().split("(");return[e[0],e[1].split(bt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(Ht.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new Ht)},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);var r=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(i.multiply(r)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){var r=new Ht(this).decompose();return null==t?r:r[t]}Ht.isMatrixLike(t)||(t=hr(hr({},t),{},{origin:R(t,this)}));var i=new Ht(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});var xr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&br(t,e)}(n,t);var e,r,i=yr(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.apply(this,arguments)}return e=n,r=[{key:"flatten",value:function(){return this.each((function(){if(this instanceof n)return this.flatten().ungroup()})),this}},{key:"ungroup",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.parent(),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.index(this);return e=-1===e?t.children().length:e,this.each((function(r,i){return i[i.length-r-1].toParent(t,e)})),this.remove()}}],r&&pr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(ar);function wr(t){return wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wr(t)}function Sr(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("defs",t),e)}return e=n,(r=[{key:"flatten",value:function(){return this}},{key:"ungroup",value:function(){return this}}])&&Sr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Tr(t){return Tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tr(t)}function Er(t,e){return Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Er(t,e)}function Mr(t){var e=Lr();return function(){var r,i=Ir(t);if(e){var n=Ir(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Tr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Lr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Lr=function(){return!!t})()}function Ir(t){return Ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ir(t)}K(jr,"Defs");var _r=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Er(t,e)}(r,t);var e=Mr(r);function r(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.apply(this,arguments)}return r}(ar);function Rr(t){return this.attr("rx",t)}function zr(t){return this.attr("ry",t)}function Xr(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Dr(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Yr(t){return this.attr("cx",t)}function Hr(t){return this.attr("cy",t)}function Fr(t){return null==t?2*this.rx():this.rx(new De(t).divide(2))}function Br(t){return null==t?2*this.ry():this.ry(new De(t).divide(2))}function Nr(t){return Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nr(t)}function Wr(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("ellipse",t),e)}return e=n,r=[{key:"size",value:function(t,e){var r=_(this,t,e);return this.rx(new De(r.width).divide(2)).ry(new De(r.height).divide(2))}}],r&&Wr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function Jr(t){return Jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jr(t)}function Qr(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.put(new $r).size(t,e).move(0,0)}))}),K($r,"Ellipse");var oi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ei(t,e)}(n,t);var e,r,i=ri(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B.document.createDocumentFragment();return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,t)}return e=n,(r=[{key:"xml",value:function(t,e,r){if("boolean"==typeof t&&(r=e,e=t,t=null),null==t||"function"==typeof t){var i=new $e(q("wrapper",r));return i.add(this.node.cloneNode(!0)),i.xml(!1,r)}return ti(ni(n.prototype),"xml",this).call(this,t,!1,r)}}])&&Qr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}($e);K(oi,"Fragment");const ai=oi;function si(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new De(t),fy:new De(e)}):this.attr({x1:new De(t),y1:new De(e)})}function li(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new De(t),cy:new De(e)}):this.attr({x2:new De(t),y2:new De(e)})}function ci(t){return ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(t)}function ui(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("pattern",t),e)}return e=n,(r=[{key:"attr",value:function(t,e,r){return"transform"===t&&(t="patternTransform"),wi(Oi(n.prototype),"attr",this).call(this,t,e,r)}},{key:"bbox",value:function(){return new Vt}},{key:"targets",value:function(){return oe("svg [fill*="+this.id()+"]")}},{key:"toString",value:function(){return this.url()}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"url",value:function(){return"url(#"+this.id()+")"}}])&&mi(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Ci(t){return Ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ci(t)}function ji(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("image",t),e)}return e=n,r=[{key:"load",value:function(t,e){if(!t)return this;var r=new B.window.Image;return de(r,"load",(function(t){var i=this.parent(Pi);0===this.width()&&0===this.height()&&this.size(r.width,r.height),i instanceof Pi&&0===i.width()&&0===i.height()&&i.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),de(r,"load error",(function(){pe(r)})),this.attr("href",r.src=t,F)}}],r&&ji(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function zi(t){return zi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zi(t)}function Xi(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Di(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Di(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Di(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}},{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0],e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(bt).map(parseFloat)).length%2!=0&&t.pop();for(var r=0,i=t.length;r=0;r--)i.width&&(this[r][0]=(this[r][0]-i.x)*t/i.width+i.x),i.height&&(this[r][1]=(this[r][1]-i.y)*e/i.height+i.y);return this}},{key:"toLine",value:function(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}},{key:"toString",value:function(){for(var t=[],e=0,r=this.length;e1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("line",t),e)}return e=n,r=[{key:"array",value:function(){return new Gi([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}},{key:"move",value:function(t,e){return this.attr(this.array().move(t,e).toLine())}},{key:"plot",value:function(t,e,r,i){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:r,y2:i}:new Gi(t).toLine(),this.attr(t))}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.attr(this.array().size(r.width,r.height).toLine())}}],r&&Qi(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function an(t){return an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},an(t)}function sn(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("marker",t),e)}return e=n,r=[{key:"height",value:function(t){return this.attr("markerHeight",t)}},{key:"orient",value:function(t){return this.attr("orient",t)}},{key:"ref",value:function(t,e){return this.attr("refX",t).attr("refY",e)}},{key:"toString",value:function(){return"url(#"+this.id()+")"}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"width",value:function(t){return this.attr("markerWidth",t)}}],r&&sn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function pn(t){return pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pn(t)}function gn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bn(t,e)}function bn(t,e){return bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bn(t,e)}function yn(t){var e=vn();return function(){var r,i=mn(t);if(e){var n=mn(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==pn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function vn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(vn=function(){return!!t})()}function mn(t){return mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mn(t)}function xn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wn(t,e){for(var r=0;r":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,r,i){return function(n){return n<0?t>0?e/t*n:r>0?i/r*n:0:n>1?r<1?(1-i)/(1-r)*n+(i-r)/(1-r):t<1?(1-e)/(1-t)*n+(e-t)/(1-t):1:3*n*Math.pow(1-n,2)*e+3*Math.pow(n,2)*(1-n)*i+Math.pow(n,3)}},steps:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"end";e=e.split("-").reverse()[0];var r=t;return"none"===e?--r:"both"===e&&++r,function(i){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=Math.floor(i*t),a=i*o%1==0;return"start"!==e&&"both"!==e||++o,n&&a&&--o,i>=0&&o<0&&(o=0),i<=1&&o>r&&(o=r),o/r}}},Pn=function(){function t(){xn(this,t)}return Sn(t,[{key:"done",value:function(){return!1}}]),t}(),Cn=function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:">";return xn(this,r),(t=e.call(this)).ease=On[i]||i,t}return Sn(r,[{key:"step",value:function(t,e,r){return"number"!=typeof t?r<1?t:e:t+(e-t)*this.ease(r)}}]),r}(Pn),jn=function(t){gn(r,t);var e=yn(r);function r(t){var i;return xn(this,r),(i=e.call(this)).stepper=t,i}return Sn(r,[{key:"done",value:function(t){return t.done}},{key:"step",value:function(t,e,r,i){return this.stepper(t,e,r,i)}}]),r}(Pn);function Tn(){var t=(this._duration||500)/1e3,e=this._overshoot||0,r=Math.PI,i=Math.log(e/100+1e-10),n=-i/Math.sqrt(r*r+i*i),o=3.9/(n*t);this.d=2*n*o,this.k=o*o}it(function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return xn(this,r),(t=e.call(this)).duration(i).overshoot(n),t}return Sn(r,[{key:"step",value:function(t,e,r,i){if("string"==typeof t)return t;if(i.done=r===1/0,r===1/0)return e;if(0===r)return t;r>100&&(r=16),r/=1e3;var n=i.velocity||0,o=-this.d*n-this.k*(t-e),a=t+n*r+o*r*r/2;return i.velocity=n+o*r,i.done=Math.abs(e-a)+Math.abs(n)<.002,i.done?e:a}}]),r}(jn),{duration:An("_duration",Tn),overshoot:An("_overshoot",Tn)});var En=function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.01,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3;return xn(this,r),(t=e.call(this)).p(i).i(n).d(o).windup(a),t}return Sn(r,[{key:"step",value:function(t,e,r,i){if("string"==typeof t)return t;if(i.done=r===1/0,r===1/0)return e;if(0===r)return t;var n=e-t,o=(i.integral||0)+n*r,a=(n-(i.error||0))/r,s=this._windup;return!1!==s&&(o=Math.max(-s,Math.min(o,s))),i.error=n,i.integral=o,i.done=Math.abs(n)<.001,i.done?e:t+(this.P*n+this.I*o+this.D*a)}}]),r}(jn);it(En,{windup:An("_windup"),p:An("P"),i:An("I"),d:An("D")});for(var Mn={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Ln={M:function(t,e,r){return e.x=r.x=t[0],e.y=r.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,r){return e.x=r.x,e.y=r.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},In="mlhvqtcsaz".split(""),_n=0,Rn=In.length;_n=0;n--)"M"===(i=this[n][0])||"L"===i||"T"===i?(this[n][1]+=t,this[n][2]+=e):"H"===i?this[n][1]+=t:"V"===i?this[n][1]+=e:"C"===i||"S"===i||"Q"===i?(this[n][1]+=t,this[n][2]+=e,this[n][3]+=t,this[n][4]+=e,"C"===i&&(this[n][5]+=t,this[n][6]+=e)):"A"===i&&(this[n][6]+=t,this[n][7]+=e);return this}},{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"M0 0";return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t){for(var e=0,r="",i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:!(arguments.length>1&&void 0!==arguments[1])||arguments[1],p0:new Rt,p:new Rt};i.lastToken=r,r=t.charAt(e++);)if(i.inSegment||!Xn(i,r))if("."!==r)if(isNaN(parseInt(r)))if(Bn.has(r))i.inNumber&&Dn(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(yt.test(r)){if(i.inNumber)Dn(i,!1);else{if(!zn(i))throw new Error("parser Error");Yn(i)}--e}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!Fn(i)){Dn(i,!1),--e;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||Hn(i)){i.inNumber=!0,i.number=r,Dn(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){Dn(i,!1),--e;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&Dn(i,!1),i.inSegment&&zn(i)&&Yn(i),i.segments}(t)}},{key:"size",value:function(t,e){var r,i,n=this.bbox();for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)"M"===(i=this[r][0])||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}},{key:"toString",value:function(){return function(t){for(var e="",r=0,i=t.length;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r-1?t.constructor:Array.isArray(t)?_e:"object"===e?co:ao},oo=function(){function t(e){Kn(this,t),this._stepper=e||new Cn("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}return eo(t,[{key:"at",value:function(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}},{key:"done",value:function(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}},{key:"from",value:function(t){return null==t?this._from:(this._from=this._set(t),this)}},{key:"stepper",value:function(t){return null==t?this._stepper:(this._stepper=t,this)}},{key:"to",value:function(t){return null==t?this._to:(this._to=this._set(t),this)}},{key:"type",value:function(t){return null==t?this._type:(this._type=t,this)}},{key:"_set",value:function(t){this._type||this.type(no(t));var e=new this._type(t);return this._type===Mt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===co&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}]),t}(),ao=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"init",value:function(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}},{key:"toArray",value:function(){return[this.value]}},{key:"valueOf",value:function(){return this.value}}]),t}(),so=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"init",value:function(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,t.defaults,e),this}},{key:"toArray",value:function(){var t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}]),t}();so.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};var lo=function(t,e){return t[0]e[0]?1:0},co=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"align",value:function(t){for(var e=this.values,r=0,i=e.length;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("path",t),e)}return e=n,r=[{key:"array",value:function(){return this._array||(this._array=new $n(this.attr("d")))}},{key:"clear",value:function(){return delete this._array,this}},{key:"height",value:function(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}},{key:"move",value:function(t,e){return this.attr("d",this.array().move(t,e))}},{key:"plot",value:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new $n(t))}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.attr("d",this.array().size(r.width,r.height))}},{key:"width",value:function(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}},{key:"x",value:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}},{key:"y",value:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}],r&&fo(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function xo(){return this._array||(this._array=new Gi(this.attr("points")))}function wo(){return delete this._array,this}function So(t,e){return this.attr("points",this.array().move(t,e))}function ko(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Gi(t))}function Ao(t,e){var r=_(this,t,e);return this.attr("points",this.array().size(r.width,r.height))}function Oo(t){return Oo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oo(t)}function Po(t,e){return Po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Po(t,e)}function Co(t){var e=jo();return function(){var r,i=To(t);if(e){var n=To(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Oo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function jo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(jo=function(){return!!t})()}function To(t){return To=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},To(t)}mo.prototype.MorphArray=$n,k({Container:{path:nt((function(t){return this.put(new mo).plot(t||new $n)}))}}),K(mo,"Path");var Eo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Po(t,e)}(r,t);var e=Co(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("polygon",t),i)}return r}(_r);function Mo(t){return Mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mo(t)}function Lo(t,e){return Lo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lo(t,e)}function Io(t){var e=_o();return function(){var r,i=Ro(t);if(e){var n=Ro(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Mo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function _o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_o=function(){return!!t})()}function Ro(t){return Ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ro(t)}k({Container:{polygon:nt((function(t){return this.put(new Eo).plot(t||new Gi)}))}}),it(Eo,n),it(Eo,o),K(Eo,"Polygon");var zo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lo(t,e)}(r,t);var e=Io(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("polyline",t),i)}return r}(_r);function Xo(t){return Xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xo(t)}function Do(t,e){return Do=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Do(t,e)}function Yo(t){var e=Ho();return function(){var r,i=Fo(t);if(e){var n=Fo(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Xo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Ho(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ho=function(){return!!t})()}function Fo(t){return Fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fo(t)}k({Container:{polyline:nt((function(t){return this.put(new zo).plot(t||new Gi)}))}}),it(zo,n),it(zo,o),K(zo,"Polyline");var Bo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Do(t,e)}(r,t);var e=Yo(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("rect",t),i)}return r}(_r);function No(t){return No="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},No(t)}function Wo(t,e){for(var r=0;r=e.time?e.run():Uo.timeouts.push(e),e!==r););for(var i=null,n=Uo.frames.last();i!==n&&(i=Uo.frames.shift());)i.run(t);for(var o=null;o=Uo.immediates.shift();)o();Uo.nextDraw=Uo.timeouts.first()||Uo.frames.first()?B.window.requestAnimationFrame(Uo._draw):null}};const qo=Uo;function Zo(t){return Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zo(t)}function $o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:na;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(t=i.call(this))._timeSource=e,t.terminate(),t}return e=n,r=[{key:"active",value:function(){return!!this._nextFrame}},{key:"finish",value:function(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}},{key:"getEndTime",value:function(){var t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}},{key:"getEndTimeOfTimeline",value:function(){var t=this._runners.map((function(t){return t.start+t.runner.duration()}));return Math.max.apply(Math,[0].concat(function(t){return function(t){if(Array.isArray(t))return $o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return $o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)))}},{key:"getLastRunnerInfo",value:function(){return this.getRunnerInfoById(this._lastRunnerId)}},{key:"getRunnerInfoById",value:function(t){return this._runners[this._runnerIds.indexOf(t)]||null}},{key:"pause",value:function(){return this._paused=!0,this._continue()}},{key:"persist",value:function(t){return null==t?this._persist:(this._persist=t,this)}},{key:"play",value:function(){return this._paused=!1,this.updateTime()._continue()}},{key:"reverse",value:function(t){var e=this.speed();if(null==t)return this.speed(-e);var r=Math.abs(e);return this.speed(t?-r:r)}},{key:"schedule",value:function(t,e,r){if(null==t)return this._runners.map(ia);var i=0,n=this.getEndTime();if(e=e||0,null==r||"last"===r||"after"===r)i=n;else if("absolute"===r||"start"===r)i=e,e=0;else if("now"===r)i=this._time;else if("relative"===r){var o=this.getRunnerInfoById(t.id);o&&(i=o.start+e,e=0)}else{if("with-last"!==r)throw new Error('Invalid value for the "when" parameter');var a=this.getLastRunnerInfo();i=a?a.start:this._time}t.unschedule(),t.timeline(this);var s=t.persist(),l={persist:null===s?this._persist:s,start:i+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(l),this._runners.sort((function(t,e){return t.start-e.start})),this._runnerIds=this._runners.map((function(t){return t.runner.id})),this.updateTime()._continue(),this}},{key:"seek",value:function(t){return this.time(this._time+t)}},{key:"source",value:function(t){return null==t?this._timeSource:(this._timeSource=t,this)}},{key:"speed",value:function(t){return null==t?this._speed:(this._speed=t,this)}},{key:"stop",value:function(){return this.time(0),this.pause()}},{key:"time",value:function(t){return null==t?this._time:(this._time=t,this._continue(!0))}},{key:"unschedule",value:function(t){var e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}},{key:"updateTime",value:function(){return this.active()||(this._lastSourceTime=this._timeSource()),this}},{key:"_continue",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return qo.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qo.frame(this._step)),this)}},{key:"_stepFn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._timeSource(),r=e-this._lastSourceTime;t&&(r=0);var i=this._speed*r+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=i,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(var n=this._runners.length;n--;){var o=this._runners[n],a=o.runner;this._time-o.start<=0&&a.reset()}for(var s=!1,l=0,c=this._runners.length;l0?this._continue():(this.pause(),this.fire("finished")),this}},{key:"terminate",value:function(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}],r&&Jo(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Se);function aa(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=0;this._lastPosition=e;var i=this.duration(),n=this._lastTime<=0&&this._time>0,o=this._lastTime=i;this._lastTime=this._time,n&&this.fire("start",this);var a=this._isDeclarative;this.done=!a&&!o&&this._time>=i,this._reseted=!1;var s=!1;return(r||a)&&(this._initialise(r),this.transforms=new Ht,s=this._run(a?t:e),this.fire("step",this)),this.done=this.done||s&&a,o&&this.fire("finished",this),this}},{key:"time",value:function(t){if(null==t)return this._time;var e=t-this._time;return this.step(e),this}},{key:"timeline",value:function(t){return void 0===t?this._timeline:(this._timeline=t,this)}},{key:"unschedule",value:function(){var t=this.timeline();return t&&t.unschedule(this),this}},{key:"_initialise",value:function(t){if(t||this._isDeclarative)for(var e=0,r=this._queue.length;e0&&void 0!==arguments[0]?arguments[0]:new Ht,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ha(this,t),this.transforms=e,this.id=r,this.done=i}return da(t,[{key:"clearTransformsFromQueue",value:function(){}}]),t}();it([ma,xa],{mergeWith:function(t){return new xa(t.transforms.lmultiply(this.transforms),t.id)}});var wa=function(t,e){return t.lmultiplyO(e)},Sa=function(t){return t.transforms};function ka(){var t=this._transformationRunners.runners.map(Sa).reduce(wa,new Ht);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}var Aa=function(){function t(){ha(this,t),this.runners=[],this.ids=[]}return da(t,[{key:"add",value:function(t){if(!this.runners.includes(t)){var e=t.id+1;return this.runners.push(t),this.ids.push(e),this}}},{key:"clearBefore",value:function(t){var e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new xa).forEach((function(t){return t.clearTransformsFromQueue()})),this}},{key:"edit",value:function(t,e){var r=this.ids.indexOf(t+1);return this.ids.splice(r,1,t+1),this.runners.splice(r,1,e),this}},{key:"getByID",value:function(t){return this.runners[this.ids.indexOf(t+1)]}},{key:"length",value:function(){return this.ids.length}},{key:"merge",value:function(){for(var t=null,e=0;e0&&void 0!==arguments[0]?arguments[0]:0;return this._queueNumberDelta("x",t)},dy:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this._queueNumberDelta("y",t)},dmove:function(t,e){return this.dx(t).dy(e)},_queueNumberDelta:function(t,e){if(e=new De(e),this._tryRetarget(t,e))return this;var r=new oo(this._stepper).to(e),i=null;return this.queue((function(){i=this.element()[t](),r.from(i),r.to(i+e)}),(function(e){return this.element()[t](r.at(e)),r.done()}),(function(t){r.to(i+new De(t))})),this._rememberMorpher(t,r),this},_queueObject:function(t,e){if(this._tryRetarget(t,e))return this;var r=new oo(this._stepper).to(e);return this.queue((function(){r.from(this.element()[t]())}),(function(e){return this.element()[t](r.at(e)),r.done()})),this._rememberMorpher(t,r),this},_queueNumber:function(t,e){return this._queueObject(t,new De(e))},cx:function(t){return this._queueNumber("cx",t)},cy:function(t){return this._queueNumber("cy",t)},move:function(t,e){return this.x(t).y(e)},amove:function(t,e){return this.ax(t).ay(e)},center:function(t,e){return this.cx(t).cy(e)},size:function(t,e){var r;return t&&e||(r=this._element.bbox()),t||(t=r.width/r.height*e),e||(e=r.height/r.width*t),this.width(t).height(e)},width:function(t){return this._queueNumber("width",t)},height:function(t){return this._queueNumber("height",t)},plot:function(t,e,r,i){if(4===arguments.length)return this.plot([t,e,r,i]);if(this._tryRetarget("plot",t))return this;var n=new oo(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){n.from(this._element.array())}),(function(t){return this._element.plot(n.at(t)),n.done()})),this._rememberMorpher("plot",n),this},leading:function(t){return this._queueNumber("leading",t)},viewbox:function(t,e,r,i){return this._queueObject("viewbox",new Vt(t,e,r,i))},update:function(t){return"object"!==ua(t)?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),it(ma,{rx:Rr,ry:zr,from:si,to:li}),K(ma,"Runner");var Ia=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ta(t,e)}(n,t);var e,r,i=Ea(n);function n(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i.call(this,$("svg",t),r)).namespace(),e}return e=n,(r=[{key:"defs",value:function(){return this.isRoot()?J(this.node.querySelector("defs"))||this.put(new jr):this.root().defs()}},{key:"isRoot",value:function(){return!this.node.parentNode||!(this.node.parentNode instanceof B.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}},{key:"namespace",value:function(){return this.isRoot()?this.attr({xmlns:Y,version:"1.1"}).attr("xmlns:xlink",F,H):this.root().namespace()}},{key:"removeNamespace",value:function(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,H).attr("xmlns:svgjs",null,H)}},{key:"root",value:function(){return this.isRoot()?this:ja(La(n.prototype),"root",this).call(this)}}])&&Pa(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function _a(t){return _a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_a(t)}function Ra(t,e){return Ra=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ra(t,e)}function za(t){var e=Xa();return function(){var r,i=Da(t);if(e){var n=Da(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==_a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Xa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xa=function(){return!!t})()}function Da(t){return Da=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Da(t)}k({Container:{nested:nt((function(){return this.put(new Ia)}))}}),K(Ia,"Svg",!0);var Ya=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ra(t,e)}(r,t);var e=za(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("symbol",t),i)}return r}(xr);function Ha(t){return!1===this._build&&this.clear(),this.node.appendChild(B.document.createTextNode(t)),this}function Fa(){return this.node.getComputedTextLength()}function Ba(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Na(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function Wa(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox();return this.x(t,r).y(e,r)}function Ga(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function Va(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function Ua(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox();return this.cx(t,r).cy(e,r)}function qa(t){return this.attr("x",t)}function Za(t){return this.attr("y",t)}function $a(t,e){return this.ax(t).ay(e)}function Ja(t){return this._build=!!t,this}function Qa(t){return Qa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qa(t)}function Ka(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=i.call(this,$("text",t),o)).dom.leading=null!==(e=r.dom.leading)&&void 0!==e?e:new De(1.3),r._rebuild=!0,r._build=!1,r}return e=n,r=[{key:"leading",value:function(t){return null==t?this.dom.leading:(this.dom.leading=new De(t),this.rebuild())}},{key:"rebuild",value:function(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){var e=this,r=0,i=this.dom.leading;this.each((function(t){if(!X(this.node)){var n=B.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=i*new De(n);this.dom.newLined&&(this.attr("x",e.attr("x")),"\n"===this.text()?r+=o:(this.attr("dy",t?o+r:0),r=0))}})),this.fire("rebuild")}return this}},{key:"setData",value:function(t){return this.dom=t,this.dom.leading=new De(t.leading||1.3),this}},{key:"writeDataToDom",value:function(){return D(this,this.dom,{leading:1.3}),this}},{key:"text",value:function(t){if(void 0===t){var e=this.node.childNodes,r=0;t="";for(var i=0,n=e.length;i0&&void 0!==arguments[0]?arguments[0]:"";return this.put(new os).text(t)})),plain:nt((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.put(new os).plain(t)}))}}),K(os,"Text");var ds=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cs(t,e)}(n,t);var e,r,i=us(n);function n(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i.call(this,$("tspan",t),r))._build=!1,e}return e=n,r=[{key:"dx",value:function(t){return this.attr("dx",t)}},{key:"dy",value:function(t){return this.attr("dy",t)}},{key:"newLine",value:function(){this.dom.newLined=!0;var t=this.parent();if(!(t instanceof os))return this;var e=t.index(this),r=B.window.getComputedStyle(this.node).getPropertyValue("font-size"),i=t.dom.leading*new De(r);return this.dy(e?i:0).attr("x",t.x())}},{key:"text",value:function(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}],r&&ss(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function ps(t){return ps="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ps(t)}function gs(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:"",e=new ds;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.tspan(t).newLine()}}}),K(ds,"Tspan");var ws=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ys(t,e)}(n,t);var e,r,i=vs(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("circle",t),e)}return e=n,(r=[{key:"radius",value:function(t){return this.attr("r",t)}},{key:"rx",value:function(t){return this.attr("r",t)}},{key:"ry",value:function(t){return this.rx(t)}},{key:"size",value:function(t){return this.radius(new De(t).divide(2))}}])&&gs(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function Ss(t){return Ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ss(t)}function ks(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0;return this.put(new ws).size(t).move(0,0)}))}}),K(ws,"Circle");var Es=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ps(t,e)}(n,t);var e,r,i=Cs(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("clipPath",t),e)}return e=n,(r=[{key:"remove",value:function(){return this.targets().forEach((function(t){t.unclip()})),Os(Ts(n.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe("svg [clip-path*="+this.id()+"]")}}])&&ks(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Ms(t){return Ms="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ms(t)}function Ls(t,e){return Ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ls(t,e)}function Is(t){var e=_s();return function(){var r,i=Rs(t);if(e){var n=Rs(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Ms(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function _s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_s=function(){return!!t})()}function Rs(t){return Rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rs(t)}k({Container:{clip:nt((function(){return this.defs().put(new Es)}))},Element:{clipper:function(){return this.reference("clip-path")},clipWith:function(t){var e=t instanceof Es?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip:function(){return this.attr("clip-path",null)}}}),K(Es,"ClipPath");var zs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ls(t,e)}(r,t);var e=Is(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("foreignObject",t),i)}return r}(ar);function Xs(t,e){return this.children().forEach((function(r){var i;try{i=r.node instanceof N().SVGSVGElement?new Vt(r.attr(["x","y","width","height"])):r.bbox()}catch(t){return}var n=new Ht(r),o=n.translate(t,e).transform(n.inverse()),a=new Rt(i.x,i.y).transform(o);r.move(a.x,a.y)})),this}function Ds(t){return this.dmove(t,0)}function Ys(t){return this.dmove(0,t)}function Hs(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.height:this.size(e.width,t,e)}function Fs(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox(),i=t-r.x,n=e-r.y;return this.dmove(i,n)}function Bs(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox(),i=_(this,t,e,r),n=i.width/r.width,o=i.height/r.height;return this.children().forEach((function(t){var e=new Rt(r).transform(new Ht(t).inverse());t.scale(n,o,e.x,e.y)})),this}function Ns(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.width:this.size(t,e.height,e)}function Ws(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.x:this.move(t,e.y,e)}function Gs(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.y:this.move(e.x,t,e)}function Vs(t){return Vs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vs(t)}function Us(t,e){return Us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Us(t,e)}function qs(t){var e=Zs();return function(){var r,i=$s(t);if(e){var n=$s(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Vs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Zs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zs=function(){return!!t})()}function $s(t){return $s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$s(t)}k({Container:{foreignObject:nt((function(t,e){return this.put(new zs).size(t,e)}))}}),K(zs,"ForeignObject");var Js=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Us(t,e)}(r,t);var e=qs(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("g",t),i)}return r}(xr);function Qs(t){return Qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qs(t)}function Ks(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("a",t),e)}return e=n,(r=[{key:"target",value:function(t){return this.attr("target",t)}},{key:"to",value:function(t){return this.attr("href",t,F)}}])&&Ks(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function al(t){return al="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},al(t)}function sl(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("mask",t),e)}return e=n,(r=[{key:"remove",value:function(){return this.targets().forEach((function(t){t.unmask()})),cl(dl(n.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe("svg [mask*="+this.id()+"]")}}])&&sl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function gl(t){return gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gl(t)}function bl(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("stop",t),e)}return e=n,r=[{key:"update",value:function(t){return("number"==typeof t||t instanceof De)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new De(t.offset)),this}}],r&&bl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(ar);function kl(t){return kl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kl(t)}function Al(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Ol(t,e,r){return(e=Cl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pl(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("style",t),e)}return e=n,r=[{key:"addText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.node.textContent+=t,this}},{key:"font",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.rule("@font-face",function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("textPath",t),e)}return e=n,(r=[{key:"array",value:function(){var t=this.track();return t?t.array():null}},{key:"plot",value:function(t){var e=this.track(),r=null;return e&&(r=e.plot(t)),null==t?r:this}},{key:"track",value:function(){return this.reference("href")}}])&&_l(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(os);function Fl(t){return Fl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fl(t)}function Bl(t,e){for(var r=0;r1&&void 0!==arguments[1])||arguments[1],i=new Hl;if(t instanceof mo||(t=this.defs().path(t)),i.attr("href","#"+t,F),r)for(;e=this.node.firstChild;)i.node.appendChild(e);return this.put(i)})),textPath:function(){return this.findOne("textPath")}},Path:{text:nt((function(t){return t instanceof os||(t=(new os).addTo(this.parent()).text(t)),t.path(this)})),targets:function(){var t=this;return oe("svg textPath").filter((function(e){return(e.attr("href")||"").includes(t.id())}))}}}),Hl.prototype.MorphArray=$n,K(Hl,"TextPath");var ql=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wl(t,e)}(n,t);var e,r,i=Gl(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("use",t),e)}return e=n,(r=[{key:"use",value:function(t,e){return this.attr("href",(e||"")+"#"+t,F)}}])&&Bl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);k({Container:{use:nt((function(t,e){return this.put(new ql).use(t,e)}))}}),K(ql,"Use");var Zl=Z;function $l(t){return $l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$l(t)}function Jl(t){return function(t){if(Array.isArray(t))return Ql(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ql(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ql(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ql(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];uo.push.apply(uo,Jn([].concat(t)))}([De,Mt,Vt,Ht,_e,Gi,$n,Rt]),it(uo,{to:function(t){return(new oo).type(this.constructor).from(this.toArray()).to(t)},fromArray:function(t){return this.init(t),this},toConsumable:function(){return this.toArray()},morph:function(t,e,r,i,n){return this.fromArray(t.map((function(t,o){return i.step(t,e[o],r,n[o],n)})))}});var cc=function(t){nc(r,t);var e=ac(r);function r(t){var i;return Kl(this,r),(i=e.call(this,$("filter",t),t)).$source="SourceGraphic",i.$sourceAlpha="SourceAlpha",i.$background="BackgroundImage",i.$backgroundAlpha="BackgroundAlpha",i.$fill="FillPaint",i.$stroke="StrokePaint",i.$autoSetIn=!0,i}return ec(r,[{key:"put",value:function(t,e){return!(t=ic(lc(r.prototype),"put",this).call(this,t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}},{key:"remove",value:function(){return this.targets().each("unfilter"),ic(lc(r.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe('svg [filter*="'+this.id()+'"]')}},{key:"toString",value:function(){return"url(#"+this.id()+")"}}]),r}(ar),uc=function(t){nc(r,t);var e=ac(r);function r(t,i){var n;return Kl(this,r),(n=e.call(this,t,i)).result(n.id()),n}return ec(r,[{key:"in",value:function(t){if(null==t){var e=this.attr("in");return this.parent()&&this.parent().find('[result="'.concat(e,'"]'))[0]||e}return this.attr("in",t)}},{key:"result",value:function(t){return this.attr("result",t)}},{key:"toString",value:function(){return this.result()}}]),r}(ar),hc=function(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,F)},morphology:hc(["operator","radius"]),offset:hc(["dx","dy"]),specularLighting:hc(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:hc([]),turbulence:hc(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((function(t){var e=I(t),r=fc[t];cc[e+"Effect"]=function(t){nc(n,t);var i=ac(n);function n(t){return Kl(this,n),i.call(this,$("fe"+e,t),t)}return ec(n,[{key:"update",value:function(t){return r.apply(this,t),this}}]),n}(uc),cc.prototype[t]=nt((function(t){var r=new cc[e+"Effect"];if(null==t)return this.put(r);for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{},e=this.put(new cc.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;for(var r in t.r||t.g||t.b||t.a||(t={r:t,g:t,b:t,a:t}),t)e.add(new(cc["Func"+r.toUpperCase()])(t[r]));return e}}),["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((function(t){var e=I(t);cc[e]=function(t){nc(i,t);var r=ac(i);function i(t){return Kl(this,i),r.call(this,$("fe"+e,t),t)}return i}(uc)})),["funcR","funcG","funcB","funcA"].forEach((function(t){var e=cc[I(t)],r=nt((function(){return this.put(new e)}));cc.ComponentTransferEffect.prototype[t]=r})),["distantLight","pointLight","spotLight"].forEach((function(t){var e=cc[I(t)],r=nt((function(){return this.put(new e)}));cc.DiffuseLightingEffect.prototype[t]=r,cc.SpecularLightingEffect.prototype[t]=r})),it(cc.MergeEffect,{mergeNode:function(t){return this.put(new cc.MergeNode).attr("in",t)}}),it(jr,{filter:function(t){var e=this.put(new cc);return"function"==typeof t&&t.call(e,e),e}}),it(xr,{filter:function(t){return this.defs().filter(t)}}),it(ar,{filterWith:function(t){var e=t instanceof cc?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer:function(){return this.reference("filter")}});var dc={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,r,i){return this.parent()&&this.parent().diffuseLighting(t,r,i).in(this)},displacementMap:function(t,e,r,i){return this.parent()&&this.parent().displacementMap(this,t,e,r,i)},dropShadow:function(t,e,r){return this.parent()&&this.parent().dropShadow(this,t,e,r).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){var e;return t=t instanceof Array?t:Jl(t),this.parent()&&(e=this.parent()).merge.apply(e,[this].concat(Jl(t)))},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,r,i,n){return this.parent()&&this.parent().specularLighting(t,r,i,n).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,r,i,n){return this.parent()&&this.parent().turbulence(t,e,r,i,n).in(this)}};function pc(t){return pc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pc(t)}function gc(t,e){for(var r=0;r0&&-1===o.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:i,dx:l,dy:s,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:a,result:"blur"}),t.flood({"flood-color":c,"flood-opacity":u,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",i])}},{key:"dropShadow",value:function(t,e){var r,i,n,o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=this.w;return t.unfilter(!0),f.isMsEdge()&&"radialBar"===s.config.chart.type||(null===(r=s.config.chart.dropShadow.enabledOnSeries)||void 0===r?void 0:r.length)>0&&-1===(null===(n=s.config.chart.dropShadow.enabledOnSeries)||void 0===n?void 0:n.indexOf(a))||(t.filterWith((function(t){o.addShadow(t,a,e,"SourceGraphic")})),e.noUserSpaceOnUse||t.filterer().node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(i=t.filterer())||void 0===i?void 0:i.node)),t}},{key:"setSelectionFilter",value:function(t,e,r){var i=this.w;if(void 0!==i.globals.selectedDataPoints[e]&&i.globals.selectedDataPoints[e].indexOf(r)>-1){t.node.setAttribute("selected",!0);var n=i.config.states.active.filter;"none"!==n&&this.applyFilter(t,e,n.type)}}},{key:"_scaleFilterSize",value:function(t){t&&function(e){for(var r in e)e.hasOwnProperty(r)&&t.setAttribute(r,e[r])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}],r&&gc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const vc=yc;function mc(t){return mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mc(t)}function xc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function wc(t){for(var e=1;e2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function o(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var a=t.split(/[,\s]/).reduce((function(t,e){var r=e.match("([a-zA-Z])(.+)");return r?(t.push(r[1]),t.push(r[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),s=[];if(a.length>1){var l=o(a[0]),c=null;"Z"==a[a.length-1][0]&&a[0].length>2&&(c=["L",l.x,l.y],a[a.length-1]=c),s.push(a[0]);for(var u=1;u2&&"L"==f[0]&&d.length>2&&"L"==d[0]){var p,g,b=o(h),y=o(f),v=o(d);p=r(y,b,e),g=r(y,v,e),n(f,p),f.origPoint=y,s.push(f);var m=i(p,y,.5),x=i(y,g,.5),w=["C",m.x,m.y,x.x,x.y,g.x,g.y];w.origPoint=y,s.push(w)}else s.push(f)}if(c){var S=o(s[s.length-1]);s.push(["Z"]),n(s[0],S)}}else s=a;return s.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,r,i){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:r,y2:i,stroke:n,"stroke-dasharray":o,"stroke-width":a,"stroke-linecap":s})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,u=this.w.globals.dom.Paper.rect();return u.attr({x:t,y:e,width:r>0?r:0,height:i>0?i:0,rx:n,ry:n,opacity:a,"stroke-width":null!==s?s:0,stroke:null!==l?l:"none","stroke-dasharray":c}),u.node.setAttribute("fill",o),u}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:i,stroke:e,"stroke-width":r})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var r=this.w.globals.dom.Paper.circle(2*t);return null!==e&&r.attr(e),r}},{key:"drawPath",value:function(t){var e=t.d,r=void 0===e?"":e,i=t.stroke,n=void 0===i?"#a8a8a8":i,o=t.strokeWidth,a=void 0===o?1:o,s=t.fill,l=t.fillOpacity,c=void 0===l?1:l,u=t.strokeOpacity,h=void 0===u?1:u,f=t.classes,d=t.strokeLinecap,p=void 0===d?null:d,g=t.strokeDashArray,b=void 0===g?0:g,y=this.w;return null===p&&(p=y.config.stroke.lineCap),(r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r="M 0 ".concat(y.globals.gridHeight)),y.globals.dom.Paper.path(r).attr({fill:s,"fill-opacity":c,stroke:n,"stroke-opacity":h,"stroke-linecap":p,"stroke-width":a,"stroke-dasharray":b,class:f})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){return["M",t,e].join(" ")}},{key:"line",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=null;return null===r?i=[" L",t,e].join(" "):"H"===r?i=[" H",t].join(" "):"V"===r&&(i=[" V",e].join(" ")),i}},{key:"curve",value:function(t,e,r,i,n,o){return["C",t,e,r,i,n,o].join(" ")}},{key:"quadraticCurve",value:function(t,e,r,i){return["Q",t,e,r,i].join(" ")}},{key:"arc",value:function(t,e,r,i,n,o,a){var s="A";return arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(s="a"),[s,t,e,r,i,n,o,a].join(" ")}},{key:"renderPaths",value:function(t){var e,r=t.j,i=t.realIndex,n=t.pathFrom,o=t.pathTo,a=t.stroke,s=t.strokeWidth,l=t.strokeLinecap,c=t.fill,u=t.animationDelay,h=t.initialSpeed,f=t.dataChangeSpeed,d=t.className,p=t.chartType,g=t.shouldClipToGrid,y=void 0===g||g,v=t.bindEventsOnPaths,m=void 0===v||v,x=t.drawShadow,w=void 0===x||x,S=this.w,k=new vc(this.ctx),A=new b(this.ctx),O=this.w.config.chart.animations.enabled,P=O&&this.w.config.chart.animations.dynamicAnimation.enabled,C=!!(O&&!S.globals.resized||P&&S.globals.dataChanged&&S.globals.shouldAnimate);C?e=n:(e=o,S.globals.animationEnded=!0);var j,T=S.config.stroke.dashArray;j=Array.isArray(T)?T[i]:S.config.stroke.dashArray;var E=this.drawPath({d:e,stroke:a,strokeWidth:s,fill:c,fillOpacity:1,classes:d,strokeLinecap:l,strokeDashArray:j});E.attr("index",i),y&&("bar"===p&&!S.globals.isHorizontal||S.globals.comboCharts?E.attr({"clip-path":"url(#gridRectBarMask".concat(S.globals.cuid,")")}):E.attr({"clip-path":"url(#gridRectMask".concat(S.globals.cuid,")")})),S.config.chart.dropShadow.enabled&&w&&k.dropShadow(E,S.config.chart.dropShadow,i),m&&(E.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,E)),E.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,E)),E.node.addEventListener("mousedown",this.pathMouseDown.bind(this,E))),E.attr({pathTo:o,pathFrom:n});var M={el:E,j:r,realIndex:i,pathFrom:n,pathTo:o,fill:c,strokeWidth:s,delay:u};return!O||S.globals.resized||S.globals.dataChanged?!S.globals.resized&&S.globals.dataChanged||A.showDelayedElements():A.animatePathsGradually(wc(wc({},M),{},{speed:h})),S.globals.dataChanged&&P&&C&&A.animatePathsGradually(wc(wc({},M),{},{speed:f})),E}},{key:"drawPattern",value:function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,r,(function(o){"horizontalLines"===t?o.line(0,0,r,0).stroke({color:i,width:n+1}):"verticalLines"===t?o.line(0,0,0,e).stroke({color:i,width:n+1}):"slantedLines"===t?o.line(0,0,e,r).stroke({color:i,width:n}):"squares"===t?o.rect(e,r).fill("none").stroke({color:i,width:n}):"circles"===t&&o.circle(e).fill("none").stroke({color:i,width:n})}))}},{key:"drawGradient",value:function(t,e,r,i,n){var o,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,u=this.w;e.length<9&&0===e.indexOf("#")&&(e=f.hexToRgba(e,i)),r.length<9&&0===r.indexOf("#")&&(r=f.hexToRgba(r,n));var h=0,d=1,p=1,g=null;null!==s&&(h=void 0!==s[0]?s[0]/100:0,d=void 0!==s[1]?s[1]/100:1,p=void 0!==s[2]?s[2]/100:1,g=void 0!==s[3]?s[3]/100:null);var b=!("donut"!==u.config.chart.type&&"pie"!==u.config.chart.type&&"polarArea"!==u.config.chart.type&&"bubble"!==u.config.chart.type);if(o=l&&0!==l.length?u.globals.dom.Paper.gradient(b?"radial":"linear",(function(t){(Array.isArray(l[c])?l[c]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):u.globals.dom.Paper.gradient(b?"radial":"linear",(function(t){t.stop(h,e,i),t.stop(d,r,n),t.stop(p,r,n),null!==g&&t.stop(g,e,i)})),b){var y=u.globals.gridWidth/2,v=u.globals.gridHeight/2;"bubble"!==u.config.chart.type?o.attr({gradientUnits:"userSpaceOnUse",cx:y,cy:v,r:a}):o.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?o.from(0,0).to(0,1):"diagonal"===t?o.from(0,0).to(1,1):"horizontal"===t?o.from(0,1).to(1,1):"diagonal2"===t&&o.from(1,0).to(0,1);return o}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,r=t.maxWidth,i=t.fontSize,n=t.fontFamily,o=this.getTextRects(e,i,n),a=o.width/e.length,s=Math.floor(r/a);return r-1){var s=r.globals.selectedDataPoints[n].indexOf(o);r.globals.selectedDataPoints[n].splice(s,1)}}else{if(!r.config.states.active.allowMultipleDataPointsSelection&&r.globals.selectedDataPoints.length>0){r.globals.selectedDataPoints=[];var l=r.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),c=r.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),u=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),i.getDefaultFilter(t,n)}))};u(l),u(c)}t.node.setAttribute("selected","true"),a="true",void 0===r.globals.selectedDataPoints[n]&&(r.globals.selectedDataPoints[n]=[]),r.globals.selectedDataPoints[n].push(o)}if("true"===a){var h=r.config.states.active.filter;if("none"!==h)i.applyFilter(t,n,h.type);else if("none"!==r.config.states.hover.filter&&!r.globals.isTouchDevice){var f=r.config.states.hover.filter;i.applyFilter(t,n,f.type)}}else"none"!==r.config.states.active.filter.type&&("none"===r.config.states.hover.filter.type||r.globals.isTouchDevice?i.getDefaultFilter(t,n):(f=r.config.states.hover.filter,i.applyFilter(t,n,f.type)));"function"==typeof r.config.chart.events.dataPointSelection&&r.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:r.globals.selectedDataPoints,seriesIndex:n,dataPointIndex:o,w:r}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:r.globals.selectedDataPoints,seriesIndex:n,dataPointIndex:o,w:r}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,r,i){var n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=this.w,a=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:r,foreColor:"#fff",opacity:0});i&&a.attr("transform",i),o.globals.dom.Paper.add(a);var s=a.bbox();return n||(s=a.node.getBoundingClientRect()),a.remove(),{width:s.width,height:s.height}}},{key:"placeTextWithEllipsis",value:function(t,e,r){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=r/1.1)){for(var i=e.length-3;i>0;i-=3)if(t.getSubStringLength(0,i)<=r/1.1)return void(t.textContent=e.substring(0,i)+"...");t.textContent="."}}}],i=[{key:"setAttrs",value:function(t,e){for(var r in e)e.hasOwnProperty(r)&&t.setAttribute(r,e[r])}}],r&&kc(e.prototype,r),i&&kc(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Pc=Oc;function Cc(t){return Cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cc(t)}function jc(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,r=[];if(0===e.globals.series.length)return r;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,r=[];return e.globals.seriesGroups.forEach((function(i){var n=[];e.config.series.forEach((function(t,r){i.indexOf(e.globals.seriesNames[r])>-1&&n.push(r)}));var o=e.globals.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));r.push(t.getStackedSeriesTotals(o))})),r}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,r=[],i=[],n=[],o=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){n.push(e),i.push(null)})),e.yaxis.forEach((function(t,e){r[e]=[]}));var a=[];e.yaxis.forEach((function(t,i){var s=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,a){if(e.name===t){var l=a;i===a||o?!o||n.indexOf(a)>-1?r[i].push([i,a]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(r[a].push([a,i]),l=i),s=!0,-1!==(l=n.indexOf(l))&&n.splice(l,1)}}))}))}s||a.push(i)})),r=r.map((function(t,e){var r=[];return t.forEach((function(t){i[t[1]]=t[0],r.push(t[1])})),r}));for(var s=e.yaxis.length-1,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,r){return t===r[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,r=t.slice();return e.config.xaxis.convertedCatToNumeric&&(r=t.map((function(t,r){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),r}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var r=0;if(Array.isArray(t))for(var i=0;it&&r.globals.seriesX[n][a]0){var d=function(t,e){var r=n.config.yaxis[n.globals.seriesYAxisReverseMap[e]],o=t<0?-1:1;return t=Math.abs(t),r.logarithmic&&(t=i.getBaseLog(r.logBase,t)),-o*t/a[e]};if(o.isMultipleYAxis){l=[];for(var p=0;p0&&e.forEach((function(e){var a=[],s=[];t.i.forEach((function(r,i){n.config.series[r].group===e&&(a.push(t.series[i]),s.push(r))})),a.length>0&&o.push(i.draw(a,r,s))})),o}}],i=[{key:"checkComboSeries",value:function(t,e){var r=!1,i=0,n=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||i++,void 0!==t.type&&t.type!==e&&n++})),n>0&&(r=!0),{comboBarCount:i,comboCharts:r}}},{key:"extendArrayProps",value:function(t,e,r){var i,n,o,a,s,l;return null!==(i=e)&&void 0!==i&&i.yaxis&&(e=t.extendYAxis(e,r)),null!==(n=e)&&void 0!==n&&n.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(a=o.annotations)&&void 0!==a&&a.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(s=e)&&void 0!==s&&null!==(l=s.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e))),e}}],r&&jc(e.prototype,r),i&&jc(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Mc=Ec;function Lc(t){return Lc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lc(t)}function Ic(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null,r=this.w;if("vertical"===t.label.orientation){var i=null!==e?e:0,n=r.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(i,"']"));if(null!==n){var o=n.getBoundingClientRect();n.setAttribute("x",parseFloat(n.getAttribute("x"))-o.height+4);var a="top"===t.label.position?o.width:-o.width;n.setAttribute("y",parseFloat(n.getAttribute("y"))+a);var s=this.annoCtx.graphics.rotateAroundCenter(n),l=s.x,c=s.y;n.setAttribute("transform","rotate(-90 ".concat(l," ").concat(c,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var r=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var i=r.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),n=t.getBoundingClientRect(),o=e.label.style.padding,a=o.left,s=o.right,l=o.top,c=o.bottom;if("vertical"===e.label.orientation){var u=[a,s,l,c];l=u[0],c=u[1],a=u[2],s=u[3]}var h=n.left-i.left-a,f=n.top-i.top-l,d=this.annoCtx.graphics.drawRect(h-r.globals.barPadForNumericAxis,f,n.width+a+s,n.height+l+c,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&d.node.classList.add(e.id),d}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,r=function(r,i,n){var o=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(i,"']"));if(o){var a=o.parentNode,s=t.addBackgroundToAnno(o,r);s&&(a.insertBefore(s.node,o),r.label.mouseEnter&&s.node.addEventListener("mouseenter",r.label.mouseEnter.bind(t,r)),r.label.mouseLeave&&s.node.addEventListener("mouseleave",r.label.mouseLeave.bind(t,r)),r.label.click&&s.node.addEventListener("click",r.label.click.bind(t,r)))}};e.config.annotations.xaxis.forEach((function(t,e){return r(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return r(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return r(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var r,i=this.w,n="y1"===t?e.y:e.y2,o=!1;if(this.annoCtx.invertAxis){var a=i.config.xaxis.convertedCatToNumeric?i.globals.categoryLabels:i.globals.labels,s=a.indexOf(n),l=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(s+1,")"));r=l?parseFloat(l.getAttribute("y")):(i.globals.gridHeight/a.length-1)*(s+1)-i.globals.barHeight,void 0!==e.seriesIndex&&i.globals.barHeight&&(r-=i.globals.barHeight/2*(i.globals.series.length-1)-i.globals.barHeight*e.seriesIndex)}else{var c,u=i.globals.seriesYAxisMap[e.yAxisIndex][0],h=i.config.yaxis[e.yAxisIndex].logarithmic?new Mc(this.annoCtx.ctx).getLogVal(i.config.yaxis[e.yAxisIndex].logBase,n,u)/i.globals.yLogRatio[u]:(n-i.globals.minYArr[u])/(i.globals.yRange[u]/i.globals.gridHeight);r=i.globals.gridHeight-Math.min(Math.max(h,0),i.globals.gridHeight),o=h>i.globals.gridHeight||h<0,!e.marker||void 0!==e.y&&null!==e.y||(r=0),null!==(c=i.config.yaxis[e.yAxisIndex])&&void 0!==c&&c.reversed&&(r=h)}return"string"==typeof n&&n.includes("px")&&(r=parseFloat(n)),{yP:r,clipped:o}}},{key:"getX1X2",value:function(t,e){var r=this.w,i="x1"===t?e.x:e.x2,n=this.annoCtx.invertAxis?r.globals.minY:r.globals.minX,o=this.annoCtx.invertAxis?r.globals.maxY:r.globals.maxX,a=this.annoCtx.invertAxis?r.globals.yRange[0]:r.globals.xRange,s=!1,l=this.annoCtx.inversedReversedAxis?(o-i)/(a/r.globals.gridWidth):(i-n)/(a/r.globals.gridWidth);return"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||r.globals.dataFormatXNumeric||r.config.chart.sparkline.enabled||(l=this.getStringX(i)),"string"==typeof i&&i.includes("px")&&(l=parseFloat(i)),null==i&&e.marker&&(l=r.globals.gridWidth),void 0!==e.seriesIndex&&r.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=r.globals.barWidth/2*(r.globals.series.length-1)-r.globals.barWidth*e.seriesIndex),l>r.globals.gridWidth?(l=r.globals.gridWidth,s=!0):l<0&&(l=0,s=!0),{x:l,clipped:s}}},{key:"getStringX",value:function(t){var e=this.w,r=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var i=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),n=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(i+1,")"));return n&&(r=parseFloat(n.getAttribute("x"))),r}}],r&&Ic(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zc(t){return zc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zc(t)}function Xc(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r12?f-12:0===f?12:f;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(f))).replace(/(^|[^\\])H/g,"$1"+f)).replace(/(^|[^\\])hh+/g,"$1"+l(d))).replace(/(^|[^\\])h/g,"$1"+d);var p=i?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var g=i?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(g))).replace(/(^|[^\\])s/g,"$1"+g);var b=i?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var y=f<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+y)).replace(/(^|[^\\])T/g,"$1"+y.charAt(0));var v=y.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var m=-t.getTimezoneOffset(),x=i||!m?"Z":m>0?"+":"-";if(!i){var w=(m=Math.abs(m))%60;x+=l(Math.floor(m/60))+":"+l(w)}e=e.replace(/(^|[^\\])K/g,"$1"+x);var S=(i?t.getUTCDay():t.getDay())+1;return(e=(e=(e=(e=e.replace(new RegExp(a[0],"g"),a[S])).replace(new RegExp(s[0],"g"),s[S])).replace(new RegExp(n[0],"g"),n[u])).replace(new RegExp(o[0],"g"),o[u])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,r){var i=this.w;void 0!==i.config.xaxis.min&&(t=i.config.xaxis.min),void 0!==i.config.xaxis.max&&(e=i.config.xaxis.max);var n=this.getDate(t),o=this.getDate(e),a=this.formatDate(n,"yyyy MM dd HH mm ss fff").split(" "),s=this.formatDate(o,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(s[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(s[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(s[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(s[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(s[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(s[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(s[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,r){return this.determineDaysOfMonths(t,e)-r}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,r){var i=this.daysCntOfYear[e]+r;return e>1&&this.isLeapYear()&&i++,i}},{key:"determineDaysOfMonths",value:function(t,e){var r=30;switch(t=f.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(r=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:r=31}return r}}],r&&Nc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Vc=Gc;function Uc(t){return Uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uc(t)}function qc(t,e){for(var r=0;r0&&r<100?t.toFixed(1):t.toFixed(0)}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minYArr<4?t.toFixed(1):t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(r,i){void 0!==r.labels.formatter?e.globals.yLabelFormatters[i]=r.labels.formatter:e.globals.yLabelFormatters[i]=function(n){return e.globals.xyCharts?Array.isArray(n)?n.map((function(e){return t.defaultYFormatter(e,r,i)})):t.defaultYFormatter(n,r,i):n}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}],r&&qc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Jc=$c;function Qc(t){return Qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qc(t)}function Kc(t,e){for(var r=0;r4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",l=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],c=this.w,u=void 0===t[i]?"":t[i],h=u,f=c.globals.xLabelFormatter,d=c.config.xaxis.labels.formatter,p=!1,g=new Jc(this.ctx),b=u;l&&(h=g.xLabelFormat(f,u,b,{i,dateFormatter:new Vc(this.ctx).formatDate,w:c}),void 0!==d&&(h=d(u,t[i],{i,dateFormatter:new Vc(this.ctx).formatDate,w:c}))),e.length>0?(n=e[i].unit,o=null,e.forEach((function(t){"month"===t.unit?o="year":"day"===t.unit?o="month":"hour"===t.unit?o="day":"minute"===t.unit&&(o="hour")})),p=o===n,r=e[i].position,h=e[i].value):"datetime"===c.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var y,v=new Pc(this.ctx);y=c.globals.rotateXLabels&&l?v.getTextRects(h,parseInt(s,10),null,"rotate(".concat(c.config.xaxis.labels.rotate," 0 0)"),!1):v.getTextRects(h,parseInt(s,10));var m=!c.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||a.indexOf(h)>=0&&m)&&(h=""),{x:r,text:h,textRect:y,isBold:p}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,r){var i=this.w,n=i.config.xaxis.tickAmount;return"dataPoints"===n&&(n=Math.round(i.globals.gridWidth/120)),n>r||t%Math.round(r/(n+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,r,i,n){var o=this.w;if(0===t&&o.globals.skipFirstTimelinelabel&&(e.text=""),t===r-1&&o.globals.skipLastTimelinelabel&&(e.text=""),o.config.xaxis.labels.hideOverlappingLabels&&i.length>0){var a=n[n.length-1];e.xi.length||i.some((function(t){return Array.isArray(t.seriesName)}))?t:r.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,r=e.config.yaxis[t];if(!r.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!r.showForNullSeries){var i=e.globals.seriesYAxisMap[t],n=new Mc(this.ctx);return i.every((function(t){return n.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var r=this.w;return Array.isArray(t)&&r.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,r.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,r,i,n,o,a){var s=this.w,l=new Pc(this.ctx),c=s.globals.translateY+s.config.yaxis[n].labels.offsetY;if(s.globals.isBarHorizontal?c=0:"heatmap"===s.config.chart.type&&(c+=o/2),i.show&&e>0){!0===s.config.yaxis[n].opposite&&(t+=i.width);for(var u=e;u>=0;u--){var h=l.drawLine(t+r.offsetX-i.width+i.offsetX,c+i.offsetY,t+r.offsetX+i.offsetX,c+i.offsetY,i.color);a.add(h),c+=o}}}}],r&&Kc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ru(t){return ru="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ru(t)}function iu(t,e){for(var r=0;rs){var d=s;s=i,i=d}if(!l||!c){u=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,i+t.offsetY,this._getYAxisAnnotationWidth(t),s-i,0,t.fillColor,t.opacity,1,t.borderColor,o);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(u){var g="right"===t.label.position?n.globals.gridWidth:"center"===t.label.position?n.globals.gridWidth/2:0,b=this.annoCtx.graphics.drawText({x:g+t.label.offsetX,y:(null!=i?i:s)+t.label.offsetY-3,text:h,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});b.attr({rel:r}),e.appendChild(b.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;return e.globals.gridWidth,(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,r=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,i){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,r.node,i)})),r}}])&&iu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function au(t){return au="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},au(t)}function su(t,e){for(var r=0;r-1)){var i=this.helpers.getX1X2("x1",t),n=i.x,o=i.clipped,a=(i=this.helpers.getY1Y2("y1",t)).yP,s=i.clipped;if(f.isNumber(n)&&!s&&!o){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},c=this.annoCtx.graphics.drawMarker(n+t.marker.offsetX,a+t.marker.offsetY,l);e.appendChild(c.node);var u=t.label.text?t.label.text:"",h=this.annoCtx.graphics.drawText({x:n+t.label.offsetX,y:a+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:u,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(h.attr({rel:r}),e.appendChild(h.node),t.customSVG.SVG){var d=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});d.attr({transform:"translate(".concat(n+t.customSVG.offsetX,", ").concat(a+t.customSVG.offsetY,")")}),d.node.innerHTML=t.customSVG.SVG,e.appendChild(d.node)}if(t.image.path){var p=t.image.width?t.image.width:20,g=t.image.height?t.image.height:20;c=this.annoCtx.addImage({x:n+t.image.offsetX-p/2,y:a+t.image.offsetY-g/2,width:p,height:g,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&c.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&c.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&c.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,r=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,i){t.addPointAnnotation(e,r.node,i)})),r}}],r&&su(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const uu=JSON.parse('{"name":"en","options":{"months":["January","February","March","April","May","June","July","August","September","October","November","December"],"shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"days":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"shortDays":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"toolbar":{"exportToSVG":"Download SVG","exportToPNG":"Download PNG","exportToCSV":"Download CSV","menu":"Menu","selection":"Selection","selectionZoom":"Selection Zoom","zoomIn":"Zoom In","zoomOut":"Zoom Out","pan":"Panning","reset":"Reset Zoom"}}}');function hu(t){return hu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hu(t)}function fu(t,e){for(var r=0;r1&&a[s].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:a[s],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,r){t.addImage(e,r)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,r){t.addText(e,r)}))}},{key:"addXaxisAnnotation",value:function(t,e,r){this.xAxisAnnotations.addXaxisAnnotation(t,e,r)}},{key:"addYaxisAnnotation",value:function(t,e,r){this.yAxisAnnotations.addYaxisAnnotation(t,e,r)}},{key:"addPointAnnotation",value:function(t,e,r){this.pointsAnnotations.addPointAnnotation(t,e,r)}},{key:"addText",value:function(t,e){var r=t.x,i=t.y,n=t.text,o=t.textAnchor,a=t.foreColor,s=t.fontSize,l=t.fontFamily,c=t.fontWeight,u=t.cssClass,h=t.backgroundColor,f=t.borderWidth,d=t.strokeDashArray,p=t.borderRadius,g=t.borderColor,b=t.appendTo,y=void 0===b?".apexcharts-svg":b,v=t.paddingLeft,m=void 0===v?4:v,x=t.paddingRight,w=void 0===x?4:x,S=t.paddingBottom,k=void 0===S?2:S,A=t.paddingTop,O=void 0===A?2:A,P=this.w,C=this.graphics.drawText({x:r,y:i,text:n,textAnchor:o||"start",fontSize:s||"12px",fontWeight:c||"regular",fontFamily:l||P.config.chart.fontFamily,foreColor:a||P.config.chart.foreColor,cssClass:u}),j=P.globals.dom.baseEl.querySelector(y);j&&j.appendChild(C.node);var T=C.bbox();if(n){var E=this.graphics.drawRect(T.x-m,T.y-O,T.width+m+w,T.height+k+O,p,h||"transparent",1,f,g,d);j.insertBefore(E.node,C.node)}}},{key:"addImage",value:function(t,e){var r=this.w,i=t.path,n=t.x,o=void 0===n?0:n,a=t.y,s=void 0===a?0:a,l=t.width,c=void 0===l?20:l,u=t.height,h=void 0===u?20:u,f=t.appendTo,d=void 0===f?".apexcharts-svg":f,p=r.globals.dom.Paper.image(i);p.size(c,h).move(o,s);var g=r.globals.dom.baseEl.querySelector(d);return g&&g.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,r){return this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"xaxis",contextMethod:r.addXaxisAnnotation}),r}},{key:"addYaxisAnnotationExternal",value:function(t,e,r){return this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"yaxis",contextMethod:r.addYaxisAnnotation}),r}},{key:"addPointAnnotationExternal",value:function(t,e,r){return void 0===this.invertAxis&&(this.invertAxis=r.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"point",contextMethod:r.addPointAnnotation}),r}},{key:"addAnnotationExternal",value:function(t){var e=t.params,r=t.pushToMemory,i=t.context,n=t.type,o=t.contextMethod,a=i,s=a.w,l=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations")),c=l.childNodes.length+1,u=new pu,h=Object.assign({},"xaxis"===n?u.xAxisAnnotation:"yaxis"===n?u.yAxisAnnotation:u.pointAnnotation),d=f.extend(h,e);switch(n){case"xaxis":this.addXaxisAnnotation(d,l,c);break;case"yaxis":this.addYaxisAnnotation(d,l,c);break;case"point":this.addPointAnnotation(d,l,c)}var p=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(c,"']")),g=this.helpers.addBackgroundToAnno(p,d);return g&&l.insertBefore(g.node,p),r&&s.globals.memory.methodsToExec.push({context:a,id:d.id?d.id:f.randomId(),method:o,label:"addAnnotation",params:e}),i}},{key:"clearAnnotations",value:function(t){for(var e=t.w,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),i=e.globals.memory.methodsToExec.length-1;i>=0;i--)"addText"!==e.globals.memory.methodsToExec[i].label&&"addAnnotation"!==e.globals.memory.methodsToExec[i].label||e.globals.memory.methodsToExec.splice(i,1);r=f.listToArray(r),Array.prototype.forEach.call(r,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var r=t.w,i=r.globals.dom.baseEl.querySelectorAll(".".concat(e));i&&(r.globals.memory.methodsToExec.map((function(t,i){t.id===e&&r.globals.memory.methodsToExec.splice(i,1)})),Array.prototype.forEach.call(i,(function(t){t.parentElement.removeChild(t)})))}}],r&&bu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function mu(t){return mu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mu(t)}function xu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function wu(t){for(var e=1;e\n '.concat(n,'\n - \n ').concat(o,"\n ");return'
'+(r||"")+'
'+i+": "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[a].type||"rangeBar"===t.w.config.series[a].type?u:"".concat(c,""):u)+"
"},Cu=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.opts=e}var e,r;return e=t,(r=[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){return this.hideYAxis(),f.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var r=e.w.config.series[e.seriesIndex].name;return null!==t?r+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),wu(wu({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var r=e.seriesIndex,i=e.dataPointIndex,n=e.w;return t._getBoxTooltip(n,r,i,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var r=e.seriesIndex,i=e.dataPointIndex,n=e.w;return t._getBoxTooltip(n,r,i,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var r=e.seriesIndex,i=e.dataPointIndex,n=e.w,o=function(){var t=n.globals.seriesRangeStart[r][i];return n.globals.seriesRangeEnd[r][i]-t};return n.globals.comboCharts?"rangeBar"===n.config.series[r].type||"rangeArea"===n.config.series[r].type?o():t:o()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Ou(wu(wu({},t),{},{isTimeline:!0})),r=e.color,i=e.seriesName,n=e.ylabel,o=e.startVal,a=e.endVal;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t):function(t){var e=Ou(t),r=e.color,i=e.seriesName,n=e.ylabel,o=e.start,a=e.end;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,r;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(r=t.plotOptions.bar)&&void 0!==r&&r.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Ou(t),r=e.color,i=e.seriesName,n=e.ylabel,o=e.start,a=e.end;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t)}}}}},{key:"brush",value:function(t){return f.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,r){t.yaxis[r].min=0,t.yaxis[r].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return wu(wu({},t),{},{plotOptions:wu(wu({},t.plotOptions),{},{bar:wu(wu({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,r){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return f.isNumber(t)?Math.floor(t):t};var i=t.xaxis.labels.formatter,n=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return r&&r.length&&(n=r.map((function(t){return Array.isArray(t)?t:String(t)}))),n&&n.length&&(t.xaxis.labels.formatter=function(t){return f.isNumber(t)?i(n[Math.floor(t)-1]):i(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,r,i,n){var o=t.globals.seriesCandleO[e][r],a=t.globals.seriesCandleH[e][r],s=t.globals.seriesCandleM[e][r],l=t.globals.seriesCandleL[e][r],c=t.globals.seriesCandleC[e][r];return t.config.series[e].type&&t.config.series[e].type!==n?'
\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][r],"\n
"):'
')+"
".concat(i[0],': ')+o+"
"+"
".concat(i[1],': ')+a+"
"+(s?"
".concat(i[2],': ')+s+"
":"")+"
".concat(i[3],': ')+l+"
"+"
".concat(i[4],': ')+c+"
"}}])&&ku(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ju(t){return ju="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ju(t)}function Tu(t,e){for(var r=0;r1&&n.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new pu;return t.annotations.yaxis=f.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new pu;return t.annotations.xaxis=f.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new pu;return t.annotations.points=f.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}],r&&Tu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Lu(t){return Lu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lu(t)}function Iu(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);rn?i:n,a=t.image,s=0,l=0;void 0===t.width&&void 0===t.height?void 0!==r.fill.image.width&&void 0!==r.fill.image.height?(s=r.fill.image.width+1,l=r.fill.image.height):(s=o+1,l=o):(s=t.width,l=t.height);var c=document.createElementNS(e.globals.SVGNS,"pattern");Pc.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:s+"px",height:l+"px"});var u=document.createElementNS(e.globals.SVGNS,"image");c.appendChild(u),u.setAttributeNS(window.SVG.xlink,"href",a),Pc.setAttrs(u,{x:0,y:0,preserveAspectRatio:"none",width:s+"px",height:l+"px"}),u.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(t){var e=this.w,r=e.config.chart.type;return("bar"===r||"rangeBar"===r)&&e.config.plotOptions.bar.distributed||"heatmap"===r||"treemap"===r?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var r,i=this.w,n=null,o=null,a=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Wu(t))){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return o=t.done,t},e:function(t){a=!0,n=t},f:function(){try{o||null==e.return||e.return()}finally{if(a)throw n}}}}(t);try{for(a.s();!(r=a.n()).done;){var s=r.value;s>=e.threshold?(null===n||s>n)&&(n=s):(null===o||s-1?b=f.getOpacityFromRGBA(u):v=f.hexToRgba(f.rgb2hex(u),b),t.opacity&&(b=t.opacity),"pattern"===g&&(a=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:a,fillColor:u,fillOpacity:b,defaultColor:v})),y){var m=function(t){return function(t){if(Array.isArray(t))return Gu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Wu(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(l.fill.gradient.colorStops)||[],x=l.fill.gradient.type;c&&(m[this.seriesIndex]=this.computeColorStops(n.globals.series[this.seriesIndex],l.plotOptions.line.colors),x="vertical"),s=this.handleGradientFill({type:x,fillConfig:t.fillConfig,fillColor:u,fillOpacity:b,colorStops:m,i:this.seriesIndex})}if("image"===g){var w=l.fill.image.src,S=t.patternID?t.patternID:"",k="pattern".concat(n.globals.cuid).concat(t.seriesNumber+1).concat(S);-1===this.patternIDs.indexOf(k)&&(this.clippedImgArea({opacity:b,image:Array.isArray(w)?t.seriesNumber-1&&(p=f.getOpacityFromRGBA(d));var g=void 0===s.gradient.opacityTo?i:Array.isArray(s.gradient.opacityTo)?s.gradient.opacityTo[a]:s.gradient.opacityTo;if(void 0===s.gradient.gradientToColors||0===s.gradient.gradientToColors.length)h="dark"===s.gradient.shade?u.shadeColor(-1*parseFloat(s.gradient.shadeIntensity),r.indexOf("rgb")>-1?f.rgb2hex(r):r):u.shadeColor(parseFloat(s.gradient.shadeIntensity),r.indexOf("rgb")>-1?f.rgb2hex(r):r);else if(s.gradient.gradientToColors[l.seriesNumber]){var b=s.gradient.gradientToColors[l.seriesNumber];h=b,b.indexOf("rgba")>-1&&(g=f.getOpacityFromRGBA(b))}else h=r;if(s.gradient.gradientFrom&&(d=s.gradient.gradientFrom),s.gradient.gradientTo&&(h=s.gradient.gradientTo),s.gradient.inverseColors){var y=d;d=h,h=y}return d.indexOf("rgb")>-1&&(d=f.rgb2hex(d)),h.indexOf("rgb")>-1&&(h=f.rgb2hex(h)),c.drawGradient(e,d,h,p,g,l.size,s.gradient.stops,o,a)}}],r&&Vu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Zu=qu;function $u(t){return $u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$u(t)}function Ju(t,e){for(var r=0;r0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],o=this.w,a=e,s=t,l=null,c=new Pc(this.ctx),u=o.config.markers.discrete&&o.config.markers.discrete.length;if(Array.isArray(s.x))for(var h=0;h0:o.config.markers.size>0)||n||u){g||(b+=" w".concat(f.randomId()));var y=this.getMarkerConfig({cssClass:b,seriesIndex:e,dataPointIndex:p});o.config.series[a].data[p]&&(o.config.series[a].data[p].fillColor&&(y.pointFillColor=o.config.series[a].data[p].fillColor),o.config.series[a].data[p].strokeColor&&(y.pointStrokeColor=o.config.series[a].data[p].strokeColor)),void 0!==i&&(y.pSize=i),(s.x[h]<-o.globals.markers.largestSize||s.x[h]>o.globals.gridWidth+o.globals.markers.largestSize||s.y[h]<-o.globals.markers.largestSize||s.y[h]>o.globals.gridHeight+o.globals.markers.largestSize)&&(y.pSize=0),g||((o.globals.markers.size[e]>0||n||u)&&!l&&(l=c.group({class:n||u?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(o.globals.cuid,")")),(d=c.drawMarker(s.x[h],s.y[h],y)).attr("rel",p),d.attr("j",p),d.attr("index",e),d.node.setAttribute("default-marker-size",y.pSize),new vc(this.ctx).setSelectionFilter(d,e,p),this.addEvents(d),l&&l.add(d))}else void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e].push([s.x[h],s.y[h]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,r=t.seriesIndex,i=t.dataPointIndex,n=void 0===i?null:i,o=t.radius,a=void 0===o?null:o,s=t.size,l=void 0===s?null:s,c=t.strokeWidth,u=void 0===c?null:c,h=this.w,f=this.getMarkerStyle(r),d=null===l?h.globals.markers.size[r]:l,p=h.config.markers;return null!==n&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===r&&t.dataPointIndex===n&&(f.pointStrokeColor=t.strokeColor,f.pointFillColor=t.fillColor,d=t.size,f.pointShape=t.shape)})),{pSize:null===a?d:a,pRadius:null!==a?a:p.radius,pointStrokeWidth:null!==u?u:Array.isArray(p.strokeWidth)?p.strokeWidth[r]:p.strokeWidth,pointStrokeColor:f.pointStrokeColor,pointFillColor:f.pointFillColor,shape:f.pointShape||(Array.isArray(p.shape)?p.shape[r]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[r]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[r]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[r]:p.fillOpacity,seriesIndex:r}}},{key:"addEvents",value:function(t){var e=this.w,r=new Pc(this.ctx);t.node.addEventListener("mouseenter",r.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",r.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",r.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",r.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,r=e.globals.markers.colors,i=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(i)?i[t]:i,pointFillColor:Array.isArray(r)?r[t]:r}}}],r&&Ju(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function th(t){return th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},th(t)}function eh(t,e){for(var r=0;rp.maxBubbleRadius&&(d=p.maxBubbleRadius)}var g=a.x[u],b=a.y[u];if(d=d||0,null!==b&&void 0!==i.globals.series[o][h]||(f=!1),f){var y=this.drawPoint(g,b,d,o,h,e);c.add(y)}l.add(c)}}},{key:"drawPoint",value:function(t,e,r,i,n,o){var a=this.w,s=i,l=new b(this.ctx),c=new vc(this.ctx),u=new Zu(this.ctx),h=new Ku(this.ctx),f=new Pc(this.ctx),d=h.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:s,dataPointIndex:n,radius:"bubble"===a.config.chart.type||a.globals.comboCharts&&a.config.series[i]&&"bubble"===a.config.series[i].type?r:null}),p=u.fillPath({seriesNumber:i,dataPointIndex:n,color:d.pointFillColor,patternUnits:"objectBoundingBox",value:a.globals.series[i][o]}),g=f.drawMarker(t,e,d);if(a.config.series[s].data[n]&&a.config.series[s].data[n].fillColor&&(p=a.config.series[s].data[n].fillColor),g.attr({fill:p}),a.config.chart.dropShadow.enabled){var y=a.config.chart.dropShadow;c.dropShadow(g,y,i)}if(!this.initialAnim||a.globals.dataChanged||a.globals.resized)a.globals.animationEnded=!0;else{var v=a.config.chart.animations.speed;l.animateMarker(g,v,a.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(g)}),100)}))}return g.attr({rel:n,j:n,index:i,"default-marker-size":d.pSize}),c.setSelectionFilter(g,i,n),h.addEvents(g),g.node.classList.add("apexcharts-marker"),g}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}],r&&eh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function nh(t){return nh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nh(t)}function oh(t,e){for(var r=0;rs.globals.gridHeight+h&&(e=s.globals.gridHeight+h/2),void 0===s.globals.dataLabelsRects[i]&&(s.globals.dataLabelsRects[i]=[]),s.globals.dataLabelsRects[i].push({x:t,y:e,width:u,height:h});var f=s.globals.dataLabelsRects[i].length-2,d=void 0!==s.globals.lastDrawnDataLabelsIndexes[i]?s.globals.lastDrawnDataLabelsIndexes[i][s.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(void 0!==s.globals.dataLabelsRects[i][f]){var p=s.globals.dataLabelsRects[i][d];(t>p.x+p.width||e>p.y+p.height||e+he.globals.gridWidth+y.textRects.width+30)&&(s="");var v=e.globals.dataLabels.style.colors[o];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(v=e.globals.dataLabels.style.colors[a]),"function"==typeof v&&(v=v({series:e.globals.series,seriesIndex:o,dataPointIndex:a,w:e})),f&&(v=f);var m=h.offsetX,x=h.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(m=0,x=0),e.globals.isSlopeChart&&(0!==a&&(m=-2*h.offsetX+5),0!==a&&a!==e.config.series[o].data.length-1&&(m=0)),y.drawnextLabel){if((b=r.drawText({width:100,height:parseInt(h.style.fontSize,10),x:i+m,y:n+x,foreColor:v,textAnchor:l||h.textAnchor,text:s,fontSize:c||h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight||"normal"})).attr({class:g||"apexcharts-datalabel",cx:i,cy:n}),h.dropShadow.enabled){var w=h.dropShadow;new vc(this.ctx).dropShadow(b,w)}u.add(b),void 0===e.globals.lastDrawnDataLabelsIndexes[o]&&(e.globals.lastDrawnDataLabelsIndexes[o]=[]),e.globals.lastDrawnDataLabelsIndexes[o].push(a)}return b}},{key:"addBackgroundToDataLabel",value:function(t,e){var r=this.w,i=r.config.dataLabels.background,n=i.padding,o=i.padding/2,a=e.width,s=e.height,l=new Pc(this.ctx).drawRect(e.x-n,e.y-o/2,a+2*n,s+o,i.borderRadius,"transparent"!==r.config.chart.background&&r.config.chart.background?r.config.chart.background:"#fff",i.opacity,i.borderWidth,i.borderColor);return i.dropShadow.enabled&&new vc(this.ctx).dropShadow(l,i.dropShadow),l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),r=0;r0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.w,n=f.clone(i.globals.initialSeries);i.globals.previousPaths=[],r?(i.globals.collapsedSeries=[],i.globals.ancillaryCollapsedSeries=[],i.globals.collapsedSeriesIndices=[],i.globals.ancillaryCollapsedSeriesIndices=[]):n=this.emptyCollapsedSeries(n),i.config.series=n,t&&(e&&(i.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(n,i.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,r=0;r-1&&(t[r].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,r=this.getSeriesByName(t),i=parseInt(null==r?void 0:r.getAttribute("data:realIndex"),10),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),o=null,a=null,s=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){o=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(i,"']")),a=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(i,"']"));var l=e.globals.seriesYAxisReverseMap[i];s=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else o=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+1,"']"));else o=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+1,"'] path"));for(var c=0;c=t.from&&(o0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this.w,i=0;if(r.config.series.length>1)for(var n=r.config.series.map((function(t,i){return t.data&&t.data.length>0&&-1===r.globals.collapsedSeriesIndices.indexOf(i)&&(!r.globals.comboCharts||0===e.length||e.length&&e.indexOf(r.config.series[i].type)>-1)?i:-1})),o="asc"===t?0:n.length-1;"asc"===t?o=0;"asc"===t?o++:o--)if(-1!==n[o]){i=n[o];break}return i}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,r,i){for(var n=e[r].childNodes,o={type:i,paths:[],realIndex:e[r].getAttribute("data:realIndex")},a=0;a0)for(var i=function(e){for(var r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),i=[],n=function(t){var e=function(e){return r[t].getAttribute(e)},n={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};i.push({rect:n,color:r[t].getAttribute("color")})},o=0;o0?t:[]}))}}],r&&uh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function dh(t){return dh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dh(t)}function ph(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new fh(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var r=this.w.config,i=this.w.globals,n="boxPlot"===r.chart.type||"boxPlot"===r.series[e].type,o=0;o=5?this.twoDSeries.push(f.parseNumber(t[e].data[o][4])):this.twoDSeries.push(f.parseNumber(t[e].data[o][1])),i.dataFormatXNumeric=!0),"datetime"===r.xaxis.type){var a=new Date(t[e].data[o][0]);a=new Date(a).getTime(),this.twoDSeriesX.push(a)}else this.twoDSeriesX.push(t[e].data[o][0]);for(var s=0;s-1&&(o=this.activeSeriesIndex);for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:this.ctx,i=this.w.config,n=this.w.globals,o=new Vc(r),a=i.labels.length>0?i.labels.slice():i.xaxis.categories.slice();n.isRangeBar="rangeBar"===i.chart.type&&n.isBarHorizontal,n.hasXaxisGroups="category"===i.xaxis.type&&i.xaxis.group.groups.length>0,n.hasXaxisGroups&&(n.groups=i.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?n.seriesNames.push(t.name):n.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var s=[],l=function(t){return function(t){if(Array.isArray(t))return ph(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ph(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ph(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(new Set(i.series.map((function(t){return t.group}))));i.series.forEach((function(t,e){var r=l.indexOf(t.group);s[r]||(s[r]=[]),s[r].push(n.seriesNames[e])})),n.seriesGroups=s;for(var c=function(){for(var t=0;t0&&(this.twoDSeriesX=a,n.seriesX.push(this.twoDSeriesX))),n.labels.push(this.twoDSeriesX);var h=t[u].data.map((function(t){return f.parseNumber(t)}));n.series.push(h)}n.seriesZ.push(this.threeDSeries),void 0!==t[u].color?n.seriesColors.push(t[u].color):n.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,r=this.w.config;e.series=t.slice(),e.seriesNames=r.labels.slice();for(var i=0;i0?r.labels=e.xaxis.categories:e.labels.length>0?r.labels=e.labels.slice():this.fallbackToCategory?(r.labels=r.labels[0],r.seriesRange.length&&(r.seriesRange.map((function(t){t.forEach((function(t){r.labels.indexOf(t.x)<0&&t.x&&r.labels.push(t.x)}))})),r.labels=Array.from(new Set(r.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric&&(new Cu(e).convertCatToNumericXaxis(e,this.ctx,r.seriesX[0]),this._generateExternalLabels(t))):this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,r=this.w.config,i=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var n=r.series.map((function(t,e){return t.data.filter((function(t,e,r){return r.findIndex((function(e){return e.x===t.x}))===e}))})),o=n.reduce((function(t,e,r,i){return i[t].length>e.length?t:r}),0),a=0;a0&&n==r.length&&e.push(i)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}],r&&gh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function vh(t){return vh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vh(t)}function mh(t){return function(t){if(Array.isArray(t))return xh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return xh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xh(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=10?new Date(t).toDateString():f.isNumber(t)?t:t.split(o).join("")},y=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},v=Math.max.apply(Math,mh(r.map((function(t){return t.data?t.data.length:0})))),m=new yh(this.ctx),x=new eu(this.ctx),w=function(t){var r="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var i=l.globals.yLabelFormatters[0],n=new fh(e.ctx).getActiveConfigSeriesIndex();r=i(l.globals.labels[t],{seriesIndex:n,dataPointIndex:t,w:l})}else r=x.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?r=l.config.xaxis.categories[t]:l.config.labels.length&&(r=l.config.labels[t]))}else r=l.config.labels[t];return null===r?"nullvalue":(Array.isArray(r)&&(r=r.join(" ")),f.isNumber(r)?r:r.split(o).join(""))};h.push(l.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===l.config.chart.type?(h.push("minimum"),h.push("q1"),h.push("median"),h.push("q3"),h.push("maximum")):"candlestick"===l.config.chart.type?(h.push("open"),h.push("high"),h.push("low"),h.push("close")):"rangeBar"===l.config.chart.type?(h.push("minimum"),h.push("maximum")):r.map((function(t,e){var r=(t.name?t.name:"series-".concat(e))+"";l.globals.axisCharts&&h.push(r.split(o).join("")?r.split(o).join(""):"series-".concat(e))})),l.globals.axisCharts||(h.push(l.config.chart.toolbar.export.csv.headerValue),d.push(h.join(o))),l.globals.allSeriesHasEqualX||!l.globals.axisCharts||l.config.xaxis.categories.length||l.config.labels.length?r.map((function(t,e){l.globals.axisCharts?function(t,e){if(h.length&&0===e&&d.push(h.join(o)),t.data){t.data=t.data.length&&t.data||mh(Array(v)).map((function(){return""}));for(var i=0;i0&&!i.globals.isBarHorizontal&&(this.xaxisLabels=i.globals.timescaleLabels.slice()),i.config.xaxis.overwriteCategories&&(this.xaxisLabels=i.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===i.config.xaxis.position?this.offY=0:this.offY=i.globals.gridHeight,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.xaxisBorderWidth=i.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=i.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=i.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}var e,r;return e=t,r=[{key:"drawXaxis",value:function(){var t=this.w,e=new Pc(this.ctx),r=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),i=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});r.add(i);for(var n=[],o=0;o6&&void 0!==arguments[6]?arguments[6]:{},c=[],u=[],h=this.w,f=l.xaxisFontSize||this.xaxisFontSize,d=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,g=l.fontWeight||h.config.xaxis.labels.style.fontWeight,b=l.cssClass||h.config.xaxis.labels.style.cssClass,y=h.globals.padHorizontal,v=i.length,m="category"===h.config.xaxis.type?h.globals.dataPoints:v;if(0===m&&v>m&&(m=v),n){var x=m>1?m-1:m;a=h.globals.gridWidth/Math.min(x,v-1),y=y+o(0,a)/2+h.config.xaxis.labels.offsetX}else a=h.globals.gridWidth/m,y=y+o(0,a)+h.config.xaxis.labels.offsetX;for(var w=function(n){var l=y-o(n,a)/2+h.config.xaxis.labels.offsetX;0===n&&1===v&&a/2===y&&1===m&&(l=h.globals.gridWidth/2);var x=s.axesUtils.getLabel(i,h.globals.timescaleLabels,l,n,c,f,t),w=28;if(h.globals.rotateXLabels&&t&&(w=22),h.config.xaxis.title.text&&"top"===h.config.xaxis.position&&(w+=parseFloat(h.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(f)+(h.globals.xAxisLabelsHeight-h.globals.xAxisGroupLabelsHeight)+(h.globals.rotateXLabels?10:0)),x=void 0!==h.config.xaxis.tickAmount&&"dataPoints"!==h.config.xaxis.tickAmount&&"datetime"!==h.config.xaxis.type?s.axesUtils.checkLabelBasedOnTickamount(n,x,v):s.axesUtils.checkForOverflowingLabels(n,x,v,c,u),h.config.xaxis.labels.show){var S=e.drawText({x:x.x,y:s.offY+h.config.xaxis.labels.offsetY+w-("top"===h.config.xaxis.position?h.globals.xAxisHeight+h.config.xaxis.axisTicks.height-2:0),text:x.text,textAnchor:"middle",fontWeight:x.isBold?600:g,fontSize:f,fontFamily:d,foreColor:Array.isArray(p)?t&&h.config.xaxis.convertedCatToNumeric?p[h.globals.minX+n-1]:p[n]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+b});if(r.add(S),S.on("click",(function(t){if("function"==typeof h.config.chart.events.xAxisLabelClick){var e=Object.assign({},h,{labelIndex:n});h.config.chart.events.xAxisLabelClick(t,s.ctx,e)}})),t){var k=document.createElementNS(h.globals.SVGNS,"title");k.textContent=Array.isArray(x.text)?x.text.join(" "):x.text,S.node.appendChild(k),""!==x.text&&(c.push(x.text),u.push(x))}}ni.globals.gridWidth)){var o=this.offY+i.config.xaxis.axisTicks.offsetY;if(e=e+o+i.config.xaxis.axisTicks.height,"top"===i.config.xaxis.position&&(e=o-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){var a=new Pc(this.ctx).drawLine(t+i.config.xaxis.axisTicks.offsetX,o+i.config.xaxis.offsetY,n+i.config.xaxis.axisTicks.offsetX,e+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);r.add(a),a.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],r=this.xaxisLabels.length,i=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var n=0;n0){var c=n[n.length-1].getBBox(),u=n[0].getBBox();c.x<-20&&n[n.length-1].parentNode.removeChild(n[n.length-1]),u.x+u.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&n[0].parentNode.removeChild(n[0]);for(var h=0;ht.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&(this.xaxisLabels=r.globals.timescaleLabels.slice())}var e,r;return e=t,r=[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,r=new Pc(this.ctx);t||(t=r.group({class:"apexcharts-grid"}));var i=r.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),n=r.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(n),t.add(i),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,r=new Pc(this.ctx),i=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,function(t){return function(t){if(Array.isArray(t))return Eh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Eh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Eh(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.config.stroke.width)):t.config.stroke.width,n=function(t){var r=document.createElementNS(e.SVGNS,"clipPath");return r.setAttribute("id",t),r};e.dom.elGridRectMask=n("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=n("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=n("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=n("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=n("nonForecastMask".concat(e.cuid));var o=0,a=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(o=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),a=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=r.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=r.drawRect(-i/2-o-2,-i/2-2,e.gridWidth+i+a+o+4,e.gridHeight+i+4,0,"#fff");var s=t.globals.markers.largestSize;e.dom.elGridRectMarker=r.drawRect(-s,-s,e.gridWidth+2*s,e.gridHeight+2*s,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,r=t.x1,i=t.y1,n=t.x2,o=t.y2,a=t.xCount,s=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===a-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:r,y1:i,x2:n,y2:o,xCount:a,parent:s});var c=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var u=l.globals.groups;if(u){for(var h=0,f=0;h0&&"datetime"!==t.config.xaxis.type&&(n=e.yAxisScale[i].result.length-1)),this._drawXYLines({xCount:n,tickAmount:l})):(n=l,l=e.xTickAmount,this._drawInvertedXYLines({xCount:n,tickAmount:l})),this.drawGridBands(n,l),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/n}}},{key:"drawGridBands",value:function(t,e){var r,i,n=this,o=this.w;if((null===(r=o.config.grid.row.colors)||void 0===r?void 0:r.length)>0&&function(t,r,i,a,s,l){for(var c=0,u=0;c=o.config.grid.row.colors.length&&(u=0),n._drawGridBandRect({c:u,x1:0,y1:a,x2:s,y2:l,type:"row"}),a+=o.globals.gridHeight/e}(0,e,0,0,o.globals.gridWidth,o.globals.gridHeight/e),(null===(i=o.config.grid.column.colors)||void 0===i?void 0:i.length)>0){var a=o.globals.isBarHorizontal||"on"!==o.config.xaxis.tickPlacement||"category"!==o.config.xaxis.type&&!o.config.xaxis.convertedCatToNumeric?t:t-1;o.globals.isXNumeric&&(a=o.globals.xAxisScale.result.length-1);for(var s=o.globals.padHorizontal,l=o.globals.padHorizontal+o.globals.gridWidth/a,c=o.globals.gridHeight,u=0,h=0;u=o.config.grid.column.colors.length&&(h=0),"datetime"===o.config.xaxis.type&&(s=this.xaxisLabels[u].position,l=((null===(f=this.xaxisLabels[u+1])||void 0===f?void 0:f.position)||o.globals.gridWidth)-this.xaxisLabels[u].position),this._drawGridBandRect({c:h,x1:s,y1:0,x2:l,y2:c,type:"column"}),s+=o.globals.gridWidth/a}}}}],r&&Mh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const _h=Ih;function Rh(t){return Rh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rh(t)}function zh(t,e){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:0,s=1e-11,l=this.w,c=l.globals;c.isBarHorizontal?(r=l.config.xaxis,i=Math.max((c.svgWidth-100)/25,2)):(r=l.config.yaxis[a],i=Math.max((c.svgHeight-100)/15,2)),f.isNumber(i)||(i=10),n=void 0!==r.min&&null!==r.min,o=void 0!==r.max&&null!==r.min;var u=void 0!==r.stepSize&&null!==r.stepSize,h=void 0!==r.tickAmount&&null!==r.tickAmount,d=h?r.tickAmount:c.niceScaleDefaultTicks[Math.min(Math.round(i/2),c.niceScaleDefaultTicks.length-1)];if(c.isMultipleYAxis&&!h&&c.multiAxisTickAmount>0&&(d=c.multiAxisTickAmount,h=!0),d="dataPoints"===d?c.dataPoints-1:Math.abs(Math.round(d)),(t===Number.MIN_VALUE&&0===e||!f.isNumber(t)&&!f.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=f.isNumber(r.min)?r.min:0,e=f.isNumber(r.max)?r.max:t+d,c.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var p=e;e=t,t=p}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var g=[];d<1&&(d=1);var b=d,y=Math.abs(e-t);!n&&t>0&&t/y<.15&&(t=0,n=!0),!o&&e<0&&-e/y<.15&&(e=0,o=!0);var v=(y=Math.abs(e-t))/b,m=v,x=Math.floor(Math.log10(m)),w=Math.pow(10,x),S=Math.ceil(m/w);if(v=m=(S=c.niceScaleAllowedMagMsd[0===c.yValueDecimal?0:1][S])*w,c.isBarHorizontal&&r.stepSize&&"datetime"!==r.type?(v=r.stepSize,u=!0):u&&(v=r.stepSize),u&&r.forceNiceScale){var k=Math.floor(Math.log10(v));v*=Math.pow(10,x-k)}if(n&&o){var A=y/b;if(h)if(u)if(0!=f.mod(y,v)){var O=f.getGCD(v,A);v=A/O<10?O:A}else 0==f.mod(v,A)?v=A:(A=v,h=!1);else v=A;else if(u)0==f.mod(y,v)?A=v:v=A;else if(0==f.mod(y,v))A=v;else{A=y/(b=Math.ceil(y/v));var P=f.getGCD(y,v);y/Pi&&(t=e-v*d,t+=v*Math.floor((C-t)/v))}else if(n)if(h)e=t+v*b;else{var j=e;e=v*Math.ceil(e/v),Math.abs(e-t)/f.getGCD(y,v)>i&&(e=t+v*d,e+=v*Math.ceil((j-e)/v))}}else if(c.isMultipleYAxis&&h){var T=v*Math.floor(t/v),E=T+v*b;E0&&t16&&f.getPrimeFactors(b).length<2&&b++,!h&&r.forceNiceScale&&0===c.yValueDecimal&&b>y&&(b=y,v=Math.round(y/b)),b>i&&(!h&&!u||r.forceNiceScale)){var M=f.getPrimeFactors(b),L=M.length-1,I=b;t:for(var _=0;_F);return{result:g,niceMin:g[0],niceMax:g[g.length-1]}}},{key:"linearScale",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,o=Math.abs(e-t),a=[];if(t===e)return{result:a=[t],niceMin:a[0],niceMax:a[a.length-1]};"dataPoints"===(r=this._adjustTicksForSmallRange(r,i,o))&&(r=this.w.globals.dataPoints-1),n||(n=o/r),n=Math.round(10*(n+Number.EPSILON))/10,r===Number.MAX_VALUE&&(r=5,n=1);for(var s=t;r>=0;)a.push(s),s=f.preciseAddition(s,n),r-=1;return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,r){e<=0&&(e=Math.max(t,r)),t<=0&&(t=Math.min(e,r));for(var i=[],n=Math.ceil(Math.log(e)/Math.log(r)+1),o=Math.floor(Math.log(t)/Math.log(r));o5?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=o.forceNiceScale?this.logarithmicScaleNice(e,r,o.logBase):this.logarithmicScale(e,r,o.logBase)):r!==-Number.MAX_VALUE&&f.isNumber(r)&&e!==Number.MAX_VALUE&&f.isNumber(e)?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=this.niceScale(e,r,t)):i.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var r=this.w,i=r.globals,n=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&f.isNumber(e)){var o=i.xTickAmount+1;n<10&&n>1&&(o=n),i.xAxisScale=this.linearScale(t,e,o,0,r.config.xaxis.stepSize)}else i.xAxisScale=this.linearScale(0,10,10);return i.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,r=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var i=r.seriesYAxisMap,n=r.minYArr,o=r.maxYArr;r.allSeriesCollapsed=!0,r.barGroups=[],i.forEach((function(i,a){var s=[];i.forEach((function(t){var r=e.series[t].group;s.indexOf(r)<0&&s.push(r)})),i.length>0?function(){var l,c,u=Number.MAX_VALUE,h=-Number.MAX_VALUE,f=u,d=h;if(e.chart.stacked)!function(){var t=new Array(r.dataPoints).fill(0),n=[],o=[],p=[];s.forEach((function(){n.push(t.map((function(){return Number.MIN_VALUE}))),o.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var g=function(t){!l&&e.series[i[t]].type&&(l=e.series[i[t]].type);var u=i[t];c=e.series[u].group?e.series[u].group:"axis-".concat(a),!(r.collapsedSeriesIndices.indexOf(u)<0&&r.ancillaryCollapsedSeriesIndices.indexOf(u)<0)||(r.allSeriesCollapsed=!1,s.forEach((function(t,i){if(e.series[u].group===t)for(var a=0;a=0?o[i][a]+=s:p[i][a]+=s,n[i][a]+=s,f=Math.min(f,s),d=Math.max(d,s)}}))),"bar"!==l&&"column"!==l||r.barGroups.push(c)},b=0;bt.length)&&(e=t.length);for(var r=0,i=Array(e);r1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w.config,o=this.w.globals,a=-Number.MAX_VALUE,s=Number.MIN_VALUE;null===i&&(i=t+1);var l=o.series,c=l,u=l;"candlestick"===n.chart.type?(c=o.seriesCandleL,u=o.seriesCandleH):"boxPlot"===n.chart.type?(c=o.seriesCandleO,u=o.seriesCandleC):o.isRangeData&&(c=o.seriesRangeStart,u=o.seriesRangeEnd);var h=!1;if(o.seriesX.length>=i){var d,p=null===(d=o.brushSource)||void 0===d?void 0:d.w.config.chart.brush;(n.chart.zoom.enabled&&n.chart.zoom.autoScaleYaxis||null!=p&&p.enabled&&null!=p&&p.autoScaleYaxis)&&(h=!0)}for(var g=t;gy&&o.seriesX[g][v]>n.xaxis.max;v--);}for(var m=y;m<=v&&mc[g][m]&&c[g][m]<0&&(s=c[g][m])}else o.hasNullValues=!0}"bar"!==b&&"column"!==b||(s<0&&a<0&&(a=0,r=Math.max(r,0)),s===Number.MIN_VALUE&&(s=0,e=Math.min(e,0)))}return"rangeBar"===n.chart.type&&o.seriesRangeStart.length&&o.isBarHorizontal&&(s=e),"bar"===n.chart.type&&(s<0&&a<0&&(a=0),s===Number.MIN_VALUE&&(s=0)),{minY:s,maxY:a,lowestY:e,highestY:r}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var r,i=Number.MAX_VALUE;if(t.isMultipleYAxis){i=Number.MAX_VALUE;for(var n=0;nt.dataPoints&&0!==t.dataPoints&&(i=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(i=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var n=t.maxX-t.minX;n<30&&(i=n-1)}}else i=e.xaxis.tickAmount;if(t.xTickAmount=i,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var o=[],a=t.minX-1;a0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,i-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());r&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var n=e-i[r-1];n>0&&(t.minXDiff=Math.min(n,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var r=e.seriesGroups;r.length||(r=[this.w.globals.seriesNames.map((function(t){return t}))]);var i={},n={};r.forEach((function(r){i[r]=[],n[r]=[],t.w.config.series.map((function(t,i){return r.indexOf(e.seriesNames[i])>-1?i:null})).filter((function(t){return null!==t})).forEach((function(o){for(var a=0;a0?i[r][a]+=parseFloat(e.series[o][a])+1e-4:n[r][a]+=parseFloat(e.series[o][a]))}}))})),Object.entries(i).forEach((function(t){var r=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Hh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hh(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,1)[0];i[r].forEach((function(t,o){e.maxY=Math.max(e.maxY,i[r][o]),e.minY=Math.min(e.minY,n[r][o])}))}))}}}],r&&Fh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Wh=Nh;function Gh(t){return Gh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gh(t)}function Vh(t,e){for(var r=0;r=0;g--){var b=h(d[g],g,e),y=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(y*=-1);var v=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(i.colors,t),x=Array.isArray(m)?m[g]:m,w=f.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),S=r.drawText({x:y,y:p,text:w.includes(b)&&!e.config.yaxis[t].labels.showDuplicates?"":b,textAnchor:v,fontSize:n,fontFamily:o,fontWeight:a,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:x,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(i.cssClass)});l.add(S),this.addTooltip(S,b),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(r,S,firstLabel,e.config.yaxis[t].labels.rotate),p+=u}}return this.addYAxisTitle(r,s,t),this.addAxisBorder(r,s,t,c,u),s}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var r=document.createElementNS(this.w.globals.SVGNS,"title");r.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(r)}},{key:"rotateLabel",value:function(t,e,r,i){var n=t.rotateAroundCenter(r.node),o=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(i," ").concat(n.x," ").concat(o.y,")"))}},{key:"addYAxisTitle",value:function(t,e,r){var i=this.w;if(void 0!==i.config.yaxis[r].title.text){var n=t.group({class:"apexcharts-yaxis-title"}),o=i.config.yaxis[r].opposite?i.globals.translateYAxisX[r]:0,a=t.drawText({x:o,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[r].title.offsetY,text:i.config.yaxis[r].title.text,textAnchor:"end",foreColor:i.config.yaxis[r].title.style.color,fontSize:i.config.yaxis[r].title.style.fontSize,fontWeight:i.config.yaxis[r].title.style.fontWeight,fontFamily:i.config.yaxis[r].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(i.config.yaxis[r].title.style.cssClass)});n.add(a),e.add(n)}}},{key:"addAxisBorder",value:function(t,e,r,i,n){var o=this.w,a=o.config.yaxis[r].axisBorder,s=31+a.offsetX;if(o.config.yaxis[r].opposite&&(s=-31-a.offsetX),a.show){var l=t.drawLine(s,o.globals.translateY+a.offsetY-2,s,o.globals.gridHeight+o.globals.translateY+a.offsetY+2,a.color,0,a.width);e.add(l)}o.config.yaxis[r].axisTicks.show&&this.axesUtils.drawYAxisTicks(s,i,a,o.config.yaxis[r].axisTicks,r,n,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,r=new Pc(this.ctx),i=r.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),n=r.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});i.add(n);var o=e.globals.yAxisScale[t].result.length-1,a=e.globals.gridWidth/o+.1,s=a+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,c=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),u=e.globals.timescaleLabels;if(u.length>0&&(this.xaxisLabels=u.slice(),o=(c=u.slice()).length),e.config.xaxis.labels.show)for(var h=u.length?0:o;u.length?h=0;u.length?h++:h--){var f=l(c[h],h,e),d=e.globals.gridWidth+e.globals.padHorizontal-(s-a+e.config.xaxis.labels.offsetX);if(u.length){var p=this.axesUtils.getLabel(c,u,d,h,this.drawnLabels,this.xaxisFontSize);d=p.x,f=p.text,this.drawnLabels.push(p.text),0===h&&e.globals.skipFirstTimelinelabel&&(f=""),h===c.length-1&&e.globals.skipLastTimelinelabel&&(f="")}var g=r.drawText({x:d,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});n.add(g),g.tspan(f),this.addTooltip(g,f),s+=a}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,r=new Pc(this.ctx),i=e.config.xaxis.axisBorder;if(i.show){var n=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(n-=15);var o=r.drawLine(e.globals.padHorizontal+n+i.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,i.color,0,i.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(o):t.add(o)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,r=new Pc(this.ctx);if(void 0!==e.config.xaxis.title.text){var i=r.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),n=r.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});i.add(n),t.add(i)}}},{key:"yAxisTitleRotate",value:function(t,e){var r=this.w,i=new Pc(this.ctx),n=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),o=n?n.getBoundingClientRect():{width:0,height:0},a=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),s=a?a.getBoundingClientRect():{width:0,height:0};if(a){var l=this.xPaddingForYAxisTitle(t,o,s,e);a.setAttribute("x",l.xPos-(e?10:0));var c=i.rotateAroundCenter(a);a.setAttribute("transform","rotate(".concat(e?-1*r.config.yaxis[t].title.rotate:r.config.yaxis[t].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,r,i){var n=this.w,o=0,a=10;return void 0===n.config.yaxis[t].title.text||t<0?{xPos:o,padd:0}:(i?o=e.width+n.config.yaxis[t].title.offsetX+r.width/2+a/2:(o=-1*e.width+n.config.yaxis[t].title.offsetX+a/2+r.width/2,n.globals.isBarHorizontal&&(a=25,o=-1*e.width-n.config.yaxis[t].title.offsetX-a)),{xPos:o,padd:a})}},{key:"setYAxisXPosition",value:function(t,e){var r=this.w,i=0,n=0,o=18,a=1;r.config.yaxis.length>1&&(this.multipleYs=!0),r.config.yaxis.forEach((function(s,l){var c=r.globals.ignoreYAxisIndexes.includes(l)||!s.show||s.floating||0===t[l].width,u=t[l].width+e[l].width;s.opposite?r.globals.isBarHorizontal?(n=r.globals.gridWidth+r.globals.translateX-1,r.globals.translateYAxisX[l]=n-s.labels.offsetX):(n=r.globals.gridWidth+r.globals.translateX+a,c||(a+=u+20),r.globals.translateYAxisX[l]=n-s.labels.offsetX+20):(i=r.globals.translateX-o,c||(o+=u+20),r.globals.translateYAxisX[l]=i+s.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;f.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,r){var i=t.config.yaxis[r];if(i&&!i.floating&&void 0!==i.labels.align){var n=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(r,"'] .apexcharts-yaxis-texts-g")),o=f.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(r,"'] .apexcharts-yaxis-label"))),a=n.getBoundingClientRect();o.forEach((function(t){t.setAttribute("text-anchor",i.labels.align)})),"left"!==i.labels.align||i.opposite?"center"===i.labels.align?n.setAttribute("transform","translate(".concat(a.width/2*(i.opposite?1:-1),", 0)")):"right"===i.labels.align&&i.opposite&&n.setAttribute("transform","translate(".concat(a.width,", 0)")):n.setAttribute("transform","translate(-".concat(a.width,", 0)"))}}))}}],r&&Vh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Zh(t){return Zh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zh(t)}function $h(t,e){for(var r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var r=e.filter((function(e){return e.name===t}))[0];if(!r)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var i=f.extend(uu,r);this.w.globals.locale=i.options}}])&&tf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function nf(t){return nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nf(t)}function of(t,e){for(var r=0;re.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var o=new Mu({}),a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n[0].breakpoint,a=window.innerWidth>0?window.innerWidth:screen.width;if(a>i){var s=f.clone(r.globals.initialConfig);s.series=f.clone(r.config.series);var l=Mc.extendArrayProps(o,s,r);t=f.extend(l,t),t=f.extend(r.config,t),e.overrideResponsiveOptions(t)}else for(var c=0;ct.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&"function"==typeof t[0]?(this.isColorFn=!0,r.config.series.map((function(i,n){var o=t[n]||t[0];return"function"==typeof o?o({value:r.globals.axisCharts?r.globals.series[n][0]||0:r.globals.series[n],seriesIndex:n,dataPointIndex:n,w:e.w}):o}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,r){t&&(e[r]=t)}))}},{key:"getMonochromeColors",value:function(t,e,r){var i=t.color,n=t.shadeIntensity,o=t.shadeTo,a=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,s=1/(a/n),l=0;return Array.from({length:a},(function(){var t="dark"===o?r.shadeColor(-1*l,i):r.shadeColor(l,i);return l+=s,t}))}},{key:"applyColorTypes",value:function(t,e){var r=this,i=this.w;t.forEach((function(t){i.globals[t].colors=void 0===i.config[t].colors?r.isColorFn?i.config.colors:e:i.config[t].colors.slice(),r.pushExtraColors(i.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.w,n=e||i.globals.series.length;if(null===r&&(r=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===i.config.chart.type&&i.config.plotOptions.heatmap&&i.config.plotOptions.heatmap.colorScale.inverse),r&&i.globals.series.length&&(n=i.globals.series[i.globals.maxValsInArrayIndex].length*i.globals.series.length),t.lengtht.length)&&(e=t.length);for(var r=0,i=Array(e);rt.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,r=[];e.config.series.forEach((function(n,o){n.data.forEach((function(n,a){var s;s=e.globals.series[o][a],i=e.config.dataLabels.formatter(s,{ctx:t.dCtx.ctx,seriesIndex:o,dataPointIndex:a,w:e}),r.push(i)}))}));var i=f.getLargestStringFromArr(r),n=new Pc(this.dCtx.ctx),o=e.config.dataLabels.style,a=n.getTextRects(i,parseInt(o.fontSize),o.fontFamily);return{width:1.05*a.width,height:a.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var r=t;if(this.w.globals.isMultiLineX){var i=e.map((function(t,e){return Array.isArray(t)?t.length:1})),n=Math.max.apply(Math,function(t){return function(t){if(Array.isArray(t))return Pf(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Pf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pf(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i));r=e[i.indexOf(n)]}return r}}],r&&Cf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ef(t){return Ef="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ef(t)}function Mf(t,e){for(var r=0;r0){var i=this.getxAxisTimeScaleLabelsCoords();t={width:i.width,height:i.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var n=e.globals.xLabelFormatter,o=f.getLargestStringFromArr(r),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,r);e.globals.isBarHorizontal&&(a=o=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var s=new Jc(this.dCtx.ctx),l=o;o=s.xLabelFormat(n,o,l,{i:void 0,dateFormatter:new Vc(this.dCtx.ctx).formatDate,w:e}),a=s.xLabelFormat(n,a,l,{i:void 0,dateFormatter:new Vc(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===o||""===String(o).trim())&&(a=o="1");var c=new Pc(this.dCtx.ctx),u=c.getTextRects(o,e.config.xaxis.labels.style.fontSize),h=u;if(o!==a&&(h=c.getTextRects(a,e.config.xaxis.labels.style.fontSize)),(t={width:u.width>=h.width?u.width:h.width,height:u.height>=h.height?u.height:h.height}).width*r.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var d=function(t){return c.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};u=d(o),o!==a&&(h=d(a)),t.height=(u.height>h.height?u.height:h.height)/1.5,t.width=u.width>h.width?u.width:h.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var r,i=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,n=e.globals.groups.map((function(t){return t.title})),o=f.getLargestStringFromArr(n),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,n),s=new Pc(this.dCtx.ctx),l=s.getTextRects(o,i),c=l;return o!==a&&(c=s.getTextRects(a,i)),r={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},e.config.xaxis.labels.show||(r={width:0,height:0}),{width:r.width,height:r.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,r=0;if(void 0!==t.config.xaxis.title.text){var i=new Pc(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=i.width,r=i.height}return{width:e,height:r}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var r=this.dCtx.timescaleLabels.map((function(t){return t.value})),i=r.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Pc(this.dCtx.ctx).getTextRects(i,e.config.xaxis.labels.style.fontSize)).width*r.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,r=this.w,i=r.globals,n=r.config,o=n.xaxis.type,a=t.width;i.skipLastTimelinelabel=!1,i.skipFirstTimelinelabel=!1;var s=r.config.yaxis[0].opposite&&r.globals.isBarHorizontal;n.yaxis.forEach((function(t,l){s?(e.dCtx.gridPad.left1&&function(t){return-1!==i.collapsedSeriesIndices.indexOf(t)}(s)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var s=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+a/1.75-e.dCtx.yAxisWidthRight,c=s.position-a/1.75+e.dCtx.yAxisWidthLeft,u="right"===r.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>i.svgWidth-i.translateX-u&&(i.skipLastTimelinelabel=!0),c<-(t.show&&!t.floating||"bar"!==n.chart.type&&"candlestick"!==n.chart.type&&"rangeBar"!==n.chart.type&&"boxPlot"!==n.chart.type?10:a/1.75)&&(i.skipFirstTimelinelabel=!0)}else"datetime"===o?e.dCtx.gridPad.right(null===(i=String(u(e,s)))||void 0===i?void 0:i.length)?t:e}),h),p=d=u(d,s);if(void 0!==d&&0!==d.length||(d=l.niceMax),e.globals.isBarHorizontal){i=0;var g=e.globals.labels.slice();d=f.getLargestStringFromArr(g),d=u(d,{seriesIndex:a,dataPointIndex:-1,w:e}),p=t.dCtx.dimHelpers.getLargestStringFromMultiArr(d,g)}var b=new Pc(t.dCtx.ctx),y="rotate(".concat(o.labels.rotate," 0 0)"),v=b.getTextRects(d,o.labels.style.fontSize,o.labels.style.fontFamily,y,!1),m=v;d!==p&&(m=b.getTextRects(p,o.labels.style.fontSize,o.labels.style.fontFamily,y,!1)),r.push({width:(c>m.width||c>v.width?c:m.width>v.width?m.width:v.width)+i,height:m.height>v.height?m.height:v.height})}else r.push({width:0,height:0})})),r}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,r=[];return e.config.yaxis.map((function(e,i){if(e.show&&void 0!==e.title.text){var n=new Pc(t.dCtx.ctx),o="rotate(".concat(e.title.rotate," 0 0)"),a=n.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,o,!1);r.push({width:a.width,height:a.height})}else r.push({width:0,height:0})})),r}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,r=0,i=0,n=t.globals.yAxisScale.length>1?10:0,o=new eu(this.dCtx.ctx),a=function(a,s){var l=t.config.yaxis[s].floating,c=0;a.width>0&&!l?(c=a.width+n,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(s)&&(c=c-a.width-n)):c=l||o.isYAxisHidden(s)?0:5,t.config.yaxis[s].opposite?i+=c:r+=c,e+=c};return t.globals.yLabelsCoords.map((function(t,e){a(t,e)})),t.globals.yTitleCoords.map((function(t,e){a(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=r,this.dCtx.yAxisWidthRight=i,e}}],r&&Rf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Df(t){return Df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Df(t)}function Yf(t,e){for(var r=0;r0&&(s=i.comboBarCount),i.collapsedSeries.forEach((function(t){n(t.type)&&(s-=1)})),r.chart.stacked&&(s=1);var l=n(o)||i.comboBarCount>0,c=Math.abs(i.initialMaxX-i.initialMinX);if(l&&i.isXNumeric&&!i.isBarHorizontal&&s>0&&0!==c){c<=3&&(c=i.dataPoints);var u=c/t,h=i.minXDiff&&i.minXDiff/u>0?i.minXDiff/u:0;h>t/2&&(h/=2),(a=h*parseInt(r.plotOptions.bar.columnWidth,10)/100)<1&&(a=1),i.barPadForNumericAxis=a}return a}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,r=e.globals,i=this.dCtx.isSparkline||!r.axisCharts?0:10;["title","subtitle"].forEach((function(n){void 0!==e.config[n].text?i+=e.config[n].margin:i+=t.dCtx.isSparkline||!r.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||r.axisCharts||(i+=10);var n=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),o=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");r.gridHeight-=n.height+o.height+i,r.translateY+=n.height+o.height+i}},{key:"setGridXPosForDualYAxis",value:function(t,e){var r=this.w,i=new eu(this.dCtx.ctx);r.config.yaxis.forEach((function(n,o){-1!==r.globals.ignoreYAxisIndexes.indexOf(o)||n.floating||i.isYAxisHidden(o)||(n.opposite&&(r.globals.translateX-=e[o].width+t[o].width+parseInt(n.labels.style.fontSize,10)/1.2+12),r.globals.translateX<2&&(r.globals.translateX=2))}))}}],r&&Yf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Bf(t){return Bf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bf(t)}function Nf(t,e){if(t){if("string"==typeof t)return Wf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wf(t,e):void 0}}function Wf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var r=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||Nf(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),i=r[0],n=r[1];t.gridPad[i]=Math.max(n,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(i/2,this.gridPad.top),this.gridPad.bottom=Math.max(i/2,this.gridPad.bottom)),r.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),r.gridHeight=r.gridHeight-this.gridPad.top-this.gridPad.bottom,r.gridWidth=r.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var n=this.dimGrid.gridPadForColumnsInNumericAxis(r.gridWidth);r.gridWidth=r.gridWidth-2*n,r.translateX=r.translateX+this.gridPad.left+this.xPadLeft+(n>0?n:0),r.translateY=r.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,r=e.globals,i=this.dimYAxis.getyAxisLabelsCoords(),n=this.dimYAxis.getyAxisTitleCoords();r.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,r){e.globals.yLabelsCoords.push({width:i[r].width,index:r}),e.globals.yTitleCoords.push({width:n[r].width,index:r})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var o=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),s=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(o,s,a),r.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,r.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(r.rotateXLabels=!1,r.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),r.translateXAxisY=r.translateXAxisY+e.config.xaxis.labels.offsetY,r.translateXAxisX=r.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,c=this.xAxisHeight;r.xAxisLabelsHeight=this.xAxisHeight-s.height,r.xAxisGroupLabelsHeight=r.xAxisLabelsHeight-o.height,r.xAxisLabelsWidth=this.xAxisWidth,r.xAxisHeight=this.xAxisHeight;var u=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,c=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,c=0,u=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(o);var h=function(){r.translateX=l+t.datalabelsCoords.width,r.gridHeight=r.svgHeight-t.lgRect.height-c-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),r.gridWidth=r.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(u=r.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":r.translateY=u,h();break;case"top":r.translateY=this.lgRect.height+u,h();break;case"left":r.translateY=u,r.translateX=this.lgRect.width+l+this.datalabelsCoords.width,r.gridHeight=r.svgHeight-c-12,r.gridWidth=r.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":r.translateY=u,r.translateX=l+this.datalabelsCoords.width,r.gridHeight=r.svgHeight-c-12,r.gridWidth=r.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(n,i),new qh(this.ctx).setYAxisXPosition(i,n)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,r=t.config,i=0;t.config.legend.show&&!t.config.legend.floating&&(i=20);var n="pie"===r.chart.type||"polarArea"===r.chart.type||"donut"===r.chart.type?"pie":"radialBar",o=r.plotOptions[n].offsetY,a=r.plotOptions[n].offsetX;if(!r.legend.show||r.legend.floating){e.gridHeight=e.svgHeight;var s=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(s,e.gridHeight),e.translateY=o,void(e.translateX=a+(e.svgWidth-e.gridWidth)/2)}switch(r.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=o-10,e.translateX=a+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+o+10,e.translateX=a+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-i,e.gridHeight="auto"!==r.chart.height?e.svgHeight:e.gridWidth,e.translateY=o,e.translateX=a+this.lgRect.width+i;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-i-5,e.gridHeight="auto"!==r.chart.height?e.svgHeight:e.gridWidth,e.translateY=o,e.translateX=a+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,r){var i=this.w,n=i.globals.hasXaxisGroups?2:1,o=r.height+t.height+e.height,a=i.globals.isMultiLineX?1.2:i.globals.LINE_HEIGHT_RATIO,s=i.globals.rotateXLabels?22:10,l=i.globals.rotateXLabels&&"bottom"===i.config.legend.position?10:0;this.xAxisHeight=o*a+n*s+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeightu&&(this.yAxisWidth=u)}}],r&&Gf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function qf(t){return qf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qf(t)}function Zf(t,e){for(var r=0;r0){for(var o=0;o1;if(this.legendHelpers.appendToForeignObject(),(i||!e.axisCharts)&&r.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===r.legend.position||"top"===r.legend.position?this.legendAlignHorizontal():"right"!==r.legend.position&&"left"!==r.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,r=t.fillcolor,i=this.w,n=document.createElement("span");n.classList.add("apexcharts-legend-marker");var o=i.config.legend.markers.shape||i.config.markers.shape,a=o;Array.isArray(o)&&(a=o[e]);var s=Array.isArray(i.config.legend.markers.size)?parseFloat(i.config.legend.markers.size[e]):parseFloat(i.config.legend.markers.size),l=Array.isArray(i.config.legend.markers.offsetX)?parseFloat(i.config.legend.markers.offsetX[e]):parseFloat(i.config.legend.markers.offsetX),c=Array.isArray(i.config.legend.markers.offsetY)?parseFloat(i.config.legend.markers.offsetY[e]):parseFloat(i.config.legend.markers.offsetY),u=Array.isArray(i.config.legend.markers.strokeWidth)?parseFloat(i.config.legend.markers.strokeWidth[e]):parseFloat(i.config.legend.markers.strokeWidth),h=n.style;if(h.height=2*(s+u)+"px",h.width=2*(s+u)+"px",h.left=l+"px",h.top=c+"px",i.config.legend.markers.customHTML)h.background="transparent",h.color=r[e],Array.isArray(i.config.legend.markers.customHTML)?i.config.legend.markers.customHTML[e]&&(n.innerHTML=i.config.legend.markers.customHTML[e]()):n.innerHTML=i.config.legend.markers.customHTML();else{var f=new Ku(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(a),seriesIndex:e,strokeWidth:u,size:s}),d=window.SVG().addTo(n).size("100%","100%"),p=new Pc(this.ctx).drawMarker(0,0,td(td({},f),{},{pointFillColor:Array.isArray(r)?r[e]:f.pointFillColor,shape:a}));i.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),d.add(p)}return n}},{key:"drawLegends",value:function(){var t=this,e=this.w,r=e.config.legend.fontFamily,i=e.globals.seriesNames,n=e.config.legend.markers.fillColors?e.config.legend.markers.fillColors.slice():e.globals.colors.slice();if("heatmap"===e.config.chart.type){var o=e.config.plotOptions.heatmap.colorScale.ranges;i=o.map((function(t){return t.name?t.name:t.from+" - "+t.to})),n=o.map((function(t){return t.color}))}else this.isBarsDistributed&&(i=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(i=e.config.legend.customLegendItems);for(var a=e.globals.legendFormatter,s=e.config.legend.inverseOrder,l=s?i.length-1:0;s?l>=0:l<=i.length-1;s?l--:l++){var c,u=a(i[l],{seriesIndex:l,w:e}),h=!1,d=!1;if(e.globals.collapsedSeries.length>0)for(var p=0;p0)for(var g=0;g0?l-10:0)+(c>0?c-10:0)}i.style.position="absolute",o=o+t+r.config.legend.offsetX,a=a+e+r.config.legend.offsetY,i.style.left=o+"px",i.style.top=a+"px","right"===r.config.legend.position&&(i.style.left="auto",i.style.right=25+r.config.legend.offsetX+"px"),["width","height"].forEach((function(t){i.style[t]&&(i.style[t]=parseInt(r.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new Uf(this.ctx),r=e.dimHelpers.getTitleSubtitleCoords("title"),i=e.dimHelpers.getTitleSubtitleCoords("subtitle"),n=0;"top"===t.config.legend.position&&(n=r.height+i.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,n)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),r=0;"left"===t.config.legend.position&&(r=20),"right"===t.config.legend.position&&(r=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(r,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,r=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(r){var i=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,i,this.w]),new fh(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&r&&new fh(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var r=parseInt(t.target.getAttribute("rel"),10)-1,i="true"===t.target.getAttribute("data:collapsed"),n=this.w.config.chart.events.legendClick;"function"==typeof n&&n(this.ctx,r,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,r,this.w]);var o=this.w.config.legend.markers.onClick;"function"==typeof o&&t.target.classList.contains("apexcharts-legend-marker")&&(o(this.ctx,r,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,r,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(r,i)}}}],r&&rd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const od=nd;var ad=r(75),sd=r.n(ad),ld=r(541),cd=r.n(ld),ud=r(955),hd=r.n(ud),fd=r(646),dd=r.n(fd),pd=r(606),gd=r.n(pd),bd=r(802),yd=r.n(bd),vd=r(627),md=r.n(vd);function xd(t){return xd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xd(t)}function wd(t,e){for(var r=0;rthis.wheelDelay&&(this.executeMouseWheelZoom(t),r.globals.lastWheelExecution=i),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){i-r.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),r.globals.lastWheelExecution=i)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,r=this.w;this.minX=r.globals.isRangeBar?r.globals.minY:r.globals.minX,this.maxX=r.globals.isRangeBar?r.globals.maxY:r.globals.maxX;var i=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(i){var n,o,a,s=(t.clientX-i.left)/i.width,l=this.minX,c=this.maxX,u=c-l;if(t.deltaY<0){var h=l+s*u;o=h-(n=.5*u)/2,a=h+n/2}else o=l-(n=1.5*u)/2,a=c+n/2;if(!r.globals.isRangeBar){o=Math.max(o,r.globals.initialMinX),a=Math.min(a,r.globals.initialMaxX);var f=.01*(r.globals.initialMaxX-r.globals.initialMinX);if(a-o0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,r,i,n){return"l"===n||"r"===n?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resizing",this.selectionDragging.bind(this,"resizing")))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(Pd(Pd({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var r=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,i=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-r;t.globals.isRangeBar&&(r=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,i=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var n={x:r,y:0,width:i,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(n),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,r=t.y,i=t.width,n=t.height,o=t.translateX,a=void 0===o?0:o,s=t.translateY,l=void 0===s?0:s,c=this.w,u=this.zoomRect,h=this.selectionRect;if(this.dragged||null!==c.globals.selection){var f={transform:"translate("+a+", "+l+")"};c.globals.zoomEnabled&&this.dragged&&(i<0&&(i=1),u.attr({x:e,y:r,width:i,height:n,fill:c.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":c.config.chart.zoom.zoomedArea.fill.opacity,stroke:c.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":c.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":c.config.chart.zoom.zoomedArea.stroke.opacity}),Pc.setAttrs(u.node,f)),c.globals.selectionEnabled&&(h.attr({x:e,y:r,width:i>0?i:0,height:n>0?n:0,fill:c.config.chart.selection.fill.color,"fill-opacity":c.config.chart.selection.fill.opacity,stroke:c.config.chart.selection.stroke.color,"stroke-width":c.config.chart.selection.stroke.width,"stroke-dasharray":c.config.chart.selection.stroke.dashArray,"stroke-opacity":c.config.chart.selection.stroke.opacity}),Pc.setAttrs(h.node,f))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,r=t.zoomtype,i=this.w,n=e,o=this.gridRect.getBoundingClientRect(),a=n.startX-1,s=n.startY,l=!1,c=!1,u=n.clientX-o.left-a,h=n.clientY-o.top-s,f={translateX:i.globals.translateX,translateY:i.globals.translateY};return Math.abs(u+a)>i.globals.gridWidth?u=i.globals.gridWidth-a:n.clientX-o.left<0&&(u=a),a>n.clientX-o.left&&(l=!0,u=Math.abs(u)),s>n.clientY-o.top&&(c=!0,h=Math.abs(h)),f=Pd(Pd({},f="x"===r?{x:l?a-u:a,y:0,width:u,height:i.globals.gridHeight}:"y"===r?{x:0,y:c?s-h:s,width:i.globals.gridWidth,height:h}:{x:l?a-u:a,y:c?s-h:s,width:u,height:h}),{},{translateX:i.globals.translateX,translateY:i.globals.translateY}),n.drawSelectionRect(f),n.selectionDragging("resizing"),f}},{key:"selectionDragging",value:function(t,e){var r=this,i=this.w;if(e){e.preventDefault();var n=e.detail,o=n.handler,a=n.box,s=a.x,l=a.y;sthis.constraints.x2&&(s=this.constraints.x2-a.w),a.y2>this.constraints.y2&&(l=this.constraints.y2-a.h),o.move(s,l);var c=this.xyRatios,u=this.selectionRect,h=0;"resizing"===t&&(h=30);var f=function(t){return parseFloat(u.node.getAttribute(t))},d={x:f("x"),y:f("y"),width:f("width"),height:f("height")};i.globals.selection=d,"function"==typeof i.config.chart.events.selection&&i.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,n,o,a=r.gridRect.getBoundingClientRect(),s=u.node.getBoundingClientRect();i.globals.isRangeBar?(t=i.globals.yAxisScale[0].niceMin+(s.left-a.left)*c.invertedYRatio,e=i.globals.yAxisScale[0].niceMin+(s.right-a.left)*c.invertedYRatio,n=0,o=1):(t=i.globals.xAxisScale.niceMin+(s.left-a.left)*c.xRatio,e=i.globals.xAxisScale.niceMin+(s.right-a.left)*c.xRatio,n=i.globals.yAxisScale[0].niceMin+(a.bottom-s.bottom)*c.yRatio[0],o=i.globals.yAxisScale[0].niceMax-(s.top-a.top)*c.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:n,max:o}};i.config.chart.events.selection(r.ctx,l),i.config.chart.brush.enabled&&void 0!==i.config.chart.events.brushScrolled&&i.config.chart.events.brushScrolled(r.ctx,l)}),h))}}},{key:"selectionDrawn",value:function(t){var e=t.context,r=t.zoomtype,i=this.w,n=e,o=this.xyRatios,a=this.ctx.toolbar;if(n.startX>n.endX){var s=n.startX;n.startX=n.endX,n.endX=s}if(n.startY>n.endY){var l=n.startY;n.startY=n.endY,n.endY=l}var c=void 0,u=void 0;i.globals.isRangeBar?(c=i.globals.yAxisScale[0].niceMin+n.startX*o.invertedYRatio,u=i.globals.yAxisScale[0].niceMin+n.endX*o.invertedYRatio):(c=i.globals.xAxisScale.niceMin+n.startX*o.xRatio,u=i.globals.xAxisScale.niceMin+n.endX*o.xRatio);var h=[],d=[];if(i.config.yaxis.forEach((function(t,e){var r=i.globals.seriesYAxisMap[e][0];h.push(i.globals.yAxisScale[e].niceMax-o.yRatio[r]*n.startY),d.push(i.globals.yAxisScale[e].niceMax-o.yRatio[r]*n.endY)})),n.dragged&&(n.dragX>10||n.dragY>10)&&c!==u)if(i.globals.zoomEnabled){var p=f.clone(i.globals.initialConfig.yaxis),g=f.clone(i.globals.initialConfig.xaxis);if(i.globals.zoomed=!0,i.config.xaxis.convertedCatToNumeric&&(c=Math.floor(c),u=Math.floor(u),c<1&&(c=1,u=i.globals.dataPoints),u-c<2&&(u=c+1)),"xy"!==r&&"x"!==r||(g={min:c,max:u}),"xy"!==r&&"y"!==r||p.forEach((function(t,e){p[e].min=d[e],p[e].max=h[e]})),a){var b=a.getBeforeZoomRange(g,p);b&&(g=b.xaxis?b.xaxis:g,p=b.yaxis?b.yaxis:p)}var y={xaxis:g};i.config.chart.group||(y.yaxis=p),n.ctx.updateHelpers._updateOptions(y,!1,n.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof i.config.chart.events.zoomed&&a.zoomCallback(g,p)}else if(i.globals.selectionEnabled){var v,m=null;v={min:c,max:u},"xy"!==r&&"y"!==r||(m=f.clone(i.config.yaxis)).forEach((function(t,e){m[e].min=d[e],m[e].max=h[e]})),i.globals.selection=n.selection,"function"==typeof i.config.chart.events.selection&&i.config.chart.events.selection(n.ctx,{xaxis:v,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,r=this.w,i=e;if(void 0!==r.globals.lastClientPosition.x){var n=r.globals.lastClientPosition.x-i.clientX,o=r.globals.lastClientPosition.y-i.clientY;Math.abs(n)>Math.abs(o)&&n>0?this.moveDirection="left":Math.abs(n)>Math.abs(o)&&n<0?this.moveDirection="right":Math.abs(o)>Math.abs(n)&&o>0?this.moveDirection="up":Math.abs(o)>Math.abs(n)&&o<0&&(this.moveDirection="down")}r.globals.lastClientPosition={x:i.clientX,y:i.clientY};var a=r.globals.isRangeBar?r.globals.minY:r.globals.minX,s=r.globals.isRangeBar?r.globals.maxY:r.globals.maxX;r.config.xaxis.convertedCatToNumeric||i.panScrolled(a,s)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,r=t.globals.maxX,i=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+i,r=t.globals.maxX+i):"right"===this.moveDirection&&(e=t.globals.minX-i,r=t.globals.maxX-i),e=Math.floor(e),r=Math.floor(r),this.updateScrolledChart({xaxis:{min:e,max:r}},e,r)}},{key:"panScrolled",value:function(t,e){var r=this.w,i=this.xyRatios,n=f.clone(r.globals.initialConfig.yaxis),o=i.xRatio,a=r.globals.minX,s=r.globals.maxX;r.globals.isRangeBar&&(o=i.invertedYRatio,a=r.globals.minY,s=r.globals.maxY),"left"===this.moveDirection?(t=a+r.globals.gridWidth/15*o,e=s+r.globals.gridWidth/15*o):"right"===this.moveDirection&&(t=a-r.globals.gridWidth/15*o,e=s-r.globals.gridWidth/15*o),r.globals.isRangeBar||(tr.globals.initialMaxX)&&(t=a,e=s);var l={xaxis:{min:t,max:e}};r.config.chart.group||(l.yaxis=n),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,r){var i=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof i.config.chart.events.scrolled&&i.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:r}})}}],r&&jd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(kd);function Rd(t){return Rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rd(t)}function zd(t){return function(t){if(Array.isArray(t))return Xd(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Xd(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xd(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);rs||p>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):o.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):o.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var g=Math.round(d/c),b=Math.floor(p/u);h&&!o.config.xaxis.convertedCatToNumeric&&(g=Math.ceil(d/c),g-=1);var y=null,v=null,m=o.globals.seriesXvalues.map((function(t){return t.filter((function(t){return f.isNumber(t)}))})),x=o.globals.seriesYvalues.map((function(t){return t.filter((function(t){return f.isNumber(t)}))}));if(o.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),S=d*(w.width/s),k=p*(w.height/l);y=(v=this.closestInMultiArray(S,k,m,x)).index,g=v.j,null!==y&&(m=o.globals.seriesXvalues[y],g=(v=this.closestInArray(S,m)).index)}return o.globals.capturedSeriesIndex=null===y?-1:y,(!g||g<1)&&(g=0),o.globals.isBarHorizontal?o.globals.capturedDataPointIndex=b:o.globals.capturedDataPointIndex=g,{capturedSeries:y,j:o.globals.isBarHorizontal?b:g,hoverX:d,hoverY:p}}},{key:"closestInMultiArray",value:function(t,e,r,i){var n=this.w,o=0,a=null,s=-1;n.globals.series.length>1?o=this.getFirstActiveXArray(r):a=0;var l=r[o][0],c=Math.abs(t-l);if(r.forEach((function(e){e.forEach((function(e,r){var i=Math.abs(t-e);i<=c&&(c=i,s=r)}))})),-1!==s){var u=i[o][s],h=Math.abs(e-u);a=o,i.forEach((function(t,r){var i=Math.abs(e-t[s]);i<=h&&(h=i,a=r)}))}return{index:a,j:s}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,r=0,i=t.map((function(t,e){return t.length>0?e:-1})),n=0;n0)for(var i=0;i *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=zd(t)).sort((function(t,e){var r=Number(t.getAttribute("data:realIndex")),i=Number(e.getAttribute("data:realIndex"));return ir?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var r=Number(t.getAttribute("cx")),i=Number(t.getAttribute("cy")),n=t.getAttribute("shape");return new Pc(this.ctx).getMarkerPath(r,i,n,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,r=e.config.markers.hover.size;return void 0===r&&(r=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),r}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,r=this.ttCtx;0===r.allTooltipSeriesGroups.length&&(r.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var i=r.allTooltipSeriesGroups,n=0;n ').concat(r.attrs.name,""),e+="
".concat(r.val,"
")})),v.innerHTML=t+"",m.innerHTML=e+""};a?l.globals.seriesGoals[e][r]&&Array.isArray(l.globals.seriesGoals[e][r])?x():(v.innerHTML="",m.innerHTML=""):x()}else v.innerHTML="",m.innerHTML="";if(null!==p&&(i[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,i[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:""),a&&g[0]){if(l.config.tooltip.hideEmptySeries){var w=i[e].querySelector(".apexcharts-tooltip-marker"),S=i[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(u)?(w.style.display="none",S.style.display="none"):(w.style.display="block",S.style.display="block")}null==u||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&-1===c.tConfig.enabledOnSeries.indexOf(e)?g[0].parentNode.style.display="none":g[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&-1===c.tConfig.enabledOnSeries.indexOf(e)&&(g[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var r=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));i&&(i.classList.add("apexcharts-active"),i.style.display=r.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,r=t.j,i=this.w,n=this.ctx.series.filteredSeriesX(),o="",a="",s=null,l=null,c={series:i.globals.series,seriesIndex:e,dataPointIndex:r,w:i},u=i.globals.ttZFormatter;null===r?l=i.globals.series[e]:i.globals.isXNumeric&&"treemap"!==i.config.chart.type?(o=n[e][r],0===n[e].length&&(o=n[this.tooltipUtil.getFirstActiveXArray(n)][r])):o=new yh(this.ctx).isFormatXY()?void 0!==i.config.series[e].data[r]?i.config.series[e].data[r].x:"":void 0!==i.globals.labels[r]?i.globals.labels[r]:"";var h=o;return o=i.globals.isXNumeric&&"datetime"===i.config.xaxis.type?new Jc(this.ctx).xLabelFormat(i.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new Vc(this.ctx).formatDate,w:this.w}):i.globals.isBarHorizontal?i.globals.yLabelFormatters[0](h,c):i.globals.xLabelFormatter(h,c),void 0!==i.config.tooltip.x.formatter&&(o=i.globals.ttKeyFormatter(h,c)),i.globals.seriesZ.length>0&&i.globals.seriesZ[e].length>0&&(s=u(i.globals.seriesZ[e][r],i)),a="function"==typeof i.config.xaxis.tooltip.formatter?i.globals.xaxisTooltipFormatter(h,c):o,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(o)?o.join(" "):o,xAxisTTVal:Array.isArray(a)?a.join(" "):a,zVal:s}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,r=t.j,i=t.y1,n=t.y2,o=t.w,a=this.ttCtx.getElTooltip(),s=o.config.tooltip.custom;Array.isArray(s)&&s[e]&&(s=s[e]),a.innerHTML=s({ctx:this.ctx,series:o.globals.series,seriesIndex:e,dataPointIndex:r,y1:i,y2:n,w:o})}}],r&&Gd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function qd(t){return qd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qd(t)}function Zd(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null,r=this.ttCtx,i=this.w,n=r.getElXCrosshairs(),o=t-r.xcrosshairsWidth/2,a=i.globals.labels.slice().length;if(null!==e&&(o=i.globals.gridWidth/a*e),null===n||i.globals.isBarHorizontal||(n.setAttribute("x",o),n.setAttribute("x1",o),n.setAttribute("x2",o),n.setAttribute("y2",i.globals.gridHeight),n.classList.add("apexcharts-active")),o<0&&(o=0),o>i.globals.gridWidth&&(o=i.globals.gridWidth),r.isXAxisTooltipEnabled){var s=o;"tickWidth"!==i.config.xaxis.crosshairs.width&&"barWidth"!==i.config.xaxis.crosshairs.width||(s=o+r.xcrosshairsWidth/2),this.moveXAxisTooltip(s)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Pc.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Pc.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,r=this.ttCtx;if(null!==r.xaxisTooltip&&0!==r.xcrosshairsWidth){r.xaxisTooltip.classList.add("apexcharts-active");var i,n=r.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;t-=r.xaxisTooltip.getBoundingClientRect().width/2,isNaN(t)||(t+=e.globals.translateX,i=new Pc(this.ctx).getTextRects(r.xaxisTooltipText.innerHTML),r.xaxisTooltipText.style.minWidth=i.width+"px",r.xaxisTooltip.style.left=t+"px",r.xaxisTooltip.style.top=n+"px")}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,r=this.ttCtx;null===r.yaxisTTEls&&(r.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var i=parseInt(r.ycrosshairsHidden.getAttribute("y1"),10),n=e.globals.translateY+i,o=r.yaxisTTEls[t].getBoundingClientRect().height,a=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(a-=26),n-=o/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(r.yaxisTTEls[t].classList.add("apexcharts-active"),r.yaxisTTEls[t].style.top=n+"px",r.yaxisTTEls[t].style.left=a+e.config.yaxis[t].tooltip.offsetX+"px"):r.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.w,n=this.ttCtx,o=n.getElTooltip(),a=n.tooltipRect,s=null!==r?parseFloat(r):1,l=parseFloat(t)+s+5,c=parseFloat(e)+s/2;if(l>i.globals.gridWidth/2&&(l=l-a.ttWidth-s-10),l>i.globals.gridWidth-a.ttWidth-10&&(l=i.globals.gridWidth-a.ttWidth),l<-20&&(l=-20),i.config.tooltip.followCursor){var u=n.getElGrid().getBoundingClientRect();(l=n.e.clientX-u.left)>i.globals.gridWidth/2&&(l-=n.tooltipRect.ttWidth),(c=n.e.clientY+i.globals.translateY-u.top)>i.globals.gridHeight/2&&(c-=n.tooltipRect.ttHeight)}else i.globals.isBarHorizontal||a.ttHeight/2+c>i.globals.gridHeight&&(c=i.globals.gridHeight-a.ttHeight+i.globals.translateY);isNaN(l)||(l+=i.globals.translateX,o.style.left=l+"px",o.style.top=c+"px")}},{key:"moveMarkers",value:function(t,e){var r=this.w,i=this.ttCtx;if(r.globals.markers.size[t]>0)for(var n=r.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),o=0;o0){var d=f.getAttribute("shape"),p=l.getMarkerPath(n,o,d,1.5*u);f.setAttribute("d",p)}this.moveXCrosshairs(n),s.fixedTooltip||this.moveTooltip(n,o,u)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,r=this.ttCtx,i=r.w,n=0,o=0,a=i.globals.pointsArray,s=new fh(this.ctx),l=new Pc(this.ctx);e=s.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var c=r.tooltipUtil.getHoverMarkerSize(e);a[e]&&(n=a[e][t][0],o=a[e][t][1]);var u=r.tooltipUtil.getAllMarkers();if(null!==u)for(var h=0;h0){var y=l.getMarkerPath(n,d,g,c);u[h].setAttribute("d",y)}else u[h].setAttribute("d","")}}this.moveXCrosshairs(n),r.fixedTooltip||this.moveTooltip(n,o||i.globals.gridHeight,c)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var r=this.w,i=this.ttCtx,n=r.globals.columnSeries?r.globals.columnSeries.length:r.globals.series.length,o=n>=2&&n%2==0?Math.floor(n/2):Math.floor(n/2)+1;r.globals.isBarHorizontal&&(o=new fh(this.ctx).getActiveConfigSeriesIndex("desc")+1);var a=r.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(o,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"']"));a||"number"!=typeof e||(a=r.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var s=a?parseFloat(a.getAttribute("cx")):0,l=a?parseFloat(a.getAttribute("cy")):0,c=a?parseFloat(a.getAttribute("barWidth")):0,u=i.getElGrid().getBoundingClientRect(),h=a&&(a.classList.contains("apexcharts-candlestick-area")||a.classList.contains("apexcharts-boxPlot-area"));r.globals.isXNumeric?(a&&!h&&(s-=n%2!=0?c/2:0),a&&h&&r.globals.comboCharts&&(s-=c/2)):r.globals.isBarHorizontal||(s=i.xAxisTicksPositions[t-1]+i.dataPointsDividedWidth/2,isNaN(s)&&(s=i.xAxisTicksPositions[t]-i.dataPointsDividedWidth/2)),r.globals.isBarHorizontal?l-=i.tooltipRect.ttHeight:r.config.tooltip.followCursor?l=i.e.clientY-u.top-i.tooltipRect.ttHeight/2:l+i.tooltipRect.ttHeight+15>r.globals.gridHeight&&(l=r.globals.gridHeight),r.globals.isBarHorizontal||this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,l||r.globals.gridHeight)}}],r&&Zd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qd(t){return Qd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qd(t)}function Kd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w;"bubble"!==n.config.chart.type&&this.newPointSize(t,e);var o=e.getAttribute("cx"),a=e.getAttribute("cy");if(null!==r&&null!==i&&(o=r,a=i),this.tooltipPosition.moveXCrosshairs(o),!this.fixedTooltip){if("radar"===n.config.chart.type){var s=this.ttCtx.getElGrid().getBoundingClientRect();o=this.ttCtx.e.clientX-s.left}this.tooltipPosition.moveTooltip(o,a,n.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,r=this,i=this.ttCtx,n=t,o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),a=e.config.markers.hover.size,s=0;s0){var i=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],r);t[e].setAttribute("d",i)}else t[e].setAttribute("d","M0,0")}}}],r&&tp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ip(t){return ip="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ip(t)}function np(t,e){for(var r=0;rs.globals.gridWidth/2&&(i=u-a.tooltipRect.ttWidth/2+f),a.w.config.tooltip.followCursor){var p=s.globals.dom.elWrap.getBoundingClientRect();i=s.globals.clientX-p.left-(i>s.globals.gridWidth/2?a.tooltipRect.ttWidth:0),n=s.globals.clientY-p.top-(n>s.globals.gridHeight/2?a.tooltipRect.ttHeight:0)}}return{x:i,y:n}}},{key:"handleMarkerTooltip",value:function(t){var e,r,i=t.e,n=t.opt,o=t.x,a=t.y,s=this.w,l=this.ttCtx;if(i.target.classList.contains("apexcharts-marker")){var c=parseInt(n.paths.getAttribute("cx"),10),u=parseInt(n.paths.getAttribute("cy"),10),h=parseFloat(n.paths.getAttribute("val"));if(r=parseInt(n.paths.getAttribute("rel"),10),e=parseInt(n.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var d=f.findAncestor(n.paths,"apexcharts-series");d&&(e=parseInt(d.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,j:r,shared:!l.showOnIntersect&&s.config.tooltip.shared,e:i}),"mouseup"===i.type&&l.markerClick(i,e,r),s.globals.capturedSeriesIndex=e,s.globals.capturedDataPointIndex=r,o=c,a=u+s.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var p=l.getElGrid().getBoundingClientRect();a=l.e.clientY+s.globals.translateY-p.top}h<0&&(a=u),l.marker.enlargeCurrentPoint(r,n.paths,o,a)}return{x:o,y:a}}},{key:"handleBarTooltip",value:function(t){var e,r,i=t.e,n=t.opt,o=this.w,a=this.ttCtx,s=a.getElTooltip(),l=0,c=0,u=0,h=this.getBarTooltipXY({e:i,opt:n});if(null!==h.j||0!==h.barHeight||0!==h.barWidth){e=h.i;var f=h.j;if(o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=f,o.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||!o.config.tooltip.shared?(c=h.x,u=h.y,r=Array.isArray(o.config.stroke.width)?o.config.stroke.width[e]:o.config.stroke.width,l=c):o.globals.comboCharts||o.config.tooltip.shared||(l/=2),isNaN(u)&&(u=o.globals.svgHeight-a.tooltipRect.ttHeight),parseInt(n.paths.parentNode.getAttribute("data:realIndex"),10),c+a.tooltipRect.ttWidth>o.globals.gridWidth?c-=a.tooltipRect.ttWidth:c<0&&(c=0),a.w.config.tooltip.followCursor){var d=a.getElGrid().getBoundingClientRect();u=a.e.clientY-d.top}null===a.tooltip&&(a.tooltip=o.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),o.config.tooltip.shared||(o.globals.comboBarCount>0?a.tooltipPosition.moveXCrosshairs(l+r/2):a.tooltipPosition.moveXCrosshairs(l)),!a.fixedTooltip&&(!o.config.tooltip.shared||o.globals.isBarHorizontal&&a.tooltipUtil.hasBars())&&(u=u+o.globals.translateY-a.tooltipRect.ttHeight/2,s.style.left=c+o.globals.translateX+"px",s.style.top=u+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,r=t.e,i=t.opt,n=this.w,o=null,a=this.ttCtx,s=0,l=0,c=0,u=0,h=0,f=r.target.classList;if(f.contains("apexcharts-bar-area")||f.contains("apexcharts-candlestick-area")||f.contains("apexcharts-boxPlot-area")||f.contains("apexcharts-rangebar-area")){var d=r.target,p=d.getBoundingClientRect(),g=i.elGrid.getBoundingClientRect(),b=p.height;h=p.height;var y=p.width,v=parseInt(d.getAttribute("cx"),10),m=parseInt(d.getAttribute("cy"),10);u=parseFloat(d.getAttribute("barWidth"));var x="touchmove"===r.type?r.touches[0].clientX:r.clientX;o=parseInt(d.getAttribute("j"),10),s=parseInt(d.parentNode.getAttribute("rel"),10)-1;var w=d.getAttribute("data-range-y1"),S=d.getAttribute("data-range-y2");n.globals.comboCharts&&(s=parseInt(d.parentNode.getAttribute("data:realIndex"),10));var k=function(t){return n.globals.isXNumeric?v-y/2:e.isVerticalGroupedRangeBar?v+y/2:v-a.dataPointsDividedWidth+y/2},A=function(){return m-a.dataPointsDividedHeight+b/2-a.tooltipRect.ttHeight/2};a.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:s,j:o,y1:w?parseInt(w,10):null,y2:S?parseInt(S,10):null,shared:!a.showOnIntersect&&n.config.tooltip.shared,e:r}),n.config.tooltip.followCursor?n.globals.isBarHorizontal?(l=x-g.left+15,c=A()):(l=k(),c=r.clientY-g.top-a.tooltipRect.ttHeight/2-15):n.globals.isBarHorizontal?((l=v)0&&r.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,r){var i=this.ttCtx,n=this.w,o=n.globals,a=o.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&a.length>0){var s=o.yLabelFormatters[t],l=i.getElGrid().getBoundingClientRect(),c=a[0],u=0;r.yRatio.length>1&&(u=c);var h=(e-l.top)*r.yRatio[u],f=o.maxYArr[c]-o.minYArr[c],d=o.minYArr[c]+(f-h);n.config.yaxis[t].reversed&&(d=o.maxYArr[c]-(f-h)),i.tooltipPosition.moveYCrosshairs(e-l.top),i.yaxisTooltipText[t].innerHTML=s(d),i.tooltipPosition.moveYAxisTooltip(t)}}}],r&&cp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const fp=hp;function dp(t){return dp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dp(t)}function pp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function gp(t){for(var e=1;e0&&this.addPathsEventListeners(d,u),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(u)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),r=e.getBoundingClientRect(),i=r.width+10,n=r.height+10,o=this.tConfig.fixed.offsetX,a=this.tConfig.fixed.offsetY,s=this.tConfig.fixed.position.toLowerCase();return s.indexOf("right")>-1&&(o=o+t.globals.svgWidth-i+10),s.indexOf("bottom")>-1&&(a=a+t.globals.svgHeight-n-10),e.style.left=o+"px",e.style.top=a+"px",{x:o,y:a,ttWidth:i,ttHeight:n}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var r=this,i=function(i){var n={paths:t[i],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[i].addEventListener(e,r.onSeriesHover.bind(r,n),{capture:!1,passive:!0})}))},n=0;n=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){r.seriesHover(t,e)}),20-i))}},{key:"seriesHover",value:function(t,e){var r=this;this.lastHoverTime=Date.now();var i=[],n=this.w;n.config.chart.group&&(i=this.ctx.getGroupedCharts()),n.globals.axisCharts&&(n.globals.minX===-1/0&&n.globals.maxX===1/0||0===n.globals.dataPoints)||(i.length?i.forEach((function(i){var n=r.getElTooltip(i),o={paths:t.paths,tooltipEl:n,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:i.w.globals.tooltip.ttItems};i.w.globals.minX===r.w.globals.minX&&i.w.globals.maxX===r.w.globals.maxX&&i.w.globals.tooltip.seriesHoverByContext({chartCtx:i,ttCtx:i.w.globals.tooltip,opt:o,e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,r=t.ttCtx,i=t.opt,n=t.e,o=e.w,a=this.getElTooltip(e);a&&(r.tooltipRect={x:0,y:0,ttWidth:a.getBoundingClientRect().width,ttHeight:a.getBoundingClientRect().height},r.e=n,!r.tooltipUtil.hasBars()||o.globals.comboCharts||r.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new fh(e).toggleSeriesOnHover(n,n.target.parentNode),r.fixedTooltip&&r.drawFixedTooltipRect(),o.globals.axisCharts?r.axisChartsTooltips({e:n,opt:i,tooltipRect:r.tooltipRect}):r.nonAxisChartsTooltips({e:n,opt:i,tooltipRect:r.tooltipRect}))}},{key:"axisChartsTooltips",value:function(t){var e,r,i=t.e,n=t.opt,o=this.w,a=n.elGrid.getBoundingClientRect(),s="touchmove"===i.type?i.touches[0].clientX:i.clientX,l="touchmove"===i.type?i.touches[0].clientY:i.clientY;if(this.clientY=l,this.clientX=s,o.globals.capturedSeriesIndex=-1,o.globals.capturedDataPointIndex=-1,la.top+a.height)this.handleMouseOut(n);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!o.config.tooltip.shared){var c=parseInt(n.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(n)}var u=this.getElTooltip(),h=this.getElXCrosshairs(),f=[];o.config.chart.group&&(f=this.ctx.getSyncedCharts());var d=o.globals.xyCharts||"bar"===o.config.chart.type&&!o.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||o.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===i.type||"touchmove"===i.type||"mouseup"===i.type){if(o.globals.collapsedSeries.length+o.globals.ancillaryCollapsedSeries.length===o.globals.series.length)return;null!==h&&h.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),d&&!this.showOnIntersect||f.length>1)this.handleStickyTooltip(i,s,l,n);else if("heatmap"===o.config.chart.type||"treemap"===o.config.chart.type){var g=this.intersect.handleHeatTreeTooltip({e:i,opt:n,x:e,y:r,type:o.config.chart.type});e=g.x,r=g.y,u.style.left=e+"px",u.style.top=r+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:i,opt:n}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:i,opt:n,x:e,y:r});if(this.yaxisTooltips.length)for(var b=0;bl.width)this.handleMouseOut(i);else if(null!==s)this.handleStickyCapturedSeries(t,s,i,a);else if(this.tooltipUtil.isXoverlap(a)||n.globals.isBarHorizontal){var c=n.globals.series.findIndex((function(t,e){return!n.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,c,a,i.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,r,i){var n=this.w;if(this.tConfig.shared||null!==n.globals.series[e][i]){if(void 0!==n.globals.series[e][i])this.tConfig.shared&&this.tooltipUtil.isXoverlap(i)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,i,r.ttItems):this.create(t,this,e,i,r.ttItems,!1);else if(this.tooltipUtil.isXoverlap(i)){var o=n.globals.series.findIndex((function(t,e){return!n.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,o,i,r.ttItems)}}else this.handleMouseOut(r)}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Pc(this.ctx),r=t.globals.dom.Paper.find(".apexcharts-bar-area"),i=0;i5&&void 0!==arguments[5]?arguments[5]:null,S=this.w,k=e;"mouseup"===t.type&&this.markerClick(t,r,i),null===w&&(w=this.tConfig.shared);var A=this.tooltipUtil.hasMarkers(r),O=this.tooltipUtil.getElBars();if(S.config.legend.tooltipHoverFormatter){var P=S.config.legend.tooltipHoverFormatter,C=Array.from(this.legendLabels);C.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var j=0;j0?k.marker.enlargePoints(i):k.tooltipPosition.moveDynamicPointsOnHover(i);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(O),this.barSeriesHeight>0)){var _=new Pc(this.ctx),R=S.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(i,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(i,r);for(var z=0;z0&&i.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=c*S)),w&&(f=f+h.height/2-y/2-2);var A=i.globals.series[n][o]<0,O=s;switch(this.barCtx.isReversed&&(O=s+(A?u:-u)),g.position){case"center":d=w?A?O-u/2+m:O+u/2-m:A?O-u/2+h.height/2+m:O+u/2+h.height/2-m;break;case"bottom":d=w?A?O-u+m:O+u-m:A?O-u+h.height+y+m:O+u-h.height/2+y-m;break;case"top":d=w?A?O+m:O-m:A?O-h.height/2-m:O+h.height+m}if(this.barCtx.lastActiveBarSerieIndex===a&&b.enabled){var P=new Pc(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:o}),p.fontSize);e=A?O-P.height/2-m-b.offsetY+18:O+P.height+m+b.offsetY-18;var C=k;r=x+(i.globals.isXNumeric?-c*i.globals.barGroups.length/2:i.globals.barGroups.length*c/2-(i.globals.barGroups.length-1)*c-C)+b.offsetX}return i.config.chart.stacked||(d<0?d=0+y:d+h.height/3>i.globals.gridHeight&&(d=i.globals.gridHeight-y)),{bcx:l,bcy:s,dataLabelsX:f,dataLabelsY:d,totalDataLabelsX:r,totalDataLabelsY:e,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,r=t.x,i=t.i,n=t.j,o=t.realIndex,a=t.bcy,s=t.barHeight,l=t.barWidth,c=t.textRects,u=t.dataLabelsX,h=t.strokeWidth,f=t.dataLabelsConfig,d=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,g=t.offX,b=t.offY,y=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var v,m,x=a-(this.barCtx.isRangeBar?0:y)+s/2+c.height/2+b-3,w="start",S=e.globals.series[i][n]<0,k=r;switch(this.barCtx.isReversed&&(k=r+(S?-l:l),w=S?"start":"end"),d.position){case"center":u=S?k+l/2-g:Math.max(c.width/2,k-l/2)+g;break;case"bottom":u=S?k+l-h-g:k-l+h+g;break;case"top":u=S?k-h-g:k-h+g}if(this.barCtx.lastActiveBarSerieIndex===o&&p.enabled){var A=new Pc(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:n}),f.fontSize);S?(v=k-h-g-p.offsetX,w="end"):v=k+g+p.offsetX+(this.barCtx.isReversed?-(l+h):h),m=x-c.height/2+A.height/2+p.offsetY+h}return e.config.chart.stacked||("start"===f.textAnchor?u-c.width<0?u=S?c.width+h:h:u+c.width>e.globals.gridWidth&&(u=S?e.globals.gridWidth-h:e.globals.gridWidth-c.width-h):"middle"===f.textAnchor?u-c.width/2<0?u=c.width/2+h:u+c.width/2>e.globals.gridWidth&&(u=e.globals.gridWidth-c.width/2-h):"end"===f.textAnchor&&(u<1?u=c.width+h:u+1>e.globals.gridWidth&&(u=e.globals.gridWidth-c.width-h))),{bcx:r,bcy:a,dataLabelsX:u,dataLabelsY:x,totalDataLabelsX:v,totalDataLabelsY:m,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,r=t.y,i=t.val,n=t.i,o=t.j,a=t.textRects,s=t.barHeight,l=t.barWidth,c=t.dataLabelsConfig,u=this.w,h="rotate(0)";"vertical"===u.config.plotOptions.bar.dataLabels.orientation&&(h="rotate(-90, ".concat(e,", ").concat(r,")"));var f=new lh(this.barCtx.ctx),d=new Pc(this.barCtx.ctx),p=c.formatter,g=null,b=u.globals.collapsedSeriesIndices.indexOf(n)>-1;if(c.enabled&&!b){g=d.group({class:"apexcharts-data-labels",transform:h});var y="";void 0!==i&&(y=p(i,Sp(Sp({},u),{},{seriesIndex:n,dataPointIndex:o,w:u}))),!i&&u.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(y="");var v=u.globals.series[n][o]<0,m=u.config.plotOptions.bar.dataLabels.position;"vertical"===u.config.plotOptions.bar.dataLabels.orientation&&("top"===m&&(c.textAnchor=v?"end":"start"),"center"===m&&(c.textAnchor="middle"),"bottom"===m&&(c.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&lMath.abs(l)&&(y=""):a.height/1.6>Math.abs(s)&&(y=""));var x=Sp({},c);this.barCtx.isHorizontal&&i<0&&("start"===c.textAnchor?x.textAnchor="end":"end"===c.textAnchor&&(x.textAnchor="start")),f.plotDataLabelsText({x:e,y:r,text:y,i:n,j:o,parent:g,dataLabelsConfig:x,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return g}},{key:"drawTotalDataLabels",value:function(t){var e,r=t.x,i=t.y,n=t.val,o=t.realIndex,a=t.textAnchor,s=t.barTotalDataLabelsConfig,l=(this.w,new Pc(this.barCtx.ctx));return s.enabled&&void 0!==r&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===o&&(e=l.drawText({x:r,y:i,foreColor:s.style.color,text:n,textAnchor:a,fontFamily:s.style.fontFamily,fontSize:s.style.fontSize,fontWeight:s.style.fontWeight})),e}}],r&&Ap(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Cp(t){return Cp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cp(t)}function jp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Tp(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Lp(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[r].length),e.globals.isXNumeric)for(var i=0;ie.globals.minX&&e.globals.seriesX[r][i]0&&(i=l.globals.minXDiff/h),(o=i/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(o=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(o=parseInt(this.barCtx.barOptions.columnWidth,10)),a=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+(i-o*this.barCtx.seriesLen)/2}return l.globals.barHeight=n,l.globals.barWidth=o,{x:t,y:e,yDivision:r,xDivision:i,barHeight:n,barWidth:o,zeroH:a,zeroW:s}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,r,i){var n,o,a,s,l=this.w,c=this.barCtx.ctx.fill,u=null,h=this.barCtx.barOptions.distributed?r:e;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(i){t[e][r]>=i.from&&t[e][r]<=i.to&&(u=i.color)})),c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?h:i,dataPointIndex:r,color:u,value:t[e][r],fillConfig:null===(n=l.config.series[e].data[r])||void 0===n?void 0:n.fill,fillType:null!==(o=l.config.series[e].data[r])&&void 0!==o&&null!==(a=o.fill)&&void 0!==a&&a.type?null===(s=l.config.series[e].data[r])||void 0===s?void 0:s.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[i]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,r){var i=0,n=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,n.config.stroke.show&&(this.barCtx.isNullValue||(i=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[r]:this.barCtx.strokeWidth)),i}},{key:"createBorderRadiusArr",value:function(t){var e,r=this.w,i=!this.w.config.chart.stacked||r.config.plotOptions.bar.borderRadius<=0,n=t.length,o=0|(null===(e=t[0])||void 0===e?void 0:e.length),a=Array.from({length:n},(function(){return Array(o).fill(i?"top":"none")}));if(i)return a;for(var s=0;s0?(l.push(h),u++):f<0&&(c.push(h),u++)}if(l.length>0&&0===c.length)if(1===l.length)a[l[0]][s]="both";else{var d,p=l[0],g=l[l.length-1],b=Mp(l);try{for(b.s();!(d=b.n()).done;){var y=d.value;a[y][s]=y===p?"bottom":y===g?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===l.length)if(1===c.length)a[c[0]][s]="both";else{var v,m=Math.max.apply(Math,c),x=Math.min.apply(Math,c),w=Mp(c);try{for(w.s();!(v=w.n()).done;){var S=v.value;a[S][s]=S===m?"bottom":S===x?"top":"none"}}catch(t){w.e(t)}finally{w.f()}}else if(l.length>0&&c.length>0){var k,A=l[l.length-1],O=Mp(l);try{for(O.s();!(k=O.n()).done;){var P=k.value;a[P][s]=P===A?"top":"none"}}catch(t){O.e(t)}finally{O.f()}var C,j=Math.max.apply(Math,c),T=Mp(c);try{for(T.s();!(C=T.n()).done;){var E=C.value;a[E][s]=E===j?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else 1===u&&(a[l[0]||c[0]][s]="both")}return a}},{key:"barBackground",value:function(t){var e=t.j,r=t.i,i=t.x1,n=t.x2,o=t.y1,a=t.y2,s=t.elSeries,l=this.w,c=new Pc(this.barCtx.ctx),u=new fh(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&u===r){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var h=this.barCtx.barOptions.colors.backgroundBarColors[e],f=c.drawRect(void 0!==i?i:0,void 0!==o?o:0,void 0!==n?n:l.globals.gridWidth,void 0!==a?a:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,h,this.barCtx.barOptions.colors.backgroundBarOpacity);s.add(f),f.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,r=t.barWidth,i=t.barXPosition,n=t.y1,o=t.y2,a=t.strokeWidth,s=t.isReversed,l=t.series,c=t.seriesGroup,u=t.realIndex,h=t.i,f=t.j,d=t.w,p=new Pc(this.barCtx.ctx);(a=Array.isArray(a)?a[u]:a)||(a=0);var g=r,b=i;null!==(e=d.config.series[u].data[f])&&void 0!==e&&e.columnWidthOffset&&(b=i-d.config.series[u].data[f].columnWidthOffset/2,g=r+d.config.series[u].data[f].columnWidthOffset);var y=a/2,v=b+y,m=b+g-y,x=(l[h][f]>=0?1:-1)*(s?-1:1);n+=.001-y*x,o+=.001+y*x;var w=p.move(v,n),S=p.move(v,n),k=p.line(m,n);if(d.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(u,f,!1)),w=w+p.line(v,o)+p.line(m,o)+k+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),S=S+p.line(v,n)+k+k+k+k+k+p.line(v,n)+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),"none"!==this.arrBorderRadius[u][f]&&(w=p.roundPathCorners(w,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[c]).yArrj.push(o-y*x),A.yArrjF.push(Math.abs(n-o+a*x)),A.yArrjVal.push(this.barCtx.series[h][f])}return{pathTo:w,pathFrom:S}}},{key:"getBarpaths",value:function(t){var e,r=t.barYPosition,i=t.barHeight,n=t.x1,o=t.x2,a=t.strokeWidth,s=t.isReversed,l=t.series,c=t.seriesGroup,u=t.realIndex,h=t.i,f=t.j,d=t.w,p=new Pc(this.barCtx.ctx);(a=Array.isArray(a)?a[u]:a)||(a=0);var g=r,b=i;null!==(e=d.config.series[u].data[f])&&void 0!==e&&e.barHeightOffset&&(g=r-d.config.series[u].data[f].barHeightOffset/2,b=i+d.config.series[u].data[f].barHeightOffset);var y=a/2,v=g+y,m=g+b-y,x=(l[h][f]>=0?1:-1)*(s?-1:1);n+=.001+y*x,o+=.001-y*x;var w=p.move(n,v),S=p.move(n,v);d.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(u,f,!1));var k=p.line(n,m);if(w=w+p.line(o,v)+p.line(o,m)+k+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),S=S+p.line(n,v)+k+k+k+k+k+p.line(n,v)+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),"none"!==this.arrBorderRadius[u][f]&&(w=p.roundPathCorners(w,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[c]).xArrj.push(o+y*x),A.xArrjF.push(Math.abs(n-o-a*x)),A.xArrjVal.push(this.barCtx.series[h][f])}return{pathTo:w,pathFrom:S}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,r=this.w,i=0;i2&&void 0!==arguments[2]&&!arguments[2]?null:e;return null!=t&&(r=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),r}},{key:"getYForValue",value:function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?null:e;return null!=t&&(i=e-t/this.barCtx.yRatio[r]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[r]:0)),i}},{key:"getGoalValues",value:function(t,e,r,i,n,o){var a=this,s=this.w,l=[],c=function(i,n){var s;l.push((Ep(s={},t,"x"===t?a.getXForValue(i,e,!1):a.getYForValue(i,r,o,!1)),Ep(s,"attrs",n),s))};if(s.globals.seriesGoals[i]&&s.globals.seriesGoals[i][n]&&Array.isArray(s.globals.seriesGoals[i][n])&&s.globals.seriesGoals[i][n].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&s.globals.seriesRange.length){var u=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:s.globals.colors,h={strokeHeight:"x"===t?0:s.globals.markers.size[i],strokeWidth:"x"===t?s.globals.markers.size[i]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(u[i])?u[i][0]:u[i]};c(s.globals.seriesRangeStart[i][n],h),c(s.globals.seriesRangeEnd[i][n],Tp(Tp({},h),{},{strokeColor:Array.isArray(u[i])?u[i][1]:u[i]}))}return l}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,r=t.barYPosition,i=t.goalX,n=t.goalY,o=t.barWidth,a=t.barHeight,s=new Pc(this.barCtx.ctx),l=s.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var c=null;return this.barCtx.isHorizontal?Array.isArray(i)&&i.forEach((function(t){if(t.x>=-1&&t.x<=s.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:a/2,i=r+e+a/2;c=s.drawLine(t.x,i-2*e,t.x,i,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(c)}})):Array.isArray(n)&&n.forEach((function(t){if(t.y>=-1&&t.y<=s.w.globals.gridHeight+1){var r=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:o/2,i=e+r+o/2;c=s.drawLine(i-2*r,t.y,i,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(c)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,r=t.currPaths,i=t.color,n=this.w,o=e.x,a=e.x1,s=e.barYPosition,l=r.x,c=r.x1,u=r.barYPosition,h=s+r.barHeight,d=new Pc(this.barCtx.ctx),p=new f,g=d.move(a,h)+d.line(o,h)+d.line(l,u)+d.line(c,u)+d.line(a,h)+("around"===n.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return d.drawPath({d:g,fill:p.shadeColor(.5,f.rgb2hex(i)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,r=t.i,i=t.j,n=this.w,o=0,a=0;return(n.config.plotOptions.bar.horizontal?n.globals.series.map((function(t,e){return e})):(null===(e=n.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=n.globals.seriesPercent[t][i];e&&o++,t-1})),i=this.barCtx.columnGroupIndices,n=i.indexOf(r);return n<0&&(i.push(r),n=i.length-1),{groupIndex:r,columnGroupIndex:n}}}],r&&Ip(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zp(t){return zp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zp(t)}function Xp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Dp(t){for(var e=1;ethis.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var a=0,s=0;a0&&(this.visibleI=this.visibleI+1);var x=0,w=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[y],this.translationsIndex=y);var S=this.translationsIndex;this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed;var k=this.barHelpers.initialPositions();p=k.y,x=k.barHeight,c=k.yDivision,h=k.zeroW,d=k.x,w=k.barWidth,l=k.xDivision,u=k.zeroH,this.isHorizontal||b.push(d+w/2);var A=i.group({class:"apexcharts-datalabels","data:realIndex":y});r.globals.delayedElements.push({el:A.node}),A.node.classList.add("apexcharts-element-hidden");var O=i.group({class:"apexcharts-bar-goals-markers"}),P=i.group({class:"apexcharts-bar-shadows"});r.globals.delayedElements.push({el:P.node}),P.node.classList.add("apexcharts-element-hidden");for(var C=0;C0){var L=this.barHelpers.drawBarShadow({color:"string"==typeof M&&-1===(null==M?void 0:M.indexOf("url"))?M:f.hexToRgba(r.globals.colors[a]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});P.add(L),r.config.chart.dropShadow.enabled&&new vc(this.ctx).dropShadow(L,r.config.chart.dropShadow,y)}this.pathArr.push(T);var I=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:x,barWidth:w});I&&O.add(I),p=T.y,d=T.x,C>0&&b.push(d+w/2),g.push(p),this.renderSeries({realIndex:y,pathFill:M,j:C,i:a,columnGroupIndex:v,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:j,elSeries:m,x:d,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:x),barWidth:Math.abs(T.barWidth?T.barWidth:w),elDataLabelsWrap:A,elGoalsMarkers:O,elBarShadows:P,visibleSeries:this.visibleI,type:"bar"})}r.globals.seriesXvalues[y]=b,r.globals.seriesYvalues[y]=g,o.add(m)}return o}},{key:"renderSeries",value:function(t){var e=t.realIndex,r=t.pathFill,i=t.lineFill,n=t.j,o=t.i,a=t.columnGroupIndex,s=t.pathFrom,l=t.pathTo,c=t.strokeWidth,u=t.elSeries,h=t.x,f=t.y,d=t.y1,p=t.y2,g=t.series,b=t.barHeight,y=t.barWidth,v=t.barXPosition,m=t.barYPosition,x=t.elDataLabelsWrap,w=t.elGoalsMarkers,S=t.elBarShadows,k=t.visibleSeries,A=t.type,O=t.classes,P=this.w,C=new Pc(this.ctx);if(!i){var j="function"==typeof P.globals.stroke.colors[e]?function(t){var e,r=P.config.stroke.colors;return Array.isArray(r)&&r.length>0&&((e=r[t])||(e=""),"function"==typeof e)?e({value:P.globals.series[t][n],dataPointIndex:n,w:P}):e}(e):P.globals.stroke.colors[e];i=this.barOptions.distributed?P.globals.stroke.colors[n]:j}P.config.series[o].data[n]&&P.config.series[o].data[n].strokeColor&&(i=P.config.series[o].data[n].strokeColor),this.isNullValue&&(r="none");var T=n/P.config.chart.animations.animateGradually.delay*(P.config.chart.animations.speed/P.globals.dataPoints)/2.4,E=C.renderPaths({i:o,j:n,realIndex:e,pathFrom:s,pathTo:l,stroke:i,strokeWidth:c,strokeLineCap:P.config.stroke.lineCap,fill:r,animationDelay:T,initialSpeed:P.config.chart.animations.speed,dataChangeSpeed:P.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(A,"-area ").concat(O),chartType:A});E.attr("clip-path","url(#gridRectBarMask".concat(P.globals.cuid,")"));var M=P.config.forecastDataPoints;M.count>0&&n>=P.globals.dataPoints-M.count&&(E.node.setAttribute("stroke-dasharray",M.dashArray),E.node.setAttribute("stroke-width",M.strokeWidth),E.node.setAttribute("fill-opacity",M.fillOpacity)),void 0!==d&&void 0!==p&&(E.attr("data-range-y1",d),E.attr("data-range-y2",p)),new vc(this.ctx).setSelectionFilter(E,e,n),u.add(E);var L=new Pp(this).handleBarDataLabels({x:h,y:f,y1:d,y2:p,i:o,j:n,series:g,realIndex:e,columnGroupIndex:a,barHeight:b,barWidth:y,barXPosition:v,barYPosition:m,renderedPath:E,visibleSeries:k});return null!==L.dataLabels&&x.add(L.dataLabels),L.totalDataLabels&&x.add(L.totalDataLabels),u.add(x),w&&u.add(w),S&&u.add(S),u}},{key:"drawBarPaths",value:function(t){var e,r=t.indexes,i=t.barHeight,n=t.strokeWidth,o=t.zeroW,a=t.x,s=t.y,l=t.yDivision,c=t.elSeries,u=this.w,h=r.i,f=r.j;if(u.globals.isXNumeric)e=(s=(u.globals.seriesX[h][f]-u.globals.minX)/this.invertedXRatio-i)+i*this.visibleI;else if(u.config.plotOptions.bar.hideZeroBarsWhenGrouped){var d=0,p=0;u.globals.seriesPercent.forEach((function(t,e){t[f]&&d++,e0&&(i=this.seriesLen*i/d),e=s+i*this.visibleI,e-=i*p}else e=s+i*this.visibleI;this.isFunnel&&(o-=(this.barHelpers.getXForValue(this.series[h][f],o)-o)/2),a=this.barHelpers.getXForValue(this.series[h][f],o);var g=this.barHelpers.getBarpaths({barYPosition:e,barHeight:i,x1:o,x2:a,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:r.realIndex,i:h,j:f,w:u});return u.globals.isXNumeric||(s+=l),this.barHelpers.barBackground({j:f,i:h,y1:e-i*this.visibleI,y2:i*this.seriesLen,elSeries:c}),{pathTo:g.pathTo,pathFrom:g.pathFrom,x1:o,x:a,y:s,goalX:this.barHelpers.getGoalValues("x",o,null,h,f),barYPosition:e,barHeight:i}}},{key:"drawColumnPaths",value:function(t){var e,r=t.indexes,i=t.x,n=t.y,o=t.xDivision,a=t.barWidth,s=t.zeroH,l=t.strokeWidth,c=t.elSeries,u=this.w,h=r.realIndex,f=r.translationsIndex,d=r.i,p=r.j,g=r.bc;if(u.globals.isXNumeric){var b=this.getBarXForNumericXAxis({x:i,j:p,realIndex:h,barWidth:a});i=b.x,e=b.barXPosition}else if(u.config.plotOptions.bar.hideZeroBarsWhenGrouped){var y=this.barHelpers.getZeroValueEncounters({i:d,j:p}),v=y.nonZeroColumns,m=y.zeroEncounters;v>0&&(a=this.seriesLen*a/v),e=i+a*this.visibleI,e-=a*m}else e=i+a*this.visibleI;n=this.barHelpers.getYForValue(this.series[d][p],s,f);var x=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:a,y1:s,y2:n,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:h,i:d,j:p,w:u});return u.globals.isXNumeric||(i+=o),this.barHelpers.barBackground({bc:g,j:p,i:d,x1:e-l/2-a*this.visibleI,x2:a*this.seriesLen+l/2,elSeries:c}),{pathTo:x.pathTo,pathFrom:x.pathFrom,x:i,y:n,goalY:this.barHelpers.getGoalValues("y",null,s,d,p,f),barXPosition:e,barWidth:a}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,r=t.barWidth,i=t.realIndex,n=t.j,o=this.w,a=i;return o.globals.seriesX[i].length||(a=o.globals.maxValsInArrayIndex),f.isNumber(o.globals.seriesX[a][n])&&(e=(o.globals.seriesX[a][n]-o.globals.minX)/this.xRatio-r*this.seriesLen/2),{barXPosition:e+r*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var r,i=this.w,n=0;n0&&parseInt(o.realIndex,10)===parseInt(t,10)&&void 0!==i.globals.previousPaths[n].paths[e]&&(r=i.globals.previousPaths[n].paths[e].d)}return r}}],r&&Hp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Np=Bp;function Wp(t){return Wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wp(t)}function Gp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Vp(t){for(var e=1;e1&&(r.yaxisIndex=i.globals.seriesYAxisReverseMap[p][0],x=p),r.isReversed=i.config.yaxis[r.yaxisIndex]&&i.config.yaxis[r.yaxisIndex].reversed;var w=r.graphics.group({class:"apexcharts-series",seriesName:f.escapeString(i.globals.seriesNames[p]),rel:n+1,"data:realIndex":p});r.ctx.series.addCollapsedClassToSeries(w,p);var S=r.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),k=r.graphics.group({class:"apexcharts-bar-goals-markers"}),A=0,O=0,P=r.initialPositions(a,s,c,u,h,d,x);s=P.y,A=P.barHeight,u=P.yDivision,d=P.zeroW,a=P.x,O=P.barWidth,c=P.xDivision,h=P.zeroH,i.globals.barHeight=A,i.globals.barWidth=O,r.barHelpers.initializeStackedXYVars(r),1===r.groupCtx.prevY.length&&r.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(r.groupCtx.prevY[0]=r.groupCtx.prevY[0].map((function(){return h})),r.groupCtx.prevYF[0]=r.groupCtx.prevYF[0].map((function(){return 0})));for(var C=0;C0||"top"===r.barHelpers.arrBorderRadius[p][C]&&i.globals.series[p][C]<0)&&(I=_),w=r.renderSeries({realIndex:p,pathFill:L,j:C,i:n,columnGroupIndex:y,pathFrom:E.pathFrom,pathTo:E.pathTo,strokeWidth:j,elSeries:w,x:a,y:s,series:t,barHeight:A,barWidth:O,elDataLabelsWrap:S,elGoalsMarkers:k,type:"bar",visibleSeries:y,classes:I})}i.globals.seriesXvalues[p]=v,i.globals.seriesYvalues[p]=m,r.groupCtx.prevY.push(r.groupCtx.yArrj),r.groupCtx.prevYF.push(r.groupCtx.yArrjF),r.groupCtx.prevYVal.push(r.groupCtx.yArrjVal),r.groupCtx.prevX.push(r.groupCtx.xArrj),r.groupCtx.prevXF.push(r.groupCtx.xArrjF),r.groupCtx.prevXVal.push(r.groupCtx.xArrjVal),o.add(w)},c=0,u=0;c1?l=(r=c.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(h).indexOf("%")?l=parseInt(h,10):l*=parseInt(h,10)/100,n=this.isReversed?this.baseLineY[a]:c.globals.gridHeight-this.baseLineY[a],t=c.globals.padHorizontal+(r-l)/2}var f=c.globals.barGroups.length||1;return{x:t,y:e,yDivision:i,xDivision:r,barHeight:s/f,barWidth:l/f,zeroH:n,zeroW:o}}},{key:"drawStackedBarPaths",value:function(t){for(var e,r=t.indexes,i=t.barHeight,n=t.strokeWidth,o=t.zeroW,a=t.x,s=t.y,l=t.columnGroupIndex,c=t.seriesGroup,u=t.yDivision,h=t.elSeries,f=this.w,d=s+l*i,p=r.i,g=r.j,b=r.realIndex,y=r.translationsIndex,v=0,m=0;m0){var w=o;this.groupCtx.prevXVal[x-1][g]<0?w=this.series[p][g]>=0?this.groupCtx.prevX[x-1][g]+v-2*(this.isReversed?v:0):this.groupCtx.prevX[x-1][g]:this.groupCtx.prevXVal[x-1][g]>=0&&(w=this.series[p][g]>=0?this.groupCtx.prevX[x-1][g]:this.groupCtx.prevX[x-1][g]-v+2*(this.isReversed?v:0)),e=w}else e=o;a=null===this.series[p][g]?e:e+this.series[p][g]/this.invertedYRatio-2*(this.isReversed?this.series[p][g]/this.invertedYRatio:0);var S=this.barHelpers.getBarpaths({barYPosition:d,barHeight:i,x1:e,x2:a,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:r.realIndex,seriesGroup:c,i:p,j:g,w:f});return this.barHelpers.barBackground({j:g,i:p,y1:d,y2:i,elSeries:h}),s+=u,{pathTo:S.pathTo,pathFrom:S.pathFrom,goalX:this.barHelpers.getGoalValues("x",o,null,p,g,y),barXPosition:e,barYPosition:d,x:a,y:s}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,r=t.x,i=t.y,n=t.xDivision,o=t.barWidth,a=t.zeroH,s=t.columnGroupIndex,l=t.seriesGroup,c=t.elSeries,u=this.w,h=e.i,f=e.j,d=e.bc,p=e.realIndex,g=e.translationsIndex;if(u.globals.isXNumeric){var b=u.globals.seriesX[p][f];b||(b=0),r=(b-u.globals.minX)/this.xRatio-o/2*u.globals.barGroups.length}for(var y,v=r+s*o,m=0,x=0;x0&&!u.globals.isXNumeric||w>0&&u.globals.isXNumeric&&u.globals.seriesX[p-1][f]===u.globals.seriesX[p][f]){var S,k,A,O=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var P=1;P=0?A-m+2*(this.isReversed?m:0):A;break}if((null===(E=this.groupCtx.prevYVal[w-j])||void 0===E?void 0:E[f])>=0){k=this.series[h][f]>=0?A:A+m-2*(this.isReversed?m:0);break}}void 0===k&&(k=u.globals.gridHeight),y=null!==(S=this.groupCtx.prevYF[0])&&void 0!==S&&S.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?a:k}else y=a;i=this.series[h][f]?y-this.series[h][f]/this.yRatio[g]+2*(this.isReversed?this.series[h][f]/this.yRatio[g]:0):y;var M=this.barHelpers.getColumnPaths({barXPosition:v,barWidth:o,y1:y,y2:i,yRatio:this.yRatio[g],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:h,j:f,w:u});return this.barHelpers.barBackground({bc:d,j:f,i:h,x1:v,x2:o,elSeries:c}),{pathTo:M.pathTo,pathFrom:M.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,a,h,f),barXPosition:v,x:u.globals.isXNumeric?r:r+n,y:i}}}],r&&qp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const eg=tg;function rg(t){return rg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rg(t)}function ig(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function ng(t){for(var e=1;e0&&(i.visibleI=i.visibleI+1);var x,w,S=0;i.yRatio.length>1&&(i.yaxisIndex=n.globals.seriesYAxisReverseMap[y][0],S=y);var k=i.barHelpers.initialPositions();p=k.y,x=k.barHeight,l=k.yDivision,h=k.zeroW,d=k.x,w=k.barWidth,a=k.xDivision,u=k.zeroH,b.push(d+w/2);for(var A=o.group({class:"apexcharts-datalabels","data:realIndex":y}),O=o.group({class:"apexcharts-bar-goals-markers"}),P=function(r){var o=i.barHelpers.getStrokeWidth(e,r,y),c=null,f={indexes:{i:e,j:r,realIndex:y,translationsIndex:S},x:d,y:p,strokeWidth:o,elSeries:m};c=i.isHorizontal?i.drawHorizontalBoxPaths(ng(ng({},f),{},{yDivision:l,barHeight:x,zeroW:h})):i.drawVerticalBoxPaths(ng(ng({},f),{},{xDivision:a,barWidth:w,zeroH:u})),p=c.y,d=c.x;var k=i.barHelpers.drawGoalLine({barXPosition:c.barXPosition,barYPosition:c.barYPosition,goalX:c.goalX,goalY:c.goalY,barHeight:x,barWidth:w});k&&O.add(k),r>0&&b.push(d+w/2),g.push(p),c.pathTo.forEach((function(a,l){var u=!i.isBoxPlot&&i.candlestickOptions.wick.useFillColor?c.color[l]:n.globals.stroke.colors[e],h=s.fillPath({seriesNumber:y,dataPointIndex:r,color:c.color[l],value:t[e][r]});i.renderSeries({realIndex:y,pathFill:h,lineFill:u,j:r,i:e,pathFrom:c.pathFrom,pathTo:a,strokeWidth:o,elSeries:m,x:d,y:p,series:t,columnGroupIndex:v,barHeight:x,barWidth:w,elDataLabelsWrap:A,elGoalsMarkers:O,visibleSeries:i.visibleI,type:n.config.chart.type})}))},C=0;Cy.c&&(h=!1);var x=Math.min(y.o,y.c),w=Math.max(y.o,y.c),S=y.m;s.globals.isXNumeric&&(r=(s.globals.seriesX[b][u]-s.globals.minX)/this.xRatio-n/2);var k=r+n*this.visibleI;void 0===this.series[c][u]||null===this.series[c][u]?(x=o,w=o):(x=o-x/g,w=o-w/g,v=o-y.h/g,m=o-y.l/g,S=o-y.m/g);var A=l.move(k,o),O=l.move(k+n/2,x);return s.globals.previousPaths.length>0&&(O=this.getPreviousPath(b,u,!0)),A=this.isBoxPlot?[l.move(k,x)+l.line(k+n/2,x)+l.line(k+n/2,v)+l.line(k+n/4,v)+l.line(k+n-n/4,v)+l.line(k+n/2,v)+l.line(k+n/2,x)+l.line(k+n,x)+l.line(k+n,S)+l.line(k,S)+l.line(k,x+a/2),l.move(k,S)+l.line(k+n,S)+l.line(k+n,w)+l.line(k+n/2,w)+l.line(k+n/2,m)+l.line(k+n-n/4,m)+l.line(k+n/4,m)+l.line(k+n/2,m)+l.line(k+n/2,w)+l.line(k,w)+l.line(k,S)+"z"]:[l.move(k,w)+l.line(k+n/2,w)+l.line(k+n/2,v)+l.line(k+n/2,w)+l.line(k+n,w)+l.line(k+n,x)+l.line(k+n/2,x)+l.line(k+n/2,m)+l.line(k+n/2,x)+l.line(k,x)+l.line(k,w-a/2)],O+=l.move(k,x),s.globals.isXNumeric||(r+=i),{pathTo:A,pathFrom:O,x:r,y:w,goalY:this.barHelpers.getGoalValues("y",null,o,c,u,e.translationsIndex),barXPosition:k,color:this.isBoxPlot?p:h?[f]:[d]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes,r=(t.x,t.y),i=t.yDivision,n=t.barHeight,o=t.zeroW,a=t.strokeWidth,s=this.w,l=new Pc(this.ctx),c=e.i,u=e.j,h=this.boxOptions.colors.lower;this.isBoxPlot&&(h=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var f=this.invertedYRatio,d=e.realIndex,p=this.getOHLCValue(d,u),g=o,b=o,y=Math.min(p.o,p.c),v=Math.max(p.o,p.c),m=p.m;s.globals.isXNumeric&&(r=(s.globals.seriesX[d][u]-s.globals.minX)/this.invertedXRatio-n/2);var x=r+n*this.visibleI;void 0===this.series[c][u]||null===this.series[c][u]?(y=o,v=o):(y=o+y/f,v=o+v/f,g=o+p.h/f,b=o+p.l/f,m=o+p.m/f);var w=l.move(o,x),S=l.move(y,x+n/2);return s.globals.previousPaths.length>0&&(S=this.getPreviousPath(d,u,!0)),w=[l.move(y,x)+l.line(y,x+n/2)+l.line(g,x+n/2)+l.line(g,x+n/2-n/4)+l.line(g,x+n/2+n/4)+l.line(g,x+n/2)+l.line(y,x+n/2)+l.line(y,x+n)+l.line(m,x+n)+l.line(m,x)+l.line(y+a/2,x),l.move(m,x)+l.line(m,x+n)+l.line(v,x+n)+l.line(v,x+n/2)+l.line(b,x+n/2)+l.line(b,x+n-n/4)+l.line(b,x+n/4)+l.line(b,x+n/2)+l.line(v,x+n/2)+l.line(v,x)+l.line(m,x)+"z"],S+=l.move(y,x),s.globals.isXNumeric||(r+=i),{pathTo:w,pathFrom:S,x:v,y:r,goalX:this.barHelpers.getGoalValues("x",o,null,c,u),barYPosition:x,color:h}}},{key:"getOHLCValue",value:function(t,e){var r=this.w;return{o:this.isBoxPlot?r.globals.seriesCandleH[t][e]:r.globals.seriesCandleO[t][e],h:this.isBoxPlot?r.globals.seriesCandleO[t][e]:r.globals.seriesCandleH[t][e],m:r.globals.seriesCandleM[t][e],l:this.isBoxPlot?r.globals.seriesCandleC[t][e]:r.globals.seriesCandleL[t][e],c:this.isBoxPlot?r.globals.seriesCandleL[t][e]:r.globals.seriesCandleC[t][e]}}}],r&&ag(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const dg=fg;function pg(t){return pg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pg(t)}function gg(t){return function(t){if(Array.isArray(t))return bg(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return bg(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bg(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bg(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&r.colorScale.ranges.map((function(t,r){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,r,i){var n=this.w,o=1,a=n.config.plotOptions[t].shadeIntensity,s=this.determineColor(t,e,r);n.globals.hasNegs||i?o=n.config.plotOptions[t].reverseNegativeShade?s.percent<0?s.percent/100*(1.25*a):(1-s.percent/100)*(1.25*a):s.percent<=0?1-(1+s.percent/100)*a:(1-s.percent/100)*a:(o=1-s.percent/100,"treemap"===t&&(o=(1-s.percent/100)*(1.25*a)));var l=s.color,c=new f;if(n.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var u=c.shadeColor(-1*o,s.color);l=f.hexToRgba(f.isColorHex(u)?u:f.rgb2hex(u),n.config.fill.opacity)}else{var h=c.shadeColor(o,s.color);l=f.hexToRgba(f.isColorHex(h)?h:f.rgb2hex(h),n.config.fill.opacity)}return{color:l,colorProps:s}}},{key:"determineColor",value:function(t,e,r){var i=this.w,n=i.globals.series[e][r],o=i.config.plotOptions[t],a=o.colorScale.inverse?r:e;o.distributed&&"treemap"===i.config.chart.type&&(a=r);var s=i.globals.colors[a],l=null,c=Math.min.apply(Math,gg(i.globals.series[e])),u=Math.max.apply(Math,gg(i.globals.series[e]));o.distributed||"heatmap"!==t||(c=i.globals.minY,u=i.globals.maxY),void 0!==o.colorScale.min&&(c=o.colorScale.mini.globals.maxY?o.colorScale.max:i.globals.maxY);var h=Math.abs(u)+Math.abs(c),f=100*n/(0===h?h-1e-6:h);return o.colorScale.ranges.length>0&&o.colorScale.ranges.map((function(t,e){if(n>=t.from&&n<=t.to){s=t.color,l=t.foreColor?t.foreColor:null,c=t.from,u=t.to;var r=Math.abs(u)+Math.abs(c);f=100*n/(0===r?r-1e-6:r)}})),{color:s,foreColor:l,percent:f}}},{key:"calculateDataLabels",value:function(t){var e=t.text,r=t.x,i=t.y,n=t.i,o=t.j,a=t.colorProps,s=t.fontSize,l=this.w.config.dataLabels,c=new Pc(this.ctx),u=new lh(this.ctx),h=null;if(l.enabled){h=c.group({class:"apexcharts-data-labels"});var f=l.offsetX,d=l.offsetY,p=r+f,g=i+parseFloat(l.style.fontSize)/3+d;u.plotDataLabelsText({x:p,y:g,text:e,i:n,j:o,color:a.foreColor,parent:h,fontSize:s,dataLabelsConfig:l})}return h}},{key:"addListeners",value:function(t){var e=new Pc(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}],r&&yg(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function xg(t){return xg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xg(t)}function wg(t,e){for(var r=0;r=0;s?c++:c--){var u=r.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:f.escapeString(e.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(u,c),e.config.chart.dropShadow.enabled){var h=e.config.chart.dropShadow;new vc(this.ctx).dropShadow(u,h,c)}for(var d=0,p=e.config.plotOptions.heatmap.shadeIntensity,g=0;g-1&&this.pieClicked(h),r.config.dataLabels.enabled){var w=m.x,S=m.y,k=100*p/this.fullAngle+"%";if(0!==p&&r.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(i+a):i+a=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(c=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(c)>this.fullAngle&&(c-=this.fullAngle);var u=Math.PI*(c-90)/180,h=r.centerX+o*Math.cos(l),d=r.centerY+o*Math.sin(l),p=r.centerX+o*Math.cos(u),g=r.centerY+o*Math.sin(u),b=f.polarToCartesian(r.centerX,r.centerY,r.donutSize,c),y=f.polarToCartesian(r.centerX,r.centerY,r.donutSize,s),v=n>180?1:0,m=["M",h,d,"A",o,o,0,v,1,p,g];return e="donut"===r.chartType?[].concat(m,["L",b.x,b.y,"A",r.donutSize,r.donutSize,0,v,0,y.x,y.y,"L",h,d,"z"]).join(" "):"pie"===r.chartType||"polarArea"===r.chartType?[].concat(m,["L",r.centerX,r.centerY,"L",h,d]).join(" "):[].concat(m).join(" "),a.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,r=new Dh(this.ctx),i=new Pc(this.ctx),n=new Cg(this.ctx),o=i.group(),a=i.group(),s=r.niceScale(0,Math.ceil(this.maxY),0),l=s.result.reverse(),c=s.result.length;this.maxY=s.niceMax;for(var u=e.globals.radialSize,h=u/(c-1),f=0;f1&&t.total.show&&(n=t.total.color);var a=o.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),s=o.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");r=(0,t.value.formatter)(r,o),i||"function"!=typeof t.total.formatter||(r=t.total.formatter(o));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,o):"",null!==a&&(a.textContent=e),null!==s&&(s.textContent=r),null!==a&&(a.style.fill=n)}},{key:"printDataLabelsInner",value:function(t,e){var r=this.w,i=t.getAttribute("data:value"),n=r.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];r.globals.series.length>1&&this.printInnerLabels(e,n,i,t);var o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==o&&(o.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,r=this.w,i=new Pc(this.ctx),n=r.config.plotOptions.polarArea.spokes;if(0!==n.strokeWidth){for(var o=[],a=360/r.globals.series.length,s=0;s0&&(g=e.getPreviousPath(a));for(var b=0;b=10?t.x>0?(r="start",i+=10):t.x<0&&(r="end",i-=10):r="middle",Math.abs(t.y)>=e-10&&(t.y<0?n-=10:t.y>0&&(n+=10)),{textAnchor:r,newX:i,newY:n}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,r=null,i=0;i0&&parseInt(n.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[i].paths[0]&&(r=e.globals.previousPaths[i].paths[0].d)}return r}},{key:"getDataPointsPos",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var i=[],n=0;n=360&&(f=360-Math.abs(this.startAngle)-.1);var d=r.drawPath({d:"",stroke:u,strokeWidth:a*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){var p=c.dropShadow;n.dropShadow(d,p)}l.add(d),d.attr("id","apexcharts-radialbarTrack-"+s),this.animatePaths(d,{centerX:t.centerX,centerY:t.centerY,endAngle:f,startAngle:h,size:t.size,i:s,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return i}},{key:"drawArcs",value:function(t){var e=this.w,r=new Pc(this.ctx),i=new Zu(this.ctx),n=new vc(this.ctx),o=r.group(),a=this.getStrokeWidth(t);t.size=t.size-a/2;var s=e.config.plotOptions.radialBar.hollow.background,l=t.size-a*t.series.length-this.margin*t.series.length-a*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,c=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(s=this.drawHollowImage(t,o,l,s));var u=this.drawHollow({size:c,centerX:t.centerX,centerY:t.centerY,fill:s||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var h=e.config.plotOptions.radialBar.hollow.dropShadow;n.dropShadow(u,h)}var d=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(d=0);var p=null;if(this.radialDataLabels.show){var g=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");p=this.renderInnerDataLabels(g,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:d})}"back"===e.config.plotOptions.radialBar.hollow.position&&(o.add(u),p&&o.add(p));var b=!1;e.config.plotOptions.radialBar.inverseOrder&&(b=!0);for(var y=b?t.series.length-1:0;b?y>=0:y100?100:t.series[y])/100,k=Math.round(this.totalAngle*S)+this.startAngle,A=void 0;e.globals.dataChanged&&(w=this.startAngle,A=Math.round(this.totalAngle*f.negToZero(e.globals.previousPaths[y])/100)+w),Math.abs(k)+Math.abs(x)>360&&(k-=.01),Math.abs(A)+Math.abs(w)>360&&(A-=.01);var O=k-x,P=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[y]:e.config.stroke.dashArray,C=r.drawPath({d:"",stroke:m,strokeWidth:a,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+y,strokeDashArray:P});if(Pc.setAttrs(C.node,{"data:angle":O,"data:value":t.series[y]}),e.config.chart.dropShadow.enabled){var j=e.config.chart.dropShadow;n.dropShadow(C,j,y)}if(n.setSelectionFilter(C,0,y),this.addListeners(C,this.radialDataLabels),v.add(C),C.attr({index:0,j:y}),this.barLabels.enabled){var T=f.polarToCartesian(t.centerX,t.centerY,t.size,x),E=this.barLabels.formatter(e.globals.seriesNames[y],{seriesIndex:y,w:e}),M=["apexcharts-radialbar-label"];this.barLabels.onClick||M.push("apexcharts-no-click");var L=this.barLabels.useSeriesColors?e.globals.colors[y]:e.config.chart.foreColor;L||(L=e.config.chart.foreColor);var I=T.x+this.barLabels.offsetX,_=T.y+this.barLabels.offsetY,R=r.drawText({x:I,y:_,text:E,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:L,cssClass:M.join(" ")});R.on("click",this.onBarLabelClick),R.attr({rel:y+1}),0!==x&&R.attr({"transform-origin":"".concat(I," ").concat(_),transform:"rotate(".concat(x," 0 0)")}),v.add(R)}var z=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(z=e.config.chart.animations.speed),e.globals.dataChanged&&(z=e.config.chart.animations.dynamicAnimation.speed),this.animDur=z/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(C,{centerX:t.centerX,centerY:t.centerY,endAngle:k,startAngle:x,prevEndAngle:A,prevStartAngle:w,size:t.size,i:y,totalItems:2,animBeginArr:this.animBeginArr,dur:z,shouldSetPrevPaths:!0})}return{g:o,elHollow:u,dataLabels:p}}},{key:"drawHollow",value:function(t){var e=new Pc(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,r,i){var n=this.w,o=new Zu(this.ctx),a=f.randomId(),s=n.config.plotOptions.radialBar.hollow.image;if(n.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:r,height:r,image:s,patternID:"pattern".concat(n.globals.cuid).concat(a)}),i="url(#pattern".concat(n.globals.cuid).concat(a,")");else{var l=n.config.plotOptions.radialBar.hollow.imageWidth,c=n.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===c){var u=n.globals.dom.Paper.image(s,(function(e){this.move(t.centerX-e.width/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+n.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(u)}else{var h=n.globals.dom.Paper.image(s,(function(e){this.move(t.centerX-l/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-c/2+n.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)}));e.add(h)}}return i}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,r=this.barLabels.onClick,i=this.w;r&&r(i.globals.seriesNames[e],{w:i,seriesIndex:e})}}],r&&Bg(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Lg);const $g=Zg;function Jg(t){return Jg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jg(t)}function Qg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Kg(t){for(var e=1;e0&&(this.visibleI=this.visibleI+1);var b=0,y=0,v=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[d][0],v=d);var m=this.barHelpers.initialPositions();h=m.y,c=m.zeroW,u=m.x,y=m.barWidth,b=m.barHeight,a=m.xDivision,s=m.yDivision,l=m.zeroH;for(var x=i.group({class:"apexcharts-datalabels","data:realIndex":d}),w=i.group({class:"apexcharts-rangebar-goals-markers"}),S=0;S0}));return this.isHorizontal?(i=f.config.plotOptions.bar.rangeBarGroupRows?o+c*y:o+s*this.visibleI+c*y,v>-1&&!f.config.plotOptions.bar.rangeBarOverlap&&(d=f.globals.seriesRange[e][v].overlaps).indexOf(p)>-1&&(i=(s=h.barHeight/d.length)*this.visibleI+c*(100-parseInt(this.barOptions.barHeight,10))/100/2+s*(this.visibleI+d.indexOf(p))+c*y)):(y>-1&&!f.globals.timescaleLabels.length&&(n=f.config.plotOptions.bar.rangeBarGroupRows?a+u*y:a+l*this.visibleI+u*y),v>-1&&!f.config.plotOptions.bar.rangeBarOverlap&&(d=f.globals.seriesRange[e][v].overlaps).indexOf(p)>-1&&(n=(l=h.barWidth/d.length)*this.visibleI+u*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+d.indexOf(p))+u*y)),{barYPosition:i,barXPosition:n,barHeight:s,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,r=t.x,i=t.xDivision,n=t.barWidth,o=t.barXPosition,a=t.zeroH,s=this.w,l=e.i,c=e.j,u=e.realIndex,h=e.translationsIndex,f=this.yRatio[h],d=this.getRangeValue(u,c),p=Math.min(d.start,d.end),g=Math.max(d.start,d.end);void 0===this.series[l][c]||null===this.series[l][c]?p=a:(p=a-p/f,g=a-g/f);var b=Math.abs(g-p),y=this.barHelpers.getColumnPaths({barXPosition:o,barWidth:n,y1:p,y2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:u,i:u,j:c,w:s});if(s.globals.isXNumeric){var v=this.getBarXForNumericXAxis({x:r,j:c,realIndex:u,barWidth:n});r=v.x,o=v.barXPosition}else r+=i;return{pathTo:y.pathTo,pathFrom:y.pathFrom,barHeight:b,x:r,y:d.start<0&&d.end<0?p:g,goalY:this.barHelpers.getGoalValues("y",null,a,l,c,h),barXPosition:o}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,r=t.y,i=t.y1,n=t.y2,o=t.yDivision,a=t.barHeight,s=t.barYPosition,l=t.zeroW,c=this.w,u=e.realIndex,h=e.j,f=this.preventBarOverflow(l+i/this.invertedYRatio),d=this.preventBarOverflow(l+n/this.invertedYRatio),p=this.getRangeValue(u,h),g=Math.abs(d-f),b=this.barHelpers.getBarpaths({barYPosition:s,barHeight:a,x1:f,x2:d,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:u,realIndex:u,j:h,w:c});return c.globals.isXNumeric||(r+=o),{pathTo:b.pathTo,pathFrom:b.pathFrom,barWidth:g,x:p.start<0&&p.end<0?f:d,goalX:this.barHelpers.getGoalValues("x",l,null,u,h),y:r}}},{key:"getRangeValue",value:function(t,e){var r=this.w;return{start:r.globals.seriesRangeStart[t][e],end:r.globals.seriesRangeEnd[t][e]}}}],r&&eb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const lb=sb;function cb(t){return cb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cb(t)}function ub(t,e){for(var r=0;r0&&parseInt(a.realIndex,10)===parseInt(i,10)&&("line"===a.type?(this.lineCtx.appendPathFrom=!1,e=n.globals.previousPaths[o].paths[0].d):"area"===a.type&&(this.lineCtx.appendPathFrom=!1,r=n.globals.previousPaths[o].paths[0].d,n.config.stroke.show&&n.globals.previousPaths[o].paths[1]&&(e=n.globals.previousPaths[o].paths[1].d)))}return{pathFromLine:e,pathFromArea:r}}},{key:"determineFirstPrevY",value:function(t){var e,r,i,n=t.i,o=t.realIndex,a=t.series,s=t.prevY,l=t.lineYPosition,c=t.translationsIndex,u=this.w,h=u.config.chart.stacked&&!u.globals.comboCharts||u.config.chart.stacked&&u.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(r=this.w.config.series[o])||void 0===r?void 0:r.type));if(void 0!==(null===(i=a[n])||void 0===i?void 0:i[0]))s=(l=h&&n>0?this.lineCtx.prevSeriesY[n-1][0]:this.lineCtx.zeroY)-a[n][0]/this.lineCtx.yRatio[c]+2*(this.lineCtx.isReversed?a[n][0]/this.lineCtx.yRatio[c]:0);else if(h&&n>0&&void 0===a[n][0])for(var f=n-1;f>=0;f--)if(null!==a[f][0]&&void 0!==a[f][0]){s=l=this.lineCtx.prevSeriesY[f][0];break}return{prevY:s,lineYPosition:l}}}],r&&ub(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),db=function(t){var e=function(t){for(var e,r,i,n,o=function(t){for(var e=[],r=t[0],i=t[1],n=e[0]=gb(r,i),o=1,a=t.length-1;o9&&(n=3*i/Math.sqrt(n),o[l]=n*e,o[l+1]=n*r);for(var c=0;c<=a;c++)n=(t[Math.min(a,c+1)][0]-t[Math.max(0,c-1)][0])/(6*(1+o[c]*o[c])),s.push([n||0,o[c]*n||0]);return s}(t),r=t[1],i=t[0],n=[],o=e[1],a=e[0];n.push(i,[i[0]+a[0],i[1]+a[1],r[0]-o[0],r[1]-o[1],r[0],r[1]]);for(var s=2,l=e.length;s1&&i[1].length<6){var n=i[0].length;i[1]=[2*i[0][n-2]-i[0][n-4],2*i[0][n-1]-i[0][n-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i};function gb(t,e){return(e[1]-t[1])/(e[0]-t[0])}function bb(t){return bb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bb(t)}function yb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function vb(t){for(var e=1;e1?f:0;this._initSerieVariables(t,h,f);var p=[],g=[],b=[],y=o.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,f),o.globals.isXNumeric&&o.globals.seriesX.length>0&&(y=(o.globals.seriesX[f][0]-o.globals.minX)/this.xRatio),b.push(y);var v,m=y,x=void 0,w=m,S=this.zeroY,k=this.zeroY;S=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:t,prevY:S,lineYPosition:0,translationsIndex:d}).prevY,"monotoneCubic"===o.config.stroke.curve&&null===t[h][0]?p.push(null):p.push(S),v=S,"rangeArea"===s&&(x=k=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:i,prevY:k,lineYPosition:0,translationsIndex:d}).prevY,g.push(null!==p[0]?k:null));var A=this._calculatePathsFrom({type:s,series:t,i:h,realIndex:f,translationsIndex:d,prevX:w,prevY:S,prevY2:k}),O=[p[0]],P=[g[0]],C={type:s,series:t,realIndex:f,translationsIndex:d,i:h,x:y,y:1,pX:m,pY:v,pathsFrom:A,linePaths:[],areaPaths:[],seriesIndex:r,lineYPosition:0,xArrj:b,yArrj:p,y2Arrj:g,seriesRangeEnd:i},j=this._iterateOverDataPoints(vb(vb({},C),{},{iterations:"rangeArea"===s?t[h].length-1:void 0,isRangeStart:!0}));if("rangeArea"===s){for(var T=this._calculatePathsFrom({series:i,i:h,realIndex:f,prevX:w,prevY:k}),E=this._iterateOverDataPoints(vb(vb({},C),{},{series:i,xArrj:[y],yArrj:O,y2Arrj:P,pY:x,areaPaths:j.areaPaths,pathsFrom:T,iterations:i[h].length-1,isRangeStart:!1})),M=j.linePaths.length/2,L=0;L=0;I--)l.add(u[I]);else for(var _=0;_1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[r],o=r),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.globals.gridHeight-this.baseLineY[o]-(this.isReversed?i.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[o]:0),this.areaBottomY=this.zeroY,(this.zeroY>i.globals.gridHeight||"end"===i.config.plotOptions.area.fillTo)&&(this.areaBottomY=i.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=n.group({class:"apexcharts-series",zIndex:void 0!==i.config.series[r].zIndex?i.config.series[r].zIndex:r,seriesName:f.escapeString(i.globals.seriesNames[r])}),this.elPointsMain=n.group({class:"apexcharts-series-markers-wrap","data:realIndex":r}),this.elDataLabelsWrap=n.group({class:"apexcharts-datalabels","data:realIndex":r});var a=t[e].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":a,rel:e+1,"data:realIndex":r}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,r,i,n,o=t.type,a=t.series,s=t.i,l=t.realIndex,c=t.translationsIndex,u=t.prevX,h=t.prevY,f=t.prevY2,d=this.w,p=new Pc(this.ctx);if(null===a[s][0]){for(var g=0;g0){var b=this.lineHelpers.checkPreviousPaths({pathFromLine:i,pathFromArea:n,realIndex:l});i=b.pathFromLine,n=b.pathFromArea}return{prevX:u,prevY:h,linePath:e,areaPath:r,pathFromLine:i,pathFromArea:n}}},{key:"_handlePaths",value:function(t){var e=t.type,r=t.realIndex,i=t.i,n=t.paths,o=this.w,a=new Pc(this.ctx),s=new Zu(this.ctx);this.prevSeriesY.push(n.yArrj),o.globals.seriesXvalues[r]=n.xArrj,o.globals.seriesYvalues[r]=n.yArrj;var l=o.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var c=o.globals.seriesXvalues[r][o.globals.seriesXvalues[r].length-l.count-1],u=a.drawRect(c,0,o.globals.gridWidth,o.globals.gridHeight,0);o.globals.dom.elForecastMask.appendChild(u.node);var h=a.drawRect(0,0,c,o.globals.gridHeight,0);o.globals.dom.elNonForecastMask.appendChild(h.node)}this.pointsChart||o.globals.delayedElements.push({el:this.elPointsMain.node,index:r});var f={i,realIndex:r,animationDelay:i,initialSpeed:o.config.chart.animations.speed,dataChangeSpeed:o.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var d=s.fillPath({seriesNumber:r}),p=0;p0&&"rangeArea"!==e){var S=a.renderPaths(x);S.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&S.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(S),S.attr("clip-path","url(#forecastMask".concat(o.globals.cuid,")")),w.attr("clip-path","url(#nonForecastMask".concat(o.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,r,i=this,n=t.type,o=t.series,a=t.iterations,s=t.realIndex,l=t.translationsIndex,c=t.i,u=t.x,h=t.y,d=t.pX,p=t.pY,g=t.pathsFrom,b=t.linePaths,y=t.areaPaths,v=t.seriesIndex,m=t.lineYPosition,x=t.xArrj,w=t.yArrj,S=t.y2Arrj,k=t.isRangeStart,A=t.seriesRangeEnd,O=this.w,P=new Pc(this.ctx),C=this.yRatio,j=g.prevY,T=g.linePath,E=g.areaPath,M=g.pathFromLine,L=g.pathFromArea,I=f.isNumber(O.globals.minYArr[s])?O.globals.minYArr[s]:O.globals.minY;a||(a=O.globals.dataPoints>1?O.globals.dataPoints-1:O.globals.dataPoints);var _=function(t,e){return e-t/C[l]+2*(i.isReversed?t/C[l]:0)},R=h,z=O.config.chart.stacked&&!O.globals.comboCharts||O.config.chart.stacked&&O.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[s])||void 0===e?void 0:e.type)||"column"===(null===(r=this.w.config.series[s])||void 0===r?void 0:r.type)),X=O.config.stroke.curve;Array.isArray(X)&&(X=Array.isArray(v)?X[v[c]]:X[c]);for(var D,Y=0,H=0;H0&&O.globals.collapsedSeries.length0;e--){if(!(O.globals.collapsedSeriesIndices.indexOf((null==v?void 0:v[e])||e)>-1))return e;e--}return 0}(c-1)][H+1]:this.zeroY,F?h=_(I,m):(h=_(o[c][H+1],m),"rangeArea"===n&&(R=_(A[c][H+1],m))),x.push(u),!F||"smooth"!==O.config.stroke.curve&&"monotoneCubic"!==O.config.stroke.curve?(w.push(h),S.push(R)):(w.push(null),S.push(null));var N=this.lineHelpers.calculatePoints({series:o,x:u,y:h,realIndex:s,i:c,j:H,prevY:j}),W=this._createPaths({type:n,series:o,i:c,realIndex:s,j:H,x:u,y:h,y2:R,xArrj:x,yArrj:w,y2Arrj:S,pX:d,pY:p,pathState:Y,segmentStartX:D,linePath:T,areaPath:E,linePaths:b,areaPaths:y,curve:X,isRangeStart:k});y=W.areaPaths,b=W.linePaths,d=W.pX,p=W.pY,Y=W.pathState,D=W.segmentStartX,E=W.areaPath,T=W.linePath,!this.appendPathFrom||O.globals.hasNullValues||"monotoneCubic"===X&&"rangeArea"===n||(M+=P.line(u,this.areaBottomY),L+=P.line(u,this.areaBottomY)),this.handleNullDataPoints(o,N,c,H,s),this._handleMarkersAndLabels({type:n,pointsPos:N,i:c,j:H,realIndex:s,isRangeStart:k})}return{yArrj:w,xArrj:x,pathFromArea:L,areaPaths:y,pathFromLine:M,linePaths:b,linePath:T,areaPath:E}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,r=t.pointsPos,i=t.isRangeStart,n=t.i,o=t.j,a=t.realIndex,s=this.w,l=new lh(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,o,{realIndex:a,pointsPos:r,zRatio:this.zRatio,elParent:this.elPointsMain});else{s.globals.series[n].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var c=this.markers.plotChartMarkers(r,a,o+1);null!==c&&this.elPointsMain.add(c)}var u=l.drawDataLabel({type:e,isRangeStart:i,pos:r,i:a,j:o+1});null!==u&&this.elDataLabelsWrap.add(u)}},{key:"_createPaths",value:function(t){var e,r=t.type,i=t.series,n=t.i,o=(t.realIndex,t.j),a=t.x,s=t.y,l=t.xArrj,c=t.yArrj,u=t.y2,h=t.y2Arrj,f=t.pX,d=t.pY,p=t.pathState,g=t.segmentStartX,b=t.linePath,y=t.areaPath,v=t.linePaths,m=t.areaPaths,x=t.curve,w=t.isRangeStart,S=new Pc(this.ctx),k=this.areaBottomY,A="rangeArea"===r,O="rangeArea"===r&&w;switch(x){case"monotoneCubic":var P=w?c:h;switch(p){case 0:if(null===P[o+1])break;p=1;case 1:if(!(A?l.length===i[n].length:o===i[n].length-2))break;case 2:var C=w?l:l.slice().reverse(),j=w?P:P.slice().reverse(),T=(e=j,C.map((function(t,r){return[t,e[r]]})).filter((function(t){return null!==t[1]}))),E=T.length>1?db(T):T,M=[];A&&(O?m=T:M=m.reverse());var L=0,I=0;if(function(t,e){for(var r=function(t){var e=[],r=0;return t.forEach((function(t){null!==t?r++:r>0&&(e.push(r),r=0)})),r>0&&e.push(r),e}(t),i=[],n=0,o=0;n4?(e+="C".concat(i[0],", ").concat(i[1]),e+=", ".concat(i[2],", ").concat(i[3]),e+=", ".concat(i[4],", ").concat(i[5])):n>2&&(e+="S".concat(i[0],", ").concat(i[1]),e+=", ".concat(i[2],", ").concat(i[3]))}return e}(t),r=I,i=(I+=t.length)-1;O?b=S.move(T[r][0],T[r][1])+e:A?b=S.move(M[r][0],M[r][1])+S.line(T[r][0],T[r][1])+e+S.line(M[i][0],M[i][1]):(b=S.move(T[r][0],T[r][1])+e,y=b+S.line(T[i][0],k)+S.line(T[r][0],k)+"z",m.push(y)),v.push(b)})),A&&L>1&&!O){var _=v.slice(L).reverse();v.splice(L),_.forEach((function(t){return v.push(t)}))}p=0}break;case"smooth":var R=.35*(a-f);if(null===i[n][o])p=0;else switch(p){case 0:if(g=f,b=O?S.move(f,h[o])+S.line(f,d):S.move(f,d),y=S.move(f,d),null===i[n][o+1]||void 0===i[n][o+1]){v.push(b),m.push(y);break}if(p=1,o=i[n].length-2&&(O&&(b+=S.curve(a,s,a,s,a,u)+S.move(a,u)),y+=S.curve(a,s,a,s,a,k)+S.line(g,k)+"z",v.push(b),m.push(y),p=-1)}}f=a,d=s;break;default:var D=function(t,e,r){var i=[];switch(t){case"stepline":i=S.line(e,null,"H")+S.line(null,r,"V");break;case"linestep":i=S.line(null,r,"V")+S.line(e,null,"H");break;case"straight":i=S.line(e,r)}return i};if(null===i[n][o])p=0;else switch(p){case 0:if(g=f,b=O?S.move(f,h[o])+S.line(f,d):S.move(f,d),y=S.move(f,d),null===i[n][o+1]||void 0===i[n][o+1]){v.push(b),m.push(y);break}if(p=1,o=i[n].length-2&&(O&&(b+=S.line(a,u)),y+=S.line(a,k)+S.line(g,k)+"z",v.push(b),m.push(y),p=-1)}}f=a,d=s}return{linePaths:v,areaPaths:m,pX:f,pY:d,pathState:p,segmentStartX:g,linePath:b,areaPath:y}}},{key:"handleNullDataPoints",value:function(t,e,r,i,n){var o=this.w;if(null===t[r][i]&&o.config.markers.showNullDataPoints||1===t[r].length){var a=this.strokeWidth-o.config.markers.strokeWidth/2;a>0||(a=0);var s=this.markers.plotChartMarkers(e,n,i+1,a,!0);null!==s&&this.elPointsMain.add(s)}}}],r&&xb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const kb=Sb;function Ab(t){return Ab="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ab(t)}function Ob(t,e){for(var r=0;ro-i&&l.width<=a-n){var c=s.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(c.x," ").concat(c.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,r,i,n,o){var a=new Pc(this.ctx),s=a.getTextRects(t,e).width+this.w.config.stroke.width+5>n-r&&o-i>n-r?o-i:n-r,l=a.getTextBasedOnMaxWidth({text:t,maxWidth:s,fontSize:e});return t.length!==l.length&&s/e<5?"":l}},{key:"animateTreemap",value:function(t,e,r,i){var n=new b(this.ctx);n.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:r.x,y:r.y,width:r.width,height:r.height},i,(function(){n.animationCompleted(t)}))}}],r&&Ob(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function jb(t){return jb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jb(t)}function Tb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Eb(t){for(var e=1;e5e4&&(i.globals.disableZoomOut=!0);var a=n.getTimeUnitsfromTimestamp(t,e,this.utc),s=i.globals.gridWidth/o,l=s/24,c=l/60,u=c/60,h=Math.floor(24*o),f=Math.floor(1440*o),d=Math.floor(86400*o),p=Math.floor(o),g=Math.floor(o/30),b=Math.floor(o/365),y={minMillisecond:a.minMillisecond,minSecond:a.minSecond,minMinute:a.minMinute,minHour:a.minHour,minDate:a.minDate,minMonth:a.minMonth,minYear:a.minYear},v={firstVal:y,currentMillisecond:y.minMillisecond,currentSecond:y.minSecond,currentMinute:y.minMinute,currentHour:y.minHour,currentMonthDate:y.minDate,currentDate:y.minDate,currentMonth:y.minMonth,currentYear:y.minYear,daysWidthOnXAxis:s,hoursWidthOnXAxis:l,minutesWidthOnXAxis:c,secondsWidthOnXAxis:u,numberOfSeconds:d,numberOfMinutes:f,numberOfHours:h,numberOfDays:p,numberOfMonths:g,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var m=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?Eb(Eb({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?Eb(Eb({},e),{},{value:t.value}):"minute"===t.unit?Eb(Eb({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?Eb(Eb({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return m.filter((function(t){var e=1,n=Math.ceil(i.globals.gridWidth/120),o=t.value;void 0!==i.config.xaxis.tickAmount&&(n=i.config.xaxis.tickAmount),m.length>n&&(e=Math.floor(m.length/n));var a=!1,s=!1;switch(r.tickInterval){case"years":"year"===t.unit&&(a=!0);break;case"half_year":e=7,"year"===t.unit&&(a=!0);break;case"months":e=1,"year"===t.unit&&(a=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(a=!0),30===o&&(s=!0);break;case"months_days":e=10,"month"===t.unit&&(a=!0),30===o&&(s=!0);break;case"week_days":e=8,"month"===t.unit&&(a=!0);break;case"days":e=1,"month"===t.unit&&(a=!0);break;case"hours":"day"===t.unit&&(a=!0);break;case"minutes_fives":case"seconds_fives":o%5!=0&&(s=!0);break;case"seconds_tens":o%10!=0&&(s=!0)}if("hours"===r.tickInterval||"minutes_fives"===r.tickInterval||"seconds_tens"===r.tickInterval||"seconds_fives"===r.tickInterval){if(!s)return!0}else if((o%e==0||a)&&!s)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var r=this.w,i=this.formatDates(t),n=this.removeOverlappingTS(i);r.globals.timescaleLabels=n.slice(),new Uf(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,r=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case r>15:this.tickInterval="minutes_fives";break;case r>5:this.tickInterval="minutes";break;case r>1:this.tickInterval="seconds_tens";break;case 60*r>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,r=t.currentMonth,i=t.currentYear,n=t.daysWidthOnXAxis,o=t.numberOfYears,a=e.minYear,s=0,l=new Vc(this.ctx),c="year";if(e.minDate>1||e.minMonth>0){var u=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);s=(l.determineDaysOfYear(e.minYear)-u+1)*n,a=e.minYear+1,this.timeScaleArray.push({position:s,value:a,unit:c,year:a,month:f.monthMod(r+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:s,value:a,unit:c,year:i,month:f.monthMod(r+1)});for(var h=a,d=s,p=0;p1){l=(c.determineDaysOfMonths(i+1,e.minYear)-r+1)*o,s=f.monthMod(i+1);var d=n+h,p=f.monthMod(s),g=s;0===s&&(u="year",g=d,p=1,d+=h+=1),this.timeScaleArray.push({position:l,value:g,unit:u,year:d,month:p})}else this.timeScaleArray.push({position:l,value:s,unit:u,year:n,month:f.monthMod(i)});for(var b=s+1,y=l,v=0,m=1;va.determineDaysOfMonths(e+1,r)?(c=1,s="month",d=e+=1,e):e},h=(24-e.minHour)*n,d=l,p=u(c,r,i);0===e.minHour&&1===e.minDate?(h=0,d=f.monthMod(e.minMonth),s="month",c=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(h=0,l=e.minDate,d=l,p=u(c=l,r,i)),this.timeScaleArray.push({position:h,value:d,unit:s,year:this._getYear(i,p,0),month:f.monthMod(p),day:c});for(var g=h,b=0;bs.determineDaysOfMonths(e+1,n)&&(b=1,e+=1),{month:e,date:b}},u=function(t,e){return t>s.determineDaysOfMonths(e+1,n)?e+=1:e},h=60-(e.minMinute+e.minSecond/60),d=h*o,p=e.minHour+1,g=p;60===h&&(d=0,g=p=e.minHour);var b=r;g>=24&&(g=0,l="day",p=b+=1);var y=c(b,i).month;y=u(b,y),this.timeScaleArray.push({position:d,value:p,unit:l,day:b,hour:g,year:n,month:f.monthMod(y)}),g++;for(var v=d,m=0;m=24&&(g=0,l="day",y=c(b+=1,y).month,y=u(b,y));var x=this._getYear(n,y,0);v=60*o+v;var w=0===g?b:g;this.timeScaleArray.push({position:v,value:w,unit:l,hour:g,day:b,year:x,month:f.monthMod(y)}),g++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,r=t.currentSecond,i=t.currentMinute,n=t.currentHour,o=t.currentDate,a=t.currentMonth,s=t.currentYear,l=t.minutesWidthOnXAxis,c=t.secondsWidthOnXAxis,u=t.numberOfMinutes,h=i+1,d=o,p=a,g=s,b=n,y=(60-r-e/1e3)*c,v=0;v=60&&(h=0,24===(b+=1)&&(b=0)),this.timeScaleArray.push({position:y,value:h,unit:"minute",hour:b,minute:h,day:d,year:this._getYear(g,p,0),month:f.monthMod(p)}),y+=l,h++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,r=t.currentSecond,i=t.currentMinute,n=t.currentHour,o=t.currentDate,a=t.currentMonth,s=t.currentYear,l=t.secondsWidthOnXAxis,c=t.numberOfSeconds,u=r+1,h=i,d=o,p=a,g=s,b=n,y=(1e3-e)/1e3*l,v=0;v=60&&(u=0,++h>=60&&(h=0,24==++b&&(b=0))),this.timeScaleArray.push({position:y,value:u,unit:"second",hour:b,minute:h,second:u,day:d,year:this._getYear(g,p,0),month:f.monthMod(p)}),y+=l,u++}},{key:"createRawDateString",value:function(t,e){var r=t.year;return 0===t.month&&(t.month=1),r+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?r+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":r+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?r+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":r+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?r+=":"+("0"+e).slice(-2):r+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?r+=":"+("0"+e).slice(-2):r+=":00",this.utc&&(r+=".000Z"),r}},{key:"formatDates",value:function(t){var e=this,r=this.w;return t.map((function(t){var i=t.value.toString(),n=new Vc(e.ctx),o=e.createRawDateString(t,i),a=n.getDate(n.parseDate(o));if(e.utc||(a=n.getDate(n.parseDateWithTimezone(o))),void 0===r.config.xaxis.labels.format){var s="dd MMM",l=r.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(s=l.year),"month"===t.unit&&(s=l.month),"day"===t.unit&&(s=l.day),"hour"===t.unit&&(s=l.hour),"minute"===t.unit&&(s=l.minute),"second"===t.unit&&(s=l.second),i=n.formatDate(a,s)}else i=n.formatDate(a,r.config.xaxis.labels.format);return{dateString:o,position:t.position,value:i,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,r=this,i=new Pc(this.ctx),n=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(n=!0,e=i.getTextRects(t[0].value).width);var o=0,a=t.map((function(a,s){if(s>0&&r.w.config.xaxis.labels.hideOverlappingLabels){var l=n?e:i.getTextRects(t[o].value).width,c=t[o].position;return a.position>c+l+10?(o=s,a):null}return a}));return a.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,r){return t+Math.floor(e/12)+r}}],r&&Lb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const zb=Rb;function Xb(t){return Xb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xb(t)}function Db(t){return function(t){if(Array.isArray(t))return Yb(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Yb(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Yb(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&(l&&console.warn("Chart or series type ".concat(l," cannot appear with other chart or series types.")),a.column.series.length>0&&n.plotOptions.bar.horizontal&&(c-=a.column.series.length,a.column={series:[],i:[]},r.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),o.comboCharts||(o.comboCharts=c>0);var u=new kb(i,e),h=new dg(i,e);i.pie=new Lg(i);var f=new $g(i);i.rangeBar=new lb(i,e);var d=new Hg(i),p=[];if(o.comboCharts){var g,b,y=new Mc(i);if(a.area.series.length>0&&(g=p).push.apply(g,Db(y.drawSeriesByGroup(a.area,o.areaGroups,"area",u))),a.column.series.length>0)if(n.chart.stacked){var v=new eg(i,e);p.push(v.draw(a.column.series,a.column.i))}else i.bar=new Np(i,e),p.push(i.bar.draw(a.column.series,a.column.i));if(a.rangeArea.series.length>0&&p.push(u.draw(a.rangeArea.series,"rangeArea",a.rangeArea.i,a.rangeArea.seriesRangeEnd)),a.line.series.length>0&&(b=p).push.apply(b,Db(y.drawSeriesByGroup(a.line,o.lineGroups,"line",u))),a.candlestick.series.length>0&&p.push(h.draw(a.candlestick.series,"candlestick",a.candlestick.i)),a.boxPlot.series.length>0&&p.push(h.draw(a.boxPlot.series,"boxPlot",a.boxPlot.i)),a.rangeBar.series.length>0&&p.push(i.rangeBar.draw(a.rangeBar.series,a.rangeBar.i)),a.scatter.series.length>0){var m=new kb(i,e,!0);p.push(m.draw(a.scatter.series,"scatter",a.scatter.i))}if(a.bubble.series.length>0){var x=new kb(i,e,!0);p.push(x.draw(a.bubble.series,"bubble",a.bubble.i))}}else switch(n.chart.type){case"line":p=u.draw(o.series,"line");break;case"area":p=u.draw(o.series,"area");break;case"bar":n.chart.stacked?p=new eg(i,e).draw(o.series):(i.bar=new Np(i,e),p=i.bar.draw(o.series));break;case"candlestick":p=new dg(i,e).draw(o.series,"candlestick");break;case"boxPlot":p=new dg(i,e).draw(o.series,n.chart.type);break;case"rangeBar":p=i.rangeBar.draw(o.series);break;case"rangeArea":p=u.draw(o.seriesRangeStart,"rangeArea",void 0,o.seriesRangeEnd);break;case"heatmap":p=new kg(i,e).draw(o.series);break;case"treemap":p=new Cb(i,e).draw(o.series);break;case"pie":case"donut":case"polarArea":p=i.pie.draw(o.series);break;case"radialBar":p=f.draw(o.series);break;case"radar":p=d.draw(o.series);break;default:p=u.draw(o.series)}return p}},{key:"setSVGDimensions",value:function(){var t=this.w,e=t.globals,r=t.config;r.chart.width=r.chart.width||"100%",r.chart.height=r.chart.height||"auto",e.svgWidth=r.chart.width,e.svgHeight=r.chart.height;var i=f.getDimensions(this.el),n=r.chart.width.toString().split(/[0-9]+/g).pop();"%"===n?f.isNumber(i[0])&&(0===i[0].width&&(i=f.getDimensions(this.el.parentNode)),e.svgWidth=i[0]*parseInt(r.chart.width,10)/100):"px"!==n&&""!==n||(e.svgWidth=parseInt(r.chart.width,10));var o=String(r.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===o){var a=f.getDimensions(this.el.parentNode);e.svgHeight=a[1]*parseInt(r.chart.height,10)/100}else e.svgHeight=parseInt(r.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Pc.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==o){var s=r.chart.sparkline.enabled?0:e.axisCharts?r.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(e.svgHeight+s,"px")}e.dom.elWrap.style.width="".concat(e.svgWidth,"px"),e.dom.elWrap.style.height="".concat(e.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,r=t.translateX;Pc.setAttrs(t.dom.elGraphical.node,{transform:"translate(".concat(r,", ").concat(e,")")})}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,r=0,i=t.config.chart.sparkline.enabled?1:15;i+=t.config.grid.padding.bottom,["top","bottom"].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(r=new od(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var n=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),o=2.05*t.globals.radialSize;if(n&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var a=f.getBoundingClientRect(n);o=a.bottom;var s=a.bottom-a.top;o=Math.max(2.05*t.globals.radialSize,s)}var l=Math.ceil(o+e.translateY+r+i);e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).includes("%")||(e.dom.elWrap.style.height="".concat(l,"px"),Pc.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(l,"px"))}},{key:"coreCalculations",value:function(){new Wh(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(){return[]}))},r=new Ru,i=this.w.globals;r.initGlobalVars(i),i.seriesXvalues=e(),i.seriesYvalues=e()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var t=this.w,e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new hf(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new hf(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new zb(this.ctx);var r=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?r=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(r=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(r)}e=new Mc(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var r=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];r.forEach((function(e){var r=ApexCharts.getChartByID(e);r.w.globals.brushSource=t.ctx,"function"!=typeof r.w.config.chart.events.zoomed&&(r.w.config.chart.events.zoomed=function(){return t.updateSourceChart(r)}),"function"!=typeof r.w.config.chart.events.scrolled&&(r.w.config.chart.events.scrolled=function(){return t.updateSourceChart(r)})})),e.config.chart.events.selection=function(t,e){r.forEach((function(t){ApexCharts.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:e.xaxis.min,max:e.xaxis.max}},!1,!1,!1,!1)}))}}}}],r&&Hb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Nb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Wb(t){for(var e=1;e1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(a){var s=[e.ctx];n&&(s=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(s=[e.ctx],e.ctx.w.globals.isExecCalled=!1),s.forEach((function(n,l){var c=n.w;if(c.globals.shouldAnimate=i,r||(c.globals.resized=!0,c.globals.dataChanged=!0,i&&n.series.getPreviousPaths()),t&&"object"===Vb(t)&&(n.config=new Mu(t),t=Mc.extendArrayProps(n.config,t,c),n.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,c.config=f.extend(c.config,t),o&&(c.globals.lastXAxis=t.xaxis?f.clone(t.xaxis):[],c.globals.lastYAxis=t.yaxis?f.clone(t.yaxis):[],c.globals.initialConfig=f.extend({},c.config),c.globals.initialSeries=f.clone(c.config.series),t.series))){for(var u=0;u2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(n){var o,a=r.w;return a.globals.shouldAnimate=e,a.globals.dataChanged=!0,e&&r.ctx.series.getPreviousPaths(),a.globals.axisCharts?(o=t.map((function(t,e){return r._extendSeries(t,e)})),0===o.length&&(o=[{data:[]}]),a.config.series=o):a.config.series=t.slice(),i&&(a.globals.initialConfig.series=f.clone(a.config.series),a.globals.initialSeries=f.clone(a.config.series)),r.ctx.update().then((function(){n(r.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var r=this.w,i=r.config.series[e];return Wb(Wb({},r.config.series[e]),{},{name:t.name?t.name:null==i?void 0:i.name,color:t.color?t.color:null==i?void 0:i.color,type:t.type?t.type:null==i?void 0:i.type,group:t.group?t.group:null==i?void 0:i.group,hidden:void 0!==t.hidden?t.hidden:null==i?void 0:i.hidden,data:t.data?t.data:null==i?void 0:i.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var r=this.w,i=null,n=".apexcharts-series[data\\:realIndex='".concat(t,"']");return r.globals.axisCharts?i=r.globals.dom.Paper.findOne("".concat(n," path[j='").concat(e,"'], ").concat(n," circle[j='").concat(e,"'], ").concat(n," rect[j='").concat(e,"']")):void 0===e&&(i=r.globals.dom.Paper.findOne("".concat(n," path[j='").concat(t,"']")),"pie"!==r.config.chart.type&&"polarArea"!==r.config.chart.type&&"donut"!==r.config.chart.type||this.ctx.pie.pieClicked(t)),i?(new Pc(this.ctx).pathMouseDown(i,null),i.node?i.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(r){void 0!==t.xaxis[r]&&(e.config.xaxis[r]=t.xaxis[r],e.globals.lastXAxis[r]=t.xaxis[r])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var r=new Cu(t);t=r.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,r){t.yaxis[r].min=0,t.yaxis[r].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,r=this.w,i=r.globals.lastXAxis,n=r.globals.lastYAxis;t&&t.xaxis&&(i=t.xaxis),t&&t.yaxis&&(n=t.yaxis),r.config.xaxis.min=i.min,r.config.xaxis.max=i.max;r.config.yaxis.map((function(t,i){r.globals.zoomed||void 0!==n[i]?function(t){void 0!==n[t]&&(r.config.yaxis[t].min=n[t].min,r.config.yaxis[t].max=n[t].max)}(i):void 0!==e.ctx.opts.yaxis[i]&&(t.min=e.ctx.opts.yaxis[i].min,t.max=e.ctx.opts.yaxis[i].max)}))}}],r&&Ub(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function $b(t){return $b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$b(t)}function Jb(t,e){for(var r=0;r0&&arguments[0]!==c?arguments[0]:[],n=arguments.length>1?arguments[1]:c,o=arguments.length>2?arguments[2]:c,a=arguments.length>3?arguments[3]:c,s=arguments.length>4?arguments[4]:c,l=arguments.length>5?arguments[5]:c,c=arguments.length>6?arguments[6]:c,u=t.slice(n,o||c),h=a.slice(s,l||c),f=0,d={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};u[f]=e.call(d,u[f]),h[f]=e.call(p,h[f]),u[f][0]!=h[f][0]||"M"==u[f][0]||"A"==u[f][0]&&(u[f][4]!=h[f][4]||u[f][5]!=h[f][5])?(Array.prototype.splice.apply(u,[f,1].concat(i.call(d,u[f]))),Array.prototype.splice.apply(h,[f,1].concat(i.call(p,h[f])))):(u[f]=r.call(d,u[f]),h[f]=r.call(p,h[f])),++f!=u.length||f!=h.length;)f==u.length&&u.push(["C",d.pos[0],d.pos[1],d.pos[0],d.pos[1],d.pos[0],d.pos[1]]),f==h.length&&h.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]]);return{start:u,dest:h}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function r(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function i(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var r,i,n,o,a,s,l,c,u,h,f,d,p,g,b,y,v,m,x,w,S,k,A,O,P,C,j=Math.abs(e[1]),T=Math.abs(e[2]),E=e[3]%360,M=e[4],L=e[5],I=e[6],_=e[7],R=new Rt(t),z=new Rt(I,_),X=[];if(0===j||0===T||R.x===z.x&&R.y===z.y)return[["C",R.x,R.y,z.x,z.y,z.x,z.y]];for((i=(r=new Rt((R.x-z.x)/2,(R.y-z.y)/2).transform((new Ht).rotate(E))).x*r.x/(j*j)+r.y*r.y/(T*T))>1&&(j*=i=Math.sqrt(i),T*=i),n=(new Ht).rotate(E).scale(1/j,1/T).rotate(-E),R=R.transform(n),s=(o=[(z=z.transform(n)).x-R.x,z.y-R.y])[0]*o[0]+o[1]*o[1],a=Math.sqrt(s),o[0]/=a,o[1]/=a,l=s<4?Math.sqrt(1-s/4):0,M===L&&(l*=-1),c=new Rt((z.x+R.x)/2+l*-o[1],(z.y+R.y)/2+l*o[0]),u=new Rt(R.x-c.x,R.y-c.y),h=new Rt(z.x-c.x,z.y-c.y),f=Math.acos(u.x/Math.sqrt(u.x*u.x+u.y*u.y)),u.y<0&&(f*=-1),d=Math.acos(h.x/Math.sqrt(h.x*h.x+h.y*h.y)),h.y<0&&(d*=-1),L&&f>d&&(d+=2*Math.PI),!L&&f0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(!1===e)return!1;for(var r=e,i=t.length;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r3&&void 0!==arguments[3]?arguments[3]:null;return function(n){n.preventDefault(),n.stopPropagation();var o=n.pageX||n.touches[0].pageX,a=n.pageY||n.touches[0].pageY;e.fire(t,{x:o,y:a,event:n,index:i,points:r})}}function ly(t,e){var r,i,n=(i=2,function(t){if(Array.isArray(t))return t}(r=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(r,i)||function(t,e){if(t){if("string"==typeof t)return ay(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ay(t,e):void 0}}(r,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],a=n[1],s=e.a,l=e.b,c=e.c,u=e.d;return[o*s+a*c+e.e,o*l+a*u+e.f]}it(ar,{draggable:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return(this.remember("_draggable")||new ty(this)).init(t),this}});var cy=function(){function t(e){ry(this,t),this.el=e,e.remember("_selectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return ny(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.handlePoints)}},{key:"createResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.createHandle.call(t,t.selection,e,r,i,n),t.selection.get(r+1).addClass("svg_select_handle svg_select_handle_"+n).on("mousedown.selection touchstart.selection",sy(n,t.el,t.handlePoints,r))}))}},{key:"createHandleFn",value:function(t){t.polyline()}},{key:"updateHandleFn",value:function(t,e,r,i){var n=i.at(r-1),o=i[(r+1)%i.length],a=e,s=[a[0]-n[0],a[1]-n[1]],l=[a[0]-o[0],a[1]-o[1]],c=Math.sqrt(s[0]*s[0]+s[1]*s[1]),u=Math.sqrt(l[0]*l[0]+l[1]*l[1]),h=[s[0]/c,s[1]/c],f=[l[0]/u,l[1]/u],d=[a[0]-10*h[0],a[1]-10*h[1]],p=[a[0]-10*f[0],a[1]-10*f[1]];t.plot([d,a,p])}},{key:"updateResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.updateHandle.call(t,t.selection.get(r+1),e,r,i,n)}))}},{key:"createRotFn",value:function(t){t.line(),t.circle(5)}},{key:"getPoint",value:function(t){return this.handlePoints[this.order.indexOf(t)]}},{key:"getPointHandle",value:function(t){return this.selection.get(this.order.indexOf(t)+1)}},{key:"updateRotFn",value:function(t,e){var r=this.getPoint("t");t.get(0).plot(r[0],r[1],e[0],e[1]),t.get(1).center(e[0],e[1])}},{key:"createRotationHandle",value:function(){var t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",sy("rot",this.el,this.handlePoints));this.createRot.call(this,t)}},{key:"updateRotationHandle",value:function(){var t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}},{key:"updatePoints",value:function(){var t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((function(t){return ly(t,e)})),this.rotationPoint=ly(this.getRotationPoint(t),e)}},{key:"getHandlePoints",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.x,r=t.x2,i=t.y,n=t.y2,o=t.cx,a=t.cy;return[[e,i],[o,i],[r,i],[r,a],[r,n],[o,n],[e,n],[e,a]]}},{key:"getRotationPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.y;return[t.cx,e-20]}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}]),t}(),uy=function(){function t(e){ry(this,t),this.el=e,e.remember("_pointSelectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return ny(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.points)}},{key:"createPointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.createHandle.call(t,t.selection,e,r,i),t.selection.get(r+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",sy("point",t.el,t.points,r))}))}},{key:"createHandleFn",value:function(t){t.circle(5)}},{key:"updateHandleFn",value:function(t,e){t.center(e[0],e[1])}},{key:"updatePointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.updateHandle.call(t,t.selection.get(r+1),e,r,i)}))}},{key:"updatePoints",value:function(){var t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((function(e){return ly(e,t)}))}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}}]),t}(),hy=function(t){return function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===ey(e)&&(r=e,e=!0);var i=this.remember("_"+t.name);return i||(e.prototype instanceof cy?(i=new e(this),e=!0):i=new t(this),this.remember("_"+t.name,i)),i.active(e,r),this}};function fy(t){return fy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fy(t)}function dy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function py(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r3&&void 0!==arguments[3]?arguments[3]:null;return function(n){n.preventDefault(),n.stopPropagation();var o=n.pageX||n.touches[0].pageX,a=n.pageY||n.touches[0].pageY;e.fire(t,{x:o,y:a,event:n,index:i,points:r})}}function xy(t,e){var r=yy(t,2),i=r[0],n=r[1],o=e.a,a=e.b,s=e.c,l=e.d;return[i*o+n*s+e.e,i*a+n*l+e.f]}it(ar,{select:hy(cy)}),it([Eo,zo,on],{pointSelect:hy(uy)});var wy=function(){function t(e){dy(this,t),this.el=e,e.remember("_selectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return gy(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.handlePoints)}},{key:"createResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.createHandle.call(t,t.selection,e,r,i,n),t.selection.get(r+1).addClass("svg_select_handle svg_select_handle_"+n).on("mousedown.selection touchstart.selection",my(n,t.el,t.handlePoints,r))}))}},{key:"createHandleFn",value:function(t){t.polyline()}},{key:"updateHandleFn",value:function(t,e,r,i){var n=i.at(r-1),o=i[(r+1)%i.length],a=e,s=[a[0]-n[0],a[1]-n[1]],l=[a[0]-o[0],a[1]-o[1]],c=Math.sqrt(s[0]*s[0]+s[1]*s[1]),u=Math.sqrt(l[0]*l[0]+l[1]*l[1]),h=[s[0]/c,s[1]/c],f=[l[0]/u,l[1]/u],d=[a[0]-10*h[0],a[1]-10*h[1]],p=[a[0]-10*f[0],a[1]-10*f[1]];t.plot([d,a,p])}},{key:"updateResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.updateHandle.call(t,t.selection.get(r+1),e,r,i,n)}))}},{key:"createRotFn",value:function(t){t.line(),t.circle(5)}},{key:"getPoint",value:function(t){return this.handlePoints[this.order.indexOf(t)]}},{key:"getPointHandle",value:function(t){return this.selection.get(this.order.indexOf(t)+1)}},{key:"updateRotFn",value:function(t,e){var r=this.getPoint("t");t.get(0).plot(r[0],r[1],e[0],e[1]),t.get(1).center(e[0],e[1])}},{key:"createRotationHandle",value:function(){var t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",my("rot",this.el,this.handlePoints));this.createRot.call(this,t)}},{key:"updateRotationHandle",value:function(){var t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}},{key:"updatePoints",value:function(){var t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((function(t){return xy(t,e)})),this.rotationPoint=xy(this.getRotationPoint(t),e)}},{key:"getHandlePoints",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.x,r=t.x2,i=t.y,n=t.y2,o=t.cx,a=t.cy;return[[e,i],[o,i],[r,i],[r,a],[r,n],[o,n],[e,n],[e,a]]}},{key:"getRotationPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.y;return[t.cx,e-20]}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}]),t}(),Sy=function(){function t(e){dy(this,t),this.el=e,e.remember("_pointSelectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return gy(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.points)}},{key:"createPointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.createHandle.call(t,t.selection,e,r,i),t.selection.get(r+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",my("point",t.el,t.points,r))}))}},{key:"createHandleFn",value:function(t){t.circle(5)}},{key:"updateHandleFn",value:function(t,e){t.center(e[0],e[1])}},{key:"updatePointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.updateHandle.call(t,t.selection.get(r+1),e,r,i)}))}},{key:"updatePoints",value:function(){var t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((function(e){return xy(e,t)}))}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}}]),t}(),ky=function(t){return function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===fy(e)&&(r=e,e=!0);var i=this.remember("_"+t.name);return i||(e.prototype instanceof wy?(i=new e(this),e=!0):i=new t(this),this.remember("_"+t.name,i)),i.active(e,r),this}};it(ar,{select:ky(wy)}),it([Eo,zo,on],{pointSelect:ky(Sy)});var Ay=function(t){return t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}},Oy=function(t){for(var e=1/0,r=1/0,i=-1/0,n=-1/0,o=0;o0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===fy(t)&&(e=t,t=!0);var r=this.remember("_ResizeHandler");return r||(t.prototype instanceof Py?(r=new t(this),t=!0):r=new Py(this),this.remember("_resizeHandler",r)),r.active(t,e),this}}),void 0===window.SVG&&(window.SVG=Zl),void 0===window.Apex&&(window.Apex={});var Ey=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,(r=[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new b(this.ctx),this.ctx.axes=new sf(this.ctx),this.ctx.core=new Bb(this.ctx.el,this.ctx),this.ctx.config=new Mu({}),this.ctx.data=new yh(this.ctx),this.ctx.grid=new _h(this.ctx),this.ctx.graphics=new Pc(this.ctx),this.ctx.coreUtils=new Mc(this.ctx),this.ctx.crosshairs=new hf(this.ctx),this.ctx.events=new Qh(this.ctx),this.ctx.exports=new Ah(this.ctx),this.ctx.fill=new Zu(this.ctx),this.ctx.localization=new rf(this.ctx),this.ctx.options=new pu,this.ctx.responsive=new gf(this.ctx),this.ctx.series=new fh(this.ctx),this.ctx.theme=new xf(this.ctx),this.ctx.formatters=new Jc(this.ctx),this.ctx.titleSubtitle=new Af(this.ctx),this.ctx.legend=new od(this.ctx),this.ctx.toolbar=new kd(this.ctx),this.ctx.tooltip=new mp(this.ctx),this.ctx.dimensions=new Uf(this.ctx),this.ctx.updateHelpers=new Zb(this.ctx),this.ctx.zoomPanSelection=new _d(this.ctx),this.ctx.w.globals.tooltip=new mp(this.ctx)}}])&&jy(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function My(t){return My="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},My(t)}function Ly(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null,r=this,i=r.w;return new Promise((function(n,o){if(null===r.el)return o(new Error("Not enough data to display or target element not found"));(null===e||i.globals.allSeriesCollapsed)&&r.series.handleNoData(),r.grid=new _h(r);var a,s,l=r.grid.drawGrid();if(r.annotations=new vu(r),r.annotations.drawImageAnnos(),r.annotations.drawTextAnnos(),"back"===i.config.grid.position&&(l&&i.globals.dom.elGraphical.add(l.el),null!=l&&null!==(a=l.elGridBorders)&&void 0!==a&&a.node&&i.globals.dom.elGraphical.add(l.elGridBorders)),Array.isArray(e.elGraph))for(var c=0;c0&&i.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),i.globals.axisCharts||i.globals.noData||r.core.resizeNonAxisCharts(),n(r)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,e){var r=Ry.get(e);r&&(r.disconnect(),Ry.delete(e))}(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,r){e.id===f.escapeString(t)&&Apex._chartInstances.splice(r,1)})),new _y(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=this.w;return a.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,r){return e.updateHelpers._extendSeries(t,r)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),a.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,r,i,n,o)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,r)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.w.config.series.slice();return i.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,e,r)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this;r.w.globals.dataChanged=!0,r.series.getPreviousPaths();for(var i=r.w.config.series.slice(),n=0;n0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;r&&(i=r),i.annotations.addXaxisAnnotationExternal(t,e,i)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;r&&(i=r),i.annotations.addYaxisAnnotationExternal(t,e,i)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;r&&(i=r),i.annotations.addPointAnnotationExternal(t,e,i)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=this;e&&(r=e),r.annotations.removeAnnotation(r,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Wh(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Wh(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Ah(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ah(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],i=[{key:"getChartByID",value:function(t){var e=f.escapeString(t);if(Apex._chartInstances){var r=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return r&&r.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),r=0;r2?n-2:0),a=2;a(()=>{var t={532:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",i=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),i&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),i&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,i,n,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),n&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=n):u[4]="".concat(n)),e.push(u))}},e}},547:t=>{"use strict";t.exports=function(t){return t[1]}},521:()=>{window.TreemapSquared={},function(){"use strict";window.TreemapSquared.generate=function(){function t(e,r,i,n){this.xoffset=e,this.yoffset=r,this.height=n,this.width=i,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,r=[],i=this.xoffset,n=this.yoffset,a=o(t)/this.height,s=o(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var i=e/this.height,n=this.width-i;r=new t(this.xoffset+i,this.yoffset,n,this.height)}else{var o=e/this.width,a=this.height-o;r=new t(this.xoffset,this.yoffset+o,this.width,a)}return r}}function e(e,i,n,a,s){a=void 0===a?0:a,s=void 0===s?0:s;var l=r(function(t,e){var r,i=[],n=e/o(t);for(r=0;r=i(n,r))}(e,l=t[0],s)?(e.push(l),r(t.slice(1),e,n,a)):(c=n.cutArea(o(e),a),a.push(n.getCoordinates(e)),r(t,[],c,a)),a;a.push(n.getCoordinates(e))}function i(t,e){var r=Math.min.apply(Math,t),i=Math.max.apply(Math,t),n=o(t);return Math.max(Math.pow(e,2)*i/Math.pow(n,2),Math.pow(n,2)/(Math.pow(e,2)*r))}function n(t){return t&&t.constructor===Array}function o(t){var e,r=0;for(e=0;e{"use strict";r.r(e),r.d(e,{default:()=>s});var i=r(547),n=r.n(i),o=r(532),a=r.n(o)()(n());a.push([t.id,'@keyframes opaque {\n 0% {\n opacity: 0\n }\n\n to {\n opacity: 1\n }\n}\n\n@keyframes resizeanim {\n\n 0%,\n to {\n opacity: 0\n }\n}\n\n.apexcharts-canvas {\n position: relative;\n direction: ltr !important;\n user-select: none\n}\n\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, .5);\n box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)\n}\n\n.apexcharts-inner {\n position: relative\n}\n\n.apexcharts-text tspan {\n font-family: inherit\n}\n\nrect.legend-mouseover-inactive,\n.legend-mouseover-inactive rect,\n.legend-mouseover-inactive path,\n.legend-mouseover-inactive circle,\n.legend-mouseover-inactive line,\n.legend-mouseover-inactive text.apexcharts-yaxis-title-text,\n.legend-mouseover-inactive text.apexcharts-yaxis-label {\n transition: .15s ease all;\n opacity: .2\n}\n\n.apexcharts-legend-text {\n padding-left: 15px;\n margin-left: -15px;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255, 255, 255, .96)\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30, 30, 30, .8)\n}\n\n.apexcharts-tooltip * {\n font-family: inherit\n}\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #eceff1;\n border-bottom: 1px solid #ddd\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0, 0, 0, .7);\n border-bottom: 1px solid #333\n}\n\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-z-value {\n display: inline-block;\n margin-left: 5px;\n font-weight: 600\n}\n\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-z-value:empty,\n.apexcharts-tooltip-title:empty {\n display: none\n}\n\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px\n}\n\n.apexcharts-tooltip-goals-group,\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n display: flex\n}\n\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px\n}\n\n.apexcharts-tooltip-marker {\n width: 12px;\n height: 12px;\n position: relative;\n top: 0;\n margin-right: 10px;\n border-radius: 50%\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,\n.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px\n}\n\n.apexcharts-custom-tooltip,\n.apexcharts-tooltip-box {\n padding: 4px 8px\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}',""]);const s=a},161:(t,e,r)=>{var i=r(72),n=r(2);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.id,n,""]]);var o=(i(t.id,n,{insert:"head",singleton:!1}),n.locals?n.locals:{});t.exports=o},72:(t,e,r)=>{"use strict";var i,n=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),o={};function a(t,e,r){for(var i=0;i{t.exports=''},627:t=>{t.exports=''},606:t=>{t.exports=''},75:t=>{t.exports=''},646:t=>{t.exports=''},802:t=>{t.exports=''},541:t=>{t.exports=''}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var o=e[i]={id:i,exports:{}};return t[i](o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nc=void 0;var i={};return(()=>{"use strict";r.r(i),r.d(i,{default:()=>Fy});var t={};r.r(t),r.d(t,{cx:()=>Yr,cy:()=>Hr,height:()=>Br,rx:()=>Rr,ry:()=>zr,width:()=>Fr,x:()=>Xr,y:()=>Dr});var e={};r.r(e),r.d(e,{from:()=>si,to:()=>li});var n={};r.r(n),r.d(n,{MorphArray:()=>Vi,height:()=>$i,width:()=>Zi,x:()=>Ui,y:()=>qi});var o={};r.r(o),r.d(o,{array:()=>xo,clear:()=>wo,move:()=>So,plot:()=>ko,size:()=>Ao});var a={};r.r(a),r.d(a,{amove:()=>$a,ax:()=>qa,ay:()=>Za,build:()=>Ja,center:()=>Ua,cx:()=>Ga,cy:()=>Va,length:()=>Fa,move:()=>Wa,plain:()=>Ha,x:()=>Ba,y:()=>Na});var s={};function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t,e){for(var r=0;rXs,dx:()=>Ds,dy:()=>Ys,height:()=>Hs,move:()=>Fs,size:()=>Bs,width:()=>Ns,x:()=>Ws,y:()=>Gs});var h=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,i;return e=t,r=[{key:"shadeRGBColor",value:function(t,e){var r=e.split(","),i=t<0?0:255,n=t<0?-1*t:t,o=parseInt(r[0].slice(4),10),a=parseInt(r[1],10),s=parseInt(r[2],10);return"rgb("+(Math.round((i-o)*n)+o)+","+(Math.round((i-a)*n)+a)+","+(Math.round((i-s)*n)+s)+")"}},{key:"shadeHexColor",value:function(t,e){var r=parseInt(e.slice(1),16),i=t<0?0:255,n=t<0?-1*t:t,o=r>>16,a=r>>8&255,s=255&r;return"#"+(16777216+65536*(Math.round((i-o)*n)+o)+256*(Math.round((i-a)*n)+a)+(Math.round((i-s)*n)+s)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,r){return t.isColorHex(r)?this.shadeHexColor(e,r):this.shadeRGBColor(e,r)}}],i=[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===l(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,r=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var r="",i=t<0?"-":"",n=e[0].replace(".",""),o=Number(e[1])+1;if(o<0){for(r=i+"0.";o++;)r+="0";return r+n.replace(/^-/,"")}for(o-=n.length;o--;)r+="0";return n+r}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),r=t.clientHeight,i=t.clientWidth;return r-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[i-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),r]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var r=t.replace("#","");r=r.match(new RegExp("(.{"+r.length/3+"})","g"));for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:"x",r=t.toString().slice();return r.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,r){if(r>=t.length)for(var i=r-t.length+1;i--;)t.push(void 0);return t.splice(r,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t.style.key=e[r])}},{key:"preciseAddition",value:function(t,e){var r=(String(t).split(".")[1]||"").length,i=(String(e).split(".")[1]||"").length,n=Math.pow(10,Math.max(r,i));return(Math.round(t*n)+Math.round(e*n))/n}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,i=Math.pow(10,r-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*i),e=Math.round(Math.abs(e)*i);e;){var n=e;e=t%e,t=n}return t/i}},{key:"getPrimeFactors",value:function(t){for(var e=[],r=2;t>=2;)t%r==0?(e.push(r),t/=r):r++;return e}},{key:"mod",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,i=Math.pow(10,r-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*i))%(e=Math.round(Math.abs(e)*i))/i}}],r&&c(e.prototype,r),i&&c(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const f=h;function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function p(t,e){for(var r=0;r-1||n.indexOf("NaN")>-1)&&(n=u()),(!o.trim()||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=u()),c.globals.shouldAnimate||(a=1),t.plot(n).animate(1,s).plot(n).animate(a,s).plot(o).after((function(){f.isNumber(r)?r===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&l.animationCompleted(t):"none"!==i&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&e===c.globals.series.length-1||c.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}],r&&p(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function y(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||m(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function m(t,e){if(t){if("string"==typeof t)return x(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(t,e):void 0}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return o=t.done,t},e:function(t){a=!0,n=t},f:function(){try{o||null==e.return||e.return()}finally{if(a)throw n}}}}(t);try{for(i.s();!(r=i.n()).done;)k(r.value,e)}catch(t){i.e(t)}finally{i.f()}}else if("object"!==v(t))O(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(var n in t)k(n,t[n])}function A(t){return w[t]||{}}function O(t){S.push.apply(S,y(t))}function P(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function C(t,e,r){return(e=function(t){var e=function(t){if("object"!=T(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==T(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function T(t){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T(t)}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r2&&void 0!==arguments[2]?arguments[2]:{},i=function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:Y;return B.document.createElementNS(e,t)}function Z(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t instanceof W)return t;if("object"===G(t))return Q(t);if(null==t)return new V[U];if("string"==typeof t&&"<"!==t.charAt(0))return Q(B.document.querySelector(t));var r=e?B.document.createElement("div"):q("svg");return r.innerHTML=t,t=Q(r.firstChild),r.removeChild(r.firstChild),t}function $(t,e){return e&&(e instanceof B.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:q(t)}function J(t){if(!t)return null;if(t.instance instanceof W)return t.instance;if("#document-fragment"===t.nodeName)return new V.Fragment(t);var e=I(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":V[e]||(e="Dom"),new V[e](t)}var Q=J;function K(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.name,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return V[e]=t,r&&(V[U]=t),O(Object.getOwnPropertyNames(t.prototype)),t}var tt=1e3;function et(t){return"Svgjs"+I(t)+tt++}function rt(t){for(var e=t.children.length-1;e>=0;e--)rt(t.children[e]);return t.id?(t.id=et(t.nodeName),t):t}function it(t,e){var r,i;for(i=(t=Array.isArray(t)?t:[t]).length-1;i>=0;i--)for(r in e)t[i].prototype[r]=e[r]}function nt(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;it.length)&&(e=t.length);for(var r=0,i=Array(e);rt.length)&&(e=t.length);for(var r=0,i=Array(e);rt.length)&&(e=t.length);for(var r=0,i=Array(e);r1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}k("Dom",{classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(bt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),k("Dom",{css:function(t,e){var r={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){var e=t.split(/\s*:\s*/);r[e[0]]=e[1]})),r;if(arguments.length<2){if(Array.isArray(t)){var i,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return mt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(t);try{for(n.s();!(i=n.n()).done;){var o=i.value,a=o;r[o]=this.node.style.getPropertyValue(a)}}catch(t){n.e(t)}finally{n.f()}return r}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"===vt(t))for(var s in t)this.node.style.setProperty(s,null==t[s]||dt.test(t[s])?"":t[s])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||dt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),k("Dom",{data:function(t,e,r){if(null==t)return this.data(M(function(t){var e,r=t.length,i=[];for(e=0;e=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(i=o.n()).done;){var a=i.value;n[a]=this.data(a)}}catch(t){o.e(t)}finally{o.f()}return n}if("object"===xt(t))for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===r||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),k("Dom",{remember:function(t,e){if("object"===St(arguments[0]))for(var r in t)this.remember(r,t[r]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(var t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});var Mt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.init.apply(this,arguments)}var e,r,i;return e=t,r=[{key:"cmyk",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=Math.min(1-i,1-n,1-o);return 1===a?new t(0,0,0,1,"cmyk"):new t((1-i-a)/(1-a),(1-n-a)/(1-a),(1-o-a)/(1-a),a,"cmyk")}},{key:"hsl",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=Math.max(i,n,o),s=Math.min(i,n,o),l=(a+s)/2,c=a===s,u=a-s;return new t(360*(c?0:a===i?((n-o)/u+(n.5?u/(2-a-s):u/(a+s)),100*l,"hsl")}},{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"rgb";if(t=t||0,this.space)for(var o in this.space)delete this[this.space[o]];if("number"==typeof t)n="string"==typeof i?i:n,i="string"==typeof i?0:i,Object.assign(this,{_a:t,_b:e,_c:r,_d:i,space:n});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){var a=function(t,e){var r=Tt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Tt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Tt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Tt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Tt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Tt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return r.space=e||r.space,r}(t,e);Object.assign(this,a)}else if("string"==typeof t)if(ft.test(t)){var s=t.replace(ut,""),l=At(st.exec(s).slice(1,4).map((function(t){return parseInt(t)})),3),c=l[0],u=l[1],h=l[2];Object.assign(this,{_a:c,_b:u,_c:h,_d:0,space:"rgb"})}else{if(!ht.test(t))throw Error("Unsupported string format, can't construct Color");var f=at.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map((function(t){return parseInt(t,16)})),d=At(f,4),p=d[1],g=d[2],b=d[3];Object.assign(this,{_a:p,_b:g,_c:b,_d:0,space:"rgb"})}var y=this._a,v=this._b,m=this._c,x=this._d,w="rgb"===this.space?{r:y,g:v,b:m}:"xyz"===this.space?{x:y,y:v,z:m}:"hsl"===this.space?{h:y,s:v,l:m}:"lab"===this.space?{l:y,a:v,b:m}:"lch"===this.space?{l:y,c:v,h:m}:"cmyk"===this.space?{c:y,m:v,y:m,k:x}:{};Object.assign(this,w)}},{key:"lab",value:function(){var e=this.xyz(),r=e.x,i=e.y;return new t(116*i-16,500*(r-i),200*(i-e.z),"lab")}},{key:"lch",value:function(){var e=this.lab(),r=e.l,i=e.a,n=e.b,o=Math.sqrt(Math.pow(i,2)+Math.pow(n,2)),a=180*Math.atan2(n,i)/Math.PI;return a<0&&(a=360-(a*=-1)),new t(r,o,a,"lch")}},{key:"rgb",value:function(){if("rgb"===this.space)return this;if("lab"===(E=this.space)||"xyz"===E||"lch"===E){var e=this.x,r=this.y,i=this.z;if("lab"===this.space||"lch"===this.space){var n=this.l,o=this.a,a=this.b;if("lch"===this.space){var s=this.c,l=this.h,c=Math.PI/180;o=s*Math.cos(c*l),a=s*Math.sin(c*l)}var u=(n+16)/116,h=o/500+u,f=u-a/200,d=16/116,p=.008856,g=7.787;e=.95047*(Math.pow(h,3)>p?Math.pow(h,3):(h-d)/g),r=1*(Math.pow(u,3)>p?Math.pow(u,3):(u-d)/g),i=1.08883*(Math.pow(f,3)>p?Math.pow(f,3):(f-d)/g)}var b=3.2406*e+-1.5372*r+-.4986*i,y=-.9689*e+1.8758*r+.0415*i,v=.0557*e+-.204*r+1.057*i,m=Math.pow,x=.0031308;return new t(255*(b>x?1.055*m(b,1/2.4)-.055:12.92*b),255*(y>x?1.055*m(y,1/2.4)-.055:12.92*y),255*(v>x?1.055*m(v,1/2.4)-.055:12.92*v))}if("hsl"===this.space){var w=this.h,S=this.s,k=this.l;if(w/=360,k/=100,0==(S/=100))return new t(k*=255,k,k);var A=k<.5?k*(1+S):k+S-k*S,O=2*k-A;return new t(255*Et(O,A,w+1/3),255*Et(O,A,w),255*Et(O,A,w-1/3))}if("cmyk"===this.space){var P=this.c,C=this.m,j=this.y,T=this.k;return new t(255*(1-Math.min(1,P*(1-T)+T)),255*(1-Math.min(1,C*(1-T)+T)),255*(1-Math.min(1,j*(1-T)+T)))}return this;var E}},{key:"toArray",value:function(){return[this._a,this._b,this._c,this._d,this.space]}},{key:"toHex",value:function(){var t=At(this._clamped().map(jt),3),e=t[0],r=t[1],i=t[2];return"#".concat(e).concat(r).concat(i)}},{key:"toRgb",value:function(){var t=At(this._clamped(),3),e=t[0],r=t[1],i=t[2];return"rgb(".concat(e,",").concat(r,",").concat(i,")")}},{key:"toString",value:function(){return this.toHex()}},{key:"xyz",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,s=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,l=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,c=(.4124*a+.3576*s+.1805*l)/.95047,u=(.2126*a+.7152*s+.0722*l)/1,h=(.0193*a+.1192*s+.9505*l)/1.08883;return new t(c>.008856?Math.pow(c,1/3):7.787*c+16/116,u>.008856?Math.pow(u,1/3):7.787*u+16/116,h>.008856?Math.pow(h,1/3):7.787*h+16/116,"xyz")}},{key:"_clamped",value:function(){var t=this.rgb(),e=t._a,r=t._b,i=t._c,n=Math.max,o=Math.min,a=Math.round;return[e,r,i].map((function(t){return n(0,o(a(t),255))}))}}],i=[{key:"isColor",value:function(e){return e&&(e instanceof t||this.isRgb(e)||this.test(e))}},{key:"isRgb",value:function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}},{key:"random",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"vibrant",r=arguments.length>1?arguments[1]:void 0,i=Math.random,n=Math.round,o=Math.sin,a=Math.PI;if("vibrant"===e)return new t(24*i()+57,38*i()+45,360*i(),"lch");if("sine"===e)return new t(n(80*o(2*a*(r=null==r?i():r)/.5+.01)+150),n(50*o(2*a*r/.5+4.6)+200),n(100*o(2*a*r/.5+2.3)+150));if("pastel"===e)return new t(8*i()+86,17*i()+9,360*i(),"lch");if("dark"===e)return new t(10+10*i(),50*i()+86,360*i(),"lch");if("rgb"===e)return new t(255*i(),255*i(),255*i());if("lab"===e)return new t(100*i(),256*i()-128,256*i()-128,"lab");if("grey"===e){var s=255*i();return new t(s,s,s)}throw new Error("Unsupported random color mode")}},{key:"test",value:function(t){return"string"==typeof t&&(ht.test(t)||ft.test(t))}}],r&&Pt(e.prototype,r),i&&Pt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Lt(t){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lt(t)}function It(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.a,i=this.b,n=this.c,o=this.d,a=this.e,s=this.f,l=r*o-i*n,c=l>0?1:-1,u=c*Math.sqrt(r*r+i*i),h=Math.atan2(c*i,c*r),f=180/Math.PI*h,d=Math.cos(h),p=Math.sin(h),g=(r*n+i*o)/l,b=n*u/(g*r-i)||o*u/(g*i+r);return{scaleX:u,scaleY:b,shear:g,rotate:f,translateX:a-t+t*d*u+e*(g*d*u-p*b),translateY:s-e+t*p*u+e*(g*p*u+d*b),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}},{key:"equals",value:function(e){if(e===this)return!0;var r=new t(e);return Yt(this.a,r.a)&&Yt(this.b,r.b)&&Yt(this.c,r.c)&&Yt(this.d,r.d)&&Yt(this.e,r.e)&&Yt(this.f,r.f)}},{key:"flip",value:function(t,e){return this.clone().flipO(t,e)}},{key:"flipO",value:function(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}},{key:"init",value:function(e){var r=t.fromArray([1,0,0,1,0,0]);return e=e instanceof ar?e.matrixify():"string"==typeof e?t.fromArray(e.split(bt).map(parseFloat)):Array.isArray(e)?t.fromArray(e):"object"===zt(e)&&t.isMatrixLike(e)?e:"object"===zt(e)?(new t).transform(e):6===arguments.length?t.fromArray([].slice.call(arguments)):r,this.a=null!=e.a?e.a:r.a,this.b=null!=e.b?e.b:r.b,this.c=null!=e.c?e.c:r.c,this.d=null!=e.d?e.d:r.d,this.e=null!=e.e?e.e:r.e,this.f=null!=e.f?e.f:r.f,this}},{key:"inverse",value:function(){return this.clone().inverseO()}},{key:"inverseO",value:function(){var t=this.a,e=this.b,r=this.c,i=this.d,n=this.e,o=this.f,a=t*i-e*r;if(!a)throw new Error("Cannot invert "+this);var s=i/a,l=-e/a,c=-r/a,u=t/a,h=-(s*n+c*o),f=-(l*n+u*o);return this.a=s,this.b=l,this.c=c,this.d=u,this.e=h,this.f=f,this}},{key:"lmultiply",value:function(t){return this.clone().lmultiplyO(t)}},{key:"lmultiplyO",value:function(e){var r=e instanceof t?e:new t(e);return t.matrixMultiply(r,this,this)}},{key:"multiply",value:function(t){return this.clone().multiplyO(t)}},{key:"multiplyO",value:function(e){var r=e instanceof t?e:new t(e);return t.matrixMultiply(this,r,this)}},{key:"rotate",value:function(t,e,r){return this.clone().rotateO(t,e,r)}},{key:"rotateO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t=L(t);var i=Math.cos(t),n=Math.sin(t),o=this.a,a=this.b,s=this.c,l=this.d,c=this.e,u=this.f;return this.a=o*i-a*n,this.b=a*i+o*n,this.c=s*i-l*n,this.d=l*i+s*n,this.e=c*i-u*n+r*n-e*i+e,this.f=u*i+c*n-e*n-r*i+r,this}},{key:"scale",value:function(){var t;return(t=this.clone()).scaleO.apply(t,arguments)}},{key:"scaleO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(i=r,r=e,e=t);var n=this.a,o=this.b,a=this.c,s=this.d,l=this.e,c=this.f;return this.a=n*t,this.b=o*e,this.c=a*t,this.d=s*e,this.e=l*t-r*t+r,this.f=c*e-i*e+i,this}},{key:"shear",value:function(t,e,r){return this.clone().shearO(t,e,r)}},{key:"shearO",value:function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.a,i=this.b,n=this.c,o=this.d,a=this.e,s=this.f;return this.a=r+i*t,this.c=n+o*t,this.e=a+s*t-e*t,this}},{key:"skew",value:function(){var t;return(t=this.clone()).skewO.apply(t,arguments)}},{key:"skewO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(i=r,r=e,e=t),t=L(t),e=L(e);var n=Math.tan(t),o=Math.tan(e),a=this.a,s=this.b,l=this.c,c=this.d,u=this.e,h=this.f;return this.a=a+s*n,this.b=s+a*o,this.c=l+c*n,this.d=c+l*o,this.e=u+h*n-i*n,this.f=h+u*o-r*o,this}},{key:"skewX",value:function(t,e,r){return this.skew(t,0,e,r)}},{key:"skewY",value:function(t,e,r){return this.skew(0,t,e,r)}},{key:"toArray",value:function(){return[this.a,this.b,this.c,this.d,this.e,this.f]}},{key:"toString",value:function(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}},{key:"transform",value:function(e){if(t.isMatrixLike(e))return new t(e).multiplyO(this);var r=t.formatTransforms(e),i=new Rt(r.ox,r.oy).transform(this),n=i.x,o=i.y,a=(new t).translateO(r.rx,r.ry).lmultiplyO(this).translateO(-n,-o).scaleO(r.scaleX,r.scaleY).skewO(r.skewX,r.skewY).shearO(r.shear).rotateO(r.theta).translateO(n,o);if(isFinite(r.px)||isFinite(r.py)){var s=new Rt(n,o).transform(a),l=isFinite(r.px)?r.px-s.x:0,c=isFinite(r.py)?r.py-s.y:0;a.translateO(l,c)}return a.translateO(r.tx,r.ty),a}},{key:"translate",value:function(t,e){return this.clone().translateO(t,e)}},{key:"translateO",value:function(t,e){return this.e+=t||0,this.f+=e||0,this}},{key:"valueOf",value:function(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}],i=[{key:"formatTransforms",value:function(t){var e="both"===t.flip||!0===t.flip,r=t.flip&&(e||"x"===t.flip)?-1:1,i=t.flip&&(e||"y"===t.flip)?-1:1,n=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,o=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,a=t.scale&&t.scale.length?t.scale[0]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleX)?t.scaleX*r:r,s=t.scale&&t.scale.length?t.scale[1]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleY)?t.scaleY*i:i,l=t.shear||0,c=t.rotate||t.theta||0,u=new Rt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),h=u.x,f=u.y,d=new Rt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=d.x,g=d.y,b=new Rt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=b.x,v=b.y,m=new Rt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:a,scaleY:s,skewX:n,skewY:o,shear:l,theta:c,rx:m.x,ry:m.y,tx:y,ty:v,ox:h,oy:f,px:p,py:g}}},{key:"fromArray",value:function(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}},{key:"isMatrixLike",value:function(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}},{key:"matrixMultiply",value:function(t,e,r){var i=t.a*e.a+t.c*e.b,n=t.b*e.a+t.d*e.b,o=t.a*e.c+t.c*e.d,a=t.b*e.c+t.d*e.d,s=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return r.a=i,r.b=n,r.c=o,r.d=a,r.e=s,r.f=l,r}}],r&&Xt(e.prototype,r),i&&Xt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ft(){if(!Ft.nodes){var t=Z().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");var e=t.path().node;Ft.nodes={svg:t,path:e}}if(!Ft.nodes.svg.node.parentNode){var r=B.document.body||B.document.documentElement;Ft.nodes.svg.addTo(r)}return Ft.nodes}function Bt(t){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bt(t)}function Nt(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s1?e-1:0),i=1;it.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];return t instanceof Array?t:t.trim().split(bt).map(parseFloat)}},{key:"toArray",value:function(){return Array.prototype.concat.apply([],this)}},{key:"toSet",value:function(){return new Set(this)}},{key:"toString",value:function(){return this.join(" ")}},{key:"valueOf",value:function(){var t=[];return t.push.apply(t,Pe(this)),t}}],r&&je(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Ee(Array));function Re(t){return Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Re(t)}function ze(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.writeDataToDom();var r=this.node.cloneNode(t);return e&&(r=rt(r)),new this.constructor(r)}},{key:"each",value:function(t,e){var r,i,n=this.children();for(r=0,i=n.length;r=0}},{key:"html",value:function(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}},{key:"id",value:function(t){return void 0!==t||this.node.id||(this.node.id=et(this.type)),this.attr("id",t)}},{key:"index",value:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}},{key:"last",value:function(){return J(this.node.lastChild)}},{key:"matches",value:function(t){var e=this.node,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return r&&r.call(e,t)}},{key:"parent",value:function(t){var e=this;if(!e.node.parentNode)return null;if(e=J(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=J(e.node.parentNode));return e}},{key:"put",value:function(t,e){return t=Z(t),this.add(t,e),t}},{key:"putIn",value:function(t,e){return Z(t).add(this,e)}},{key:"remove",value:function(){return this.parent()&&this.parent().removeElement(this),this}},{key:"removeElement",value:function(t){return this.node.removeChild(t.node),this}},{key:"replace",value:function(t){return t=Z(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}},{key:"round",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=Math.pow(10,t),i=this.attr(e);for(var n in i)"number"==typeof i[n]&&(i[n]=Math.round(i[n]*r)/r);return this.attr(i),this}},{key:"svg",value:function(t,e){return this.xml(t,e,Y)}},{key:"toString",value:function(){return this.id()}},{key:"words",value:function(t){return this.node.textContent=t,this}},{key:"wrap",value:function(t){var e=this.parent();if(!e)return this.addTo(t);var r=e.index(this);return e.put(t,r).put(this)}},{key:"writeDataToDom",value:function(){return this.each((function(){this.writeDataToDom()})),this}},{key:"xml",value:function(t,e,r){if("boolean"==typeof t&&(r=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();var i=this;if(null!=t){if(i=J(i.node.cloneNode(!0)),e){var n=t(i);if(i=n||i,!1===n)return""}i.each((function(){var e=t(this),r=e||this;!1===e?this.remove():e&&this!==r&&this.replace(r)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;var o=q("wrapper",r),a=B.document.createDocumentFragment();o.innerHTML=t;for(var s=o.children.length;s--;)a.appendChild(o.firstElementChild);var l=this.parent();return e?this.replace(a)&&l:this.add(a)}}],r&&We(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Se);function Je(t){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Je(t)}function Qe(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(e=this.node.attributes);try{for(o.s();!(n=o.n()).done;){var a=n.value;t[a.nodeName]=pt.test(a.nodeValue)?parseFloat(a.nodeValue):a.nodeValue}}catch(t){o.e(t)}finally{o.f()}return t}if(t instanceof Array)return t.reduce((function(t,e){return t[e]=i.attr(e),t}),{});if("object"===Ye(t)&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ae[t]:pt.test(e)?parseFloat(e):e;"number"==typeof(e=Be.reduce((function(e,r){return r(t,e,i)}),e))?e=new De(e):Fe.has(t)&&Mt.isColor(e)?e=new Mt(e):e.constructor===Array&&(e=new _e(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof r?this.node.setAttributeNS(r,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return oe(t,this.node)},findOne:function(t){return J(this.node.querySelector(t))}}),K($e,"Dom");var ar=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&er(t,e)}(n,t);var e,r,i=rr(n);function n(t,e){var r,o,a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=i.call(this,t,e)).dom={},r.node.instance=ir(r),(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&r.setData(null!==(o=null!==(a=JSON.parse(t.getAttribute("data-svgjs")))&&void 0!==a?a:JSON.parse(t.getAttribute("svgjs:data")))&&void 0!==o?o:{}),r}return e=n,r=[{key:"center",value:function(t,e){return this.cx(t).cy(e)}},{key:"cx",value:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}},{key:"cy",value:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}},{key:"defs",value:function(){var t=this.root();return t&&t.defs()}},{key:"dmove",value:function(t,e){return this.dx(t).dy(e)}},{key:"dx",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.x(new De(t).plus(this.x()))}},{key:"dy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.y(new De(t).plus(this.y()))}},{key:"getEventHolder",value:function(){return this}},{key:"height",value:function(t){return this.attr("height",t)}},{key:"move",value:function(t,e){return this.x(t).y(e)}},{key:"parents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.root(),e="string"==typeof t;e||(t=Z(t));for(var r=new ie,i=this;(i=i.parent())&&i.node!==B.document&&"#document-fragment"!==i.nodeName&&(r.push(i),e||i.node!==t.node)&&(!e||!i.matches(t));)if(i.node===this.root().node)return null;return r}},{key:"reference",value:function(t){if(!(t=this.attr(t)))return null;var e=(t+"").match(lt);return e?Z(e[1]):null}},{key:"root",value:function(){var t=this.parent(V[U]);return t&&t.root()}},{key:"setData",value:function(t){return this.dom=t,this}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.width(new De(r.width)).height(new De(r.height))}},{key:"width",value:function(t){return this.attr("width",t)}},{key:"writeDataToDom",value:function(){return D(this,this.dom),tr(or(n.prototype),"writeDataToDom",this).call(this)}},{key:"x",value:function(t){return this.attr("x",t)}},{key:"y",value:function(t){return this.attr("y",t)}}],r&&Qe(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}($e);function sr(t){return sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sr(t)}it(ar,{bbox:function(){var t=Ut(this,(function(t){return t.getBBox()}),(function(t){try{var e=t.clone().addTo(Ft().svg).show(),r=e.node.getBBox();return e.remove(),r}catch(e){throw new Error('Getting bbox of element "'.concat(t.node.nodeName,'" is not possible: ').concat(e.toString()))}}));return new Vt(t)},rbox:function(t){var e=Ut(this,(function(t){return t.getBoundingClientRect()}),(function(t){throw new Error('Getting rbox of element "'.concat(t.node.nodeName,'" is not possible'))})),r=new Vt(e);return t?r.transform(t.screenCTM().inverseO()):r.addOffset()},inside:function(t,e){var r=this.bbox();return t>r.x&&e>r.y&&t=0;e--)null!=r[lr[t][e]]&&this.attr(lr.prefix(t,lr[t][e]),r[lr[t][e]]);return this},k(["Element","Runner"],r)})),k(["Element","Runner"],{matrix:function(t,e,r,i,n,o){return null==t?new Ht(this):this.attr("transform",new Ht(t,e,r,i,n,o))},rotate:function(t,e,r){return this.transform({rotate:t,ox:e,oy:r},!0)},skew:function(t,e,r,i){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:r},!0):this.transform({skew:[t,e],ox:r,oy:i},!0)},shear:function(t,e,r){return this.transform({shear:t,ox:e,oy:r},!0)},scale:function(t,e,r,i){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:r},!0):this.transform({scale:[t,e],ox:r,oy:i},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"both",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"center";return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),k("radius",{radius:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return"radialGradient"===(this._element||this).type?this.attr("r",new De(t)):this.rx(t).ry(e)}}),k("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Rt(this.node.getPointAtLength(t))}}),k(["Element","Runner"],{font:function(t,e){if("object"===sr(t)){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),k("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),k("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(ct).slice(0,-1).map((function(t){var e=t.trim().split("(");return[e[0],e[1].split(bt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(Ht.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new Ht)},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);var r=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(i.multiply(r)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){var r=new Ht(this).decompose();return null==t?r:r[t]}Ht.isMatrixLike(t)||(t=hr(hr({},t),{},{origin:R(t,this)}));var i=new Ht(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});var xr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&br(t,e)}(n,t);var e,r,i=yr(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.apply(this,arguments)}return e=n,r=[{key:"flatten",value:function(){return this.each((function(){if(this instanceof n)return this.flatten().ungroup()})),this}},{key:"ungroup",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.parent(),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.index(this);return e=-1===e?t.children().length:e,this.each((function(r,i){return i[i.length-r-1].toParent(t,e)})),this.remove()}}],r&&pr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(ar);function wr(t){return wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wr(t)}function Sr(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("defs",t),e)}return e=n,(r=[{key:"flatten",value:function(){return this}},{key:"ungroup",value:function(){return this}}])&&Sr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Tr(t){return Tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tr(t)}function Er(t,e){return Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Er(t,e)}function Mr(t){var e=Lr();return function(){var r,i=Ir(t);if(e){var n=Ir(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Tr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Lr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Lr=function(){return!!t})()}function Ir(t){return Ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ir(t)}K(jr,"Defs");var _r=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Er(t,e)}(r,t);var e=Mr(r);function r(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.apply(this,arguments)}return r}(ar);function Rr(t){return this.attr("rx",t)}function zr(t){return this.attr("ry",t)}function Xr(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Dr(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Yr(t){return this.attr("cx",t)}function Hr(t){return this.attr("cy",t)}function Fr(t){return null==t?2*this.rx():this.rx(new De(t).divide(2))}function Br(t){return null==t?2*this.ry():this.ry(new De(t).divide(2))}function Nr(t){return Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nr(t)}function Wr(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("ellipse",t),e)}return e=n,r=[{key:"size",value:function(t,e){var r=_(this,t,e);return this.rx(new De(r.width).divide(2)).ry(new De(r.height).divide(2))}}],r&&Wr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function Jr(t){return Jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jr(t)}function Qr(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.put(new $r).size(t,e).move(0,0)}))}),K($r,"Ellipse");var oi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ei(t,e)}(n,t);var e,r,i=ri(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B.document.createDocumentFragment();return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,t)}return e=n,(r=[{key:"xml",value:function(t,e,r){if("boolean"==typeof t&&(r=e,e=t,t=null),null==t||"function"==typeof t){var i=new $e(q("wrapper",r));return i.add(this.node.cloneNode(!0)),i.xml(!1,r)}return ti(ni(n.prototype),"xml",this).call(this,t,!1,r)}}])&&Qr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}($e);K(oi,"Fragment");const ai=oi;function si(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new De(t),fy:new De(e)}):this.attr({x1:new De(t),y1:new De(e)})}function li(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new De(t),cy:new De(e)}):this.attr({x2:new De(t),y2:new De(e)})}function ci(t){return ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(t)}function ui(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("pattern",t),e)}return e=n,(r=[{key:"attr",value:function(t,e,r){return"transform"===t&&(t="patternTransform"),wi(Oi(n.prototype),"attr",this).call(this,t,e,r)}},{key:"bbox",value:function(){return new Vt}},{key:"targets",value:function(){return oe("svg [fill*="+this.id()+"]")}},{key:"toString",value:function(){return this.url()}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"url",value:function(){return"url(#"+this.id()+")"}}])&&mi(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Ci(t){return Ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ci(t)}function ji(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("image",t),e)}return e=n,r=[{key:"load",value:function(t,e){if(!t)return this;var r=new B.window.Image;return de(r,"load",(function(t){var i=this.parent(Pi);0===this.width()&&0===this.height()&&this.size(r.width,r.height),i instanceof Pi&&0===i.width()&&0===i.height()&&i.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),de(r,"load error",(function(){pe(r)})),this.attr("href",r.src=t,F)}}],r&&ji(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function zi(t){return zi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zi(t)}function Xi(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Di(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Di(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Di(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}},{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0],e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(bt).map(parseFloat)).length%2!=0&&t.pop();for(var r=0,i=t.length;r=0;r--)i.width&&(this[r][0]=(this[r][0]-i.x)*t/i.width+i.x),i.height&&(this[r][1]=(this[r][1]-i.y)*e/i.height+i.y);return this}},{key:"toLine",value:function(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}},{key:"toString",value:function(){for(var t=[],e=0,r=this.length;e1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("line",t),e)}return e=n,r=[{key:"array",value:function(){return new Gi([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}},{key:"move",value:function(t,e){return this.attr(this.array().move(t,e).toLine())}},{key:"plot",value:function(t,e,r,i){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:r,y2:i}:new Gi(t).toLine(),this.attr(t))}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.attr(this.array().size(r.width,r.height).toLine())}}],r&&Qi(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function an(t){return an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},an(t)}function sn(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("marker",t),e)}return e=n,r=[{key:"height",value:function(t){return this.attr("markerHeight",t)}},{key:"orient",value:function(t){return this.attr("orient",t)}},{key:"ref",value:function(t,e){return this.attr("refX",t).attr("refY",e)}},{key:"toString",value:function(){return"url(#"+this.id()+")"}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"width",value:function(t){return this.attr("markerWidth",t)}}],r&&sn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function pn(t){return pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pn(t)}function gn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bn(t,e)}function bn(t,e){return bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bn(t,e)}function yn(t){var e=vn();return function(){var r,i=mn(t);if(e){var n=mn(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==pn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function vn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(vn=function(){return!!t})()}function mn(t){return mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mn(t)}function xn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wn(t,e){for(var r=0;r":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,r,i){return function(n){return n<0?t>0?e/t*n:r>0?i/r*n:0:n>1?r<1?(1-i)/(1-r)*n+(i-r)/(1-r):t<1?(1-e)/(1-t)*n+(e-t)/(1-t):1:3*n*Math.pow(1-n,2)*e+3*Math.pow(n,2)*(1-n)*i+Math.pow(n,3)}},steps:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"end";e=e.split("-").reverse()[0];var r=t;return"none"===e?--r:"both"===e&&++r,function(i){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=Math.floor(i*t),a=i*o%1==0;return"start"!==e&&"both"!==e||++o,n&&a&&--o,i>=0&&o<0&&(o=0),i<=1&&o>r&&(o=r),o/r}}},Pn=function(){function t(){xn(this,t)}return Sn(t,[{key:"done",value:function(){return!1}}]),t}(),Cn=function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:">";return xn(this,r),(t=e.call(this)).ease=On[i]||i,t}return Sn(r,[{key:"step",value:function(t,e,r){return"number"!=typeof t?r<1?t:e:t+(e-t)*this.ease(r)}}]),r}(Pn),jn=function(t){gn(r,t);var e=yn(r);function r(t){var i;return xn(this,r),(i=e.call(this)).stepper=t,i}return Sn(r,[{key:"done",value:function(t){return t.done}},{key:"step",value:function(t,e,r,i){return this.stepper(t,e,r,i)}}]),r}(Pn);function Tn(){var t=(this._duration||500)/1e3,e=this._overshoot||0,r=Math.PI,i=Math.log(e/100+1e-10),n=-i/Math.sqrt(r*r+i*i),o=3.9/(n*t);this.d=2*n*o,this.k=o*o}it(function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return xn(this,r),(t=e.call(this)).duration(i).overshoot(n),t}return Sn(r,[{key:"step",value:function(t,e,r,i){if("string"==typeof t)return t;if(i.done=r===1/0,r===1/0)return e;if(0===r)return t;r>100&&(r=16),r/=1e3;var n=i.velocity||0,o=-this.d*n-this.k*(t-e),a=t+n*r+o*r*r/2;return i.velocity=n+o*r,i.done=Math.abs(e-a)+Math.abs(n)<.002,i.done?e:a}}]),r}(jn),{duration:An("_duration",Tn),overshoot:An("_overshoot",Tn)});var En=function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.01,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3;return xn(this,r),(t=e.call(this)).p(i).i(n).d(o).windup(a),t}return Sn(r,[{key:"step",value:function(t,e,r,i){if("string"==typeof t)return t;if(i.done=r===1/0,r===1/0)return e;if(0===r)return t;var n=e-t,o=(i.integral||0)+n*r,a=(n-(i.error||0))/r,s=this._windup;return!1!==s&&(o=Math.max(-s,Math.min(o,s))),i.error=n,i.integral=o,i.done=Math.abs(n)<.001,i.done?e:t+(this.P*n+this.I*o+this.D*a)}}]),r}(jn);it(En,{windup:An("_windup"),p:An("P"),i:An("I"),d:An("D")});for(var Mn={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Ln={M:function(t,e,r){return e.x=r.x=t[0],e.y=r.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,r){return e.x=r.x,e.y=r.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},In="mlhvqtcsaz".split(""),_n=0,Rn=In.length;_n=0;n--)"M"===(i=this[n][0])||"L"===i||"T"===i?(this[n][1]+=t,this[n][2]+=e):"H"===i?this[n][1]+=t:"V"===i?this[n][1]+=e:"C"===i||"S"===i||"Q"===i?(this[n][1]+=t,this[n][2]+=e,this[n][3]+=t,this[n][4]+=e,"C"===i&&(this[n][5]+=t,this[n][6]+=e)):"A"===i&&(this[n][6]+=t,this[n][7]+=e);return this}},{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"M0 0";return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t){for(var e=0,r="",i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:!(arguments.length>1&&void 0!==arguments[1])||arguments[1],p0:new Rt,p:new Rt};i.lastToken=r,r=t.charAt(e++);)if(i.inSegment||!Xn(i,r))if("."!==r)if(isNaN(parseInt(r)))if(Bn.has(r))i.inNumber&&Dn(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(yt.test(r)){if(i.inNumber)Dn(i,!1);else{if(!zn(i))throw new Error("parser Error");Yn(i)}--e}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!Fn(i)){Dn(i,!1),--e;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||Hn(i)){i.inNumber=!0,i.number=r,Dn(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){Dn(i,!1),--e;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&Dn(i,!1),i.inSegment&&zn(i)&&Yn(i),i.segments}(t)}},{key:"size",value:function(t,e){var r,i,n=this.bbox();for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)"M"===(i=this[r][0])||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}},{key:"toString",value:function(){return function(t){for(var e="",r=0,i=t.length;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r-1?t.constructor:Array.isArray(t)?_e:"object"===e?co:ao},oo=function(){function t(e){Kn(this,t),this._stepper=e||new Cn("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}return eo(t,[{key:"at",value:function(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}},{key:"done",value:function(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}},{key:"from",value:function(t){return null==t?this._from:(this._from=this._set(t),this)}},{key:"stepper",value:function(t){return null==t?this._stepper:(this._stepper=t,this)}},{key:"to",value:function(t){return null==t?this._to:(this._to=this._set(t),this)}},{key:"type",value:function(t){return null==t?this._type:(this._type=t,this)}},{key:"_set",value:function(t){this._type||this.type(no(t));var e=new this._type(t);return this._type===Mt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===co&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}]),t}(),ao=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"init",value:function(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}},{key:"toArray",value:function(){return[this.value]}},{key:"valueOf",value:function(){return this.value}}]),t}(),so=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"init",value:function(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,t.defaults,e),this}},{key:"toArray",value:function(){var t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}]),t}();so.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};var lo=function(t,e){return t[0]e[0]?1:0},co=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"align",value:function(t){for(var e=this.values,r=0,i=e.length;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("path",t),e)}return e=n,r=[{key:"array",value:function(){return this._array||(this._array=new $n(this.attr("d")))}},{key:"clear",value:function(){return delete this._array,this}},{key:"height",value:function(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}},{key:"move",value:function(t,e){return this.attr("d",this.array().move(t,e))}},{key:"plot",value:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new $n(t))}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.attr("d",this.array().size(r.width,r.height))}},{key:"width",value:function(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}},{key:"x",value:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}},{key:"y",value:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}],r&&fo(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function xo(){return this._array||(this._array=new Gi(this.attr("points")))}function wo(){return delete this._array,this}function So(t,e){return this.attr("points",this.array().move(t,e))}function ko(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Gi(t))}function Ao(t,e){var r=_(this,t,e);return this.attr("points",this.array().size(r.width,r.height))}function Oo(t){return Oo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oo(t)}function Po(t,e){return Po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Po(t,e)}function Co(t){var e=jo();return function(){var r,i=To(t);if(e){var n=To(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Oo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function jo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(jo=function(){return!!t})()}function To(t){return To=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},To(t)}mo.prototype.MorphArray=$n,k({Container:{path:nt((function(t){return this.put(new mo).plot(t||new $n)}))}}),K(mo,"Path");var Eo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Po(t,e)}(r,t);var e=Co(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("polygon",t),i)}return r}(_r);function Mo(t){return Mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mo(t)}function Lo(t,e){return Lo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lo(t,e)}function Io(t){var e=_o();return function(){var r,i=Ro(t);if(e){var n=Ro(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Mo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function _o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_o=function(){return!!t})()}function Ro(t){return Ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ro(t)}k({Container:{polygon:nt((function(t){return this.put(new Eo).plot(t||new Gi)}))}}),it(Eo,n),it(Eo,o),K(Eo,"Polygon");var zo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lo(t,e)}(r,t);var e=Io(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("polyline",t),i)}return r}(_r);function Xo(t){return Xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xo(t)}function Do(t,e){return Do=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Do(t,e)}function Yo(t){var e=Ho();return function(){var r,i=Fo(t);if(e){var n=Fo(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Xo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Ho(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ho=function(){return!!t})()}function Fo(t){return Fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fo(t)}k({Container:{polyline:nt((function(t){return this.put(new zo).plot(t||new Gi)}))}}),it(zo,n),it(zo,o),K(zo,"Polyline");var Bo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Do(t,e)}(r,t);var e=Yo(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("rect",t),i)}return r}(_r);function No(t){return No="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},No(t)}function Wo(t,e){for(var r=0;r=e.time?e.run():Uo.timeouts.push(e),e!==r););for(var i=null,n=Uo.frames.last();i!==n&&(i=Uo.frames.shift());)i.run(t);for(var o=null;o=Uo.immediates.shift();)o();Uo.nextDraw=Uo.timeouts.first()||Uo.frames.first()?B.window.requestAnimationFrame(Uo._draw):null}};const qo=Uo;function Zo(t){return Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zo(t)}function $o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:na;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(t=i.call(this))._timeSource=e,t.terminate(),t}return e=n,r=[{key:"active",value:function(){return!!this._nextFrame}},{key:"finish",value:function(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}},{key:"getEndTime",value:function(){var t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}},{key:"getEndTimeOfTimeline",value:function(){var t=this._runners.map((function(t){return t.start+t.runner.duration()}));return Math.max.apply(Math,[0].concat(function(t){return function(t){if(Array.isArray(t))return $o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return $o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)))}},{key:"getLastRunnerInfo",value:function(){return this.getRunnerInfoById(this._lastRunnerId)}},{key:"getRunnerInfoById",value:function(t){return this._runners[this._runnerIds.indexOf(t)]||null}},{key:"pause",value:function(){return this._paused=!0,this._continue()}},{key:"persist",value:function(t){return null==t?this._persist:(this._persist=t,this)}},{key:"play",value:function(){return this._paused=!1,this.updateTime()._continue()}},{key:"reverse",value:function(t){var e=this.speed();if(null==t)return this.speed(-e);var r=Math.abs(e);return this.speed(t?-r:r)}},{key:"schedule",value:function(t,e,r){if(null==t)return this._runners.map(ia);var i=0,n=this.getEndTime();if(e=e||0,null==r||"last"===r||"after"===r)i=n;else if("absolute"===r||"start"===r)i=e,e=0;else if("now"===r)i=this._time;else if("relative"===r){var o=this.getRunnerInfoById(t.id);o&&(i=o.start+e,e=0)}else{if("with-last"!==r)throw new Error('Invalid value for the "when" parameter');var a=this.getLastRunnerInfo();i=a?a.start:this._time}t.unschedule(),t.timeline(this);var s=t.persist(),l={persist:null===s?this._persist:s,start:i+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(l),this._runners.sort((function(t,e){return t.start-e.start})),this._runnerIds=this._runners.map((function(t){return t.runner.id})),this.updateTime()._continue(),this}},{key:"seek",value:function(t){return this.time(this._time+t)}},{key:"source",value:function(t){return null==t?this._timeSource:(this._timeSource=t,this)}},{key:"speed",value:function(t){return null==t?this._speed:(this._speed=t,this)}},{key:"stop",value:function(){return this.time(0),this.pause()}},{key:"time",value:function(t){return null==t?this._time:(this._time=t,this._continue(!0))}},{key:"unschedule",value:function(t){var e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}},{key:"updateTime",value:function(){return this.active()||(this._lastSourceTime=this._timeSource()),this}},{key:"_continue",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return qo.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qo.frame(this._step)),this)}},{key:"_stepFn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._timeSource(),r=e-this._lastSourceTime;t&&(r=0);var i=this._speed*r+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=i,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(var n=this._runners.length;n--;){var o=this._runners[n],a=o.runner;this._time-o.start<=0&&a.reset()}for(var s=!1,l=0,c=this._runners.length;l0?this._continue():(this.pause(),this.fire("finished")),this}},{key:"terminate",value:function(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}],r&&Jo(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Se);function aa(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=0;this._lastPosition=e;var i=this.duration(),n=this._lastTime<=0&&this._time>0,o=this._lastTime=i;this._lastTime=this._time,n&&this.fire("start",this);var a=this._isDeclarative;this.done=!a&&!o&&this._time>=i,this._reseted=!1;var s=!1;return(r||a)&&(this._initialise(r),this.transforms=new Ht,s=this._run(a?t:e),this.fire("step",this)),this.done=this.done||s&&a,o&&this.fire("finished",this),this}},{key:"time",value:function(t){if(null==t)return this._time;var e=t-this._time;return this.step(e),this}},{key:"timeline",value:function(t){return void 0===t?this._timeline:(this._timeline=t,this)}},{key:"unschedule",value:function(){var t=this.timeline();return t&&t.unschedule(this),this}},{key:"_initialise",value:function(t){if(t||this._isDeclarative)for(var e=0,r=this._queue.length;e0&&void 0!==arguments[0]?arguments[0]:new Ht,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ha(this,t),this.transforms=e,this.id=r,this.done=i}return da(t,[{key:"clearTransformsFromQueue",value:function(){}}]),t}();it([ma,xa],{mergeWith:function(t){return new xa(t.transforms.lmultiply(this.transforms),t.id)}});var wa=function(t,e){return t.lmultiplyO(e)},Sa=function(t){return t.transforms};function ka(){var t=this._transformationRunners.runners.map(Sa).reduce(wa,new Ht);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}var Aa=function(){function t(){ha(this,t),this.runners=[],this.ids=[]}return da(t,[{key:"add",value:function(t){if(!this.runners.includes(t)){var e=t.id+1;return this.runners.push(t),this.ids.push(e),this}}},{key:"clearBefore",value:function(t){var e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new xa).forEach((function(t){return t.clearTransformsFromQueue()})),this}},{key:"edit",value:function(t,e){var r=this.ids.indexOf(t+1);return this.ids.splice(r,1,t+1),this.runners.splice(r,1,e),this}},{key:"getByID",value:function(t){return this.runners[this.ids.indexOf(t+1)]}},{key:"length",value:function(){return this.ids.length}},{key:"merge",value:function(){for(var t=null,e=0;e0&&void 0!==arguments[0]?arguments[0]:0;return this._queueNumberDelta("x",t)},dy:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this._queueNumberDelta("y",t)},dmove:function(t,e){return this.dx(t).dy(e)},_queueNumberDelta:function(t,e){if(e=new De(e),this._tryRetarget(t,e))return this;var r=new oo(this._stepper).to(e),i=null;return this.queue((function(){i=this.element()[t](),r.from(i),r.to(i+e)}),(function(e){return this.element()[t](r.at(e)),r.done()}),(function(t){r.to(i+new De(t))})),this._rememberMorpher(t,r),this},_queueObject:function(t,e){if(this._tryRetarget(t,e))return this;var r=new oo(this._stepper).to(e);return this.queue((function(){r.from(this.element()[t]())}),(function(e){return this.element()[t](r.at(e)),r.done()})),this._rememberMorpher(t,r),this},_queueNumber:function(t,e){return this._queueObject(t,new De(e))},cx:function(t){return this._queueNumber("cx",t)},cy:function(t){return this._queueNumber("cy",t)},move:function(t,e){return this.x(t).y(e)},amove:function(t,e){return this.ax(t).ay(e)},center:function(t,e){return this.cx(t).cy(e)},size:function(t,e){var r;return t&&e||(r=this._element.bbox()),t||(t=r.width/r.height*e),e||(e=r.height/r.width*t),this.width(t).height(e)},width:function(t){return this._queueNumber("width",t)},height:function(t){return this._queueNumber("height",t)},plot:function(t,e,r,i){if(4===arguments.length)return this.plot([t,e,r,i]);if(this._tryRetarget("plot",t))return this;var n=new oo(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){n.from(this._element.array())}),(function(t){return this._element.plot(n.at(t)),n.done()})),this._rememberMorpher("plot",n),this},leading:function(t){return this._queueNumber("leading",t)},viewbox:function(t,e,r,i){return this._queueObject("viewbox",new Vt(t,e,r,i))},update:function(t){return"object"!==ua(t)?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),it(ma,{rx:Rr,ry:zr,from:si,to:li}),K(ma,"Runner");var Ia=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ta(t,e)}(n,t);var e,r,i=Ea(n);function n(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i.call(this,$("svg",t),r)).namespace(),e}return e=n,(r=[{key:"defs",value:function(){return this.isRoot()?J(this.node.querySelector("defs"))||this.put(new jr):this.root().defs()}},{key:"isRoot",value:function(){return!this.node.parentNode||!(this.node.parentNode instanceof B.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}},{key:"namespace",value:function(){return this.isRoot()?this.attr({xmlns:Y,version:"1.1"}).attr("xmlns:xlink",F,H):this.root().namespace()}},{key:"removeNamespace",value:function(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,H).attr("xmlns:svgjs",null,H)}},{key:"root",value:function(){return this.isRoot()?this:ja(La(n.prototype),"root",this).call(this)}}])&&Pa(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function _a(t){return _a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_a(t)}function Ra(t,e){return Ra=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ra(t,e)}function za(t){var e=Xa();return function(){var r,i=Da(t);if(e){var n=Da(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==_a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Xa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xa=function(){return!!t})()}function Da(t){return Da=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Da(t)}k({Container:{nested:nt((function(){return this.put(new Ia)}))}}),K(Ia,"Svg",!0);var Ya=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ra(t,e)}(r,t);var e=za(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("symbol",t),i)}return r}(xr);function Ha(t){return!1===this._build&&this.clear(),this.node.appendChild(B.document.createTextNode(t)),this}function Fa(){return this.node.getComputedTextLength()}function Ba(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Na(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function Wa(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox();return this.x(t,r).y(e,r)}function Ga(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function Va(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function Ua(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox();return this.cx(t,r).cy(e,r)}function qa(t){return this.attr("x",t)}function Za(t){return this.attr("y",t)}function $a(t,e){return this.ax(t).ay(e)}function Ja(t){return this._build=!!t,this}function Qa(t){return Qa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qa(t)}function Ka(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=i.call(this,$("text",t),o)).dom.leading=null!==(e=r.dom.leading)&&void 0!==e?e:new De(1.3),r._rebuild=!0,r._build=!1,r}return e=n,r=[{key:"leading",value:function(t){return null==t?this.dom.leading:(this.dom.leading=new De(t),this.rebuild())}},{key:"rebuild",value:function(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){var e=this,r=0,i=this.dom.leading;this.each((function(t){if(!X(this.node)){var n=B.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=i*new De(n);this.dom.newLined&&(this.attr("x",e.attr("x")),"\n"===this.text()?r+=o:(this.attr("dy",t?o+r:0),r=0))}})),this.fire("rebuild")}return this}},{key:"setData",value:function(t){return this.dom=t,this.dom.leading=new De(t.leading||1.3),this}},{key:"writeDataToDom",value:function(){return D(this,this.dom,{leading:1.3}),this}},{key:"text",value:function(t){if(void 0===t){var e=this.node.childNodes,r=0;t="";for(var i=0,n=e.length;i0&&void 0!==arguments[0]?arguments[0]:"";return this.put(new os).text(t)})),plain:nt((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.put(new os).plain(t)}))}}),K(os,"Text");var ds=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cs(t,e)}(n,t);var e,r,i=us(n);function n(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i.call(this,$("tspan",t),r))._build=!1,e}return e=n,r=[{key:"dx",value:function(t){return this.attr("dx",t)}},{key:"dy",value:function(t){return this.attr("dy",t)}},{key:"newLine",value:function(){this.dom.newLined=!0;var t=this.parent();if(!(t instanceof os))return this;var e=t.index(this),r=B.window.getComputedStyle(this.node).getPropertyValue("font-size"),i=t.dom.leading*new De(r);return this.dy(e?i:0).attr("x",t.x())}},{key:"text",value:function(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}],r&&ss(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function ps(t){return ps="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ps(t)}function gs(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:"",e=new ds;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.tspan(t).newLine()}}}),K(ds,"Tspan");var ws=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ys(t,e)}(n,t);var e,r,i=vs(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("circle",t),e)}return e=n,(r=[{key:"radius",value:function(t){return this.attr("r",t)}},{key:"rx",value:function(t){return this.attr("r",t)}},{key:"ry",value:function(t){return this.rx(t)}},{key:"size",value:function(t){return this.radius(new De(t).divide(2))}}])&&gs(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function Ss(t){return Ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ss(t)}function ks(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0;return this.put(new ws).size(t).move(0,0)}))}}),K(ws,"Circle");var Es=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ps(t,e)}(n,t);var e,r,i=Cs(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("clipPath",t),e)}return e=n,(r=[{key:"remove",value:function(){return this.targets().forEach((function(t){t.unclip()})),Os(Ts(n.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe("svg [clip-path*="+this.id()+"]")}}])&&ks(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Ms(t){return Ms="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ms(t)}function Ls(t,e){return Ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ls(t,e)}function Is(t){var e=_s();return function(){var r,i=Rs(t);if(e){var n=Rs(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Ms(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function _s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_s=function(){return!!t})()}function Rs(t){return Rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rs(t)}k({Container:{clip:nt((function(){return this.defs().put(new Es)}))},Element:{clipper:function(){return this.reference("clip-path")},clipWith:function(t){var e=t instanceof Es?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip:function(){return this.attr("clip-path",null)}}}),K(Es,"ClipPath");var zs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ls(t,e)}(r,t);var e=Is(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("foreignObject",t),i)}return r}(ar);function Xs(t,e){return this.children().forEach((function(r){var i;try{i=r.node instanceof N().SVGSVGElement?new Vt(r.attr(["x","y","width","height"])):r.bbox()}catch(t){return}var n=new Ht(r),o=n.translate(t,e).transform(n.inverse()),a=new Rt(i.x,i.y).transform(o);r.move(a.x,a.y)})),this}function Ds(t){return this.dmove(t,0)}function Ys(t){return this.dmove(0,t)}function Hs(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.height:this.size(e.width,t,e)}function Fs(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox(),i=t-r.x,n=e-r.y;return this.dmove(i,n)}function Bs(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox(),i=_(this,t,e,r),n=i.width/r.width,o=i.height/r.height;return this.children().forEach((function(t){var e=new Rt(r).transform(new Ht(t).inverse());t.scale(n,o,e.x,e.y)})),this}function Ns(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.width:this.size(t,e.height,e)}function Ws(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.x:this.move(t,e.y,e)}function Gs(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.y:this.move(e.x,t,e)}function Vs(t){return Vs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vs(t)}function Us(t,e){return Us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Us(t,e)}function qs(t){var e=Zs();return function(){var r,i=$s(t);if(e){var n=$s(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Vs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Zs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zs=function(){return!!t})()}function $s(t){return $s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$s(t)}k({Container:{foreignObject:nt((function(t,e){return this.put(new zs).size(t,e)}))}}),K(zs,"ForeignObject");var Js=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Us(t,e)}(r,t);var e=qs(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("g",t),i)}return r}(xr);function Qs(t){return Qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qs(t)}function Ks(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("a",t),e)}return e=n,(r=[{key:"target",value:function(t){return this.attr("target",t)}},{key:"to",value:function(t){return this.attr("href",t,F)}}])&&Ks(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function al(t){return al="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},al(t)}function sl(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("mask",t),e)}return e=n,(r=[{key:"remove",value:function(){return this.targets().forEach((function(t){t.unmask()})),cl(dl(n.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe("svg [mask*="+this.id()+"]")}}])&&sl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function gl(t){return gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gl(t)}function bl(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("stop",t),e)}return e=n,r=[{key:"update",value:function(t){return("number"==typeof t||t instanceof De)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new De(t.offset)),this}}],r&&bl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(ar);function kl(t){return kl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kl(t)}function Al(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Ol(t,e,r){return(e=Cl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pl(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("style",t),e)}return e=n,r=[{key:"addText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.node.textContent+=t,this}},{key:"font",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.rule("@font-face",function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("textPath",t),e)}return e=n,(r=[{key:"array",value:function(){var t=this.track();return t?t.array():null}},{key:"plot",value:function(t){var e=this.track(),r=null;return e&&(r=e.plot(t)),null==t?r:this}},{key:"track",value:function(){return this.reference("href")}}])&&_l(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(os);function Fl(t){return Fl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fl(t)}function Bl(t,e){for(var r=0;r1&&void 0!==arguments[1])||arguments[1],i=new Hl;if(t instanceof mo||(t=this.defs().path(t)),i.attr("href","#"+t,F),r)for(;e=this.node.firstChild;)i.node.appendChild(e);return this.put(i)})),textPath:function(){return this.findOne("textPath")}},Path:{text:nt((function(t){return t instanceof os||(t=(new os).addTo(this.parent()).text(t)),t.path(this)})),targets:function(){var t=this;return oe("svg textPath").filter((function(e){return(e.attr("href")||"").includes(t.id())}))}}}),Hl.prototype.MorphArray=$n,K(Hl,"TextPath");var ql=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wl(t,e)}(n,t);var e,r,i=Gl(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("use",t),e)}return e=n,(r=[{key:"use",value:function(t,e){return this.attr("href",(e||"")+"#"+t,F)}}])&&Bl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);k({Container:{use:nt((function(t,e){return this.put(new ql).use(t,e)}))}}),K(ql,"Use");var Zl=Z;function $l(t){return $l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$l(t)}function Jl(t){return function(t){if(Array.isArray(t))return Ql(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ql(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ql(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ql(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];uo.push.apply(uo,Jn([].concat(t)))}([De,Mt,Vt,Ht,_e,Gi,$n,Rt]),it(uo,{to:function(t){return(new oo).type(this.constructor).from(this.toArray()).to(t)},fromArray:function(t){return this.init(t),this},toConsumable:function(){return this.toArray()},morph:function(t,e,r,i,n){return this.fromArray(t.map((function(t,o){return i.step(t,e[o],r,n[o],n)})))}});var cc=function(t){nc(r,t);var e=ac(r);function r(t){var i;return Kl(this,r),(i=e.call(this,$("filter",t),t)).$source="SourceGraphic",i.$sourceAlpha="SourceAlpha",i.$background="BackgroundImage",i.$backgroundAlpha="BackgroundAlpha",i.$fill="FillPaint",i.$stroke="StrokePaint",i.$autoSetIn=!0,i}return ec(r,[{key:"put",value:function(t,e){return!(t=ic(lc(r.prototype),"put",this).call(this,t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}},{key:"remove",value:function(){return this.targets().each("unfilter"),ic(lc(r.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe('svg [filter*="'+this.id()+'"]')}},{key:"toString",value:function(){return"url(#"+this.id()+")"}}]),r}(ar),uc=function(t){nc(r,t);var e=ac(r);function r(t,i){var n;return Kl(this,r),(n=e.call(this,t,i)).result(n.id()),n}return ec(r,[{key:"in",value:function(t){if(null==t){var e=this.attr("in");return this.parent()&&this.parent().find('[result="'.concat(e,'"]'))[0]||e}return this.attr("in",t)}},{key:"result",value:function(t){return this.attr("result",t)}},{key:"toString",value:function(){return this.result()}}]),r}(ar),hc=function(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,F)},morphology:hc(["operator","radius"]),offset:hc(["dx","dy"]),specularLighting:hc(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:hc([]),turbulence:hc(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((function(t){var e=I(t),r=fc[t];cc[e+"Effect"]=function(t){nc(n,t);var i=ac(n);function n(t){return Kl(this,n),i.call(this,$("fe"+e,t),t)}return ec(n,[{key:"update",value:function(t){return r.apply(this,t),this}}]),n}(uc),cc.prototype[t]=nt((function(t){var r=new cc[e+"Effect"];if(null==t)return this.put(r);for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{},e=this.put(new cc.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;for(var r in t.r||t.g||t.b||t.a||(t={r:t,g:t,b:t,a:t}),t)e.add(new(cc["Func"+r.toUpperCase()])(t[r]));return e}}),["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((function(t){var e=I(t);cc[e]=function(t){nc(i,t);var r=ac(i);function i(t){return Kl(this,i),r.call(this,$("fe"+e,t),t)}return i}(uc)})),["funcR","funcG","funcB","funcA"].forEach((function(t){var e=cc[I(t)],r=nt((function(){return this.put(new e)}));cc.ComponentTransferEffect.prototype[t]=r})),["distantLight","pointLight","spotLight"].forEach((function(t){var e=cc[I(t)],r=nt((function(){return this.put(new e)}));cc.DiffuseLightingEffect.prototype[t]=r,cc.SpecularLightingEffect.prototype[t]=r})),it(cc.MergeEffect,{mergeNode:function(t){return this.put(new cc.MergeNode).attr("in",t)}}),it(jr,{filter:function(t){var e=this.put(new cc);return"function"==typeof t&&t.call(e,e),e}}),it(xr,{filter:function(t){return this.defs().filter(t)}}),it(ar,{filterWith:function(t){var e=t instanceof cc?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer:function(){return this.reference("filter")}});var dc={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,r,i){return this.parent()&&this.parent().diffuseLighting(t,r,i).in(this)},displacementMap:function(t,e,r,i){return this.parent()&&this.parent().displacementMap(this,t,e,r,i)},dropShadow:function(t,e,r){return this.parent()&&this.parent().dropShadow(this,t,e,r).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){var e;return t=t instanceof Array?t:Jl(t),this.parent()&&(e=this.parent()).merge.apply(e,[this].concat(Jl(t)))},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,r,i,n){return this.parent()&&this.parent().specularLighting(t,r,i,n).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,r,i,n){return this.parent()&&this.parent().turbulence(t,e,r,i,n).in(this)}};function pc(t){return pc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pc(t)}function gc(t,e){for(var r=0;r0&&-1===o.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:i,dx:l,dy:s,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:a,result:"blur"}),t.flood({"flood-color":c,"flood-opacity":u,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",i])}},{key:"dropShadow",value:function(t,e){var r,i,n,o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=this.w;return t.unfilter(!0),f.isMsEdge()&&"radialBar"===s.config.chart.type||(null===(r=s.config.chart.dropShadow.enabledOnSeries)||void 0===r?void 0:r.length)>0&&-1===(null===(n=s.config.chart.dropShadow.enabledOnSeries)||void 0===n?void 0:n.indexOf(a))||(t.filterWith((function(t){o.addShadow(t,a,e,"SourceGraphic")})),e.noUserSpaceOnUse||t.filterer().node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(i=t.filterer())||void 0===i?void 0:i.node)),t}},{key:"setSelectionFilter",value:function(t,e,r){var i=this.w;if(void 0!==i.globals.selectedDataPoints[e]&&i.globals.selectedDataPoints[e].indexOf(r)>-1){t.node.setAttribute("selected",!0);var n=i.config.states.active.filter;"none"!==n&&this.applyFilter(t,e,n.type)}}},{key:"_scaleFilterSize",value:function(t){t&&function(e){for(var r in e)e.hasOwnProperty(r)&&t.setAttribute(r,e[r])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}],r&&gc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const vc=yc;function mc(t){return mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mc(t)}function xc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function wc(t){for(var e=1;e2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function o(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var a=t.split(/[,\s]/).reduce((function(t,e){var r=e.match("([a-zA-Z])(.+)");return r?(t.push(r[1]),t.push(r[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),s=[];if(a.length>1){var l=o(a[0]),c=null;"Z"==a[a.length-1][0]&&a[0].length>2&&(c=["L",l.x,l.y],a[a.length-1]=c),s.push(a[0]);for(var u=1;u2&&"L"==f[0]&&d.length>2&&"L"==d[0]){var p,g,b=o(h),y=o(f),v=o(d);p=r(y,b,e),g=r(y,v,e),n(f,p),f.origPoint=y,s.push(f);var m=i(p,y,.5),x=i(y,g,.5),w=["C",m.x,m.y,x.x,x.y,g.x,g.y];w.origPoint=y,s.push(w)}else s.push(f)}if(c){var S=o(s[s.length-1]);s.push(["Z"]),n(s[0],S)}}else s=a;return s.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,r,i){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:r,y2:i,stroke:n,"stroke-dasharray":o,"stroke-width":a,"stroke-linecap":s})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,u=this.w.globals.dom.Paper.rect();return u.attr({x:t,y:e,width:r>0?r:0,height:i>0?i:0,rx:n,ry:n,opacity:a,"stroke-width":null!==s?s:0,stroke:null!==l?l:"none","stroke-dasharray":c}),u.node.setAttribute("fill",o),u}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:i,stroke:e,"stroke-width":r})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var r=this.w.globals.dom.Paper.circle(2*t);return null!==e&&r.attr(e),r}},{key:"drawPath",value:function(t){var e=t.d,r=void 0===e?"":e,i=t.stroke,n=void 0===i?"#a8a8a8":i,o=t.strokeWidth,a=void 0===o?1:o,s=t.fill,l=t.fillOpacity,c=void 0===l?1:l,u=t.strokeOpacity,h=void 0===u?1:u,f=t.classes,d=t.strokeLinecap,p=void 0===d?null:d,g=t.strokeDashArray,b=void 0===g?0:g,y=this.w;return null===p&&(p=y.config.stroke.lineCap),(r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r="M 0 ".concat(y.globals.gridHeight)),y.globals.dom.Paper.path(r).attr({fill:s,"fill-opacity":c,stroke:n,"stroke-opacity":h,"stroke-linecap":p,"stroke-width":a,"stroke-dasharray":b,class:f})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){return["M",t,e].join(" ")}},{key:"line",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=null;return null===r?i=[" L",t,e].join(" "):"H"===r?i=[" H",t].join(" "):"V"===r&&(i=[" V",e].join(" ")),i}},{key:"curve",value:function(t,e,r,i,n,o){return["C",t,e,r,i,n,o].join(" ")}},{key:"quadraticCurve",value:function(t,e,r,i){return["Q",t,e,r,i].join(" ")}},{key:"arc",value:function(t,e,r,i,n,o,a){var s="A";return arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(s="a"),[s,t,e,r,i,n,o,a].join(" ")}},{key:"renderPaths",value:function(t){var e,r=t.j,i=t.realIndex,n=t.pathFrom,o=t.pathTo,a=t.stroke,s=t.strokeWidth,l=t.strokeLinecap,c=t.fill,u=t.animationDelay,h=t.initialSpeed,f=t.dataChangeSpeed,d=t.className,p=t.chartType,g=t.shouldClipToGrid,y=void 0===g||g,v=t.bindEventsOnPaths,m=void 0===v||v,x=t.drawShadow,w=void 0===x||x,S=this.w,k=new vc(this.ctx),A=new b(this.ctx),O=this.w.config.chart.animations.enabled,P=O&&this.w.config.chart.animations.dynamicAnimation.enabled,C=!!(O&&!S.globals.resized||P&&S.globals.dataChanged&&S.globals.shouldAnimate);C?e=n:(e=o,S.globals.animationEnded=!0);var j,T=S.config.stroke.dashArray;j=Array.isArray(T)?T[i]:S.config.stroke.dashArray;var E=this.drawPath({d:e,stroke:a,strokeWidth:s,fill:c,fillOpacity:1,classes:d,strokeLinecap:l,strokeDashArray:j});E.attr("index",i),y&&("bar"===p&&!S.globals.isHorizontal||S.globals.comboCharts?E.attr({"clip-path":"url(#gridRectBarMask".concat(S.globals.cuid,")")}):E.attr({"clip-path":"url(#gridRectMask".concat(S.globals.cuid,")")})),S.config.chart.dropShadow.enabled&&w&&k.dropShadow(E,S.config.chart.dropShadow,i),m&&(E.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,E)),E.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,E)),E.node.addEventListener("mousedown",this.pathMouseDown.bind(this,E))),E.attr({pathTo:o,pathFrom:n});var M={el:E,j:r,realIndex:i,pathFrom:n,pathTo:o,fill:c,strokeWidth:s,delay:u};return!O||S.globals.resized||S.globals.dataChanged?!S.globals.resized&&S.globals.dataChanged||A.showDelayedElements():A.animatePathsGradually(wc(wc({},M),{},{speed:h})),S.globals.dataChanged&&P&&C&&A.animatePathsGradually(wc(wc({},M),{},{speed:f})),E}},{key:"drawPattern",value:function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,r,(function(o){"horizontalLines"===t?o.line(0,0,r,0).stroke({color:i,width:n+1}):"verticalLines"===t?o.line(0,0,0,e).stroke({color:i,width:n+1}):"slantedLines"===t?o.line(0,0,e,r).stroke({color:i,width:n}):"squares"===t?o.rect(e,r).fill("none").stroke({color:i,width:n}):"circles"===t&&o.circle(e).fill("none").stroke({color:i,width:n})}))}},{key:"drawGradient",value:function(t,e,r,i,n){var o,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,u=this.w;e.length<9&&0===e.indexOf("#")&&(e=f.hexToRgba(e,i)),r.length<9&&0===r.indexOf("#")&&(r=f.hexToRgba(r,n));var h=0,d=1,p=1,g=null;null!==s&&(h=void 0!==s[0]?s[0]/100:0,d=void 0!==s[1]?s[1]/100:1,p=void 0!==s[2]?s[2]/100:1,g=void 0!==s[3]?s[3]/100:null);var b=!("donut"!==u.config.chart.type&&"pie"!==u.config.chart.type&&"polarArea"!==u.config.chart.type&&"bubble"!==u.config.chart.type);if(o=l&&0!==l.length?u.globals.dom.Paper.gradient(b?"radial":"linear",(function(t){(Array.isArray(l[c])?l[c]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):u.globals.dom.Paper.gradient(b?"radial":"linear",(function(t){t.stop(h,e,i),t.stop(d,r,n),t.stop(p,r,n),null!==g&&t.stop(g,e,i)})),b){var y=u.globals.gridWidth/2,v=u.globals.gridHeight/2;"bubble"!==u.config.chart.type?o.attr({gradientUnits:"userSpaceOnUse",cx:y,cy:v,r:a}):o.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?o.from(0,0).to(0,1):"diagonal"===t?o.from(0,0).to(1,1):"horizontal"===t?o.from(0,1).to(1,1):"diagonal2"===t&&o.from(1,0).to(0,1);return o}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,r=t.maxWidth,i=t.fontSize,n=t.fontFamily,o=this.getTextRects(e,i,n),a=o.width/e.length,s=Math.floor(r/a);return r-1){var s=r.globals.selectedDataPoints[n].indexOf(o);r.globals.selectedDataPoints[n].splice(s,1)}}else{if(!r.config.states.active.allowMultipleDataPointsSelection&&r.globals.selectedDataPoints.length>0){r.globals.selectedDataPoints=[];var l=r.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),c=r.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),u=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),i.getDefaultFilter(t,n)}))};u(l),u(c)}t.node.setAttribute("selected","true"),a="true",void 0===r.globals.selectedDataPoints[n]&&(r.globals.selectedDataPoints[n]=[]),r.globals.selectedDataPoints[n].push(o)}if("true"===a){var h=r.config.states.active.filter;if("none"!==h)i.applyFilter(t,n,h.type);else if("none"!==r.config.states.hover.filter&&!r.globals.isTouchDevice){var f=r.config.states.hover.filter;i.applyFilter(t,n,f.type)}}else"none"!==r.config.states.active.filter.type&&("none"===r.config.states.hover.filter.type||r.globals.isTouchDevice?i.getDefaultFilter(t,n):(f=r.config.states.hover.filter,i.applyFilter(t,n,f.type)));"function"==typeof r.config.chart.events.dataPointSelection&&r.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:r.globals.selectedDataPoints,seriesIndex:n,dataPointIndex:o,w:r}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:r.globals.selectedDataPoints,seriesIndex:n,dataPointIndex:o,w:r}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,r,i){var n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=this.w,a=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:r,foreColor:"#fff",opacity:0});i&&a.attr("transform",i),o.globals.dom.Paper.add(a);var s=a.bbox();return n||(s=a.node.getBoundingClientRect()),a.remove(),{width:s.width,height:s.height}}},{key:"placeTextWithEllipsis",value:function(t,e,r){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=r/1.1)){for(var i=e.length-3;i>0;i-=3)if(t.getSubStringLength(0,i)<=r/1.1)return void(t.textContent=e.substring(0,i)+"...");t.textContent="."}}}],i=[{key:"setAttrs",value:function(t,e){for(var r in e)e.hasOwnProperty(r)&&t.setAttribute(r,e[r])}}],r&&kc(e.prototype,r),i&&kc(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Pc=Oc;function Cc(t){return Cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cc(t)}function jc(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,r=[];if(0===e.globals.series.length)return r;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,r=[];return e.globals.seriesGroups.forEach((function(i){var n=[];e.config.series.forEach((function(t,r){i.indexOf(e.globals.seriesNames[r])>-1&&n.push(r)}));var o=e.globals.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));r.push(t.getStackedSeriesTotals(o))})),r}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,r=[],i=[],n=[],o=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){n.push(e),i.push(null)})),e.yaxis.forEach((function(t,e){r[e]=[]}));var a=[];e.yaxis.forEach((function(t,i){var s=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,a){if(e.name===t){var l=a;i===a||o?!o||n.indexOf(a)>-1?r[i].push([i,a]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(r[a].push([a,i]),l=i),s=!0,-1!==(l=n.indexOf(l))&&n.splice(l,1)}}))}))}s||a.push(i)})),r=r.map((function(t,e){var r=[];return t.forEach((function(t){i[t[1]]=t[0],r.push(t[1])})),r}));for(var s=e.yaxis.length-1,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,r){return t===r[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,r=t.slice();return e.config.xaxis.convertedCatToNumeric&&(r=t.map((function(t,r){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),r}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var r=0;if(Array.isArray(t))for(var i=0;it&&r.globals.seriesX[n][a]0){var d=function(t,e){var r=n.config.yaxis[n.globals.seriesYAxisReverseMap[e]],o=t<0?-1:1;return t=Math.abs(t),r.logarithmic&&(t=i.getBaseLog(r.logBase,t)),-o*t/a[e]};if(o.isMultipleYAxis){l=[];for(var p=0;p0&&e.forEach((function(e){var a=[],s=[];t.i.forEach((function(r,i){n.config.series[r].group===e&&(a.push(t.series[i]),s.push(r))})),a.length>0&&o.push(i.draw(a,r,s))})),o}}],i=[{key:"checkComboSeries",value:function(t,e){var r=!1,i=0,n=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||i++,void 0!==t.type&&t.type!==e&&n++})),n>0&&(r=!0),{comboBarCount:i,comboCharts:r}}},{key:"extendArrayProps",value:function(t,e,r){var i,n,o,a,s,l;return null!==(i=e)&&void 0!==i&&i.yaxis&&(e=t.extendYAxis(e,r)),null!==(n=e)&&void 0!==n&&n.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(a=o.annotations)&&void 0!==a&&a.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(s=e)&&void 0!==s&&null!==(l=s.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e))),e}}],r&&jc(e.prototype,r),i&&jc(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Mc=Ec;function Lc(t){return Lc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lc(t)}function Ic(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null,r=this.w;if("vertical"===t.label.orientation){var i=null!==e?e:0,n=r.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(i,"']"));if(null!==n){var o=n.getBoundingClientRect();n.setAttribute("x",parseFloat(n.getAttribute("x"))-o.height+4);var a="top"===t.label.position?o.width:-o.width;n.setAttribute("y",parseFloat(n.getAttribute("y"))+a);var s=this.annoCtx.graphics.rotateAroundCenter(n),l=s.x,c=s.y;n.setAttribute("transform","rotate(-90 ".concat(l," ").concat(c,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var r=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var i=r.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),n=t.getBoundingClientRect(),o=e.label.style.padding,a=o.left,s=o.right,l=o.top,c=o.bottom;if("vertical"===e.label.orientation){var u=[a,s,l,c];l=u[0],c=u[1],a=u[2],s=u[3]}var h=n.left-i.left-a,f=n.top-i.top-l,d=this.annoCtx.graphics.drawRect(h-r.globals.barPadForNumericAxis,f,n.width+a+s,n.height+l+c,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&d.node.classList.add(e.id),d}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,r=function(r,i,n){var o=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(i,"']"));if(o){var a=o.parentNode,s=t.addBackgroundToAnno(o,r);s&&(a.insertBefore(s.node,o),r.label.mouseEnter&&s.node.addEventListener("mouseenter",r.label.mouseEnter.bind(t,r)),r.label.mouseLeave&&s.node.addEventListener("mouseleave",r.label.mouseLeave.bind(t,r)),r.label.click&&s.node.addEventListener("click",r.label.click.bind(t,r)))}};e.config.annotations.xaxis.forEach((function(t,e){return r(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return r(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return r(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var r,i=this.w,n="y1"===t?e.y:e.y2,o=!1;if(this.annoCtx.invertAxis){var a=i.config.xaxis.convertedCatToNumeric?i.globals.categoryLabels:i.globals.labels,s=a.indexOf(n),l=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(s+1,")"));r=l?parseFloat(l.getAttribute("y")):(i.globals.gridHeight/a.length-1)*(s+1)-i.globals.barHeight,void 0!==e.seriesIndex&&i.globals.barHeight&&(r-=i.globals.barHeight/2*(i.globals.series.length-1)-i.globals.barHeight*e.seriesIndex)}else{var c,u=i.globals.seriesYAxisMap[e.yAxisIndex][0],h=i.config.yaxis[e.yAxisIndex].logarithmic?new Mc(this.annoCtx.ctx).getLogVal(i.config.yaxis[e.yAxisIndex].logBase,n,u)/i.globals.yLogRatio[u]:(n-i.globals.minYArr[u])/(i.globals.yRange[u]/i.globals.gridHeight);r=i.globals.gridHeight-Math.min(Math.max(h,0),i.globals.gridHeight),o=h>i.globals.gridHeight||h<0,!e.marker||void 0!==e.y&&null!==e.y||(r=0),null!==(c=i.config.yaxis[e.yAxisIndex])&&void 0!==c&&c.reversed&&(r=h)}return"string"==typeof n&&n.includes("px")&&(r=parseFloat(n)),{yP:r,clipped:o}}},{key:"getX1X2",value:function(t,e){var r=this.w,i="x1"===t?e.x:e.x2,n=this.annoCtx.invertAxis?r.globals.minY:r.globals.minX,o=this.annoCtx.invertAxis?r.globals.maxY:r.globals.maxX,a=this.annoCtx.invertAxis?r.globals.yRange[0]:r.globals.xRange,s=!1,l=this.annoCtx.inversedReversedAxis?(o-i)/(a/r.globals.gridWidth):(i-n)/(a/r.globals.gridWidth);return"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||r.globals.dataFormatXNumeric||r.config.chart.sparkline.enabled||(l=this.getStringX(i)),"string"==typeof i&&i.includes("px")&&(l=parseFloat(i)),null==i&&e.marker&&(l=r.globals.gridWidth),void 0!==e.seriesIndex&&r.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=r.globals.barWidth/2*(r.globals.series.length-1)-r.globals.barWidth*e.seriesIndex),l>r.globals.gridWidth?(l=r.globals.gridWidth,s=!0):l<0&&(l=0,s=!0),{x:l,clipped:s}}},{key:"getStringX",value:function(t){var e=this.w,r=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var i=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),n=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(i+1,")"));return n&&(r=parseFloat(n.getAttribute("x"))),r}}],r&&Ic(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zc(t){return zc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zc(t)}function Xc(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r12?f-12:0===f?12:f;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(f))).replace(/(^|[^\\])H/g,"$1"+f)).replace(/(^|[^\\])hh+/g,"$1"+l(d))).replace(/(^|[^\\])h/g,"$1"+d);var p=i?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var g=i?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(g))).replace(/(^|[^\\])s/g,"$1"+g);var b=i?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var y=f<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+y)).replace(/(^|[^\\])T/g,"$1"+y.charAt(0));var v=y.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var m=-t.getTimezoneOffset(),x=i||!m?"Z":m>0?"+":"-";if(!i){var w=(m=Math.abs(m))%60;x+=l(Math.floor(m/60))+":"+l(w)}e=e.replace(/(^|[^\\])K/g,"$1"+x);var S=(i?t.getUTCDay():t.getDay())+1;return(e=(e=(e=(e=e.replace(new RegExp(a[0],"g"),a[S])).replace(new RegExp(s[0],"g"),s[S])).replace(new RegExp(n[0],"g"),n[u])).replace(new RegExp(o[0],"g"),o[u])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,r){var i=this.w;void 0!==i.config.xaxis.min&&(t=i.config.xaxis.min),void 0!==i.config.xaxis.max&&(e=i.config.xaxis.max);var n=this.getDate(t),o=this.getDate(e),a=this.formatDate(n,"yyyy MM dd HH mm ss fff").split(" "),s=this.formatDate(o,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(s[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(s[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(s[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(s[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(s[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(s[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(s[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,r){return this.determineDaysOfMonths(t,e)-r}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,r){var i=this.daysCntOfYear[e]+r;return e>1&&this.isLeapYear()&&i++,i}},{key:"determineDaysOfMonths",value:function(t,e){var r=30;switch(t=f.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(r=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:r=31}return r}}],r&&Nc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Vc=Gc;function Uc(t){return Uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uc(t)}function qc(t,e){for(var r=0;r0&&r<100?t.toFixed(1):t.toFixed(0)}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minYArr<4?t.toFixed(1):t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(r,i){void 0!==r.labels.formatter?e.globals.yLabelFormatters[i]=r.labels.formatter:e.globals.yLabelFormatters[i]=function(n){return e.globals.xyCharts?Array.isArray(n)?n.map((function(e){return t.defaultYFormatter(e,r,i)})):t.defaultYFormatter(n,r,i):n}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}],r&&qc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Jc=$c;function Qc(t){return Qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qc(t)}function Kc(t,e){for(var r=0;r4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",l=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],c=this.w,u=void 0===t[i]?"":t[i],h=u,f=c.globals.xLabelFormatter,d=c.config.xaxis.labels.formatter,p=!1,g=new Jc(this.ctx),b=u;l&&(h=g.xLabelFormat(f,u,b,{i,dateFormatter:new Vc(this.ctx).formatDate,w:c}),void 0!==d&&(h=d(u,t[i],{i,dateFormatter:new Vc(this.ctx).formatDate,w:c}))),e.length>0?(n=e[i].unit,o=null,e.forEach((function(t){"month"===t.unit?o="year":"day"===t.unit?o="month":"hour"===t.unit?o="day":"minute"===t.unit&&(o="hour")})),p=o===n,r=e[i].position,h=e[i].value):"datetime"===c.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var y,v=new Pc(this.ctx);y=c.globals.rotateXLabels&&l?v.getTextRects(h,parseInt(s,10),null,"rotate(".concat(c.config.xaxis.labels.rotate," 0 0)"),!1):v.getTextRects(h,parseInt(s,10));var m=!c.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||a.indexOf(h)>=0&&m)&&(h=""),{x:r,text:h,textRect:y,isBold:p}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,r){var i=this.w,n=i.config.xaxis.tickAmount;return"dataPoints"===n&&(n=Math.round(i.globals.gridWidth/120)),n>r||t%Math.round(r/(n+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,r,i,n){var o=this.w;if(0===t&&o.globals.skipFirstTimelinelabel&&(e.text=""),t===r-1&&o.globals.skipLastTimelinelabel&&(e.text=""),o.config.xaxis.labels.hideOverlappingLabels&&i.length>0){var a=n[n.length-1];e.xi.length||i.some((function(t){return Array.isArray(t.seriesName)}))?t:r.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,r=e.config.yaxis[t];if(!r.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!r.showForNullSeries){var i=e.globals.seriesYAxisMap[t],n=new Mc(this.ctx);return i.every((function(t){return n.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var r=this.w;return Array.isArray(t)&&r.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,r.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,r,i,n,o,a){var s=this.w,l=new Pc(this.ctx),c=s.globals.translateY+s.config.yaxis[n].labels.offsetY;if(s.globals.isBarHorizontal?c=0:"heatmap"===s.config.chart.type&&(c+=o/2),i.show&&e>0){!0===s.config.yaxis[n].opposite&&(t+=i.width);for(var u=e;u>=0;u--){var h=l.drawLine(t+r.offsetX-i.width+i.offsetX,c+i.offsetY,t+r.offsetX+i.offsetX,c+i.offsetY,i.color);a.add(h),c+=o}}}}],r&&Kc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ru(t){return ru="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ru(t)}function iu(t,e){for(var r=0;rs){var d=s;s=i,i=d}if(!l||!c){u=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,i+t.offsetY,this._getYAxisAnnotationWidth(t),s-i,0,t.fillColor,t.opacity,1,t.borderColor,o);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(u){var g="right"===t.label.position?n.globals.gridWidth:"center"===t.label.position?n.globals.gridWidth/2:0,b=this.annoCtx.graphics.drawText({x:g+t.label.offsetX,y:(null!=i?i:s)+t.label.offsetY-3,text:h,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});b.attr({rel:r}),e.appendChild(b.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;return e.globals.gridWidth,(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,r=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,i){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,r.node,i)})),r}}])&&iu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function au(t){return au="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},au(t)}function su(t,e){for(var r=0;r-1)){var i=this.helpers.getX1X2("x1",t),n=i.x,o=i.clipped,a=(i=this.helpers.getY1Y2("y1",t)).yP,s=i.clipped;if(f.isNumber(n)&&!s&&!o){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},c=this.annoCtx.graphics.drawMarker(n+t.marker.offsetX,a+t.marker.offsetY,l);e.appendChild(c.node);var u=t.label.text?t.label.text:"",h=this.annoCtx.graphics.drawText({x:n+t.label.offsetX,y:a+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:u,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(h.attr({rel:r}),e.appendChild(h.node),t.customSVG.SVG){var d=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});d.attr({transform:"translate(".concat(n+t.customSVG.offsetX,", ").concat(a+t.customSVG.offsetY,")")}),d.node.innerHTML=t.customSVG.SVG,e.appendChild(d.node)}if(t.image.path){var p=t.image.width?t.image.width:20,g=t.image.height?t.image.height:20;c=this.annoCtx.addImage({x:n+t.image.offsetX-p/2,y:a+t.image.offsetY-g/2,width:p,height:g,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&c.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&c.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&c.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,r=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,i){t.addPointAnnotation(e,r.node,i)})),r}}],r&&su(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const uu=JSON.parse('{"name":"en","options":{"months":["January","February","March","April","May","June","July","August","September","October","November","December"],"shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"days":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"shortDays":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"toolbar":{"exportToSVG":"Download SVG","exportToPNG":"Download PNG","exportToCSV":"Download CSV","menu":"Menu","selection":"Selection","selectionZoom":"Selection Zoom","zoomIn":"Zoom In","zoomOut":"Zoom Out","pan":"Panning","reset":"Reset Zoom"}}}');function hu(t){return hu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hu(t)}function fu(t,e){for(var r=0;r1&&a[s].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:a[s],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,r){t.addImage(e,r)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,r){t.addText(e,r)}))}},{key:"addXaxisAnnotation",value:function(t,e,r){this.xAxisAnnotations.addXaxisAnnotation(t,e,r)}},{key:"addYaxisAnnotation",value:function(t,e,r){this.yAxisAnnotations.addYaxisAnnotation(t,e,r)}},{key:"addPointAnnotation",value:function(t,e,r){this.pointsAnnotations.addPointAnnotation(t,e,r)}},{key:"addText",value:function(t,e){var r=t.x,i=t.y,n=t.text,o=t.textAnchor,a=t.foreColor,s=t.fontSize,l=t.fontFamily,c=t.fontWeight,u=t.cssClass,h=t.backgroundColor,f=t.borderWidth,d=t.strokeDashArray,p=t.borderRadius,g=t.borderColor,b=t.appendTo,y=void 0===b?".apexcharts-svg":b,v=t.paddingLeft,m=void 0===v?4:v,x=t.paddingRight,w=void 0===x?4:x,S=t.paddingBottom,k=void 0===S?2:S,A=t.paddingTop,O=void 0===A?2:A,P=this.w,C=this.graphics.drawText({x:r,y:i,text:n,textAnchor:o||"start",fontSize:s||"12px",fontWeight:c||"regular",fontFamily:l||P.config.chart.fontFamily,foreColor:a||P.config.chart.foreColor,cssClass:u}),j=P.globals.dom.baseEl.querySelector(y);j&&j.appendChild(C.node);var T=C.bbox();if(n){var E=this.graphics.drawRect(T.x-m,T.y-O,T.width+m+w,T.height+k+O,p,h||"transparent",1,f,g,d);j.insertBefore(E.node,C.node)}}},{key:"addImage",value:function(t,e){var r=this.w,i=t.path,n=t.x,o=void 0===n?0:n,a=t.y,s=void 0===a?0:a,l=t.width,c=void 0===l?20:l,u=t.height,h=void 0===u?20:u,f=t.appendTo,d=void 0===f?".apexcharts-svg":f,p=r.globals.dom.Paper.image(i);p.size(c,h).move(o,s);var g=r.globals.dom.baseEl.querySelector(d);return g&&g.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,r){return this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"xaxis",contextMethod:r.addXaxisAnnotation}),r}},{key:"addYaxisAnnotationExternal",value:function(t,e,r){return this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"yaxis",contextMethod:r.addYaxisAnnotation}),r}},{key:"addPointAnnotationExternal",value:function(t,e,r){return void 0===this.invertAxis&&(this.invertAxis=r.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"point",contextMethod:r.addPointAnnotation}),r}},{key:"addAnnotationExternal",value:function(t){var e=t.params,r=t.pushToMemory,i=t.context,n=t.type,o=t.contextMethod,a=i,s=a.w,l=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations")),c=l.childNodes.length+1,u=new pu,h=Object.assign({},"xaxis"===n?u.xAxisAnnotation:"yaxis"===n?u.yAxisAnnotation:u.pointAnnotation),d=f.extend(h,e);switch(n){case"xaxis":this.addXaxisAnnotation(d,l,c);break;case"yaxis":this.addYaxisAnnotation(d,l,c);break;case"point":this.addPointAnnotation(d,l,c)}var p=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(c,"']")),g=this.helpers.addBackgroundToAnno(p,d);return g&&l.insertBefore(g.node,p),r&&s.globals.memory.methodsToExec.push({context:a,id:d.id?d.id:f.randomId(),method:o,label:"addAnnotation",params:e}),i}},{key:"clearAnnotations",value:function(t){for(var e=t.w,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),i=e.globals.memory.methodsToExec.length-1;i>=0;i--)"addText"!==e.globals.memory.methodsToExec[i].label&&"addAnnotation"!==e.globals.memory.methodsToExec[i].label||e.globals.memory.methodsToExec.splice(i,1);r=f.listToArray(r),Array.prototype.forEach.call(r,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var r=t.w,i=r.globals.dom.baseEl.querySelectorAll(".".concat(e));i&&(r.globals.memory.methodsToExec.map((function(t,i){t.id===e&&r.globals.memory.methodsToExec.splice(i,1)})),Array.prototype.forEach.call(i,(function(t){t.parentElement.removeChild(t)})))}}],r&&bu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function mu(t){return mu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mu(t)}function xu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function wu(t){for(var e=1;e\n '.concat(n,'\n - \n ').concat(o,"\n ");return'
'+(r||"")+'
'+i+": "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[a].type||"rangeBar"===t.w.config.series[a].type?u:"".concat(c,""):u)+"
"},Cu=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.opts=e}var e,r;return e=t,(r=[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){return this.hideYAxis(),f.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var r=e.w.config.series[e.seriesIndex].name;return null!==t?r+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),wu(wu({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var r=e.seriesIndex,i=e.dataPointIndex,n=e.w;return t._getBoxTooltip(n,r,i,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var r=e.seriesIndex,i=e.dataPointIndex,n=e.w;return t._getBoxTooltip(n,r,i,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var r=e.seriesIndex,i=e.dataPointIndex,n=e.w,o=function(){var t=n.globals.seriesRangeStart[r][i];return n.globals.seriesRangeEnd[r][i]-t};return n.globals.comboCharts?"rangeBar"===n.config.series[r].type||"rangeArea"===n.config.series[r].type?o():t:o()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Ou(wu(wu({},t),{},{isTimeline:!0})),r=e.color,i=e.seriesName,n=e.ylabel,o=e.startVal,a=e.endVal;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t):function(t){var e=Ou(t),r=e.color,i=e.seriesName,n=e.ylabel,o=e.start,a=e.end;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,r;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(r=t.plotOptions.bar)&&void 0!==r&&r.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Ou(t),r=e.color,i=e.seriesName,n=e.ylabel,o=e.start,a=e.end;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t)}}}}},{key:"brush",value:function(t){return f.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,r){t.yaxis[r].min=0,t.yaxis[r].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return wu(wu({},t),{},{plotOptions:wu(wu({},t.plotOptions),{},{bar:wu(wu({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,r){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return f.isNumber(t)?Math.floor(t):t};var i=t.xaxis.labels.formatter,n=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return r&&r.length&&(n=r.map((function(t){return Array.isArray(t)?t:String(t)}))),n&&n.length&&(t.xaxis.labels.formatter=function(t){return f.isNumber(t)?i(n[Math.floor(t)-1]):i(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,r,i,n){var o=t.globals.seriesCandleO[e][r],a=t.globals.seriesCandleH[e][r],s=t.globals.seriesCandleM[e][r],l=t.globals.seriesCandleL[e][r],c=t.globals.seriesCandleC[e][r];return t.config.series[e].type&&t.config.series[e].type!==n?'
\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][r],"\n
"):'
')+"
".concat(i[0],': ')+o+"
"+"
".concat(i[1],': ')+a+"
"+(s?"
".concat(i[2],': ')+s+"
":"")+"
".concat(i[3],': ')+l+"
"+"
".concat(i[4],': ')+c+"
"}}])&&ku(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ju(t){return ju="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ju(t)}function Tu(t,e){for(var r=0;r1&&n.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new pu;return t.annotations.yaxis=f.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new pu;return t.annotations.xaxis=f.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new pu;return t.annotations.points=f.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}],r&&Tu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Lu(t){return Lu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lu(t)}function Iu(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);rn?i:n,a=t.image,s=0,l=0;void 0===t.width&&void 0===t.height?void 0!==r.fill.image.width&&void 0!==r.fill.image.height?(s=r.fill.image.width+1,l=r.fill.image.height):(s=o+1,l=o):(s=t.width,l=t.height);var c=document.createElementNS(e.globals.SVGNS,"pattern");Pc.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:s+"px",height:l+"px"});var u=document.createElementNS(e.globals.SVGNS,"image");c.appendChild(u),u.setAttributeNS(window.SVG.xlink,"href",a),Pc.setAttrs(u,{x:0,y:0,preserveAspectRatio:"none",width:s+"px",height:l+"px"}),u.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(t){var e=this.w,r=e.config.chart.type;return("bar"===r||"rangeBar"===r)&&e.config.plotOptions.bar.distributed||"heatmap"===r||"treemap"===r?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var r,i=this.w,n=null,o=null,a=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Wu(t))){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return o=t.done,t},e:function(t){a=!0,n=t},f:function(){try{o||null==e.return||e.return()}finally{if(a)throw n}}}}(t);try{for(a.s();!(r=a.n()).done;){var s=r.value;s>=e.threshold?(null===n||s>n)&&(n=s):(null===o||s-1?b=f.getOpacityFromRGBA(u):v=f.hexToRgba(f.rgb2hex(u),b),t.opacity&&(b=t.opacity),"pattern"===g&&(a=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:a,fillColor:u,fillOpacity:b,defaultColor:v})),y){var m=function(t){return function(t){if(Array.isArray(t))return Gu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Wu(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(l.fill.gradient.colorStops)||[],x=l.fill.gradient.type;c&&(m[this.seriesIndex]=this.computeColorStops(n.globals.series[this.seriesIndex],l.plotOptions.line.colors),x="vertical"),s=this.handleGradientFill({type:x,fillConfig:t.fillConfig,fillColor:u,fillOpacity:b,colorStops:m,i:this.seriesIndex})}if("image"===g){var w=l.fill.image.src,S=t.patternID?t.patternID:"",k="pattern".concat(n.globals.cuid).concat(t.seriesNumber+1).concat(S);-1===this.patternIDs.indexOf(k)&&(this.clippedImgArea({opacity:b,image:Array.isArray(w)?t.seriesNumber-1&&(p=f.getOpacityFromRGBA(d));var g=void 0===s.gradient.opacityTo?i:Array.isArray(s.gradient.opacityTo)?s.gradient.opacityTo[a]:s.gradient.opacityTo;if(void 0===s.gradient.gradientToColors||0===s.gradient.gradientToColors.length)h="dark"===s.gradient.shade?u.shadeColor(-1*parseFloat(s.gradient.shadeIntensity),r.indexOf("rgb")>-1?f.rgb2hex(r):r):u.shadeColor(parseFloat(s.gradient.shadeIntensity),r.indexOf("rgb")>-1?f.rgb2hex(r):r);else if(s.gradient.gradientToColors[l.seriesNumber]){var b=s.gradient.gradientToColors[l.seriesNumber];h=b,b.indexOf("rgba")>-1&&(g=f.getOpacityFromRGBA(b))}else h=r;if(s.gradient.gradientFrom&&(d=s.gradient.gradientFrom),s.gradient.gradientTo&&(h=s.gradient.gradientTo),s.gradient.inverseColors){var y=d;d=h,h=y}return d.indexOf("rgb")>-1&&(d=f.rgb2hex(d)),h.indexOf("rgb")>-1&&(h=f.rgb2hex(h)),c.drawGradient(e,d,h,p,g,l.size,s.gradient.stops,o,a)}}],r&&Vu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Zu=qu;function $u(t){return $u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$u(t)}function Ju(t,e){for(var r=0;r0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],o=this.w,a=e,s=t,l=null,c=new Pc(this.ctx),u=o.config.markers.discrete&&o.config.markers.discrete.length;if(Array.isArray(s.x))for(var h=0;h0:o.config.markers.size>0)||n||u){g||(b+=" w".concat(f.randomId()));var y=this.getMarkerConfig({cssClass:b,seriesIndex:e,dataPointIndex:p});o.config.series[a].data[p]&&(o.config.series[a].data[p].fillColor&&(y.pointFillColor=o.config.series[a].data[p].fillColor),o.config.series[a].data[p].strokeColor&&(y.pointStrokeColor=o.config.series[a].data[p].strokeColor)),void 0!==i&&(y.pSize=i),(s.x[h]<-o.globals.markers.largestSize||s.x[h]>o.globals.gridWidth+o.globals.markers.largestSize||s.y[h]<-o.globals.markers.largestSize||s.y[h]>o.globals.gridHeight+o.globals.markers.largestSize)&&(y.pSize=0),g||((o.globals.markers.size[e]>0||n||u)&&!l&&(l=c.group({class:n||u?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(o.globals.cuid,")")),(d=c.drawMarker(s.x[h],s.y[h],y)).attr("rel",p),d.attr("j",p),d.attr("index",e),d.node.setAttribute("default-marker-size",y.pSize),new vc(this.ctx).setSelectionFilter(d,e,p),this.addEvents(d),l&&l.add(d))}else void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e].push([s.x[h],s.y[h]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,r=t.seriesIndex,i=t.dataPointIndex,n=void 0===i?null:i,o=t.radius,a=void 0===o?null:o,s=t.size,l=void 0===s?null:s,c=t.strokeWidth,u=void 0===c?null:c,h=this.w,f=this.getMarkerStyle(r),d=null===l?h.globals.markers.size[r]:l,p=h.config.markers;return null!==n&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===r&&t.dataPointIndex===n&&(f.pointStrokeColor=t.strokeColor,f.pointFillColor=t.fillColor,d=t.size,f.pointShape=t.shape)})),{pSize:null===a?d:a,pRadius:null!==a?a:p.radius,pointStrokeWidth:null!==u?u:Array.isArray(p.strokeWidth)?p.strokeWidth[r]:p.strokeWidth,pointStrokeColor:f.pointStrokeColor,pointFillColor:f.pointFillColor,shape:f.pointShape||(Array.isArray(p.shape)?p.shape[r]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[r]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[r]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[r]:p.fillOpacity,seriesIndex:r}}},{key:"addEvents",value:function(t){var e=this.w,r=new Pc(this.ctx);t.node.addEventListener("mouseenter",r.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",r.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",r.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",r.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,r=e.globals.markers.colors,i=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(i)?i[t]:i,pointFillColor:Array.isArray(r)?r[t]:r}}}],r&&Ju(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function th(t){return th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},th(t)}function eh(t,e){for(var r=0;rp.maxBubbleRadius&&(d=p.maxBubbleRadius)}var g=a.x[u],b=a.y[u];if(d=d||0,null!==b&&void 0!==i.globals.series[o][h]||(f=!1),f){var y=this.drawPoint(g,b,d,o,h,e);c.add(y)}l.add(c)}}},{key:"drawPoint",value:function(t,e,r,i,n,o){var a=this.w,s=i,l=new b(this.ctx),c=new vc(this.ctx),u=new Zu(this.ctx),h=new Ku(this.ctx),f=new Pc(this.ctx),d=h.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:s,dataPointIndex:n,radius:"bubble"===a.config.chart.type||a.globals.comboCharts&&a.config.series[i]&&"bubble"===a.config.series[i].type?r:null}),p=u.fillPath({seriesNumber:i,dataPointIndex:n,color:d.pointFillColor,patternUnits:"objectBoundingBox",value:a.globals.series[i][o]}),g=f.drawMarker(t,e,d);if(a.config.series[s].data[n]&&a.config.series[s].data[n].fillColor&&(p=a.config.series[s].data[n].fillColor),g.attr({fill:p}),a.config.chart.dropShadow.enabled){var y=a.config.chart.dropShadow;c.dropShadow(g,y,i)}if(!this.initialAnim||a.globals.dataChanged||a.globals.resized)a.globals.animationEnded=!0;else{var v=a.config.chart.animations.speed;l.animateMarker(g,v,a.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(g)}),100)}))}return g.attr({rel:n,j:n,index:i,"default-marker-size":d.pSize}),c.setSelectionFilter(g,i,n),h.addEvents(g),g.node.classList.add("apexcharts-marker"),g}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}],r&&eh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function nh(t){return nh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nh(t)}function oh(t,e){for(var r=0;rs.globals.gridHeight+h&&(e=s.globals.gridHeight+h/2),void 0===s.globals.dataLabelsRects[i]&&(s.globals.dataLabelsRects[i]=[]),s.globals.dataLabelsRects[i].push({x:t,y:e,width:u,height:h});var f=s.globals.dataLabelsRects[i].length-2,d=void 0!==s.globals.lastDrawnDataLabelsIndexes[i]?s.globals.lastDrawnDataLabelsIndexes[i][s.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(void 0!==s.globals.dataLabelsRects[i][f]){var p=s.globals.dataLabelsRects[i][d];(t>p.x+p.width||e>p.y+p.height||e+he.globals.gridWidth+y.textRects.width+30)&&(s="");var v=e.globals.dataLabels.style.colors[o];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(v=e.globals.dataLabels.style.colors[a]),"function"==typeof v&&(v=v({series:e.globals.series,seriesIndex:o,dataPointIndex:a,w:e})),f&&(v=f);var m=h.offsetX,x=h.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(m=0,x=0),e.globals.isSlopeChart&&(0!==a&&(m=-2*h.offsetX+5),0!==a&&a!==e.config.series[o].data.length-1&&(m=0)),y.drawnextLabel){if((b=r.drawText({width:100,height:parseInt(h.style.fontSize,10),x:i+m,y:n+x,foreColor:v,textAnchor:l||h.textAnchor,text:s,fontSize:c||h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight||"normal"})).attr({class:g||"apexcharts-datalabel",cx:i,cy:n}),h.dropShadow.enabled){var w=h.dropShadow;new vc(this.ctx).dropShadow(b,w)}u.add(b),void 0===e.globals.lastDrawnDataLabelsIndexes[o]&&(e.globals.lastDrawnDataLabelsIndexes[o]=[]),e.globals.lastDrawnDataLabelsIndexes[o].push(a)}return b}},{key:"addBackgroundToDataLabel",value:function(t,e){var r=this.w,i=r.config.dataLabels.background,n=i.padding,o=i.padding/2,a=e.width,s=e.height,l=new Pc(this.ctx).drawRect(e.x-n,e.y-o/2,a+2*n,s+o,i.borderRadius,"transparent"!==r.config.chart.background&&r.config.chart.background?r.config.chart.background:"#fff",i.opacity,i.borderWidth,i.borderColor);return i.dropShadow.enabled&&new vc(this.ctx).dropShadow(l,i.dropShadow),l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),r=0;r0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.w,n=f.clone(i.globals.initialSeries);i.globals.previousPaths=[],r?(i.globals.collapsedSeries=[],i.globals.ancillaryCollapsedSeries=[],i.globals.collapsedSeriesIndices=[],i.globals.ancillaryCollapsedSeriesIndices=[]):n=this.emptyCollapsedSeries(n),i.config.series=n,t&&(e&&(i.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(n,i.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,r=0;r-1&&(t[r].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,r=this.getSeriesByName(t),i=parseInt(null==r?void 0:r.getAttribute("data:realIndex"),10),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),o=null,a=null,s=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){o=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(i,"']")),a=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(i,"']"));var l=e.globals.seriesYAxisReverseMap[i];s=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else o=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+1,"']"));else o=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+1,"'] path"));for(var c=0;c=t.from&&(o0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this.w,i=0;if(r.config.series.length>1)for(var n=r.config.series.map((function(t,i){return t.data&&t.data.length>0&&-1===r.globals.collapsedSeriesIndices.indexOf(i)&&(!r.globals.comboCharts||0===e.length||e.length&&e.indexOf(r.config.series[i].type)>-1)?i:-1})),o="asc"===t?0:n.length-1;"asc"===t?o=0;"asc"===t?o++:o--)if(-1!==n[o]){i=n[o];break}return i}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,r,i){for(var n=e[r].childNodes,o={type:i,paths:[],realIndex:e[r].getAttribute("data:realIndex")},a=0;a0)for(var i=function(e){for(var r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),i=[],n=function(t){var e=function(e){return r[t].getAttribute(e)},n={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};i.push({rect:n,color:r[t].getAttribute("color")})},o=0;o0?t:[]}))}}],r&&uh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function dh(t){return dh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dh(t)}function ph(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new fh(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var r=this.w.config,i=this.w.globals,n="boxPlot"===r.chart.type||"boxPlot"===r.series[e].type,o=0;o=5?this.twoDSeries.push(f.parseNumber(t[e].data[o][4])):this.twoDSeries.push(f.parseNumber(t[e].data[o][1])),i.dataFormatXNumeric=!0),"datetime"===r.xaxis.type){var a=new Date(t[e].data[o][0]);a=new Date(a).getTime(),this.twoDSeriesX.push(a)}else this.twoDSeriesX.push(t[e].data[o][0]);for(var s=0;s-1&&(o=this.activeSeriesIndex);for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:this.ctx,i=this.w.config,n=this.w.globals,o=new Vc(r),a=i.labels.length>0?i.labels.slice():i.xaxis.categories.slice();n.isRangeBar="rangeBar"===i.chart.type&&n.isBarHorizontal,n.hasXaxisGroups="category"===i.xaxis.type&&i.xaxis.group.groups.length>0,n.hasXaxisGroups&&(n.groups=i.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?n.seriesNames.push(t.name):n.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var s=[],l=function(t){return function(t){if(Array.isArray(t))return ph(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ph(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ph(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(new Set(i.series.map((function(t){return t.group}))));i.series.forEach((function(t,e){var r=l.indexOf(t.group);s[r]||(s[r]=[]),s[r].push(n.seriesNames[e])})),n.seriesGroups=s;for(var c=function(){for(var t=0;t0&&(this.twoDSeriesX=a,n.seriesX.push(this.twoDSeriesX))),n.labels.push(this.twoDSeriesX);var h=t[u].data.map((function(t){return f.parseNumber(t)}));n.series.push(h)}n.seriesZ.push(this.threeDSeries),void 0!==t[u].color?n.seriesColors.push(t[u].color):n.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,r=this.w.config;e.series=t.slice(),e.seriesNames=r.labels.slice();for(var i=0;i0?r.labels=e.xaxis.categories:e.labels.length>0?r.labels=e.labels.slice():this.fallbackToCategory?(r.labels=r.labels[0],r.seriesRange.length&&(r.seriesRange.map((function(t){t.forEach((function(t){r.labels.indexOf(t.x)<0&&t.x&&r.labels.push(t.x)}))})),r.labels=Array.from(new Set(r.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric&&(new Cu(e).convertCatToNumericXaxis(e,this.ctx,r.seriesX[0]),this._generateExternalLabels(t))):this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,r=this.w.config,i=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var n=r.series.map((function(t,e){return t.data.filter((function(t,e,r){return r.findIndex((function(e){return e.x===t.x}))===e}))})),o=n.reduce((function(t,e,r,i){return i[t].length>e.length?t:r}),0),a=0;a0&&n==r.length&&e.push(i)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}],r&&gh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function vh(t){return vh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vh(t)}function mh(t){return function(t){if(Array.isArray(t))return xh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return xh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xh(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=10?new Date(t).toDateString():f.isNumber(t)?t:t.split(o).join("")},y=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},v=Math.max.apply(Math,mh(r.map((function(t){return t.data?t.data.length:0})))),m=new yh(this.ctx),x=new eu(this.ctx),w=function(t){var r="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var i=l.globals.yLabelFormatters[0],n=new fh(e.ctx).getActiveConfigSeriesIndex();r=i(l.globals.labels[t],{seriesIndex:n,dataPointIndex:t,w:l})}else r=x.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?r=l.config.xaxis.categories[t]:l.config.labels.length&&(r=l.config.labels[t]))}else r=l.config.labels[t];return null===r?"nullvalue":(Array.isArray(r)&&(r=r.join(" ")),f.isNumber(r)?r:r.split(o).join(""))};h.push(l.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===l.config.chart.type?(h.push("minimum"),h.push("q1"),h.push("median"),h.push("q3"),h.push("maximum")):"candlestick"===l.config.chart.type?(h.push("open"),h.push("high"),h.push("low"),h.push("close")):"rangeBar"===l.config.chart.type?(h.push("minimum"),h.push("maximum")):r.map((function(t,e){var r=(t.name?t.name:"series-".concat(e))+"";l.globals.axisCharts&&h.push(r.split(o).join("")?r.split(o).join(""):"series-".concat(e))})),l.globals.axisCharts||(h.push(l.config.chart.toolbar.export.csv.headerValue),d.push(h.join(o))),l.globals.allSeriesHasEqualX||!l.globals.axisCharts||l.config.xaxis.categories.length||l.config.labels.length?r.map((function(t,e){l.globals.axisCharts?function(t,e){if(h.length&&0===e&&d.push(h.join(o)),t.data){t.data=t.data.length&&t.data||mh(Array(v)).map((function(){return""}));for(var i=0;i0&&!i.globals.isBarHorizontal&&(this.xaxisLabels=i.globals.timescaleLabels.slice()),i.config.xaxis.overwriteCategories&&(this.xaxisLabels=i.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===i.config.xaxis.position?this.offY=0:this.offY=i.globals.gridHeight,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.xaxisBorderWidth=i.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=i.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=i.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}var e,r;return e=t,r=[{key:"drawXaxis",value:function(){var t=this.w,e=new Pc(this.ctx),r=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),i=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});r.add(i);for(var n=[],o=0;o6&&void 0!==arguments[6]?arguments[6]:{},c=[],u=[],h=this.w,f=l.xaxisFontSize||this.xaxisFontSize,d=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,g=l.fontWeight||h.config.xaxis.labels.style.fontWeight,b=l.cssClass||h.config.xaxis.labels.style.cssClass,y=h.globals.padHorizontal,v=i.length,m="category"===h.config.xaxis.type?h.globals.dataPoints:v;if(0===m&&v>m&&(m=v),n){var x=m>1?m-1:m;a=h.globals.gridWidth/Math.min(x,v-1),y=y+o(0,a)/2+h.config.xaxis.labels.offsetX}else a=h.globals.gridWidth/m,y=y+o(0,a)+h.config.xaxis.labels.offsetX;for(var w=function(n){var l=y-o(n,a)/2+h.config.xaxis.labels.offsetX;0===n&&1===v&&a/2===y&&1===m&&(l=h.globals.gridWidth/2);var x=s.axesUtils.getLabel(i,h.globals.timescaleLabels,l,n,c,f,t),w=28;if(h.globals.rotateXLabels&&t&&(w=22),h.config.xaxis.title.text&&"top"===h.config.xaxis.position&&(w+=parseFloat(h.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(f)+(h.globals.xAxisLabelsHeight-h.globals.xAxisGroupLabelsHeight)+(h.globals.rotateXLabels?10:0)),x=void 0!==h.config.xaxis.tickAmount&&"dataPoints"!==h.config.xaxis.tickAmount&&"datetime"!==h.config.xaxis.type?s.axesUtils.checkLabelBasedOnTickamount(n,x,v):s.axesUtils.checkForOverflowingLabels(n,x,v,c,u),h.config.xaxis.labels.show){var S=e.drawText({x:x.x,y:s.offY+h.config.xaxis.labels.offsetY+w-("top"===h.config.xaxis.position?h.globals.xAxisHeight+h.config.xaxis.axisTicks.height-2:0),text:x.text,textAnchor:"middle",fontWeight:x.isBold?600:g,fontSize:f,fontFamily:d,foreColor:Array.isArray(p)?t&&h.config.xaxis.convertedCatToNumeric?p[h.globals.minX+n-1]:p[n]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+b});if(r.add(S),S.on("click",(function(t){if("function"==typeof h.config.chart.events.xAxisLabelClick){var e=Object.assign({},h,{labelIndex:n});h.config.chart.events.xAxisLabelClick(t,s.ctx,e)}})),t){var k=document.createElementNS(h.globals.SVGNS,"title");k.textContent=Array.isArray(x.text)?x.text.join(" "):x.text,S.node.appendChild(k),""!==x.text&&(c.push(x.text),u.push(x))}}ni.globals.gridWidth)){var o=this.offY+i.config.xaxis.axisTicks.offsetY;if(e=e+o+i.config.xaxis.axisTicks.height,"top"===i.config.xaxis.position&&(e=o-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){var a=new Pc(this.ctx).drawLine(t+i.config.xaxis.axisTicks.offsetX,o+i.config.xaxis.offsetY,n+i.config.xaxis.axisTicks.offsetX,e+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);r.add(a),a.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],r=this.xaxisLabels.length,i=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var n=0;n0){var c=n[n.length-1].getBBox(),u=n[0].getBBox();c.x<-20&&n[n.length-1].parentNode.removeChild(n[n.length-1]),u.x+u.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&n[0].parentNode.removeChild(n[0]);for(var h=0;ht.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&(this.xaxisLabels=r.globals.timescaleLabels.slice())}var e,r;return e=t,r=[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,r=new Pc(this.ctx);t||(t=r.group({class:"apexcharts-grid"}));var i=r.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),n=r.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(n),t.add(i),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,r=new Pc(this.ctx),i=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,function(t){return function(t){if(Array.isArray(t))return Eh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Eh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Eh(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.config.stroke.width)):t.config.stroke.width,n=function(t){var r=document.createElementNS(e.SVGNS,"clipPath");return r.setAttribute("id",t),r};e.dom.elGridRectMask=n("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=n("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=n("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=n("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=n("nonForecastMask".concat(e.cuid));var o=0,a=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(o=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),a=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=r.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=r.drawRect(-i/2-o-2,-i/2-2,e.gridWidth+i+a+o+4,e.gridHeight+i+4,0,"#fff");var s=t.globals.markers.largestSize;e.dom.elGridRectMarker=r.drawRect(-s,-s,e.gridWidth+2*s,e.gridHeight+2*s,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,r=t.x1,i=t.y1,n=t.x2,o=t.y2,a=t.xCount,s=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===a-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:r,y1:i,x2:n,y2:o,xCount:a,parent:s});var c=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var u=l.globals.groups;if(u){for(var h=0,f=0;h0&&"datetime"!==t.config.xaxis.type&&(n=e.yAxisScale[i].result.length-1)),this._drawXYLines({xCount:n,tickAmount:l})):(n=l,l=e.xTickAmount,this._drawInvertedXYLines({xCount:n,tickAmount:l})),this.drawGridBands(n,l),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/n}}},{key:"drawGridBands",value:function(t,e){var r,i,n=this,o=this.w;if((null===(r=o.config.grid.row.colors)||void 0===r?void 0:r.length)>0&&function(t,r,i,a,s,l){for(var c=0,u=0;c=o.config.grid.row.colors.length&&(u=0),n._drawGridBandRect({c:u,x1:0,y1:a,x2:s,y2:l,type:"row"}),a+=o.globals.gridHeight/e}(0,e,0,0,o.globals.gridWidth,o.globals.gridHeight/e),(null===(i=o.config.grid.column.colors)||void 0===i?void 0:i.length)>0){var a=o.globals.isBarHorizontal||"on"!==o.config.xaxis.tickPlacement||"category"!==o.config.xaxis.type&&!o.config.xaxis.convertedCatToNumeric?t:t-1;o.globals.isXNumeric&&(a=o.globals.xAxisScale.result.length-1);for(var s=o.globals.padHorizontal,l=o.globals.padHorizontal+o.globals.gridWidth/a,c=o.globals.gridHeight,u=0,h=0;u=o.config.grid.column.colors.length&&(h=0),"datetime"===o.config.xaxis.type&&(s=this.xaxisLabels[u].position,l=((null===(f=this.xaxisLabels[u+1])||void 0===f?void 0:f.position)||o.globals.gridWidth)-this.xaxisLabels[u].position),this._drawGridBandRect({c:h,x1:s,y1:0,x2:l,y2:c,type:"column"}),s+=o.globals.gridWidth/a}}}}],r&&Mh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const _h=Ih;function Rh(t){return Rh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rh(t)}function zh(t,e){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:0,s=1e-11,l=this.w,c=l.globals;c.isBarHorizontal?(r=l.config.xaxis,i=Math.max((c.svgWidth-100)/25,2)):(r=l.config.yaxis[a],i=Math.max((c.svgHeight-100)/15,2)),f.isNumber(i)||(i=10),n=void 0!==r.min&&null!==r.min,o=void 0!==r.max&&null!==r.min;var u=void 0!==r.stepSize&&null!==r.stepSize,h=void 0!==r.tickAmount&&null!==r.tickAmount,d=h?r.tickAmount:c.niceScaleDefaultTicks[Math.min(Math.round(i/2),c.niceScaleDefaultTicks.length-1)];if(c.isMultipleYAxis&&!h&&c.multiAxisTickAmount>0&&(d=c.multiAxisTickAmount,h=!0),d="dataPoints"===d?c.dataPoints-1:Math.abs(Math.round(d)),(t===Number.MIN_VALUE&&0===e||!f.isNumber(t)&&!f.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=f.isNumber(r.min)?r.min:0,e=f.isNumber(r.max)?r.max:t+d,c.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var p=e;e=t,t=p}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var g=[];d<1&&(d=1);var b=d,y=Math.abs(e-t);!n&&t>0&&t/y<.15&&(t=0,n=!0),!o&&e<0&&-e/y<.15&&(e=0,o=!0);var v=(y=Math.abs(e-t))/b,m=v,x=Math.floor(Math.log10(m)),w=Math.pow(10,x),S=Math.ceil(m/w);if(v=m=(S=c.niceScaleAllowedMagMsd[0===c.yValueDecimal?0:1][S])*w,c.isBarHorizontal&&r.stepSize&&"datetime"!==r.type?(v=r.stepSize,u=!0):u&&(v=r.stepSize),u&&r.forceNiceScale){var k=Math.floor(Math.log10(v));v*=Math.pow(10,x-k)}if(n&&o){var A=y/b;if(h)if(u)if(0!=f.mod(y,v)){var O=f.getGCD(v,A);v=A/O<10?O:A}else 0==f.mod(v,A)?v=A:(A=v,h=!1);else v=A;else if(u)0==f.mod(y,v)?A=v:v=A;else if(0==f.mod(y,v))A=v;else{A=y/(b=Math.ceil(y/v));var P=f.getGCD(y,v);y/Pi&&(t=e-v*d,t+=v*Math.floor((C-t)/v))}else if(n)if(h)e=t+v*b;else{var j=e;e=v*Math.ceil(e/v),Math.abs(e-t)/f.getGCD(y,v)>i&&(e=t+v*d,e+=v*Math.ceil((j-e)/v))}}else if(c.isMultipleYAxis&&h){var T=v*Math.floor(t/v),E=T+v*b;E0&&t16&&f.getPrimeFactors(b).length<2&&b++,!h&&r.forceNiceScale&&0===c.yValueDecimal&&b>y&&(b=y,v=Math.round(y/b)),b>i&&(!h&&!u||r.forceNiceScale)){var M=f.getPrimeFactors(b),L=M.length-1,I=b;t:for(var _=0;_F);return{result:g,niceMin:g[0],niceMax:g[g.length-1]}}},{key:"linearScale",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,o=Math.abs(e-t),a=[];if(t===e)return{result:a=[t],niceMin:a[0],niceMax:a[a.length-1]};"dataPoints"===(r=this._adjustTicksForSmallRange(r,i,o))&&(r=this.w.globals.dataPoints-1),n||(n=o/r),n=Math.round(10*(n+Number.EPSILON))/10,r===Number.MAX_VALUE&&(r=5,n=1);for(var s=t;r>=0;)a.push(s),s=f.preciseAddition(s,n),r-=1;return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,r){e<=0&&(e=Math.max(t,r)),t<=0&&(t=Math.min(e,r));for(var i=[],n=Math.ceil(Math.log(e)/Math.log(r)+1),o=Math.floor(Math.log(t)/Math.log(r));o5?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=o.forceNiceScale?this.logarithmicScaleNice(e,r,o.logBase):this.logarithmicScale(e,r,o.logBase)):r!==-Number.MAX_VALUE&&f.isNumber(r)&&e!==Number.MAX_VALUE&&f.isNumber(e)?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=this.niceScale(e,r,t)):i.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var r=this.w,i=r.globals,n=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&f.isNumber(e)){var o=i.xTickAmount+1;n<10&&n>1&&(o=n),i.xAxisScale=this.linearScale(t,e,o,0,r.config.xaxis.stepSize)}else i.xAxisScale=this.linearScale(0,10,10);return i.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,r=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var i=r.seriesYAxisMap,n=r.minYArr,o=r.maxYArr;r.allSeriesCollapsed=!0,r.barGroups=[],i.forEach((function(i,a){var s=[];i.forEach((function(t){var r=e.series[t].group;s.indexOf(r)<0&&s.push(r)})),i.length>0?function(){var l,c,u=Number.MAX_VALUE,h=-Number.MAX_VALUE,f=u,d=h;if(e.chart.stacked)!function(){var t=new Array(r.dataPoints).fill(0),n=[],o=[],p=[];s.forEach((function(){n.push(t.map((function(){return Number.MIN_VALUE}))),o.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var g=function(t){!l&&e.series[i[t]].type&&(l=e.series[i[t]].type);var u=i[t];c=e.series[u].group?e.series[u].group:"axis-".concat(a),!(r.collapsedSeriesIndices.indexOf(u)<0&&r.ancillaryCollapsedSeriesIndices.indexOf(u)<0)||(r.allSeriesCollapsed=!1,s.forEach((function(t,i){if(e.series[u].group===t)for(var a=0;a=0?o[i][a]+=s:p[i][a]+=s,n[i][a]+=s,f=Math.min(f,s),d=Math.max(d,s)}}))),"bar"!==l&&"column"!==l||r.barGroups.push(c)},b=0;bt.length)&&(e=t.length);for(var r=0,i=Array(e);r1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w.config,o=this.w.globals,a=-Number.MAX_VALUE,s=Number.MIN_VALUE;null===i&&(i=t+1);var l=o.series,c=l,u=l;"candlestick"===n.chart.type?(c=o.seriesCandleL,u=o.seriesCandleH):"boxPlot"===n.chart.type?(c=o.seriesCandleO,u=o.seriesCandleC):o.isRangeData&&(c=o.seriesRangeStart,u=o.seriesRangeEnd);var h=!1;if(o.seriesX.length>=i){var d,p=null===(d=o.brushSource)||void 0===d?void 0:d.w.config.chart.brush;(n.chart.zoom.enabled&&n.chart.zoom.autoScaleYaxis||null!=p&&p.enabled&&null!=p&&p.autoScaleYaxis)&&(h=!0)}for(var g=t;gy&&o.seriesX[g][v]>n.xaxis.max;v--);}for(var m=y;m<=v&&mc[g][m]&&c[g][m]<0&&(s=c[g][m])}else o.hasNullValues=!0}"bar"!==b&&"column"!==b||(s<0&&a<0&&(a=0,r=Math.max(r,0)),s===Number.MIN_VALUE&&(s=0,e=Math.min(e,0)))}return"rangeBar"===n.chart.type&&o.seriesRangeStart.length&&o.isBarHorizontal&&(s=e),"bar"===n.chart.type&&(s<0&&a<0&&(a=0),s===Number.MIN_VALUE&&(s=0)),{minY:s,maxY:a,lowestY:e,highestY:r}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var r,i=Number.MAX_VALUE;if(t.isMultipleYAxis){i=Number.MAX_VALUE;for(var n=0;nt.dataPoints&&0!==t.dataPoints&&(i=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(i=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var n=t.maxX-t.minX;n<30&&(i=n-1)}}else i=e.xaxis.tickAmount;if(t.xTickAmount=i,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var o=[],a=t.minX-1;a0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,i-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());r&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var n=e-i[r-1];n>0&&(t.minXDiff=Math.min(n,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var r=e.seriesGroups;r.length||(r=[this.w.globals.seriesNames.map((function(t){return t}))]);var i={},n={};r.forEach((function(r){i[r]=[],n[r]=[],t.w.config.series.map((function(t,i){return r.indexOf(e.seriesNames[i])>-1?i:null})).filter((function(t){return null!==t})).forEach((function(o){for(var a=0;a0?i[r][a]+=parseFloat(e.series[o][a])+1e-4:n[r][a]+=parseFloat(e.series[o][a]))}}))})),Object.entries(i).forEach((function(t){var r=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Hh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hh(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,1)[0];i[r].forEach((function(t,o){e.maxY=Math.max(e.maxY,i[r][o]),e.minY=Math.min(e.minY,n[r][o])}))}))}}}],r&&Fh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Wh=Nh;function Gh(t){return Gh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gh(t)}function Vh(t,e){for(var r=0;r=0;g--){var b=h(d[g],g,e),y=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(y*=-1);var v=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(i.colors,t),x=Array.isArray(m)?m[g]:m,w=f.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),S=r.drawText({x:y,y:p,text:w.includes(b)&&!e.config.yaxis[t].labels.showDuplicates?"":b,textAnchor:v,fontSize:n,fontFamily:o,fontWeight:a,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:x,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(i.cssClass)});l.add(S),this.addTooltip(S,b),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(r,S,firstLabel,e.config.yaxis[t].labels.rotate),p+=u}}return this.addYAxisTitle(r,s,t),this.addAxisBorder(r,s,t,c,u),s}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var r=document.createElementNS(this.w.globals.SVGNS,"title");r.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(r)}},{key:"rotateLabel",value:function(t,e,r,i){var n=t.rotateAroundCenter(r.node),o=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(i," ").concat(n.x," ").concat(o.y,")"))}},{key:"addYAxisTitle",value:function(t,e,r){var i=this.w;if(void 0!==i.config.yaxis[r].title.text){var n=t.group({class:"apexcharts-yaxis-title"}),o=i.config.yaxis[r].opposite?i.globals.translateYAxisX[r]:0,a=t.drawText({x:o,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[r].title.offsetY,text:i.config.yaxis[r].title.text,textAnchor:"end",foreColor:i.config.yaxis[r].title.style.color,fontSize:i.config.yaxis[r].title.style.fontSize,fontWeight:i.config.yaxis[r].title.style.fontWeight,fontFamily:i.config.yaxis[r].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(i.config.yaxis[r].title.style.cssClass)});n.add(a),e.add(n)}}},{key:"addAxisBorder",value:function(t,e,r,i,n){var o=this.w,a=o.config.yaxis[r].axisBorder,s=31+a.offsetX;if(o.config.yaxis[r].opposite&&(s=-31-a.offsetX),a.show){var l=t.drawLine(s,o.globals.translateY+a.offsetY-2,s,o.globals.gridHeight+o.globals.translateY+a.offsetY+2,a.color,0,a.width);e.add(l)}o.config.yaxis[r].axisTicks.show&&this.axesUtils.drawYAxisTicks(s,i,a,o.config.yaxis[r].axisTicks,r,n,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,r=new Pc(this.ctx),i=r.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),n=r.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});i.add(n);var o=e.globals.yAxisScale[t].result.length-1,a=e.globals.gridWidth/o+.1,s=a+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,c=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),u=e.globals.timescaleLabels;if(u.length>0&&(this.xaxisLabels=u.slice(),o=(c=u.slice()).length),e.config.xaxis.labels.show)for(var h=u.length?0:o;u.length?h=0;u.length?h++:h--){var f=l(c[h],h,e),d=e.globals.gridWidth+e.globals.padHorizontal-(s-a+e.config.xaxis.labels.offsetX);if(u.length){var p=this.axesUtils.getLabel(c,u,d,h,this.drawnLabels,this.xaxisFontSize);d=p.x,f=p.text,this.drawnLabels.push(p.text),0===h&&e.globals.skipFirstTimelinelabel&&(f=""),h===c.length-1&&e.globals.skipLastTimelinelabel&&(f="")}var g=r.drawText({x:d,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});n.add(g),g.tspan(f),this.addTooltip(g,f),s+=a}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,r=new Pc(this.ctx),i=e.config.xaxis.axisBorder;if(i.show){var n=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(n-=15);var o=r.drawLine(e.globals.padHorizontal+n+i.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,i.color,0,i.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(o):t.add(o)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,r=new Pc(this.ctx);if(void 0!==e.config.xaxis.title.text){var i=r.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),n=r.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});i.add(n),t.add(i)}}},{key:"yAxisTitleRotate",value:function(t,e){var r=this.w,i=new Pc(this.ctx),n=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),o=n?n.getBoundingClientRect():{width:0,height:0},a=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),s=a?a.getBoundingClientRect():{width:0,height:0};if(a){var l=this.xPaddingForYAxisTitle(t,o,s,e);a.setAttribute("x",l.xPos-(e?10:0));var c=i.rotateAroundCenter(a);a.setAttribute("transform","rotate(".concat(e?-1*r.config.yaxis[t].title.rotate:r.config.yaxis[t].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,r,i){var n=this.w,o=0,a=10;return void 0===n.config.yaxis[t].title.text||t<0?{xPos:o,padd:0}:(i?o=e.width+n.config.yaxis[t].title.offsetX+r.width/2+a/2:(o=-1*e.width+n.config.yaxis[t].title.offsetX+a/2+r.width/2,n.globals.isBarHorizontal&&(a=25,o=-1*e.width-n.config.yaxis[t].title.offsetX-a)),{xPos:o,padd:a})}},{key:"setYAxisXPosition",value:function(t,e){var r=this.w,i=0,n=0,o=18,a=1;r.config.yaxis.length>1&&(this.multipleYs=!0),r.config.yaxis.forEach((function(s,l){var c=r.globals.ignoreYAxisIndexes.includes(l)||!s.show||s.floating||0===t[l].width,u=t[l].width+e[l].width;s.opposite?r.globals.isBarHorizontal?(n=r.globals.gridWidth+r.globals.translateX-1,r.globals.translateYAxisX[l]=n-s.labels.offsetX):(n=r.globals.gridWidth+r.globals.translateX+a,c||(a+=u+20),r.globals.translateYAxisX[l]=n-s.labels.offsetX+20):(i=r.globals.translateX-o,c||(o+=u+20),r.globals.translateYAxisX[l]=i+s.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;f.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,r){var i=t.config.yaxis[r];if(i&&!i.floating&&void 0!==i.labels.align){var n=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(r,"'] .apexcharts-yaxis-texts-g")),o=f.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(r,"'] .apexcharts-yaxis-label"))),a=n.getBoundingClientRect();o.forEach((function(t){t.setAttribute("text-anchor",i.labels.align)})),"left"!==i.labels.align||i.opposite?"center"===i.labels.align?n.setAttribute("transform","translate(".concat(a.width/2*(i.opposite?1:-1),", 0)")):"right"===i.labels.align&&i.opposite&&n.setAttribute("transform","translate(".concat(a.width,", 0)")):n.setAttribute("transform","translate(-".concat(a.width,", 0)"))}}))}}],r&&Vh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Zh(t){return Zh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zh(t)}function $h(t,e){for(var r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var r=e.filter((function(e){return e.name===t}))[0];if(!r)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var i=f.extend(uu,r);this.w.globals.locale=i.options}}])&&tf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function nf(t){return nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nf(t)}function of(t,e){for(var r=0;re.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var o=new Mu({}),a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n[0].breakpoint,a=window.innerWidth>0?window.innerWidth:screen.width;if(a>i){var s=f.clone(r.globals.initialConfig);s.series=f.clone(r.config.series);var l=Mc.extendArrayProps(o,s,r);t=f.extend(l,t),t=f.extend(r.config,t),e.overrideResponsiveOptions(t)}else for(var c=0;ct.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&"function"==typeof t[0]?(this.isColorFn=!0,r.config.series.map((function(i,n){var o=t[n]||t[0];return"function"==typeof o?o({value:r.globals.axisCharts?r.globals.series[n][0]||0:r.globals.series[n],seriesIndex:n,dataPointIndex:n,w:e.w}):o}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,r){t&&(e[r]=t)}))}},{key:"getMonochromeColors",value:function(t,e,r){var i=t.color,n=t.shadeIntensity,o=t.shadeTo,a=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,s=1/(a/n),l=0;return Array.from({length:a},(function(){var t="dark"===o?r.shadeColor(-1*l,i):r.shadeColor(l,i);return l+=s,t}))}},{key:"applyColorTypes",value:function(t,e){var r=this,i=this.w;t.forEach((function(t){i.globals[t].colors=void 0===i.config[t].colors?r.isColorFn?i.config.colors:e:i.config[t].colors.slice(),r.pushExtraColors(i.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.w,n=e||i.globals.series.length;if(null===r&&(r=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===i.config.chart.type&&i.config.plotOptions.heatmap&&i.config.plotOptions.heatmap.colorScale.inverse),r&&i.globals.series.length&&(n=i.globals.series[i.globals.maxValsInArrayIndex].length*i.globals.series.length),t.lengtht.length)&&(e=t.length);for(var r=0,i=Array(e);rt.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,r=[];e.config.series.forEach((function(n,o){n.data.forEach((function(n,a){var s;s=e.globals.series[o][a],i=e.config.dataLabels.formatter(s,{ctx:t.dCtx.ctx,seriesIndex:o,dataPointIndex:a,w:e}),r.push(i)}))}));var i=f.getLargestStringFromArr(r),n=new Pc(this.dCtx.ctx),o=e.config.dataLabels.style,a=n.getTextRects(i,parseInt(o.fontSize),o.fontFamily);return{width:1.05*a.width,height:a.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var r=t;if(this.w.globals.isMultiLineX){var i=e.map((function(t,e){return Array.isArray(t)?t.length:1})),n=Math.max.apply(Math,function(t){return function(t){if(Array.isArray(t))return Pf(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Pf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pf(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i));r=e[i.indexOf(n)]}return r}}],r&&Cf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ef(t){return Ef="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ef(t)}function Mf(t,e){for(var r=0;r0){var i=this.getxAxisTimeScaleLabelsCoords();t={width:i.width,height:i.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var n=e.globals.xLabelFormatter,o=f.getLargestStringFromArr(r),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,r);e.globals.isBarHorizontal&&(a=o=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var s=new Jc(this.dCtx.ctx),l=o;o=s.xLabelFormat(n,o,l,{i:void 0,dateFormatter:new Vc(this.dCtx.ctx).formatDate,w:e}),a=s.xLabelFormat(n,a,l,{i:void 0,dateFormatter:new Vc(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===o||""===String(o).trim())&&(a=o="1");var c=new Pc(this.dCtx.ctx),u=c.getTextRects(o,e.config.xaxis.labels.style.fontSize),h=u;if(o!==a&&(h=c.getTextRects(a,e.config.xaxis.labels.style.fontSize)),(t={width:u.width>=h.width?u.width:h.width,height:u.height>=h.height?u.height:h.height}).width*r.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var d=function(t){return c.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};u=d(o),o!==a&&(h=d(a)),t.height=(u.height>h.height?u.height:h.height)/1.5,t.width=u.width>h.width?u.width:h.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var r,i=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,n=e.globals.groups.map((function(t){return t.title})),o=f.getLargestStringFromArr(n),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,n),s=new Pc(this.dCtx.ctx),l=s.getTextRects(o,i),c=l;return o!==a&&(c=s.getTextRects(a,i)),r={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},e.config.xaxis.labels.show||(r={width:0,height:0}),{width:r.width,height:r.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,r=0;if(void 0!==t.config.xaxis.title.text){var i=new Pc(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=i.width,r=i.height}return{width:e,height:r}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var r=this.dCtx.timescaleLabels.map((function(t){return t.value})),i=r.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Pc(this.dCtx.ctx).getTextRects(i,e.config.xaxis.labels.style.fontSize)).width*r.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,r=this.w,i=r.globals,n=r.config,o=n.xaxis.type,a=t.width;i.skipLastTimelinelabel=!1,i.skipFirstTimelinelabel=!1;var s=r.config.yaxis[0].opposite&&r.globals.isBarHorizontal;n.yaxis.forEach((function(t,l){s?(e.dCtx.gridPad.left1&&function(t){return-1!==i.collapsedSeriesIndices.indexOf(t)}(s)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var s=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+a/1.75-e.dCtx.yAxisWidthRight,c=s.position-a/1.75+e.dCtx.yAxisWidthLeft,u="right"===r.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>i.svgWidth-i.translateX-u&&(i.skipLastTimelinelabel=!0),c<-(t.show&&!t.floating||"bar"!==n.chart.type&&"candlestick"!==n.chart.type&&"rangeBar"!==n.chart.type&&"boxPlot"!==n.chart.type?10:a/1.75)&&(i.skipFirstTimelinelabel=!0)}else"datetime"===o?e.dCtx.gridPad.right(null===(i=String(u(e,s)))||void 0===i?void 0:i.length)?t:e}),h),p=d=u(d,s);if(void 0!==d&&0!==d.length||(d=l.niceMax),e.globals.isBarHorizontal){i=0;var g=e.globals.labels.slice();d=f.getLargestStringFromArr(g),d=u(d,{seriesIndex:a,dataPointIndex:-1,w:e}),p=t.dCtx.dimHelpers.getLargestStringFromMultiArr(d,g)}var b=new Pc(t.dCtx.ctx),y="rotate(".concat(o.labels.rotate," 0 0)"),v=b.getTextRects(d,o.labels.style.fontSize,o.labels.style.fontFamily,y,!1),m=v;d!==p&&(m=b.getTextRects(p,o.labels.style.fontSize,o.labels.style.fontFamily,y,!1)),r.push({width:(c>m.width||c>v.width?c:m.width>v.width?m.width:v.width)+i,height:m.height>v.height?m.height:v.height})}else r.push({width:0,height:0})})),r}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,r=[];return e.config.yaxis.map((function(e,i){if(e.show&&void 0!==e.title.text){var n=new Pc(t.dCtx.ctx),o="rotate(".concat(e.title.rotate," 0 0)"),a=n.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,o,!1);r.push({width:a.width,height:a.height})}else r.push({width:0,height:0})})),r}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,r=0,i=0,n=t.globals.yAxisScale.length>1?10:0,o=new eu(this.dCtx.ctx),a=function(a,s){var l=t.config.yaxis[s].floating,c=0;a.width>0&&!l?(c=a.width+n,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(s)&&(c=c-a.width-n)):c=l||o.isYAxisHidden(s)?0:5,t.config.yaxis[s].opposite?i+=c:r+=c,e+=c};return t.globals.yLabelsCoords.map((function(t,e){a(t,e)})),t.globals.yTitleCoords.map((function(t,e){a(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=r,this.dCtx.yAxisWidthRight=i,e}}],r&&Rf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Df(t){return Df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Df(t)}function Yf(t,e){for(var r=0;r0&&(s=i.comboBarCount),i.collapsedSeries.forEach((function(t){n(t.type)&&(s-=1)})),r.chart.stacked&&(s=1);var l=n(o)||i.comboBarCount>0,c=Math.abs(i.initialMaxX-i.initialMinX);if(l&&i.isXNumeric&&!i.isBarHorizontal&&s>0&&0!==c){c<=3&&(c=i.dataPoints);var u=c/t,h=i.minXDiff&&i.minXDiff/u>0?i.minXDiff/u:0;h>t/2&&(h/=2),(a=h*parseInt(r.plotOptions.bar.columnWidth,10)/100)<1&&(a=1),i.barPadForNumericAxis=a}return a}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,r=e.globals,i=this.dCtx.isSparkline||!r.axisCharts?0:10;["title","subtitle"].forEach((function(n){void 0!==e.config[n].text?i+=e.config[n].margin:i+=t.dCtx.isSparkline||!r.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||r.axisCharts||(i+=10);var n=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),o=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");r.gridHeight-=n.height+o.height+i,r.translateY+=n.height+o.height+i}},{key:"setGridXPosForDualYAxis",value:function(t,e){var r=this.w,i=new eu(this.dCtx.ctx);r.config.yaxis.forEach((function(n,o){-1!==r.globals.ignoreYAxisIndexes.indexOf(o)||n.floating||i.isYAxisHidden(o)||(n.opposite&&(r.globals.translateX-=e[o].width+t[o].width+parseInt(n.labels.style.fontSize,10)/1.2+12),r.globals.translateX<2&&(r.globals.translateX=2))}))}}],r&&Yf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Bf(t){return Bf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bf(t)}function Nf(t,e){if(t){if("string"==typeof t)return Wf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wf(t,e):void 0}}function Wf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var r=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||Nf(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),i=r[0],n=r[1];t.gridPad[i]=Math.max(n,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(i/2,this.gridPad.top),this.gridPad.bottom=Math.max(i/2,this.gridPad.bottom)),r.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),r.gridHeight=r.gridHeight-this.gridPad.top-this.gridPad.bottom,r.gridWidth=r.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var n=this.dimGrid.gridPadForColumnsInNumericAxis(r.gridWidth);r.gridWidth=r.gridWidth-2*n,r.translateX=r.translateX+this.gridPad.left+this.xPadLeft+(n>0?n:0),r.translateY=r.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,r=e.globals,i=this.dimYAxis.getyAxisLabelsCoords(),n=this.dimYAxis.getyAxisTitleCoords();r.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,r){e.globals.yLabelsCoords.push({width:i[r].width,index:r}),e.globals.yTitleCoords.push({width:n[r].width,index:r})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var o=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),s=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(o,s,a),r.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,r.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(r.rotateXLabels=!1,r.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),r.translateXAxisY=r.translateXAxisY+e.config.xaxis.labels.offsetY,r.translateXAxisX=r.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,c=this.xAxisHeight;r.xAxisLabelsHeight=this.xAxisHeight-s.height,r.xAxisGroupLabelsHeight=r.xAxisLabelsHeight-o.height,r.xAxisLabelsWidth=this.xAxisWidth,r.xAxisHeight=this.xAxisHeight;var u=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,c=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,c=0,u=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(o);var h=function(){r.translateX=l+t.datalabelsCoords.width,r.gridHeight=r.svgHeight-t.lgRect.height-c-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),r.gridWidth=r.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(u=r.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":r.translateY=u,h();break;case"top":r.translateY=this.lgRect.height+u,h();break;case"left":r.translateY=u,r.translateX=this.lgRect.width+l+this.datalabelsCoords.width,r.gridHeight=r.svgHeight-c-12,r.gridWidth=r.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":r.translateY=u,r.translateX=l+this.datalabelsCoords.width,r.gridHeight=r.svgHeight-c-12,r.gridWidth=r.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(n,i),new qh(this.ctx).setYAxisXPosition(i,n)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,r=t.config,i=0;t.config.legend.show&&!t.config.legend.floating&&(i=20);var n="pie"===r.chart.type||"polarArea"===r.chart.type||"donut"===r.chart.type?"pie":"radialBar",o=r.plotOptions[n].offsetY,a=r.plotOptions[n].offsetX;if(!r.legend.show||r.legend.floating){e.gridHeight=e.svgHeight;var s=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(s,e.gridHeight),e.translateY=o,void(e.translateX=a+(e.svgWidth-e.gridWidth)/2)}switch(r.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=o-10,e.translateX=a+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+o+10,e.translateX=a+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-i,e.gridHeight="auto"!==r.chart.height?e.svgHeight:e.gridWidth,e.translateY=o,e.translateX=a+this.lgRect.width+i;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-i-5,e.gridHeight="auto"!==r.chart.height?e.svgHeight:e.gridWidth,e.translateY=o,e.translateX=a+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,r){var i=this.w,n=i.globals.hasXaxisGroups?2:1,o=r.height+t.height+e.height,a=i.globals.isMultiLineX?1.2:i.globals.LINE_HEIGHT_RATIO,s=i.globals.rotateXLabels?22:10,l=i.globals.rotateXLabels&&"bottom"===i.config.legend.position?10:0;this.xAxisHeight=o*a+n*s+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeightu&&(this.yAxisWidth=u)}}],r&&Gf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function qf(t){return qf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qf(t)}function Zf(t,e){for(var r=0;r0){for(var o=0;o1;if(this.legendHelpers.appendToForeignObject(),(i||!e.axisCharts)&&r.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===r.legend.position||"top"===r.legend.position?this.legendAlignHorizontal():"right"!==r.legend.position&&"left"!==r.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,r=t.fillcolor,i=this.w,n=document.createElement("span");n.classList.add("apexcharts-legend-marker");var o=i.config.legend.markers.shape||i.config.markers.shape,a=o;Array.isArray(o)&&(a=o[e]);var s=Array.isArray(i.config.legend.markers.size)?parseFloat(i.config.legend.markers.size[e]):parseFloat(i.config.legend.markers.size),l=Array.isArray(i.config.legend.markers.offsetX)?parseFloat(i.config.legend.markers.offsetX[e]):parseFloat(i.config.legend.markers.offsetX),c=Array.isArray(i.config.legend.markers.offsetY)?parseFloat(i.config.legend.markers.offsetY[e]):parseFloat(i.config.legend.markers.offsetY),u=Array.isArray(i.config.legend.markers.strokeWidth)?parseFloat(i.config.legend.markers.strokeWidth[e]):parseFloat(i.config.legend.markers.strokeWidth),h=n.style;if(h.height=2*(s+u)+"px",h.width=2*(s+u)+"px",h.left=l+"px",h.top=c+"px",i.config.legend.markers.customHTML)h.background="transparent",h.color=r[e],Array.isArray(i.config.legend.markers.customHTML)?i.config.legend.markers.customHTML[e]&&(n.innerHTML=i.config.legend.markers.customHTML[e]()):n.innerHTML=i.config.legend.markers.customHTML();else{var f=new Ku(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(a),seriesIndex:e,strokeWidth:u,size:s}),d=window.SVG().addTo(n).size("100%","100%"),p=new Pc(this.ctx).drawMarker(0,0,td(td({},f),{},{pointFillColor:Array.isArray(r)?r[e]:f.pointFillColor,shape:a}));i.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),d.add(p)}return n}},{key:"drawLegends",value:function(){var t=this,e=this.w,r=e.config.legend.fontFamily,i=e.globals.seriesNames,n=e.config.legend.markers.fillColors?e.config.legend.markers.fillColors.slice():e.globals.colors.slice();if("heatmap"===e.config.chart.type){var o=e.config.plotOptions.heatmap.colorScale.ranges;i=o.map((function(t){return t.name?t.name:t.from+" - "+t.to})),n=o.map((function(t){return t.color}))}else this.isBarsDistributed&&(i=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(i=e.config.legend.customLegendItems);for(var a=e.globals.legendFormatter,s=e.config.legend.inverseOrder,l=s?i.length-1:0;s?l>=0:l<=i.length-1;s?l--:l++){var c,u=a(i[l],{seriesIndex:l,w:e}),h=!1,d=!1;if(e.globals.collapsedSeries.length>0)for(var p=0;p0)for(var g=0;g0?l-10:0)+(c>0?c-10:0)}i.style.position="absolute",o=o+t+r.config.legend.offsetX,a=a+e+r.config.legend.offsetY,i.style.left=o+"px",i.style.top=a+"px","right"===r.config.legend.position&&(i.style.left="auto",i.style.right=25+r.config.legend.offsetX+"px"),["width","height"].forEach((function(t){i.style[t]&&(i.style[t]=parseInt(r.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new Uf(this.ctx),r=e.dimHelpers.getTitleSubtitleCoords("title"),i=e.dimHelpers.getTitleSubtitleCoords("subtitle"),n=0;"top"===t.config.legend.position&&(n=r.height+i.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,n)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),r=0;"left"===t.config.legend.position&&(r=20),"right"===t.config.legend.position&&(r=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(r,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,r=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(r){var i=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,i,this.w]),new fh(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&r&&new fh(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var r=parseInt(t.target.getAttribute("rel"),10)-1,i="true"===t.target.getAttribute("data:collapsed"),n=this.w.config.chart.events.legendClick;"function"==typeof n&&n(this.ctx,r,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,r,this.w]);var o=this.w.config.legend.markers.onClick;"function"==typeof o&&t.target.classList.contains("apexcharts-legend-marker")&&(o(this.ctx,r,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,r,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(r,i)}}}],r&&rd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const od=nd;var ad=r(75),sd=r.n(ad),ld=r(541),cd=r.n(ld),ud=r(955),hd=r.n(ud),fd=r(646),dd=r.n(fd),pd=r(606),gd=r.n(pd),bd=r(802),yd=r.n(bd),vd=r(627),md=r.n(vd);function xd(t){return xd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xd(t)}function wd(t,e){for(var r=0;rthis.wheelDelay&&(this.executeMouseWheelZoom(t),r.globals.lastWheelExecution=i),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){i-r.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),r.globals.lastWheelExecution=i)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,r=this.w;this.minX=r.globals.isRangeBar?r.globals.minY:r.globals.minX,this.maxX=r.globals.isRangeBar?r.globals.maxY:r.globals.maxX;var i=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(i){var n,o,a,s=(t.clientX-i.left)/i.width,l=this.minX,c=this.maxX,u=c-l;if(t.deltaY<0){var h=l+s*u;o=h-(n=.5*u)/2,a=h+n/2}else o=l-(n=1.5*u)/2,a=c+n/2;if(!r.globals.isRangeBar){o=Math.max(o,r.globals.initialMinX),a=Math.min(a,r.globals.initialMaxX);var f=.01*(r.globals.initialMaxX-r.globals.initialMinX);if(a-o0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,r,i,n){return"l"===n||"r"===n?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resizing",this.selectionDragging.bind(this,"resizing")))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(Pd(Pd({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var r=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,i=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-r;t.globals.isRangeBar&&(r=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,i=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var n={x:r,y:0,width:i,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(n),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,r=t.y,i=t.width,n=t.height,o=t.translateX,a=void 0===o?0:o,s=t.translateY,l=void 0===s?0:s,c=this.w,u=this.zoomRect,h=this.selectionRect;if(this.dragged||null!==c.globals.selection){var f={transform:"translate("+a+", "+l+")"};c.globals.zoomEnabled&&this.dragged&&(i<0&&(i=1),u.attr({x:e,y:r,width:i,height:n,fill:c.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":c.config.chart.zoom.zoomedArea.fill.opacity,stroke:c.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":c.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":c.config.chart.zoom.zoomedArea.stroke.opacity}),Pc.setAttrs(u.node,f)),c.globals.selectionEnabled&&(h.attr({x:e,y:r,width:i>0?i:0,height:n>0?n:0,fill:c.config.chart.selection.fill.color,"fill-opacity":c.config.chart.selection.fill.opacity,stroke:c.config.chart.selection.stroke.color,"stroke-width":c.config.chart.selection.stroke.width,"stroke-dasharray":c.config.chart.selection.stroke.dashArray,"stroke-opacity":c.config.chart.selection.stroke.opacity}),Pc.setAttrs(h.node,f))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,r=t.zoomtype,i=this.w,n=e,o=this.gridRect.getBoundingClientRect(),a=n.startX-1,s=n.startY,l=!1,c=!1,u=n.clientX-o.left-a,h=n.clientY-o.top-s,f={translateX:i.globals.translateX,translateY:i.globals.translateY};return Math.abs(u+a)>i.globals.gridWidth?u=i.globals.gridWidth-a:n.clientX-o.left<0&&(u=a),a>n.clientX-o.left&&(l=!0,u=Math.abs(u)),s>n.clientY-o.top&&(c=!0,h=Math.abs(h)),f=Pd(Pd({},f="x"===r?{x:l?a-u:a,y:0,width:u,height:i.globals.gridHeight}:"y"===r?{x:0,y:c?s-h:s,width:i.globals.gridWidth,height:h}:{x:l?a-u:a,y:c?s-h:s,width:u,height:h}),{},{translateX:i.globals.translateX,translateY:i.globals.translateY}),n.drawSelectionRect(f),n.selectionDragging("resizing"),f}},{key:"selectionDragging",value:function(t,e){var r=this,i=this.w;if(e){e.preventDefault();var n=e.detail,o=n.handler,a=n.box,s=a.x,l=a.y;sthis.constraints.x2&&(s=this.constraints.x2-a.w),a.y2>this.constraints.y2&&(l=this.constraints.y2-a.h),o.move(s,l);var c=this.xyRatios,u=this.selectionRect,h=0;"resizing"===t&&(h=30);var f=function(t){return parseFloat(u.node.getAttribute(t))},d={x:f("x"),y:f("y"),width:f("width"),height:f("height")};i.globals.selection=d,"function"==typeof i.config.chart.events.selection&&i.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,n,o,a=r.gridRect.getBoundingClientRect(),s=u.node.getBoundingClientRect();i.globals.isRangeBar?(t=i.globals.yAxisScale[0].niceMin+(s.left-a.left)*c.invertedYRatio,e=i.globals.yAxisScale[0].niceMin+(s.right-a.left)*c.invertedYRatio,n=0,o=1):(t=i.globals.xAxisScale.niceMin+(s.left-a.left)*c.xRatio,e=i.globals.xAxisScale.niceMin+(s.right-a.left)*c.xRatio,n=i.globals.yAxisScale[0].niceMin+(a.bottom-s.bottom)*c.yRatio[0],o=i.globals.yAxisScale[0].niceMax-(s.top-a.top)*c.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:n,max:o}};i.config.chart.events.selection(r.ctx,l),i.config.chart.brush.enabled&&void 0!==i.config.chart.events.brushScrolled&&i.config.chart.events.brushScrolled(r.ctx,l)}),h))}}},{key:"selectionDrawn",value:function(t){var e=t.context,r=t.zoomtype,i=this.w,n=e,o=this.xyRatios,a=this.ctx.toolbar;if(n.startX>n.endX){var s=n.startX;n.startX=n.endX,n.endX=s}if(n.startY>n.endY){var l=n.startY;n.startY=n.endY,n.endY=l}var c=void 0,u=void 0;i.globals.isRangeBar?(c=i.globals.yAxisScale[0].niceMin+n.startX*o.invertedYRatio,u=i.globals.yAxisScale[0].niceMin+n.endX*o.invertedYRatio):(c=i.globals.xAxisScale.niceMin+n.startX*o.xRatio,u=i.globals.xAxisScale.niceMin+n.endX*o.xRatio);var h=[],d=[];if(i.config.yaxis.forEach((function(t,e){var r=i.globals.seriesYAxisMap[e][0];h.push(i.globals.yAxisScale[e].niceMax-o.yRatio[r]*n.startY),d.push(i.globals.yAxisScale[e].niceMax-o.yRatio[r]*n.endY)})),n.dragged&&(n.dragX>10||n.dragY>10)&&c!==u)if(i.globals.zoomEnabled){var p=f.clone(i.globals.initialConfig.yaxis),g=f.clone(i.globals.initialConfig.xaxis);if(i.globals.zoomed=!0,i.config.xaxis.convertedCatToNumeric&&(c=Math.floor(c),u=Math.floor(u),c<1&&(c=1,u=i.globals.dataPoints),u-c<2&&(u=c+1)),"xy"!==r&&"x"!==r||(g={min:c,max:u}),"xy"!==r&&"y"!==r||p.forEach((function(t,e){p[e].min=d[e],p[e].max=h[e]})),a){var b=a.getBeforeZoomRange(g,p);b&&(g=b.xaxis?b.xaxis:g,p=b.yaxis?b.yaxis:p)}var y={xaxis:g};i.config.chart.group||(y.yaxis=p),n.ctx.updateHelpers._updateOptions(y,!1,n.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof i.config.chart.events.zoomed&&a.zoomCallback(g,p)}else if(i.globals.selectionEnabled){var v,m=null;v={min:c,max:u},"xy"!==r&&"y"!==r||(m=f.clone(i.config.yaxis)).forEach((function(t,e){m[e].min=d[e],m[e].max=h[e]})),i.globals.selection=n.selection,"function"==typeof i.config.chart.events.selection&&i.config.chart.events.selection(n.ctx,{xaxis:v,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,r=this.w,i=e;if(void 0!==r.globals.lastClientPosition.x){var n=r.globals.lastClientPosition.x-i.clientX,o=r.globals.lastClientPosition.y-i.clientY;Math.abs(n)>Math.abs(o)&&n>0?this.moveDirection="left":Math.abs(n)>Math.abs(o)&&n<0?this.moveDirection="right":Math.abs(o)>Math.abs(n)&&o>0?this.moveDirection="up":Math.abs(o)>Math.abs(n)&&o<0&&(this.moveDirection="down")}r.globals.lastClientPosition={x:i.clientX,y:i.clientY};var a=r.globals.isRangeBar?r.globals.minY:r.globals.minX,s=r.globals.isRangeBar?r.globals.maxY:r.globals.maxX;r.config.xaxis.convertedCatToNumeric||i.panScrolled(a,s)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,r=t.globals.maxX,i=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+i,r=t.globals.maxX+i):"right"===this.moveDirection&&(e=t.globals.minX-i,r=t.globals.maxX-i),e=Math.floor(e),r=Math.floor(r),this.updateScrolledChart({xaxis:{min:e,max:r}},e,r)}},{key:"panScrolled",value:function(t,e){var r=this.w,i=this.xyRatios,n=f.clone(r.globals.initialConfig.yaxis),o=i.xRatio,a=r.globals.minX,s=r.globals.maxX;r.globals.isRangeBar&&(o=i.invertedYRatio,a=r.globals.minY,s=r.globals.maxY),"left"===this.moveDirection?(t=a+r.globals.gridWidth/15*o,e=s+r.globals.gridWidth/15*o):"right"===this.moveDirection&&(t=a-r.globals.gridWidth/15*o,e=s-r.globals.gridWidth/15*o),r.globals.isRangeBar||(tr.globals.initialMaxX)&&(t=a,e=s);var l={xaxis:{min:t,max:e}};r.config.chart.group||(l.yaxis=n),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,r){var i=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof i.config.chart.events.scrolled&&i.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:r}})}}],r&&jd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(kd);function Rd(t){return Rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rd(t)}function zd(t){return function(t){if(Array.isArray(t))return Xd(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Xd(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xd(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);rs||p>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):o.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):o.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var g=Math.round(d/c),b=Math.floor(p/u);h&&!o.config.xaxis.convertedCatToNumeric&&(g=Math.ceil(d/c),g-=1);var y=null,v=null,m=o.globals.seriesXvalues.map((function(t){return t.filter((function(t){return f.isNumber(t)}))})),x=o.globals.seriesYvalues.map((function(t){return t.filter((function(t){return f.isNumber(t)}))}));if(o.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),S=d*(w.width/s),k=p*(w.height/l);y=(v=this.closestInMultiArray(S,k,m,x)).index,g=v.j,null!==y&&(m=o.globals.seriesXvalues[y],g=(v=this.closestInArray(S,m)).index)}return o.globals.capturedSeriesIndex=null===y?-1:y,(!g||g<1)&&(g=0),o.globals.isBarHorizontal?o.globals.capturedDataPointIndex=b:o.globals.capturedDataPointIndex=g,{capturedSeries:y,j:o.globals.isBarHorizontal?b:g,hoverX:d,hoverY:p}}},{key:"closestInMultiArray",value:function(t,e,r,i){var n=this.w,o=0,a=null,s=-1;n.globals.series.length>1?o=this.getFirstActiveXArray(r):a=0;var l=r[o][0],c=Math.abs(t-l);if(r.forEach((function(e){e.forEach((function(e,r){var i=Math.abs(t-e);i<=c&&(c=i,s=r)}))})),-1!==s){var u=i[o][s],h=Math.abs(e-u);a=o,i.forEach((function(t,r){var i=Math.abs(e-t[s]);i<=h&&(h=i,a=r)}))}return{index:a,j:s}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,r=0,i=t.map((function(t,e){return t.length>0?e:-1})),n=0;n0)for(var i=0;i *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=zd(t)).sort((function(t,e){var r=Number(t.getAttribute("data:realIndex")),i=Number(e.getAttribute("data:realIndex"));return ir?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var r=Number(t.getAttribute("cx")),i=Number(t.getAttribute("cy")),n=t.getAttribute("shape");return new Pc(this.ctx).getMarkerPath(r,i,n,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,r=e.config.markers.hover.size;return void 0===r&&(r=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),r}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,r=this.ttCtx;0===r.allTooltipSeriesGroups.length&&(r.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var i=r.allTooltipSeriesGroups,n=0;n ').concat(r.attrs.name,""),e+="
".concat(r.val,"
")})),v.innerHTML=t+"",m.innerHTML=e+""};a?l.globals.seriesGoals[e][r]&&Array.isArray(l.globals.seriesGoals[e][r])?x():(v.innerHTML="",m.innerHTML=""):x()}else v.innerHTML="",m.innerHTML="";if(null!==p&&(i[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,i[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:""),a&&g[0]){if(l.config.tooltip.hideEmptySeries){var w=i[e].querySelector(".apexcharts-tooltip-marker"),S=i[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(u)?(w.style.display="none",S.style.display="none"):(w.style.display="block",S.style.display="block")}null==u||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&-1===c.tConfig.enabledOnSeries.indexOf(e)?g[0].parentNode.style.display="none":g[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&-1===c.tConfig.enabledOnSeries.indexOf(e)&&(g[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var r=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));i&&(i.classList.add("apexcharts-active"),i.style.display=r.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,r=t.j,i=this.w,n=this.ctx.series.filteredSeriesX(),o="",a="",s=null,l=null,c={series:i.globals.series,seriesIndex:e,dataPointIndex:r,w:i},u=i.globals.ttZFormatter;null===r?l=i.globals.series[e]:i.globals.isXNumeric&&"treemap"!==i.config.chart.type?(o=n[e][r],0===n[e].length&&(o=n[this.tooltipUtil.getFirstActiveXArray(n)][r])):o=new yh(this.ctx).isFormatXY()?void 0!==i.config.series[e].data[r]?i.config.series[e].data[r].x:"":void 0!==i.globals.labels[r]?i.globals.labels[r]:"";var h=o;return o=i.globals.isXNumeric&&"datetime"===i.config.xaxis.type?new Jc(this.ctx).xLabelFormat(i.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new Vc(this.ctx).formatDate,w:this.w}):i.globals.isBarHorizontal?i.globals.yLabelFormatters[0](h,c):i.globals.xLabelFormatter(h,c),void 0!==i.config.tooltip.x.formatter&&(o=i.globals.ttKeyFormatter(h,c)),i.globals.seriesZ.length>0&&i.globals.seriesZ[e].length>0&&(s=u(i.globals.seriesZ[e][r],i)),a="function"==typeof i.config.xaxis.tooltip.formatter?i.globals.xaxisTooltipFormatter(h,c):o,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(o)?o.join(" "):o,xAxisTTVal:Array.isArray(a)?a.join(" "):a,zVal:s}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,r=t.j,i=t.y1,n=t.y2,o=t.w,a=this.ttCtx.getElTooltip(),s=o.config.tooltip.custom;Array.isArray(s)&&s[e]&&(s=s[e]),a.innerHTML=s({ctx:this.ctx,series:o.globals.series,seriesIndex:e,dataPointIndex:r,y1:i,y2:n,w:o})}}],r&&Gd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function qd(t){return qd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qd(t)}function Zd(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null,r=this.ttCtx,i=this.w,n=r.getElXCrosshairs(),o=t-r.xcrosshairsWidth/2,a=i.globals.labels.slice().length;if(null!==e&&(o=i.globals.gridWidth/a*e),null===n||i.globals.isBarHorizontal||(n.setAttribute("x",o),n.setAttribute("x1",o),n.setAttribute("x2",o),n.setAttribute("y2",i.globals.gridHeight),n.classList.add("apexcharts-active")),o<0&&(o=0),o>i.globals.gridWidth&&(o=i.globals.gridWidth),r.isXAxisTooltipEnabled){var s=o;"tickWidth"!==i.config.xaxis.crosshairs.width&&"barWidth"!==i.config.xaxis.crosshairs.width||(s=o+r.xcrosshairsWidth/2),this.moveXAxisTooltip(s)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Pc.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Pc.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,r=this.ttCtx;if(null!==r.xaxisTooltip&&0!==r.xcrosshairsWidth){r.xaxisTooltip.classList.add("apexcharts-active");var i,n=r.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;t-=r.xaxisTooltip.getBoundingClientRect().width/2,isNaN(t)||(t+=e.globals.translateX,i=new Pc(this.ctx).getTextRects(r.xaxisTooltipText.innerHTML),r.xaxisTooltipText.style.minWidth=i.width+"px",r.xaxisTooltip.style.left=t+"px",r.xaxisTooltip.style.top=n+"px")}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,r=this.ttCtx;null===r.yaxisTTEls&&(r.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var i=parseInt(r.ycrosshairsHidden.getAttribute("y1"),10),n=e.globals.translateY+i,o=r.yaxisTTEls[t].getBoundingClientRect().height,a=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(a-=26),n-=o/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(r.yaxisTTEls[t].classList.add("apexcharts-active"),r.yaxisTTEls[t].style.top=n+"px",r.yaxisTTEls[t].style.left=a+e.config.yaxis[t].tooltip.offsetX+"px"):r.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.w,n=this.ttCtx,o=n.getElTooltip(),a=n.tooltipRect,s=null!==r?parseFloat(r):1,l=parseFloat(t)+s+5,c=parseFloat(e)+s/2;if(l>i.globals.gridWidth/2&&(l=l-a.ttWidth-s-10),l>i.globals.gridWidth-a.ttWidth-10&&(l=i.globals.gridWidth-a.ttWidth),l<-20&&(l=-20),i.config.tooltip.followCursor){var u=n.getElGrid().getBoundingClientRect();(l=n.e.clientX-u.left)>i.globals.gridWidth/2&&(l-=n.tooltipRect.ttWidth),(c=n.e.clientY+i.globals.translateY-u.top)>i.globals.gridHeight/2&&(c-=n.tooltipRect.ttHeight)}else i.globals.isBarHorizontal||a.ttHeight/2+c>i.globals.gridHeight&&(c=i.globals.gridHeight-a.ttHeight+i.globals.translateY);isNaN(l)||(l+=i.globals.translateX,o.style.left=l+"px",o.style.top=c+"px")}},{key:"moveMarkers",value:function(t,e){var r=this.w,i=this.ttCtx;if(r.globals.markers.size[t]>0)for(var n=r.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),o=0;o0){var d=f.getAttribute("shape"),p=l.getMarkerPath(n,o,d,1.5*u);f.setAttribute("d",p)}this.moveXCrosshairs(n),s.fixedTooltip||this.moveTooltip(n,o,u)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,r=this.ttCtx,i=r.w,n=0,o=0,a=i.globals.pointsArray,s=new fh(this.ctx),l=new Pc(this.ctx);e=s.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var c=r.tooltipUtil.getHoverMarkerSize(e);a[e]&&(n=a[e][t][0],o=a[e][t][1]);var u=r.tooltipUtil.getAllMarkers();if(null!==u)for(var h=0;h0){var y=l.getMarkerPath(n,d,g,c);u[h].setAttribute("d",y)}else u[h].setAttribute("d","")}}this.moveXCrosshairs(n),r.fixedTooltip||this.moveTooltip(n,o||i.globals.gridHeight,c)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var r=this.w,i=this.ttCtx,n=r.globals.columnSeries?r.globals.columnSeries.length:r.globals.series.length,o=n>=2&&n%2==0?Math.floor(n/2):Math.floor(n/2)+1;r.globals.isBarHorizontal&&(o=new fh(this.ctx).getActiveConfigSeriesIndex("desc")+1);var a=r.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(o,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"']"));a||"number"!=typeof e||(a=r.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var s=a?parseFloat(a.getAttribute("cx")):0,l=a?parseFloat(a.getAttribute("cy")):0,c=a?parseFloat(a.getAttribute("barWidth")):0,u=i.getElGrid().getBoundingClientRect(),h=a&&(a.classList.contains("apexcharts-candlestick-area")||a.classList.contains("apexcharts-boxPlot-area"));r.globals.isXNumeric?(a&&!h&&(s-=n%2!=0?c/2:0),a&&h&&(s-=c/2)):r.globals.isBarHorizontal||(s=i.xAxisTicksPositions[t-1]+i.dataPointsDividedWidth/2,isNaN(s)&&(s=i.xAxisTicksPositions[t]-i.dataPointsDividedWidth/2)),r.globals.isBarHorizontal?l-=i.tooltipRect.ttHeight:r.config.tooltip.followCursor?l=i.e.clientY-u.top-i.tooltipRect.ttHeight/2:l+i.tooltipRect.ttHeight+15>r.globals.gridHeight&&(l=r.globals.gridHeight),r.globals.isBarHorizontal||this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,l||r.globals.gridHeight)}}],r&&Zd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qd(t){return Qd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qd(t)}function Kd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w;"bubble"!==n.config.chart.type&&this.newPointSize(t,e);var o=e.getAttribute("cx"),a=e.getAttribute("cy");if(null!==r&&null!==i&&(o=r,a=i),this.tooltipPosition.moveXCrosshairs(o),!this.fixedTooltip){if("radar"===n.config.chart.type){var s=this.ttCtx.getElGrid().getBoundingClientRect();o=this.ttCtx.e.clientX-s.left}this.tooltipPosition.moveTooltip(o,a,n.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,r=this,i=this.ttCtx,n=t,o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),a=e.config.markers.hover.size,s=0;s0){var i=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],r);t[e].setAttribute("d",i)}else t[e].setAttribute("d","M0,0")}}}],r&&tp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ip(t){return ip="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ip(t)}function np(t,e){for(var r=0;rs.globals.gridWidth/2&&(i=u-a.tooltipRect.ttWidth/2+f),a.w.config.tooltip.followCursor){var p=s.globals.dom.elWrap.getBoundingClientRect();i=s.globals.clientX-p.left-(i>s.globals.gridWidth/2?a.tooltipRect.ttWidth:0),n=s.globals.clientY-p.top-(n>s.globals.gridHeight/2?a.tooltipRect.ttHeight:0)}}return{x:i,y:n}}},{key:"handleMarkerTooltip",value:function(t){var e,r,i=t.e,n=t.opt,o=t.x,a=t.y,s=this.w,l=this.ttCtx;if(i.target.classList.contains("apexcharts-marker")){var c=parseInt(n.paths.getAttribute("cx"),10),u=parseInt(n.paths.getAttribute("cy"),10),h=parseFloat(n.paths.getAttribute("val"));if(r=parseInt(n.paths.getAttribute("rel"),10),e=parseInt(n.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var d=f.findAncestor(n.paths,"apexcharts-series");d&&(e=parseInt(d.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,j:r,shared:!l.showOnIntersect&&s.config.tooltip.shared,e:i}),"mouseup"===i.type&&l.markerClick(i,e,r),s.globals.capturedSeriesIndex=e,s.globals.capturedDataPointIndex=r,o=c,a=u+s.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var p=l.getElGrid().getBoundingClientRect();a=l.e.clientY+s.globals.translateY-p.top}h<0&&(a=u),l.marker.enlargeCurrentPoint(r,n.paths,o,a)}return{x:o,y:a}}},{key:"handleBarTooltip",value:function(t){var e,r,i=t.e,n=t.opt,o=this.w,a=this.ttCtx,s=a.getElTooltip(),l=0,c=0,u=0,h=this.getBarTooltipXY({e:i,opt:n});if(null!==h.j||0!==h.barHeight||0!==h.barWidth){e=h.i;var f=h.j;if(o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=f,o.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||!o.config.tooltip.shared?(c=h.x,u=h.y,r=Array.isArray(o.config.stroke.width)?o.config.stroke.width[e]:o.config.stroke.width,l=c):o.globals.comboCharts||o.config.tooltip.shared||(l/=2),isNaN(u)&&(u=o.globals.svgHeight-a.tooltipRect.ttHeight),parseInt(n.paths.parentNode.getAttribute("data:realIndex"),10),c+a.tooltipRect.ttWidth>o.globals.gridWidth?c-=a.tooltipRect.ttWidth:c<0&&(c=0),a.w.config.tooltip.followCursor){var d=a.getElGrid().getBoundingClientRect();u=a.e.clientY-d.top}null===a.tooltip&&(a.tooltip=o.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),o.config.tooltip.shared||(o.globals.comboBarCount>0?a.tooltipPosition.moveXCrosshairs(l+r/2):a.tooltipPosition.moveXCrosshairs(l)),!a.fixedTooltip&&(!o.config.tooltip.shared||o.globals.isBarHorizontal&&a.tooltipUtil.hasBars())&&(u=u+o.globals.translateY-a.tooltipRect.ttHeight/2,s.style.left=c+o.globals.translateX+"px",s.style.top=u+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,r=t.e,i=t.opt,n=this.w,o=null,a=this.ttCtx,s=0,l=0,c=0,u=0,h=0,f=r.target.classList;if(f.contains("apexcharts-bar-area")||f.contains("apexcharts-candlestick-area")||f.contains("apexcharts-boxPlot-area")||f.contains("apexcharts-rangebar-area")){var d=r.target,p=d.getBoundingClientRect(),g=i.elGrid.getBoundingClientRect(),b=p.height;h=p.height;var y=p.width,v=parseInt(d.getAttribute("cx"),10),m=parseInt(d.getAttribute("cy"),10);u=parseFloat(d.getAttribute("barWidth"));var x="touchmove"===r.type?r.touches[0].clientX:r.clientX;o=parseInt(d.getAttribute("j"),10),s=parseInt(d.parentNode.getAttribute("rel"),10)-1;var w=d.getAttribute("data-range-y1"),S=d.getAttribute("data-range-y2");n.globals.comboCharts&&(s=parseInt(d.parentNode.getAttribute("data:realIndex"),10));var k=function(t){return n.globals.isXNumeric?v-y/2:e.isVerticalGroupedRangeBar?v+y/2:v-a.dataPointsDividedWidth+y/2},A=function(){return m-a.dataPointsDividedHeight+b/2-a.tooltipRect.ttHeight/2};a.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:s,j:o,y1:w?parseInt(w,10):null,y2:S?parseInt(S,10):null,shared:!a.showOnIntersect&&n.config.tooltip.shared,e:r}),n.config.tooltip.followCursor?n.globals.isBarHorizontal?(l=x-g.left+15,c=A()):(l=k(),c=r.clientY-g.top-a.tooltipRect.ttHeight/2-15):n.globals.isBarHorizontal?((l=v)0&&r.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,r){var i=this.ttCtx,n=this.w,o=n.globals,a=o.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&a.length>0){var s=o.yLabelFormatters[t],l=i.getElGrid().getBoundingClientRect(),c=a[0],u=0;r.yRatio.length>1&&(u=c);var h=(e-l.top)*r.yRatio[u],f=o.maxYArr[c]-o.minYArr[c],d=o.minYArr[c]+(f-h);n.config.yaxis[t].reversed&&(d=o.maxYArr[c]-(f-h)),i.tooltipPosition.moveYCrosshairs(e-l.top),i.yaxisTooltipText[t].innerHTML=s(d),i.tooltipPosition.moveYAxisTooltip(t)}}}],r&&cp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const fp=hp;function dp(t){return dp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dp(t)}function pp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function gp(t){for(var e=1;e0&&this.addPathsEventListeners(d,u),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(u)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),r=e.getBoundingClientRect(),i=r.width+10,n=r.height+10,o=this.tConfig.fixed.offsetX,a=this.tConfig.fixed.offsetY,s=this.tConfig.fixed.position.toLowerCase();return s.indexOf("right")>-1&&(o=o+t.globals.svgWidth-i+10),s.indexOf("bottom")>-1&&(a=a+t.globals.svgHeight-n-10),e.style.left=o+"px",e.style.top=a+"px",{x:o,y:a,ttWidth:i,ttHeight:n}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var r=this,i=function(i){var n={paths:t[i],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[i].addEventListener(e,r.onSeriesHover.bind(r,n),{capture:!1,passive:!0})}))},n=0;n=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){r.seriesHover(t,e)}),20-i))}},{key:"seriesHover",value:function(t,e){var r=this;this.lastHoverTime=Date.now();var i=[],n=this.w;n.config.chart.group&&(i=this.ctx.getGroupedCharts()),n.globals.axisCharts&&(n.globals.minX===-1/0&&n.globals.maxX===1/0||0===n.globals.dataPoints)||(i.length?i.forEach((function(i){var n=r.getElTooltip(i),o={paths:t.paths,tooltipEl:n,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:i.w.globals.tooltip.ttItems};i.w.globals.minX===r.w.globals.minX&&i.w.globals.maxX===r.w.globals.maxX&&i.w.globals.tooltip.seriesHoverByContext({chartCtx:i,ttCtx:i.w.globals.tooltip,opt:o,e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,r=t.ttCtx,i=t.opt,n=t.e,o=e.w,a=this.getElTooltip(e);a&&(r.tooltipRect={x:0,y:0,ttWidth:a.getBoundingClientRect().width,ttHeight:a.getBoundingClientRect().height},r.e=n,!r.tooltipUtil.hasBars()||o.globals.comboCharts||r.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new fh(e).toggleSeriesOnHover(n,n.target.parentNode),r.fixedTooltip&&r.drawFixedTooltipRect(),o.globals.axisCharts?r.axisChartsTooltips({e:n,opt:i,tooltipRect:r.tooltipRect}):r.nonAxisChartsTooltips({e:n,opt:i,tooltipRect:r.tooltipRect}))}},{key:"axisChartsTooltips",value:function(t){var e,r,i=t.e,n=t.opt,o=this.w,a=n.elGrid.getBoundingClientRect(),s="touchmove"===i.type?i.touches[0].clientX:i.clientX,l="touchmove"===i.type?i.touches[0].clientY:i.clientY;if(this.clientY=l,this.clientX=s,o.globals.capturedSeriesIndex=-1,o.globals.capturedDataPointIndex=-1,la.top+a.height)this.handleMouseOut(n);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!o.config.tooltip.shared){var c=parseInt(n.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(n)}var u=this.getElTooltip(),h=this.getElXCrosshairs(),f=[];o.config.chart.group&&(f=this.ctx.getSyncedCharts());var d=o.globals.xyCharts||"bar"===o.config.chart.type&&!o.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||o.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===i.type||"touchmove"===i.type||"mouseup"===i.type){if(o.globals.collapsedSeries.length+o.globals.ancillaryCollapsedSeries.length===o.globals.series.length)return;null!==h&&h.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),d&&!this.showOnIntersect||f.length>1)this.handleStickyTooltip(i,s,l,n);else if("heatmap"===o.config.chart.type||"treemap"===o.config.chart.type){var g=this.intersect.handleHeatTreeTooltip({e:i,opt:n,x:e,y:r,type:o.config.chart.type});e=g.x,r=g.y,u.style.left=e+"px",u.style.top=r+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:i,opt:n}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:i,opt:n,x:e,y:r});if(this.yaxisTooltips.length)for(var b=0;bl.width)this.handleMouseOut(i);else if(null!==s)this.handleStickyCapturedSeries(t,s,i,a);else if(this.tooltipUtil.isXoverlap(a)||n.globals.isBarHorizontal){var c=n.globals.series.findIndex((function(t,e){return!n.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,c,a,i.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,r,i){var n=this.w;if(this.tConfig.shared||null!==n.globals.series[e][i]){if(void 0!==n.globals.series[e][i])this.tConfig.shared&&this.tooltipUtil.isXoverlap(i)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,i,r.ttItems):this.create(t,this,e,i,r.ttItems,!1);else if(this.tooltipUtil.isXoverlap(i)){var o=n.globals.series.findIndex((function(t,e){return!n.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,o,i,r.ttItems)}}else this.handleMouseOut(r)}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Pc(this.ctx),r=t.globals.dom.Paper.find(".apexcharts-bar-area"),i=0;i5&&void 0!==arguments[5]?arguments[5]:null,S=this.w,k=e;"mouseup"===t.type&&this.markerClick(t,r,i),null===w&&(w=this.tConfig.shared);var A=this.tooltipUtil.hasMarkers(r),O=this.tooltipUtil.getElBars();if(S.config.legend.tooltipHoverFormatter){var P=S.config.legend.tooltipHoverFormatter,C=Array.from(this.legendLabels);C.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var j=0;j0?k.marker.enlargePoints(i):k.tooltipPosition.moveDynamicPointsOnHover(i);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(O),this.barSeriesHeight>0)){var _=new Pc(this.ctx),R=S.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(i,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(i,r);for(var z=0;z0&&i.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=c*S)),w&&(f=f+h.height/2-y/2-2);var A=i.globals.series[n][o]<0,O=s;switch(this.barCtx.isReversed&&(O=s+(A?u:-u)),g.position){case"center":d=w?A?O-u/2+m:O+u/2-m:A?O-u/2+h.height/2+m:O+u/2+h.height/2-m;break;case"bottom":d=w?A?O-u+m:O+u-m:A?O-u+h.height+y+m:O+u-h.height/2+y-m;break;case"top":d=w?A?O+m:O-m:A?O-h.height/2-m:O+h.height+m}if(this.barCtx.lastActiveBarSerieIndex===a&&b.enabled){var P=new Pc(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:o}),p.fontSize);e=A?O-P.height/2-m-b.offsetY+18:O+P.height+m+b.offsetY-18;var C=k;r=x+(i.globals.isXNumeric?-c*i.globals.barGroups.length/2:i.globals.barGroups.length*c/2-(i.globals.barGroups.length-1)*c-C)+b.offsetX}return i.config.chart.stacked||(d<0?d=0+y:d+h.height/3>i.globals.gridHeight&&(d=i.globals.gridHeight-y)),{bcx:l,bcy:s,dataLabelsX:f,dataLabelsY:d,totalDataLabelsX:r,totalDataLabelsY:e,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,r=t.x,i=t.i,n=t.j,o=t.realIndex,a=t.bcy,s=t.barHeight,l=t.barWidth,c=t.textRects,u=t.dataLabelsX,h=t.strokeWidth,f=t.dataLabelsConfig,d=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,g=t.offX,b=t.offY,y=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var v,m,x=a-(this.barCtx.isRangeBar?0:y)+s/2+c.height/2+b-3,w="start",S=e.globals.series[i][n]<0,k=r;switch(this.barCtx.isReversed&&(k=r+(S?-l:l),w=S?"start":"end"),d.position){case"center":u=S?k+l/2-g:Math.max(c.width/2,k-l/2)+g;break;case"bottom":u=S?k+l-h-g:k-l+h+g;break;case"top":u=S?k-h-g:k-h+g}if(this.barCtx.lastActiveBarSerieIndex===o&&p.enabled){var A=new Pc(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:n}),f.fontSize);S?(v=k-h-g-p.offsetX,w="end"):v=k+g+p.offsetX+(this.barCtx.isReversed?-(l+h):h),m=x-c.height/2+A.height/2+p.offsetY+h}return e.config.chart.stacked||("start"===f.textAnchor?u-c.width<0?u=S?c.width+h:h:u+c.width>e.globals.gridWidth&&(u=S?e.globals.gridWidth-h:e.globals.gridWidth-c.width-h):"middle"===f.textAnchor?u-c.width/2<0?u=c.width/2+h:u+c.width/2>e.globals.gridWidth&&(u=e.globals.gridWidth-c.width/2-h):"end"===f.textAnchor&&(u<1?u=c.width+h:u+1>e.globals.gridWidth&&(u=e.globals.gridWidth-c.width-h))),{bcx:r,bcy:a,dataLabelsX:u,dataLabelsY:x,totalDataLabelsX:v,totalDataLabelsY:m,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,r=t.y,i=t.val,n=t.i,o=t.j,a=t.textRects,s=t.barHeight,l=t.barWidth,c=t.dataLabelsConfig,u=this.w,h="rotate(0)";"vertical"===u.config.plotOptions.bar.dataLabels.orientation&&(h="rotate(-90, ".concat(e,", ").concat(r,")"));var f=new lh(this.barCtx.ctx),d=new Pc(this.barCtx.ctx),p=c.formatter,g=null,b=u.globals.collapsedSeriesIndices.indexOf(n)>-1;if(c.enabled&&!b){g=d.group({class:"apexcharts-data-labels",transform:h});var y="";void 0!==i&&(y=p(i,Sp(Sp({},u),{},{seriesIndex:n,dataPointIndex:o,w:u}))),!i&&u.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(y="");var v=u.globals.series[n][o]<0,m=u.config.plotOptions.bar.dataLabels.position;"vertical"===u.config.plotOptions.bar.dataLabels.orientation&&("top"===m&&(c.textAnchor=v?"end":"start"),"center"===m&&(c.textAnchor="middle"),"bottom"===m&&(c.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&lMath.abs(l)&&(y=""):a.height/1.6>Math.abs(s)&&(y=""));var x=Sp({},c);this.barCtx.isHorizontal&&i<0&&("start"===c.textAnchor?x.textAnchor="end":"end"===c.textAnchor&&(x.textAnchor="start")),f.plotDataLabelsText({x:e,y:r,text:y,i:n,j:o,parent:g,dataLabelsConfig:x,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return g}},{key:"drawTotalDataLabels",value:function(t){var e,r=t.x,i=t.y,n=t.val,o=t.realIndex,a=t.textAnchor,s=t.barTotalDataLabelsConfig,l=(this.w,new Pc(this.barCtx.ctx));return s.enabled&&void 0!==r&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===o&&(e=l.drawText({x:r,y:i,foreColor:s.style.color,text:n,textAnchor:a,fontFamily:s.style.fontFamily,fontSize:s.style.fontSize,fontWeight:s.style.fontWeight})),e}}],r&&Ap(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Cp(t){return Cp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cp(t)}function jp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Tp(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Lp(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[r].length),e.globals.isXNumeric)for(var i=0;ie.globals.minX&&e.globals.seriesX[r][i]0&&(i=l.globals.minXDiff/h),(o=i/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(o=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(o=parseInt(this.barCtx.barOptions.columnWidth,10)),a=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+(i-o*this.barCtx.seriesLen)/2}return l.globals.barHeight=n,l.globals.barWidth=o,{x:t,y:e,yDivision:r,xDivision:i,barHeight:n,barWidth:o,zeroH:a,zeroW:s}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,r,i){var n,o,a,s,l=this.w,c=this.barCtx.ctx.fill,u=null,h=this.barCtx.barOptions.distributed?r:e;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(i){t[e][r]>=i.from&&t[e][r]<=i.to&&(u=i.color)})),c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?h:i,dataPointIndex:r,color:u,value:t[e][r],fillConfig:null===(n=l.config.series[e].data[r])||void 0===n?void 0:n.fill,fillType:null!==(o=l.config.series[e].data[r])&&void 0!==o&&null!==(a=o.fill)&&void 0!==a&&a.type?null===(s=l.config.series[e].data[r])||void 0===s?void 0:s.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[i]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,r){var i=0,n=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,n.config.stroke.show&&(this.barCtx.isNullValue||(i=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[r]:this.barCtx.strokeWidth)),i}},{key:"createBorderRadiusArr",value:function(t){var e,r=this.w,i=!this.w.config.chart.stacked||r.config.plotOptions.bar.borderRadius<=0,n=t.length,o=0|(null===(e=t[0])||void 0===e?void 0:e.length),a=Array.from({length:n},(function(){return Array(o).fill(i?"top":"none")}));if(i)return a;for(var s=0;s0?(l.push(h),u++):f<0&&(c.push(h),u++)}if(l.length>0&&0===c.length)if(1===l.length)a[l[0]][s]="both";else{var d,p=l[0],g=l[l.length-1],b=Mp(l);try{for(b.s();!(d=b.n()).done;){var y=d.value;a[y][s]=y===p?"bottom":y===g?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===l.length)if(1===c.length)a[c[0]][s]="both";else{var v,m=Math.max.apply(Math,c),x=Math.min.apply(Math,c),w=Mp(c);try{for(w.s();!(v=w.n()).done;){var S=v.value;a[S][s]=S===m?"bottom":S===x?"top":"none"}}catch(t){w.e(t)}finally{w.f()}}else if(l.length>0&&c.length>0){var k,A=l[l.length-1],O=Mp(l);try{for(O.s();!(k=O.n()).done;){var P=k.value;a[P][s]=P===A?"top":"none"}}catch(t){O.e(t)}finally{O.f()}var C,j=Math.max.apply(Math,c),T=Mp(c);try{for(T.s();!(C=T.n()).done;){var E=C.value;a[E][s]=E===j?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else 1===u&&(a[l[0]||c[0]][s]="both")}return a}},{key:"barBackground",value:function(t){var e=t.j,r=t.i,i=t.x1,n=t.x2,o=t.y1,a=t.y2,s=t.elSeries,l=this.w,c=new Pc(this.barCtx.ctx),u=new fh(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&u===r){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var h=this.barCtx.barOptions.colors.backgroundBarColors[e],f=c.drawRect(void 0!==i?i:0,void 0!==o?o:0,void 0!==n?n:l.globals.gridWidth,void 0!==a?a:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,h,this.barCtx.barOptions.colors.backgroundBarOpacity);s.add(f),f.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,r=t.barWidth,i=t.barXPosition,n=t.y1,o=t.y2,a=t.strokeWidth,s=t.isReversed,l=t.series,c=t.seriesGroup,u=t.realIndex,h=t.i,f=t.j,d=t.w,p=new Pc(this.barCtx.ctx);(a=Array.isArray(a)?a[u]:a)||(a=0);var g=r,b=i;null!==(e=d.config.series[u].data[f])&&void 0!==e&&e.columnWidthOffset&&(b=i-d.config.series[u].data[f].columnWidthOffset/2,g=r+d.config.series[u].data[f].columnWidthOffset);var y=a/2,v=b+y,m=b+g-y,x=(l[h][f]>=0?1:-1)*(s?-1:1);n+=.001-y*x,o+=.001+y*x;var w=p.move(v,n),S=p.move(v,n),k=p.line(m,n);if(d.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(u,f,!1)),w=w+p.line(v,o)+p.line(m,o)+k+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),S=S+p.line(v,n)+k+k+k+k+k+p.line(v,n)+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),"none"!==this.arrBorderRadius[u][f]&&(w=p.roundPathCorners(w,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[c]).yArrj.push(o-y*x),A.yArrjF.push(Math.abs(n-o+a*x)),A.yArrjVal.push(this.barCtx.series[h][f])}return{pathTo:w,pathFrom:S}}},{key:"getBarpaths",value:function(t){var e,r=t.barYPosition,i=t.barHeight,n=t.x1,o=t.x2,a=t.strokeWidth,s=t.isReversed,l=t.series,c=t.seriesGroup,u=t.realIndex,h=t.i,f=t.j,d=t.w,p=new Pc(this.barCtx.ctx);(a=Array.isArray(a)?a[u]:a)||(a=0);var g=r,b=i;null!==(e=d.config.series[u].data[f])&&void 0!==e&&e.barHeightOffset&&(g=r-d.config.series[u].data[f].barHeightOffset/2,b=i+d.config.series[u].data[f].barHeightOffset);var y=a/2,v=g+y,m=g+b-y,x=(l[h][f]>=0?1:-1)*(s?-1:1);n+=.001+y*x,o+=.001-y*x;var w=p.move(n,v),S=p.move(n,v);d.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(u,f,!1));var k=p.line(n,m);if(w=w+p.line(o,v)+p.line(o,m)+k+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),S=S+p.line(n,v)+k+k+k+k+k+p.line(n,v)+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),"none"!==this.arrBorderRadius[u][f]&&(w=p.roundPathCorners(w,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[c]).xArrj.push(o+y*x),A.xArrjF.push(Math.abs(n-o-a*x)),A.xArrjVal.push(this.barCtx.series[h][f])}return{pathTo:w,pathFrom:S}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,r=this.w,i=0;i2&&void 0!==arguments[2]&&!arguments[2]?null:e;return null!=t&&(r=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),r}},{key:"getYForValue",value:function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?null:e;return null!=t&&(i=e-t/this.barCtx.yRatio[r]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[r]:0)),i}},{key:"getGoalValues",value:function(t,e,r,i,n,o){var a=this,s=this.w,l=[],c=function(i,n){var s;l.push((Ep(s={},t,"x"===t?a.getXForValue(i,e,!1):a.getYForValue(i,r,o,!1)),Ep(s,"attrs",n),s))};if(s.globals.seriesGoals[i]&&s.globals.seriesGoals[i][n]&&Array.isArray(s.globals.seriesGoals[i][n])&&s.globals.seriesGoals[i][n].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&s.globals.seriesRange.length){var u=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:s.globals.colors,h={strokeHeight:"x"===t?0:s.globals.markers.size[i],strokeWidth:"x"===t?s.globals.markers.size[i]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(u[i])?u[i][0]:u[i]};c(s.globals.seriesRangeStart[i][n],h),c(s.globals.seriesRangeEnd[i][n],Tp(Tp({},h),{},{strokeColor:Array.isArray(u[i])?u[i][1]:u[i]}))}return l}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,r=t.barYPosition,i=t.goalX,n=t.goalY,o=t.barWidth,a=t.barHeight,s=new Pc(this.barCtx.ctx),l=s.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var c=null;return this.barCtx.isHorizontal?Array.isArray(i)&&i.forEach((function(t){if(t.x>=-1&&t.x<=s.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:a/2,i=r+e+a/2;c=s.drawLine(t.x,i-2*e,t.x,i,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(c)}})):Array.isArray(n)&&n.forEach((function(t){if(t.y>=-1&&t.y<=s.w.globals.gridHeight+1){var r=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:o/2,i=e+r+o/2;c=s.drawLine(i-2*r,t.y,i,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(c)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,r=t.currPaths,i=t.color,n=this.w,o=e.x,a=e.x1,s=e.barYPosition,l=r.x,c=r.x1,u=r.barYPosition,h=s+r.barHeight,d=new Pc(this.barCtx.ctx),p=new f,g=d.move(a,h)+d.line(o,h)+d.line(l,u)+d.line(c,u)+d.line(a,h)+("around"===n.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return d.drawPath({d:g,fill:p.shadeColor(.5,f.rgb2hex(i)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,r=t.i,i=t.j,n=this.w,o=0,a=0;return(n.config.plotOptions.bar.horizontal?n.globals.series.map((function(t,e){return e})):(null===(e=n.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=n.globals.seriesPercent[t][i];e&&o++,t-1})),i=this.barCtx.columnGroupIndices,n=i.indexOf(r);return n<0&&(i.push(r),n=i.length-1),{groupIndex:r,columnGroupIndex:n}}}],r&&Ip(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zp(t){return zp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zp(t)}function Xp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Dp(t){for(var e=1;ethis.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var a=0,s=0;a0&&(this.visibleI=this.visibleI+1);var x=0,w=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[y],this.translationsIndex=y);var S=this.translationsIndex;this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed;var k=this.barHelpers.initialPositions();p=k.y,x=k.barHeight,c=k.yDivision,h=k.zeroW,d=k.x,w=k.barWidth,l=k.xDivision,u=k.zeroH,this.isHorizontal||b.push(d+w/2);var A=i.group({class:"apexcharts-datalabels","data:realIndex":y});r.globals.delayedElements.push({el:A.node}),A.node.classList.add("apexcharts-element-hidden");var O=i.group({class:"apexcharts-bar-goals-markers"}),P=i.group({class:"apexcharts-bar-shadows"});r.globals.delayedElements.push({el:P.node}),P.node.classList.add("apexcharts-element-hidden");for(var C=0;C0){var L=this.barHelpers.drawBarShadow({color:"string"==typeof M&&-1===(null==M?void 0:M.indexOf("url"))?M:f.hexToRgba(r.globals.colors[a]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});P.add(L),r.config.chart.dropShadow.enabled&&new vc(this.ctx).dropShadow(L,r.config.chart.dropShadow,y)}this.pathArr.push(T);var I=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:x,barWidth:w});I&&O.add(I),p=T.y,d=T.x,C>0&&b.push(d+w/2),g.push(p),this.renderSeries({realIndex:y,pathFill:M,j:C,i:a,columnGroupIndex:v,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:j,elSeries:m,x:d,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:x),barWidth:Math.abs(T.barWidth?T.barWidth:w),elDataLabelsWrap:A,elGoalsMarkers:O,elBarShadows:P,visibleSeries:this.visibleI,type:"bar"})}r.globals.seriesXvalues[y]=b,r.globals.seriesYvalues[y]=g,o.add(m)}return o}},{key:"renderSeries",value:function(t){var e=t.realIndex,r=t.pathFill,i=t.lineFill,n=t.j,o=t.i,a=t.columnGroupIndex,s=t.pathFrom,l=t.pathTo,c=t.strokeWidth,u=t.elSeries,h=t.x,f=t.y,d=t.y1,p=t.y2,g=t.series,b=t.barHeight,y=t.barWidth,v=t.barXPosition,m=t.barYPosition,x=t.elDataLabelsWrap,w=t.elGoalsMarkers,S=t.elBarShadows,k=t.visibleSeries,A=t.type,O=t.classes,P=this.w,C=new Pc(this.ctx);if(!i){var j="function"==typeof P.globals.stroke.colors[e]?function(t){var e,r=P.config.stroke.colors;return Array.isArray(r)&&r.length>0&&((e=r[t])||(e=""),"function"==typeof e)?e({value:P.globals.series[t][n],dataPointIndex:n,w:P}):e}(e):P.globals.stroke.colors[e];i=this.barOptions.distributed?P.globals.stroke.colors[n]:j}P.config.series[o].data[n]&&P.config.series[o].data[n].strokeColor&&(i=P.config.series[o].data[n].strokeColor),this.isNullValue&&(r="none");var T=n/P.config.chart.animations.animateGradually.delay*(P.config.chart.animations.speed/P.globals.dataPoints)/2.4,E=C.renderPaths({i:o,j:n,realIndex:e,pathFrom:s,pathTo:l,stroke:i,strokeWidth:c,strokeLineCap:P.config.stroke.lineCap,fill:r,animationDelay:T,initialSpeed:P.config.chart.animations.speed,dataChangeSpeed:P.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(A,"-area ").concat(O),chartType:A});E.attr("clip-path","url(#gridRectBarMask".concat(P.globals.cuid,")"));var M=P.config.forecastDataPoints;M.count>0&&n>=P.globals.dataPoints-M.count&&(E.node.setAttribute("stroke-dasharray",M.dashArray),E.node.setAttribute("stroke-width",M.strokeWidth),E.node.setAttribute("fill-opacity",M.fillOpacity)),void 0!==d&&void 0!==p&&(E.attr("data-range-y1",d),E.attr("data-range-y2",p)),new vc(this.ctx).setSelectionFilter(E,e,n),u.add(E);var L=new Pp(this).handleBarDataLabels({x:h,y:f,y1:d,y2:p,i:o,j:n,series:g,realIndex:e,columnGroupIndex:a,barHeight:b,barWidth:y,barXPosition:v,barYPosition:m,renderedPath:E,visibleSeries:k});return null!==L.dataLabels&&x.add(L.dataLabels),L.totalDataLabels&&x.add(L.totalDataLabels),u.add(x),w&&u.add(w),S&&u.add(S),u}},{key:"drawBarPaths",value:function(t){var e,r=t.indexes,i=t.barHeight,n=t.strokeWidth,o=t.zeroW,a=t.x,s=t.y,l=t.yDivision,c=t.elSeries,u=this.w,h=r.i,f=r.j;if(u.globals.isXNumeric)e=(s=(u.globals.seriesX[h][f]-u.globals.minX)/this.invertedXRatio-i)+i*this.visibleI;else if(u.config.plotOptions.bar.hideZeroBarsWhenGrouped){var d=0,p=0;u.globals.seriesPercent.forEach((function(t,e){t[f]&&d++,e0&&(i=this.seriesLen*i/d),e=s+i*this.visibleI,e-=i*p}else e=s+i*this.visibleI;this.isFunnel&&(o-=(this.barHelpers.getXForValue(this.series[h][f],o)-o)/2),a=this.barHelpers.getXForValue(this.series[h][f],o);var g=this.barHelpers.getBarpaths({barYPosition:e,barHeight:i,x1:o,x2:a,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:r.realIndex,i:h,j:f,w:u});return u.globals.isXNumeric||(s+=l),this.barHelpers.barBackground({j:f,i:h,y1:e-i*this.visibleI,y2:i*this.seriesLen,elSeries:c}),{pathTo:g.pathTo,pathFrom:g.pathFrom,x1:o,x:a,y:s,goalX:this.barHelpers.getGoalValues("x",o,null,h,f),barYPosition:e,barHeight:i}}},{key:"drawColumnPaths",value:function(t){var e,r=t.indexes,i=t.x,n=t.y,o=t.xDivision,a=t.barWidth,s=t.zeroH,l=t.strokeWidth,c=t.elSeries,u=this.w,h=r.realIndex,f=r.translationsIndex,d=r.i,p=r.j,g=r.bc;if(u.globals.isXNumeric){var b=this.getBarXForNumericXAxis({x:i,j:p,realIndex:h,barWidth:a});i=b.x,e=b.barXPosition}else if(u.config.plotOptions.bar.hideZeroBarsWhenGrouped){var y=this.barHelpers.getZeroValueEncounters({i:d,j:p}),v=y.nonZeroColumns,m=y.zeroEncounters;v>0&&(a=this.seriesLen*a/v),e=i+a*this.visibleI,e-=a*m}else e=i+a*this.visibleI;n=this.barHelpers.getYForValue(this.series[d][p],s,f);var x=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:a,y1:s,y2:n,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:h,i:d,j:p,w:u});return u.globals.isXNumeric||(i+=o),this.barHelpers.barBackground({bc:g,j:p,i:d,x1:e-l/2-a*this.visibleI,x2:a*this.seriesLen+l/2,elSeries:c}),{pathTo:x.pathTo,pathFrom:x.pathFrom,x:i,y:n,goalY:this.barHelpers.getGoalValues("y",null,s,d,p,f),barXPosition:e,barWidth:a}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,r=t.barWidth,i=t.realIndex,n=t.j,o=this.w,a=i;return o.globals.seriesX[i].length||(a=o.globals.maxValsInArrayIndex),f.isNumber(o.globals.seriesX[a][n])&&(e=(o.globals.seriesX[a][n]-o.globals.minX)/this.xRatio-r*this.seriesLen/2),{barXPosition:e+r*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var r,i=this.w,n=0;n0&&parseInt(o.realIndex,10)===parseInt(t,10)&&void 0!==i.globals.previousPaths[n].paths[e]&&(r=i.globals.previousPaths[n].paths[e].d)}return r}}],r&&Hp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Np=Bp;function Wp(t){return Wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wp(t)}function Gp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Vp(t){for(var e=1;e1&&(r.yaxisIndex=i.globals.seriesYAxisReverseMap[p][0],x=p),r.isReversed=i.config.yaxis[r.yaxisIndex]&&i.config.yaxis[r.yaxisIndex].reversed;var w=r.graphics.group({class:"apexcharts-series",seriesName:f.escapeString(i.globals.seriesNames[p]),rel:n+1,"data:realIndex":p});r.ctx.series.addCollapsedClassToSeries(w,p);var S=r.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),k=r.graphics.group({class:"apexcharts-bar-goals-markers"}),A=0,O=0,P=r.initialPositions(a,s,c,u,h,d,x);s=P.y,A=P.barHeight,u=P.yDivision,d=P.zeroW,a=P.x,O=P.barWidth,c=P.xDivision,h=P.zeroH,i.globals.barHeight=A,i.globals.barWidth=O,r.barHelpers.initializeStackedXYVars(r),1===r.groupCtx.prevY.length&&r.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(r.groupCtx.prevY[0]=r.groupCtx.prevY[0].map((function(){return h})),r.groupCtx.prevYF[0]=r.groupCtx.prevYF[0].map((function(){return 0})));for(var C=0;C0||"top"===r.barHelpers.arrBorderRadius[p][C]&&i.globals.series[p][C]<0)&&(I=_),w=r.renderSeries({realIndex:p,pathFill:L,j:C,i:n,columnGroupIndex:y,pathFrom:E.pathFrom,pathTo:E.pathTo,strokeWidth:j,elSeries:w,x:a,y:s,series:t,barHeight:A,barWidth:O,elDataLabelsWrap:S,elGoalsMarkers:k,type:"bar",visibleSeries:y,classes:I})}i.globals.seriesXvalues[p]=v,i.globals.seriesYvalues[p]=m,r.groupCtx.prevY.push(r.groupCtx.yArrj),r.groupCtx.prevYF.push(r.groupCtx.yArrjF),r.groupCtx.prevYVal.push(r.groupCtx.yArrjVal),r.groupCtx.prevX.push(r.groupCtx.xArrj),r.groupCtx.prevXF.push(r.groupCtx.xArrjF),r.groupCtx.prevXVal.push(r.groupCtx.xArrjVal),o.add(w)},c=0,u=0;c1?l=(r=c.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(h).indexOf("%")?l=parseInt(h,10):l*=parseInt(h,10)/100,n=this.isReversed?this.baseLineY[a]:c.globals.gridHeight-this.baseLineY[a],t=c.globals.padHorizontal+(r-l)/2}var f=c.globals.barGroups.length||1;return{x:t,y:e,yDivision:i,xDivision:r,barHeight:s/f,barWidth:l/f,zeroH:n,zeroW:o}}},{key:"drawStackedBarPaths",value:function(t){for(var e,r=t.indexes,i=t.barHeight,n=t.strokeWidth,o=t.zeroW,a=t.x,s=t.y,l=t.columnGroupIndex,c=t.seriesGroup,u=t.yDivision,h=t.elSeries,f=this.w,d=s+l*i,p=r.i,g=r.j,b=r.realIndex,y=r.translationsIndex,v=0,m=0;m0){var w=o;this.groupCtx.prevXVal[x-1][g]<0?w=this.series[p][g]>=0?this.groupCtx.prevX[x-1][g]+v-2*(this.isReversed?v:0):this.groupCtx.prevX[x-1][g]:this.groupCtx.prevXVal[x-1][g]>=0&&(w=this.series[p][g]>=0?this.groupCtx.prevX[x-1][g]:this.groupCtx.prevX[x-1][g]-v+2*(this.isReversed?v:0)),e=w}else e=o;a=null===this.series[p][g]?e:e+this.series[p][g]/this.invertedYRatio-2*(this.isReversed?this.series[p][g]/this.invertedYRatio:0);var S=this.barHelpers.getBarpaths({barYPosition:d,barHeight:i,x1:e,x2:a,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:r.realIndex,seriesGroup:c,i:p,j:g,w:f});return this.barHelpers.barBackground({j:g,i:p,y1:d,y2:i,elSeries:h}),s+=u,{pathTo:S.pathTo,pathFrom:S.pathFrom,goalX:this.barHelpers.getGoalValues("x",o,null,p,g,y),barXPosition:e,barYPosition:d,x:a,y:s}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,r=t.x,i=t.y,n=t.xDivision,o=t.barWidth,a=t.zeroH,s=t.columnGroupIndex,l=t.seriesGroup,c=t.elSeries,u=this.w,h=e.i,f=e.j,d=e.bc,p=e.realIndex,g=e.translationsIndex;if(u.globals.isXNumeric){var b=u.globals.seriesX[p][f];b||(b=0),r=(b-u.globals.minX)/this.xRatio-o/2*u.globals.barGroups.length}for(var y,v=r+s*o,m=0,x=0;x0&&!u.globals.isXNumeric||w>0&&u.globals.isXNumeric&&u.globals.seriesX[p-1][f]===u.globals.seriesX[p][f]){var S,k,A,O=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var P=1;P=0?A-m+2*(this.isReversed?m:0):A;break}if((null===(E=this.groupCtx.prevYVal[w-j])||void 0===E?void 0:E[f])>=0){k=this.series[h][f]>=0?A:A+m-2*(this.isReversed?m:0);break}}void 0===k&&(k=u.globals.gridHeight),y=null!==(S=this.groupCtx.prevYF[0])&&void 0!==S&&S.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?a:k}else y=a;i=this.series[h][f]?y-this.series[h][f]/this.yRatio[g]+2*(this.isReversed?this.series[h][f]/this.yRatio[g]:0):y;var M=this.barHelpers.getColumnPaths({barXPosition:v,barWidth:o,y1:y,y2:i,yRatio:this.yRatio[g],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:h,j:f,w:u});return this.barHelpers.barBackground({bc:d,j:f,i:h,x1:v,x2:o,elSeries:c}),{pathTo:M.pathTo,pathFrom:M.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,a,h,f),barXPosition:v,x:u.globals.isXNumeric?r:r+n,y:i}}}],r&&qp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const eg=tg;function rg(t){return rg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rg(t)}function ig(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function ng(t){for(var e=1;e0&&(i.visibleI=i.visibleI+1);var x,w,S=0;i.yRatio.length>1&&(i.yaxisIndex=n.globals.seriesYAxisReverseMap[y][0],S=y);var k=i.barHelpers.initialPositions();p=k.y,x=k.barHeight,l=k.yDivision,h=k.zeroW,d=k.x,w=k.barWidth,a=k.xDivision,u=k.zeroH,b.push(d+w/2);for(var A=o.group({class:"apexcharts-datalabels","data:realIndex":y}),O=o.group({class:"apexcharts-bar-goals-markers"}),P=function(r){var o=i.barHelpers.getStrokeWidth(e,r,y),c=null,f={indexes:{i:e,j:r,realIndex:y,translationsIndex:S},x:d,y:p,strokeWidth:o,elSeries:m};c=i.isHorizontal?i.drawHorizontalBoxPaths(ng(ng({},f),{},{yDivision:l,barHeight:x,zeroW:h})):i.drawVerticalBoxPaths(ng(ng({},f),{},{xDivision:a,barWidth:w,zeroH:u})),p=c.y,d=c.x;var k=i.barHelpers.drawGoalLine({barXPosition:c.barXPosition,barYPosition:c.barYPosition,goalX:c.goalX,goalY:c.goalY,barHeight:x,barWidth:w});k&&O.add(k),r>0&&b.push(d+w/2),g.push(p),c.pathTo.forEach((function(a,l){var u=!i.isBoxPlot&&i.candlestickOptions.wick.useFillColor?c.color[l]:n.globals.stroke.colors[e],h=s.fillPath({seriesNumber:y,dataPointIndex:r,color:c.color[l],value:t[e][r]});i.renderSeries({realIndex:y,pathFill:h,lineFill:u,j:r,i:e,pathFrom:c.pathFrom,pathTo:a,strokeWidth:o,elSeries:m,x:d,y:p,series:t,columnGroupIndex:v,barHeight:x,barWidth:w,elDataLabelsWrap:A,elGoalsMarkers:O,visibleSeries:i.visibleI,type:n.config.chart.type})}))},C=0;Cy.c&&(h=!1);var x=Math.min(y.o,y.c),w=Math.max(y.o,y.c),S=y.m;s.globals.isXNumeric&&(r=(s.globals.seriesX[f][u]-s.globals.minX)/this.xRatio-n/2);var k=r+n*this.visibleI;void 0===this.series[c][u]||null===this.series[c][u]?(x=o,w=o):(x=o-x/b,w=o-w/b,v=o-y.h/b,m=o-y.l/b,S=o-y.m/b);var A=l.move(k,o),O=l.move(k+n/2,x);return s.globals.previousPaths.length>0&&(O=this.getPreviousPath(f,u,!0)),A=this.isBoxPlot?[l.move(k,x)+l.line(k+n/2,x)+l.line(k+n/2,v)+l.line(k+n/4,v)+l.line(k+n-n/4,v)+l.line(k+n/2,v)+l.line(k+n/2,x)+l.line(k+n,x)+l.line(k+n,S)+l.line(k,S)+l.line(k,x+a/2),l.move(k,S)+l.line(k+n,S)+l.line(k+n,w)+l.line(k+n/2,w)+l.line(k+n/2,m)+l.line(k+n-n/4,m)+l.line(k+n/4,m)+l.line(k+n/2,m)+l.line(k+n/2,w)+l.line(k,w)+l.line(k,S)+"z"]:[l.move(k,w)+l.line(k+n/2,w)+l.line(k+n/2,v)+l.line(k+n/2,w)+l.line(k+n,w)+l.line(k+n,x)+l.line(k+n/2,x)+l.line(k+n/2,m)+l.line(k+n/2,x)+l.line(k,x)+l.line(k,w-a/2)],O+=l.move(k,x),s.globals.isXNumeric||(r+=i),{pathTo:A,pathFrom:O,x:r,y:w,goalY:this.barHelpers.getGoalValues("y",null,o,c,u,e.translationsIndex),barXPosition:k,color:this.isBoxPlot?g:h?[d]:[p]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes,r=(t.x,t.y),i=t.yDivision,n=t.barHeight,o=t.zeroW,a=t.strokeWidth,s=this.w,l=new Pc(this.ctx),c=e.i,u=e.j,h=this.boxOptions.colors.lower;this.isBoxPlot&&(h=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var f=this.invertedYRatio,d=e.realIndex,p=this.getOHLCValue(d,u),g=o,b=o,y=Math.min(p.o,p.c),v=Math.max(p.o,p.c),m=p.m;s.globals.isXNumeric&&(r=(s.globals.seriesX[d][u]-s.globals.minX)/this.invertedXRatio-n/2);var x=r+n*this.visibleI;void 0===this.series[c][u]||null===this.series[c][u]?(y=o,v=o):(y=o+y/f,v=o+v/f,g=o+p.h/f,b=o+p.l/f,m=o+p.m/f);var w=l.move(o,x),S=l.move(y,x+n/2);return s.globals.previousPaths.length>0&&(S=this.getPreviousPath(d,u,!0)),w=[l.move(y,x)+l.line(y,x+n/2)+l.line(g,x+n/2)+l.line(g,x+n/2-n/4)+l.line(g,x+n/2+n/4)+l.line(g,x+n/2)+l.line(y,x+n/2)+l.line(y,x+n)+l.line(m,x+n)+l.line(m,x)+l.line(y+a/2,x),l.move(m,x)+l.line(m,x+n)+l.line(v,x+n)+l.line(v,x+n/2)+l.line(b,x+n/2)+l.line(b,x+n-n/4)+l.line(b,x+n/4)+l.line(b,x+n/2)+l.line(v,x+n/2)+l.line(v,x)+l.line(m,x)+"z"],S+=l.move(y,x),s.globals.isXNumeric||(r+=i),{pathTo:w,pathFrom:S,x:v,y:r,goalX:this.barHelpers.getGoalValues("x",o,null,c,u),barYPosition:x,color:h}}},{key:"getOHLCValue",value:function(t,e){var r=this.w,i=new Mc(this.ctx,r),n=i.getLogValAtSeriesIndex(r.globals.seriesCandleH[t][e],t),o=i.getLogValAtSeriesIndex(r.globals.seriesCandleO[t][e],t),a=i.getLogValAtSeriesIndex(r.globals.seriesCandleM[t][e],t),s=i.getLogValAtSeriesIndex(r.globals.seriesCandleC[t][e],t),l=i.getLogValAtSeriesIndex(r.globals.seriesCandleL[t][e],t);return{o:this.isBoxPlot?n:o,h:this.isBoxPlot?o:n,m:a,l:this.isBoxPlot?s:l,c:this.isBoxPlot?l:s}}}],r&&ag(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const dg=fg;function pg(t){return pg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pg(t)}function gg(t){return function(t){if(Array.isArray(t))return bg(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return bg(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bg(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bg(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&r.colorScale.ranges.map((function(t,r){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,r,i){var n=this.w,o=1,a=n.config.plotOptions[t].shadeIntensity,s=this.determineColor(t,e,r);n.globals.hasNegs||i?o=n.config.plotOptions[t].reverseNegativeShade?s.percent<0?s.percent/100*(1.25*a):(1-s.percent/100)*(1.25*a):s.percent<=0?1-(1+s.percent/100)*a:(1-s.percent/100)*a:(o=1-s.percent/100,"treemap"===t&&(o=(1-s.percent/100)*(1.25*a)));var l=s.color,c=new f;if(n.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var u=c.shadeColor(-1*o,s.color);l=f.hexToRgba(f.isColorHex(u)?u:f.rgb2hex(u),n.config.fill.opacity)}else{var h=c.shadeColor(o,s.color);l=f.hexToRgba(f.isColorHex(h)?h:f.rgb2hex(h),n.config.fill.opacity)}return{color:l,colorProps:s}}},{key:"determineColor",value:function(t,e,r){var i=this.w,n=i.globals.series[e][r],o=i.config.plotOptions[t],a=o.colorScale.inverse?r:e;o.distributed&&"treemap"===i.config.chart.type&&(a=r);var s=i.globals.colors[a],l=null,c=Math.min.apply(Math,gg(i.globals.series[e])),u=Math.max.apply(Math,gg(i.globals.series[e]));o.distributed||"heatmap"!==t||(c=i.globals.minY,u=i.globals.maxY),void 0!==o.colorScale.min&&(c=o.colorScale.mini.globals.maxY?o.colorScale.max:i.globals.maxY);var h=Math.abs(u)+Math.abs(c),f=100*n/(0===h?h-1e-6:h);return o.colorScale.ranges.length>0&&o.colorScale.ranges.map((function(t,e){if(n>=t.from&&n<=t.to){s=t.color,l=t.foreColor?t.foreColor:null,c=t.from,u=t.to;var r=Math.abs(u)+Math.abs(c);f=100*n/(0===r?r-1e-6:r)}})),{color:s,foreColor:l,percent:f}}},{key:"calculateDataLabels",value:function(t){var e=t.text,r=t.x,i=t.y,n=t.i,o=t.j,a=t.colorProps,s=t.fontSize,l=this.w.config.dataLabels,c=new Pc(this.ctx),u=new lh(this.ctx),h=null;if(l.enabled){h=c.group({class:"apexcharts-data-labels"});var f=l.offsetX,d=l.offsetY,p=r+f,g=i+parseFloat(l.style.fontSize)/3+d;u.plotDataLabelsText({x:p,y:g,text:e,i:n,j:o,color:a.foreColor,parent:h,fontSize:s,dataLabelsConfig:l})}return h}},{key:"addListeners",value:function(t){var e=new Pc(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}],r&&yg(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function xg(t){return xg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xg(t)}function wg(t,e){for(var r=0;r=0;s?c++:c--){var u=r.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:f.escapeString(e.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(u,c),e.config.chart.dropShadow.enabled){var h=e.config.chart.dropShadow;new vc(this.ctx).dropShadow(u,h,c)}for(var d=0,p=e.config.plotOptions.heatmap.shadeIntensity,g=0;g-1&&this.pieClicked(h),r.config.dataLabels.enabled){var w=m.x,S=m.y,k=100*p/this.fullAngle+"%";if(0!==p&&r.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(i+a):i+a=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(c=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(c)>this.fullAngle&&(c-=this.fullAngle);var u=Math.PI*(c-90)/180,h=r.centerX+o*Math.cos(l),d=r.centerY+o*Math.sin(l),p=r.centerX+o*Math.cos(u),g=r.centerY+o*Math.sin(u),b=f.polarToCartesian(r.centerX,r.centerY,r.donutSize,c),y=f.polarToCartesian(r.centerX,r.centerY,r.donutSize,s),v=n>180?1:0,m=["M",h,d,"A",o,o,0,v,1,p,g];return e="donut"===r.chartType?[].concat(m,["L",b.x,b.y,"A",r.donutSize,r.donutSize,0,v,0,y.x,y.y,"L",h,d,"z"]).join(" "):"pie"===r.chartType||"polarArea"===r.chartType?[].concat(m,["L",r.centerX,r.centerY,"L",h,d]).join(" "):[].concat(m).join(" "),a.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,r=new Dh(this.ctx),i=new Pc(this.ctx),n=new Cg(this.ctx),o=i.group(),a=i.group(),s=r.niceScale(0,Math.ceil(this.maxY),0),l=s.result.reverse(),c=s.result.length;this.maxY=s.niceMax;for(var u=e.globals.radialSize,h=u/(c-1),f=0;f1&&t.total.show&&(n=t.total.color);var a=o.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),s=o.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");r=(0,t.value.formatter)(r,o),i||"function"!=typeof t.total.formatter||(r=t.total.formatter(o));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,o):"",null!==a&&(a.textContent=e),null!==s&&(s.textContent=r),null!==a&&(a.style.fill=n)}},{key:"printDataLabelsInner",value:function(t,e){var r=this.w,i=t.getAttribute("data:value"),n=r.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];r.globals.series.length>1&&this.printInnerLabels(e,n,i,t);var o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==o&&(o.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,r=this.w,i=new Pc(this.ctx),n=r.config.plotOptions.polarArea.spokes;if(0!==n.strokeWidth){for(var o=[],a=360/r.globals.series.length,s=0;s0&&(g=e.getPreviousPath(a));for(var b=0;b=10?t.x>0?(r="start",i+=10):t.x<0&&(r="end",i-=10):r="middle",Math.abs(t.y)>=e-10&&(t.y<0?n-=10:t.y>0&&(n+=10)),{textAnchor:r,newX:i,newY:n}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,r=null,i=0;i0&&parseInt(n.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[i].paths[0]&&(r=e.globals.previousPaths[i].paths[0].d)}return r}},{key:"getDataPointsPos",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var i=[],n=0;n=360&&(f=360-Math.abs(this.startAngle)-.1);var d=r.drawPath({d:"",stroke:u,strokeWidth:a*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){var p=c.dropShadow;n.dropShadow(d,p)}l.add(d),d.attr("id","apexcharts-radialbarTrack-"+s),this.animatePaths(d,{centerX:t.centerX,centerY:t.centerY,endAngle:f,startAngle:h,size:t.size,i:s,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return i}},{key:"drawArcs",value:function(t){var e=this.w,r=new Pc(this.ctx),i=new Zu(this.ctx),n=new vc(this.ctx),o=r.group(),a=this.getStrokeWidth(t);t.size=t.size-a/2;var s=e.config.plotOptions.radialBar.hollow.background,l=t.size-a*t.series.length-this.margin*t.series.length-a*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,c=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(s=this.drawHollowImage(t,o,l,s));var u=this.drawHollow({size:c,centerX:t.centerX,centerY:t.centerY,fill:s||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var h=e.config.plotOptions.radialBar.hollow.dropShadow;n.dropShadow(u,h)}var d=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(d=0);var p=null;if(this.radialDataLabels.show){var g=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");p=this.renderInnerDataLabels(g,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:d})}"back"===e.config.plotOptions.radialBar.hollow.position&&(o.add(u),p&&o.add(p));var b=!1;e.config.plotOptions.radialBar.inverseOrder&&(b=!0);for(var y=b?t.series.length-1:0;b?y>=0:y100?100:t.series[y])/100,k=Math.round(this.totalAngle*S)+this.startAngle,A=void 0;e.globals.dataChanged&&(w=this.startAngle,A=Math.round(this.totalAngle*f.negToZero(e.globals.previousPaths[y])/100)+w),Math.abs(k)+Math.abs(x)>360&&(k-=.01),Math.abs(A)+Math.abs(w)>360&&(A-=.01);var O=k-x,P=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[y]:e.config.stroke.dashArray,C=r.drawPath({d:"",stroke:m,strokeWidth:a,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+y,strokeDashArray:P});if(Pc.setAttrs(C.node,{"data:angle":O,"data:value":t.series[y]}),e.config.chart.dropShadow.enabled){var j=e.config.chart.dropShadow;n.dropShadow(C,j,y)}if(n.setSelectionFilter(C,0,y),this.addListeners(C,this.radialDataLabels),v.add(C),C.attr({index:0,j:y}),this.barLabels.enabled){var T=f.polarToCartesian(t.centerX,t.centerY,t.size,x),E=this.barLabels.formatter(e.globals.seriesNames[y],{seriesIndex:y,w:e}),M=["apexcharts-radialbar-label"];this.barLabels.onClick||M.push("apexcharts-no-click");var L=this.barLabels.useSeriesColors?e.globals.colors[y]:e.config.chart.foreColor;L||(L=e.config.chart.foreColor);var I=T.x+this.barLabels.offsetX,_=T.y+this.barLabels.offsetY,R=r.drawText({x:I,y:_,text:E,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:L,cssClass:M.join(" ")});R.on("click",this.onBarLabelClick),R.attr({rel:y+1}),0!==x&&R.attr({"transform-origin":"".concat(I," ").concat(_),transform:"rotate(".concat(x," 0 0)")}),v.add(R)}var z=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(z=e.config.chart.animations.speed),e.globals.dataChanged&&(z=e.config.chart.animations.dynamicAnimation.speed),this.animDur=z/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(C,{centerX:t.centerX,centerY:t.centerY,endAngle:k,startAngle:x,prevEndAngle:A,prevStartAngle:w,size:t.size,i:y,totalItems:2,animBeginArr:this.animBeginArr,dur:z,shouldSetPrevPaths:!0})}return{g:o,elHollow:u,dataLabels:p}}},{key:"drawHollow",value:function(t){var e=new Pc(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,r,i){var n=this.w,o=new Zu(this.ctx),a=f.randomId(),s=n.config.plotOptions.radialBar.hollow.image;if(n.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:r,height:r,image:s,patternID:"pattern".concat(n.globals.cuid).concat(a)}),i="url(#pattern".concat(n.globals.cuid).concat(a,")");else{var l=n.config.plotOptions.radialBar.hollow.imageWidth,c=n.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===c){var u=n.globals.dom.Paper.image(s,(function(e){this.move(t.centerX-e.width/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+n.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(u)}else{var h=n.globals.dom.Paper.image(s,(function(e){this.move(t.centerX-l/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-c/2+n.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)}));e.add(h)}}return i}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,r=this.barLabels.onClick,i=this.w;r&&r(i.globals.seriesNames[e],{w:i,seriesIndex:e})}}],r&&Bg(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Lg);const $g=Zg;function Jg(t){return Jg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jg(t)}function Qg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Kg(t){for(var e=1;e0&&(this.visibleI=this.visibleI+1);var b=0,y=0,v=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[d][0],v=d);var m=this.barHelpers.initialPositions();h=m.y,c=m.zeroW,u=m.x,y=m.barWidth,b=m.barHeight,a=m.xDivision,s=m.yDivision,l=m.zeroH;for(var x=i.group({class:"apexcharts-datalabels","data:realIndex":d}),w=i.group({class:"apexcharts-rangebar-goals-markers"}),S=0;S0}));return this.isHorizontal?(i=f.config.plotOptions.bar.rangeBarGroupRows?o+c*y:o+s*this.visibleI+c*y,v>-1&&!f.config.plotOptions.bar.rangeBarOverlap&&(d=f.globals.seriesRange[e][v].overlaps).indexOf(p)>-1&&(i=(s=h.barHeight/d.length)*this.visibleI+c*(100-parseInt(this.barOptions.barHeight,10))/100/2+s*(this.visibleI+d.indexOf(p))+c*y)):(y>-1&&!f.globals.timescaleLabels.length&&(n=f.config.plotOptions.bar.rangeBarGroupRows?a+u*y:a+l*this.visibleI+u*y),v>-1&&!f.config.plotOptions.bar.rangeBarOverlap&&(d=f.globals.seriesRange[e][v].overlaps).indexOf(p)>-1&&(n=(l=h.barWidth/d.length)*this.visibleI+u*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+d.indexOf(p))+u*y)),{barYPosition:i,barXPosition:n,barHeight:s,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,r=t.x,i=t.xDivision,n=t.barWidth,o=t.barXPosition,a=t.zeroH,s=this.w,l=e.i,c=e.j,u=e.realIndex,h=e.translationsIndex,f=this.yRatio[h],d=this.getRangeValue(u,c),p=Math.min(d.start,d.end),g=Math.max(d.start,d.end);void 0===this.series[l][c]||null===this.series[l][c]?p=a:(p=a-p/f,g=a-g/f);var b=Math.abs(g-p),y=this.barHelpers.getColumnPaths({barXPosition:o,barWidth:n,y1:p,y2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:u,i:u,j:c,w:s});if(s.globals.isXNumeric){var v=this.getBarXForNumericXAxis({x:r,j:c,realIndex:u,barWidth:n});r=v.x,o=v.barXPosition}else r+=i;return{pathTo:y.pathTo,pathFrom:y.pathFrom,barHeight:b,x:r,y:d.start<0&&d.end<0?p:g,goalY:this.barHelpers.getGoalValues("y",null,a,l,c,h),barXPosition:o}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,r=t.y,i=t.y1,n=t.y2,o=t.yDivision,a=t.barHeight,s=t.barYPosition,l=t.zeroW,c=this.w,u=e.realIndex,h=e.j,f=this.preventBarOverflow(l+i/this.invertedYRatio),d=this.preventBarOverflow(l+n/this.invertedYRatio),p=this.getRangeValue(u,h),g=Math.abs(d-f),b=this.barHelpers.getBarpaths({barYPosition:s,barHeight:a,x1:f,x2:d,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:u,realIndex:u,j:h,w:c});return c.globals.isXNumeric||(r+=o),{pathTo:b.pathTo,pathFrom:b.pathFrom,barWidth:g,x:p.start<0&&p.end<0?f:d,goalX:this.barHelpers.getGoalValues("x",l,null,u,h),y:r}}},{key:"getRangeValue",value:function(t,e){var r=this.w;return{start:r.globals.seriesRangeStart[t][e],end:r.globals.seriesRangeEnd[t][e]}}}],r&&eb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const lb=sb;function cb(t){return cb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cb(t)}function ub(t,e){for(var r=0;r0&&parseInt(a.realIndex,10)===parseInt(i,10)&&("line"===a.type?(this.lineCtx.appendPathFrom=!1,e=n.globals.previousPaths[o].paths[0].d):"area"===a.type&&(this.lineCtx.appendPathFrom=!1,r=n.globals.previousPaths[o].paths[0].d,n.config.stroke.show&&n.globals.previousPaths[o].paths[1]&&(e=n.globals.previousPaths[o].paths[1].d)))}return{pathFromLine:e,pathFromArea:r}}},{key:"determineFirstPrevY",value:function(t){var e,r,i,n=t.i,o=t.realIndex,a=t.series,s=t.prevY,l=t.lineYPosition,c=t.translationsIndex,u=this.w,h=u.config.chart.stacked&&!u.globals.comboCharts||u.config.chart.stacked&&u.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(r=this.w.config.series[o])||void 0===r?void 0:r.type));if(void 0!==(null===(i=a[n])||void 0===i?void 0:i[0]))s=(l=h&&n>0?this.lineCtx.prevSeriesY[n-1][0]:this.lineCtx.zeroY)-a[n][0]/this.lineCtx.yRatio[c]+2*(this.lineCtx.isReversed?a[n][0]/this.lineCtx.yRatio[c]:0);else if(h&&n>0&&void 0===a[n][0])for(var f=n-1;f>=0;f--)if(null!==a[f][0]&&void 0!==a[f][0]){s=l=this.lineCtx.prevSeriesY[f][0];break}return{prevY:s,lineYPosition:l}}}],r&&ub(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),db=function(t){var e=function(t){for(var e,r,i,n,o=function(t){for(var e=[],r=t[0],i=t[1],n=e[0]=gb(r,i),o=1,a=t.length-1;o9&&(n=3*i/Math.sqrt(n),o[l]=n*e,o[l+1]=n*r);for(var c=0;c<=a;c++)n=(t[Math.min(a,c+1)][0]-t[Math.max(0,c-1)][0])/(6*(1+o[c]*o[c])),s.push([n||0,o[c]*n||0]);return s}(t),r=t[1],i=t[0],n=[],o=e[1],a=e[0];n.push(i,[i[0]+a[0],i[1]+a[1],r[0]-o[0],r[1]-o[1],r[0],r[1]]);for(var s=2,l=e.length;s1&&i[1].length<6){var n=i[0].length;i[1]=[2*i[0][n-2]-i[0][n-4],2*i[0][n-1]-i[0][n-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i};function gb(t,e){return(e[1]-t[1])/(e[0]-t[0])}function bb(t){return bb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bb(t)}function yb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function vb(t){for(var e=1;e1?f:0;this._initSerieVariables(t,h,f);var p=[],g=[],b=[],y=o.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,f),o.globals.isXNumeric&&o.globals.seriesX.length>0&&(y=(o.globals.seriesX[f][0]-o.globals.minX)/this.xRatio),b.push(y);var v,m=y,x=void 0,w=m,S=this.zeroY,k=this.zeroY;S=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:t,prevY:S,lineYPosition:0,translationsIndex:d}).prevY,"monotoneCubic"===o.config.stroke.curve&&null===t[h][0]?p.push(null):p.push(S),v=S,"rangeArea"===s&&(x=k=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:i,prevY:k,lineYPosition:0,translationsIndex:d}).prevY,g.push(null!==p[0]?k:null));var A=this._calculatePathsFrom({type:s,series:t,i:h,realIndex:f,translationsIndex:d,prevX:w,prevY:S,prevY2:k}),O=[p[0]],P=[g[0]],C={type:s,series:t,realIndex:f,translationsIndex:d,i:h,x:y,y:1,pX:m,pY:v,pathsFrom:A,linePaths:[],areaPaths:[],seriesIndex:r,lineYPosition:0,xArrj:b,yArrj:p,y2Arrj:g,seriesRangeEnd:i},j=this._iterateOverDataPoints(vb(vb({},C),{},{iterations:"rangeArea"===s?t[h].length-1:void 0,isRangeStart:!0}));if("rangeArea"===s){for(var T=this._calculatePathsFrom({series:i,i:h,realIndex:f,prevX:w,prevY:k}),E=this._iterateOverDataPoints(vb(vb({},C),{},{series:i,xArrj:[y],yArrj:O,y2Arrj:P,pY:x,areaPaths:j.areaPaths,pathsFrom:T,iterations:i[h].length-1,isRangeStart:!1})),M=j.linePaths.length/2,L=0;L=0;I--)l.add(u[I]);else for(var _=0;_1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[r],o=r),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.globals.gridHeight-this.baseLineY[o]-(this.isReversed?i.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[o]:0),this.areaBottomY=this.zeroY,(this.zeroY>i.globals.gridHeight||"end"===i.config.plotOptions.area.fillTo)&&(this.areaBottomY=i.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=n.group({class:"apexcharts-series",zIndex:void 0!==i.config.series[r].zIndex?i.config.series[r].zIndex:r,seriesName:f.escapeString(i.globals.seriesNames[r])}),this.elPointsMain=n.group({class:"apexcharts-series-markers-wrap","data:realIndex":r}),this.elDataLabelsWrap=n.group({class:"apexcharts-datalabels","data:realIndex":r});var a=t[e].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":a,rel:e+1,"data:realIndex":r}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,r,i,n,o=t.type,a=t.series,s=t.i,l=t.realIndex,c=t.translationsIndex,u=t.prevX,h=t.prevY,f=t.prevY2,d=this.w,p=new Pc(this.ctx);if(null===a[s][0]){for(var g=0;g0){var b=this.lineHelpers.checkPreviousPaths({pathFromLine:i,pathFromArea:n,realIndex:l});i=b.pathFromLine,n=b.pathFromArea}return{prevX:u,prevY:h,linePath:e,areaPath:r,pathFromLine:i,pathFromArea:n}}},{key:"_handlePaths",value:function(t){var e=t.type,r=t.realIndex,i=t.i,n=t.paths,o=this.w,a=new Pc(this.ctx),s=new Zu(this.ctx);this.prevSeriesY.push(n.yArrj),o.globals.seriesXvalues[r]=n.xArrj,o.globals.seriesYvalues[r]=n.yArrj;var l=o.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var c=o.globals.seriesXvalues[r][o.globals.seriesXvalues[r].length-l.count-1],u=a.drawRect(c,0,o.globals.gridWidth,o.globals.gridHeight,0);o.globals.dom.elForecastMask.appendChild(u.node);var h=a.drawRect(0,0,c,o.globals.gridHeight,0);o.globals.dom.elNonForecastMask.appendChild(h.node)}this.pointsChart||o.globals.delayedElements.push({el:this.elPointsMain.node,index:r});var f={i,realIndex:r,animationDelay:i,initialSpeed:o.config.chart.animations.speed,dataChangeSpeed:o.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var d=s.fillPath({seriesNumber:r}),p=0;p0&&"rangeArea"!==e){var S=a.renderPaths(x);S.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&S.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(S),S.attr("clip-path","url(#forecastMask".concat(o.globals.cuid,")")),w.attr("clip-path","url(#nonForecastMask".concat(o.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,r,i=this,n=t.type,o=t.series,a=t.iterations,s=t.realIndex,l=t.translationsIndex,c=t.i,u=t.x,h=t.y,d=t.pX,p=t.pY,g=t.pathsFrom,b=t.linePaths,y=t.areaPaths,v=t.seriesIndex,m=t.lineYPosition,x=t.xArrj,w=t.yArrj,S=t.y2Arrj,k=t.isRangeStart,A=t.seriesRangeEnd,O=this.w,P=new Pc(this.ctx),C=this.yRatio,j=g.prevY,T=g.linePath,E=g.areaPath,M=g.pathFromLine,L=g.pathFromArea,I=f.isNumber(O.globals.minYArr[s])?O.globals.minYArr[s]:O.globals.minY;a||(a=O.globals.dataPoints>1?O.globals.dataPoints-1:O.globals.dataPoints);var _=function(t,e){return e-t/C[l]+2*(i.isReversed?t/C[l]:0)},R=h,z=O.config.chart.stacked&&!O.globals.comboCharts||O.config.chart.stacked&&O.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[s])||void 0===e?void 0:e.type)||"column"===(null===(r=this.w.config.series[s])||void 0===r?void 0:r.type)),X=O.config.stroke.curve;Array.isArray(X)&&(X=Array.isArray(v)?X[v[c]]:X[c]);for(var D,Y=0,H=0;H0&&O.globals.collapsedSeries.length0;e--){if(!(O.globals.collapsedSeriesIndices.indexOf((null==v?void 0:v[e])||e)>-1))return e;e--}return 0}(c-1)][H+1]:this.zeroY,F?h=_(I,m):(h=_(o[c][H+1],m),"rangeArea"===n&&(R=_(A[c][H+1],m))),x.push(u),!F||"smooth"!==O.config.stroke.curve&&"monotoneCubic"!==O.config.stroke.curve?(w.push(h),S.push(R)):(w.push(null),S.push(null));var N=this.lineHelpers.calculatePoints({series:o,x:u,y:h,realIndex:s,i:c,j:H,prevY:j}),W=this._createPaths({type:n,series:o,i:c,realIndex:s,j:H,x:u,y:h,y2:R,xArrj:x,yArrj:w,y2Arrj:S,pX:d,pY:p,pathState:Y,segmentStartX:D,linePath:T,areaPath:E,linePaths:b,areaPaths:y,curve:X,isRangeStart:k});y=W.areaPaths,b=W.linePaths,d=W.pX,p=W.pY,Y=W.pathState,D=W.segmentStartX,E=W.areaPath,T=W.linePath,!this.appendPathFrom||O.globals.hasNullValues||"monotoneCubic"===X&&"rangeArea"===n||(M+=P.line(u,this.areaBottomY),L+=P.line(u,this.areaBottomY)),this.handleNullDataPoints(o,N,c,H,s),this._handleMarkersAndLabels({type:n,pointsPos:N,i:c,j:H,realIndex:s,isRangeStart:k})}return{yArrj:w,xArrj:x,pathFromArea:L,areaPaths:y,pathFromLine:M,linePaths:b,linePath:T,areaPath:E}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,r=t.pointsPos,i=t.isRangeStart,n=t.i,o=t.j,a=t.realIndex,s=this.w,l=new lh(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,o,{realIndex:a,pointsPos:r,zRatio:this.zRatio,elParent:this.elPointsMain});else{s.globals.series[n].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var c=this.markers.plotChartMarkers(r,a,o+1);null!==c&&this.elPointsMain.add(c)}var u=l.drawDataLabel({type:e,isRangeStart:i,pos:r,i:a,j:o+1});null!==u&&this.elDataLabelsWrap.add(u)}},{key:"_createPaths",value:function(t){var e,r=t.type,i=t.series,n=t.i,o=(t.realIndex,t.j),a=t.x,s=t.y,l=t.xArrj,c=t.yArrj,u=t.y2,h=t.y2Arrj,f=t.pX,d=t.pY,p=t.pathState,g=t.segmentStartX,b=t.linePath,y=t.areaPath,v=t.linePaths,m=t.areaPaths,x=t.curve,w=t.isRangeStart,S=new Pc(this.ctx),k=this.areaBottomY,A="rangeArea"===r,O="rangeArea"===r&&w;switch(x){case"monotoneCubic":var P=w?c:h;switch(p){case 0:if(null===P[o+1])break;p=1;case 1:if(!(A?l.length===i[n].length:o===i[n].length-2))break;case 2:var C=w?l:l.slice().reverse(),j=w?P:P.slice().reverse(),T=(e=j,C.map((function(t,r){return[t,e[r]]})).filter((function(t){return null!==t[1]}))),E=T.length>1?db(T):T,M=[];A&&(O?m=T:M=m.reverse());var L=0,I=0;if(function(t,e){for(var r=function(t){var e=[],r=0;return t.forEach((function(t){null!==t?r++:r>0&&(e.push(r),r=0)})),r>0&&e.push(r),e}(t),i=[],n=0,o=0;n4?(e+="C".concat(i[0],", ").concat(i[1]),e+=", ".concat(i[2],", ").concat(i[3]),e+=", ".concat(i[4],", ").concat(i[5])):n>2&&(e+="S".concat(i[0],", ").concat(i[1]),e+=", ".concat(i[2],", ").concat(i[3]))}return e}(t),r=I,i=(I+=t.length)-1;O?b=S.move(T[r][0],T[r][1])+e:A?b=S.move(M[r][0],M[r][1])+S.line(T[r][0],T[r][1])+e+S.line(M[i][0],M[i][1]):(b=S.move(T[r][0],T[r][1])+e,y=b+S.line(T[i][0],k)+S.line(T[r][0],k)+"z",m.push(y)),v.push(b)})),A&&L>1&&!O){var _=v.slice(L).reverse();v.splice(L),_.forEach((function(t){return v.push(t)}))}p=0}break;case"smooth":var R=.35*(a-f);if(null===i[n][o])p=0;else switch(p){case 0:if(g=f,b=O?S.move(f,h[o])+S.line(f,d):S.move(f,d),y=S.move(f,d),null===i[n][o+1]||void 0===i[n][o+1]){v.push(b),m.push(y);break}if(p=1,o=i[n].length-2&&(O&&(b+=S.curve(a,s,a,s,a,u)+S.move(a,u)),y+=S.curve(a,s,a,s,a,k)+S.line(g,k)+"z",v.push(b),m.push(y),p=-1)}}f=a,d=s;break;default:var D=function(t,e,r){var i=[];switch(t){case"stepline":i=S.line(e,null,"H")+S.line(null,r,"V");break;case"linestep":i=S.line(null,r,"V")+S.line(e,null,"H");break;case"straight":i=S.line(e,r)}return i};if(null===i[n][o])p=0;else switch(p){case 0:if(g=f,b=O?S.move(f,h[o])+S.line(f,d):S.move(f,d),y=S.move(f,d),null===i[n][o+1]||void 0===i[n][o+1]){v.push(b),m.push(y);break}if(p=1,o=i[n].length-2&&(O&&(b+=S.line(a,u)),y+=S.line(a,k)+S.line(g,k)+"z",v.push(b),m.push(y),p=-1)}}f=a,d=s}return{linePaths:v,areaPaths:m,pX:f,pY:d,pathState:p,segmentStartX:g,linePath:b,areaPath:y}}},{key:"handleNullDataPoints",value:function(t,e,r,i,n){var o=this.w;if(null===t[r][i]&&o.config.markers.showNullDataPoints||1===t[r].length){var a=this.strokeWidth-o.config.markers.strokeWidth/2;a>0||(a=0);var s=this.markers.plotChartMarkers(e,n,i+1,a,!0);null!==s&&this.elPointsMain.add(s)}}}],r&&xb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const kb=Sb;function Ab(t){return Ab="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ab(t)}function Ob(t,e){for(var r=0;ro-i&&l.width<=a-n){var c=s.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(c.x," ").concat(c.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,r,i,n,o){var a=new Pc(this.ctx),s=a.getTextRects(t,e).width+this.w.config.stroke.width+5>n-r&&o-i>n-r?o-i:n-r,l=a.getTextBasedOnMaxWidth({text:t,maxWidth:s,fontSize:e});return t.length!==l.length&&s/e<5?"":l}},{key:"animateTreemap",value:function(t,e,r,i){var n=new b(this.ctx);n.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:r.x,y:r.y,width:r.width,height:r.height},i,(function(){n.animationCompleted(t)}))}}],r&&Ob(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function jb(t){return jb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jb(t)}function Tb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Eb(t){for(var e=1;e5e4&&(i.globals.disableZoomOut=!0);var a=n.getTimeUnitsfromTimestamp(t,e,this.utc),s=i.globals.gridWidth/o,l=s/24,c=l/60,u=c/60,h=Math.floor(24*o),f=Math.floor(1440*o),d=Math.floor(86400*o),p=Math.floor(o),g=Math.floor(o/30),b=Math.floor(o/365),y={minMillisecond:a.minMillisecond,minSecond:a.minSecond,minMinute:a.minMinute,minHour:a.minHour,minDate:a.minDate,minMonth:a.minMonth,minYear:a.minYear},v={firstVal:y,currentMillisecond:y.minMillisecond,currentSecond:y.minSecond,currentMinute:y.minMinute,currentHour:y.minHour,currentMonthDate:y.minDate,currentDate:y.minDate,currentMonth:y.minMonth,currentYear:y.minYear,daysWidthOnXAxis:s,hoursWidthOnXAxis:l,minutesWidthOnXAxis:c,secondsWidthOnXAxis:u,numberOfSeconds:d,numberOfMinutes:f,numberOfHours:h,numberOfDays:p,numberOfMonths:g,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var m=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?Eb(Eb({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?Eb(Eb({},e),{},{value:t.value}):"minute"===t.unit?Eb(Eb({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?Eb(Eb({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return m.filter((function(t){var e=1,n=Math.ceil(i.globals.gridWidth/120),o=t.value;void 0!==i.config.xaxis.tickAmount&&(n=i.config.xaxis.tickAmount),m.length>n&&(e=Math.floor(m.length/n));var a=!1,s=!1;switch(r.tickInterval){case"years":"year"===t.unit&&(a=!0);break;case"half_year":e=7,"year"===t.unit&&(a=!0);break;case"months":e=1,"year"===t.unit&&(a=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(a=!0),30===o&&(s=!0);break;case"months_days":e=10,"month"===t.unit&&(a=!0),30===o&&(s=!0);break;case"week_days":e=8,"month"===t.unit&&(a=!0);break;case"days":e=1,"month"===t.unit&&(a=!0);break;case"hours":"day"===t.unit&&(a=!0);break;case"minutes_fives":case"seconds_fives":o%5!=0&&(s=!0);break;case"seconds_tens":o%10!=0&&(s=!0)}if("hours"===r.tickInterval||"minutes_fives"===r.tickInterval||"seconds_tens"===r.tickInterval||"seconds_fives"===r.tickInterval){if(!s)return!0}else if((o%e==0||a)&&!s)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var r=this.w,i=this.formatDates(t),n=this.removeOverlappingTS(i);r.globals.timescaleLabels=n.slice(),new Uf(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,r=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case r>15:this.tickInterval="minutes_fives";break;case r>5:this.tickInterval="minutes";break;case r>1:this.tickInterval="seconds_tens";break;case 60*r>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,r=t.currentMonth,i=t.currentYear,n=t.daysWidthOnXAxis,o=t.numberOfYears,a=e.minYear,s=0,l=new Vc(this.ctx),c="year";if(e.minDate>1||e.minMonth>0){var u=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);s=(l.determineDaysOfYear(e.minYear)-u+1)*n,a=e.minYear+1,this.timeScaleArray.push({position:s,value:a,unit:c,year:a,month:f.monthMod(r+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:s,value:a,unit:c,year:i,month:f.monthMod(r+1)});for(var h=a,d=s,p=0;p1){l=(c.determineDaysOfMonths(i+1,e.minYear)-r+1)*o,s=f.monthMod(i+1);var d=n+h,p=f.monthMod(s),g=s;0===s&&(u="year",g=d,p=1,d+=h+=1),this.timeScaleArray.push({position:l,value:g,unit:u,year:d,month:p})}else this.timeScaleArray.push({position:l,value:s,unit:u,year:n,month:f.monthMod(i)});for(var b=s+1,y=l,v=0,m=1;va.determineDaysOfMonths(e+1,r)?(c=1,s="month",d=e+=1,e):e},h=(24-e.minHour)*n,d=l,p=u(c,r,i);0===e.minHour&&1===e.minDate?(h=0,d=f.monthMod(e.minMonth),s="month",c=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(h=0,l=e.minDate,d=l,p=u(c=l,r,i)),this.timeScaleArray.push({position:h,value:d,unit:s,year:this._getYear(i,p,0),month:f.monthMod(p),day:c});for(var g=h,b=0;bs.determineDaysOfMonths(e+1,n)&&(b=1,e+=1),{month:e,date:b}},u=function(t,e){return t>s.determineDaysOfMonths(e+1,n)?e+=1:e},h=60-(e.minMinute+e.minSecond/60),d=h*o,p=e.minHour+1,g=p;60===h&&(d=0,g=p=e.minHour);var b=r;g>=24&&(g=0,l="day",p=b+=1);var y=c(b,i).month;y=u(b,y),this.timeScaleArray.push({position:d,value:p,unit:l,day:b,hour:g,year:n,month:f.monthMod(y)}),g++;for(var v=d,m=0;m=24&&(g=0,l="day",y=c(b+=1,y).month,y=u(b,y));var x=this._getYear(n,y,0);v=60*o+v;var w=0===g?b:g;this.timeScaleArray.push({position:v,value:w,unit:l,hour:g,day:b,year:x,month:f.monthMod(y)}),g++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,r=t.currentSecond,i=t.currentMinute,n=t.currentHour,o=t.currentDate,a=t.currentMonth,s=t.currentYear,l=t.minutesWidthOnXAxis,c=t.secondsWidthOnXAxis,u=t.numberOfMinutes,h=i+1,d=o,p=a,g=s,b=n,y=(60-r-e/1e3)*c,v=0;v=60&&(h=0,24===(b+=1)&&(b=0)),this.timeScaleArray.push({position:y,value:h,unit:"minute",hour:b,minute:h,day:d,year:this._getYear(g,p,0),month:f.monthMod(p)}),y+=l,h++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,r=t.currentSecond,i=t.currentMinute,n=t.currentHour,o=t.currentDate,a=t.currentMonth,s=t.currentYear,l=t.secondsWidthOnXAxis,c=t.numberOfSeconds,u=r+1,h=i,d=o,p=a,g=s,b=n,y=(1e3-e)/1e3*l,v=0;v=60&&(u=0,++h>=60&&(h=0,24==++b&&(b=0))),this.timeScaleArray.push({position:y,value:u,unit:"second",hour:b,minute:h,second:u,day:d,year:this._getYear(g,p,0),month:f.monthMod(p)}),y+=l,u++}},{key:"createRawDateString",value:function(t,e){var r=t.year;return 0===t.month&&(t.month=1),r+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?r+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":r+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?r+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":r+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?r+=":"+("0"+e).slice(-2):r+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?r+=":"+("0"+e).slice(-2):r+=":00",this.utc&&(r+=".000Z"),r}},{key:"formatDates",value:function(t){var e=this,r=this.w;return t.map((function(t){var i=t.value.toString(),n=new Vc(e.ctx),o=e.createRawDateString(t,i),a=n.getDate(n.parseDate(o));if(e.utc||(a=n.getDate(n.parseDateWithTimezone(o))),void 0===r.config.xaxis.labels.format){var s="dd MMM",l=r.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(s=l.year),"month"===t.unit&&(s=l.month),"day"===t.unit&&(s=l.day),"hour"===t.unit&&(s=l.hour),"minute"===t.unit&&(s=l.minute),"second"===t.unit&&(s=l.second),i=n.formatDate(a,s)}else i=n.formatDate(a,r.config.xaxis.labels.format);return{dateString:o,position:t.position,value:i,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,r=this,i=new Pc(this.ctx),n=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(n=!0,e=i.getTextRects(t[0].value).width);var o=0,a=t.map((function(a,s){if(s>0&&r.w.config.xaxis.labels.hideOverlappingLabels){var l=n?e:i.getTextRects(t[o].value).width,c=t[o].position;return a.position>c+l+10?(o=s,a):null}return a}));return a.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,r){return t+Math.floor(e/12)+r}}],r&&Lb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const zb=Rb;function Xb(t){return Xb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xb(t)}function Db(t){return function(t){if(Array.isArray(t))return Yb(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Yb(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Yb(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&(l&&console.warn("Chart or series type ".concat(l," cannot appear with other chart or series types.")),a.column.series.length>0&&n.plotOptions.bar.horizontal&&(c-=a.column.series.length,a.column={series:[],i:[]},r.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),o.comboCharts||(o.comboCharts=c>0);var u=new kb(i,e),h=new dg(i,e);i.pie=new Lg(i);var f=new $g(i);i.rangeBar=new lb(i,e);var d=new Hg(i),p=[];if(o.comboCharts){var g,b,y=new Mc(i);if(a.area.series.length>0&&(g=p).push.apply(g,Db(y.drawSeriesByGroup(a.area,o.areaGroups,"area",u))),a.column.series.length>0)if(n.chart.stacked){var v=new eg(i,e);p.push(v.draw(a.column.series,a.column.i))}else i.bar=new Np(i,e),p.push(i.bar.draw(a.column.series,a.column.i));if(a.rangeArea.series.length>0&&p.push(u.draw(a.rangeArea.series,"rangeArea",a.rangeArea.i,a.rangeArea.seriesRangeEnd)),a.line.series.length>0&&(b=p).push.apply(b,Db(y.drawSeriesByGroup(a.line,o.lineGroups,"line",u))),a.candlestick.series.length>0&&p.push(h.draw(a.candlestick.series,"candlestick",a.candlestick.i)),a.boxPlot.series.length>0&&p.push(h.draw(a.boxPlot.series,"boxPlot",a.boxPlot.i)),a.rangeBar.series.length>0&&p.push(i.rangeBar.draw(a.rangeBar.series,a.rangeBar.i)),a.scatter.series.length>0){var m=new kb(i,e,!0);p.push(m.draw(a.scatter.series,"scatter",a.scatter.i))}if(a.bubble.series.length>0){var x=new kb(i,e,!0);p.push(x.draw(a.bubble.series,"bubble",a.bubble.i))}}else switch(n.chart.type){case"line":p=u.draw(o.series,"line");break;case"area":p=u.draw(o.series,"area");break;case"bar":n.chart.stacked?p=new eg(i,e).draw(o.series):(i.bar=new Np(i,e),p=i.bar.draw(o.series));break;case"candlestick":p=new dg(i,e).draw(o.series,"candlestick");break;case"boxPlot":p=new dg(i,e).draw(o.series,n.chart.type);break;case"rangeBar":p=i.rangeBar.draw(o.series);break;case"rangeArea":p=u.draw(o.seriesRangeStart,"rangeArea",void 0,o.seriesRangeEnd);break;case"heatmap":p=new kg(i,e).draw(o.series);break;case"treemap":p=new Cb(i,e).draw(o.series);break;case"pie":case"donut":case"polarArea":p=i.pie.draw(o.series);break;case"radialBar":p=f.draw(o.series);break;case"radar":p=d.draw(o.series);break;default:p=u.draw(o.series)}return p}},{key:"setSVGDimensions",value:function(){var t=this.w,e=t.globals,r=t.config;r.chart.width=r.chart.width||"100%",r.chart.height=r.chart.height||"auto",e.svgWidth=r.chart.width,e.svgHeight=r.chart.height;var i=f.getDimensions(this.el),n=r.chart.width.toString().split(/[0-9]+/g).pop();"%"===n?f.isNumber(i[0])&&(0===i[0].width&&(i=f.getDimensions(this.el.parentNode)),e.svgWidth=i[0]*parseInt(r.chart.width,10)/100):"px"!==n&&""!==n||(e.svgWidth=parseInt(r.chart.width,10));var o=String(r.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===o){var a=f.getDimensions(this.el.parentNode);e.svgHeight=a[1]*parseInt(r.chart.height,10)/100}else e.svgHeight=parseInt(r.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Pc.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==o){var s=r.chart.sparkline.enabled?0:e.axisCharts?r.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(e.svgHeight+s,"px")}e.dom.elWrap.style.width="".concat(e.svgWidth,"px"),e.dom.elWrap.style.height="".concat(e.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,r=t.translateX;Pc.setAttrs(t.dom.elGraphical.node,{transform:"translate(".concat(r,", ").concat(e,")")})}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,r=0,i=t.config.chart.sparkline.enabled?1:15;i+=t.config.grid.padding.bottom,["top","bottom"].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(r=new od(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var n=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),o=2.05*t.globals.radialSize;if(n&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var a=f.getBoundingClientRect(n);o=a.bottom;var s=a.bottom-a.top;o=Math.max(2.05*t.globals.radialSize,s)}var l=Math.ceil(o+e.translateY+r+i);e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).includes("%")||(e.dom.elWrap.style.height="".concat(l,"px"),Pc.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(l,"px"))}},{key:"coreCalculations",value:function(){new Wh(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(){return[]}))},r=new Ru,i=this.w.globals;r.initGlobalVars(i),i.seriesXvalues=e(),i.seriesYvalues=e()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var t=this.w,e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new hf(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new hf(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new zb(this.ctx);var r=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?r=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(r=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(r)}e=new Mc(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var r=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];r.forEach((function(e){var r=ApexCharts.getChartByID(e);r.w.globals.brushSource=t.ctx,"function"!=typeof r.w.config.chart.events.zoomed&&(r.w.config.chart.events.zoomed=function(){return t.updateSourceChart(r)}),"function"!=typeof r.w.config.chart.events.scrolled&&(r.w.config.chart.events.scrolled=function(){return t.updateSourceChart(r)})})),e.config.chart.events.selection=function(t,e){r.forEach((function(t){ApexCharts.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:e.xaxis.min,max:e.xaxis.max}},!1,!1,!1,!1)}))}}}}],r&&Hb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Nb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Wb(t){for(var e=1;e1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(a){var s=[e.ctx];n&&(s=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(s=[e.ctx],e.ctx.w.globals.isExecCalled=!1),s.forEach((function(n,l){var c=n.w;if(c.globals.shouldAnimate=i,r||(c.globals.resized=!0,c.globals.dataChanged=!0,i&&n.series.getPreviousPaths()),t&&"object"===Vb(t)&&(n.config=new Mu(t),t=Mc.extendArrayProps(n.config,t,c),n.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,c.config=f.extend(c.config,t),o&&(c.globals.lastXAxis=t.xaxis?f.clone(t.xaxis):[],c.globals.lastYAxis=t.yaxis?f.clone(t.yaxis):[],c.globals.initialConfig=f.extend({},c.config),c.globals.initialSeries=f.clone(c.config.series),t.series))){for(var u=0;u2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(n){var o,a=r.w;return a.globals.shouldAnimate=e,a.globals.dataChanged=!0,e&&r.ctx.series.getPreviousPaths(),a.globals.axisCharts?(o=t.map((function(t,e){return r._extendSeries(t,e)})),0===o.length&&(o=[{data:[]}]),a.config.series=o):a.config.series=t.slice(),i&&(a.globals.initialConfig.series=f.clone(a.config.series),a.globals.initialSeries=f.clone(a.config.series)),r.ctx.update().then((function(){n(r.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var r=this.w,i=r.config.series[e];return Wb(Wb({},r.config.series[e]),{},{name:t.name?t.name:null==i?void 0:i.name,color:t.color?t.color:null==i?void 0:i.color,type:t.type?t.type:null==i?void 0:i.type,group:t.group?t.group:null==i?void 0:i.group,hidden:void 0!==t.hidden?t.hidden:null==i?void 0:i.hidden,data:t.data?t.data:null==i?void 0:i.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var r=this.w,i=null,n=".apexcharts-series[data\\:realIndex='".concat(t,"']");return r.globals.axisCharts?i=r.globals.dom.Paper.findOne("".concat(n," path[j='").concat(e,"'], ").concat(n," circle[j='").concat(e,"'], ").concat(n," rect[j='").concat(e,"']")):void 0===e&&(i=r.globals.dom.Paper.findOne("".concat(n," path[j='").concat(t,"']")),"pie"!==r.config.chart.type&&"polarArea"!==r.config.chart.type&&"donut"!==r.config.chart.type||this.ctx.pie.pieClicked(t)),i?(new Pc(this.ctx).pathMouseDown(i,null),i.node?i.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(r){void 0!==t.xaxis[r]&&(e.config.xaxis[r]=t.xaxis[r],e.globals.lastXAxis[r]=t.xaxis[r])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var r=new Cu(t);t=r.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,r){t.yaxis[r].min=0,t.yaxis[r].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,r=this.w,i=r.globals.lastXAxis,n=r.globals.lastYAxis;t&&t.xaxis&&(i=t.xaxis),t&&t.yaxis&&(n=t.yaxis),r.config.xaxis.min=i.min,r.config.xaxis.max=i.max;r.config.yaxis.map((function(t,i){r.globals.zoomed||void 0!==n[i]?function(t){void 0!==n[t]&&(r.config.yaxis[t].min=n[t].min,r.config.yaxis[t].max=n[t].max)}(i):void 0!==e.ctx.opts.yaxis[i]&&(t.min=e.ctx.opts.yaxis[i].min,t.max=e.ctx.opts.yaxis[i].max)}))}}],r&&Ub(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function $b(t){return $b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$b(t)}function Jb(t,e){for(var r=0;r0&&arguments[0]!==c?arguments[0]:[],n=arguments.length>1?arguments[1]:c,o=arguments.length>2?arguments[2]:c,a=arguments.length>3?arguments[3]:c,s=arguments.length>4?arguments[4]:c,l=arguments.length>5?arguments[5]:c,c=arguments.length>6?arguments[6]:c,u=t.slice(n,o||c),h=a.slice(s,l||c),f=0,d={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};u[f]=e.call(d,u[f]),h[f]=e.call(p,h[f]),u[f][0]!=h[f][0]||"M"==u[f][0]||"A"==u[f][0]&&(u[f][4]!=h[f][4]||u[f][5]!=h[f][5])?(Array.prototype.splice.apply(u,[f,1].concat(i.call(d,u[f]))),Array.prototype.splice.apply(h,[f,1].concat(i.call(p,h[f])))):(u[f]=r.call(d,u[f]),h[f]=r.call(p,h[f])),++f!=u.length||f!=h.length;)f==u.length&&u.push(["C",d.pos[0],d.pos[1],d.pos[0],d.pos[1],d.pos[0],d.pos[1]]),f==h.length&&h.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]]);return{start:u,dest:h}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function r(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function i(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var r,i,n,o,a,s,l,c,u,h,f,d,p,g,b,y,v,m,x,w,S,k,A,O,P,C,j=Math.abs(e[1]),T=Math.abs(e[2]),E=e[3]%360,M=e[4],L=e[5],I=e[6],_=e[7],R=new Rt(t),z=new Rt(I,_),X=[];if(0===j||0===T||R.x===z.x&&R.y===z.y)return[["C",R.x,R.y,z.x,z.y,z.x,z.y]];for((i=(r=new Rt((R.x-z.x)/2,(R.y-z.y)/2).transform((new Ht).rotate(E))).x*r.x/(j*j)+r.y*r.y/(T*T))>1&&(j*=i=Math.sqrt(i),T*=i),n=(new Ht).rotate(E).scale(1/j,1/T).rotate(-E),R=R.transform(n),s=(o=[(z=z.transform(n)).x-R.x,z.y-R.y])[0]*o[0]+o[1]*o[1],a=Math.sqrt(s),o[0]/=a,o[1]/=a,l=s<4?Math.sqrt(1-s/4):0,M===L&&(l*=-1),c=new Rt((z.x+R.x)/2+l*-o[1],(z.y+R.y)/2+l*o[0]),u=new Rt(R.x-c.x,R.y-c.y),h=new Rt(z.x-c.x,z.y-c.y),f=Math.acos(u.x/Math.sqrt(u.x*u.x+u.y*u.y)),u.y<0&&(f*=-1),d=Math.acos(h.x/Math.sqrt(h.x*h.x+h.y*h.y)),h.y<0&&(d*=-1),L&&f>d&&(d+=2*Math.PI),!L&&f0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(!1===e)return!1;for(var r=e,i=t.length;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r3&&void 0!==arguments[3]?arguments[3]:null;return function(n){n.preventDefault(),n.stopPropagation();var o=n.pageX||n.touches[0].pageX,a=n.pageY||n.touches[0].pageY;e.fire(t,{x:o,y:a,event:n,index:i,points:r})}}function ly(t,e){var r,i,n=(i=2,function(t){if(Array.isArray(t))return t}(r=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(r,i)||function(t,e){if(t){if("string"==typeof t)return ay(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ay(t,e):void 0}}(r,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],a=n[1],s=e.a,l=e.b,c=e.c,u=e.d;return[o*s+a*c+e.e,o*l+a*u+e.f]}it(ar,{draggable:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return(this.remember("_draggable")||new ty(this)).init(t),this}});var cy=function(){function t(e){ry(this,t),this.el=e,e.remember("_selectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return ny(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.handlePoints)}},{key:"createResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.createHandle.call(t,t.selection,e,r,i,n),t.selection.get(r+1).addClass("svg_select_handle svg_select_handle_"+n).on("mousedown.selection touchstart.selection",sy(n,t.el,t.handlePoints,r))}))}},{key:"createHandleFn",value:function(t){t.polyline()}},{key:"updateHandleFn",value:function(t,e,r,i){var n=i.at(r-1),o=i[(r+1)%i.length],a=e,s=[a[0]-n[0],a[1]-n[1]],l=[a[0]-o[0],a[1]-o[1]],c=Math.sqrt(s[0]*s[0]+s[1]*s[1]),u=Math.sqrt(l[0]*l[0]+l[1]*l[1]),h=[s[0]/c,s[1]/c],f=[l[0]/u,l[1]/u],d=[a[0]-10*h[0],a[1]-10*h[1]],p=[a[0]-10*f[0],a[1]-10*f[1]];t.plot([d,a,p])}},{key:"updateResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.updateHandle.call(t,t.selection.get(r+1),e,r,i,n)}))}},{key:"createRotFn",value:function(t){t.line(),t.circle(5)}},{key:"getPoint",value:function(t){return this.handlePoints[this.order.indexOf(t)]}},{key:"getPointHandle",value:function(t){return this.selection.get(this.order.indexOf(t)+1)}},{key:"updateRotFn",value:function(t,e){var r=this.getPoint("t");t.get(0).plot(r[0],r[1],e[0],e[1]),t.get(1).center(e[0],e[1])}},{key:"createRotationHandle",value:function(){var t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",sy("rot",this.el,this.handlePoints));this.createRot.call(this,t)}},{key:"updateRotationHandle",value:function(){var t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}},{key:"updatePoints",value:function(){var t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((function(t){return ly(t,e)})),this.rotationPoint=ly(this.getRotationPoint(t),e)}},{key:"getHandlePoints",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.x,r=t.x2,i=t.y,n=t.y2,o=t.cx,a=t.cy;return[[e,i],[o,i],[r,i],[r,a],[r,n],[o,n],[e,n],[e,a]]}},{key:"getRotationPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.y;return[t.cx,e-20]}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}]),t}(),uy=function(){function t(e){ry(this,t),this.el=e,e.remember("_pointSelectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return ny(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.points)}},{key:"createPointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.createHandle.call(t,t.selection,e,r,i),t.selection.get(r+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",sy("point",t.el,t.points,r))}))}},{key:"createHandleFn",value:function(t){t.circle(5)}},{key:"updateHandleFn",value:function(t,e){t.center(e[0],e[1])}},{key:"updatePointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.updateHandle.call(t,t.selection.get(r+1),e,r,i)}))}},{key:"updatePoints",value:function(){var t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((function(e){return ly(e,t)}))}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}}]),t}(),hy=function(t){return function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===ey(e)&&(r=e,e=!0);var i=this.remember("_"+t.name);return i||(e.prototype instanceof cy?(i=new e(this),e=!0):i=new t(this),this.remember("_"+t.name,i)),i.active(e,r),this}};function fy(t){return fy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fy(t)}function dy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function py(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r3&&void 0!==arguments[3]?arguments[3]:null;return function(n){n.preventDefault(),n.stopPropagation();var o=n.pageX||n.touches[0].pageX,a=n.pageY||n.touches[0].pageY;e.fire(t,{x:o,y:a,event:n,index:i,points:r})}}function xy(t,e){var r=yy(t,2),i=r[0],n=r[1],o=e.a,a=e.b,s=e.c,l=e.d;return[i*o+n*s+e.e,i*a+n*l+e.f]}it(ar,{select:hy(cy)}),it([Eo,zo,on],{pointSelect:hy(uy)});var wy=function(){function t(e){dy(this,t),this.el=e,e.remember("_selectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return gy(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.handlePoints)}},{key:"createResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.createHandle.call(t,t.selection,e,r,i,n),t.selection.get(r+1).addClass("svg_select_handle svg_select_handle_"+n).on("mousedown.selection touchstart.selection",my(n,t.el,t.handlePoints,r))}))}},{key:"createHandleFn",value:function(t){t.polyline()}},{key:"updateHandleFn",value:function(t,e,r,i){var n=i.at(r-1),o=i[(r+1)%i.length],a=e,s=[a[0]-n[0],a[1]-n[1]],l=[a[0]-o[0],a[1]-o[1]],c=Math.sqrt(s[0]*s[0]+s[1]*s[1]),u=Math.sqrt(l[0]*l[0]+l[1]*l[1]),h=[s[0]/c,s[1]/c],f=[l[0]/u,l[1]/u],d=[a[0]-10*h[0],a[1]-10*h[1]],p=[a[0]-10*f[0],a[1]-10*f[1]];t.plot([d,a,p])}},{key:"updateResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.updateHandle.call(t,t.selection.get(r+1),e,r,i,n)}))}},{key:"createRotFn",value:function(t){t.line(),t.circle(5)}},{key:"getPoint",value:function(t){return this.handlePoints[this.order.indexOf(t)]}},{key:"getPointHandle",value:function(t){return this.selection.get(this.order.indexOf(t)+1)}},{key:"updateRotFn",value:function(t,e){var r=this.getPoint("t");t.get(0).plot(r[0],r[1],e[0],e[1]),t.get(1).center(e[0],e[1])}},{key:"createRotationHandle",value:function(){var t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",my("rot",this.el,this.handlePoints));this.createRot.call(this,t)}},{key:"updateRotationHandle",value:function(){var t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}},{key:"updatePoints",value:function(){var t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((function(t){return xy(t,e)})),this.rotationPoint=xy(this.getRotationPoint(t),e)}},{key:"getHandlePoints",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.x,r=t.x2,i=t.y,n=t.y2,o=t.cx,a=t.cy;return[[e,i],[o,i],[r,i],[r,a],[r,n],[o,n],[e,n],[e,a]]}},{key:"getRotationPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.y;return[t.cx,e-20]}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}]),t}(),Sy=function(){function t(e){dy(this,t),this.el=e,e.remember("_pointSelectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return gy(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.points)}},{key:"createPointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.createHandle.call(t,t.selection,e,r,i),t.selection.get(r+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",my("point",t.el,t.points,r))}))}},{key:"createHandleFn",value:function(t){t.circle(5)}},{key:"updateHandleFn",value:function(t,e){t.center(e[0],e[1])}},{key:"updatePointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.updateHandle.call(t,t.selection.get(r+1),e,r,i)}))}},{key:"updatePoints",value:function(){var t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((function(e){return xy(e,t)}))}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}}]),t}(),ky=function(t){return function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===fy(e)&&(r=e,e=!0);var i=this.remember("_"+t.name);return i||(e.prototype instanceof wy?(i=new e(this),e=!0):i=new t(this),this.remember("_"+t.name,i)),i.active(e,r),this}};it(ar,{select:ky(wy)}),it([Eo,zo,on],{pointSelect:ky(Sy)});var Ay=function(t){return t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}},Oy=function(t){for(var e=1/0,r=1/0,i=-1/0,n=-1/0,o=0;o0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===fy(t)&&(e=t,t=!0);var r=this.remember("_ResizeHandler");return r||(t.prototype instanceof Py?(r=new t(this),t=!0):r=new Py(this),this.remember("_resizeHandler",r)),r.active(t,e),this}}),void 0===window.SVG&&(window.SVG=Zl),void 0===window.Apex&&(window.Apex={});var Ey=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,(r=[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new b(this.ctx),this.ctx.axes=new sf(this.ctx),this.ctx.core=new Bb(this.ctx.el,this.ctx),this.ctx.config=new Mu({}),this.ctx.data=new yh(this.ctx),this.ctx.grid=new _h(this.ctx),this.ctx.graphics=new Pc(this.ctx),this.ctx.coreUtils=new Mc(this.ctx),this.ctx.crosshairs=new hf(this.ctx),this.ctx.events=new Qh(this.ctx),this.ctx.exports=new Ah(this.ctx),this.ctx.fill=new Zu(this.ctx),this.ctx.localization=new rf(this.ctx),this.ctx.options=new pu,this.ctx.responsive=new gf(this.ctx),this.ctx.series=new fh(this.ctx),this.ctx.theme=new xf(this.ctx),this.ctx.formatters=new Jc(this.ctx),this.ctx.titleSubtitle=new Af(this.ctx),this.ctx.legend=new od(this.ctx),this.ctx.toolbar=new kd(this.ctx),this.ctx.tooltip=new mp(this.ctx),this.ctx.dimensions=new Uf(this.ctx),this.ctx.updateHelpers=new Zb(this.ctx),this.ctx.zoomPanSelection=new _d(this.ctx),this.ctx.w.globals.tooltip=new mp(this.ctx)}}])&&jy(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function My(t){return My="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},My(t)}function Ly(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null,r=this,i=r.w;return new Promise((function(n,o){if(null===r.el)return o(new Error("Not enough data to display or target element not found"));(null===e||i.globals.allSeriesCollapsed)&&r.series.handleNoData(),r.grid=new _h(r);var a,s,l=r.grid.drawGrid();if(r.annotations=new vu(r),r.annotations.drawImageAnnos(),r.annotations.drawTextAnnos(),"back"===i.config.grid.position&&(l&&i.globals.dom.elGraphical.add(l.el),null!=l&&null!==(a=l.elGridBorders)&&void 0!==a&&a.node&&i.globals.dom.elGraphical.add(l.elGridBorders)),Array.isArray(e.elGraph))for(var c=0;c0&&i.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),i.globals.axisCharts||i.globals.noData||r.core.resizeNonAxisCharts(),n(r)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,e){var r=Ry.get(e);r&&(r.disconnect(),Ry.delete(e))}(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,r){e.id===f.escapeString(t)&&Apex._chartInstances.splice(r,1)})),new _y(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=this.w;return a.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,r){return e.updateHelpers._extendSeries(t,r)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),a.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,r,i,n,o)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,r)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.w.config.series.slice();return i.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,e,r)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this;r.w.globals.dataChanged=!0,r.series.getPreviousPaths();for(var i=r.w.config.series.slice(),n=0;n0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;r&&(i=r),i.annotations.addXaxisAnnotationExternal(t,e,i)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;r&&(i=r),i.annotations.addYaxisAnnotationExternal(t,e,i)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;r&&(i=r),i.annotations.addPointAnnotationExternal(t,e,i)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=this;e&&(r=e),r.annotations.removeAnnotation(r,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Wh(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Wh(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Ah(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ah(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],i=[{key:"getChartByID",value:function(t){var e=f.escapeString(t);if(Apex._chartInstances){var r=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return r&&r.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),r=0;r2?n-2:0),a=2;at.length)&&(e=t.length);for(var i=0,a=Array(e);i=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,n=!0,o=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){o=!0,r=t},f:function(){try{n||null==i.return||i.return()}finally{if(o)throw r}}}}function n(t){var i=c();return function(){var a,s=l(t);if(i){var r=l(this).constructor;a=Reflect.construct(s,arguments,r)}else a=s.apply(this,arguments);return function(t,i){if(i&&("object"==typeof i||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return e(t)}(this,a)}}function o(t,e,i){return(e=x(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function d(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function u(t){for(var e=1;e>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-r)*s)+r)+256*(Math.round((a-n)*s)+n)+(Math.round((a-o)*s)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,i){return t.isColorHex(i)?this.shadeHexColor(e,i):this.shadeRGBColor(e,i)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===b(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,i=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var i="",a=t<0?"-":"",s=e[0].replace(".",""),r=Number(e[1])+1;if(r<0){for(i=a+"0.";r++;)i+="0";return i+s.replace(/^-/,"")}for(r-=s.length;r--;)i+="0";return s+i}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),i=t.clientHeight,a=t.clientWidth;return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[a-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),i]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:"x",i=t.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,i){if(i>=t.length)for(var a=i-t.length+1;a--;)t.push(void 0);return t.splice(i,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style.key=e[i])}},{key:"preciseAddition",value:function(t,e){var i=(String(t).split(".")[1]||"").length,a=(String(e).split(".")[1]||"").length,s=Math.pow(10,Math.max(i,a));return(Math.round(t*s)+Math.round(e*s))/s}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*a),e=Math.round(Math.abs(e)*a);e;){var s=e;e=t%e,t=s}return t/a}},{key:"getPrimeFactors",value:function(t){for(var e=[],i=2;t>=2;)t%i==0?(e.push(i),t/=i):i++;return e}},{key:"mod",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*a))%(e=Math.round(Math.abs(e)*a))/a}}]),t}(),y=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"animateLine",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animateMarker",value:function(t,e,i,a){t.attr({opacity:0}).animate(e).attr({opacity:1}).after((function(){a()}))}},{key:"animateRect",value:function(t,e,i,a,s){t.attr(e).animate(a).attr(i).after((function(){return s()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.realIndex,a=t.j,s=t.fill,r=t.pathFrom,n=t.pathTo,o=t.speed,l=t.delay,h=this.w,c=0;h.config.chart.animations.animateGradually.enabled&&(c=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&"bar"!==h.config.chart.type&&(c=0),this.morphSVG(e,i,a,"line"!==h.config.chart.type||h.globals.comboCharts?s:"stroke",r,n,o,l*c)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){var e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,i,a,s,r,n,o){var l=this,h=this.w;s||(s=t.attr("pathFrom")),r||(r=t.attr("pathTo"));var c=function(t){return"radar"===h.config.chart.type&&(n=1),"M 0 ".concat(h.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=c()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=c()),h.globals.shouldAnimate||(n=1),t.plot(s).animate(1,o).plot(s).animate(n,o).plot(r).after((function(){v.isNumber(i)?i===h.globals.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&l.animationCompleted(t):"none"!==a&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&e===h.globals.series.length-1||h.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}]),t}();const w={},k=[];function A(t,e){if(Array.isArray(t))for(const i of t)A(i,e);else if("object"!=typeof t)S(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(const e in t)A(e,t[e])}function C(t){return w[t]||{}}function S(t){k.push(...t)}function L(t,e){let i;const a=t.length,s=[];for(i=0;iz.has(t.nodeName),R=(t,e,i={})=>{const a={...e};for(const t in a)a[t].valueOf()===i[t]&&delete a[t];Object.keys(a).length?t.node.setAttribute("data-svgjs",JSON.stringify(a)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},E="http://www.w3.org/2000/svg",Y="http://www.w3.org/2000/xmlns/",H="http://www.w3.org/1999/xlink",O={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function F(){return O.window}let D=class{};const _={},N="___SYMBOL___ROOT___";function W(t,e=E){return O.document.createElementNS(e,t)}function B(t,e=!1){if(t instanceof D)return t;if("object"==typeof t)return U(t);if(null==t)return new _[N];if("string"==typeof t&&"<"!==t.charAt(0))return U(O.document.querySelector(t));const i=e?O.document.createElement("div"):W("svg");return i.innerHTML=t,t=U(i.firstChild),i.removeChild(i.firstChild),t}function G(t,e){return e&&(e instanceof O.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:W(t)}function V(t){if(!t)return null;if(t.instance instanceof D)return t.instance;if("#document-fragment"===t.nodeName)return new _.Fragment(t);let e=P(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":_[e]||(e="Dom"),new _[e](t)}let U=V;function q(t,e=t.name,i=!1){return _[e]=t,i&&(_[N]=t),S(Object.getOwnPropertyNames(t.prototype)),t}let Z=1e3;function $(t){return"Svgjs"+P(t)+Z++}function J(t){for(let e=t.children.length-1;e>=0;e--)J(t.children[e]);return t.id?(t.id=$(t.nodeName),t):t}function Q(t,e){let i,a;for(a=(t=Array.isArray(t)?t:[t]).length-1;a>=0;a--)for(i in e)t[a].prototype[i]=e[i]}function K(t){return function(...e){const i=e[e.length-1];return!i||i.constructor!==Object||i instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(i)}}A("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=B(t)).before(this),this},insertAfter:function(t){return(t=B(t)).after(this),this}});const tt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,et=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,it=/rgb\((\d+),(\d+),(\d+)\)/,at=/(#[a-z_][a-z0-9\-_]*)/i,st=/\)\s*,?\s*/,rt=/\s/g,nt=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ot=/^rgb\(/,lt=/^(\s+)?$/,ht=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ct=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,dt=/[\s,]+/,ut=/[MLHVCSQTAZ]/i;function gt(t){const e=Math.round(t),i=Math.max(0,Math.min(255,e)).toString(16);return 1===i.length?"0"+i:i}function pt(t,e){for(let i=e.length;i--;)if(null==t[e[i]])return!1;return!0}function ft(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}A("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(dt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),A("Dom",{css:function(t,e){const i={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);i[e[0]]=e[1]})),i;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;i[e]=this.node.style.getPropertyValue(t)}return i}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||lt.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||lt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),A("Dom",{data:function(t,e,i){if(null==t)return this.data(L(function(t,e){let i;const a=t.length,s=[];for(i=0;i0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const i of t)e[i]=this.data(i);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===i||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),A("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class xt{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof xt||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:i,round:a,sin:s,PI:r}=Math;if("vibrant"===t){const t=24*i()+57,e=38*i()+45,a=360*i();return new xt(t,e,a,"lch")}if("sine"===t){const t=a(80*s(2*r*(e=null==e?i():e)/.5+.01)+150),n=a(50*s(2*r*e/.5+4.6)+200),o=a(100*s(2*r*e/.5+2.3)+150);return new xt(t,n,o)}if("pastel"===t){const t=8*i()+86,e=17*i()+9,a=360*i();return new xt(t,e,a,"lch")}if("dark"===t){const t=10+10*i(),e=50*i()+86,a=360*i();return new xt(t,e,a,"lch")}if("rgb"===t){const t=255*i(),e=255*i(),a=255*i();return new xt(t,e,a)}if("lab"===t){const t=100*i(),e=256*i()-128,a=256*i()-128;return new xt(t,e,a,"lab")}if("grey"===t){const t=255*i();return new xt(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(nt.test(t)||ot.test(t))}cmyk(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.min(1-a,1-s,1-r);if(1===n)return new xt(0,0,0,1,"cmyk");return new xt((1-a-n)/(1-n),(1-s-n)/(1-n),(1-r-n)/(1-n),n,"cmyk")}hsl(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.max(a,s,r),o=Math.min(a,s,r),l=(n+o)/2,h=n===o,c=n-o;return new xt(360*(h?0:n===a?((s-r)/c+(s.5?c/(2-n-o):c/(n+o)),100*l,"hsl")}init(t=0,e=0,i=0,a=0,s="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)s="string"==typeof a?a:s,a="string"==typeof a?0:a,Object.assign(this,{_a:t,_b:e,_c:i,_d:a,space:s});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const i=function(t,e){const i=pt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:pt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:pt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:pt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:pt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:pt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return i.space=e||i.space,i}(t,e);Object.assign(this,i)}else if("string"==typeof t)if(ot.test(t)){const e=t.replace(rt,""),[i,a,s]=it.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}else{if(!nt.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,i,a,s]=et.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}}const{_a:r,_b:n,_c:o,_d:l}=this,h="rgb"===this.space?{r:r,g:n,b:o}:"xyz"===this.space?{x:r,y:n,z:o}:"hsl"===this.space?{h:r,s:n,l:o}:"lab"===this.space?{l:r,a:n,b:o}:"lch"===this.space?{l:r,c:n,h:o}:"cmyk"===this.space?{c:r,m:n,y:o,k:l}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:i}=this.xyz();return new xt(116*e-16,500*(t-e),200*(e-i),"lab")}lch(){const{l:t,a:e,b:i}=this.lab(),a=Math.sqrt(e**2+i**2);let s=180*Math.atan2(i,e)/Math.PI;s<0&&(s*=-1,s=360-s);return new xt(t,a,s,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:a,a:s,b:r}=this;if("lch"===this.space){const{c:t,h:e}=this,i=Math.PI/180;s=t*Math.cos(i*e),r=t*Math.sin(i*e)}const n=(a+16)/116,o=s/500+n,l=n-r/200,h=16/116,c=.008856,d=7.787;t=.95047*(o**3>c?o**3:(o-h)/d),e=1*(n**3>c?n**3:(n-h)/d),i=1.08883*(l**3>c?l**3:(l-h)/d)}const a=3.2406*t+-1.5372*e+-.4986*i,s=-.9689*t+1.8758*e+.0415*i,r=.0557*t+-.204*e+1.057*i,n=Math.pow,o=.0031308,l=a>o?1.055*n(a,1/2.4)-.055:12.92*a,h=s>o?1.055*n(s,1/2.4)-.055:12.92*s,c=r>o?1.055*n(r,1/2.4)-.055:12.92*r;return new xt(255*l,255*h,255*c)}if("hsl"===this.space){let{h:t,s:e,l:i}=this;if(t/=360,e/=100,i/=100,0===e){i*=255;return new xt(i,i,i)}const a=i<.5?i*(1+e):i+e-i*e,s=2*i-a,r=255*ft(s,a,t+1/3),n=255*ft(s,a,t),o=255*ft(s,a,t-1/3);return new xt(r,n,o)}if("cmyk"===this.space){const{c:t,m:e,y:i,k:a}=this,s=255*(1-Math.min(1,t*(1-a)+a)),r=255*(1-Math.min(1,e*(1-a)+a)),n=255*(1-Math.min(1,i*(1-a)+a));return new xt(s,r,n)}return this;var t}toArray(){const{_a:t,_b:e,_c:i,_d:a,space:s}=this;return[t,e,i,a,s]}toHex(){const[t,e,i]=this._clamped().map(gt);return`#${t}${e}${i}`}toRgb(){const[t,e,i]=this._clamped();return`rgb(${t},${e},${i})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,o=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,l=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,h=(.4124*n+.3576*o+.1805*l)/.95047,c=(.2126*n+.7152*o+.0722*l)/1,d=(.0193*n+.1192*o+.9505*l)/1.08883,u=h>.008856?Math.pow(h,1/3):7.787*h+16/116,g=c>.008856?Math.pow(c,1/3):7.787*c+16/116,p=d>.008856?Math.pow(d,1/3):7.787*d+16/116;return new xt(u,g,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:i}=this.rgb(),{max:a,min:s,round:r}=Math;return[t,e,i].map((t=>a(0,s(r(t),255))))}}class bt{constructor(...t){this.init(...t)}clone(){return new bt(this)}init(t,e){const i=0,a=0,s=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==s.x?i:s.x,this.y=null==s.y?a:s.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){vt.isMatrixLike(t)||(t=new vt(t));const{x:e,y:i}=this;return this.x=t.a*e+t.c*i+t.e,this.y=t.b*e+t.d*i+t.f,this}}function mt(t,e,i){return Math.abs(e-t)<(i||1e-6)}class vt{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,i=t.flip&&(e||"x"===t.flip)?-1:1,a=t.flip&&(e||"y"===t.flip)?-1:1,s=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,r=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,n=t.scale&&t.scale.length?t.scale[0]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleX)?t.scaleX*i:i,o=t.scale&&t.scale.length?t.scale[1]*a:isFinite(t.scale)?t.scale*a:isFinite(t.scaleY)?t.scaleY*a:a,l=t.shear||0,h=t.rotate||t.theta||0,c=new bt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),d=c.x,u=c.y,g=new bt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=g.x,f=g.y,x=new bt(t.translate||t.tx||t.translateX,t.ty||t.translateY),b=x.x,m=x.y,v=new bt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:n,scaleY:o,skewX:s,skewY:r,shear:l,theta:h,rx:v.x,ry:v.y,tx:b,ty:m,ox:d,oy:u,px:p,py:f}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,i){const a=t.a*e.a+t.c*e.b,s=t.b*e.a+t.d*e.b,r=t.a*e.c+t.c*e.d,n=t.b*e.c+t.d*e.d,o=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return i.a=a,i.b=s,i.c=r,i.d=n,i.e=o,i.f=l,i}around(t,e,i){return this.clone().aroundO(t,e,i)}aroundO(t,e,i){const a=t||0,s=e||0;return this.translateO(-a,-s).lmultiplyO(i).translateO(a,s)}clone(){return new vt(this)}decompose(t=0,e=0){const i=this.a,a=this.b,s=this.c,r=this.d,n=this.e,o=this.f,l=i*r-a*s,h=l>0?1:-1,c=h*Math.sqrt(i*i+a*a),d=Math.atan2(h*a,h*i),u=180/Math.PI*d,g=Math.cos(d),p=Math.sin(d),f=(i*s+a*r)/l,x=s*c/(f*i-a)||r*c/(f*a+i);return{scaleX:c,scaleY:x,shear:f,rotate:u,translateX:n-t+t*g*c+e*(f*g*c-p*x),translateY:o-e+t*p*c+e*(f*p*c+g*x),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new vt(t);return mt(this.a,e.a)&&mt(this.b,e.b)&&mt(this.c,e.c)&&mt(this.d,e.d)&&mt(this.e,e.e)&&mt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=vt.fromArray([1,0,0,1,0,0]);return t=t instanceof Gt?t.matrixify():"string"==typeof t?vt.fromArray(t.split(dt).map(parseFloat)):Array.isArray(t)?vt.fromArray(t):"object"==typeof t&&vt.isMatrixLike(t)?t:"object"==typeof t?(new vt).transform(t):6===arguments.length?vt.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,i=this.c,a=this.d,s=this.e,r=this.f,n=t*a-e*i;if(!n)throw new Error("Cannot invert "+this);const o=a/n,l=-e/n,h=-i/n,c=t/n,d=-(o*s+h*r),u=-(l*s+c*r);return this.a=o,this.b=l,this.c=h,this.d=c,this.e=d,this.f=u,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(this,e,this)}rotate(t,e,i){return this.clone().rotateO(t,e,i)}rotateO(t,e=0,i=0){t=M(t);const a=Math.cos(t),s=Math.sin(t),{a:r,b:n,c:o,d:l,e:h,f:c}=this;return this.a=r*a-n*s,this.b=n*a+r*s,this.c=o*a-l*s,this.d=l*a+o*s,this.e=h*a-c*s+i*s-e*a+e,this.f=c*a+h*s-e*s-i*a+i,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t);const{a:s,b:r,c:n,d:o,e:l,f:h}=this;return this.a=s*t,this.b=r*e,this.c=n*t,this.d=o*e,this.e=l*t-i*t+i,this.f=h*e-a*e+a,this}shear(t,e,i){return this.clone().shearO(t,e,i)}shearO(t,e=0,i=0){const{a:a,b:s,c:r,d:n,e:o,f:l}=this;return this.a=a+s*t,this.c=r+n*t,this.e=o+l*t-i*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t),t=M(t),e=M(e);const s=Math.tan(t),r=Math.tan(e),{a:n,b:o,c:l,d:h,e:c,f:d}=this;return this.a=n+o*s,this.b=o+n*r,this.c=l+h*s,this.d=h+l*r,this.e=c+d*s-a*s,this.f=d+c*r-i*r,this}skewX(t,e,i){return this.skew(t,0,e,i)}skewY(t,e,i){return this.skew(0,t,e,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(vt.isMatrixLike(t)){return new vt(t).multiplyO(this)}const e=vt.formatTransforms(t),{x:i,y:a}=new bt(e.ox,e.oy).transform(this),s=(new vt).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-i,-a).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(i,a);if(isFinite(e.px)||isFinite(e.py)){const t=new bt(i,a).transform(s),r=isFinite(e.px)?e.px-t.x:0,n=isFinite(e.py)?e.py-t.y:0;s.translateO(r,n)}return s.translateO(e.tx,e.ty),s}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function yt(){if(!yt.nodes){const t=B().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;yt.nodes={svg:t,path:e}}if(!yt.nodes.svg.node.parentNode){const t=O.document.body||O.document.documentElement;yt.nodes.svg.addTo(t)}return yt.nodes}function wt(t){return!(t.width||t.height||t.x||t.y)}q(vt,"Matrix");class kt{constructor(...t){this.init(...t)}addOffset(){return this.x+=O.window.pageXOffset,this.y+=O.window.pageYOffset,new kt(this)}init(t){return t="string"==typeof t?t.split(dt).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return wt(this)}merge(t){const e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),a=Math.max(this.x+this.width,t.x+t.width)-e,s=Math.max(this.y+this.height,t.y+t.height)-i;return new kt(e,i,a,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof vt||(t=new vt(t));let e=1/0,i=-1/0,a=1/0,s=-1/0;return[new bt(this.x,this.y),new bt(this.x2,this.y),new bt(this.x,this.y2),new bt(this.x2,this.y2)].forEach((function(r){r=r.transform(t),e=Math.min(e,r.x),i=Math.max(i,r.x),a=Math.min(a,r.y),s=Math.max(s,r.y)})),new kt(e,a,i-e,s-a)}}function At(t,e,i){let a;try{if(a=e(t.node),wt(a)&&((s=t.node)!==O.document&&!(O.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===O.document}).call(O.document.documentElement,s)))throw new Error("Element not in the dom")}catch(e){a=i(t)}var s;return a}A({viewbox:{viewbox(t,e,i,a){return null==t?new kt(this.attr("viewBox")):this.attr("viewBox",new kt(t,e,i,a))},zoom(t,e){let{width:i,height:a}=this.attr(["width","height"]);if((i||a)&&"string"!=typeof i&&"string"!=typeof a||(i=this.node.clientWidth,a=this.node.clientHeight),!i||!a)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const s=this.viewbox(),r=i/s.width,n=a/s.height,o=Math.min(r,n);if(null==t)return o;let l=o/t;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new bt(i/2/r+s.x,a/2/n+s.y);const h=new kt(s).transform(new vt({scale:l,origin:e}));return this.viewbox(h)}}}),q(kt,"Box");class Ct extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}Q([Ct],{each(t,...e){return"function"==typeof t?this.map(((e,i,a)=>t.call(e,e,i,a))):this.map((i=>i[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const St=["toArray","constructor","each"];function Lt(t,e){return new Ct(L((e||O.document).querySelectorAll(t),(function(t){return V(t)})))}Ct.extend=function(t){t=t.reduce(((t,e)=>(St.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),Q([Ct],t)};let Mt=0;const Pt={};function It(t){let e=t.getEventHolder();return e===O.window&&(e=Pt),e.events||(e.events={}),e.events}function Tt(t){return t.getEventTarget()}function zt(t,e,i,a,s){const r=i.bind(a||t),n=B(t),o=It(n),l=Tt(n);e=Array.isArray(e)?e:e.split(dt),i._svgjsListenerId||(i._svgjsListenerId=++Mt),e.forEach((function(t){const e=t.split(".")[0],a=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][a]=o[e][a]||{},o[e][a][i._svgjsListenerId]=r,l.addEventListener(e,r,s||!1)}))}function Xt(t,e,i,a){const s=B(t),r=It(s),n=Tt(s);("function"!=typeof i||(i=i._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(dt)).forEach((function(t){const e=t&&t.split(".")[0],o=t&&t.split(".")[1];let l,h;if(i)r[e]&&r[e][o||"*"]&&(n.removeEventListener(e,r[e][o||"*"][i],a||!1),delete r[e][o||"*"][i]);else if(e&&o){if(r[e]&&r[e][o]){for(h in r[e][o])Xt(n,[e,o].join("."),h);delete r[e][o]}}else if(o)for(t in r)for(l in r[t])o===l&&Xt(n,[t,o].join("."));else if(e){if(r[e]){for(l in r[e])Xt(n,[e,l].join("."));delete r[e]}}else{for(t in r)Xt(n,t);!function(t){let e=t.getEventHolder();e===O.window&&(e=Pt),e.events&&(e.events={})}(s)}}))}class Rt extends D{addEventListener(){}dispatch(t,e,i){return function(t,e,i,a){const s=Tt(t);return e instanceof O.window.Event||(e=new O.window.CustomEvent(e,{detail:i,cancelable:!0,...a})),s.dispatchEvent(e),e}(this,t,e,i)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const i=e[t.type];for(const e in i)for(const a in i[e])i[e][a](t);return!t.defaultPrevented}fire(t,e,i){return this.dispatch(t,e,i),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,i){return Xt(this,t,e,i),this}on(t,e,i,a){return zt(this,t,e,i,a),this}removeEventListener(){}}function Et(){}q(Rt,"EventTarget");const Yt=400,Ht=">",Ot=0,Ft={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Dt extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(dt).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class _t{constructor(...t){this.init(...t)}convert(t){return new _t(this.value,t)}divide(t){return t=new _t(t),new _t(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(tt))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof _t&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new _t(t),new _t(this-t,this.unit||t.unit)}plus(t){return t=new _t(t),new _t(this+t,this.unit||t.unit)}times(t){return t=new _t(t),new _t(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Nt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Wt=[];class Bt extends Rt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=B(t)).removeNamespace&&this.node instanceof O.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return B(t).put(this,e)}children(){return new Ct(L(this.node.children,(function(t){return V(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let i=this.node.cloneNode(t);return e&&(i=J(i)),new this.constructor(i)}each(t,e){const i=this.children();let a,s;for(a=0,s=i.length;a=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=$(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return V(this.node.lastChild)}matches(t){const e=this.node,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return i&&i.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=V(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=V(e.node.parentNode));return e}put(t,e){return t=B(t),this.add(t,e),t}putIn(t,e){return B(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=B(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const i=10**t,a=this.attr(e);for(const t in a)"number"==typeof a[t]&&(a[t]=Math.round(a[t]*i)/i);return this.attr(a),this}svg(t,e){return this.xml(t,e,E)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const i=e.index(this);return e.put(t,i).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let i=this;if(null!=t){if(i=V(i.node.cloneNode(!0)),e){const e=t(i);if(i=e||i,!1===e)return""}i.each((function(){const e=t(this),i=e||this;!1===e?this.remove():e&&this!==i&&this.replace(i)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;const a=W("wrapper",i),s=O.document.createDocumentFragment();a.innerHTML=t;for(let t=a.children.length;t--;)s.appendChild(a.firstElementChild);const r=this.parent();return e?this.replace(s)&&r:this.add(s)}}Q(Bt,{attr:function(t,e,i){if(null==t){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=ht.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ft[t]:ht.test(e)?parseFloat(e):e;"number"==typeof(e=Wt.reduce(((e,i)=>i(t,e,this)),e))?e=new _t(e):Nt.has(t)&&xt.isColor(e)?e=new xt(e):e.constructor===Array&&(e=new Dt(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return Lt(t,this.node)},findOne:function(t){return V(this.node.querySelector(t))}}),q(Bt,"Dom");class Gt extends Bt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new _t(t).plus(this.x()))}dy(t=0){return this.y(new _t(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=B(t));const i=new Ct;let a=this;for(;(a=a.parent())&&a.node!==O.document&&"#document-fragment"!==a.nodeName&&(i.push(a),e||a.node!==t.node)&&(!e||!a.matches(t));)if(a.node===this.root().node)return null;return i}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(at);return e?B(e[1]):null}root(){const t=this.parent(function(t){return _[t]}(N));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const i=I(this,t,e);return this.width(new _t(i.width)).height(new _t(i.height))}width(t){return this.attr("width",t)}writeDataToDom(){return R(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}Q(Gt,{bbox:function(){const t=At(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(yt().svg).show(),i=e.node.getBBox();return e.remove(),i}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new kt(t)},rbox:function(t){const e=At(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),i=new kt(e);return t?i.transform(t.screenCTM().inverseO()):i.addOffset()},inside:function(t,e){const i=this.bbox();return t>i.x&&e>i.y&&t=0;i--)null!=e[jt[t][i]]&&this.attr(jt.prefix(t,jt[t][i]),e[jt[t][i]]);return this},A(["Element","Runner"],e)})),A(["Element","Runner"],{matrix:function(t,e,i,a,s,r){return null==t?new vt(this):this.attr("transform",new vt(t,e,i,a,s,r))},rotate:function(t,e,i){return this.transform({rotate:t,ox:e,oy:i},!0)},skew:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:i},!0):this.transform({skew:[t,e],ox:i,oy:a},!0)},shear:function(t,e,i){return this.transform({shear:t,ox:e,oy:i},!0)},scale:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:i},!0):this.transform({scale:[t,e],ox:i,oy:a},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),A("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new _t(t)):this.rx(t).ry(e)}}),A("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new bt(this.node.getPointAtLength(t))}}),A(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});A("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),A("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){const t=(this.attr("transform")||"").split(st).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(dt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(vt.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new vt);return t},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);const i=this.screenCTM(),a=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(a.multiply(i)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new vt(this).decompose();return null==t?e:e[t]}vt.isMatrixLike(t)||(t={...t,origin:T(t,this)});const i=new vt(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});class Vt extends Gt{flatten(){return this.each((function(){if(this instanceof Vt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(i,a){return a[a.length-i-1].toParent(t,e)})),this.remove()}}q(Vt,"Container");class Ut extends Vt{constructor(t,e=t){super(G("defs",t),e)}flatten(){return this}ungroup(){return this}}q(Ut,"Defs");class qt extends Gt{}function Zt(t){return this.attr("rx",t)}function $t(t){return this.attr("ry",t)}function Jt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Qt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Kt(t){return this.attr("cx",t)}function te(t){return this.attr("cy",t)}function ee(t){return null==t?2*this.rx():this.rx(new _t(t).divide(2))}function ie(t){return null==t?2*this.ry():this.ry(new _t(t).divide(2))}q(qt,"Shape");var ae=Object.freeze({__proto__:null,cx:Kt,cy:te,height:ie,rx:Zt,ry:$t,width:ee,x:Jt,y:Qt});class se extends qt{constructor(t,e=t){super(G("ellipse",t),e)}size(t,e){const i=I(this,t,e);return this.rx(new _t(i.width).divide(2)).ry(new _t(i.height).divide(2))}}Q(se,ae),A("Container",{ellipse:K((function(t=0,e=t){return this.put(new se).size(t,e).move(0,0)}))}),q(se,"Ellipse");class re extends Bt{constructor(t=O.document.createDocumentFragment()){super(t)}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){const t=new Bt(W("wrapper",i));return t.add(this.node.cloneNode(!0)),t.xml(!1,i)}return super.xml(t,!1,i)}}function ne(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new _t(t),fy:new _t(e)}):this.attr({x1:new _t(t),y1:new _t(e)})}function oe(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new _t(t),cy:new _t(e)}):this.attr({x2:new _t(t),y2:new _t(e)})}q(re,"Fragment");var le=Object.freeze({__proto__:null,from:ne,to:oe});class he extends Vt{constructor(t,e){super(G(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,i){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}Q(he,le),A({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:K((function(t,e){return this.put(new he(t)).update(e)}))}}),q(he,"Gradient");class ce extends Vt{constructor(t,e=t){super(G("pattern",t),e)}attr(t,e,i){return"transform"===t&&(t="patternTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}A({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:K((function(t,e,i){return this.put(new ce).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),q(ce,"Pattern");let de=class extends qt{constructor(t,e=t){super(G("image",t),e)}load(t,e){if(!t)return this;const i=new O.window.Image;return zt(i,"load",(function(t){const a=this.parent(ce);0===this.width()&&0===this.height()&&this.size(i.width,i.height),a instanceof ce&&0===a.width()&&0===a.height()&&a.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),zt(i,"load error",(function(){Xt(i)})),this.attr("href",i.src=t,H)}};var ue;ue=function(t,e,i){return"fill"!==t&&"stroke"!==t||ct.test(e)&&(e=i.root().defs().image(e)),e instanceof de&&(e=i.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Wt.push(ue),A({Container:{image:K((function(t,e){return this.put(new de).size(0,0).load(t,e)}))}}),q(de,"Image");class ge extends Dt{bbox(){let t=-1/0,e=-1/0,i=1/0,a=1/0;return this.forEach((function(s){t=Math.max(s[0],t),e=Math.max(s[1],e),i=Math.min(s[0],i),a=Math.min(s[1],a)})),new kt(i,a,t-i,e-a)}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let i=this.length-1;i>=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(dt).map(parseFloat)).length%2!=0&&t.pop();for(let i=0,a=t.length;i=0;i--)a.width&&(this[i][0]=(this[i][0]-a.x)*t/a.width+a.x),a.height&&(this[i][1]=(this[i][1]-a.y)*e/a.height+a.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,i=this.length;e":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,i,a){return function(s){return s<0?t>0?e/t*s:i>0?a/i*s:0:s>1?i<1?(1-a)/(1-i)*s+(a-i)/(1-i):t<1?(1-e)/(1-t)*s+(e-t)/(1-t):1:3*s*(1-s)**2*e+3*s**2*(1-s)*a+s**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let i=t;return"none"===e?--i:"both"===e&&++i,(a,s=!1)=>{let r=Math.floor(a*t);const n=a*r%1==0;return"start"!==e&&"both"!==e||++r,s&&n&&--r,a>=0&&r<0&&(r=0),a<=1&&r>i&&(r=i),r/i}}};class ye{done(){return!1}}class we extends ye{constructor(t=Ht){super(),this.ease=ve[t]||t}step(t,e,i){return"number"!=typeof t?i<1?t:e:t+(e-t)*this.ease(i)}}class ke extends ye{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,i,a){return this.stepper(t,e,i,a)}}function Ae(){const t=(this._duration||500)/1e3,e=this._overshoot||0,i=Math.PI,a=Math.log(e/100+1e-10),s=-a/Math.sqrt(i*i+a*a),r=3.9/(s*t);this.d=2*s*r,this.k=r*r}Q(class extends ke{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;i>100&&(i=16),i/=1e3;const s=a.velocity||0,r=-this.d*s-this.k*(t-e),n=t+s*i+r*i*i/2;return a.velocity=s+r*i,a.done=Math.abs(e-n)+Math.abs(s)<.002,a.done?e:n}},{duration:me("_duration",Ae),overshoot:me("_overshoot",Ae)});Q(class extends ke{constructor(t=.1,e=.01,i=0,a=1e3){super(),this.p(t).i(e).d(i).windup(a)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;const s=e-t;let r=(a.integral||0)+s*i;const n=(s-(a.error||0))/i,o=this._windup;return!1!==o&&(r=Math.max(-o,Math.min(r,o))),a.error=s,a.integral=r,a.done=Math.abs(s)<.001,a.done?e:t+(this.P*s+this.I*r+this.D*n)}},{windup:me("_windup"),p:me("P"),i:me("I"),d:me("D")});const Ce={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Se={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Le="mlhvqtcsaz".split("");for(let t=0,e=Le.length;t=0;a--)i=this[a][0],"M"===i||"L"===i||"T"===i?(this[a][1]+=t,this[a][2]+=e):"H"===i?this[a][1]+=t:"V"===i?this[a][1]+=e:"C"===i||"S"===i||"Q"===i?(this[a][1]+=t,this[a][2]+=e,this[a][3]+=t,this[a][4]+=e,"C"===i&&(this[a][5]+=t,this[a][6]+=e)):"A"===i&&(this[a][6]+=t,this[a][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let i=0,a="";const s={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new bt,p:new bt};for(;s.lastToken=a,a=t.charAt(i++);)if(s.inSegment||!Pe(s,a))if("."!==a)if(isNaN(parseInt(a)))if(Re.has(a))s.inNumber&&Ie(s,!1);else if("-"!==a&&"+"!==a)if("E"!==a.toUpperCase()){if(ut.test(a)){if(s.inNumber)Ie(s,!1);else{if(!Me(s))throw new Error("parser Error");Te(s)}--i}}else s.number+=a,s.hasExponent=!0;else{if(s.inNumber&&!Xe(s)){Ie(s,!1),--i;continue}s.number+=a,s.inNumber=!0}else{if("0"===s.number||ze(s)){s.inNumber=!0,s.number=a,Ie(s,!0);continue}s.inNumber=!0,s.number+=a}else{if(s.pointSeen||s.hasExponent){Ie(s,!1),--i;continue}s.inNumber=!0,s.pointSeen=!0,s.number+=a}return s.inNumber&&Ie(s,!1),s.inSegment&&Me(s)&&Te(s),s.segments}(t)}size(t,e){const i=this.bbox();let a,s;for(i.width=0===i.width?1:i.width,i.height=0===i.height?1:i.height,a=this.length-1;a>=0;a--)s=this[a][0],"M"===s||"L"===s||"T"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y):"H"===s?this[a][1]=(this[a][1]-i.x)*t/i.width+i.x:"V"===s?this[a][1]=(this[a][1]-i.y)*e/i.height+i.y:"C"===s||"S"===s||"Q"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y,this[a][3]=(this[a][3]-i.x)*t/i.width+i.x,this[a][4]=(this[a][4]-i.y)*e/i.height+i.y,"C"===s&&(this[a][5]=(this[a][5]-i.x)*t/i.width+i.x,this[a][6]=(this[a][6]-i.y)*e/i.height+i.y)):"A"===s&&(this[a][1]=this[a][1]*t/i.width,this[a][2]=this[a][2]*e/i.height,this[a][6]=(this[a][6]-i.x)*t/i.width+i.x,this[a][7]=(this[a][7]-i.y)*e/i.height+i.y);return this}toString(){return function(t){let e="";for(let i=0,a=t.length;i{const e=typeof t;return"number"===e?_t:"string"===e?xt.isColor(t)?xt:dt.test(t)?ut.test(t)?Ee:Dt:tt.test(t)?_t:Oe:Ne.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Dt:"object"===e?_e:Oe};class He{constructor(t){this._stepper=t||new we("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Ye(t));let e=new this._type(t);return this._type===xt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===_e&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Oe{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Fe{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Fe.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Fe.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const De=(t,e)=>t[0]e[0]?1:0;class _e{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let i=0,a=e.length;it.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const i=e.shift(),a=e.shift(),s=e.shift(),r=e.splice(0,s);t[i]=new a(r)}return t}}const Ne=[Oe,Fe,_e];class We extends qt{constructor(t,e=t){super(G("path",t),e)}array(){return this._array||(this._array=new Ee(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Ee(t))}size(t,e){const i=I(this,t,e);return this.attr("d",this.array().size(i.width,i.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}We.prototype.MorphArray=Ee,A({Container:{path:K((function(t){return this.put(new We).plot(t||new Ee)}))}}),q(We,"Path");var Be=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new ge(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new ge(t))},size:function(t,e){const i=I(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}});class Ge extends qt{constructor(t,e=t){super(G("polygon",t),e)}}A({Container:{polygon:K((function(t){return this.put(new Ge).plot(t||new ge)}))}}),Q(Ge,fe),Q(Ge,Be),q(Ge,"Polygon");class je extends qt{constructor(t,e=t){super(G("polyline",t),e)}}A({Container:{polyline:K((function(t){return this.put(new je).plot(t||new ge)}))}}),Q(je,fe),Q(je,Be),q(je,"Polyline");class Ve extends qt{constructor(t,e=t){super(G("rect",t),e)}}Q(Ve,{rx:Zt,ry:$t}),A({Container:{rect:K((function(t,e){return this.put(new Ve).size(t,e)}))}}),q(Ve,"Rect");class Ue{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const qe={nextDraw:null,frames:new Ue,timeouts:new Ue,immediates:new Ue,timer:()=>O.window.performance||O.window.Date,transforms:[],frame(t){const e=qe.frames.push({run:t});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},timeout(t,e){e=e||0;const i=qe.timer().now()+e,a=qe.timeouts.push({run:t,time:i});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),a},immediate(t){const e=qe.immediates.push(t);return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},cancelFrame(t){null!=t&&qe.frames.remove(t)},clearTimeout(t){null!=t&&qe.timeouts.remove(t)},cancelImmediate(t){null!=t&&qe.immediates.remove(t)},_draw(t){let e=null;const i=qe.timeouts.last();for(;(e=qe.timeouts.shift())&&(t>=e.time?e.run():qe.timeouts.push(e),e!==i););let a=null;const s=qe.frames.last();for(;a!==s&&(a=qe.frames.shift());)a.run(t);let r=null;for(;r=qe.immediates.shift();)r();qe.nextDraw=qe.timeouts.first()||qe.frames.first()?O.window.requestAnimationFrame(qe._draw):null}},Ze=function(t){const e=t.start,i=t.runner.duration();return{start:e,duration:i,end:e+i,runner:t.runner}},$e=function(){const t=O.window;return(t.performance||t.Date).now()};class Je extends Rt{constructor(t=$e){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const i=Math.abs(e);return this.speed(t?-i:i)}schedule(t,e,i){if(null==t)return this._runners.map(Ze);let a=0;const s=this.getEndTime();if(e=e||0,null==i||"last"===i||"after"===i)a=s;else if("absolute"===i||"start"===i)a=e,e=0;else if("now"===i)a=this._time;else if("relative"===i){const i=this.getRunnerInfoById(t.id);i&&(a=i.start+e,e=0)}else{if("with-last"!==i)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();a=t?t.start:this._time}}t.unschedule(),t.timeline(this);const r=t.persist(),n={persist:null===r?this._persist:r,start:a+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(n),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return qe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let i=e-this._lastSourceTime;t&&(i=0);const a=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=a,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],i=e.runner;this._time-e.start<=0&&i.reset()}let s=!1;for(let t=0,e=this._runners.length;t0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}A({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Je,this._timeline):(this._timeline=t,this)}}});class Qe extends Rt{constructor(t){super(),this.id=Qe.id++,t="function"==typeof(t=null==t?Yt:t)?new ke(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ke,this._stepper=this._isDeclarative?t:new we,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new vt,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,i){let a=1,s=!1,r=0;return e=e??Ot,i=i||"last","object"!=typeof(t=t??Yt)||t instanceof ye||(e=t.delay??e,i=t.when??i,s=t.swing||s,a=t.times??a,r=t.wait??r,t=t.duration??Yt),{duration:t,delay:e,swing:s,times:a,wait:r,when:i}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,i){const a=Qe.sanitise(t,e,i),s=new Qe(a.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(a).schedule(a.delay,a.when)}clearTransform(){return this.transforms=new vt,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new we(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,i){return"object"==typeof t&&(e=t.swing,i=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=i||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),i=(this._time-t*e)/this._duration;return Math.min(t+i,this._times)}const i=t%1,a=e*Math.floor(t)+this._duration*i;return this.time(a)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,i=this._duration,a=this._wait,s=this._times,r=this._swing,n=this._reverse;let o;if(null==t){const t=function(t){const e=r*Math.floor(t%(2*(a+i))/(a+i)),s=e&&!n||!e&&n,o=Math.pow(-1,s)*(t%(a+i))/i+s;return Math.max(Math.min(o,1),0)},l=s*(a+i)-a;return o=e<=0?Math.round(t(1e-5)):e=0;this._lastPosition=e;const a=this.duration(),s=this._lastTime<=0&&this._time>0,r=this._lastTime=a;this._lastTime=this._time,s&&this.fire("start",this);const n=this._isDeclarative;this.done=!n&&!r&&this._time>=a,this._reseted=!1;let o=!1;return(i||n)&&(this._initialise(i),this.transforms=new vt,o=this._run(n?t:e),this.fire("step",this)),this.done=this.done||o&&n,r&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,i=this._queue.length;et.lmultiplyO(e),ei=t=>t.transforms;function ii(){const t=this._transformationRunners.runners.map(ei).reduce(ti,new vt);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class ai{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Ke).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const i=this.ids.indexOf(t+1);return this.ids.splice(i,1,t+1),this.runners.splice(i,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;ee.id<=t.id)).map(ei).reduce(ti,new vt)},_addRunner(t){this._transformationRunners.add(t),qe.cancelImmediate(this._frameId),this._frameId=qe.immediate(ii.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new ai).add(new Ke(new vt(this))))}}});Q(Qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,i){if("string"==typeof e)return this.styleAttr(t,{[e]:i});let a=e;if(this._tryRetarget(t,a))return this;let s=new He(this._stepper).to(a),r=Object.keys(a);return this.queue((function(){s=s.from(this.element()[t](r))}),(function(e){return this.element()[t](s.at(e).valueOf()),s.done()}),(function(e){const i=Object.keys(e),n=(o=r,i.filter((t=>!o.includes(t))));var o;if(n.length){const e=this.element()[t](n),i=new _e(s.from()).valueOf();Object.assign(i,e),s.from(i)}const l=new _e(s.to()).valueOf();Object.assign(l,e),s.to(l),r=i,a=e})),this._rememberMorpher(t,s),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let i=new He(this._stepper).to(new _t(t));return this.queue((function(){i=i.from(this.element().zoom())}),(function(t){return this.element().zoom(i.at(t),e),i.done()}),(function(t,a){e=a,i.to(t)})),this._rememberMorpher("zoom",i),this},transform(t,e,i){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const a=vt.isMatrixLike(t);i=null!=t.affine?t.affine:null!=i?i:!a;const s=new He(this._stepper).type(i?Fe:vt);let r,n,o,l,h;return this.queue((function(){n=n||this.element(),r=r||T(t,n),h=new vt(e?void 0:n),n._addRunner(this),e||n._clearTransformRunnersBefore(this)}),(function(c){e||this.clearTransform();const{x:d,y:u}=new bt(r).transform(n._currentTransform(this));let g=new vt({...t,origin:[d,u]}),p=this._isDeclarative&&o?o:h;if(i){g=g.decompose(d,u),p=p.decompose(d,u);const t=g.rotate,e=p.rotate,i=[t-360,t,t+360],a=i.map((t=>Math.abs(t-e))),s=Math.min(...a),r=a.indexOf(s);g.rotate=i[r]}e&&(a||(g.rotate=t.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),s.from(p),s.to(g);const f=s.at(c);return l=f.rotate,o=new vt(f),this.addTransform(o),n._addRunner(this),s.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(r=T(e,n)),t={...e,origin:r}}),!0),this._isDeclarative&&this._rememberMorpher("transform",s),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new _t(e),this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);let a=null;return this.queue((function(){a=this.element()[t](),i.from(a),i.to(a+e)}),(function(e){return this.element()[t](i.at(e)),i.done()}),(function(t){i.to(a+new _t(t))})),this._rememberMorpher(t,i),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);return this.queue((function(){i.from(this.element()[t]())}),(function(e){return this.element()[t](i.at(e)),i.done()})),this._rememberMorpher(t,i),this},_queueNumber(t,e){return this._queueObject(t,new _t(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let i;return t&&e||(i=this._element.bbox()),t||(t=i.width/i.height*e),e||(e=i.height/i.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,i,a){if(4===arguments.length)return this.plot([t,e,i,a]);if(this._tryRetarget("plot",t))return this;const s=new He(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){s.from(this._element.array())}),(function(t){return this._element.plot(s.at(t)),s.done()})),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,i,a){return this._queueObject("viewbox",new kt(t,e,i,a))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Q(Qe,{rx:Zt,ry:$t,from:ne,to:oe}),q(Qe,"Runner");class si extends Vt{constructor(t,e=t){super(G("svg",t),e),this.namespace()}defs(){return this.isRoot()?V(this.node.querySelector("defs"))||this.put(new Ut):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof O.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:E,version:"1.1"}).attr("xmlns:xlink",H,Y):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Y).attr("xmlns:svgjs",null,Y)}root(){return this.isRoot()?this:super.root()}}A({Container:{nested:K((function(){return this.put(new si)}))}}),q(si,"Svg",!0);let ri=class extends Vt{constructor(t,e=t){super(G("symbol",t),e)}};A({Container:{symbol:K((function(){return this.put(new ri)}))}}),q(ri,"Symbol");var ni=Object.freeze({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,i=this.bbox()){return this.cx(t,i).cy(e,i)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,i=this.bbox()){return this.x(t,i).y(e,i)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(O.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}});class oi extends qt{constructor(t,e=t){super(G("text",t),e),this.dom.leading=this.dom.leading??new _t(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new _t(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const i=this.dom.leading;this.each((function(a){if(X(this.node))return;const s=O.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=i*new _t(s);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=r:(this.attr("dy",a?r+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new _t(t.leading||1.3),this}writeDataToDom(){return R(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let i=0;t="";for(let a=0,s=e.length;a{let a;try{a=i.node instanceof F().SVGSVGElement?new kt(i.attr(["x","y","width","height"])):i.bbox()}catch(t){return}const s=new vt(i),r=s.translate(t,e).transform(s.inverse()),n=new bt(a.x,a.y).transform(r);i.move(n.x,n.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,i=this.bbox()){const a=t-i.x,s=e-i.y;return this.dmove(a,s)},size:function(t,e,i=this.bbox()){const a=I(this,t,e,i),s=a.width/i.width,r=a.height/i.height;return this.children().forEach((t=>{const e=new bt(i).transform(new vt(t).inverse());t.scale(s,r,e.x,e.y)})),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}});class gi extends Vt{constructor(t,e=t){super(G("g",t),e)}}Q(gi,ui),A({Container:{group:K((function(){return this.put(new gi)}))}}),q(gi,"G");class pi extends Vt{constructor(t,e=t){super(G("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,H)}}Q(pi,ui),A({Container:{link:K((function(t){return this.put(new pi).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const i=e.index(t);return e.add(this,i),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new pi,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),q(pi,"A");class fi extends Vt{constructor(t,e=t){super(G("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Lt("svg [mask*="+this.id()+"]")}}A({Container:{mask:K((function(){return this.defs().put(new fi)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof fi?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),q(fi,"Mask");class xi extends Gt{constructor(t,e=t){super(G("stop",t),e)}update(t){return("number"==typeof t||t instanceof _t)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new _t(t.offset)),this}}A({Gradient:{stop:function(t,e,i){return this.put(new xi).update(t,e,i)}}}),q(xi,"Stop");class bi extends Gt{constructor(t,e=t){super(G("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,i={}){return this.rule("@font-face",{fontFamily:t,src:e,...i})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let i=t+"{";for(const t in e)i+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return i+="}",i}(t,e))}}A("Dom",{style(t,e){return this.put(new bi).rule(t,e)},fontface(t,e,i){return this.put(new bi).font(t,e,i)}}),q(bi,"Style");class mi extends oi{constructor(t,e=t){super(G("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let i=null;return e&&(i=e.plot(t)),null==t?i:this}track(){return this.reference("href")}}A({Container:{textPath:K((function(t,e){return t instanceof oi||(t=this.text(t)),t.path(e)}))},Text:{path:K((function(t,e=!0){const i=new mi;let a;if(t instanceof We||(t=this.defs().path(t)),i.attr("href","#"+t,H),e)for(;a=this.node.firstChild;)i.node.appendChild(a);return this.put(i)})),textPath(){return this.findOne("textPath")}},Path:{text:K((function(t){return t instanceof oi||(t=(new oi).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Lt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),mi.prototype.MorphArray=Ee,q(mi,"TextPath");class vi extends qt{constructor(t,e=t){super(G("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,H)}}A({Container:{use:K((function(t,e){return this.put(new vi).use(t,e)}))}}),q(vi,"Use");const yi=B;Q([si,ri,de,ce,be],C("viewbox")),Q([xe,je,Ge,We],C("marker")),Q(oi,C("Text")),Q(We,C("Path")),Q(Ut,C("Defs")),Q([oi,li],C("Tspan")),Q([Ve,se,he,Qe],C("radius")),Q(Rt,C("EventTarget")),Q(Bt,C("Dom")),Q(Gt,C("Element")),Q(qt,C("Shape")),Q([Vt,re],C("Container")),Q(he,C("Gradient")),Q(Qe,C("Runner")),Ct.extend([...new Set(k)]),function(t=[]){Ne.push(...[].concat(t))}([_t,xt,kt,vt,Dt,ge,Ee,bt]),Q(Ne,{to(t){return(new He).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,i,a,s){return this.fromArray(t.map((function(t,r){return a.step(t,e[r],i,s[r],s)})))}});class wi extends Gt{constructor(t){super(G("filter",t),t),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(t,e){return!(t=super.put(t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return Lt('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class ki extends Gt{constructor(t,e){super(t,e),this.result(this.id())}in(t){if(null==t){const t=this.attr("in");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in",t)}result(t){return this.attr("result",t)}toString(){return this.result()}}const Ai=t=>function(...e){for(let i=t.length;i--;)null!=e[i]&&this.attr(t[i],e[i])},Ci={blend:Ai(["in","in2","mode"]),colorMatrix:Ai(["type","values"]),composite:Ai(["in","in2","operator"]),convolveMatrix:function(t){t=new Dt(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Ai(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Ai(["in","dx","dy","stdDeviation"]),flood:Ai(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,H)},morphology:Ai(["operator","radius"]),offset:Ai(["dx","dy"]),specularLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Ai([]),turbulence:Ai(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((t=>{const e=P(t),i=Ci[t];wi[e+"Effect"]=class extends ki{constructor(t){super(G("fe"+e,t),t)}update(t){return i.apply(this,t),this}},wi.prototype[t]=K((function(t,...i){const a=new wi[e+"Effect"];return null==t?this.put(a):("function"==typeof t?t.call(a,a):i.unshift(t),this.put(a).update(i))}))})),Q(wi,{merge(t){const e=this.put(new wi.MergeEffect);if("function"==typeof t)return t.call(e,e),e;return(t instanceof Array?t:[...arguments]).forEach((t=>{t instanceof wi.MergeNode?e.put(t):e.mergeNode(t)})),e},componentTransfer(t={}){const e=this.put(new wi.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;if(!(t.r||t.g||t.b||t.a)){t={r:t,g:t,b:t,a:t}}for(const i in t)e.add(new(wi["Func"+i.toUpperCase()])(t[i]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((t=>{const e=P(t);wi[e]=class extends ki{constructor(t){super(G("fe"+e,t),t)}}}));["funcR","funcG","funcB","funcA"].forEach((function(t){const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.ComponentTransferEffect.prototype[t]=i}));["distantLight","pointLight","spotLight"].forEach((t=>{const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.DiffuseLightingEffect.prototype[t]=i,wi.SpecularLightingEffect.prototype[t]=i})),Q(wi.MergeEffect,{mergeNode(t){return this.put(new wi.MergeNode).attr("in",t)}}),Q(Ut,{filter:function(t){const e=this.put(new wi);return"function"==typeof t&&t.call(e,e),e}}),Q(Vt,{filter:function(t){return this.defs().filter(t)}}),Q(Gt,{filterWith:function(t){const e=t instanceof wi?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const Si={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,i,a){return this.parent()&&this.parent().diffuseLighting(t,i,a).in(this)},displacementMap:function(t,e,i,a){return this.parent()&&this.parent().displacementMap(this,t,e,i,a)},dropShadow:function(t,e,i){return this.parent()&&this.parent().dropShadow(this,t,e,i).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){return t=t instanceof Array?t:[...t],this.parent()&&this.parent().merge(this,...t)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,i,a,s){return this.parent()&&this.parent().specularLighting(t,i,a,s).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,a,s){return this.parent()&&this.parent().turbulence(t,e,i,a,s).in(this)}};Q(ki,Si),Q(wi.MergeEffect,{in:function(t){return t instanceof wi.MergeNode?this.add(t,0):this.add((new wi.MergeNode).in(t),0),this}}),Q([wi.CompositeEffect,wi.BlendEffect,wi.DisplacementMapEffect],{in2:function(t){if(null==t){const t=this.attr("in2");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in2",t)}}),wi.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var Li=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getDefaultFilter",value:function(t,e){var i=this.w;t.unfilter(!0),(new wi).size("120%","180%","-5%","-40%"),i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"applyFilter",value:function(t,e,i){var a,s=this,r=this.w;if(t.unfilter(!0),"none"!==i){var n,o,l=r.config.chart.dropShadow,h="lighten"===i?2:.3;if(t.filterWith((function(t){t.colorMatrix({type:"matrix",values:"\n ".concat(h," 0 0 0 0\n 0 ").concat(h," 0 0 0\n 0 0 ").concat(h," 0 0\n 0 0 0 1 0\n "),in:"SourceGraphic",result:"brightness"}),l.enabled&&s.addShadow(t,e,l,"brightness")})),!l.noUserSpaceOnUse)null===(n=t.filterer())||void 0===n||null===(o=n.node)||void 0===o||o.setAttribute("filterUnits","userSpaceOnUse");this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node)}else this.getDefaultFilter(t,e)}},{key:"addShadow",value:function(t,e,i,a){var s,r=this.w,n=i.blur,o=i.top,l=i.left,h=i.color,c=i.opacity;if(h=Array.isArray(h)?h[e]:h,(null===(s=r.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:a,dx:l,dy:o,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:n,result:"blur"}),t.flood({"flood-color":h,"flood-opacity":c,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",a])}},{key:"dropShadow",value:function(t,e){var i,a,s,r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.w;if(t.unfilter(!0),v.isMsEdge()&&"radialBar"===o.config.chart.type)return t;if((null===(i=o.config.chart.dropShadow.enabledOnSeries)||void 0===i?void 0:i.length)>0&&-1===(null===(s=o.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.indexOf(n)))return t;return t.filterWith((function(t){r.addShadow(t,n,e,"SourceGraphic")})),e.noUserSpaceOnUse||t.filterer().node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node),t}},{key:"setSelectionFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;"none"!==s&&this.applyFilter(t,e,s.type)}}},{key:"_scaleFilterSize",value:function(t){if(t){!function(e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}}]),t}(),Mi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"roundPathCorners",value:function(t,e){function i(t,e,i){var s=e.x-t.x,r=e.y-t.y,n=Math.sqrt(s*s+r*r);return a(t,e,Math.min(1,i/n))}function a(t,e,i){return{x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}}function s(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function r(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var n=t.split(/[,\s]/).reduce((function(t,e){var i=e.match("([a-zA-Z])(.+)");return i?(t.push(i[1]),t.push(i[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),o=[];if(n.length>1){var l=r(n[0]),h=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(h=["L",l.x,l.y],n[n.length-1]=h),o.push(n[0]);for(var c=1;c2&&"L"==u[0]&&g.length>2&&"L"==g[0]){var p,f,x=r(d),b=r(u),m=r(g);p=i(b,x,e),f=i(b,m,e),s(u,p),u.origPoint=b,o.push(u);var v=a(p,b,.5),y=a(b,f,.5),w=["C",v.x,v.y,y.x,y.y,f.x,f.y];w.origPoint=b,o.push(w)}else o.push(u)}if(h){var k=r(o[o.length-1]);o.push(["Z"]),s(o[0],k)}}else o=n;return o.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":n,"stroke-linecap":o})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,c=this.w.globals.dom.Paper.rect();return c.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":h}),c.node.setAttribute("fill",r),c}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:a,stroke:e,"stroke-width":i})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var i=this.w.globals.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,s=void 0===a?"#a8a8a8":a,r=t.strokeWidth,n=void 0===r?1:r,o=t.fill,l=t.fillOpacity,h=void 0===l?1:l,c=t.strokeOpacity,d=void 0===c?1:c,u=t.classes,g=t.strokeLinecap,p=void 0===g?null:g,f=t.strokeDashArray,x=void 0===f?0:f,b=this.w;return null===p&&(p=b.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(b.globals.gridHeight)),b.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":h,stroke:s,"stroke-opacity":d,"stroke-linecap":p,"stroke-width":n,"stroke-dasharray":x,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){var i=["M",t,e].join(" ");return i}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=[" L",t,e].join(" "):"H"===i?a=[" H",t].join(" "):"V"===i&&(a=[" V",e].join(" ")),a}},{key:"curve",value:function(t,e,i,a,s,r){var n=["C",t,e,i,a,s,r].join(" ");return n}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,s,r,n){var o="A";arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(o="a");var l=[o,t,e,i,a,s,r,n].join(" ");return l}},{key:"renderPaths",value:function(t){var e,i=t.j,a=t.realIndex,s=t.pathFrom,r=t.pathTo,n=t.stroke,o=t.strokeWidth,l=t.strokeLinecap,h=t.fill,c=t.animationDelay,d=t.initialSpeed,g=t.dataChangeSpeed,p=t.className,f=t.chartType,x=t.shouldClipToGrid,b=void 0===x||x,m=t.bindEventsOnPaths,v=void 0===m||m,w=t.drawShadow,k=void 0===w||w,A=this.w,C=new Li(this.ctx),S=new y(this.ctx),L=this.w.config.chart.animations.enabled,M=L&&this.w.config.chart.animations.dynamicAnimation.enabled,P=!!(L&&!A.globals.resized||M&&A.globals.dataChanged&&A.globals.shouldAnimate);P?e=s:(e=r,A.globals.animationEnded=!0);var I=A.config.stroke.dashArray,T=0;T=Array.isArray(I)?I[a]:A.config.stroke.dashArray;var z=this.drawPath({d:e,stroke:n,strokeWidth:o,fill:h,fillOpacity:1,classes:p,strokeLinecap:l,strokeDashArray:T});z.attr("index",a),b&&("bar"===f&&!A.globals.isHorizontal||A.globals.comboCharts?z.attr({"clip-path":"url(#gridRectBarMask".concat(A.globals.cuid,")")}):z.attr({"clip-path":"url(#gridRectMask".concat(A.globals.cuid,")")})),A.config.chart.dropShadow.enabled&&k&&C.dropShadow(z,A.config.chart.dropShadow,a),v&&(z.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,z)),z.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,z)),z.node.addEventListener("mousedown",this.pathMouseDown.bind(this,z))),z.attr({pathTo:r,pathFrom:s});var X={el:z,j:i,realIndex:a,pathFrom:s,pathTo:r,fill:h,strokeWidth:o,delay:c};return!L||A.globals.resized||A.globals.dataChanged?!A.globals.resized&&A.globals.dataChanged||S.showDelayedElements():S.animatePathsGradually(u(u({},X),{},{speed:d})),A.globals.dataChanged&&M&&P&&S.animatePathsGradually(u(u({},X),{},{speed:g})),z}},{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,i,(function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:a,width:s+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:a,width:s}):"squares"===t?r.rect(e,i).fill("none").stroke({color:a,width:s}):"circles"===t&&r.circle(e).fill("none").stroke({color:a,width:s})}))}},{key:"drawGradient",value:function(t,e,i,a,s){var r,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,c=this.w;e.length<9&&0===e.indexOf("#")&&(e=v.hexToRgba(e,a)),i.length<9&&0===i.indexOf("#")&&(i=v.hexToRgba(i,s));var d=0,u=1,g=1,p=null;null!==o&&(d=void 0!==o[0]?o[0]/100:0,u=void 0!==o[1]?o[1]/100:1,g=void 0!==o[2]?o[2]/100:1,p=void 0!==o[3]?o[3]/100:null);var f=!("donut"!==c.config.chart.type&&"pie"!==c.config.chart.type&&"polarArea"!==c.config.chart.type&&"bubble"!==c.config.chart.type);if(r=l&&0!==l.length?c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){(Array.isArray(l[h])?l[h]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){t.stop(d,e,a),t.stop(u,i,s),t.stop(g,i,s),null!==p&&t.stop(p,e,a)})),f){var x=c.globals.gridWidth/2,b=c.globals.gridHeight/2;"bubble"!==c.config.chart.type?r.attr({gradientUnits:"userSpaceOnUse",cx:x,cy:b,r:n}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?r.from(0,0).to(0,1):"diagonal"===t?r.from(0,0).to(1,1):"horizontal"===t?r.from(0,1).to(1,1):"diagonal2"===t&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,i=t.maxWidth,a=t.fontSize,s=t.fontFamily,r=this.getTextRects(e,a,s),n=r.width/e.length,o=Math.floor(i/n);return i-1){var o=i.globals.selectedDataPoints[s].indexOf(r);i.globals.selectedDataPoints[s].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),h=i.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),c=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),a.getDefaultFilter(t,s)}))};c(l),c(h)}t.node.setAttribute("selected","true"),n="true",void 0===i.globals.selectedDataPoints[s]&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(r)}if("true"===n){var d=i.config.states.active.filter;if("none"!==d)a.applyFilter(t,s,d.type);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}}else if("none"!==i.config.states.active.filter.type)if("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice)a.getDefaultFilter(t,s);else{u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,a){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w,n=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),r.globals.dom.Paper.add(n);var o=n.bbox();return s||(o=n.node.getBoundingClientRect()),n.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i/1.1)return void(t.textContent=e.substring(0,a)+"...");t.textContent="."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}(),Pi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getStackedSeriesTotals",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,i=[];if(0===e.globals.series.length)return i;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,i=[];return e.globals.seriesGroups.forEach((function(a){var s=[];e.config.series.forEach((function(t,i){a.indexOf(e.globals.seriesNames[i])>-1&&s.push(i)}));var r=e.globals.series.map((function(t,e){return-1===s.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));i.push(t.getStackedSeriesTotals(r))})),i}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,i=[],a=[],s=[],r=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){s.push(e),a.push(null)})),e.yaxis.forEach((function(t,e){i[e]=[]}));var n=[];e.yaxis.forEach((function(t,a){var o=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,n){if(e.name===t){var l=n;a===n||r?!r||s.indexOf(n)>-1?i[a].push([a,n]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[n].push([n,a]),l=a),o=!0,-1!==(l=s.indexOf(l))&&s.splice(l,1)}}))}))}o||n.push(a)})),i=i.map((function(t,e){var i=[];return t.forEach((function(t){a[t[1]]=t[0],i.push(t[1])})),i}));for(var o=e.yaxis.length-1,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,i){return t===i[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map((function(t,i){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),i}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var i=0;if(Array.isArray(t))for(var a=0;at&&i.globals.seriesX[s][n]0){var g=function(t,e){var i=s.config.yaxis[s.globals.seriesYAxisReverseMap[e]],r=t<0?-1:1;return t=Math.abs(t),i.logarithmic&&(t=a.getBaseLog(i.logBase,t)),-r*t/n[e]};if(r.isMultipleYAxis){l=[];for(var p=0;p0&&e.forEach((function(e){var n=[],o=[];t.i.forEach((function(i,a){s.config.series[i].group===e&&(n.push(t.series[a]),o.push(i))})),n.length>0&&r.push(a.draw(n,i,o))})),r}}],[{key:"checkComboSeries",value:function(t,e){var i=!1,a=0,s=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||a++,void 0!==t.type&&t.type!==e&&s++})),s>0&&(i=!0),{comboBarCount:a,comboCharts:i}}},{key:"extendArrayProps",value:function(t,e,i){var a,s,r,n,o,l;(null!==(a=e)&&void 0!==a&&a.yaxis&&(e=t.extendYAxis(e,i)),null!==(s=e)&&void 0!==s&&s.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(r=e)&&void 0!==r&&null!==(n=r.annotations)&&void 0!==n&&n.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(l=o.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e)));return e}}]),t}(),Ii=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e}return s(t,[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===t.label.orientation){var a=null!==e?e:0,s=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(null!==s){var r=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-r.height+4);var n="top"===t.label.position?r.width:-r.width;s.setAttribute("y",parseFloat(s.getAttribute("y"))+n);var o=this.annoCtx.graphics.rotateAroundCenter(s),l=o.x,h=o.y;s.setAttribute("transform","rotate(-90 ".concat(l," ").concat(h,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=t.getBoundingClientRect(),r=e.label.style.padding,n=r.left,o=r.right,l=r.top,h=r.bottom;if("vertical"===e.label.orientation){var c=[n,o,l,h];l=c[0],h=c[1],n=c[2],o=c[3]}var d=s.left-a.left-n,u=s.top-a.top-l,g=this.annoCtx.graphics.drawRect(d-i.globals.barPadForNumericAxis,u,s.width+n+o,s.height+l+h,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&g.node.classList.add(e.id),g}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,a,s){var r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(a,"']"));if(r){var n=r.parentNode,o=t.addBackgroundToAnno(r,i);o&&(n.insertBefore(o.node,r),i.label.mouseEnter&&o.node.addEventListener("mouseenter",i.label.mouseEnter.bind(t,i)),i.label.mouseLeave&&o.node.addEventListener("mouseleave",i.label.mouseLeave.bind(t,i)),i.label.click&&o.node.addEventListener("click",i.label.click.bind(t,i)))}};e.config.annotations.xaxis.forEach((function(t,e){return i(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return i(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return i(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var i,a=this.w,s="y1"===t?e.y:e.y2,r=!1;if(this.annoCtx.invertAxis){var n=a.config.xaxis.convertedCatToNumeric?a.globals.categoryLabels:a.globals.labels,o=n.indexOf(s),l=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(o+1,")"));i=l?parseFloat(l.getAttribute("y")):(a.globals.gridHeight/n.length-1)*(o+1)-a.globals.barHeight,void 0!==e.seriesIndex&&a.globals.barHeight&&(i-=a.globals.barHeight/2*(a.globals.series.length-1)-a.globals.barHeight*e.seriesIndex)}else{var h,c=a.globals.seriesYAxisMap[e.yAxisIndex][0],d=a.config.yaxis[e.yAxisIndex].logarithmic?new Pi(this.annoCtx.ctx).getLogVal(a.config.yaxis[e.yAxisIndex].logBase,s,c)/a.globals.yLogRatio[c]:(s-a.globals.minYArr[c])/(a.globals.yRange[c]/a.globals.gridHeight);i=a.globals.gridHeight-Math.min(Math.max(d,0),a.globals.gridHeight),r=d>a.globals.gridHeight||d<0,!e.marker||void 0!==e.y&&null!==e.y||(i=0),null!==(h=a.config.yaxis[e.yAxisIndex])&&void 0!==h&&h.reversed&&(i=d)}return"string"==typeof s&&s.includes("px")&&(i=parseFloat(s)),{yP:i,clipped:r}}},{key:"getX1X2",value:function(t,e){var i=this.w,a="x1"===t?e.x:e.x2,s=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,r=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,n=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,o=!1,l=this.annoCtx.inversedReversedAxis?(r-a)/(n/i.globals.gridWidth):(a-s)/(n/i.globals.gridWidth);return"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||i.config.chart.sparkline.enabled||(l=this.getStringX(a)),"string"==typeof a&&a.includes("px")&&(l=parseFloat(a)),null==a&&e.marker&&(l=i.globals.gridWidth),void 0!==e.seriesIndex&&i.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=i.globals.barWidth/2*(i.globals.series.length-1)-i.globals.barWidth*e.seriesIndex),l>i.globals.gridWidth?(l=i.globals.gridWidth,o=!0):l<0&&(l=0,o=!0),{x:l,clipped:o}}},{key:"getStringX",value:function(t){var e=this.w,i=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var a=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),s=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(a+1,")"));return s&&(i=parseFloat(s.getAttribute("x"))),i}}]),t}(),Ti=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addXaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=this.helpers.getX1X2("x1",t),n=r.x,o=r.clipped,l=!0,h=t.label.text,c=t.strokeDashArray;if(v.isNumber(n)){if(null===t.x2||void 0===t.x2){if(!o){var d=this.annoCtx.graphics.drawLine(n+t.offsetX,0+t.offsetY,n+t.offsetX,s.globals.gridHeight+t.offsetY,t.borderColor,c,t.borderWidth);e.appendChild(d.node),t.id&&d.node.classList.add(t.id)}}else{var u=this.helpers.getX1X2("x2",t);if(a=u.x,l=u.clipped,!o||!l){if(a12?u-12:0===u?12:u;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(g))).replace(/(^|[^\\])h/g,"$1"+g);var p=a?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var x=a?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);var b=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var m=u<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));var v=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var y=-t.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){var k=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(k)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var A=(a?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(n[0],"g"),n[A])).replace(new RegExp(o[0],"g"),o[A])).replace(new RegExp(s[0],"g"),s[c])).replace(new RegExp(r[0],"g"),r[c])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var a=this.w;void 0!==a.config.xaxis.min&&(t=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(e=a.config.xaxis.max);var s=this.getDate(t),r=this.getDate(e),n=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=v.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),Xi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return s(t,[{key:"xLabelFormat",value:function(t,e,i,a){var s=this.w;if("datetime"===s.config.xaxis.type&&void 0===s.config.xaxis.labels.formatter&&void 0===s.config.tooltip.x.formatter){var r=new zi(this.ctx);return r.formatDate(r.getDate(e),s.config.tooltip.x.format)}return t(e,i,a)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,i){var a=this.w;if(v.isNumber(t))if(0!==a.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:a.globals.yValueDecimal);else{var s=t.toFixed(0);t=t==s?s:t.toFixed(1)}return t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(v.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(v.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var i=e.globals.maxX-e.globals.minX;return i>0&&i<100?t.toFixed(1):t.toFixed(0)}if(e.globals.isBarHorizontal)if(e.globals.maxY-e.globals.minYArr<4)return t.toFixed(1);return t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,a){void 0!==i.labels.formatter?e.globals.yLabelFormatters[a]=i.labels.formatter:e.globals.yLabelFormatters[a]=function(s){return e.globals.xyCharts?Array.isArray(s)?s.map((function(e){return t.defaultYFormatter(e,i,a)})):t.defaultYFormatter(s,i,a):s}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),Ri=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getLabel",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",n=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,l=void 0===t[a]?"":t[a],h=l,c=o.globals.xLabelFormatter,d=o.config.xaxis.labels.formatter,u=!1,g=new Xi(this.ctx),p=l;n&&(h=g.xLabelFormat(c,l,p,{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o}),void 0!==d&&(h=d(l,t[a],{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o})));var f,x;e.length>0?(f=e[a].unit,x=null,e.forEach((function(t){"month"===t.unit?x="year":"day"===t.unit?x="month":"hour"===t.unit?x="day":"minute"===t.unit&&(x="hour")})),u=x===f,i=e[a].position,h=e[a].value):"datetime"===o.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var b=new Mi(this.ctx),m={};m=o.globals.rotateXLabels&&n?b.getTextRects(h,parseInt(r,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):b.getTextRects(h,parseInt(r,10));var v=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||s.indexOf(h)>=0&&v)&&(h=""),{x:i,text:h,textRect:m,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var a=this.w,s=a.config.xaxis.tickAmount;return"dataPoints"===s&&(s=Math.round(a.globals.gridWidth/120)),s>i||t%Math.round(i/(s+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,a,s){var r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=s[s.length-1];e.xa.length||a.some((function(t){return Array.isArray(t.seriesName)}))?t:i.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,i=e.config.yaxis[t];if(!i.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!i.showForNullSeries){var a=e.globals.seriesYAxisMap[t],s=new Pi(this.ctx);return a.every((function(t){return s.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,i,a,s,r,n){var o=this.w,l=new Mi(this.ctx),h=o.globals.translateY+o.config.yaxis[s].labels.offsetY;if(o.globals.isBarHorizontal?h=0:"heatmap"===o.config.chart.type&&(h+=r/2),a.show&&e>0){!0===o.config.yaxis[s].opposite&&(t+=a.width);for(var c=e;c>=0;c--){var d=l.drawLine(t+i.offsetX-a.width+a.offsetX,h+a.offsetY,t+i.offsetX+a.offsetX,h+a.offsetY,a.color);n.add(d),h+=r}}}}]),t}(),Ei=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx),this.axesUtils=new Ri(this.annoCtx)}return s(t,[{key:"addYaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=t.strokeDashArray,n=this.helpers.getY1Y2("y1",t),o=n.yP,l=n.clipped,h=!0,c=!1,d=t.label.text;if(null===t.y2||void 0===t.y2){if(!l){c=!0;var u=this.annoCtx.graphics.drawLine(0+t.offsetX,o+t.offsetY,this._getYAxisAnnotationWidth(t),o+t.offsetY,t.borderColor,r,t.borderWidth);e.appendChild(u.node),t.id&&u.node.classList.add(t.id)}}else{if(a=(n=this.helpers.getY1Y2("y2",t)).yP,h=n.clipped,a>o){var g=o;o=a,a=g}if(!l||!h){c=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,a+t.offsetY,this._getYAxisAnnotationWidth(t),o-a,0,t.fillColor,t.opacity,1,t.borderColor,r);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(c){var f="right"===t.label.position?s.globals.gridWidth:"center"===t.label.position?s.globals.gridWidth/2:0,x=this.annoCtx.graphics.drawText({x:f+t.label.offsetX,y:(null!=a?a:o)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});x.attr({rel:i}),e.appendChild(x.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;e.globals.gridWidth;return(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,a){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,i.node,a)})),i}}]),t}(),Yi=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addPointAnnotation",value:function(t,e,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",t),s=a.x,r=a.clipped,n=(a=this.helpers.getY1Y2("y1",t)).yP,o=a.clipped;if(v.isNumber(s)&&!o&&!r){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},h=this.annoCtx.graphics.drawMarker(s+t.marker.offsetX,n+t.marker.offsetY,l);e.appendChild(h.node);var c=t.label.text?t.label.text:"",d=this.annoCtx.graphics.drawText({x:s+t.label.offsetX,y:n+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:c,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(d.attr({rel:i}),e.appendChild(d.node),t.customSVG.SVG){var u=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});u.attr({transform:"translate(".concat(s+t.customSVG.offsetX,", ").concat(n+t.customSVG.offsetY,")")}),u.node.innerHTML=t.customSVG.SVG,e.appendChild(u.node)}if(t.image.path){var g=t.image.width?t.image.width:20,p=t.image.height?t.image.height:20;h=this.annoCtx.addImage({x:s+t.image.offsetX-g/2,y:n+t.image.offsetY-p/2,width:g,height:p,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&h.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&h.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&h.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,a){t.addPointAnnotation(e,i.node,a)})),i}}]),t}();var Hi={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},Oi=function(){function t(){i(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return s(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[Hi],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),Fi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.graphics=new Mi(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Ii(this),this.xAxisAnnotations=new Ti(this),this.yAxisAnnotations=new Ei(this),this.pointsAnnotations=new Yi(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return s(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=t.config.chart.animations.enabled,r=[e,i,a],n=[i.node,e.node,a.node],o=0;o<3;o++)t.globals.dom.elGraphical.add(r[o]),!s||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&n[o].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:n[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,a=t.y,s=t.text,r=t.textAnchor,n=t.foreColor,o=t.fontSize,l=t.fontFamily,h=t.fontWeight,c=t.cssClass,d=t.backgroundColor,u=t.borderWidth,g=t.strokeDashArray,p=t.borderRadius,f=t.borderColor,x=t.appendTo,b=void 0===x?".apexcharts-svg":x,m=t.paddingLeft,v=void 0===m?4:m,y=t.paddingRight,w=void 0===y?4:y,k=t.paddingBottom,A=void 0===k?2:k,C=t.paddingTop,S=void 0===C?2:C,L=this.w,M=this.graphics.drawText({x:i,y:a,text:s,textAnchor:r||"start",fontSize:o||"12px",fontWeight:h||"regular",fontFamily:l||L.config.chart.fontFamily,foreColor:n||L.config.chart.foreColor,cssClass:c}),P=L.globals.dom.baseEl.querySelector(b);P&&P.appendChild(M.node);var I=M.bbox();if(s){var T=this.graphics.drawRect(I.x-v,I.y-S,I.width+v+w,I.height+A+S,p,d||"transparent",1,u,f,g);P.insertBefore(T.node,M.node)}}},{key:"addImage",value:function(t,e){var i=this.w,a=t.path,s=t.x,r=void 0===s?0:s,n=t.y,o=void 0===n?0:n,l=t.width,h=void 0===l?20:l,c=t.height,d=void 0===c?20:c,u=t.appendTo,g=void 0===u?".apexcharts-svg":u,p=i.globals.dom.Paper.image(a);p.size(h,d).move(r,o);var f=i.globals.dom.baseEl.querySelector(g);return f&&f.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,a=t.context,s=t.type,r=t.contextMethod,n=a,o=n.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),h=l.childNodes.length+1,c=new Oi,d=Object.assign({},"xaxis"===s?c.xAxisAnnotation:"yaxis"===s?c.yAxisAnnotation:c.pointAnnotation),u=v.extend(d,e);switch(s){case"xaxis":this.addXaxisAnnotation(u,l,h);break;case"yaxis":this.addYaxisAnnotation(u,l,h);break;case"point":this.addPointAnnotation(u,l,h)}var g=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(h,"']")),p=this.helpers.addBackgroundToAnno(g,u);return p&&l.insertBefore(p.node,g),i&&o.globals.memory.methodsToExec.push({context:n,id:u.id?u.id:v.randomId(),method:r,label:"addAnnotation",params:e}),a}},{key:"clearAnnotations",value:function(t){for(var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),a=e.globals.memory.methodsToExec.length-1;a>=0;a--)"addText"!==e.globals.memory.methodsToExec[a].label&&"addAnnotation"!==e.globals.memory.methodsToExec[a].label||e.globals.memory.methodsToExec.splice(a,1);i=v.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(e));a&&(i.globals.memory.methodsToExec.map((function(t,a){t.id===e&&i.globals.memory.methodsToExec.splice(a,1)})),Array.prototype.forEach.call(a,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),Di=function(t){var e,i=t.isTimeline,a=t.ctx,s=t.seriesIndex,r=t.dataPointIndex,n=t.y1,o=t.y2,l=t.w,h=l.globals.seriesRangeStart[s][r],c=l.globals.seriesRangeEnd[s][r],d=l.globals.labels[r],u=l.config.series[s].name?l.config.series[s].name:"",g=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,f={w:l,seriesIndex:s,dataPointIndex:r,start:h,end:c};("function"==typeof p&&(u=p(u,f)),null!==(e=l.config.series[s].data[r])&&void 0!==e&&e.x&&(d=l.config.series[s].data[r].x),i)||"datetime"===l.config.xaxis.type&&(d=new Xi(a).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(a).formatDate,w:l}));"function"==typeof g&&(d=g(d,f)),Number.isFinite(n)&&Number.isFinite(o)&&(h=n,c=o);var x="",b="",m=l.globals.colors[s];if(void 0===l.config.tooltip.x.formatter)if("datetime"===l.config.xaxis.type){var v=new zi(a);x=v.formatDate(v.getDate(h),l.config.tooltip.x.format),b=v.formatDate(v.getDate(c),l.config.tooltip.x.format)}else x=h,b=c;else x=l.config.tooltip.x.formatter(h),b=l.config.tooltip.x.formatter(c);return{start:h,end:c,startVal:x,endVal:b,ylabel:d,color:m,seriesName:u}},_i=function(t){var e=t.color,i=t.seriesName,a=t.ylabel,s=t.start,r=t.end,n=t.seriesIndex,o=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(n);s=l.yLbFormatter(s),r=l.yLbFormatter(r);var h=l.yLbFormatter(t.w.globals.series[n][o]),c='\n '.concat(s,'\n - \n ').concat(r,"\n ");return'
'+(i||"")+'
'+a+": "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[n].type||"rangeBar"===t.w.config.series[n].type?c:"".concat(h,""):c)+"
"},Ni=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){this.hideYAxis();return v.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var i=e.w.config.series[e.seriesIndex].name;return null!==t?i+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),u(u({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,a=e.dataPointIndex,s=e.w,r=function(){var t=s.globals.seriesRangeStart[i][a];return s.globals.seriesRangeEnd[i][a]-t};return s.globals.comboCharts?"rangeBar"===s.config.series[i].type||"rangeArea"===s.config.series[i].type?r():t:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Di(u(u({},t),{},{isTimeline:!0})),i=e.color,a=e.seriesName,s=e.ylabel,r=e.startVal,n=e.endVal;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t):function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,i;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(i=t.plotOptions.bar)&&void 0!==i&&i.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}}}}},{key:"brush",value:function(t){return v.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return u(u({},t),{},{plotOptions:u(u({},t.plotOptions),{},{bar:u(u({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return v.isNumber(t)?Math.floor(t):t};var a=t.xaxis.labels.formatter,s=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(s=i.map((function(t){return Array.isArray(t)?t:String(t)}))),s&&s.length&&(t.xaxis.labels.formatter=function(t){return v.isNumber(t)?a(s[Math.floor(t)-1]):a(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,i,a,s){var r=t.globals.seriesCandleO[e][i],n=t.globals.seriesCandleH[e][i],o=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],h=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==s?'
\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][i],"\n
"):'
')+"
".concat(a[0],': ')+r+"
"+"
".concat(a[1],': ')+n+"
"+(o?"
".concat(a[2],': ')+o+"
":"")+"
".concat(a[3],': ')+l+"
"+"
".concat(a[4],': ')+h+"
"}}]),t}(),Wi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(t){var e=t.responsiveOverride,i=this.opts,a=new Oi,s=new Ni(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),n={};if(i&&"object"===b(i)){var o,l,h,c,d,u,g,p,f,x,m={};m=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?s[i.chart.type]():s.line(),null!==(o=i.plotOptions)&&void 0!==o&&null!==(l=o.bar)&&void 0!==l&&l.isFunnel&&(m=s.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(m=s.stackedBars()),null!==(h=i.chart.brush)&&void 0!==h&&h.enabled&&(m=s.brush(m)),null!==(c=i.plotOptions)&&void 0!==c&&null!==(d=c.line)&&void 0!==d&&d.isSlopeChart&&(m=s.slope()),i.chart.stacked&&"100%"===i.chart.stackType&&(i=s.stacked100(i)),null!==(u=i.plotOptions)&&void 0!==u&&null!==(g=u.bar)&&void 0!==g&&g.isDumbbell&&(i=s.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},e||(i.xaxis.convertedCatToNumeric=!1),(null!==(p=(i=this.checkForCatToNumericXAxis(this.chartType,m,i)).chart.sparkline)&&void 0!==p&&p.enabled||null!==(f=window.Apex.chart)&&void 0!==f&&null!==(x=f.sparkline)&&void 0!==x&&x.enabled)&&(m=s.sparkline(m)),n=v.extend(r,m)}var y=v.extend(n,window.Apex);return r=v.extend(y,i),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var a,s,r=new Ni(i),n=("bar"===t||"boxPlot"===t)&&(null===(a=i.plotOptions)||void 0===a||null===(s=a.bar)||void 0===s?void 0:s.horizontal),o="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,l="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,h=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return n||o||!l||"between"===h||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new Oi;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=v.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[v.extend(i.yAxis,t.yaxis)]:t.yaxis=v.extendArray(t.yaxis,i.yAxis);var a=!1;t.yaxis.forEach((function(t){t.logarithmic&&(a=!0)}));var s=t.series;return e&&!s&&(s=e.config.series),a&&s.length!==t.yaxis.length&&s.length&&(t.yaxis=s.map((function(e,a){if(e.name||(s[a].name="series-".concat(a+1)),t.yaxis[a])return t.yaxis[a].seriesName=s[a].name,t.yaxis[a];var r=v.extend(i.yAxis,t.yaxis[0]);return r.show=!1,r}))),a&&s.length>1&&s.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.yaxis=v.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.xaxis=v.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new Oi;return t.annotations.points=v.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),Bi=function(){function t(){i(this,t)}return s(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:t.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=v.extend({},t),e.initialSeries=v.clone(t.series),e.lastXAxis=v.clone(e.initialConfig.xaxis),e.lastYAxis=v.clone(e.initialConfig.yaxis),e}}]),t}(),Gi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(){var t=new Wi(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new Bi).init(t)}}}]),t}(),ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return s(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,a=parseInt(e.globals.gridWidth,10),s=parseInt(e.globals.gridHeight,10),r=a>s?a:s,n=t.image,o=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=r+1,l=r):(o=t.width,l=t.height);var h=document.createElementNS(e.globals.SVGNS,"pattern");Mi.setAttrs(h,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var c=document.createElementNS(e.globals.SVGNS,"image");h.appendChild(c),c.setAttributeNS(window.SVG.xlink,"href",n),Mi.setAttrs(c,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),c.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(h)}},{key:"getSeriesIndex",value:function(t){var e=this.w,i=e.config.chart.type;return("bar"===i||"rangeBar"===i)&&e.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var i,a=this.w,s=null,n=null,o=r(t);try{for(o.s();!(i=o.n()).done;){var l=i.value;l>=e.threshold?(null===s||l>s)&&(s=l):(null===n||l-1?x=v.getOpacityFromRGBA(c):m=v.hexToRgba(v.rgb2hex(c),x),t.opacity&&(x=t.opacity),"pattern"===p&&(n=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:n,fillColor:c,fillOpacity:x,defaultColor:m})),b){var y=f(l.fill.gradient.colorStops)||[],w=l.fill.gradient.type;h&&(y[this.seriesIndex]=this.computeColorStops(s.globals.series[this.seriesIndex],l.plotOptions.line.colors),w="vertical"),o=this.handleGradientFill({type:w,fillConfig:t.fillConfig,fillColor:c,fillOpacity:x,colorStops:y,i:this.seriesIndex})}if("image"===p){var k=l.fill.image.src,A=t.patternID?t.patternID:"",C="pattern".concat(s.globals.cuid).concat(t.seriesNumber+1).concat(A);-1===this.patternIDs.indexOf(C)&&(this.clippedImgArea({opacity:x,image:Array.isArray(k)?t.seriesNumber-1&&(p=v.getOpacityFromRGBA(g));var f=void 0===o.gradient.opacityTo?a:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[n]:o.gradient.opacityTo;if(void 0===o.gradient.gradientToColors||0===o.gradient.gradientToColors.length)d="dark"===o.gradient.shade?c.shadeColor(-1*parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i):c.shadeColor(parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i);else if(o.gradient.gradientToColors[l.seriesNumber]){var x=o.gradient.gradientToColors[l.seriesNumber];d=x,x.indexOf("rgba")>-1&&(f=v.getOpacityFromRGBA(x))}else d=i;if(o.gradient.gradientFrom&&(g=o.gradient.gradientFrom),o.gradient.gradientTo&&(d=o.gradient.gradientTo),o.gradient.inverseColors){var b=g;g=d,d=b}return g.indexOf("rgb")>-1&&(g=v.rgb2hex(g)),d.indexOf("rgb")>-1&&(d=v.rgb2hex(d)),h.drawGradient(e,g,d,p,f,l.size,o.gradient.stops,r,n)}}]),t}(),Vi=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],r=this.w,n=e,o=t,l=null,h=new Mi(this.ctx),c=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(o.x))for(var d=0;d0:r.config.markers.size>0)||s||c){p||(f+=" w".concat(v.randomId()));var x=this.getMarkerConfig({cssClass:f,seriesIndex:e,dataPointIndex:g});if(r.config.series[n].data[g]&&(r.config.series[n].data[g].fillColor&&(x.pointFillColor=r.config.series[n].data[g].fillColor),r.config.series[n].data[g].strokeColor&&(x.pointStrokeColor=r.config.series[n].data[g].strokeColor)),void 0!==a&&(x.pSize=a),(o.x[d]<-r.globals.markers.largestSize||o.x[d]>r.globals.gridWidth+r.globals.markers.largestSize||o.y[d]<-r.globals.markers.largestSize||o.y[d]>r.globals.gridHeight+r.globals.markers.largestSize)&&(x.pSize=0),!p)(r.globals.markers.size[e]>0||s||c)&&!l&&(l=h.group({class:s||c?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),(u=h.drawMarker(o.x[d],o.y[d],x)).attr("rel",g),u.attr("j",g),u.attr("index",e),u.node.setAttribute("default-marker-size",x.pSize),new Li(this.ctx).setSelectionFilter(u,e,g),this.addEvents(u),l&&l.add(u)}else void 0===r.globals.pointsArray[e]&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([o.x[d],o.y[d]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,i=t.seriesIndex,a=t.dataPointIndex,s=void 0===a?null:a,r=t.radius,n=void 0===r?null:r,o=t.size,l=void 0===o?null:o,h=t.strokeWidth,c=void 0===h?null:h,d=this.w,u=this.getMarkerStyle(i),g=null===l?d.globals.markers.size[i]:l,p=d.config.markers;return null!==s&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===i&&t.dataPointIndex===s&&(u.pointStrokeColor=t.strokeColor,u.pointFillColor=t.fillColor,g=t.size,u.pointShape=t.shape)})),{pSize:null===n?g:n,pRadius:null!==n?n:p.radius,pointStrokeWidth:null!==c?c:Array.isArray(p.strokeWidth)?p.strokeWidth[i]:p.strokeWidth,pointStrokeColor:u.pointStrokeColor,pointFillColor:u.pointFillColor,shape:u.pointShape||(Array.isArray(p.shape)?p.shape[i]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[i]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[i]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[i]:p.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(t){var e=this.w,i=new Mi(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,a=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[t]:a,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),Ui=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return s(t,[{key:"draw",value:function(t,e,i){var a=this.w,s=new Mi(this.ctx),r=i.realIndex,n=i.pointsPos,o=i.zRatio,l=i.elParent,h=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(h.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(n.x))for(var c=0;cp.maxBubbleRadius&&(g=p.maxBubbleRadius)}var f=n.x[c],x=n.y[c];if(g=g||0,null!==x&&void 0!==a.globals.series[r][d]||(u=!1),u){var b=this.drawPoint(f,x,g,r,d,e);h.add(b)}l.add(h)}}},{key:"drawPoint",value:function(t,e,i,a,s,r){var n=this.w,o=a,l=new y(this.ctx),h=new Li(this.ctx),c=new ji(this.ctx),d=new Vi(this.ctx),u=new Mi(this.ctx),g=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:s,radius:"bubble"===n.config.chart.type||n.globals.comboCharts&&n.config.series[a]&&"bubble"===n.config.series[a].type?i:null}),p=c.fillPath({seriesNumber:a,dataPointIndex:s,color:g.pointFillColor,patternUnits:"objectBoundingBox",value:n.globals.series[a][r]}),f=u.drawMarker(t,e,g);if(n.config.series[o].data[s]&&n.config.series[o].data[s].fillColor&&(p=n.config.series[o].data[s].fillColor),f.attr({fill:p}),n.config.chart.dropShadow.enabled){var x=n.config.chart.dropShadow;h.dropShadow(f,x,a)}if(!this.initialAnim||n.globals.dataChanged||n.globals.resized)n.globals.animationEnded=!0;else{var b=n.config.chart.animations.speed;l.animateMarker(f,b,n.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(f)}),100)}))}return f.attr({rel:s,j:s,index:a,"default-marker-size":g.pSize}),h.setSelectionFilter(f,a,s),d.addEvents(f),f.node.classList.add("apexcharts-marker"),f}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}]),t}(),qi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"dataLabelsCorrection",value:function(t,e,i,a,s,r,n){var o=this.w,l=!1,h=new Mi(this.ctx).getTextRects(i,n),c=h.width,d=h.height;e<0&&(e=0),e>o.globals.gridHeight+d&&(e=o.globals.gridHeight+d/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:t,y:e,width:c,height:d});var u=o.globals.dataLabelsRects[a].length-2,g=void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(void 0!==o.globals.dataLabelsRects[a][u]){var p=o.globals.dataLabelsRects[a][g];(t>p.x+p.width||e>p.y+p.height||e+de.globals.gridWidth+b.textRects.width+30)&&(o="");var m=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(m=e.globals.dataLabels.style.colors[n]),"function"==typeof m&&(m=m({series:e.globals.series,seriesIndex:r,dataPointIndex:n,w:e})),u&&(m=u);var v=d.offsetX,y=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(v=0,y=0),e.globals.isSlopeChart&&(0!==n&&(v=-2*d.offsetX+5),0!==n&&n!==e.config.series[r].data.length-1&&(v=0)),b.drawnextLabel){if((x=i.drawText({width:100,height:parseInt(d.style.fontSize,10),x:a+v,y:s+y,foreColor:m,textAnchor:l||d.textAnchor,text:o,fontSize:h||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"})).attr({class:f||"apexcharts-datalabel",cx:a,cy:s}),d.dropShadow.enabled){var w=d.dropShadow;new Li(this.ctx).dropShadow(x,w)}c.add(x),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(n)}return x}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,a=i.config.dataLabels.background,s=a.padding,r=a.padding/2,n=e.width,o=e.height,l=new Mi(this.ctx).drawRect(e.x-s,e.y-r/2,n+2*s,o+r,a.borderRadius,"transparent"!==i.config.chart.background&&i.config.chart.background?i.config.chart.background:"#fff",a.opacity,a.borderWidth,a.borderColor);a.dropShadow.enabled&&new Li(this.ctx).dropShadow(l,a.dropShadow);return l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,s=v.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,t&&(e&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i-1&&(t[i].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,i=this.getSeriesByName(t),a=parseInt(null==i?void 0:i.getAttribute("data:realIndex"),10),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),r=null,n=null,o=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){r=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),n=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']"));var l=e.globals.seriesYAxisReverseMap[a];o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']"));else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var h=0;h=t.from&&(r0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1)for(var s=i.config.series.map((function(t,a){return t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(a)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(i.config.series[a].type)>-1)?a:-1})),r="asc"===t?0:s.length-1;"asc"===t?r=0;"asc"===t?r++:r--)if(-1!==s[r]){a=s[r];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,a){for(var s=e[i].childNodes,r={type:a,paths:[],realIndex:e[i].getAttribute("data:realIndex")},n=0;n0)for(var a=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),a=[],s=function(t){var e=function(e){return i[t].getAttribute(e)},s={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};a.push({rect:s,color:i[t].getAttribute("color")})},r=0;r0?t:[]}));return t}}]),t}(),$i=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,a=this.w.globals,s="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,r=0;r=5?this.twoDSeries.push(v.parseNumber(t[e].data[r][4])):this.twoDSeries.push(v.parseNumber(t[e].data[r][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var n=new Date(t[e].data[r][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(t[e].data[r][0]);for(var o=0;o-1&&(r=this.activeSeriesIndex);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,r=new zi(i),n=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isRangeBar="rangeBar"===a.chart.type&&s.isBarHorizontal,s.hasXaxisGroups="category"===a.xaxis.type&&a.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=a.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?s.seriesNames.push(t.name):s.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var o=[],l=f(new Set(a.series.map((function(t){return t.group}))));a.series.forEach((function(t,e){var i=l.indexOf(t.group);o[i]||(o[i]=[]),o[i].push(s.seriesNames[e])})),s.seriesGroups=o;for(var h=function(){for(var t=0;t0&&(this.twoDSeriesX=n,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var d=t[c].data.map((function(t){return v.parseNumber(t)}));s.series.push(d)}s.seriesZ.push(this.threeDSeries),void 0!==t[c].color?s.seriesColors.push(t[c].color):s.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var a=0;a0)i.labels=e.xaxis.categories;else if(e.labels.length>0)i.labels=e.labels.slice();else if(this.fallbackToCategory){if(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric)new Ni(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t)}else this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,a=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var s=i.series.map((function(t,e){return t.data.filter((function(t,e,i){return i.findIndex((function(e){return e.x===t.x}))===e}))})),r=s.reduce((function(t,e,i,a){return a[t].length>e.length?t:i}),0),n=0;n0&&s==i.length&&e.push(a)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}]),t}(),Ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),a=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",a*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"getSvgString",value:function(){var t=this;return new Promise((function(e){var i=t.w,a=i.config.chart.toolbar.export.width,s=i.config.chart.toolbar.export.scale||a/i.globals.svgWidth;s||(s=1);var r=t.w.globals.dom.Paper.svg(),n=t.w.globals.dom.Paper.node.cloneNode(!0);1!==s&&t.scaleSvgNode(n,s),t.convertImagesToBase64(n).then((function(){r=(new XMLSerializer).serializeToString(n),e(r.replace(/ /g," "))}))}))}},{key:"convertImagesToBase64",value:function(t){var e=this,i=t.getElementsByTagName("image"),a=Array.from(i).map((function(t){var i=t.getAttributeNS("http://www.w3.org/1999/xlink","href");return i&&!i.startsWith("data:")?e.getBase64FromUrl(i).then((function(e){t.setAttributeNS("http://www.w3.org/1999/xlink","href",e)})).catch((function(t){console.error("Error converting image to base64:",t)})):Promise.resolve()}));return Promise.all(a)}},{key:"getBase64FromUrl",value:function(t){return new Promise((function(e,i){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var t=document.createElement("canvas");t.width=a.width,t.height=a.height,t.getContext("2d").drawImage(a,0,0),e(t.toDataURL())},a.onerror=i,a.src=t}))}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var t=this;return new Promise((function(e){t.cleanup(),t.getSvgString().then((function(t){var i=new Blob([t],{type:"image/svg+xml;charset=utf-8"});e(URL.createObjectURL(i))}))}))}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var a=e.w,s=t?t.scale||t.width/a.globals.svgWidth:1;e.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*s,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var n="transparent"!==a.config.chart.background&&a.config.chart.background?a.config.chart.background:"#fff",o=r.getContext("2d");o.fillStyle=n,o.fillRect(0,0,r.width*s,r.height*s),e.getSvgString().then((function(t){var e="data:image/svg+xml,"+encodeURIComponent(t),a=new Image;a.crossOrigin="anonymous",a.onload=function(){if(o.drawImage(a,0,0),r.msToBlob){var t=r.msToBlob();i({blob:t})}else{var e=r.toDataURL("image/png");i({imgURI:e})}},a.src=e}))}))}},{key:"exportToSVG",value:function(){var t=this;this.svgUrl().then((function(e){t.triggerDownload(e,t.w.config.chart.toolbar.export.svg.filename,".svg")}))}},{key:"exportToPng",value:function(){var t=this,e=this.w.config.chart.toolbar.export.scale,i=this.w.config.chart.toolbar.export.width,a=e?{scale:e}:i?{width:i}:void 0;this.dataURI(a).then((function(e){var i=e.imgURI,a=e.blob;a?navigator.msSaveOrOpenBlob(a,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,a=t.fileName,s=t.columnDelimiter,r=void 0===s?",":s,n=t.lineDelimiter,o=void 0===n?"\n":n,l=this.w;i||(i=l.config.series);var h=[],c=[],d="",u=l.globals.series.map((function(t,e){return-1===l.globals.collapsedSeriesIndices.indexOf(e)?t:[]})),g=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.categoryFormatter?l.config.chart.toolbar.export.csv.categoryFormatter(t):"datetime"===l.config.xaxis.type&&String(t).length>=10?new Date(t).toDateString():v.isNumber(t)?t:t.split(r).join("")},p=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},x=Math.max.apply(Math,f(i.map((function(t){return t.data?t.data.length:0})))),b=new $i(this.ctx),m=new Ri(this.ctx),y=function(t){var i="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var a=l.globals.yLabelFormatters[0],s=new Zi(e.ctx).getActiveConfigSeriesIndex();i=a(l.globals.labels[t],{seriesIndex:s,dataPointIndex:t,w:l})}else i=m.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?i=l.config.xaxis.categories[t]:l.config.labels.length&&(i=l.config.labels[t]))}else i=l.config.labels[t];return null===i?"nullvalue":(Array.isArray(i)&&(i=i.join(" ")),v.isNumber(i)?i:i.split(r).join(""))},w=function(t,e){if(h.length&&0===e&&c.push(h.join(r)),t.data){t.data=t.data.length&&t.data||f(Array(x)).map((function(){return""}));for(var a=0;a0&&!s.globals.isBarHorizontal&&(this.xaxisLabels=s.globals.timescaleLabels.slice()),s.config.xaxis.overwriteCategories&&(this.xaxisLabels=s.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===s.config.xaxis.position?this.offY=0:this.offY=s.globals.gridHeight,this.offY=this.offY+s.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.xaxisBorderWidth=s.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=s.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=s.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=s.config.xaxis.axisBorder.height,this.yaxis=s.config.yaxis[0]}return s(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new Mi(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});i.add(a);for(var s=[],r=0;r6&&void 0!==arguments[6]?arguments[6]:{},h=[],c=[],d=this.w,u=l.xaxisFontSize||this.xaxisFontSize,g=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,f=l.fontWeight||d.config.xaxis.labels.style.fontWeight,x=l.cssClass||d.config.xaxis.labels.style.cssClass,b=d.globals.padHorizontal,m=a.length,v="category"===d.config.xaxis.type?d.globals.dataPoints:m;if(0===v&&m>v&&(v=m),s){var y=v>1?v-1:v;n=d.globals.gridWidth/Math.min(y,m-1),b=b+r(0,n)/2+d.config.xaxis.labels.offsetX}else n=d.globals.gridWidth/v,b=b+r(0,n)+d.config.xaxis.labels.offsetX;for(var w=function(s){var l=b-r(s,n)/2+d.config.xaxis.labels.offsetX;0===s&&1===m&&n/2===b&&1===v&&(l=d.globals.gridWidth/2);var y=o.axesUtils.getLabel(a,d.globals.timescaleLabels,l,s,h,u,t),w=28;d.globals.rotateXLabels&&t&&(w=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(w+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(u)+(d.globals.xAxisLabelsHeight-d.globals.xAxisGroupLabelsHeight)+(d.globals.rotateXLabels?10:0)),y=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(s,y,m):o.axesUtils.checkForOverflowingLabels(s,y,m,h,c);if(d.config.xaxis.labels.show){var k=e.drawText({x:y.x,y:o.offY+d.config.xaxis.labels.offsetY+w-("top"===d.config.xaxis.position?d.globals.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:"middle",fontWeight:y.isBold?600:f,fontSize:u,fontFamily:g,foreColor:Array.isArray(p)?t&&d.config.xaxis.convertedCatToNumeric?p[d.globals.minX+s-1]:p[s]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(i.add(k),k.on("click",(function(t){if("function"==typeof d.config.chart.events.xAxisLabelClick){var e=Object.assign({},d,{labelIndex:s});d.config.chart.events.xAxisLabelClick(t,o.ctx,e)}})),t){var A=document.createElementNS(d.globals.SVGNS,"title");A.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,k.node.appendChild(A),""!==y.text&&(h.push(y.text),c.push(y))}}sa.globals.gridWidth)){var r=this.offY+a.config.xaxis.axisTicks.offsetY;if(e=e+r+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(e=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new Mi(this.ctx).drawLine(t+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,s+a.config.xaxis.axisTicks.offsetX,e+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var s=0;s0){var h=s[s.length-1].getBBox(),c=s[0].getBBox();h.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),c.x+c.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var d=0;d0&&(this.xaxisLabels=a.globals.timescaleLabels.slice())}return s(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new Mi(this.ctx);t||(t=i.group({class:"apexcharts-grid"}));var a=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),s=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(s),t.add(a),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new Mi(this.ctx),a=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,f(t.config.stroke.width)):t.config.stroke.width,s=function(t){var i=document.createElementNS(e.SVGNS,"clipPath");return i.setAttribute("id",t),i};e.dom.elGridRectMask=s("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=s("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=s("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=s("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=s("nonForecastMask".concat(e.cuid));var r=0,n=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),n=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=i.drawRect(-a/2-r-2,-a/2-2,e.gridWidth+a+n+r+4,e.gridHeight+a+4,0,"#fff");var o=t.globals.markers.largestSize;e.dom.elGridRectMarker=i.drawRect(-o,-o,e.gridWidth+2*o,e.gridHeight+2*o,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,a=t.y1,s=t.x2,r=t.y2,n=t.xCount,o=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===n-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:i,y1:a,x2:s,y2:r,xCount:n,parent:o});var h=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var c=l.globals.groups;if(c){for(var d=0,u=0;d0&&"datetime"!==t.config.xaxis.type&&(s=e.yAxisScale[a].result.length-1);this._drawXYLines({xCount:s,tickAmount:r})}else s=r,r=e.xTickAmount,this._drawInvertedXYLines({xCount:s,tickAmount:r});return this.drawGridBands(s,r),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/s}}},{key:"drawGridBands",value:function(t,e){var i,a,s=this,r=this.w;if((null===(i=r.config.grid.row.colors)||void 0===i?void 0:i.length)>0&&function(t,i,a,n,o,l){for(var h=0,c=0;h=r.config.grid[t].colors.length&&(c=0),s._drawGridBandRect({c:c,x1:a,y1:n,x2:o,y2:l,type:t}),n+=r.globals.gridHeight/e}("row",e,0,0,r.globals.gridWidth,r.globals.gridHeight/e),(null===(a=r.config.grid.column.colors)||void 0===a?void 0:a.length)>0){var n=r.globals.isBarHorizontal||"on"!==r.config.xaxis.tickPlacement||"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric?t:t-1;r.globals.isXNumeric&&(n=r.globals.xAxisScale.result.length-1);for(var o=r.globals.padHorizontal,l=r.globals.padHorizontal+r.globals.gridWidth/n,h=r.globals.gridHeight,c=0,d=0;c=r.config.grid.column.colors.length&&(d=0),"datetime"===r.config.xaxis.type)o=this.xaxisLabels[c].position,l=((null===(u=this.xaxisLabels[c+1])||void 0===u?void 0:u.position)||r.globals.gridWidth)-this.xaxisLabels[c].position;this._drawGridBandRect({c:d,x1:o,y1:0,x2:l,y2:h,type:"column"}),o+=r.globals.gridWidth/n}}}}]),t}(),ta=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"niceScale",value:function(t,e){var i,a,s,r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=1e-11,l=this.w,h=l.globals;h.isBarHorizontal?(i=l.config.xaxis,a=Math.max((h.svgWidth-100)/25,2)):(i=l.config.yaxis[n],a=Math.max((h.svgHeight-100)/15,2)),v.isNumber(a)||(a=10),s=void 0!==i.min&&null!==i.min,r=void 0!==i.max&&null!==i.min;var c=void 0!==i.stepSize&&null!==i.stepSize,d=void 0!==i.tickAmount&&null!==i.tickAmount,u=d?i.tickAmount:h.niceScaleDefaultTicks[Math.min(Math.round(a/2),h.niceScaleDefaultTicks.length-1)];if(h.isMultipleYAxis&&!d&&h.multiAxisTickAmount>0&&(u=h.multiAxisTickAmount,d=!0),u="dataPoints"===u?h.dataPoints-1:Math.abs(Math.round(u)),(t===Number.MIN_VALUE&&0===e||!v.isNumber(t)&&!v.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=v.isNumber(i.min)?i.min:0,e=v.isNumber(i.max)?i.max:t+u,h.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var g=e;e=t,t=g}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var p=[];u<1&&(u=1);var f=u,x=Math.abs(e-t);!s&&t>0&&t/x<.15&&(t=0,s=!0),!r&&e<0&&-e/x<.15&&(e=0,r=!0);var b=(x=Math.abs(e-t))/f,m=b,y=Math.floor(Math.log10(m)),w=Math.pow(10,y),k=Math.ceil(m/w);if(b=m=(k=h.niceScaleAllowedMagMsd[0===h.yValueDecimal?0:1][k])*w,h.isBarHorizontal&&i.stepSize&&"datetime"!==i.type?(b=i.stepSize,c=!0):c&&(b=i.stepSize),c&&i.forceNiceScale){var A=Math.floor(Math.log10(b));b*=Math.pow(10,y-A)}if(s&&r){var C=x/f;if(d)if(c)if(0!=v.mod(x,b)){var S=v.getGCD(b,C);b=C/S<10?S:C}else 0==v.mod(b,C)?b=C:(C=b,d=!1);else b=C;else if(c)0==v.mod(x,b)?C=b:b=C;else if(0==v.mod(x,b))C=b;else{C=x/(f=Math.ceil(x/b));var L=v.getGCD(x,b);x/La&&(t=e-b*u,t+=b*Math.floor((M-t)/b))}else if(s)if(d)e=t+b*f;else{var P=e;e=b*Math.ceil(e/b),Math.abs(e-t)/v.getGCD(x,b)>a&&(e=t+b*u,e+=b*Math.ceil((P-e)/b))}}else if(h.isMultipleYAxis&&d){var I=b*Math.floor(t/b),T=I+b*f;T0&&t16&&v.getPrimeFactors(f).length<2&&f++,!d&&i.forceNiceScale&&0===h.yValueDecimal&&f>x&&(f=x,b=Math.round(x/f)),f>a&&(!d&&!c||i.forceNiceScale)){var z=v.getPrimeFactors(f),X=z.length-1,R=f;t:for(var E=0;EN);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,r=Math.abs(e-t),n=[];if(t===e)return{result:n=[t],niceMin:n[0],niceMax:n[n.length-1]};"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,r))&&(i=this.w.globals.dataPoints-1),s||(s=r/i),s=Math.round(10*(s+Number.EPSILON))/10,i===Number.MAX_VALUE&&(i=5,s=1);for(var o=t;i>=0;)n.push(o),o=v.preciseAddition(o,s),i-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,i){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));for(var a=[],s=Math.ceil(Math.log(e)/Math.log(i)+1),r=Math.floor(Math.log(t)/Math.log(i));r5?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase):this.logarithmicScale(e,i,r.logBase)):i!==-Number.MAX_VALUE&&v.isNumber(i)&&e!==Number.MAX_VALUE&&v.isNumber(e)?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.niceScale(e,i,t)):a.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var i=this.w,a=i.globals,s=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&v.isNumber(e)){var r=a.xTickAmount+1;s<10&&s>1&&(r=s),a.xAxisScale=this.linearScale(t,e,r,0,i.config.xaxis.stepSize)}else a.xAxisScale=this.linearScale(0,10,10);return a.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,i=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var a=i.seriesYAxisMap,s=i.minYArr,r=i.maxYArr;i.allSeriesCollapsed=!0,i.barGroups=[],a.forEach((function(a,n){var o=[];a.forEach((function(t){var i=e.series[t].group;o.indexOf(i)<0&&o.push(i)})),a.length>0?function(){var l,h,c=Number.MAX_VALUE,d=-Number.MAX_VALUE,u=c,g=d;if(e.chart.stacked)!function(){var t=new Array(i.dataPoints).fill(0),s=[],r=[],p=[];o.forEach((function(){s.push(t.map((function(){return Number.MIN_VALUE}))),r.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var f=function(t){!l&&e.series[a[t]].type&&(l=e.series[a[t]].type);var c=a[t];h=e.series[c].group?e.series[c].group:"axis-".concat(n),!(i.collapsedSeriesIndices.indexOf(c)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(c)<0)||(i.allSeriesCollapsed=!1,o.forEach((function(t,a){if(e.series[c].group===t)for(var n=0;n=0?r[a][n]+=o:p[a][n]+=o,s[a][n]+=o,u=Math.min(u,o),g=Math.max(g,o)}}))),"bar"!==l&&"column"!==l||i.barGroups.push(h)},x=0;x1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w.config,r=this.w.globals,n=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=t+1);var l=r.series,h=l,c=l;"candlestick"===s.chart.type?(h=r.seriesCandleL,c=r.seriesCandleH):"boxPlot"===s.chart.type?(h=r.seriesCandleO,c=r.seriesCandleC):r.isRangeData&&(h=r.seriesRangeStart,c=r.seriesRangeEnd);var d=!1;if(r.seriesX.length>=a){var u,g=null===(u=r.brushSource)||void 0===u?void 0:u.w.config.chart.brush;(s.chart.zoom.enabled&&s.chart.zoom.autoScaleYaxis||null!=g&&g.enabled&&null!=g&&g.autoScaleYaxis)&&(d=!0)}for(var p=t;px&&r.seriesX[p][b]>s.xaxis.max;b--);}for(var m=x;m<=b&&mh[p][m]&&h[p][m]<0&&(o=h[p][m])}else r.hasNullValues=!0}"bar"!==f&&"column"!==f||(o<0&&n<0&&(n=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,e=Math.min(e,0)))}return"rangeBar"===s.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&(o=e),"bar"===s.chart.type&&(o<0&&n<0&&(n=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:n,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i,a=Number.MAX_VALUE;if(t.isMultipleYAxis){a=Number.MAX_VALUE;for(var s=0;st.dataPoints&&0!==t.dataPoints&&(a=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(a=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var s=t.maxX-t.minX;s<30&&(a=s-1)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var r=[],n=t.minX-1;n0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,a-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var s=e-a[i-1];s>0&&(t.minXDiff=Math.min(s,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var i=e.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map((function(t){return t}))]);var a={},s={};i.forEach((function(i){a[i]=[],s[i]=[],t.w.config.series.map((function(t,a){return i.indexOf(e.seriesNames[a])>-1?a:null})).filter((function(t){return null!==t})).forEach((function(r){for(var n=0;n0?a[i][n]+=parseFloat(e.series[r][n])+1e-4:s[i][n]+=parseFloat(e.series[r][n]))}}))})),Object.entries(a).forEach((function(t){var i=p(t,1)[0];a[i].forEach((function(t,r){e.maxY=Math.max(e.maxY,a[i][r]),e.minY=Math.min(e.minY,s[i][r])}))}))}}}]),t}(),ia=function(){function t(e,a){i(this,t),this.ctx=e,this.elgrid=a,this.w=e.w;var s=this.w;this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.axisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xAxisoffX="bottom"===s.config.xaxis.position?s.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Ri(e)}return s(t,[{key:"drawYaxis",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.yaxis[t].labels.style,s=a.fontSize,r=a.fontFamily,n=a.fontWeight,o=i.group({class:"apexcharts-yaxis",rel:t,transform:"translate(".concat(e.globals.translateYAxisX[t],", 0)")});if(this.axesUtils.isYAxisHidden(t))return o;var l=i.group({class:"apexcharts-yaxis-texts-g"});o.add(l);var h=e.globals.yAxisScale[t].result.length-1,c=e.globals.gridHeight/h,d=e.globals.yLabelFormatters[t],u=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){var g=e.globals.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?g=0:"heatmap"===e.config.chart.type&&(g-=c/2),g+=parseInt(s,10)/3;for(var p=h;p>=0;p--){var f=d(u[p],p,e),x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(x*=-1);var b=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(a.colors,t),y=Array.isArray(m)?m[p]:m,w=v.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),k=i.drawText({x:x,y:g,text:w.includes(f)&&!e.config.yaxis[t].labels.showDuplicates?"":f,textAnchor:b,fontSize:s,fontFamily:r,fontWeight:n,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(a.cssClass)});l.add(k),this.addTooltip(k,f),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(i,k,firstLabel,e.config.yaxis[t].labels.rotate),g+=c}}return this.addYAxisTitle(i,o,t),this.addAxisBorder(i,o,t,h,c),o}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var i=document.createElementNS(this.w.globals.SVGNS,"title");i.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(i)}},{key:"rotateLabel",value:function(t,e,i,a){var s=t.rotateAroundCenter(i.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(a," ").concat(s.x," ").concat(r.y,")"))}},{key:"addYAxisTitle",value:function(t,e,i){var a=this.w;if(void 0!==a.config.yaxis[i].title.text){var s=t.group({class:"apexcharts-yaxis-title"}),r=a.config.yaxis[i].opposite?a.globals.translateYAxisX[i]:0,n=t.drawText({x:r,y:a.globals.gridHeight/2+a.globals.translateY+a.config.yaxis[i].title.offsetY,text:a.config.yaxis[i].title.text,textAnchor:"end",foreColor:a.config.yaxis[i].title.style.color,fontSize:a.config.yaxis[i].title.style.fontSize,fontWeight:a.config.yaxis[i].title.style.fontWeight,fontFamily:a.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(a.config.yaxis[i].title.style.cssClass)});s.add(n),e.add(s)}}},{key:"addAxisBorder",value:function(t,e,i,a,s){var r=this.w,n=r.config.yaxis[i].axisBorder,o=31+n.offsetX;if(r.config.yaxis[i].opposite&&(o=-31-n.offsetX),n.show){var l=t.drawLine(o,r.globals.translateY+n.offsetY-2,o,r.globals.gridHeight+r.globals.translateY+n.offsetY+2,n.color,0,n.width);e.add(l)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,a,n,r.config.yaxis[i].axisTicks,i,s,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});a.add(s);var r=e.globals.yAxisScale[t].result.length-1,n=e.globals.gridWidth/r+.1,o=n+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,h=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),c=e.globals.timescaleLabels;if(c.length>0&&(this.xaxisLabels=c.slice(),r=(h=c.slice()).length),e.config.xaxis.labels.show)for(var d=c.length?0:r;c.length?d=0;c.length?d++:d--){var u=l(h[d],d,e),g=e.globals.gridWidth+e.globals.padHorizontal-(o-n+e.config.xaxis.labels.offsetX);if(c.length){var p=this.axesUtils.getLabel(h,c,g,d,this.drawnLabels,this.xaxisFontSize);g=p.x,u=p.text,this.drawnLabels.push(p.text),0===d&&e.globals.skipFirstTimelinelabel&&(u=""),d===h.length-1&&e.globals.skipLastTimelinelabel&&(u="")}var f=i.drawText({x:g,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:u,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});s.add(f),f.tspan(u),this.addTooltip(f,u),o+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.xaxis.axisBorder;if(a.show){var s=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(s-=15);var r=i.drawLine(e.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new Mi(this.ctx);if(void 0!==e.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});a.add(s),t.add(a)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),r=s?s.getBoundingClientRect():{width:0,height:0},n=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),o=n?n.getBoundingClientRect():{width:0,height:0};if(n){var l=this.xPaddingForYAxisTitle(t,r,o,e);n.setAttribute("x",l.xPos-(e?10:0));var h=a.rotateAroundCenter(n);n.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(h.x," ").concat(h.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var s=this.w,r=0,n=10;return void 0===s.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(a?r=e.width+s.config.yaxis[t].title.offsetX+i.width/2+n/2:(r=-1*e.width+s.config.yaxis[t].title.offsetX+n/2+i.width/2,s.globals.isBarHorizontal&&(n=25,r=-1*e.width-s.config.yaxis[t].title.offsetX-n)),{xPos:r,padd:n})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,a=0,s=0,r=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach((function(o,l){var h=i.globals.ignoreYAxisIndexes.includes(l)||!o.show||o.floating||0===t[l].width,c=t[l].width+e[l].width;o.opposite?i.globals.isBarHorizontal?(s=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=s-o.labels.offsetX):(s=i.globals.gridWidth+i.globals.translateX+n,h||(n+=c+20),i.globals.translateYAxisX[l]=s-o.labels.offsetX+20):(a=i.globals.translateX-r,h||(r+=c+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;v.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,i){var a=t.config.yaxis[i];if(a&&!a.floating&&void 0!==a.labels.align){var s=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=v.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"))),n=s.getBoundingClientRect();r.forEach((function(t){t.setAttribute("text-anchor",a.labels.align)})),"left"!==a.labels.align||a.opposite?"center"===a.labels.align?s.setAttribute("transform","translate(".concat(n.width/2*(a.opposite?1:-1),", 0)")):"right"===a.labels.align&&a.opposite&&s.setAttribute("transform","translate(".concat(n.width,", 0)")):s.setAttribute("transform","translate(-".concat(n.width,", 0)"))}}))}}]),t}(),aa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.documentEvent=v.bind(this.documentEvent,this)}return s(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var a=i.globals.events[t].indexOf(e);-1!==a&&i.globals.events[t].splice(a,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var a=i.globals.events[t],s=a.length,r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=v.extend(Hi,i);this.w.globals.locale=a.options}}]),t}(),ra=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawAxis",value:function(t,e){var i,a,s=this,r=this.w.globals,n=this.w.config,o=new Qi(this.ctx,e),l=new ia(this.ctx,e);r.axisCharts&&"radar"!==t&&(r.isBarHorizontal?(a=l.drawYaxisInversed(0),i=o.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(a)):(i=o.drawXaxis(),r.dom.elGraphical.add(i),n.yaxis.map((function(t,e){if(-1===r.ignoreYAxisIndexes.indexOf(e)&&(a=l.drawYaxis(e),r.dom.Paper.add(a),"back"===s.w.config.grid.position)){var i=r.dom.Paper.children()[1];i.remove(),r.dom.Paper.add(i)}}))))}}]),t}(),na=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Li(this.ctx),a=t.config.xaxis.crosshairs.fill.gradient,s=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,n=a.colorFrom,o=a.colorTo,l=a.opacityFrom,h=a.opacityTo,c=a.stops,d=s.enabled,u=s.left,g=s.top,p=s.blur,f=s.color,x=s.opacity,b=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(b=e.drawGradient("vertical",n,o,l,h,null,c,null));var m=e.drawRect();1===t.config.xaxis.crosshairs.width&&(m=e.drawLine());var y=t.globals.gridHeight;(!v.isNumber(y)||y<0)&&(y=0);var w=t.config.xaxis.crosshairs.width;(!v.isNumber(w)||w<0)&&(w=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:w,height:y,fill:b,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),d&&(m=i.dropShadow(m,{left:u,top:g,blur:p,color:f,opacity:x})),t.globals.dom.elGraphical.add(m)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var s=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(s)}var r=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(r)}}]),t}(),oa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,a=i.config;if(0!==a.responsive.length){var s=a.responsive.slice();s.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var r=new Wi({}),n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=s[0].breakpoint,n=window.innerWidth>0?window.innerWidth:screen.width;if(n>a){var o=v.clone(i.globals.initialConfig);o.series=v.clone(i.config.series);var l=Pi.extendArrayProps(r,o,i);t=v.extend(l,t),t=v.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var h=0;h0&&"function"==typeof t[0]?(this.isColorFn=!0,i.config.series.map((function(a,s){var r=t[s]||t[0];return"function"==typeof r?r({value:i.globals.axisCharts?i.globals.series[s][0]||0:i.globals.series[s],seriesIndex:s,dataPointIndex:s,w:e.w}):r}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,i){t&&(e[i]=t)}))}},{key:"getMonochromeColors",value:function(t,e,i){var a=t.color,s=t.shadeIntensity,r=t.shadeTo,n=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,o=1/(n/s),l=0;return Array.from({length:n},(function(){var t="dark"===r?i.shadeColor(-1*l,a):i.shadeColor(l,a);return l+=o,t}))}},{key:"applyColorTypes",value:function(t,e){var i=this,a=this.w;t.forEach((function(t){a.globals[t].colors=void 0===a.config[t].colors?i.isColorFn?a.config.colors:e:a.config[t].colors.slice(),i.pushExtraColors(a.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=e||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),t.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,i=[];e.config.series.forEach((function(s,r){s.data.forEach((function(s,n){var o;o=e.globals.series[r][n],a=e.config.dataLabels.formatter(o,{ctx:t.dCtx.ctx,seriesIndex:r,dataPointIndex:n,w:e}),i.push(a)}))}));var a=v.getLargestStringFromArr(i),s=new Mi(this.dCtx.ctx),r=e.config.dataLabels.style,n=s.getTextRects(a,parseInt(r.fontSize),r.fontFamily);return{width:1.05*n.width,height:n.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var a=e.map((function(t,e){return Array.isArray(t)?t.length:1})),s=Math.max.apply(Math,f(a));i=e[a.indexOf(s)]}return i}}]),t}(),da=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();t={width:a.width,height:a.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var s=e.globals.xLabelFormatter,r=v.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);e.globals.isBarHorizontal&&(n=r=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var o=new Xi(this.dCtx.ctx),l=r;r=o.xLabelFormat(s,r,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),n=o.xLabelFormat(s,n,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(n=r="1");var h=new Mi(this.dCtx.ctx),c=h.getTextRects(r,e.config.xaxis.labels.style.fontSize),d=c;if(r!==n&&(d=h.getTextRects(n,e.config.xaxis.labels.style.fontSize)),(t={width:c.width>=d.width?c.width:d.width,height:c.height>=d.height?c.height:d.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return h.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};c=u(r),r!==n&&(d=u(n)),t.height=(c.height>d.height?c.height:d.height)/1.5,t.width=c.width>d.width?c.width:d.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var i,a=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,s=e.globals.groups.map((function(t){return t.title})),r=v.getLargestStringFromArr(s),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),o=new Mi(this.dCtx.ctx),l=o.getTextRects(r,a),h=l;return r!==n&&(h=o.getTextRects(n,a)),i={width:l.width>=h.width?l.width:h.width,height:l.height>=h.height?l.height:h.height},e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new Mi(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,i=a.height}return{width:e,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(t){return t.value})),a=i.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Mi(this.dCtx.ctx).getTextRects(a,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,a=i.globals,s=i.config,r=s.xaxis.type,n=t.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,o){s.yaxis.length>1&&function(t){return-1!==a.collapsedSeriesIndices.indexOf(t)}(o)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var o=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+n/1.75-e.dCtx.yAxisWidthRight,h=o.position-n/1.75+e.dCtx.yAxisWidthLeft,c="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>a.svgWidth-a.translateX-c&&(a.skipLastTimelinelabel=!0),h<-(t.show&&!t.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===r?e.dCtx.gridPad.right(null===(a=String(c(e,o)))||void 0===a?void 0:a.length)?t:e}),d),g=u=c(u,o);if(void 0!==u&&0!==u.length||(u=l.niceMax),e.globals.isBarHorizontal){a=0;var p=e.globals.labels.slice();u=v.getLargestStringFromArr(p),u=c(u,{seriesIndex:n,dataPointIndex:-1,w:e}),g=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,p)}var f=new Mi(t.dCtx.ctx),x="rotate(".concat(r.labels.rotate," 0 0)"),b=f.getTextRects(u,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1),m=b;u!==g&&(m=f.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1)),i.push({width:(h>m.width||h>b.width?h:m.width>b.width?m.width:b.width)+a,height:m.height>b.height?m.height:b.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,a){if(e.show&&void 0!==e.title.text){var s=new Mi(t.dCtx.ctx),r="rotate(".concat(e.title.rotate," 0 0)"),n=s.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);i.push({width:n.width,height:n.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,a=0,s=t.globals.yAxisScale.length>1?10:0,r=new Ri(this.dCtx.ctx),n=function(n,o){var l=t.config.yaxis[o].floating,h=0;n.width>0&&!l?(h=n.width+s,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(o)&&(h=h-n.width-s)):h=l||r.isYAxisHidden(o)?0:5,t.config.yaxis[o].opposite?a+=h:i+=h,e+=h};return t.globals.yLabelsCoords.map((function(t,e){n(t,e)})),t.globals.yTitleCoords.map((function(t,e){n(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,e}}]),t}(),ga=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w,i=e.config,a=e.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.series.length)return 0;var s=function(t){return["bar","rangeBar","candlestick","boxPlot"].includes(t)},r=i.chart.type,n=0,o=s(r)?i.series.length:1;a.comboBarCount>0&&(o=a.comboBarCount),a.collapsedSeries.forEach((function(t){s(t.type)&&(o-=1)})),i.chart.stacked&&(o=1);var l=s(r)||a.comboBarCount>0,h=Math.abs(a.initialMaxX-a.initialMinX);if(l&&a.isXNumeric&&!a.isBarHorizontal&&o>0&&0!==h){h<=3&&(h=a.dataPoints);var c=h/t,d=a.minXDiff&&a.minXDiff/c>0?a.minXDiff/c:0;d>t/2&&(d/=2),(n=d*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),a.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,a=this.dCtx.isSparkline||!i.axisCharts?0:10;["title","subtitle"].forEach((function(s){void 0!==e.config[s].text?a+=e.config[s].margin:a+=t.dCtx.isSparkline||!i.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||i.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight-=s.height+r.height+a,i.translateY+=s.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,a=new Ri(this.dCtx.ctx);i.config.yaxis.forEach((function(s,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||s.floating||a.isYAxisHidden(r)||(s.opposite&&(i.globals.translateX-=e[r].width+t[r].width+parseInt(s.labels.style.fontSize,10)/1.2+12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),pa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new ca(this),this.dimYAxis=new ua(this),this.dimXAxis=new da(this),this.dimGrid=new ga(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return s(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,i=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var a=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,f(e.config.stroke.width)):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var i=p(e,2),a=i[0],s=i[1];t.gridPad[a]=Math.max(s,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(a/2,this.gridPad.top),this.gridPad.bottom=Math.max(a/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var s=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*s,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:a[i].width,index:i}),e.globals.yTitleCoords.push({width:s[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o,n),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,h=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var c=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,h=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,h=0,c=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(r);var d=function(){i.translateX=l+t.datalabelsCoords.width,i.gridHeight=i.svgHeight-t.lgRect.height-h-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(c=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=c,d();break;case"top":i.translateY=this.lgRect.height+c,d();break;case"left":i.translateY=c,i.translateX=this.lgRect.width+l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":i.translateY=c,i.translateX=l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new ia(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,a=0;t.config.legend.show&&!t.config.legend.floating&&(a=20);var s="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[s].offsetY,n=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating){e.gridHeight=e.svgHeight;var o=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(o,e.gridHeight),e.translateY=r,void(e.translateX=n+(e.svgWidth-e.gridWidth)/2)}switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=r-10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+r+10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-a,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+this.lgRect.width+a;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-a-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,i){var a=this.w,s=a.globals.hasXaxisGroups?2:1,r=i.height+t.height+e.height,n=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,o=a.globals.rotateXLabels?22:10,l=a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0;this.xAxisHeight=r*n+s*o+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeightc&&(this.yAxisWidth=c)}}]),t}(),fa=function(){function t(e){i(this,t),this.w=e.w,this.lgCtx=e}return s(t,[{key:"getLegendStyles",value:function(){var t,e,i,a=document.createElement("style");a.setAttribute("type","text/css");var s=(null===(t=this.lgCtx.ctx)||void 0===t||null===(e=t.opts)||void 0===e||null===(i=e.chart)||void 0===i?void 0:i.nonce)||this.w.config.chart.nonce;s&&a.setAttribute("nonce",s);var r=document.createTextNode("\n .apexcharts-flip-y {\n transform: scaleY(-1) translateY(-100%);\n transform-origin: top;\n transform-box: fill-box;\n }\n .apexcharts-flip-x {\n transform: scaleX(-1);\n transform-origin: center;\n transform-box: fill-box;\n }\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-right: 1px;\n }\n\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }\n\n ");return a.appendChild(r),a}},{key:"getLegendDimensions",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(t,e){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var s=null,r=null;if(a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),r=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),r=parseInt(s.getAttribute("rel"),10)-1),e)[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,r)}));else this.hideSeries({seriesEl:s,realIndex:r})}else{var n=a.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(t+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=a.config.plotOptions.pie.donut.labels;new Mi(this.lgCtx.ctx).pathMouseDown(n,null),this.lgCtx.ctx.pie.printDataLabelsInner(n.node,l)}n.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(t){var e=t.realIndex,i=this.w,a=i.globals,s=v.clone(i.config.series);if(a.axisCharts){var r=i.config.yaxis[a.seriesYAxisReverseMap[e]],n={index:e,data:s[e].data.slice(),type:s[e].type||i.config.chart.type};if(r&&r.show&&r.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(e)<0&&(a.ancillaryCollapsedSeries.push(n),a.ancillaryCollapsedSeriesIndices.push(e));else if(a.collapsedSeriesIndices.indexOf(e)<0){a.collapsedSeries.push(n),a.collapsedSeriesIndices.push(e);var o=a.risingSeries.indexOf(e);a.risingSeries.splice(o,1)}}else a.collapsedSeries.push({index:e,data:s[e]}),a.collapsedSeriesIndices.push(e);return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.config.series.length,this._getSeriesBasedOnCollapsedState(s)}},{key:"hideSeries",value:function(t){for(var e=t.seriesEl,i=t.realIndex,a=this.w,s=this.getSeriesAfterCollapsing({realIndex:i}),r=e.childNodes,n=0;n0){for(var r=0;r1;if(this.legendHelpers.appendToForeignObject(),(a||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,i=t.fillcolor,a=this.w,s=document.createElement("span");s.classList.add("apexcharts-legend-marker");var r=a.config.legend.markers.shape||a.config.markers.shape,n=r;Array.isArray(r)&&(n=r[e]);var o=Array.isArray(a.config.legend.markers.size)?parseFloat(a.config.legend.markers.size[e]):parseFloat(a.config.legend.markers.size),l=Array.isArray(a.config.legend.markers.offsetX)?parseFloat(a.config.legend.markers.offsetX[e]):parseFloat(a.config.legend.markers.offsetX),h=Array.isArray(a.config.legend.markers.offsetY)?parseFloat(a.config.legend.markers.offsetY[e]):parseFloat(a.config.legend.markers.offsetY),c=Array.isArray(a.config.legend.markers.strokeWidth)?parseFloat(a.config.legend.markers.strokeWidth[e]):parseFloat(a.config.legend.markers.strokeWidth),d=s.style;if(d.height=2*(o+c)+"px",d.width=2*(o+c)+"px",d.left=l+"px",d.top=h+"px",a.config.legend.markers.customHTML)d.background="transparent",d.color=i[e],Array.isArray(a.config.legend.markers.customHTML)?a.config.legend.markers.customHTML[e]&&(s.innerHTML=a.config.legend.markers.customHTML[e]()):s.innerHTML=a.config.legend.markers.customHTML();else{var g=new Vi(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(n),seriesIndex:e,strokeWidth:c,size:o}),p=window.SVG().addTo(s).size("100%","100%"),f=new Mi(this.ctx).drawMarker(0,0,u(u({},g),{},{pointFillColor:Array.isArray(i)?i[e]:g.pointFillColor,shape:n}));a.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),p.add(f)}return s}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,a=e.globals.seriesNames,s=e.config.legend.markers.fillColors?e.config.legend.markers.fillColors.slice():e.globals.colors.slice();if("heatmap"===e.config.chart.type){var r=e.config.plotOptions.heatmap.colorScale.ranges;a=r.map((function(t){return t.name?t.name:t.from+" - "+t.to})),s=r.map((function(t){return t.color}))}else this.isBarsDistributed&&(a=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(a=e.config.legend.customLegendItems);for(var n=e.globals.legendFormatter,o=e.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var h,c=n(a[l],{seriesIndex:l,w:e}),d=!1,u=!1;if(e.globals.collapsedSeries.length>0)for(var g=0;g0)for(var p=0;p0?l-10:0)+(h>0?h-10:0)}a.style.position="absolute",r=r+t+i.config.legend.offsetX,n=n+e+i.config.legend.offsetY,a.style.left=r+"px",a.style.top=n+"px","right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px");["width","height"].forEach((function(t){a.style[t]&&(a.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new pa(this.ctx),i=e.dimHelpers.getTitleSubtitleCoords("title"),a=e.dimHelpers.getTitleSubtitleCoords("subtitle"),s=0;"top"===t.config.legend.position&&(s=i.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,s)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new Zi(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new Zi(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,a="true"===t.target.getAttribute("data:collapsed"),s=this.w.config.chart.events.legendClick;"function"==typeof s&&s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;"function"==typeof r&&t.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),t}(),ba=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=a.globals.minX,this.maxX=a.globals.maxX}return s(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=e.config.chart.toolbar.offsetY+"px",a.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s\n \n \n\n'),n("zoomOut",this.elZoomOut,'\n \n \n\n');var o=function(i){t.t[i]&&e.config.chart[i].enabled&&r.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'\n \n \n \n':'\n \n \n',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&e.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,'\n \n \n'),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;lthis.wheelDelay&&(this.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){a-i.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,i=this.w;this.minX=i.globals.isRangeBar?i.globals.minY:i.globals.minX,this.maxX=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;var a=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(a){var s,r,n,o=(t.clientX-a.left)/a.width,l=this.minX,h=this.maxX,c=h-l;if(t.deltaY<0){var d=l+o*c;r=d-(s=.5*c)/2,n=d+s/2}else r=l-(s=1.5*c)/2,n=h+s/2;if(!i.globals.isRangeBar){r=Math.max(r,i.globals.initialMinX),n=Math.min(n,i.globals.initialMaxX);var u=.01*(i.globals.initialMaxX-i.globals.initialMinX);if(n-r0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,i,a,s){return"l"===s||"r"===s?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resizing",this.selectionDragging.bind(this,"resizing")))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(u(u({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,a=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i;t.globals.isRangeBar&&(i=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,a=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var s={x:i,y:0,width:a,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(s),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,a=t.width,s=t.height,r=t.translateX,n=void 0===r?0:r,o=t.translateY,l=void 0===o?0:o,h=this.w,c=this.zoomRect,d=this.selectionRect;if(this.dragged||null!==h.globals.selection){var u={transform:"translate("+n+", "+l+")"};h.globals.zoomEnabled&&this.dragged&&(a<0&&(a=1),c.attr({x:e,y:i,width:a,height:s,fill:h.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":h.config.chart.zoom.zoomedArea.fill.opacity,stroke:h.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":h.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":h.config.chart.zoom.zoomedArea.stroke.opacity}),Mi.setAttrs(c.node,u)),h.globals.selectionEnabled&&(d.attr({x:e,y:i,width:a>0?a:0,height:s>0?s:0,fill:h.config.chart.selection.fill.color,"fill-opacity":h.config.chart.selection.fill.opacity,stroke:h.config.chart.selection.stroke.color,"stroke-width":h.config.chart.selection.stroke.width,"stroke-dasharray":h.config.chart.selection.stroke.dashArray,"stroke-opacity":h.config.chart.selection.stroke.opacity}),Mi.setAttrs(d.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.gridRect.getBoundingClientRect(),n=s.startX-1,o=s.startY,l=!1,h=!1,c=s.clientX-r.left-n,d=s.clientY-r.top-o,g={translateX:a.globals.translateX,translateY:a.globals.translateY};return Math.abs(c+n)>a.globals.gridWidth?c=a.globals.gridWidth-n:s.clientX-r.left<0&&(c=n),n>s.clientX-r.left&&(l=!0,c=Math.abs(c)),o>s.clientY-r.top&&(h=!0,d=Math.abs(d)),g=u(u({},g="x"===i?{x:l?n-c:n,y:0,width:c,height:a.globals.gridHeight}:"y"===i?{x:0,y:h?o-d:o,width:a.globals.gridWidth,height:d}:{x:l?n-c:n,y:h?o-d:o,width:c,height:d}),{},{translateX:a.globals.translateX,translateY:a.globals.translateY}),s.drawSelectionRect(g),s.selectionDragging("resizing"),g}},{key:"selectionDragging",value:function(t,e){var i=this,a=this.w;if(e){e.preventDefault();var s=e.detail,r=s.handler,n=s.box,o=n.x,l=n.y;othis.constraints.x2&&(o=this.constraints.x2-n.w),n.y2>this.constraints.y2&&(l=this.constraints.y2-n.h),r.move(o,l);var h=this.xyRatios,c=this.selectionRect,d=0;"resizing"===t&&(d=30);var u=function(t){return parseFloat(c.node.getAttribute(t))},g={x:u("x"),y:u("y"),width:u("width"),height:u("height")};a.globals.selection=g,"function"==typeof a.config.chart.events.selection&&a.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,s,r,n=i.gridRect.getBoundingClientRect(),o=c.node.getBoundingClientRect();a.globals.isRangeBar?(t=a.globals.yAxisScale[0].niceMin+(o.left-n.left)*h.invertedYRatio,e=a.globals.yAxisScale[0].niceMin+(o.right-n.left)*h.invertedYRatio,s=0,r=1):(t=a.globals.xAxisScale.niceMin+(o.left-n.left)*h.xRatio,e=a.globals.xAxisScale.niceMin+(o.right-n.left)*h.xRatio,s=a.globals.yAxisScale[0].niceMin+(n.bottom-o.bottom)*h.yRatio[0],r=a.globals.yAxisScale[0].niceMax-(o.top-n.top)*h.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:s,max:r}};a.config.chart.events.selection(i.ctx,l),a.config.chart.brush.enabled&&void 0!==a.config.chart.events.brushScrolled&&a.config.chart.events.brushScrolled(i.ctx,l)}),d))}}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.xyRatios,n=this.ctx.toolbar;if(s.startX>s.endX){var o=s.startX;s.startX=s.endX,s.endX=o}if(s.startY>s.endY){var l=s.startY;s.startY=s.endY,s.endY=l}var h=void 0,c=void 0;a.globals.isRangeBar?(h=a.globals.yAxisScale[0].niceMin+s.startX*r.invertedYRatio,c=a.globals.yAxisScale[0].niceMin+s.endX*r.invertedYRatio):(h=a.globals.xAxisScale.niceMin+s.startX*r.xRatio,c=a.globals.xAxisScale.niceMin+s.endX*r.xRatio);var d=[],u=[];if(a.config.yaxis.forEach((function(t,e){var i=a.globals.seriesYAxisMap[e][0];d.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.startY),u.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.endY)})),s.dragged&&(s.dragX>10||s.dragY>10)&&h!==c)if(a.globals.zoomEnabled){var g=v.clone(a.globals.initialConfig.yaxis),p=v.clone(a.globals.initialConfig.xaxis);if(a.globals.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),c=Math.floor(c),h<1&&(h=1,c=a.globals.dataPoints),c-h<2&&(c=h+1)),"xy"!==i&&"x"!==i||(p={min:h,max:c}),"xy"!==i&&"y"!==i||g.forEach((function(t,e){g[e].min=u[e],g[e].max=d[e]})),n){var f=n.getBeforeZoomRange(p,g);f&&(p=f.xaxis?f.xaxis:p,g=f.yaxis?f.yaxis:g)}var x={xaxis:p};a.config.chart.group||(x.yaxis=g),s.ctx.updateHelpers._updateOptions(x,!1,s.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&n.zoomCallback(p,g)}else if(a.globals.selectionEnabled){var b,m=null;b={min:h,max:c},"xy"!==i&&"y"!==i||(m=v.clone(a.config.yaxis)).forEach((function(t,e){m[e].min=u[e],m[e].max=d[e]})),a.globals.selection=s.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(s.ctx,{xaxis:b,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,a=e;if(void 0!==i.globals.lastClientPosition.x){var s=i.globals.lastClientPosition.x-a.clientX,r=i.globals.lastClientPosition.y-a.clientY;Math.abs(s)>Math.abs(r)&&s>0?this.moveDirection="left":Math.abs(s)>Math.abs(r)&&s<0?this.moveDirection="right":Math.abs(r)>Math.abs(s)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(s)&&r<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var n=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||a.panScrolled(n,o)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,a=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+a,i=t.globals.maxX+a):"right"===this.moveDirection&&(e=t.globals.minX-a,i=t.globals.maxX-a),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,a=this.xyRatios,s=v.clone(i.globals.initialConfig.yaxis),r=a.xRatio,n=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(r=a.invertedYRatio,n=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(t=n+i.globals.gridWidth/15*r,e=o+i.globals.gridWidth/15*r):"right"===this.moveDirection&&(t=n-i.globals.gridWidth/15*r,e=o-i.globals.gridWidth/15*r),i.globals.isRangeBar||(ti.globals.initialMaxX)&&(t=n,e=o);var l={xaxis:{min:t,max:e}};i.config.chart.group||(l.yaxis=s),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var a=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),a}(),va=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return s(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,a=t.clientX,s=t.clientY,r=this.w,n=i.getBoundingClientRect(),o=n.width,l=n.height,h=o/(r.globals.dataPoints-1),c=l/r.globals.dataPoints,d=this.hasBars();!r.globals.comboCharts&&!d||r.config.xaxis.convertedCatToNumeric||(h=o/r.globals.dataPoints);var u=a-n.left-r.globals.barPadForNumericAxis,g=s-n.top;u<0||g<0||u>o||g>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var p=Math.round(u/h),f=Math.floor(g/c);d&&!r.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(u/h),p-=1);var x=null,b=null,m=r.globals.seriesXvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))})),y=r.globals.seriesYvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))}));if(r.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),k=u*(w.width/o),A=g*(w.height/l);x=(b=this.closestInMultiArray(k,A,m,y)).index,p=b.j,null!==x&&(m=r.globals.seriesXvalues[x],p=(b=this.closestInArray(k,m)).index)}return r.globals.capturedSeriesIndex=null===x?-1:x,(!p||p<1)&&(p=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=f:r.globals.capturedDataPointIndex=p,{capturedSeries:x,j:r.globals.isBarHorizontal?f:p,hoverX:u,hoverY:g}}},{key:"closestInMultiArray",value:function(t,e,i,a){var s=this.w,r=0,n=null,o=-1;s.globals.series.length>1?r=this.getFirstActiveXArray(i):n=0;var l=i[r][0],h=Math.abs(t-l);if(i.forEach((function(e){e.forEach((function(e,i){var a=Math.abs(t-e);a<=h&&(h=a,o=i)}))})),-1!==o){var c=a[r][o],d=Math.abs(e-c);n=r,a.forEach((function(t,i){var a=Math.abs(e-t[o]);a<=d&&(d=a,n=i)}))}return{index:n,j:o}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,i=0,a=t.map((function(t,e){return t.length>0?e:-1})),s=0;s0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=f(t)).sort((function(t,e){var i=Number(t.getAttribute("data:realIndex")),a=Number(e.getAttribute("data:realIndex"));return ai?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var i=Number(t.getAttribute("cx")),a=Number(t.getAttribute("cy")),s=t.getAttribute("shape");return new Mi(this.ctx).getMarkerPath(i,a,s,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s ').concat(i.attrs.name,""),e+="
".concat(i.val,"
")})),m.innerHTML=t+"",v.innerHTML=e+""};n?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?y():(m.innerHTML="",v.innerHTML=""):y()}else m.innerHTML="",v.innerHTML="";null!==p&&(a[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:"");if(n&&f[0]){if(l.config.tooltip.hideEmptySeries){var w=a[e].querySelector(".apexcharts-tooltip-marker"),k=a[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(c)?(w.style.display="none",k.style.display="none"):(w.style.display="block",k.style.display="block")}null==c||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)?f[0].parentNode.style.display="none":f[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)&&(f[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var i=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));a&&(a.classList.add("apexcharts-active"),a.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",n="",o=null,l=null,h={series:a.globals.series,seriesIndex:e,dataPointIndex:i,w:a},c=a.globals.ttZFormatter;null===i?l=a.globals.series[e]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(r=s[e][i],0===s[e].length&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=new $i(this.ctx).isFormatXY()?void 0!==a.config.series[e].data[i]?a.config.series[e].data[i].x:"":void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var d=r;a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?r=new Xi(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(this.ctx).formatDate,w:this.w}):r=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](d,h):a.globals.xLabelFormatter(d,h);return void 0!==a.config.tooltip.x.formatter&&(r=a.globals.ttKeyFormatter(d,h)),a.globals.seriesZ.length>0&&a.globals.seriesZ[e].length>0&&(o=c(a.globals.seriesZ[e][i],a)),n="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(d,h):r,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,a=t.y1,s=t.y2,r=t.w,n=this.ttCtx.getElTooltip(),o=r.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]),n.innerHTML=o({ctx:this.ctx,series:r.globals.series,seriesIndex:e,dataPointIndex:i,y1:a,y2:s,w:r})}}]),t}(),wa=function(){function t(e){i(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return s(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=t-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(null!==e&&(r=a.globals.gridWidth/n*e),null===s||a.globals.isBarHorizontal||(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=r;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Mi.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Mi.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=e.globals.translateX;var s;s=new Mi(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=e.globals.translateY+a,r=i.yaxisTTEls[t].getBoundingClientRect().height,n=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(n-=26),s-=r/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=n+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),n=s.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(t)+o+5,h=parseFloat(e)+o/2;if(l>a.globals.gridWidth/2&&(l=l-n.ttWidth-o-10),l>a.globals.gridWidth-n.ttWidth-10&&(l=a.globals.gridWidth-n.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var c=s.getElGrid().getBoundingClientRect();(l=s.e.clientX-c.left)>a.globals.gridWidth/2&&(l-=s.tooltipRect.ttWidth),(h=s.e.clientY+a.globals.translateY-c.top)>a.globals.gridHeight/2&&(h-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+h>a.globals.gridHeight&&(h=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(l)||(l+=a.globals.translateX,r.style.left=l+"px",r.style.top=h+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),r=0;r0){var g=u.getAttribute("shape"),p=l.getMarkerPath(s,r,g,1.5*c);u.setAttribute("d",p)}this.moveXCrosshairs(s),o.fixedTooltip||this.moveTooltip(s,r,c)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,a=i.w,s=0,r=0,n=a.globals.pointsArray,o=new Zi(this.ctx),l=new Mi(this.ctx);e=o.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var h=i.tooltipUtil.getHoverMarkerSize(e);n[e]&&(s=n[e][t][0],r=n[e][t][1]);var c=i.tooltipUtil.getAllMarkers();if(null!==c)for(var d=0;d0){var b=l.getMarkerPath(s,g,f,h);c[d].setAttribute("d",b)}else c[d].setAttribute("d","")}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,r||a.globals.gridHeight,h)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(r=new Zi(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"']"));n||"number"!=typeof e||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var o=n?parseFloat(n.getAttribute("cx")):0,l=n?parseFloat(n.getAttribute("cy")):0,h=n?parseFloat(n.getAttribute("barWidth")):0,c=a.getElGrid().getBoundingClientRect(),d=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!d&&(o-=s%2!=0?h/2:0),n&&d&&i.globals.comboCharts&&(o-=h/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[t-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[t]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?l-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?l=a.e.clientY-c.top-a.tooltipRect.ttHeight/2:l+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(l=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,l||i.globals.gridHeight)}}]),t}(),ka=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new wa(e)}return s(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Vi(this.ctx),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=f(a),t.config.chart.stacked&&a.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w;"bubble"!==s.config.chart.type&&this.newPointSize(t,e);var r=e.getAttribute("cx"),n=e.getAttribute("cy");if(null!==i&&null!==a&&(r=i,n=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===s.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(r,n,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,a=this.ttCtx,s=t,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=e.config.markers.hover.size,o=0;o0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],i);t[e].setAttribute("d",a)}else t[e].setAttribute("d","M0,0")}}}]),t}(),Aa=function(){function t(e){i(this,t),this.w=e.w;var a=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!a.globals.isBarHorizontal&&"rangeBar"===a.config.chart.type&&a.config.plotOptions.bar.rangeBarGroupRows}return s(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,s=t.y,r=t.type,n=this.ttCtx,o=this.w;if(e.target.classList.contains("apexcharts-".concat(r,"-rect"))){var l=this.getAttr(e,"i"),h=this.getAttr(e,"j"),c=this.getAttr(e,"cx"),d=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),g=this.getAttr(e,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:h,shared:!1,e:e}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=h,a=c+n.tooltipRect.ttWidth/2+u,s=d+n.tooltipRect.ttHeight/2-g/2,n.tooltipPosition.moveXCrosshairs(c+u/2),a>o.globals.gridWidth/2&&(a=c-n.tooltipRect.ttWidth/2+u),n.w.config.tooltip.followCursor){var p=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-p.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),s=o.globals.clientY-p.top-(s>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=t.x,n=t.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var h=parseInt(s.paths.getAttribute("cx"),10),c=parseInt(s.paths.getAttribute("cy"),10),d=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),e=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=v.findAncestor(s.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,e,i),o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=i,r=h,n=c+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var g=l.getElGrid().getBoundingClientRect();n=l.e.clientY+o.globals.translateY-g.top}d<0&&(n=c),l.marker.enlargeCurrentPoint(i,s.paths,r,n)}return{x:r,y:n}}},{key:"handleBarTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=this.ttCtx,o=n.getElTooltip(),l=0,h=0,c=0,d=this.getBarTooltipXY({e:a,opt:s});if(null!==d.j||0!==d.barHeight||0!==d.barWidth){e=d.i;var u=d.j;if(r.globals.capturedSeriesIndex=e,r.globals.capturedDataPointIndex=u,r.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!r.config.tooltip.shared?(h=d.x,c=d.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[e]:r.config.stroke.width,l=h):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(c)&&(c=r.globals.svgHeight-n.tooltipRect.ttHeight),parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),h+n.tooltipRect.ttWidth>r.globals.gridWidth?h-=n.tooltipRect.ttWidth:h<0&&(h=0),n.w.config.tooltip.followCursor){var g=n.getElGrid().getBoundingClientRect();c=n.e.clientY-g.top}null===n.tooltip&&(n.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?n.tooltipPosition.moveXCrosshairs(l+i/2):n.tooltipPosition.moveXCrosshairs(l)),!n.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(c=c+r.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=h+r.globals.translateX+"px",o.style.top=c+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,i=t.e,a=t.opt,s=this.w,r=null,n=this.ttCtx,o=0,l=0,h=0,c=0,d=0,u=i.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){var g=i.target,p=g.getBoundingClientRect(),f=a.elGrid.getBoundingClientRect(),x=p.height;d=p.height;var b=p.width,m=parseInt(g.getAttribute("cx"),10),v=parseInt(g.getAttribute("cy"),10);c=parseFloat(g.getAttribute("barWidth"));var y="touchmove"===i.type?i.touches[0].clientX:i.clientX;r=parseInt(g.getAttribute("j"),10),o=parseInt(g.parentNode.getAttribute("rel"),10)-1;var w=g.getAttribute("data-range-y1"),k=g.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(g.parentNode.getAttribute("data:realIndex"),10));var A=function(t){return s.globals.isXNumeric?m-b/2:e.isVerticalGroupedRangeBar?m+b/2:m-n.dataPointsDividedWidth+b/2},C=function(){return v-n.dataPointsDividedHeight+x/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:r,y1:w?parseInt(w,10):null,y2:k?parseInt(k,10):null,shared:!n.showOnIntersect&&s.config.tooltip.shared,e:i}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(l=y-f.left+15,h=C()):(l=A(),h=i.clientY-f.top-n.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((l=m)0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var a=this.ttCtx,s=this.w,r=s.globals,n=r.seriesYAxisMap[t];if(a.yaxisTooltips[t]&&n.length>0){var o=r.yLabelFormatters[t],l=a.getElGrid().getBoundingClientRect(),h=n[0],c=0;i.yRatio.length>1&&(c=h);var d=(e-l.top)*i.yRatio[c],u=r.maxYArr[h]-r.minYArr[h],g=r.minYArr[h]+(u-d);s.config.yaxis[t].reversed&&(g=r.maxYArr[h]-(u-d)),a.tooltipPosition.moveYCrosshairs(e-l.top),a.yaxisTooltipText[t].innerHTML=o(g),a.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),Sa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.tConfig=a.config.tooltip,this.tooltipUtil=new va(this),this.tooltipLabels=new ya(this),this.tooltipPosition=new wa(this),this.marker=new ka(this),this.intersect=new Aa(this),this.axesTooltip=new Ca(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!a.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return s(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new Qi(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,a=[],s=this.getElTooltip(),r=function(r){var n=document.createElement("div");n.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(r)),n.style.order=i.config.tooltip.inverseOrder?t-r:r+1;var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[r],n.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var a=document.createElement("span");a.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(a),l.appendChild(e)})),n.appendChild(l),s.appendChild(n),a.push(n)},n=0;n0&&this.addPathsEventListeners(g,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(r=r+t.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+t.globals.svgHeight-s-10),e.style.left=r+"px",e.style.top=n+"px",{x:r,y:n,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,a=function(a){var s={paths:t[a],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[a].addEventListener(e,i.onSeriesHover.bind(i,s),{capture:!1,passive:!0})}))},s=0;s=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(t,e)}),20-a))}},{key:"seriesHover",value:function(t,e){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||0===s.globals.dataPoints)||(a.length?a.forEach((function(a){var s=i.getElTooltip(a),r={paths:t.paths,tooltipEl:s,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===i.w.globals.minX&&a.w.globals.maxX===i.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:r,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,a=t.opt,s=t.e,r=e.w,n=this.getElTooltip(e);if(n){if(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=s,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared)if(this.tConfig.onDatasetHover.highlightDataSeries)new Zi(e).toggleSeriesOnHover(s,s.target.parentNode);i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect})}}},{key:"axisChartsTooltips",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=s.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,ln.top+n.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var h=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(h)<0)return void this.handleMouseOut(s)}var c=this.getElTooltip(),d=this.getElXCrosshairs(),u=[];r.config.chart.group&&(u=this.ctx.getSyncedCharts());var g=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;null!==d&&d.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),g&&!this.showOnIntersect||u.length>1)this.handleStickyTooltip(a,o,l,s);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:e,y:i,type:r.config.chart.type});e=f.x,i=f.y,c.style.left=e+"px",c.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:e,y:i});if(this.yaxisTooltips.length)for(var x=0;xl.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(t,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||s.globals.isBarHorizontal){var h=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,h,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,i,a){var s=this.w;if(!this.tConfig.shared&&null===s.globals.series[e][a])return void this.handleMouseOut(i);if(void 0!==s.globals.series[e][a])this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,a,i.ttItems):this.create(t,this,e,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var r=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,r,a,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Mi(this.ctx),i=t.globals.dom.Paper.find(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,A=this.w,C=e;"mouseup"===t.type&&this.markerClick(t,i,a),null===k&&(k=this.tConfig.shared);var S=this.tooltipUtil.hasMarkers(i),L=this.tooltipUtil.getElBars();if(A.config.legend.tooltipHoverFormatter){var M=A.config.legend.tooltipHoverFormatter,P=Array.from(this.legendLabels);P.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var I=0;I0?C.marker.enlargePoints(a):C.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var Y=new Mi(this.ctx),H=A.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var O=0;O0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*k)),w){u=u+d.height/2-b/2-2}var C=e.globals.series[i][a]<0,S=o;switch(this.barCtx.isReversed&&(S=o+(C?c:-c)),f.position){case"center":g=w?C?S-c/2+v:S+c/2-v:C?S-c/2+d.height/2+v:S+c/2+d.height/2-v;break;case"bottom":g=w?C?S-c+v:S+c-v:C?S-c+d.height+b+v:S+c-d.height/2+b-v;break;case"top":g=w?C?S+v:S-v:C?S-d.height/2-v:S+d.height+v}if(this.barCtx.lastActiveBarSerieIndex===s&&x.enabled){var L=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:a}),p.fontSize);r=C?S-L.height/2-v-x.offsetY+18:S+L.height+v+x.offsetY-18;var M=A;n=y+(e.globals.isXNumeric?-h*e.globals.barGroups.length/2:e.globals.barGroups.length*h/2-(e.globals.barGroups.length-1)*h-M)+x.offsetX}return e.config.chart.stacked||(g<0?g=0+b:g+d.height/3>e.globals.gridHeight&&(g=e.globals.gridHeight-b)),{bcx:l,bcy:o,dataLabelsX:u,dataLabelsY:g,totalDataLabelsX:n,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,a=t.i,s=t.j,r=t.realIndex,n=t.bcy,o=t.barHeight,l=t.barWidth,h=t.textRects,c=t.dataLabelsX,d=t.strokeWidth,u=t.dataLabelsConfig,g=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,f=t.offX,x=t.offY,b=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var m,v,y=n-(this.barCtx.isRangeBar?0:b)+o/2+h.height/2+x-3,w="start",k=e.globals.series[a][s]<0,A=i;switch(this.barCtx.isReversed&&(A=i+(k?-l:l),w=k?"start":"end"),g.position){case"center":c=k?A+l/2-f:Math.max(h.width/2,A-l/2)+f;break;case"bottom":c=k?A+l-d-f:A-l+d+f;break;case"top":c=k?A-d-f:A-d+f}if(this.barCtx.lastActiveBarSerieIndex===r&&p.enabled){var C=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:s}),u.fontSize);k?(m=A-d-f-p.offsetX,w="end"):m=A+f+p.offsetX+(this.barCtx.isReversed?-(l+d):d),v=y-h.height/2+C.height/2+p.offsetY+d}return e.config.chart.stacked||("start"===u.textAnchor?c-h.width<0?c=k?h.width+d:d:c+h.width>e.globals.gridWidth&&(c=k?e.globals.gridWidth-d:e.globals.gridWidth-h.width-d):"middle"===u.textAnchor?c-h.width/2<0?c=h.width/2+d:c+h.width/2>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width/2-d):"end"===u.textAnchor&&(c<1?c=h.width+d:c+1>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width-d))),{bcx:i,bcy:n,dataLabelsX:c,dataLabelsY:y,totalDataLabelsX:m,totalDataLabelsY:v,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.i,r=t.j,n=t.textRects,o=t.barHeight,l=t.barWidth,h=t.dataLabelsConfig,c=this.w,d="rotate(0)";"vertical"===c.config.plotOptions.bar.dataLabels.orientation&&(d="rotate(-90, ".concat(e,", ").concat(i,")"));var g=new qi(this.barCtx.ctx),p=new Mi(this.barCtx.ctx),f=h.formatter,x=null,b=c.globals.collapsedSeriesIndices.indexOf(s)>-1;if(h.enabled&&!b){x=p.group({class:"apexcharts-data-labels",transform:d});var m="";void 0!==a&&(m=f(a,u(u({},c),{},{seriesIndex:s,dataPointIndex:r,w:c}))),!a&&c.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(m="");var v=c.globals.series[s][r]<0,y=c.config.plotOptions.bar.dataLabels.position;if("vertical"===c.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(h.textAnchor=v?"end":"start"),"center"===y&&(h.textAnchor="middle"),"bottom"===y&&(h.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels)lMath.abs(l)&&(m=""):n.height/1.6>Math.abs(o)&&(m=""));var w=u({},h);this.barCtx.isHorizontal&&a<0&&("start"===h.textAnchor?w.textAnchor="end":"end"===h.textAnchor&&(w.textAnchor="start")),g.plotDataLabelsText({x:e,y:i,text:m,i:s,j:r,parent:x,dataLabelsConfig:w,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}},{key:"drawTotalDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.realIndex,r=t.textAnchor,n=t.barTotalDataLabelsConfig;this.w;var o,l=new Mi(this.barCtx.ctx);return n.enabled&&void 0!==e&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===s&&(o=l.drawText({x:e,y:i,foreColor:n.style.color,text:a,textAnchor:r,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),o}}]),t}(),Ma=function(){function t(e){i(this,t),this.w=e.w,this.barCtx=e}return s(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[i].length),e.globals.isXNumeric)for(var a=0;ae.globals.minX&&e.globals.seriesX[i][a]0&&(a=l.globals.minXDiff/d),(r=a/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),n=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+(a-r*this.barCtx.seriesLen)/2}return l.globals.barHeight=s,l.globals.barWidth=r,{x:t,y:e,yDivision:i,xDivision:a,barHeight:s,barWidth:r,zeroH:n,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,i,a){var s,r,n,o,l=this.w,h=this.barCtx.ctx.fill,c=null,d=this.barCtx.barOptions.distributed?i:e;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(a){t[e][i]>=a.from&&t[e][i]<=a.to&&(c=a.color)}));return h.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:a,dataPointIndex:i,color:c,value:t[e][i],fillConfig:null===(s=l.config.series[e].data[i])||void 0===s?void 0:s.fill,fillType:null!==(r=l.config.series[e].data[i])&&void 0!==r&&null!==(n=r.fill)&&void 0!==n&&n.type?null===(o=l.config.series[e].data[i])||void 0===o?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[a]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,i){var a=0,s=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"createBorderRadiusArr",value:function(t){var e,i=this.w,a=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,s=t.length,n=0|(null===(e=t[0])||void 0===e?void 0:e.length),o=Array.from({length:s},(function(){return Array(n).fill(a?"top":"none")}));if(a)return o;for(var l=0;l0?(h.push(u),d++):g<0&&(c.push(u),d++)}if(h.length>0&&0===c.length)if(1===h.length)o[h[0]][l]="both";else{var p,f=h[0],x=h[h.length-1],b=r(h);try{for(b.s();!(p=b.n()).done;){var m=p.value;o[m][l]=m===f?"bottom":m===x?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===h.length)if(1===c.length)o[c[0]][l]="both";else{var v,y=Math.max.apply(Math,c),w=Math.min.apply(Math,c),k=r(c);try{for(k.s();!(v=k.n()).done;){var A=v.value;o[A][l]=A===y?"bottom":A===w?"top":"none"}}catch(t){k.e(t)}finally{k.f()}}else if(h.length>0&&c.length>0){var C,S=h[h.length-1],L=r(h);try{for(L.s();!(C=L.n()).done;){var M=C.value;o[M][l]=M===S?"top":"none"}}catch(t){L.e(t)}finally{L.f()}var P,I=Math.max.apply(Math,c),T=r(c);try{for(T.s();!(P=T.n()).done;){var z=P.value;o[z][l]=z===I?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else if(1===d){o[h[0]||c[0]][l]="both"}}return o}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,a=t.x1,s=t.x2,r=t.y1,n=t.y2,o=t.elSeries,l=this.w,h=new Mi(this.barCtx.ctx),c=new Zi(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var d=this.barCtx.barOptions.colors.backgroundBarColors[e],u=h.drawRect(void 0!==a?a:0,void 0!==r?r:0,void 0!==s?s:l.globals.gridWidth,void 0!==n?n:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,i=t.barWidth,a=t.barXPosition,s=t.y1,r=t.y2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.columnWidthOffset&&(x=a-g.config.series[c].data[u].columnWidthOffset/2,f=i+g.config.series[c].data[u].columnWidthOffset);var b=n/2,m=x+b,v=x+f-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001-b*y,r+=.001+b*y;var w=p.move(m,s),k=p.move(m,s),A=p.line(v,s);if(g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1)),w=w+p.line(m,r)+p.line(v,r)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(m,s)+A+A+A+A+A+p.line(m,s)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).yArrj.push(r-b*y),C.yArrjF.push(Math.abs(s-r+n*y)),C.yArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"getBarpaths",value:function(t){var e,i=t.barYPosition,a=t.barHeight,s=t.x1,r=t.x2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.barHeightOffset&&(f=i-g.config.series[c].data[u].barHeightOffset/2,x=a+g.config.series[c].data[u].barHeightOffset);var b=n/2,m=f+b,v=f+x-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001+b*y,r+=.001-b*y;var w=p.move(s,m),k=p.move(s,m);g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1));var A=p.line(s,v);if(w=w+p.line(r,m)+p.line(r,v)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(s,m)+A+A+A+A+A+p.line(s,m)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).xArrj.push(r+b*y),C.xArrjF.push(Math.abs(s-r-n*y)),C.xArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;a2&&void 0!==arguments[2])||arguments[2]?e:null;return null!=t&&(i=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(t,e,i){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?e:null;return null!=t&&(a=e-t/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(t,e,i,a,s,r){var n=this,l=this.w,h=[],c=function(a,s){var l;h.push((o(l={},t,"x"===t?n.getXForValue(a,e,!1):n.getYForValue(a,i,r,!1)),o(l,"attrs",s),l))};if(l.globals.seriesGoals[a]&&l.globals.seriesGoals[a][s]&&Array.isArray(l.globals.seriesGoals[a][s])&&l.globals.seriesGoals[a][s].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,g={strokeHeight:"x"===t?0:l.globals.markers.size[a],strokeWidth:"x"===t?l.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[a])?d[a][0]:d[a]};c(l.globals.seriesRangeStart[a][s],g),c(l.globals.seriesRangeEnd[a][s],u(u({},g),{},{strokeColor:Array.isArray(d[a])?d[a][1]:d[a]}))}return h}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,a=t.goalX,s=t.goalY,r=t.barWidth,n=t.barHeight,o=new Mi(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var h=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach((function(t){if(t.x>=-1&&t.x<=o.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:n/2,a=i+e+n/2;h=o.drawLine(t.x,a-2*e,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(h)}})):Array.isArray(s)&&s.forEach((function(t){if(t.y>=-1&&t.y<=o.w.globals.gridHeight+1){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:r/2,a=e+i+r/2;h=o.drawLine(a-2*i,t.y,a,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(h)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,i=t.currPaths,a=t.color,s=this.w,r=e.x,n=e.x1,o=e.barYPosition,l=i.x,h=i.x1,c=i.barYPosition,d=o+i.barHeight,u=new Mi(this.barCtx.ctx),g=new v,p=u.move(n,d)+u.line(r,d)+u.line(l,c)+u.line(h,c)+u.line(n,d)+("around"===s.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return u.drawPath({d:p,fill:g.shadeColor(.5,v.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,i=t.i,a=t.j,s=this.w,r=0,n=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map((function(t,e){return e})):(null===(e=s.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=s.globals.seriesPercent[t][a];e&&r++,t-1})),a=this.barCtx.columnGroupIndices,s=a.indexOf(i);return s<0&&(a.push(i),s=a.length-1),{groupIndex:i,columnGroupIndex:s}}}]),t}(),Pa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w;var s=this.w;this.barOptions=s.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=s.config.stroke.width,this.isNullValue=!1,this.isRangeBar=s.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!s.globals.isBarHorizontal&&s.globals.seriesRange.length&&s.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=a,null!==this.xyRatios&&(this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.invertedXRatio=a.invertedXRatio,this.invertedYRatio=a.invertedYRatio,this.baseLineY=a.baseLineY,this.baseLineInvertedY=a.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var r=new Zi(this.ctx);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var n=r.getBarSeriesIndices(),o=new Pi(this.ctx);this.stackedSeriesTotals=o.getStackedSeriesTotals(this.w.config.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}))),this.barHelpers=new Ma(this)}return s(t,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=new Pi(this.ctx,i);t=s.getLogSeries(t),this.series=t,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var n=0,o=0;n0&&(this.visibleI=this.visibleI+1);var w=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[b],this.translationsIndex=b);var A=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var C=this.barHelpers.initialPositions();p=C.y,w=C.barHeight,h=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,l=C.xDivision,c=C.zeroH,this.isHorizontal||x.push(g+k/2);var S=a.group({class:"apexcharts-datalabels","data:realIndex":b});i.globals.delayedElements.push({el:S.node}),S.node.classList.add("apexcharts-element-hidden");var L=a.group({class:"apexcharts-bar-goals-markers"}),M=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");for(var P=0;P0){var R=this.barHelpers.drawBarShadow({color:"string"==typeof X&&-1===(null==X?void 0:X.indexOf("url"))?X:v.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});if(M.add(R),i.config.chart.dropShadow.enabled)new Li(this.ctx).dropShadow(R,i.config.chart.dropShadow,b)}this.pathArr.push(T);var E=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:w,barWidth:k});E&&L.add(E),p=T.y,g=T.x,P>0&&x.push(g+k/2),f.push(p),this.renderSeries({realIndex:b,pathFill:X,j:P,i:n,columnGroupIndex:m,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:I,elSeries:y,x:g,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:w),barWidth:Math.abs(T.barWidth?T.barWidth:k),elDataLabelsWrap:S,elGoalsMarkers:L,elBarShadows:M,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[b]=x,i.globals.seriesYvalues[b]=f,r.add(y)}return r}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,a=t.lineFill,s=t.j,r=t.i,n=t.columnGroupIndex,o=t.pathFrom,l=t.pathTo,h=t.strokeWidth,c=t.elSeries,d=t.x,u=t.y,g=t.y1,p=t.y2,f=t.series,x=t.barHeight,b=t.barWidth,m=t.barXPosition,v=t.barYPosition,y=t.elDataLabelsWrap,w=t.elGoalsMarkers,k=t.elBarShadows,A=t.visibleSeries,C=t.type,S=t.classes,L=this.w,M=new Mi(this.ctx);if(!a){var P="function"==typeof L.globals.stroke.colors[e]?function(t){var e,i=L.config.stroke.colors;return Array.isArray(i)&&i.length>0&&((e=i[t])||(e=""),"function"==typeof e)?e({value:L.globals.series[t][s],dataPointIndex:s,w:L}):e}(e):L.globals.stroke.colors[e];a=this.barOptions.distributed?L.globals.stroke.colors[s]:P}L.config.series[r].data[s]&&L.config.series[r].data[s].strokeColor&&(a=L.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var I=s/L.config.chart.animations.animateGradually.delay*(L.config.chart.animations.speed/L.globals.dataPoints)/2.4,T=M.renderPaths({i:r,j:s,realIndex:e,pathFrom:o,pathTo:l,stroke:a,strokeWidth:h,strokeLineCap:L.config.stroke.lineCap,fill:i,animationDelay:I,initialSpeed:L.config.chart.animations.speed,dataChangeSpeed:L.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(C,"-area ").concat(S),chartType:C});T.attr("clip-path","url(#gridRectBarMask".concat(L.globals.cuid,")"));var z=L.config.forecastDataPoints;z.count>0&&s>=L.globals.dataPoints-z.count&&(T.node.setAttribute("stroke-dasharray",z.dashArray),T.node.setAttribute("stroke-width",z.strokeWidth),T.node.setAttribute("fill-opacity",z.fillOpacity)),void 0!==g&&void 0!==p&&(T.attr("data-range-y1",g),T.attr("data-range-y2",p)),new Li(this.ctx).setSelectionFilter(T,e,s),c.add(T);var X=new La(this).handleBarDataLabels({x:d,y:u,y1:g,y2:p,i:r,j:s,series:f,realIndex:e,columnGroupIndex:n,barHeight:x,barWidth:b,barXPosition:m,barYPosition:v,renderedPath:T,visibleSeries:A});return null!==X.dataLabels&&y.add(X.dataLabels),X.totalDataLabels&&y.add(X.totalDataLabels),c.add(y),w&&c.add(w),k&&c.add(k),c}},{key:"drawBarPaths",value:function(t){var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.yDivision,h=t.elSeries,c=this.w,d=i.i,u=i.j;if(c.globals.isXNumeric)e=(o=(c.globals.seriesX[d][u]-c.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var g=0,p=0;c.globals.seriesPercent.forEach((function(t,e){t[u]&&g++,e0&&(a=this.seriesLen*a/g),e=o+a*this.visibleI,e-=a*p}else e=o+a*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[d][u],r)-r)/2),n=this.barHelpers.getXForValue(this.series[d][u],r);var f=this.barHelpers.getBarpaths({barYPosition:e,barHeight:a,x1:r,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:d,j:u,w:c});return c.globals.isXNumeric||(o+=l),this.barHelpers.barBackground({j:u,i:d,y1:e-a*this.visibleI,y2:a*this.seriesLen,elSeries:h}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x1:r,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",r,null,d,u),barYPosition:e,barHeight:a}}},{key:"drawColumnPaths",value:function(t){var e,i=t.indexes,a=t.x,s=t.y,r=t.xDivision,n=t.barWidth,o=t.zeroH,l=t.strokeWidth,h=t.elSeries,c=this.w,d=i.realIndex,u=i.translationsIndex,g=i.i,p=i.j,f=i.bc;if(c.globals.isXNumeric){var x=this.getBarXForNumericXAxis({x:a,j:p,realIndex:d,barWidth:n});a=x.x,e=x.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var b=this.barHelpers.getZeroValueEncounters({i:g,j:p}),m=b.nonZeroColumns,v=b.zeroEncounters;m>0&&(n=this.seriesLen*n/m),e=a+n*this.visibleI,e-=n*v}else e=a+n*this.visibleI;s=this.barHelpers.getYForValue(this.series[g][p],o,u);var y=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:n,y1:o,y2:s,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:d,i:g,j:p,w:c});return c.globals.isXNumeric||(a+=r),this.barHelpers.barBackground({bc:f,j:p,i:g,x1:e-l/2-n*this.visibleI,x2:n*this.seriesLen+l/2,elSeries:h}),{pathTo:y.pathTo,pathFrom:y.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,g,p,u),barXPosition:e,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,i=t.barWidth,a=t.realIndex,s=t.j,r=this.w,n=a;return r.globals.seriesX[a].length||(n=r.globals.maxValsInArrayIndex),v.isNumber(r.globals.seriesX[n][s])&&(e=(r.globals.seriesX[n][s]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:e+i*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var i,a=this.w,s=0;s0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==a.globals.previousPaths[s].paths[e]&&(i=a.globals.previousPaths[s].paths[e].d)}return i}}]),t}(),Ia=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this,a=this.w;this.graphics=new Mi(this.ctx),this.bar=new Pa(this.ctx,this.xyRatios);var s=new Pi(this.ctx,a);t=s.getLogSeries(t),this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===a.config.chart.stackType&&(t=a.globals.comboCharts?e.map((function(t){return a.globals.seriesPercent[t]})):a.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);for(var r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),n=0,o=0,l=function(s,l){var h=void 0,c=void 0,d=void 0,g=void 0,p=a.globals.comboCharts?e[s]:s,f=i.barHelpers.getGroupIndex(p),x=f.groupIndex,b=f.columnGroupIndex;i.groupCtx=i[a.globals.seriesGroups[x]];var m=[],y=[],w=0;i.yRatio.length>1&&(i.yaxisIndex=a.globals.seriesYAxisReverseMap[p][0],w=p),i.isReversed=a.config.yaxis[i.yaxisIndex]&&a.config.yaxis[i.yaxisIndex].reversed;var k=i.graphics.group({class:"apexcharts-series",seriesName:v.escapeString(a.globals.seriesNames[p]),rel:s+1,"data:realIndex":p});i.ctx.series.addCollapsedClassToSeries(k,p);var A=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),C=i.graphics.group({class:"apexcharts-bar-goals-markers"}),S=0,L=0,M=i.initialPositions(n,o,h,c,d,g,w);o=M.y,S=M.barHeight,c=M.yDivision,g=M.zeroW,n=M.x,L=M.barWidth,h=M.xDivision,d=M.zeroH,a.globals.barHeight=S,a.globals.barWidth=L,i.barHelpers.initializeStackedXYVars(i),1===i.groupCtx.prevY.length&&i.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(i.groupCtx.prevY[0]=i.groupCtx.prevY[0].map((function(){return d})),i.groupCtx.prevYF[0]=i.groupCtx.prevYF[0].map((function(){return 0})));for(var P=0;P0||"top"===i.barHelpers.arrBorderRadius[p][P]&&a.globals.series[p][P]<0)&&(E=Y),k=i.renderSeries({realIndex:p,pathFill:R,j:P,i:s,columnGroupIndex:b,pathFrom:z.pathFrom,pathTo:z.pathTo,strokeWidth:I,elSeries:k,x:n,y:o,series:t,barHeight:S,barWidth:L,elDataLabelsWrap:A,elGoalsMarkers:C,type:"bar",visibleSeries:b,classes:E})}a.globals.seriesXvalues[p]=m,a.globals.seriesYvalues[p]=y,i.groupCtx.prevY.push(i.groupCtx.yArrj),i.groupCtx.prevYF.push(i.groupCtx.yArrjF),i.groupCtx.prevYVal.push(i.groupCtx.yArrjVal),i.groupCtx.prevX.push(i.groupCtx.xArrj),i.groupCtx.prevXF.push(i.groupCtx.xArrjF),i.groupCtx.prevXVal.push(i.groupCtx.xArrjVal),r.add(k)},h=0,c=0;h1?l=(i=h.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(d).indexOf("%")?l=parseInt(d,10):l*=parseInt(d,10)/100,s=this.isReversed?this.baseLineY[n]:h.globals.gridHeight-this.baseLineY[n],t=h.globals.padHorizontal+(i-l)/2}var u=h.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:i,barHeight:o/u,barWidth:l/u,zeroH:s,zeroW:r}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.columnGroupIndex,h=t.seriesGroup,c=t.yDivision,d=t.elSeries,u=this.w,g=o+l*a,p=i.i,f=i.j,x=i.realIndex,b=i.translationsIndex,m=0,v=0;v0){var w=r;this.groupCtx.prevXVal[y-1][f]<0?w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[y-1][f]:this.groupCtx.prevXVal[y-1][f]>=0&&(w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]:this.groupCtx.prevX[y-1][f]-m+2*(this.isReversed?m:0)),e=w}else e=r;n=null===this.series[p][f]?e:e+this.series[p][f]/this.invertedYRatio-2*(this.isReversed?this.series[p][f]/this.invertedYRatio:0);var k=this.barHelpers.getBarpaths({barYPosition:g,barHeight:a,x1:e,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,seriesGroup:h,i:p,j:f,w:u});return this.barHelpers.barBackground({j:f,i:p,y1:g,y2:a,elSeries:d}),o+=c,{pathTo:k.pathTo,pathFrom:k.pathFrom,goalX:this.barHelpers.getGoalValues("x",r,null,p,f,b),barXPosition:e,barYPosition:g,x:n,y:o}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,r=t.barWidth,n=t.zeroH,o=t.columnGroupIndex,l=t.seriesGroup,h=t.elSeries,c=this.w,d=e.i,u=e.j,g=e.bc,p=e.realIndex,f=e.translationsIndex;if(c.globals.isXNumeric){var x=c.globals.seriesX[p][u];x||(x=0),i=(x-c.globals.minX)/this.xRatio-r/2*c.globals.barGroups.length}for(var b,m=i+o*r,v=0,y=0;y0&&!c.globals.isXNumeric||w>0&&c.globals.isXNumeric&&c.globals.seriesX[p-1][u]===c.globals.seriesX[p][u]){var k,A,C,S=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var L=1;L=0?C-v+2*(this.isReversed?v:0):C;break}if((null===(T=this.groupCtx.prevYVal[w-P])||void 0===T?void 0:T[u])>=0){A=this.series[d][u]>=0?C:C+v-2*(this.isReversed?v:0);break}}void 0===A&&(A=c.globals.gridHeight),b=null!==(k=this.groupCtx.prevYF[0])&&void 0!==k&&k.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?n:A}else b=n;a=this.series[d][u]?b-this.series[d][u]/this.yRatio[f]+2*(this.isReversed?this.series[d][u]/this.yRatio[f]:0):b;var z=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:r,y1:b,y2:a,yRatio:this.yRatio[f],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:d,j:u,w:c});return this.barHelpers.barBackground({bc:g,j:u,i:d,x1:m,x2:r,elSeries:h}),{pathTo:z.pathTo,pathFrom:z.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,n,d,u),barXPosition:m,x:c.globals.isXNumeric?i:i+s,y:a}}}]),a}(),Ta=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e,i){var a=this,s=this.w,r=new Mi(this.ctx),n=s.globals.comboCharts?e:s.config.chart.type,o=new ji(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=s.config.plotOptions.bar.horizontal;var l=new Pi(this.ctx,s);t=l.getLogSeries(t),this.series=t,this.yRatio=l.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var h=r.group({class:"apexcharts-".concat(n,"-series apexcharts-plot-series")}),c=function(e){a.isBoxPlot="boxPlot"===s.config.chart.type||"boxPlot"===s.config.series[e].type;var n,l,c,d,g=void 0,p=void 0,f=[],x=[],b=s.globals.comboCharts?i[e]:e,m=a.barHelpers.getGroupIndex(b).columnGroupIndex,y=r.group({class:"apexcharts-series",seriesName:v.escapeString(s.globals.seriesNames[b]),rel:e+1,"data:realIndex":b});a.ctx.series.addCollapsedClassToSeries(y,b),t[e].length>0&&(a.visibleI=a.visibleI+1);var w,k,A=0;a.yRatio.length>1&&(a.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],A=b);var C=a.barHelpers.initialPositions();p=C.y,w=C.barHeight,l=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,n=C.xDivision,c=C.zeroH,x.push(g+k/2);for(var S=r.group({class:"apexcharts-datalabels","data:realIndex":b}),L=r.group({class:"apexcharts-bar-goals-markers"}),M=function(i){var r=a.barHelpers.getStrokeWidth(e,i,b),h=null,v={indexes:{i:e,j:i,realIndex:b,translationsIndex:A},x:g,y:p,strokeWidth:r,elSeries:y};h=a.isHorizontal?a.drawHorizontalBoxPaths(u(u({},v),{},{yDivision:l,barHeight:w,zeroW:d})):a.drawVerticalBoxPaths(u(u({},v),{},{xDivision:n,barWidth:k,zeroH:c})),p=h.y,g=h.x;var C=a.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:h.barYPosition,goalX:h.goalX,goalY:h.goalY,barHeight:w,barWidth:k});C&&L.add(C),i>0&&x.push(g+k/2),f.push(p),h.pathTo.forEach((function(n,l){var c=!a.isBoxPlot&&a.candlestickOptions.wick.useFillColor?h.color[l]:s.globals.stroke.colors[e],d=o.fillPath({seriesNumber:b,dataPointIndex:i,color:h.color[l],value:t[e][i]});a.renderSeries({realIndex:b,pathFill:d,lineFill:c,j:i,i:e,pathFrom:h.pathFrom,pathTo:n,strokeWidth:r,elSeries:y,x:g,y:p,series:t,columnGroupIndex:m,barHeight:w,barWidth:k,elDataLabelsWrap:S,elGoalsMarkers:L,visibleSeries:a.visibleI,type:s.config.chart.type})}))},P=0;Pb.c&&(d=!1);var y=Math.min(b.o,b.c),w=Math.max(b.o,b.c),k=b.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[x][c]-o.globals.minX)/this.xRatio-s/2);var A=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(y=r,w=r):(y=r-y/f,w=r-w/f,m=r-b.h/f,v=r-b.l/f,k=r-b.m/f);var C=l.move(A,r),S=l.move(A+s/2,y);return o.globals.previousPaths.length>0&&(S=this.getPreviousPath(x,c,!0)),C=this.isBoxPlot?[l.move(A,y)+l.line(A+s/2,y)+l.line(A+s/2,m)+l.line(A+s/4,m)+l.line(A+s-s/4,m)+l.line(A+s/2,m)+l.line(A+s/2,y)+l.line(A+s,y)+l.line(A+s,k)+l.line(A,k)+l.line(A,y+n/2),l.move(A,k)+l.line(A+s,k)+l.line(A+s,w)+l.line(A+s/2,w)+l.line(A+s/2,v)+l.line(A+s-s/4,v)+l.line(A+s/4,v)+l.line(A+s/2,v)+l.line(A+s/2,w)+l.line(A,w)+l.line(A,k)+"z"]:[l.move(A,w)+l.line(A+s/2,w)+l.line(A+s/2,m)+l.line(A+s/2,w)+l.line(A+s,w)+l.line(A+s,y)+l.line(A+s/2,y)+l.line(A+s/2,v)+l.line(A+s/2,y)+l.line(A,y)+l.line(A,w-n/2)],S+=l.move(A,y),o.globals.isXNumeric||(i+=a),{pathTo:C,pathFrom:S,x:i,y:w,goalY:this.barHelpers.getGoalValues("y",null,r,h,c,e.translationsIndex),barXPosition:A,color:this.isBoxPlot?p:d?[u]:[g]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var i=t.y,a=t.yDivision,s=t.barHeight,r=t.zeroW,n=t.strokeWidth,o=this.w,l=new Mi(this.ctx),h=e.i,c=e.j,d=this.boxOptions.colors.lower;this.isBoxPlot&&(d=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,g=e.realIndex,p=this.getOHLCValue(g,c),f=r,x=r,b=Math.min(p.o,p.c),m=Math.max(p.o,p.c),v=p.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[g][c]-o.globals.minX)/this.invertedXRatio-s/2);var y=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(b=r,m=r):(b=r+b/u,m=r+m/u,f=r+p.h/u,x=r+p.l/u,v=r+p.m/u);var w=l.move(r,y),k=l.move(b,y+s/2);return o.globals.previousPaths.length>0&&(k=this.getPreviousPath(g,c,!0)),w=[l.move(b,y)+l.line(b,y+s/2)+l.line(f,y+s/2)+l.line(f,y+s/2-s/4)+l.line(f,y+s/2+s/4)+l.line(f,y+s/2)+l.line(b,y+s/2)+l.line(b,y+s)+l.line(v,y+s)+l.line(v,y)+l.line(b+n/2,y),l.move(v,y)+l.line(v,y+s)+l.line(m,y+s)+l.line(m,y+s/2)+l.line(x,y+s/2)+l.line(x,y+s-s/4)+l.line(x,y+s/4)+l.line(x,y+s/2)+l.line(m,y+s/2)+l.line(m,y)+l.line(v,y)+"z"],k+=l.move(b,y),o.globals.isXNumeric||(i+=a),{pathTo:w,pathFrom:k,x:m,y:i,goalX:this.barHelpers.getGoalValues("x",r,null,h,c),barYPosition:y,color:d}}},{key:"getOHLCValue",value:function(t,e){var i=this.w;return{o:this.isBoxPlot?i.globals.seriesCandleH[t][e]:i.globals.seriesCandleO[t][e],h:this.isBoxPlot?i.globals.seriesCandleO[t][e]:i.globals.seriesCandleH[t][e],m:i.globals.seriesCandleM[t][e],l:this.isBoxPlot?i.globals.seriesCandleC[t][e]:i.globals.seriesCandleL[t][e],c:this.isBoxPlot?i.globals.seriesCandleL[t][e]:i.globals.seriesCandleC[t][e]}}}]),a}(),za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,a){var s=this.w,r=1,n=s.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,i);s.globals.hasNegs||a?r=s.config.plotOptions[t].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):(1-o.percent/100)*(1.25*n):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(r=1-o.percent/100,"treemap"===t&&(r=(1-o.percent/100)*(1.25*n)));var l=o.color,h=new v;if(s.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var c=h.shadeColor(-1*r,o.color);l=v.hexToRgba(v.isColorHex(c)?c:v.rgb2hex(c),s.config.fill.opacity)}else{var d=h.shadeColor(r,o.color);l=v.hexToRgba(v.isColorHex(d)?d:v.rgb2hex(d),s.config.fill.opacity)}return{color:l,colorProps:o}}},{key:"determineColor",value:function(t,e,i){var a=this.w,s=a.globals.series[e][i],r=a.config.plotOptions[t],n=r.colorScale.inverse?i:e;r.distributed&&"treemap"===a.config.chart.type&&(n=i);var o=a.globals.colors[n],l=null,h=Math.min.apply(Math,f(a.globals.series[e])),c=Math.max.apply(Math,f(a.globals.series[e]));r.distributed||"heatmap"!==t||(h=a.globals.minY,c=a.globals.maxY),void 0!==r.colorScale.min&&(h=r.colorScale.mina.globals.maxY?r.colorScale.max:a.globals.maxY);var d=Math.abs(c)+Math.abs(h),u=100*s/(0===d?d-1e-6:d);r.colorScale.ranges.length>0&&r.colorScale.ranges.map((function(t,e){if(s>=t.from&&s<=t.to){o=t.color,l=t.foreColor?t.foreColor:null,h=t.from,c=t.to;var i=Math.abs(c)+Math.abs(h);u=100*s/(0===i?i-1e-6:i)}}));return{color:o,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,a=t.y,s=t.i,r=t.j,n=t.colorProps,o=t.fontSize,l=this.w.config.dataLabels,h=new Mi(this.ctx),c=new qi(this.ctx),d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});var u=l.offsetX,g=l.offsetY,p=i+u,f=a+parseFloat(l.style.fontSize)/3+g;c.plotDataLabelsText({x:p,y:f,text:e,i:s,j:r,color:n.foreColor,parent:d,fontSize:o,dataLabelsConfig:l})}return d}},{key:"addListeners",value:function(t){var e=new Mi(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),Xa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w,this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new za(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return s(t,[{key:"draw",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var s=e.globals.gridWidth/e.globals.dataPoints,r=e.globals.gridHeight/e.globals.series.length,n=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var h=o?0:l.length-1;o?h=0;o?h++:h--){var c=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:v.escapeString(e.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(this.ctx.series.addCollapsedClassToSeries(c,h),e.config.chart.dropShadow.enabled){var d=e.config.chart.dropShadow;new Li(this.ctx).dropShadow(c,d,h)}for(var u=0,g=e.config.plotOptions.heatmap.shadeIntensity,p=0;p-1&&this.pieClicked(d),i.config.dataLabels.enabled){var w=m.x,k=m.y,A=100*g/this.fullAngle+"%";if(0!==g&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(h=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(h)>this.fullAngle&&(h-=this.fullAngle);var c=Math.PI*(h-90)/180,d=i.centerX+r*Math.cos(l),u=i.centerY+r*Math.sin(l),g=i.centerX+r*Math.cos(c),p=i.centerY+r*Math.sin(c),f=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,h),x=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),b=s>180?1:0,m=["M",d,u,"A",r,r,0,b,1,g,p];return e="donut"===i.chartType?[].concat(m,["L",f.x,f.y,"A",i.donutSize,i.donutSize,0,b,0,x.x,x.y,"L",d,u,"z"]).join(" "):"pie"===i.chartType||"polarArea"===i.chartType?[].concat(m,["L",i.centerX,i.centerY,"L",d,u]).join(" "):[].concat(m).join(" "),n.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new ta(this.ctx),a=new Mi(this.ctx),s=new Ra(this.ctx),r=a.group(),n=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),h=o.result.length;this.maxY=o.niceMax;for(var c=e.globals.radialSize,d=c/(h-1),u=0;u1&&t.total.show&&(s=t.total.color);var n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,r),a||"function"!=typeof t.total.formatter||(i=t.total.formatter(r));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,r):"",null!==n&&(n.textContent=e),null!==o&&(o.textContent=i),null!==n&&(n.style.fill=s)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,a=t.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,s,a,t);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,a=new Mi(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(0!==s.strokeWidth){for(var r=[],n=360/i.globals.series.length,o=0;o0&&(f=e.getPreviousPath(n));for(var x=0;x=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?s-=10:t.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,a=0;a0&&parseInt(s.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[a].paths[0]&&(i=e.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var a=[],s=0;s=360&&(u=360-Math.abs(this.startAngle)-.1);var g=i.drawPath({d:"",stroke:c,strokeWidth:n*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){var p=h.dropShadow;s.dropShadow(g,p)}l.add(g),g.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(g,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:d,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return a}},{key:"drawArcs",value:function(t){var e=this.w,i=new Mi(this.ctx),a=new ji(this.ctx),s=new Li(this.ctx),r=i.group(),n=this.getStrokeWidth(t);t.size=t.size-n/2;var o=e.config.plotOptions.radialBar.hollow.background,l=t.size-n*t.series.length-this.margin*t.series.length-n*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(t,r,l,o));var c=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:o||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var d=e.config.plotOptions.radialBar.hollow.dropShadow;s.dropShadow(c,d)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var g=null;if(this.radialDataLabels.show){var p=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");g=this.renderInnerDataLabels(p,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})}"back"===e.config.plotOptions.radialBar.hollow.position&&(r.add(c),g&&r.add(g));var f=!1;e.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var x=f?t.series.length-1:0;f?x>=0:x100?100:t.series[x])/100,A=Math.round(this.totalAngle*k)+this.startAngle,C=void 0;e.globals.dataChanged&&(w=this.startAngle,C=Math.round(this.totalAngle*v.negToZero(e.globals.previousPaths[x])/100)+w),Math.abs(A)+Math.abs(y)>360&&(A-=.01),Math.abs(C)+Math.abs(w)>360&&(C-=.01);var S=A-y,L=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[x]:e.config.stroke.dashArray,M=i.drawPath({d:"",stroke:m,strokeWidth:n,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+x,strokeDashArray:L});if(Mi.setAttrs(M.node,{"data:angle":S,"data:value":t.series[x]}),e.config.chart.dropShadow.enabled){var P=e.config.chart.dropShadow;s.dropShadow(M,P,x)}if(s.setSelectionFilter(M,0,x),this.addListeners(M,this.radialDataLabels),b.add(M),M.attr({index:0,j:x}),this.barLabels.enabled){var I=v.polarToCartesian(t.centerX,t.centerY,t.size,y),T=this.barLabels.formatter(e.globals.seriesNames[x],{seriesIndex:x,w:e}),z=["apexcharts-radialbar-label"];this.barLabels.onClick||z.push("apexcharts-no-click");var X=this.barLabels.useSeriesColors?e.globals.colors[x]:e.config.chart.foreColor;X||(X=e.config.chart.foreColor);var R=I.x+this.barLabels.offsetX,E=I.y+this.barLabels.offsetY,Y=i.drawText({x:R,y:E,text:T,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:X,cssClass:z.join(" ")});Y.on("click",this.onBarLabelClick),Y.attr({rel:x+1}),0!==y&&Y.attr({"transform-origin":"".concat(R," ").concat(E),transform:"rotate(".concat(y," 0 0)")}),b.add(Y)}var H=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(H=e.config.chart.animations.speed),e.globals.dataChanged&&(H=e.config.chart.animations.dynamicAnimation.speed),this.animDur=H/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(M,{centerX:t.centerX,centerY:t.centerY,endAngle:A,startAngle:y,prevEndAngle:C,prevStartAngle:w,size:t.size,i:x,totalItems:2,animBeginArr:this.animBeginArr,dur:H,shouldSetPrevPaths:!0})}return{g:r,elHollow:c,dataLabels:g}}},{key:"drawHollow",value:function(t){var e=new Mi(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,a){var s=this.w,r=new ji(this.ctx),n=v.randomId(),o=s.config.plotOptions.radialBar.hollow.image;if(s.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:o,patternID:"pattern".concat(s.globals.cuid).concat(n)}),a="url(#pattern".concat(s.globals.cuid).concat(n,")");else{var l=s.config.plotOptions.radialBar.hollow.imageWidth,h=s.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===h){var c=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-e.width/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+s.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(c)}else{var d=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-l/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-h/2+s.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,h)}));e.add(d)}}return a}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,i=this.barLabels.onClick,a=this.w;i&&i(a.globals.seriesNames[e],{w:a,seriesIndex:e})}}]),r}(),Oa=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var s=a.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),r=0;r0&&(this.visibleI=this.visibleI+1);var x=0,b=0,m=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[g][0],m=g);var y=this.barHelpers.initialPositions();d=y.y,h=y.zeroW,c=y.x,b=y.barWidth,x=y.barHeight,n=y.xDivision,o=y.yDivision,l=y.zeroH;for(var w=a.group({class:"apexcharts-datalabels","data:realIndex":g}),k=a.group({class:"apexcharts-rangebar-goals-markers"}),A=0;A0}));return this.isHorizontal?(a=u.config.plotOptions.bar.rangeBarGroupRows?r+h*b:r+o*this.visibleI+h*b,m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(a=(o=d.barHeight/g.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+g.indexOf(p))+h*b)):(b>-1&&!u.globals.timescaleLabels.length&&(s=u.config.plotOptions.bar.rangeBarGroupRows?n+c*b:n+l*this.visibleI+c*b),m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(s=(l=d.barWidth/g.length)*this.visibleI+c*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+g.indexOf(p))+c*b)),{barYPosition:a,barXPosition:s,barHeight:o,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.xDivision,s=t.barWidth,r=t.barXPosition,n=t.zeroH,o=this.w,l=e.i,h=e.j,c=e.realIndex,d=e.translationsIndex,u=this.yRatio[d],g=this.getRangeValue(c,h),p=Math.min(g.start,g.end),f=Math.max(g.start,g.end);void 0===this.series[l][h]||null===this.series[l][h]?p=n:(p=n-p/u,f=n-f/u);var x=Math.abs(f-p),b=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:s,y1:p,y2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:c,i:c,j:h,w:o});if(o.globals.isXNumeric){var m=this.getBarXForNumericXAxis({x:i,j:h,realIndex:c,barWidth:s});i=m.x,r=m.barXPosition}else i+=a;return{pathTo:b.pathTo,pathFrom:b.pathFrom,barHeight:x,x:i,y:g.start<0&&g.end<0?p:f,goalY:this.barHelpers.getGoalValues("y",null,n,l,h,d),barXPosition:r}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,a=t.y1,s=t.y2,r=t.yDivision,n=t.barHeight,o=t.barYPosition,l=t.zeroW,h=this.w,c=e.realIndex,d=e.j,u=this.preventBarOverflow(l+a/this.invertedYRatio),g=this.preventBarOverflow(l+s/this.invertedYRatio),p=this.getRangeValue(c,d),f=Math.abs(g-u),x=this.barHelpers.getBarpaths({barYPosition:o,barHeight:n,x1:u,x2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:c,realIndex:c,j:d,w:h});return h.globals.isXNumeric||(i+=r),{pathTo:x.pathTo,pathFrom:x.pathFrom,barWidth:f,x:p.start<0&&p.end<0?u:g,goalX:this.barHelpers.getGoalValues("x",l,null,c,d),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}}]),a}(),Fa=function(){function t(e){i(this,t),this.w=e.w,this.lineCtx=e}return s(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new Pi(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,a=t.x,s=t.y,r=t.i,n=t.j,o=t.prevY,l=this.w,h=[],c=[];if(0===n){var d=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(d=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),h.push(d),c.push(v.isNumber(e[r][0])?o+l.config.markers.offsetY:null),h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null)}else h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null);return{x:h,y:c}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,a=t.realIndex,s=this.w,r=0;r0&&parseInt(n.realIndex,10)===parseInt(a,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,e=s.globals.previousPaths[r].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[r].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[r].paths[1]&&(e=s.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e,i,a,s=t.i,r=t.realIndex,n=t.series,o=t.prevY,l=t.lineYPosition,h=t.translationsIndex,c=this.w,d=c.config.chart.stacked&&!c.globals.comboCharts||c.config.chart.stacked&&c.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[r])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[r])||void 0===i?void 0:i.type));if(void 0!==(null===(a=n[s])||void 0===a?void 0:a[0]))o=(l=d&&s>0?this.lineCtx.prevSeriesY[s-1][0]:this.lineCtx.zeroY)-n[s][0]/this.lineCtx.yRatio[h]+2*(this.lineCtx.isReversed?n[s][0]/this.lineCtx.yRatio[h]:0);else if(d&&s>0&&void 0===n[s][0])for(var u=s-1;u>=0;u--)if(null!==n[u][0]&&void 0!==n[u][0]){o=l=this.lineCtx.prevSeriesY[u][0];break}return{prevY:o,lineYPosition:l}}}]),t}(),Da=function(t){for(var e,i,a,s,r=function(t){for(var e=[],i=t[0],a=t[1],s=e[0]=Wa(i,a),r=1,n=t.length-1;r9&&(s=3*a/Math.sqrt(s),r[l]=s*e,r[l+1]=s*i);for(var h=0;h<=n;h++)s=(t[Math.min(n,h+1)][0]-t[Math.max(0,h-1)][0])/(6*(1+r[h]*r[h])),o.push([s||0,r[h]*s||0]);return o},_a=function(t){var e=Da(t),i=t[1],a=t[0],s=[],r=e[1],n=e[0];s.push(a,[a[0]+n[0],a[1]+n[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(var o=2,l=e.length;o1&&a[1].length<6){var s=a[0].length;a[1]=[2*a[0][s-2]-a[0][s-4],2*a[0][s-1]-a[0][s-3]].concat(a[1])}a[0]=a[0].slice(-2)}return a};function Wa(t,e){return(e[1]-t[1])/(e[0]-t[0])}var Ba=function(){function t(e,a,s){i(this,t),this.ctx=e,this.w=e.w,this.xyRatios=a,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||s,this.scatter=new Ui(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Fa(this),this.markers=new Vi(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return s(t,[{key:"draw",value:function(t,e,i,a){var s,r=this.w,n=new Mi(this.ctx),o=r.globals.comboCharts?e:r.config.chart.type,l=n.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),h=new Pi(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=h.getLogSeries(t),this.yRatio=h.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var c=[],d=0;d1?g:0;this._initSerieVariables(t,d,g);var f=[],x=[],b=[],m=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,g),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(m=(r.globals.seriesX[g][0]-r.globals.minX)/this.xRatio),b.push(m);var v,y=m,w=void 0,k=y,A=this.zeroY,C=this.zeroY;A=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:t,prevY:A,lineYPosition:0,translationsIndex:p}).prevY,"monotoneCubic"===r.config.stroke.curve&&null===t[d][0]?f.push(null):f.push(A),v=A;"rangeArea"===o&&(w=C=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:a,prevY:C,lineYPosition:0,translationsIndex:p}).prevY,x.push(null!==f[0]?C:null));var S=this._calculatePathsFrom({type:o,series:t,i:d,realIndex:g,translationsIndex:p,prevX:k,prevY:A,prevY2:C}),L=[f[0]],M=[x[0]],P={type:o,series:t,realIndex:g,translationsIndex:p,i:d,x:m,y:1,pX:y,pY:v,pathsFrom:S,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:b,yArrj:f,y2Arrj:x,seriesRangeEnd:a},I=this._iterateOverDataPoints(u(u({},P),{},{iterations:"rangeArea"===o?t[d].length-1:void 0,isRangeStart:!0}));if("rangeArea"===o){for(var T=this._calculatePathsFrom({series:a,i:d,realIndex:g,prevX:k,prevY:C}),z=this._iterateOverDataPoints(u(u({},P),{},{series:a,xArrj:[m],yArrj:L,y2Arrj:M,pY:w,areaPaths:I.areaPaths,pathsFrom:T,iterations:a[d].length-1,isRangeStart:!1})),X=I.linePaths.length/2,R=0;R=0;E--)l.add(c[E]);else for(var Y=0;Y1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[r]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",zIndex:void 0!==a.config.series[i].zIndex?a.config.series[i].zIndex:i,seriesName:v.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i});var n=t[e].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,a,s,r=t.type,n=t.series,o=t.i,l=t.realIndex,h=t.translationsIndex,c=t.prevX,d=t.prevY,u=t.prevY2,g=this.w,p=new Mi(this.ctx);if(null===n[o][0]){for(var f=0;f0){var x=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:l});a=x.pathFromLine,s=x.pathFromArea}return{prevX:c,prevY:d,linePath:e,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(t){var e=t.type,i=t.realIndex,a=t.i,s=t.paths,r=this.w,n=new Mi(this.ctx),o=new ji(this.ctx);this.prevSeriesY.push(s.yArrj),r.globals.seriesXvalues[i]=s.xArrj,r.globals.seriesYvalues[i]=s.yArrj;var l=r.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var h=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-l.count-1],c=n.drawRect(h,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(c.node);var d=n.drawRect(0,0,h,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(d.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var g={i:a,realIndex:i,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var p=o.fillPath({seriesNumber:i}),f=0;f0&&"rangeArea"!==e){var A=n.renderPaths(w);A.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&A.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(A),A.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),k.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,i,a=this,s=t.type,r=t.series,n=t.iterations,o=t.realIndex,l=t.translationsIndex,h=t.i,c=t.x,d=t.y,u=t.pX,g=t.pY,p=t.pathsFrom,f=t.linePaths,x=t.areaPaths,b=t.seriesIndex,m=t.lineYPosition,y=t.xArrj,w=t.yArrj,k=t.y2Arrj,A=t.isRangeStart,C=t.seriesRangeEnd,S=this.w,L=new Mi(this.ctx),M=this.yRatio,P=p.prevY,I=p.linePath,T=p.areaPath,z=p.pathFromLine,X=p.pathFromArea,R=v.isNumber(S.globals.minYArr[o])?S.globals.minYArr[o]:S.globals.minY;n||(n=S.globals.dataPoints>1?S.globals.dataPoints-1:S.globals.dataPoints);var E=function(t,e){return e-t/M[l]+2*(a.isReversed?t/M[l]:0)},Y=d,H=S.config.chart.stacked&&!S.globals.comboCharts||S.config.chart.stacked&&S.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[o])||void 0===i?void 0:i.type)),O=S.config.stroke.curve;Array.isArray(O)&&(O=Array.isArray(b)?O[b[h]]:O[h]);for(var F,D=0,_=0;_0&&S.globals.collapsedSeries.length0;e--){if(!(S.globals.collapsedSeriesIndices.indexOf((null==b?void 0:b[e])||e)>-1))return e;e--}return 0}(h-1)][_+1]}else m=this.zeroY;else m=this.zeroY;N?d=E(R,m):(d=E(r[h][_+1],m),"rangeArea"===s&&(Y=E(C[h][_+1],m))),y.push(c),!N||"smooth"!==S.config.stroke.curve&&"monotoneCubic"!==S.config.stroke.curve?(w.push(d),k.push(Y)):(w.push(null),k.push(null));var B=this.lineHelpers.calculatePoints({series:r,x:c,y:d,realIndex:o,i:h,j:_,prevY:P}),G=this._createPaths({type:s,series:r,i:h,realIndex:o,j:_,x:c,y:d,y2:Y,xArrj:y,yArrj:w,y2Arrj:k,pX:u,pY:g,pathState:D,segmentStartX:F,linePath:I,areaPath:T,linePaths:f,areaPaths:x,curve:O,isRangeStart:A});x=G.areaPaths,f=G.linePaths,u=G.pX,g=G.pY,D=G.pathState,F=G.segmentStartX,T=G.areaPath,I=G.linePath,!this.appendPathFrom||S.globals.hasNullValues||"monotoneCubic"===O&&"rangeArea"===s||(z+=L.line(c,this.areaBottomY),X+=L.line(c,this.areaBottomY)),this.handleNullDataPoints(r,B,h,_,o),this._handleMarkersAndLabels({type:s,pointsPos:B,i:h,j:_,realIndex:o,isRangeStart:A})}return{yArrj:w,xArrj:y,pathFromArea:X,areaPaths:x,pathFromLine:z,linePaths:f,linePath:I,areaPath:T}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,i=t.pointsPos,a=t.isRangeStart,s=t.i,r=t.j,n=t.realIndex,o=this.w,l=new qi(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var h=this.markers.plotChartMarkers(i,n,r+1);null!==h&&this.elPointsMain.add(h)}var c=l.drawDataLabel({type:e,isRangeStart:a,pos:i,i:n,j:r+1});null!==c&&this.elDataLabelsWrap.add(c)}},{key:"_createPaths",value:function(t){var e=t.type,i=t.series,a=t.i;t.realIndex;var s,r=t.j,n=t.x,o=t.y,l=t.xArrj,h=t.yArrj,c=t.y2,d=t.y2Arrj,u=t.pX,g=t.pY,p=t.pathState,f=t.segmentStartX,x=t.linePath,b=t.areaPath,m=t.linePaths,v=t.areaPaths,y=t.curve,w=t.isRangeStart,k=new Mi(this.ctx),A=this.areaBottomY,C="rangeArea"===e,S="rangeArea"===e&&w;switch(y){case"monotoneCubic":var L=w?h:d;switch(p){case 0:if(null===L[r+1])break;p=1;case 1:if(!(C?l.length===i[a].length:r===i[a].length-2))break;case 2:var M=w?l:l.slice().reverse(),P=w?L:L.slice().reverse(),I=(s=P,M.map((function(t,e){return[t,s[e]]})).filter((function(t){return null!==t[1]}))),T=I.length>1?_a(I):I,z=[];C&&(S?v=I:z=v.reverse());var X=0,R=0;if(function(t,e){for(var i=function(t){var e=[],i=0;return t.forEach((function(t){null!==t?i++:i>0&&(e.push(i),i=0)})),i>0&&e.push(i),e}(t),a=[],s=0,r=0;s4?(e+="C".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]),e+=", ".concat(a[4],", ").concat(a[5])):s>2&&(e+="S".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]))}return e}(t),i=R,a=(R+=t.length)-1;S?x=k.move(I[i][0],I[i][1])+e:C?x=k.move(z[i][0],z[i][1])+k.line(I[i][0],I[i][1])+e+k.line(z[a][0],z[a][1]):(x=k.move(I[i][0],I[i][1])+e,b=x+k.line(I[a][0],A)+k.line(I[i][0],A)+"z",v.push(b)),m.push(x)})),C&&X>1&&!S){var E=m.slice(X).reverse();m.splice(X),E.forEach((function(t){return m.push(t)}))}p=0}break;case"smooth":var Y=.35*(n-u);if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.curve(n,o,n,o,n,c)+k.move(n,c)),b+=k.curve(n,o,n,o,n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o;break;default:var F=function(t,e,i){var a=[];switch(t){case"stepline":a=k.line(e,null,"H")+k.line(null,i,"V");break;case"linestep":a=k.line(null,i,"V")+k.line(e,null,"H");break;case"straight":a=k.line(e,i)}return a};if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.line(n,c)),b+=k.line(n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o}return{linePaths:m,areaPaths:v,pX:u,pY:g,pathState:p,segmentStartX:f,linePath:x,areaPath:b}}},{key:"handleNullDataPoints",value:function(t,e,i,a,s){var r=this.w;if(null===t[i][a]&&r.config.markers.showNullDataPoints||1===t[i].length){var n=this.strokeWidth-r.config.markers.strokeWidth/2;n>0||(n=0);var o=this.markers.plotChartMarkers(e,s,a+1,n,!0);null!==o&&this.elPointsMain.add(o)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,a,s){this.xoffset=e,this.yoffset=i,this.height=s,this.width=a,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],a=this.xoffset,s=this.yoffset,n=r(t)/this.height,o=r(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var a=e/this.height,s=this.width-a;i=new t(this.xoffset+a,this.yoffset,s,this.height)}else{var r=e/this.width,n=this.height-r;i=new t(this.xoffset,this.yoffset+r,this.width,n)}return i}}function e(e,a,s,n,o){n=void 0===n?0:n,o=void 0===o?0:o;var l=i(function(t,e){var i,a=[],s=e/r(t);for(i=0;i=n}(e,l=t[0],o)?(e.push(l),i(t.slice(1),e,s,n)):(h=s.cutArea(r(e),n),n.push(s.getCoordinates(e)),i(t,[],h,n)),n;n.push(s.getCoordinates(e))}function a(t,e){var i=Math.min.apply(Math,t),a=Math.max.apply(Math,t),s=r(t);return Math.max(Math.pow(e,2)*a/Math.pow(s,2),Math.pow(s,2)/(Math.pow(e,2)*i))}function s(t){return t&&t.constructor===Array}function r(t){var e,i=0;for(e=0;er-a&&l.width<=n-s){var h=o.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(h.x," ").concat(h.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,i,a,s,r){var n=new Mi(this.ctx),o=n.getTextRects(t,e).width+this.w.config.stroke.width+5>s-i&&r-a>s-i?r-a:s-i,l=n.getTextBasedOnMaxWidth({text:t,maxWidth:o,fontSize:e});return t.length!==l.length&&o/e<5?"":l}},{key:"animateTreemap",value:function(t,e,i,a){var s=new y(this.ctx);s.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,(function(){s.animationCompleted(t)}))}}]),t}(),ja=86400,Va=10/ja,Ua=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return s(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new zi(this.ctx),r=(e-t)/864e5;this.determineInterval(r),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,r5e4&&(a.globals.disableZoomOut=!0);var n=s.getTimeUnitsfromTimestamp(t,e,this.utc),o=a.globals.gridWidth/r,l=o/24,h=l/60,c=h/60,d=Math.floor(24*r),g=Math.floor(1440*r),p=Math.floor(r*ja),f=Math.floor(r),x=Math.floor(r/30),b=Math.floor(r/365),m={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},v={firstVal:m,currentMillisecond:m.minMillisecond,currentSecond:m.minSecond,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:l,minutesWidthOnXAxis:h,secondsWidthOnXAxis:c,numberOfSeconds:p,numberOfMinutes:g,numberOfHours:d,numberOfDays:f,numberOfMonths:x,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var y=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?u(u({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?u(u({},e),{},{value:t.value}):"minute"===t.unit?u(u({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?u(u({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return y.filter((function(t){var e=1,s=Math.ceil(a.globals.gridWidth/120),r=t.value;void 0!==a.config.xaxis.tickAmount&&(s=a.config.xaxis.tickAmount),y.length>s&&(e=Math.floor(y.length/s));var n=!1,o=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(n=!0);break;case"half_year":e=7,"year"===t.unit&&(n=!0);break;case"months":e=1,"year"===t.unit&&(n=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(n=!0),30===r&&(o=!0);break;case"months_days":e=10,"month"===t.unit&&(n=!0),30===r&&(o=!0);break;case"week_days":e=8,"month"===t.unit&&(n=!0);break;case"days":e=1,"month"===t.unit&&(n=!0);break;case"hours":"day"===t.unit&&(n=!0);break;case"minutes_fives":case"seconds_fives":r%5!=0&&(o=!0);break;case"seconds_tens":r%10!=0&&(o=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!o)return!0}else if((r%e==0||n)&&!o)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,a=this.formatDates(t),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new pa(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.daysWidthOnXAxis,r=t.numberOfYears,n=e.minYear,o=0,l=new zi(this.ctx),h="year";if(e.minDate>1||e.minMonth>0){var c=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(l.determineDaysOfYear(e.minYear)-c+1)*s,n=e.minYear+1,this.timeScaleArray.push({position:o,value:n,unit:h,year:n,month:v.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:o,value:n,unit:h,year:a,month:v.monthMod(i+1)});for(var d=n,u=o,g=0;g1){l=(h.determineDaysOfMonths(a+1,e.minYear)-i+1)*r,o=v.monthMod(a+1);var u=s+d,g=v.monthMod(o),p=o;0===o&&(c="year",p=u,g=1,u+=d+=1),this.timeScaleArray.push({position:l,value:p,unit:c,year:u,month:g})}else this.timeScaleArray.push({position:l,value:o,unit:c,year:s,month:v.monthMod(a)});for(var f=o+1,x=l,b=0,m=1;bn.determineDaysOfMonths(e+1,i)?(h=1,o="month",u=e+=1,e):e},d=(24-e.minHour)*s,u=l,g=c(h,i,a);0===e.minHour&&1===e.minDate?(d=0,u=v.monthMod(e.minMonth),o="month",h=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(d=0,l=e.minDate,u=l,g=c(h=l,i,a)),this.timeScaleArray.push({position:d,value:u,unit:o,year:this._getYear(a,g,0),month:v.monthMod(g),day:h});for(var p=d,f=0;fo.determineDaysOfMonths(e+1,s)&&(f=1,e+=1),{month:e,date:f}},c=function(t,e){return t>o.determineDaysOfMonths(e+1,s)?e+=1:e},d=60-(e.minMinute+e.minSecond/60),u=d*r,g=e.minHour+1,p=g;60===d&&(u=0,p=g=e.minHour);var f=i;p>=24&&(p=0,l="day",g=f+=1);var x=h(f,a).month;x=c(f,x),this.timeScaleArray.push({position:u,value:g,unit:l,day:f,hour:p,year:s,month:v.monthMod(x)}),p++;for(var b=u,m=0;m=24)p=0,l="day",x=h(f+=1,x).month,x=c(f,x);var y=this._getYear(s,x,0);b=60*r+b;var w=0===p?f:p;this.timeScaleArray.push({position:b,value:w,unit:l,hour:p,day:f,year:y,month:v.monthMod(x)}),p++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.minutesWidthOnXAxis,h=t.secondsWidthOnXAxis,c=t.numberOfMinutes,d=a+1,u=r,g=n,p=o,f=s,x=(60-i-e/1e3)*h,b=0;b=60&&(d=0,24===(f+=1)&&(f=0)),this.timeScaleArray.push({position:x,value:d,unit:"minute",hour:f,minute:d,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,d++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.secondsWidthOnXAxis,h=t.numberOfSeconds,c=i+1,d=a,u=r,g=n,p=o,f=s,x=(1e3-e)/1e3*l,b=0;b=60&&(c=0,++d>=60&&(d=0,24===++f&&(f=0))),this.timeScaleArray.push({position:x,value:c,unit:"second",hour:f,minute:d,second:c,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,c++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var a=t.value.toString(),s=new zi(e.ctx),r=e.createRawDateString(t,a),n=s.getDate(s.parseDate(r));if(e.utc||(n=s.getDate(s.parseDateWithTimezone(r))),void 0===i.config.xaxis.labels.format){var o="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(o=l.year),"month"===t.unit&&(o=l.month),"day"===t.unit&&(o=l.day),"hour"===t.unit&&(o=l.hour),"minute"===t.unit&&(o=l.minute),"second"===t.unit&&(o=l.second),a=s.formatDate(n,o)}else a=s.formatDate(n,i.config.xaxis.labels.format);return{dateString:r,position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,a=new Mi(this.ctx),s=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(s=!0,e=a.getTextRects(t[0].value).width);var r=0,n=t.map((function(n,o){if(o>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=s?e:a.getTextRects(t[r].value).width,h=t[r].position;return n.position>h+l+10?(r=o,n):null}return n}));return n=n.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),qa=function(){function t(e,a){i(this,t),this.ctx=a,this.w=a.w,this.el=e}return s(t,[{key:"setupElements",value:function(){var t=this.w,e=t.globals,i=t.config,a=i.chart.type;e.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(a),e.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(a),e.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(a)&&i.plotOptions.bar.horizontal,e.chartClass=".apexcharts".concat(e.chartID),e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),Mi.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas ".concat(e.chartClass.substring(1))}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=window.SVG().addTo(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(i.chart.offsetX,", ").concat(i.chart.offsetY,")")}),e.dom.Paper.node.style.background="dark"!==i.theme.mode||i.chart.background?"light"!==i.theme.mode||i.chart.background?i.chart.background:"#fff":"#424242",this.setSVGDimensions(),e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject"),Mi.setAttrs(e.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap),e.dom.Paper.node.appendChild(e.dom.elLegendForeign),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,a=this.ctx,s=i.config,r=i.globals,n={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},o=s.chart.type||"line",l=null,h=0;r.series.forEach((function(e,a){var s=t[a].type||o;n[s]?("rangeArea"===s?(n[s].series.push(r.seriesRangeStart[a]),n[s].seriesRangeEnd.push(r.seriesRangeEnd[a])):n[s].series.push(e),n[s].i.push(a),"column"!==s&&"bar"!==s||(i.globals.columnSeries=n.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(s)?l=s:"bar"===s?(n.column.series.push(e),n.column.i.push(a)):console.warn("You have specified an unrecognized series type (".concat(s,").")),o!==s&&"scatter"!==s&&h++})),h>0&&(l&&console.warn("Chart or series type ".concat(l," cannot appear with other chart or series types.")),n.column.series.length>0&&s.plotOptions.bar.horizontal&&(h-=n.column.series.length,n.column={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||(r.comboCharts=h>0);var c=new Ba(a,e),d=new Ta(a,e);a.pie=new Ea(a);var u=new Ha(a);a.rangeBar=new Oa(a,e);var g=new Ya(a),p=[];if(r.comboCharts){var x,b,m=new Pi(a);if(n.area.series.length>0)(x=p).push.apply(x,f(m.drawSeriesByGroup(n.area,r.areaGroups,"area",c)));if(n.column.series.length>0)if(s.chart.stacked){var v=new Ia(a,e);p.push(v.draw(n.column.series,n.column.i))}else a.bar=new Pa(a,e),p.push(a.bar.draw(n.column.series,n.column.i));if(n.rangeArea.series.length>0&&p.push(c.draw(n.rangeArea.series,"rangeArea",n.rangeArea.i,n.rangeArea.seriesRangeEnd)),n.line.series.length>0)(b=p).push.apply(b,f(m.drawSeriesByGroup(n.line,r.lineGroups,"line",c)));if(n.candlestick.series.length>0&&p.push(d.draw(n.candlestick.series,"candlestick",n.candlestick.i)),n.boxPlot.series.length>0&&p.push(d.draw(n.boxPlot.series,"boxPlot",n.boxPlot.i)),n.rangeBar.series.length>0&&p.push(a.rangeBar.draw(n.rangeBar.series,n.rangeBar.i)),n.scatter.series.length>0){var y=new Ba(a,e,!0);p.push(y.draw(n.scatter.series,"scatter",n.scatter.i))}if(n.bubble.series.length>0){var w=new Ba(a,e,!0);p.push(w.draw(n.bubble.series,"bubble",n.bubble.i))}}else switch(s.chart.type){case"line":p=c.draw(r.series,"line");break;case"area":p=c.draw(r.series,"area");break;case"bar":if(s.chart.stacked)p=new Ia(a,e).draw(r.series);else a.bar=new Pa(a,e),p=a.bar.draw(r.series);break;case"candlestick":p=new Ta(a,e).draw(r.series,"candlestick");break;case"boxPlot":p=new Ta(a,e).draw(r.series,s.chart.type);break;case"rangeBar":p=a.rangeBar.draw(r.series);break;case"rangeArea":p=c.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":p=new Xa(a,e).draw(r.series);break;case"treemap":p=new Ga(a,e).draw(r.series);break;case"pie":case"donut":case"polarArea":p=a.pie.draw(r.series);break;case"radialBar":p=u.draw(r.series);break;case"radar":p=g.draw(r.series);break;default:p=c.draw(r.series)}return p}},{key:"setSVGDimensions",value:function(){var t=this.w,e=t.globals,i=t.config;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto",e.svgWidth=i.chart.width,e.svgHeight=i.chart.height;var a=v.getDimensions(this.el),s=i.chart.width.toString().split(/[0-9]+/g).pop();"%"===s?v.isNumber(a[0])&&(0===a[0].width&&(a=v.getDimensions(this.el.parentNode)),e.svgWidth=a[0]*parseInt(i.chart.width,10)/100):"px"!==s&&""!==s||(e.svgWidth=parseInt(i.chart.width,10));var r=String(i.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===r){var n=v.getDimensions(this.el.parentNode);e.svgHeight=n[1]*parseInt(i.chart.height,10)/100}else e.svgHeight=parseInt(i.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Mi.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==r){var o=i.chart.sparkline.enabled?0:e.axisCharts?i.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(e.svgHeight+o,"px")}e.dom.elWrap.style.width="".concat(e.svgWidth,"px"),e.dom.elWrap.style.height="".concat(e.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i=t.translateX;Mi.setAttrs(t.dom.elGraphical.node,{transform:"translate(".concat(i,", ").concat(e,")")})}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,a=t.config.chart.sparkline.enabled?1:15;a+=t.config.grid.padding.bottom,["top","bottom"].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(i=new xa(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var s=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*t.globals.radialSize;if(s&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var n=v.getBoundingClientRect(s);r=n.bottom;var o=n.bottom-n.top;r=Math.max(2.05*t.globals.radialSize,o)}var l=Math.ceil(r+e.translateY+i+a);e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).includes("%")||(e.dom.elWrap.style.height="".concat(l,"px"),Mi.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(l,"px"))}},{key:"coreCalculations",value:function(){new ea(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(){return[]}))},i=new Bi,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=e(),a.seriesYvalues=e()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var t=this.w,e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new na(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new na(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Ua(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new Pi(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var i=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];i.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){return t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){return t.updateSourceChart(i)})})),e.config.chart.events.selection=function(t,e){i.forEach((function(t){ApexCharts.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:e.xaxis.min,max:e.xaxis.max}},!1,!1,!1,!1)}))}}}}]),t}(),Za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"_updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(n){var o=[e.ctx];s&&(o=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(o=[e.ctx],e.ctx.w.globals.isExecCalled=!1),o.forEach((function(s,l){var h=s.w;if(h.globals.shouldAnimate=a,i||(h.globals.resized=!0,h.globals.dataChanged=!0,a&&s.series.getPreviousPaths()),t&&"object"===b(t)&&(s.config=new Wi(t),t=Pi.extendArrayProps(s.config,t,h),s.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,h.config=v.extend(h.config,t),r&&(h.globals.lastXAxis=t.xaxis?v.clone(t.xaxis):[],h.globals.lastYAxis=t.yaxis?v.clone(t.yaxis):[],h.globals.initialConfig=v.extend({},h.config),h.globals.initialSeries=v.clone(h.config.series),t.series))){for(var c=0;c2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(s){var r,n=i.w;return n.globals.shouldAnimate=e,n.globals.dataChanged=!0,e&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?(0===(r=t.map((function(t,e){return i._extendSeries(t,e)}))).length&&(r=[{data:[]}]),n.config.series=r):n.config.series=t.slice(),a&&(n.globals.initialConfig.series=v.clone(n.config.series),n.globals.initialSeries=v.clone(n.config.series)),i.ctx.update().then((function(){s(i.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var i=this.w,a=i.config.series[e];return u(u({},i.config.series[e]),{},{name:t.name?t.name:null==a?void 0:a.name,color:t.color?t.color:null==a?void 0:a.color,type:t.type?t.type:null==a?void 0:a.type,group:t.group?t.group:null==a?void 0:a.group,hidden:void 0!==t.hidden?t.hidden:null==a?void 0:a.hidden,data:t.data?t.data:null==a?void 0:a.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(e,"'], ").concat(s," circle[j='").concat(e,"'], ").concat(s," rect[j='").concat(e,"']")):void 0===e&&(a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(t,"']")),"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),a?(new Mi(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new Ni(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;t&&t.xaxis&&(a=t.xaxis),t&&t.yaxis&&(s=t.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;var r=function(t){void 0!==s[t]&&(i.config.yaxis[t].min=s[t].min,i.config.yaxis[t].max=s[t].max)};i.config.yaxis.map((function(t,a){i.globals.zoomed||void 0!==s[a]?r(a):void 0!==e.ctx.opts.yaxis[a]&&(t.min=e.ctx.opts.yaxis[a].min,t.max=e.ctx.opts.yaxis[a].max)}))}}]),t}();!function(){function t(){for(var t=arguments.length>0&&arguments[0]!==h?arguments[0]:[],s=arguments.length>1?arguments[1]:h,r=arguments.length>2?arguments[2]:h,n=arguments.length>3?arguments[3]:h,o=arguments.length>4?arguments[4]:h,l=arguments.length>5?arguments[5]:h,h=arguments.length>6?arguments[6]:h,c=t.slice(s,r||h),d=n.slice(o,l||h),u=0,g={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};;){if(c[u]=e.call(g,c[u]),d[u]=e.call(p,d[u]),c[u][0]!=d[u][0]||"M"==c[u][0]||"A"==c[u][0]&&(c[u][4]!=d[u][4]||c[u][5]!=d[u][5])?(Array.prototype.splice.apply(c,[u,1].concat(a.call(g,c[u]))),Array.prototype.splice.apply(d,[u,1].concat(a.call(p,d[u])))):(c[u]=i.call(g,c[u]),d[u]=i.call(p,d[u])),++u==c.length&&u==d.length)break;u==c.length&&c.push(["C",g.pos[0],g.pos[1],g.pos[0],g.pos[1],g.pos[0],g.pos[1]]),u==d.length&&d.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]])}return{start:c,dest:d}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function i(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function a(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var i,a,s,r,n,o,l,h,c,d,u,g,p,f,x,b,m,v,y,w,k,A,C,S,L,M,P=Math.abs(e[1]),I=Math.abs(e[2]),T=e[3]%360,z=e[4],X=e[5],R=e[6],E=e[7],Y=new bt(t),H=new bt(R,E),O=[];if(0===P||0===I||Y.x===H.x&&Y.y===H.y)return[["C",Y.x,Y.y,H.x,H.y,H.x,H.y]];i=new bt((Y.x-H.x)/2,(Y.y-H.y)/2).transform((new vt).rotate(T)),a=i.x*i.x/(P*P)+i.y*i.y/(I*I),a>1&&(P*=a=Math.sqrt(a),I*=a);s=(new vt).rotate(T).scale(1/P,1/I).rotate(-T),Y=Y.transform(s),H=H.transform(s),r=[H.x-Y.x,H.y-Y.y],o=r[0]*r[0]+r[1]*r[1],n=Math.sqrt(o),r[0]/=n,r[1]/=n,l=o<4?Math.sqrt(1-o/4):0,z===X&&(l*=-1);h=new bt((H.x+Y.x)/2+l*-r[1],(H.y+Y.y)/2+l*r[0]),c=new bt(Y.x-h.x,Y.y-h.y),d=new bt(H.x-h.x,H.y-h.y),u=Math.acos(c.x/Math.sqrt(c.x*c.x+c.y*c.y)),c.y<0&&(u*=-1);g=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(g*=-1);X&&u>g&&(g+=2*Math.PI);!X&&u0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(!1===e)return!1;for(var i=e,a=t.length;i(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class Ja{constructor(t){t.remember("_draggable",this),this.el=t,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(t){t?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(t){const e=!t.type.indexOf("mouse");if(e&&1!==t.which&&0!==t.buttons)return;if(this.el.dispatch("beforedrag",{event:t,handler:this}).defaultPrevented)return;t.preventDefault(),t.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point($a(t));const i=(e?"mouseup":"touchend")+".drag";zt(window,(e?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),zt(window,i,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:t,handler:this,box:this.box})}drag(t){const{box:e,lastClick:i}=this,a=this.el.point($a(t)),s=a.x-i.x,r=a.y-i.y;if(!s&&!r)return e;const n=e.x+s,o=e.y+r;this.box=new kt(n,o,e.w,e.h),this.lastClick=a,this.el.dispatch("dragmove",{event:t,handler:this,box:this.box}).defaultPrevented||this.move(n,o)}move(t,e){"svg"===this.el.type?gi.prototype.move.call(this.el,t,e):this.el.move(t,e)}endDrag(t){this.drag(t),this.el.fire("dragend",{event:t,handler:this,box:this.box}),Xt(window,"mousemove.drag"),Xt(window,"touchmove.drag"),Xt(window,"mouseup.drag"),Xt(window,"touchend.drag"),this.init(!0)}} +"use strict";function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=Array(e);i=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,n=!0,o=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){o=!0,r=t},f:function(){try{n||null==i.return||i.return()}finally{if(o)throw r}}}}function n(t){var i=c();return function(){var a,s=l(t);if(i){var r=l(this).constructor;a=Reflect.construct(s,arguments,r)}else a=s.apply(this,arguments);return function(t,i){if(i&&("object"==typeof i||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return e(t)}(this,a)}}function o(t,e,i){return(e=x(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function d(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function u(t){for(var e=1;e>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-r)*s)+r)+256*(Math.round((a-n)*s)+n)+(Math.round((a-o)*s)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,i){return t.isColorHex(i)?this.shadeHexColor(e,i):this.shadeRGBColor(e,i)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===b(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,i=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var i="",a=t<0?"-":"",s=e[0].replace(".",""),r=Number(e[1])+1;if(r<0){for(i=a+"0.";r++;)i+="0";return i+s.replace(/^-/,"")}for(r-=s.length;r--;)i+="0";return s+i}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),i=t.clientHeight,a=t.clientWidth;return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[a-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),i]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:"x",i=t.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,i){if(i>=t.length)for(var a=i-t.length+1;a--;)t.push(void 0);return t.splice(i,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style.key=e[i])}},{key:"preciseAddition",value:function(t,e){var i=(String(t).split(".")[1]||"").length,a=(String(e).split(".")[1]||"").length,s=Math.pow(10,Math.max(i,a));return(Math.round(t*s)+Math.round(e*s))/s}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*a),e=Math.round(Math.abs(e)*a);e;){var s=e;e=t%e,t=s}return t/a}},{key:"getPrimeFactors",value:function(t){for(var e=[],i=2;t>=2;)t%i==0?(e.push(i),t/=i):i++;return e}},{key:"mod",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*a))%(e=Math.round(Math.abs(e)*a))/a}}]),t}(),y=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"animateLine",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animateMarker",value:function(t,e,i,a){t.attr({opacity:0}).animate(e).attr({opacity:1}).after((function(){a()}))}},{key:"animateRect",value:function(t,e,i,a,s){t.attr(e).animate(a).attr(i).after((function(){return s()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.realIndex,a=t.j,s=t.fill,r=t.pathFrom,n=t.pathTo,o=t.speed,l=t.delay,h=this.w,c=0;h.config.chart.animations.animateGradually.enabled&&(c=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&"bar"!==h.config.chart.type&&(c=0),this.morphSVG(e,i,a,"line"!==h.config.chart.type||h.globals.comboCharts?s:"stroke",r,n,o,l*c)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){var e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,i,a,s,r,n,o){var l=this,h=this.w;s||(s=t.attr("pathFrom")),r||(r=t.attr("pathTo"));var c=function(t){return"radar"===h.config.chart.type&&(n=1),"M 0 ".concat(h.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=c()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=c()),h.globals.shouldAnimate||(n=1),t.plot(s).animate(1,o).plot(s).animate(n,o).plot(r).after((function(){v.isNumber(i)?i===h.globals.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&l.animationCompleted(t):"none"!==a&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&e===h.globals.series.length-1||h.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}]),t}();const w={},k=[];function A(t,e){if(Array.isArray(t))for(const i of t)A(i,e);else if("object"!=typeof t)S(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(const e in t)A(e,t[e])}function C(t){return w[t]||{}}function S(t){k.push(...t)}function L(t,e){let i;const a=t.length,s=[];for(i=0;iz.has(t.nodeName),R=(t,e,i={})=>{const a={...e};for(const t in a)a[t].valueOf()===i[t]&&delete a[t];Object.keys(a).length?t.node.setAttribute("data-svgjs",JSON.stringify(a)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},Y="http://www.w3.org/2000/svg",E="http://www.w3.org/2000/xmlns/",H="http://www.w3.org/1999/xlink",O={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function F(){return O.window}let D=class{};const _={},N="___SYMBOL___ROOT___";function W(t,e=Y){return O.document.createElementNS(e,t)}function B(t,e=!1){if(t instanceof D)return t;if("object"==typeof t)return U(t);if(null==t)return new _[N];if("string"==typeof t&&"<"!==t.charAt(0))return U(O.document.querySelector(t));const i=e?O.document.createElement("div"):W("svg");return i.innerHTML=t,t=U(i.firstChild),i.removeChild(i.firstChild),t}function G(t,e){return e&&(e instanceof O.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:W(t)}function V(t){if(!t)return null;if(t.instance instanceof D)return t.instance;if("#document-fragment"===t.nodeName)return new _.Fragment(t);let e=P(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":_[e]||(e="Dom"),new _[e](t)}let U=V;function q(t,e=t.name,i=!1){return _[e]=t,i&&(_[N]=t),S(Object.getOwnPropertyNames(t.prototype)),t}let Z=1e3;function $(t){return"Svgjs"+P(t)+Z++}function J(t){for(let e=t.children.length-1;e>=0;e--)J(t.children[e]);return t.id?(t.id=$(t.nodeName),t):t}function Q(t,e){let i,a;for(a=(t=Array.isArray(t)?t:[t]).length-1;a>=0;a--)for(i in e)t[a].prototype[i]=e[i]}function K(t){return function(...e){const i=e[e.length-1];return!i||i.constructor!==Object||i instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(i)}}A("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=B(t)).before(this),this},insertAfter:function(t){return(t=B(t)).after(this),this}});const tt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,et=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,it=/rgb\((\d+),(\d+),(\d+)\)/,at=/(#[a-z_][a-z0-9\-_]*)/i,st=/\)\s*,?\s*/,rt=/\s/g,nt=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ot=/^rgb\(/,lt=/^(\s+)?$/,ht=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ct=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,dt=/[\s,]+/,ut=/[MLHVCSQTAZ]/i;function gt(t){const e=Math.round(t),i=Math.max(0,Math.min(255,e)).toString(16);return 1===i.length?"0"+i:i}function pt(t,e){for(let i=e.length;i--;)if(null==t[e[i]])return!1;return!0}function ft(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}A("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(dt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),A("Dom",{css:function(t,e){const i={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);i[e[0]]=e[1]})),i;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;i[e]=this.node.style.getPropertyValue(t)}return i}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||lt.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||lt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),A("Dom",{data:function(t,e,i){if(null==t)return this.data(L(function(t,e){let i;const a=t.length,s=[];for(i=0;i0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const i of t)e[i]=this.data(i);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===i||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),A("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class xt{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof xt||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:i,round:a,sin:s,PI:r}=Math;if("vibrant"===t){const t=24*i()+57,e=38*i()+45,a=360*i();return new xt(t,e,a,"lch")}if("sine"===t){const t=a(80*s(2*r*(e=null==e?i():e)/.5+.01)+150),n=a(50*s(2*r*e/.5+4.6)+200),o=a(100*s(2*r*e/.5+2.3)+150);return new xt(t,n,o)}if("pastel"===t){const t=8*i()+86,e=17*i()+9,a=360*i();return new xt(t,e,a,"lch")}if("dark"===t){const t=10+10*i(),e=50*i()+86,a=360*i();return new xt(t,e,a,"lch")}if("rgb"===t){const t=255*i(),e=255*i(),a=255*i();return new xt(t,e,a)}if("lab"===t){const t=100*i(),e=256*i()-128,a=256*i()-128;return new xt(t,e,a,"lab")}if("grey"===t){const t=255*i();return new xt(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(nt.test(t)||ot.test(t))}cmyk(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.min(1-a,1-s,1-r);if(1===n)return new xt(0,0,0,1,"cmyk");return new xt((1-a-n)/(1-n),(1-s-n)/(1-n),(1-r-n)/(1-n),n,"cmyk")}hsl(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.max(a,s,r),o=Math.min(a,s,r),l=(n+o)/2,h=n===o,c=n-o;return new xt(360*(h?0:n===a?((s-r)/c+(s.5?c/(2-n-o):c/(n+o)),100*l,"hsl")}init(t=0,e=0,i=0,a=0,s="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)s="string"==typeof a?a:s,a="string"==typeof a?0:a,Object.assign(this,{_a:t,_b:e,_c:i,_d:a,space:s});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const i=function(t,e){const i=pt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:pt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:pt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:pt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:pt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:pt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return i.space=e||i.space,i}(t,e);Object.assign(this,i)}else if("string"==typeof t)if(ot.test(t)){const e=t.replace(rt,""),[i,a,s]=it.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}else{if(!nt.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,i,a,s]=et.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}}const{_a:r,_b:n,_c:o,_d:l}=this,h="rgb"===this.space?{r:r,g:n,b:o}:"xyz"===this.space?{x:r,y:n,z:o}:"hsl"===this.space?{h:r,s:n,l:o}:"lab"===this.space?{l:r,a:n,b:o}:"lch"===this.space?{l:r,c:n,h:o}:"cmyk"===this.space?{c:r,m:n,y:o,k:l}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:i}=this.xyz();return new xt(116*e-16,500*(t-e),200*(e-i),"lab")}lch(){const{l:t,a:e,b:i}=this.lab(),a=Math.sqrt(e**2+i**2);let s=180*Math.atan2(i,e)/Math.PI;s<0&&(s*=-1,s=360-s);return new xt(t,a,s,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:a,a:s,b:r}=this;if("lch"===this.space){const{c:t,h:e}=this,i=Math.PI/180;s=t*Math.cos(i*e),r=t*Math.sin(i*e)}const n=(a+16)/116,o=s/500+n,l=n-r/200,h=16/116,c=.008856,d=7.787;t=.95047*(o**3>c?o**3:(o-h)/d),e=1*(n**3>c?n**3:(n-h)/d),i=1.08883*(l**3>c?l**3:(l-h)/d)}const a=3.2406*t+-1.5372*e+-.4986*i,s=-.9689*t+1.8758*e+.0415*i,r=.0557*t+-.204*e+1.057*i,n=Math.pow,o=.0031308,l=a>o?1.055*n(a,1/2.4)-.055:12.92*a,h=s>o?1.055*n(s,1/2.4)-.055:12.92*s,c=r>o?1.055*n(r,1/2.4)-.055:12.92*r;return new xt(255*l,255*h,255*c)}if("hsl"===this.space){let{h:t,s:e,l:i}=this;if(t/=360,e/=100,i/=100,0===e){i*=255;return new xt(i,i,i)}const a=i<.5?i*(1+e):i+e-i*e,s=2*i-a,r=255*ft(s,a,t+1/3),n=255*ft(s,a,t),o=255*ft(s,a,t-1/3);return new xt(r,n,o)}if("cmyk"===this.space){const{c:t,m:e,y:i,k:a}=this,s=255*(1-Math.min(1,t*(1-a)+a)),r=255*(1-Math.min(1,e*(1-a)+a)),n=255*(1-Math.min(1,i*(1-a)+a));return new xt(s,r,n)}return this;var t}toArray(){const{_a:t,_b:e,_c:i,_d:a,space:s}=this;return[t,e,i,a,s]}toHex(){const[t,e,i]=this._clamped().map(gt);return`#${t}${e}${i}`}toRgb(){const[t,e,i]=this._clamped();return`rgb(${t},${e},${i})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,o=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,l=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,h=(.4124*n+.3576*o+.1805*l)/.95047,c=(.2126*n+.7152*o+.0722*l)/1,d=(.0193*n+.1192*o+.9505*l)/1.08883,u=h>.008856?Math.pow(h,1/3):7.787*h+16/116,g=c>.008856?Math.pow(c,1/3):7.787*c+16/116,p=d>.008856?Math.pow(d,1/3):7.787*d+16/116;return new xt(u,g,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:i}=this.rgb(),{max:a,min:s,round:r}=Math;return[t,e,i].map((t=>a(0,s(r(t),255))))}}class bt{constructor(...t){this.init(...t)}clone(){return new bt(this)}init(t,e){const i=0,a=0,s=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==s.x?i:s.x,this.y=null==s.y?a:s.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){vt.isMatrixLike(t)||(t=new vt(t));const{x:e,y:i}=this;return this.x=t.a*e+t.c*i+t.e,this.y=t.b*e+t.d*i+t.f,this}}function mt(t,e,i){return Math.abs(e-t)<(i||1e-6)}class vt{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,i=t.flip&&(e||"x"===t.flip)?-1:1,a=t.flip&&(e||"y"===t.flip)?-1:1,s=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,r=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,n=t.scale&&t.scale.length?t.scale[0]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleX)?t.scaleX*i:i,o=t.scale&&t.scale.length?t.scale[1]*a:isFinite(t.scale)?t.scale*a:isFinite(t.scaleY)?t.scaleY*a:a,l=t.shear||0,h=t.rotate||t.theta||0,c=new bt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),d=c.x,u=c.y,g=new bt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=g.x,f=g.y,x=new bt(t.translate||t.tx||t.translateX,t.ty||t.translateY),b=x.x,m=x.y,v=new bt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:n,scaleY:o,skewX:s,skewY:r,shear:l,theta:h,rx:v.x,ry:v.y,tx:b,ty:m,ox:d,oy:u,px:p,py:f}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,i){const a=t.a*e.a+t.c*e.b,s=t.b*e.a+t.d*e.b,r=t.a*e.c+t.c*e.d,n=t.b*e.c+t.d*e.d,o=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return i.a=a,i.b=s,i.c=r,i.d=n,i.e=o,i.f=l,i}around(t,e,i){return this.clone().aroundO(t,e,i)}aroundO(t,e,i){const a=t||0,s=e||0;return this.translateO(-a,-s).lmultiplyO(i).translateO(a,s)}clone(){return new vt(this)}decompose(t=0,e=0){const i=this.a,a=this.b,s=this.c,r=this.d,n=this.e,o=this.f,l=i*r-a*s,h=l>0?1:-1,c=h*Math.sqrt(i*i+a*a),d=Math.atan2(h*a,h*i),u=180/Math.PI*d,g=Math.cos(d),p=Math.sin(d),f=(i*s+a*r)/l,x=s*c/(f*i-a)||r*c/(f*a+i);return{scaleX:c,scaleY:x,shear:f,rotate:u,translateX:n-t+t*g*c+e*(f*g*c-p*x),translateY:o-e+t*p*c+e*(f*p*c+g*x),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new vt(t);return mt(this.a,e.a)&&mt(this.b,e.b)&&mt(this.c,e.c)&&mt(this.d,e.d)&&mt(this.e,e.e)&&mt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=vt.fromArray([1,0,0,1,0,0]);return t=t instanceof Gt?t.matrixify():"string"==typeof t?vt.fromArray(t.split(dt).map(parseFloat)):Array.isArray(t)?vt.fromArray(t):"object"==typeof t&&vt.isMatrixLike(t)?t:"object"==typeof t?(new vt).transform(t):6===arguments.length?vt.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,i=this.c,a=this.d,s=this.e,r=this.f,n=t*a-e*i;if(!n)throw new Error("Cannot invert "+this);const o=a/n,l=-e/n,h=-i/n,c=t/n,d=-(o*s+h*r),u=-(l*s+c*r);return this.a=o,this.b=l,this.c=h,this.d=c,this.e=d,this.f=u,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(this,e,this)}rotate(t,e,i){return this.clone().rotateO(t,e,i)}rotateO(t,e=0,i=0){t=M(t);const a=Math.cos(t),s=Math.sin(t),{a:r,b:n,c:o,d:l,e:h,f:c}=this;return this.a=r*a-n*s,this.b=n*a+r*s,this.c=o*a-l*s,this.d=l*a+o*s,this.e=h*a-c*s+i*s-e*a+e,this.f=c*a+h*s-e*s-i*a+i,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t);const{a:s,b:r,c:n,d:o,e:l,f:h}=this;return this.a=s*t,this.b=r*e,this.c=n*t,this.d=o*e,this.e=l*t-i*t+i,this.f=h*e-a*e+a,this}shear(t,e,i){return this.clone().shearO(t,e,i)}shearO(t,e=0,i=0){const{a:a,b:s,c:r,d:n,e:o,f:l}=this;return this.a=a+s*t,this.c=r+n*t,this.e=o+l*t-i*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t),t=M(t),e=M(e);const s=Math.tan(t),r=Math.tan(e),{a:n,b:o,c:l,d:h,e:c,f:d}=this;return this.a=n+o*s,this.b=o+n*r,this.c=l+h*s,this.d=h+l*r,this.e=c+d*s-a*s,this.f=d+c*r-i*r,this}skewX(t,e,i){return this.skew(t,0,e,i)}skewY(t,e,i){return this.skew(0,t,e,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(vt.isMatrixLike(t)){return new vt(t).multiplyO(this)}const e=vt.formatTransforms(t),{x:i,y:a}=new bt(e.ox,e.oy).transform(this),s=(new vt).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-i,-a).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(i,a);if(isFinite(e.px)||isFinite(e.py)){const t=new bt(i,a).transform(s),r=isFinite(e.px)?e.px-t.x:0,n=isFinite(e.py)?e.py-t.y:0;s.translateO(r,n)}return s.translateO(e.tx,e.ty),s}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function yt(){if(!yt.nodes){const t=B().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;yt.nodes={svg:t,path:e}}if(!yt.nodes.svg.node.parentNode){const t=O.document.body||O.document.documentElement;yt.nodes.svg.addTo(t)}return yt.nodes}function wt(t){return!(t.width||t.height||t.x||t.y)}q(vt,"Matrix");class kt{constructor(...t){this.init(...t)}addOffset(){return this.x+=O.window.pageXOffset,this.y+=O.window.pageYOffset,new kt(this)}init(t){return t="string"==typeof t?t.split(dt).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return wt(this)}merge(t){const e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),a=Math.max(this.x+this.width,t.x+t.width)-e,s=Math.max(this.y+this.height,t.y+t.height)-i;return new kt(e,i,a,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof vt||(t=new vt(t));let e=1/0,i=-1/0,a=1/0,s=-1/0;return[new bt(this.x,this.y),new bt(this.x2,this.y),new bt(this.x,this.y2),new bt(this.x2,this.y2)].forEach((function(r){r=r.transform(t),e=Math.min(e,r.x),i=Math.max(i,r.x),a=Math.min(a,r.y),s=Math.max(s,r.y)})),new kt(e,a,i-e,s-a)}}function At(t,e,i){let a;try{if(a=e(t.node),wt(a)&&((s=t.node)!==O.document&&!(O.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===O.document}).call(O.document.documentElement,s)))throw new Error("Element not in the dom")}catch(e){a=i(t)}var s;return a}A({viewbox:{viewbox(t,e,i,a){return null==t?new kt(this.attr("viewBox")):this.attr("viewBox",new kt(t,e,i,a))},zoom(t,e){let{width:i,height:a}=this.attr(["width","height"]);if((i||a)&&"string"!=typeof i&&"string"!=typeof a||(i=this.node.clientWidth,a=this.node.clientHeight),!i||!a)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const s=this.viewbox(),r=i/s.width,n=a/s.height,o=Math.min(r,n);if(null==t)return o;let l=o/t;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new bt(i/2/r+s.x,a/2/n+s.y);const h=new kt(s).transform(new vt({scale:l,origin:e}));return this.viewbox(h)}}}),q(kt,"Box");class Ct extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}Q([Ct],{each(t,...e){return"function"==typeof t?this.map(((e,i,a)=>t.call(e,e,i,a))):this.map((i=>i[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const St=["toArray","constructor","each"];function Lt(t,e){return new Ct(L((e||O.document).querySelectorAll(t),(function(t){return V(t)})))}Ct.extend=function(t){t=t.reduce(((t,e)=>(St.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),Q([Ct],t)};let Mt=0;const Pt={};function It(t){let e=t.getEventHolder();return e===O.window&&(e=Pt),e.events||(e.events={}),e.events}function Tt(t){return t.getEventTarget()}function zt(t,e,i,a,s){const r=i.bind(a||t),n=B(t),o=It(n),l=Tt(n);e=Array.isArray(e)?e:e.split(dt),i._svgjsListenerId||(i._svgjsListenerId=++Mt),e.forEach((function(t){const e=t.split(".")[0],a=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][a]=o[e][a]||{},o[e][a][i._svgjsListenerId]=r,l.addEventListener(e,r,s||!1)}))}function Xt(t,e,i,a){const s=B(t),r=It(s),n=Tt(s);("function"!=typeof i||(i=i._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(dt)).forEach((function(t){const e=t&&t.split(".")[0],o=t&&t.split(".")[1];let l,h;if(i)r[e]&&r[e][o||"*"]&&(n.removeEventListener(e,r[e][o||"*"][i],a||!1),delete r[e][o||"*"][i]);else if(e&&o){if(r[e]&&r[e][o]){for(h in r[e][o])Xt(n,[e,o].join("."),h);delete r[e][o]}}else if(o)for(t in r)for(l in r[t])o===l&&Xt(n,[t,o].join("."));else if(e){if(r[e]){for(l in r[e])Xt(n,[e,l].join("."));delete r[e]}}else{for(t in r)Xt(n,t);!function(t){let e=t.getEventHolder();e===O.window&&(e=Pt),e.events&&(e.events={})}(s)}}))}class Rt extends D{addEventListener(){}dispatch(t,e,i){return function(t,e,i,a){const s=Tt(t);return e instanceof O.window.Event||(e=new O.window.CustomEvent(e,{detail:i,cancelable:!0,...a})),s.dispatchEvent(e),e}(this,t,e,i)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const i=e[t.type];for(const e in i)for(const a in i[e])i[e][a](t);return!t.defaultPrevented}fire(t,e,i){return this.dispatch(t,e,i),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,i){return Xt(this,t,e,i),this}on(t,e,i,a){return zt(this,t,e,i,a),this}removeEventListener(){}}function Yt(){}q(Rt,"EventTarget");const Et=400,Ht=">",Ot=0,Ft={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Dt extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(dt).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class _t{constructor(...t){this.init(...t)}convert(t){return new _t(this.value,t)}divide(t){return t=new _t(t),new _t(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(tt))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof _t&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new _t(t),new _t(this-t,this.unit||t.unit)}plus(t){return t=new _t(t),new _t(this+t,this.unit||t.unit)}times(t){return t=new _t(t),new _t(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Nt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Wt=[];class Bt extends Rt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=B(t)).removeNamespace&&this.node instanceof O.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return B(t).put(this,e)}children(){return new Ct(L(this.node.children,(function(t){return V(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let i=this.node.cloneNode(t);return e&&(i=J(i)),new this.constructor(i)}each(t,e){const i=this.children();let a,s;for(a=0,s=i.length;a=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=$(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return V(this.node.lastChild)}matches(t){const e=this.node,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return i&&i.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=V(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=V(e.node.parentNode));return e}put(t,e){return t=B(t),this.add(t,e),t}putIn(t,e){return B(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=B(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const i=10**t,a=this.attr(e);for(const t in a)"number"==typeof a[t]&&(a[t]=Math.round(a[t]*i)/i);return this.attr(a),this}svg(t,e){return this.xml(t,e,Y)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const i=e.index(this);return e.put(t,i).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let i=this;if(null!=t){if(i=V(i.node.cloneNode(!0)),e){const e=t(i);if(i=e||i,!1===e)return""}i.each((function(){const e=t(this),i=e||this;!1===e?this.remove():e&&this!==i&&this.replace(i)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;const a=W("wrapper",i),s=O.document.createDocumentFragment();a.innerHTML=t;for(let t=a.children.length;t--;)s.appendChild(a.firstElementChild);const r=this.parent();return e?this.replace(s)&&r:this.add(s)}}Q(Bt,{attr:function(t,e,i){if(null==t){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=ht.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ft[t]:ht.test(e)?parseFloat(e):e;"number"==typeof(e=Wt.reduce(((e,i)=>i(t,e,this)),e))?e=new _t(e):Nt.has(t)&&xt.isColor(e)?e=new xt(e):e.constructor===Array&&(e=new Dt(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return Lt(t,this.node)},findOne:function(t){return V(this.node.querySelector(t))}}),q(Bt,"Dom");class Gt extends Bt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new _t(t).plus(this.x()))}dy(t=0){return this.y(new _t(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=B(t));const i=new Ct;let a=this;for(;(a=a.parent())&&a.node!==O.document&&"#document-fragment"!==a.nodeName&&(i.push(a),e||a.node!==t.node)&&(!e||!a.matches(t));)if(a.node===this.root().node)return null;return i}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(at);return e?B(e[1]):null}root(){const t=this.parent(function(t){return _[t]}(N));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const i=I(this,t,e);return this.width(new _t(i.width)).height(new _t(i.height))}width(t){return this.attr("width",t)}writeDataToDom(){return R(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}Q(Gt,{bbox:function(){const t=At(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(yt().svg).show(),i=e.node.getBBox();return e.remove(),i}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new kt(t)},rbox:function(t){const e=At(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),i=new kt(e);return t?i.transform(t.screenCTM().inverseO()):i.addOffset()},inside:function(t,e){const i=this.bbox();return t>i.x&&e>i.y&&t=0;i--)null!=e[jt[t][i]]&&this.attr(jt.prefix(t,jt[t][i]),e[jt[t][i]]);return this},A(["Element","Runner"],e)})),A(["Element","Runner"],{matrix:function(t,e,i,a,s,r){return null==t?new vt(this):this.attr("transform",new vt(t,e,i,a,s,r))},rotate:function(t,e,i){return this.transform({rotate:t,ox:e,oy:i},!0)},skew:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:i},!0):this.transform({skew:[t,e],ox:i,oy:a},!0)},shear:function(t,e,i){return this.transform({shear:t,ox:e,oy:i},!0)},scale:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:i},!0):this.transform({scale:[t,e],ox:i,oy:a},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),A("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new _t(t)):this.rx(t).ry(e)}}),A("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new bt(this.node.getPointAtLength(t))}}),A(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});A("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),A("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){const t=(this.attr("transform")||"").split(st).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(dt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(vt.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new vt);return t},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);const i=this.screenCTM(),a=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(a.multiply(i)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new vt(this).decompose();return null==t?e:e[t]}vt.isMatrixLike(t)||(t={...t,origin:T(t,this)});const i=new vt(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});class Vt extends Gt{flatten(){return this.each((function(){if(this instanceof Vt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(i,a){return a[a.length-i-1].toParent(t,e)})),this.remove()}}q(Vt,"Container");class Ut extends Vt{constructor(t,e=t){super(G("defs",t),e)}flatten(){return this}ungroup(){return this}}q(Ut,"Defs");class qt extends Gt{}function Zt(t){return this.attr("rx",t)}function $t(t){return this.attr("ry",t)}function Jt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Qt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Kt(t){return this.attr("cx",t)}function te(t){return this.attr("cy",t)}function ee(t){return null==t?2*this.rx():this.rx(new _t(t).divide(2))}function ie(t){return null==t?2*this.ry():this.ry(new _t(t).divide(2))}q(qt,"Shape");var ae=Object.freeze({__proto__:null,cx:Kt,cy:te,height:ie,rx:Zt,ry:$t,width:ee,x:Jt,y:Qt});class se extends qt{constructor(t,e=t){super(G("ellipse",t),e)}size(t,e){const i=I(this,t,e);return this.rx(new _t(i.width).divide(2)).ry(new _t(i.height).divide(2))}}Q(se,ae),A("Container",{ellipse:K((function(t=0,e=t){return this.put(new se).size(t,e).move(0,0)}))}),q(se,"Ellipse");class re extends Bt{constructor(t=O.document.createDocumentFragment()){super(t)}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){const t=new Bt(W("wrapper",i));return t.add(this.node.cloneNode(!0)),t.xml(!1,i)}return super.xml(t,!1,i)}}function ne(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new _t(t),fy:new _t(e)}):this.attr({x1:new _t(t),y1:new _t(e)})}function oe(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new _t(t),cy:new _t(e)}):this.attr({x2:new _t(t),y2:new _t(e)})}q(re,"Fragment");var le=Object.freeze({__proto__:null,from:ne,to:oe});class he extends Vt{constructor(t,e){super(G(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,i){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}Q(he,le),A({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:K((function(t,e){return this.put(new he(t)).update(e)}))}}),q(he,"Gradient");class ce extends Vt{constructor(t,e=t){super(G("pattern",t),e)}attr(t,e,i){return"transform"===t&&(t="patternTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}A({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:K((function(t,e,i){return this.put(new ce).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),q(ce,"Pattern");let de=class extends qt{constructor(t,e=t){super(G("image",t),e)}load(t,e){if(!t)return this;const i=new O.window.Image;return zt(i,"load",(function(t){const a=this.parent(ce);0===this.width()&&0===this.height()&&this.size(i.width,i.height),a instanceof ce&&0===a.width()&&0===a.height()&&a.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),zt(i,"load error",(function(){Xt(i)})),this.attr("href",i.src=t,H)}};var ue;ue=function(t,e,i){return"fill"!==t&&"stroke"!==t||ct.test(e)&&(e=i.root().defs().image(e)),e instanceof de&&(e=i.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Wt.push(ue),A({Container:{image:K((function(t,e){return this.put(new de).size(0,0).load(t,e)}))}}),q(de,"Image");class ge extends Dt{bbox(){let t=-1/0,e=-1/0,i=1/0,a=1/0;return this.forEach((function(s){t=Math.max(s[0],t),e=Math.max(s[1],e),i=Math.min(s[0],i),a=Math.min(s[1],a)})),new kt(i,a,t-i,e-a)}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let i=this.length-1;i>=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(dt).map(parseFloat)).length%2!=0&&t.pop();for(let i=0,a=t.length;i=0;i--)a.width&&(this[i][0]=(this[i][0]-a.x)*t/a.width+a.x),a.height&&(this[i][1]=(this[i][1]-a.y)*e/a.height+a.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,i=this.length;e":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,i,a){return function(s){return s<0?t>0?e/t*s:i>0?a/i*s:0:s>1?i<1?(1-a)/(1-i)*s+(a-i)/(1-i):t<1?(1-e)/(1-t)*s+(e-t)/(1-t):1:3*s*(1-s)**2*e+3*s**2*(1-s)*a+s**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let i=t;return"none"===e?--i:"both"===e&&++i,(a,s=!1)=>{let r=Math.floor(a*t);const n=a*r%1==0;return"start"!==e&&"both"!==e||++r,s&&n&&--r,a>=0&&r<0&&(r=0),a<=1&&r>i&&(r=i),r/i}}};class ye{done(){return!1}}class we extends ye{constructor(t=Ht){super(),this.ease=ve[t]||t}step(t,e,i){return"number"!=typeof t?i<1?t:e:t+(e-t)*this.ease(i)}}class ke extends ye{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,i,a){return this.stepper(t,e,i,a)}}function Ae(){const t=(this._duration||500)/1e3,e=this._overshoot||0,i=Math.PI,a=Math.log(e/100+1e-10),s=-a/Math.sqrt(i*i+a*a),r=3.9/(s*t);this.d=2*s*r,this.k=r*r}Q(class extends ke{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;i>100&&(i=16),i/=1e3;const s=a.velocity||0,r=-this.d*s-this.k*(t-e),n=t+s*i+r*i*i/2;return a.velocity=s+r*i,a.done=Math.abs(e-n)+Math.abs(s)<.002,a.done?e:n}},{duration:me("_duration",Ae),overshoot:me("_overshoot",Ae)});Q(class extends ke{constructor(t=.1,e=.01,i=0,a=1e3){super(),this.p(t).i(e).d(i).windup(a)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;const s=e-t;let r=(a.integral||0)+s*i;const n=(s-(a.error||0))/i,o=this._windup;return!1!==o&&(r=Math.max(-o,Math.min(r,o))),a.error=s,a.integral=r,a.done=Math.abs(s)<.001,a.done?e:t+(this.P*s+this.I*r+this.D*n)}},{windup:me("_windup"),p:me("P"),i:me("I"),d:me("D")});const Ce={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Se={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Le="mlhvqtcsaz".split("");for(let t=0,e=Le.length;t=0;a--)i=this[a][0],"M"===i||"L"===i||"T"===i?(this[a][1]+=t,this[a][2]+=e):"H"===i?this[a][1]+=t:"V"===i?this[a][1]+=e:"C"===i||"S"===i||"Q"===i?(this[a][1]+=t,this[a][2]+=e,this[a][3]+=t,this[a][4]+=e,"C"===i&&(this[a][5]+=t,this[a][6]+=e)):"A"===i&&(this[a][6]+=t,this[a][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let i=0,a="";const s={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new bt,p:new bt};for(;s.lastToken=a,a=t.charAt(i++);)if(s.inSegment||!Pe(s,a))if("."!==a)if(isNaN(parseInt(a)))if(Re.has(a))s.inNumber&&Ie(s,!1);else if("-"!==a&&"+"!==a)if("E"!==a.toUpperCase()){if(ut.test(a)){if(s.inNumber)Ie(s,!1);else{if(!Me(s))throw new Error("parser Error");Te(s)}--i}}else s.number+=a,s.hasExponent=!0;else{if(s.inNumber&&!Xe(s)){Ie(s,!1),--i;continue}s.number+=a,s.inNumber=!0}else{if("0"===s.number||ze(s)){s.inNumber=!0,s.number=a,Ie(s,!0);continue}s.inNumber=!0,s.number+=a}else{if(s.pointSeen||s.hasExponent){Ie(s,!1),--i;continue}s.inNumber=!0,s.pointSeen=!0,s.number+=a}return s.inNumber&&Ie(s,!1),s.inSegment&&Me(s)&&Te(s),s.segments}(t)}size(t,e){const i=this.bbox();let a,s;for(i.width=0===i.width?1:i.width,i.height=0===i.height?1:i.height,a=this.length-1;a>=0;a--)s=this[a][0],"M"===s||"L"===s||"T"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y):"H"===s?this[a][1]=(this[a][1]-i.x)*t/i.width+i.x:"V"===s?this[a][1]=(this[a][1]-i.y)*e/i.height+i.y:"C"===s||"S"===s||"Q"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y,this[a][3]=(this[a][3]-i.x)*t/i.width+i.x,this[a][4]=(this[a][4]-i.y)*e/i.height+i.y,"C"===s&&(this[a][5]=(this[a][5]-i.x)*t/i.width+i.x,this[a][6]=(this[a][6]-i.y)*e/i.height+i.y)):"A"===s&&(this[a][1]=this[a][1]*t/i.width,this[a][2]=this[a][2]*e/i.height,this[a][6]=(this[a][6]-i.x)*t/i.width+i.x,this[a][7]=(this[a][7]-i.y)*e/i.height+i.y);return this}toString(){return function(t){let e="";for(let i=0,a=t.length;i{const e=typeof t;return"number"===e?_t:"string"===e?xt.isColor(t)?xt:dt.test(t)?ut.test(t)?Ye:Dt:tt.test(t)?_t:Oe:Ne.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Dt:"object"===e?_e:Oe};class He{constructor(t){this._stepper=t||new we("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Ee(t));let e=new this._type(t);return this._type===xt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===_e&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Oe{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Fe{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Fe.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Fe.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const De=(t,e)=>t[0]e[0]?1:0;class _e{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let i=0,a=e.length;it.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const i=e.shift(),a=e.shift(),s=e.shift(),r=e.splice(0,s);t[i]=new a(r)}return t}}const Ne=[Oe,Fe,_e];class We extends qt{constructor(t,e=t){super(G("path",t),e)}array(){return this._array||(this._array=new Ye(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Ye(t))}size(t,e){const i=I(this,t,e);return this.attr("d",this.array().size(i.width,i.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}We.prototype.MorphArray=Ye,A({Container:{path:K((function(t){return this.put(new We).plot(t||new Ye)}))}}),q(We,"Path");var Be=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new ge(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new ge(t))},size:function(t,e){const i=I(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}});class Ge extends qt{constructor(t,e=t){super(G("polygon",t),e)}}A({Container:{polygon:K((function(t){return this.put(new Ge).plot(t||new ge)}))}}),Q(Ge,fe),Q(Ge,Be),q(Ge,"Polygon");class je extends qt{constructor(t,e=t){super(G("polyline",t),e)}}A({Container:{polyline:K((function(t){return this.put(new je).plot(t||new ge)}))}}),Q(je,fe),Q(je,Be),q(je,"Polyline");class Ve extends qt{constructor(t,e=t){super(G("rect",t),e)}}Q(Ve,{rx:Zt,ry:$t}),A({Container:{rect:K((function(t,e){return this.put(new Ve).size(t,e)}))}}),q(Ve,"Rect");class Ue{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const qe={nextDraw:null,frames:new Ue,timeouts:new Ue,immediates:new Ue,timer:()=>O.window.performance||O.window.Date,transforms:[],frame(t){const e=qe.frames.push({run:t});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},timeout(t,e){e=e||0;const i=qe.timer().now()+e,a=qe.timeouts.push({run:t,time:i});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),a},immediate(t){const e=qe.immediates.push(t);return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},cancelFrame(t){null!=t&&qe.frames.remove(t)},clearTimeout(t){null!=t&&qe.timeouts.remove(t)},cancelImmediate(t){null!=t&&qe.immediates.remove(t)},_draw(t){let e=null;const i=qe.timeouts.last();for(;(e=qe.timeouts.shift())&&(t>=e.time?e.run():qe.timeouts.push(e),e!==i););let a=null;const s=qe.frames.last();for(;a!==s&&(a=qe.frames.shift());)a.run(t);let r=null;for(;r=qe.immediates.shift();)r();qe.nextDraw=qe.timeouts.first()||qe.frames.first()?O.window.requestAnimationFrame(qe._draw):null}},Ze=function(t){const e=t.start,i=t.runner.duration();return{start:e,duration:i,end:e+i,runner:t.runner}},$e=function(){const t=O.window;return(t.performance||t.Date).now()};class Je extends Rt{constructor(t=$e){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const i=Math.abs(e);return this.speed(t?-i:i)}schedule(t,e,i){if(null==t)return this._runners.map(Ze);let a=0;const s=this.getEndTime();if(e=e||0,null==i||"last"===i||"after"===i)a=s;else if("absolute"===i||"start"===i)a=e,e=0;else if("now"===i)a=this._time;else if("relative"===i){const i=this.getRunnerInfoById(t.id);i&&(a=i.start+e,e=0)}else{if("with-last"!==i)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();a=t?t.start:this._time}}t.unschedule(),t.timeline(this);const r=t.persist(),n={persist:null===r?this._persist:r,start:a+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(n),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return qe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let i=e-this._lastSourceTime;t&&(i=0);const a=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=a,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],i=e.runner;this._time-e.start<=0&&i.reset()}let s=!1;for(let t=0,e=this._runners.length;t0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}A({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Je,this._timeline):(this._timeline=t,this)}}});class Qe extends Rt{constructor(t){super(),this.id=Qe.id++,t="function"==typeof(t=null==t?Et:t)?new ke(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ke,this._stepper=this._isDeclarative?t:new we,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new vt,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,i){let a=1,s=!1,r=0;return e=e??Ot,i=i||"last","object"!=typeof(t=t??Et)||t instanceof ye||(e=t.delay??e,i=t.when??i,s=t.swing||s,a=t.times??a,r=t.wait??r,t=t.duration??Et),{duration:t,delay:e,swing:s,times:a,wait:r,when:i}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,i){const a=Qe.sanitise(t,e,i),s=new Qe(a.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(a).schedule(a.delay,a.when)}clearTransform(){return this.transforms=new vt,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new we(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,i){return"object"==typeof t&&(e=t.swing,i=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=i||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),i=(this._time-t*e)/this._duration;return Math.min(t+i,this._times)}const i=t%1,a=e*Math.floor(t)+this._duration*i;return this.time(a)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,i=this._duration,a=this._wait,s=this._times,r=this._swing,n=this._reverse;let o;if(null==t){const t=function(t){const e=r*Math.floor(t%(2*(a+i))/(a+i)),s=e&&!n||!e&&n,o=Math.pow(-1,s)*(t%(a+i))/i+s;return Math.max(Math.min(o,1),0)},l=s*(a+i)-a;return o=e<=0?Math.round(t(1e-5)):e=0;this._lastPosition=e;const a=this.duration(),s=this._lastTime<=0&&this._time>0,r=this._lastTime=a;this._lastTime=this._time,s&&this.fire("start",this);const n=this._isDeclarative;this.done=!n&&!r&&this._time>=a,this._reseted=!1;let o=!1;return(i||n)&&(this._initialise(i),this.transforms=new vt,o=this._run(n?t:e),this.fire("step",this)),this.done=this.done||o&&n,r&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,i=this._queue.length;et.lmultiplyO(e),ei=t=>t.transforms;function ii(){const t=this._transformationRunners.runners.map(ei).reduce(ti,new vt);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class ai{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Ke).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const i=this.ids.indexOf(t+1);return this.ids.splice(i,1,t+1),this.runners.splice(i,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;ee.id<=t.id)).map(ei).reduce(ti,new vt)},_addRunner(t){this._transformationRunners.add(t),qe.cancelImmediate(this._frameId),this._frameId=qe.immediate(ii.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new ai).add(new Ke(new vt(this))))}}});Q(Qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,i){if("string"==typeof e)return this.styleAttr(t,{[e]:i});let a=e;if(this._tryRetarget(t,a))return this;let s=new He(this._stepper).to(a),r=Object.keys(a);return this.queue((function(){s=s.from(this.element()[t](r))}),(function(e){return this.element()[t](s.at(e).valueOf()),s.done()}),(function(e){const i=Object.keys(e),n=(o=r,i.filter((t=>!o.includes(t))));var o;if(n.length){const e=this.element()[t](n),i=new _e(s.from()).valueOf();Object.assign(i,e),s.from(i)}const l=new _e(s.to()).valueOf();Object.assign(l,e),s.to(l),r=i,a=e})),this._rememberMorpher(t,s),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let i=new He(this._stepper).to(new _t(t));return this.queue((function(){i=i.from(this.element().zoom())}),(function(t){return this.element().zoom(i.at(t),e),i.done()}),(function(t,a){e=a,i.to(t)})),this._rememberMorpher("zoom",i),this},transform(t,e,i){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const a=vt.isMatrixLike(t);i=null!=t.affine?t.affine:null!=i?i:!a;const s=new He(this._stepper).type(i?Fe:vt);let r,n,o,l,h;return this.queue((function(){n=n||this.element(),r=r||T(t,n),h=new vt(e?void 0:n),n._addRunner(this),e||n._clearTransformRunnersBefore(this)}),(function(c){e||this.clearTransform();const{x:d,y:u}=new bt(r).transform(n._currentTransform(this));let g=new vt({...t,origin:[d,u]}),p=this._isDeclarative&&o?o:h;if(i){g=g.decompose(d,u),p=p.decompose(d,u);const t=g.rotate,e=p.rotate,i=[t-360,t,t+360],a=i.map((t=>Math.abs(t-e))),s=Math.min(...a),r=a.indexOf(s);g.rotate=i[r]}e&&(a||(g.rotate=t.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),s.from(p),s.to(g);const f=s.at(c);return l=f.rotate,o=new vt(f),this.addTransform(o),n._addRunner(this),s.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(r=T(e,n)),t={...e,origin:r}}),!0),this._isDeclarative&&this._rememberMorpher("transform",s),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new _t(e),this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);let a=null;return this.queue((function(){a=this.element()[t](),i.from(a),i.to(a+e)}),(function(e){return this.element()[t](i.at(e)),i.done()}),(function(t){i.to(a+new _t(t))})),this._rememberMorpher(t,i),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);return this.queue((function(){i.from(this.element()[t]())}),(function(e){return this.element()[t](i.at(e)),i.done()})),this._rememberMorpher(t,i),this},_queueNumber(t,e){return this._queueObject(t,new _t(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let i;return t&&e||(i=this._element.bbox()),t||(t=i.width/i.height*e),e||(e=i.height/i.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,i,a){if(4===arguments.length)return this.plot([t,e,i,a]);if(this._tryRetarget("plot",t))return this;const s=new He(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){s.from(this._element.array())}),(function(t){return this._element.plot(s.at(t)),s.done()})),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,i,a){return this._queueObject("viewbox",new kt(t,e,i,a))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Q(Qe,{rx:Zt,ry:$t,from:ne,to:oe}),q(Qe,"Runner");class si extends Vt{constructor(t,e=t){super(G("svg",t),e),this.namespace()}defs(){return this.isRoot()?V(this.node.querySelector("defs"))||this.put(new Ut):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof O.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:Y,version:"1.1"}).attr("xmlns:xlink",H,E):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,E).attr("xmlns:svgjs",null,E)}root(){return this.isRoot()?this:super.root()}}A({Container:{nested:K((function(){return this.put(new si)}))}}),q(si,"Svg",!0);let ri=class extends Vt{constructor(t,e=t){super(G("symbol",t),e)}};A({Container:{symbol:K((function(){return this.put(new ri)}))}}),q(ri,"Symbol");var ni=Object.freeze({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,i=this.bbox()){return this.cx(t,i).cy(e,i)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,i=this.bbox()){return this.x(t,i).y(e,i)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(O.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}});class oi extends qt{constructor(t,e=t){super(G("text",t),e),this.dom.leading=this.dom.leading??new _t(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new _t(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const i=this.dom.leading;this.each((function(a){if(X(this.node))return;const s=O.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=i*new _t(s);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=r:(this.attr("dy",a?r+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new _t(t.leading||1.3),this}writeDataToDom(){return R(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let i=0;t="";for(let a=0,s=e.length;a{let a;try{a=i.node instanceof F().SVGSVGElement?new kt(i.attr(["x","y","width","height"])):i.bbox()}catch(t){return}const s=new vt(i),r=s.translate(t,e).transform(s.inverse()),n=new bt(a.x,a.y).transform(r);i.move(n.x,n.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,i=this.bbox()){const a=t-i.x,s=e-i.y;return this.dmove(a,s)},size:function(t,e,i=this.bbox()){const a=I(this,t,e,i),s=a.width/i.width,r=a.height/i.height;return this.children().forEach((t=>{const e=new bt(i).transform(new vt(t).inverse());t.scale(s,r,e.x,e.y)})),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}});class gi extends Vt{constructor(t,e=t){super(G("g",t),e)}}Q(gi,ui),A({Container:{group:K((function(){return this.put(new gi)}))}}),q(gi,"G");class pi extends Vt{constructor(t,e=t){super(G("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,H)}}Q(pi,ui),A({Container:{link:K((function(t){return this.put(new pi).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const i=e.index(t);return e.add(this,i),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new pi,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),q(pi,"A");class fi extends Vt{constructor(t,e=t){super(G("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Lt("svg [mask*="+this.id()+"]")}}A({Container:{mask:K((function(){return this.defs().put(new fi)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof fi?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),q(fi,"Mask");class xi extends Gt{constructor(t,e=t){super(G("stop",t),e)}update(t){return("number"==typeof t||t instanceof _t)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new _t(t.offset)),this}}A({Gradient:{stop:function(t,e,i){return this.put(new xi).update(t,e,i)}}}),q(xi,"Stop");class bi extends Gt{constructor(t,e=t){super(G("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,i={}){return this.rule("@font-face",{fontFamily:t,src:e,...i})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let i=t+"{";for(const t in e)i+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return i+="}",i}(t,e))}}A("Dom",{style(t,e){return this.put(new bi).rule(t,e)},fontface(t,e,i){return this.put(new bi).font(t,e,i)}}),q(bi,"Style");class mi extends oi{constructor(t,e=t){super(G("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let i=null;return e&&(i=e.plot(t)),null==t?i:this}track(){return this.reference("href")}}A({Container:{textPath:K((function(t,e){return t instanceof oi||(t=this.text(t)),t.path(e)}))},Text:{path:K((function(t,e=!0){const i=new mi;let a;if(t instanceof We||(t=this.defs().path(t)),i.attr("href","#"+t,H),e)for(;a=this.node.firstChild;)i.node.appendChild(a);return this.put(i)})),textPath(){return this.findOne("textPath")}},Path:{text:K((function(t){return t instanceof oi||(t=(new oi).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Lt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),mi.prototype.MorphArray=Ye,q(mi,"TextPath");class vi extends qt{constructor(t,e=t){super(G("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,H)}}A({Container:{use:K((function(t,e){return this.put(new vi).use(t,e)}))}}),q(vi,"Use");const yi=B;Q([si,ri,de,ce,be],C("viewbox")),Q([xe,je,Ge,We],C("marker")),Q(oi,C("Text")),Q(We,C("Path")),Q(Ut,C("Defs")),Q([oi,li],C("Tspan")),Q([Ve,se,he,Qe],C("radius")),Q(Rt,C("EventTarget")),Q(Bt,C("Dom")),Q(Gt,C("Element")),Q(qt,C("Shape")),Q([Vt,re],C("Container")),Q(he,C("Gradient")),Q(Qe,C("Runner")),Ct.extend([...new Set(k)]),function(t=[]){Ne.push(...[].concat(t))}([_t,xt,kt,vt,Dt,ge,Ye,bt]),Q(Ne,{to(t){return(new He).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,i,a,s){return this.fromArray(t.map((function(t,r){return a.step(t,e[r],i,s[r],s)})))}});class wi extends Gt{constructor(t){super(G("filter",t),t),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(t,e){return!(t=super.put(t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return Lt('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class ki extends Gt{constructor(t,e){super(t,e),this.result(this.id())}in(t){if(null==t){const t=this.attr("in");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in",t)}result(t){return this.attr("result",t)}toString(){return this.result()}}const Ai=t=>function(...e){for(let i=t.length;i--;)null!=e[i]&&this.attr(t[i],e[i])},Ci={blend:Ai(["in","in2","mode"]),colorMatrix:Ai(["type","values"]),composite:Ai(["in","in2","operator"]),convolveMatrix:function(t){t=new Dt(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Ai(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Ai(["in","dx","dy","stdDeviation"]),flood:Ai(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,H)},morphology:Ai(["operator","radius"]),offset:Ai(["dx","dy"]),specularLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Ai([]),turbulence:Ai(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((t=>{const e=P(t),i=Ci[t];wi[e+"Effect"]=class extends ki{constructor(t){super(G("fe"+e,t),t)}update(t){return i.apply(this,t),this}},wi.prototype[t]=K((function(t,...i){const a=new wi[e+"Effect"];return null==t?this.put(a):("function"==typeof t?t.call(a,a):i.unshift(t),this.put(a).update(i))}))})),Q(wi,{merge(t){const e=this.put(new wi.MergeEffect);if("function"==typeof t)return t.call(e,e),e;return(t instanceof Array?t:[...arguments]).forEach((t=>{t instanceof wi.MergeNode?e.put(t):e.mergeNode(t)})),e},componentTransfer(t={}){const e=this.put(new wi.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;if(!(t.r||t.g||t.b||t.a)){t={r:t,g:t,b:t,a:t}}for(const i in t)e.add(new(wi["Func"+i.toUpperCase()])(t[i]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((t=>{const e=P(t);wi[e]=class extends ki{constructor(t){super(G("fe"+e,t),t)}}}));["funcR","funcG","funcB","funcA"].forEach((function(t){const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.ComponentTransferEffect.prototype[t]=i}));["distantLight","pointLight","spotLight"].forEach((t=>{const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.DiffuseLightingEffect.prototype[t]=i,wi.SpecularLightingEffect.prototype[t]=i})),Q(wi.MergeEffect,{mergeNode(t){return this.put(new wi.MergeNode).attr("in",t)}}),Q(Ut,{filter:function(t){const e=this.put(new wi);return"function"==typeof t&&t.call(e,e),e}}),Q(Vt,{filter:function(t){return this.defs().filter(t)}}),Q(Gt,{filterWith:function(t){const e=t instanceof wi?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const Si={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,i,a){return this.parent()&&this.parent().diffuseLighting(t,i,a).in(this)},displacementMap:function(t,e,i,a){return this.parent()&&this.parent().displacementMap(this,t,e,i,a)},dropShadow:function(t,e,i){return this.parent()&&this.parent().dropShadow(this,t,e,i).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){return t=t instanceof Array?t:[...t],this.parent()&&this.parent().merge(this,...t)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,i,a,s){return this.parent()&&this.parent().specularLighting(t,i,a,s).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,a,s){return this.parent()&&this.parent().turbulence(t,e,i,a,s).in(this)}};Q(ki,Si),Q(wi.MergeEffect,{in:function(t){return t instanceof wi.MergeNode?this.add(t,0):this.add((new wi.MergeNode).in(t),0),this}}),Q([wi.CompositeEffect,wi.BlendEffect,wi.DisplacementMapEffect],{in2:function(t){if(null==t){const t=this.attr("in2");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in2",t)}}),wi.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var Li=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getDefaultFilter",value:function(t,e){var i=this.w;t.unfilter(!0),(new wi).size("120%","180%","-5%","-40%"),i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"applyFilter",value:function(t,e,i){var a,s=this,r=this.w;if(t.unfilter(!0),"none"!==i){var n,o,l=r.config.chart.dropShadow,h="lighten"===i?2:.3;if(t.filterWith((function(t){t.colorMatrix({type:"matrix",values:"\n ".concat(h," 0 0 0 0\n 0 ").concat(h," 0 0 0\n 0 0 ").concat(h," 0 0\n 0 0 0 1 0\n "),in:"SourceGraphic",result:"brightness"}),l.enabled&&s.addShadow(t,e,l,"brightness")})),!l.noUserSpaceOnUse)null===(n=t.filterer())||void 0===n||null===(o=n.node)||void 0===o||o.setAttribute("filterUnits","userSpaceOnUse");this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node)}else this.getDefaultFilter(t,e)}},{key:"addShadow",value:function(t,e,i,a){var s,r=this.w,n=i.blur,o=i.top,l=i.left,h=i.color,c=i.opacity;if(h=Array.isArray(h)?h[e]:h,(null===(s=r.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:a,dx:l,dy:o,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:n,result:"blur"}),t.flood({"flood-color":h,"flood-opacity":c,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",a])}},{key:"dropShadow",value:function(t,e){var i,a,s,r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.w;if(t.unfilter(!0),v.isMsEdge()&&"radialBar"===o.config.chart.type)return t;if((null===(i=o.config.chart.dropShadow.enabledOnSeries)||void 0===i?void 0:i.length)>0&&-1===(null===(s=o.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.indexOf(n)))return t;return t.filterWith((function(t){r.addShadow(t,n,e,"SourceGraphic")})),e.noUserSpaceOnUse||t.filterer().node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node),t}},{key:"setSelectionFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;"none"!==s&&this.applyFilter(t,e,s.type)}}},{key:"_scaleFilterSize",value:function(t){if(t){!function(e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}}]),t}(),Mi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"roundPathCorners",value:function(t,e){function i(t,e,i){var s=e.x-t.x,r=e.y-t.y,n=Math.sqrt(s*s+r*r);return a(t,e,Math.min(1,i/n))}function a(t,e,i){return{x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}}function s(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function r(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var n=t.split(/[,\s]/).reduce((function(t,e){var i=e.match("([a-zA-Z])(.+)");return i?(t.push(i[1]),t.push(i[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),o=[];if(n.length>1){var l=r(n[0]),h=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(h=["L",l.x,l.y],n[n.length-1]=h),o.push(n[0]);for(var c=1;c2&&"L"==u[0]&&g.length>2&&"L"==g[0]){var p,f,x=r(d),b=r(u),m=r(g);p=i(b,x,e),f=i(b,m,e),s(u,p),u.origPoint=b,o.push(u);var v=a(p,b,.5),y=a(b,f,.5),w=["C",v.x,v.y,y.x,y.y,f.x,f.y];w.origPoint=b,o.push(w)}else o.push(u)}if(h){var k=r(o[o.length-1]);o.push(["Z"]),s(o[0],k)}}else o=n;return o.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":n,"stroke-linecap":o})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,c=this.w.globals.dom.Paper.rect();return c.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":h}),c.node.setAttribute("fill",r),c}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:a,stroke:e,"stroke-width":i})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var i=this.w.globals.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,s=void 0===a?"#a8a8a8":a,r=t.strokeWidth,n=void 0===r?1:r,o=t.fill,l=t.fillOpacity,h=void 0===l?1:l,c=t.strokeOpacity,d=void 0===c?1:c,u=t.classes,g=t.strokeLinecap,p=void 0===g?null:g,f=t.strokeDashArray,x=void 0===f?0:f,b=this.w;return null===p&&(p=b.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(b.globals.gridHeight)),b.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":h,stroke:s,"stroke-opacity":d,"stroke-linecap":p,"stroke-width":n,"stroke-dasharray":x,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){var i=["M",t,e].join(" ");return i}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=[" L",t,e].join(" "):"H"===i?a=[" H",t].join(" "):"V"===i&&(a=[" V",e].join(" ")),a}},{key:"curve",value:function(t,e,i,a,s,r){var n=["C",t,e,i,a,s,r].join(" ");return n}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,s,r,n){var o="A";arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(o="a");var l=[o,t,e,i,a,s,r,n].join(" ");return l}},{key:"renderPaths",value:function(t){var e,i=t.j,a=t.realIndex,s=t.pathFrom,r=t.pathTo,n=t.stroke,o=t.strokeWidth,l=t.strokeLinecap,h=t.fill,c=t.animationDelay,d=t.initialSpeed,g=t.dataChangeSpeed,p=t.className,f=t.chartType,x=t.shouldClipToGrid,b=void 0===x||x,m=t.bindEventsOnPaths,v=void 0===m||m,w=t.drawShadow,k=void 0===w||w,A=this.w,C=new Li(this.ctx),S=new y(this.ctx),L=this.w.config.chart.animations.enabled,M=L&&this.w.config.chart.animations.dynamicAnimation.enabled,P=!!(L&&!A.globals.resized||M&&A.globals.dataChanged&&A.globals.shouldAnimate);P?e=s:(e=r,A.globals.animationEnded=!0);var I=A.config.stroke.dashArray,T=0;T=Array.isArray(I)?I[a]:A.config.stroke.dashArray;var z=this.drawPath({d:e,stroke:n,strokeWidth:o,fill:h,fillOpacity:1,classes:p,strokeLinecap:l,strokeDashArray:T});z.attr("index",a),b&&("bar"===f&&!A.globals.isHorizontal||A.globals.comboCharts?z.attr({"clip-path":"url(#gridRectBarMask".concat(A.globals.cuid,")")}):z.attr({"clip-path":"url(#gridRectMask".concat(A.globals.cuid,")")})),A.config.chart.dropShadow.enabled&&k&&C.dropShadow(z,A.config.chart.dropShadow,a),v&&(z.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,z)),z.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,z)),z.node.addEventListener("mousedown",this.pathMouseDown.bind(this,z))),z.attr({pathTo:r,pathFrom:s});var X={el:z,j:i,realIndex:a,pathFrom:s,pathTo:r,fill:h,strokeWidth:o,delay:c};return!L||A.globals.resized||A.globals.dataChanged?!A.globals.resized&&A.globals.dataChanged||S.showDelayedElements():S.animatePathsGradually(u(u({},X),{},{speed:d})),A.globals.dataChanged&&M&&P&&S.animatePathsGradually(u(u({},X),{},{speed:g})),z}},{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,i,(function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:a,width:s+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:a,width:s}):"squares"===t?r.rect(e,i).fill("none").stroke({color:a,width:s}):"circles"===t&&r.circle(e).fill("none").stroke({color:a,width:s})}))}},{key:"drawGradient",value:function(t,e,i,a,s){var r,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,c=this.w;e.length<9&&0===e.indexOf("#")&&(e=v.hexToRgba(e,a)),i.length<9&&0===i.indexOf("#")&&(i=v.hexToRgba(i,s));var d=0,u=1,g=1,p=null;null!==o&&(d=void 0!==o[0]?o[0]/100:0,u=void 0!==o[1]?o[1]/100:1,g=void 0!==o[2]?o[2]/100:1,p=void 0!==o[3]?o[3]/100:null);var f=!("donut"!==c.config.chart.type&&"pie"!==c.config.chart.type&&"polarArea"!==c.config.chart.type&&"bubble"!==c.config.chart.type);if(r=l&&0!==l.length?c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){(Array.isArray(l[h])?l[h]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){t.stop(d,e,a),t.stop(u,i,s),t.stop(g,i,s),null!==p&&t.stop(p,e,a)})),f){var x=c.globals.gridWidth/2,b=c.globals.gridHeight/2;"bubble"!==c.config.chart.type?r.attr({gradientUnits:"userSpaceOnUse",cx:x,cy:b,r:n}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?r.from(0,0).to(0,1):"diagonal"===t?r.from(0,0).to(1,1):"horizontal"===t?r.from(0,1).to(1,1):"diagonal2"===t&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,i=t.maxWidth,a=t.fontSize,s=t.fontFamily,r=this.getTextRects(e,a,s),n=r.width/e.length,o=Math.floor(i/n);return i-1){var o=i.globals.selectedDataPoints[s].indexOf(r);i.globals.selectedDataPoints[s].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),h=i.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),c=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),a.getDefaultFilter(t,s)}))};c(l),c(h)}t.node.setAttribute("selected","true"),n="true",void 0===i.globals.selectedDataPoints[s]&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(r)}if("true"===n){var d=i.config.states.active.filter;if("none"!==d)a.applyFilter(t,s,d.type);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}}else if("none"!==i.config.states.active.filter.type)if("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice)a.getDefaultFilter(t,s);else{u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,a){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w,n=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),r.globals.dom.Paper.add(n);var o=n.bbox();return s||(o=n.node.getBoundingClientRect()),n.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i/1.1)return void(t.textContent=e.substring(0,a)+"...");t.textContent="."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}(),Pi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getStackedSeriesTotals",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,i=[];if(0===e.globals.series.length)return i;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,i=[];return e.globals.seriesGroups.forEach((function(a){var s=[];e.config.series.forEach((function(t,i){a.indexOf(e.globals.seriesNames[i])>-1&&s.push(i)}));var r=e.globals.series.map((function(t,e){return-1===s.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));i.push(t.getStackedSeriesTotals(r))})),i}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,i=[],a=[],s=[],r=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){s.push(e),a.push(null)})),e.yaxis.forEach((function(t,e){i[e]=[]}));var n=[];e.yaxis.forEach((function(t,a){var o=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,n){if(e.name===t){var l=n;a===n||r?!r||s.indexOf(n)>-1?i[a].push([a,n]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[n].push([n,a]),l=a),o=!0,-1!==(l=s.indexOf(l))&&s.splice(l,1)}}))}))}o||n.push(a)})),i=i.map((function(t,e){var i=[];return t.forEach((function(t){a[t[1]]=t[0],i.push(t[1])})),i}));for(var o=e.yaxis.length-1,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,i){return t===i[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map((function(t,i){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),i}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var i=0;if(Array.isArray(t))for(var a=0;at&&i.globals.seriesX[s][n]0){var g=function(t,e){var i=s.config.yaxis[s.globals.seriesYAxisReverseMap[e]],r=t<0?-1:1;return t=Math.abs(t),i.logarithmic&&(t=a.getBaseLog(i.logBase,t)),-r*t/n[e]};if(r.isMultipleYAxis){l=[];for(var p=0;p0&&e.forEach((function(e){var n=[],o=[];t.i.forEach((function(i,a){s.config.series[i].group===e&&(n.push(t.series[a]),o.push(i))})),n.length>0&&r.push(a.draw(n,i,o))})),r}}],[{key:"checkComboSeries",value:function(t,e){var i=!1,a=0,s=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||a++,void 0!==t.type&&t.type!==e&&s++})),s>0&&(i=!0),{comboBarCount:a,comboCharts:i}}},{key:"extendArrayProps",value:function(t,e,i){var a,s,r,n,o,l;(null!==(a=e)&&void 0!==a&&a.yaxis&&(e=t.extendYAxis(e,i)),null!==(s=e)&&void 0!==s&&s.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(r=e)&&void 0!==r&&null!==(n=r.annotations)&&void 0!==n&&n.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(l=o.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e)));return e}}]),t}(),Ii=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e}return s(t,[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===t.label.orientation){var a=null!==e?e:0,s=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(null!==s){var r=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-r.height+4);var n="top"===t.label.position?r.width:-r.width;s.setAttribute("y",parseFloat(s.getAttribute("y"))+n);var o=this.annoCtx.graphics.rotateAroundCenter(s),l=o.x,h=o.y;s.setAttribute("transform","rotate(-90 ".concat(l," ").concat(h,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=t.getBoundingClientRect(),r=e.label.style.padding,n=r.left,o=r.right,l=r.top,h=r.bottom;if("vertical"===e.label.orientation){var c=[n,o,l,h];l=c[0],h=c[1],n=c[2],o=c[3]}var d=s.left-a.left-n,u=s.top-a.top-l,g=this.annoCtx.graphics.drawRect(d-i.globals.barPadForNumericAxis,u,s.width+n+o,s.height+l+h,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&g.node.classList.add(e.id),g}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,a,s){var r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(a,"']"));if(r){var n=r.parentNode,o=t.addBackgroundToAnno(r,i);o&&(n.insertBefore(o.node,r),i.label.mouseEnter&&o.node.addEventListener("mouseenter",i.label.mouseEnter.bind(t,i)),i.label.mouseLeave&&o.node.addEventListener("mouseleave",i.label.mouseLeave.bind(t,i)),i.label.click&&o.node.addEventListener("click",i.label.click.bind(t,i)))}};e.config.annotations.xaxis.forEach((function(t,e){return i(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return i(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return i(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var i,a=this.w,s="y1"===t?e.y:e.y2,r=!1;if(this.annoCtx.invertAxis){var n=a.config.xaxis.convertedCatToNumeric?a.globals.categoryLabels:a.globals.labels,o=n.indexOf(s),l=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(o+1,")"));i=l?parseFloat(l.getAttribute("y")):(a.globals.gridHeight/n.length-1)*(o+1)-a.globals.barHeight,void 0!==e.seriesIndex&&a.globals.barHeight&&(i-=a.globals.barHeight/2*(a.globals.series.length-1)-a.globals.barHeight*e.seriesIndex)}else{var h,c=a.globals.seriesYAxisMap[e.yAxisIndex][0],d=a.config.yaxis[e.yAxisIndex].logarithmic?new Pi(this.annoCtx.ctx).getLogVal(a.config.yaxis[e.yAxisIndex].logBase,s,c)/a.globals.yLogRatio[c]:(s-a.globals.minYArr[c])/(a.globals.yRange[c]/a.globals.gridHeight);i=a.globals.gridHeight-Math.min(Math.max(d,0),a.globals.gridHeight),r=d>a.globals.gridHeight||d<0,!e.marker||void 0!==e.y&&null!==e.y||(i=0),null!==(h=a.config.yaxis[e.yAxisIndex])&&void 0!==h&&h.reversed&&(i=d)}return"string"==typeof s&&s.includes("px")&&(i=parseFloat(s)),{yP:i,clipped:r}}},{key:"getX1X2",value:function(t,e){var i=this.w,a="x1"===t?e.x:e.x2,s=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,r=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,n=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,o=!1,l=this.annoCtx.inversedReversedAxis?(r-a)/(n/i.globals.gridWidth):(a-s)/(n/i.globals.gridWidth);return"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||i.config.chart.sparkline.enabled||(l=this.getStringX(a)),"string"==typeof a&&a.includes("px")&&(l=parseFloat(a)),null==a&&e.marker&&(l=i.globals.gridWidth),void 0!==e.seriesIndex&&i.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=i.globals.barWidth/2*(i.globals.series.length-1)-i.globals.barWidth*e.seriesIndex),l>i.globals.gridWidth?(l=i.globals.gridWidth,o=!0):l<0&&(l=0,o=!0),{x:l,clipped:o}}},{key:"getStringX",value:function(t){var e=this.w,i=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var a=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),s=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(a+1,")"));return s&&(i=parseFloat(s.getAttribute("x"))),i}}]),t}(),Ti=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addXaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=this.helpers.getX1X2("x1",t),n=r.x,o=r.clipped,l=!0,h=t.label.text,c=t.strokeDashArray;if(v.isNumber(n)){if(null===t.x2||void 0===t.x2){if(!o){var d=this.annoCtx.graphics.drawLine(n+t.offsetX,0+t.offsetY,n+t.offsetX,s.globals.gridHeight+t.offsetY,t.borderColor,c,t.borderWidth);e.appendChild(d.node),t.id&&d.node.classList.add(t.id)}}else{var u=this.helpers.getX1X2("x2",t);if(a=u.x,l=u.clipped,!o||!l){if(a12?u-12:0===u?12:u;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(g))).replace(/(^|[^\\])h/g,"$1"+g);var p=a?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var x=a?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);var b=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var m=u<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));var v=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var y=-t.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){var k=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(k)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var A=(a?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(n[0],"g"),n[A])).replace(new RegExp(o[0],"g"),o[A])).replace(new RegExp(s[0],"g"),s[c])).replace(new RegExp(r[0],"g"),r[c])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var a=this.w;void 0!==a.config.xaxis.min&&(t=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(e=a.config.xaxis.max);var s=this.getDate(t),r=this.getDate(e),n=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=v.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),Xi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return s(t,[{key:"xLabelFormat",value:function(t,e,i,a){var s=this.w;if("datetime"===s.config.xaxis.type&&void 0===s.config.xaxis.labels.formatter&&void 0===s.config.tooltip.x.formatter){var r=new zi(this.ctx);return r.formatDate(r.getDate(e),s.config.tooltip.x.format)}return t(e,i,a)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,i){var a=this.w;if(v.isNumber(t))if(0!==a.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:a.globals.yValueDecimal);else{var s=t.toFixed(0);t=t==s?s:t.toFixed(1)}return t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(v.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(v.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var i=e.globals.maxX-e.globals.minX;return i>0&&i<100?t.toFixed(1):t.toFixed(0)}if(e.globals.isBarHorizontal)if(e.globals.maxY-e.globals.minYArr<4)return t.toFixed(1);return t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,a){void 0!==i.labels.formatter?e.globals.yLabelFormatters[a]=i.labels.formatter:e.globals.yLabelFormatters[a]=function(s){return e.globals.xyCharts?Array.isArray(s)?s.map((function(e){return t.defaultYFormatter(e,i,a)})):t.defaultYFormatter(s,i,a):s}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),Ri=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getLabel",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",n=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,l=void 0===t[a]?"":t[a],h=l,c=o.globals.xLabelFormatter,d=o.config.xaxis.labels.formatter,u=!1,g=new Xi(this.ctx),p=l;n&&(h=g.xLabelFormat(c,l,p,{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o}),void 0!==d&&(h=d(l,t[a],{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o})));var f,x;e.length>0?(f=e[a].unit,x=null,e.forEach((function(t){"month"===t.unit?x="year":"day"===t.unit?x="month":"hour"===t.unit?x="day":"minute"===t.unit&&(x="hour")})),u=x===f,i=e[a].position,h=e[a].value):"datetime"===o.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var b=new Mi(this.ctx),m={};m=o.globals.rotateXLabels&&n?b.getTextRects(h,parseInt(r,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):b.getTextRects(h,parseInt(r,10));var v=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||s.indexOf(h)>=0&&v)&&(h=""),{x:i,text:h,textRect:m,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var a=this.w,s=a.config.xaxis.tickAmount;return"dataPoints"===s&&(s=Math.round(a.globals.gridWidth/120)),s>i||t%Math.round(i/(s+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,a,s){var r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=s[s.length-1];e.xa.length||a.some((function(t){return Array.isArray(t.seriesName)}))?t:i.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,i=e.config.yaxis[t];if(!i.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!i.showForNullSeries){var a=e.globals.seriesYAxisMap[t],s=new Pi(this.ctx);return a.every((function(t){return s.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,i,a,s,r,n){var o=this.w,l=new Mi(this.ctx),h=o.globals.translateY+o.config.yaxis[s].labels.offsetY;if(o.globals.isBarHorizontal?h=0:"heatmap"===o.config.chart.type&&(h+=r/2),a.show&&e>0){!0===o.config.yaxis[s].opposite&&(t+=a.width);for(var c=e;c>=0;c--){var d=l.drawLine(t+i.offsetX-a.width+a.offsetX,h+a.offsetY,t+i.offsetX+a.offsetX,h+a.offsetY,a.color);n.add(d),h+=r}}}}]),t}(),Yi=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx),this.axesUtils=new Ri(this.annoCtx)}return s(t,[{key:"addYaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=t.strokeDashArray,n=this.helpers.getY1Y2("y1",t),o=n.yP,l=n.clipped,h=!0,c=!1,d=t.label.text;if(null===t.y2||void 0===t.y2){if(!l){c=!0;var u=this.annoCtx.graphics.drawLine(0+t.offsetX,o+t.offsetY,this._getYAxisAnnotationWidth(t),o+t.offsetY,t.borderColor,r,t.borderWidth);e.appendChild(u.node),t.id&&u.node.classList.add(t.id)}}else{if(a=(n=this.helpers.getY1Y2("y2",t)).yP,h=n.clipped,a>o){var g=o;o=a,a=g}if(!l||!h){c=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,a+t.offsetY,this._getYAxisAnnotationWidth(t),o-a,0,t.fillColor,t.opacity,1,t.borderColor,r);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(c){var f="right"===t.label.position?s.globals.gridWidth:"center"===t.label.position?s.globals.gridWidth/2:0,x=this.annoCtx.graphics.drawText({x:f+t.label.offsetX,y:(null!=a?a:o)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});x.attr({rel:i}),e.appendChild(x.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;e.globals.gridWidth;return(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,a){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,i.node,a)})),i}}]),t}(),Ei=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addPointAnnotation",value:function(t,e,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",t),s=a.x,r=a.clipped,n=(a=this.helpers.getY1Y2("y1",t)).yP,o=a.clipped;if(v.isNumber(s)&&!o&&!r){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},h=this.annoCtx.graphics.drawMarker(s+t.marker.offsetX,n+t.marker.offsetY,l);e.appendChild(h.node);var c=t.label.text?t.label.text:"",d=this.annoCtx.graphics.drawText({x:s+t.label.offsetX,y:n+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:c,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(d.attr({rel:i}),e.appendChild(d.node),t.customSVG.SVG){var u=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});u.attr({transform:"translate(".concat(s+t.customSVG.offsetX,", ").concat(n+t.customSVG.offsetY,")")}),u.node.innerHTML=t.customSVG.SVG,e.appendChild(u.node)}if(t.image.path){var g=t.image.width?t.image.width:20,p=t.image.height?t.image.height:20;h=this.annoCtx.addImage({x:s+t.image.offsetX-g/2,y:n+t.image.offsetY-p/2,width:g,height:p,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&h.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&h.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&h.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,a){t.addPointAnnotation(e,i.node,a)})),i}}]),t}();var Hi={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},Oi=function(){function t(){i(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return s(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[Hi],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),Fi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.graphics=new Mi(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Ii(this),this.xAxisAnnotations=new Ti(this),this.yAxisAnnotations=new Yi(this),this.pointsAnnotations=new Ei(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return s(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=t.config.chart.animations.enabled,r=[e,i,a],n=[i.node,e.node,a.node],o=0;o<3;o++)t.globals.dom.elGraphical.add(r[o]),!s||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&n[o].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:n[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,a=t.y,s=t.text,r=t.textAnchor,n=t.foreColor,o=t.fontSize,l=t.fontFamily,h=t.fontWeight,c=t.cssClass,d=t.backgroundColor,u=t.borderWidth,g=t.strokeDashArray,p=t.borderRadius,f=t.borderColor,x=t.appendTo,b=void 0===x?".apexcharts-svg":x,m=t.paddingLeft,v=void 0===m?4:m,y=t.paddingRight,w=void 0===y?4:y,k=t.paddingBottom,A=void 0===k?2:k,C=t.paddingTop,S=void 0===C?2:C,L=this.w,M=this.graphics.drawText({x:i,y:a,text:s,textAnchor:r||"start",fontSize:o||"12px",fontWeight:h||"regular",fontFamily:l||L.config.chart.fontFamily,foreColor:n||L.config.chart.foreColor,cssClass:c}),P=L.globals.dom.baseEl.querySelector(b);P&&P.appendChild(M.node);var I=M.bbox();if(s){var T=this.graphics.drawRect(I.x-v,I.y-S,I.width+v+w,I.height+A+S,p,d||"transparent",1,u,f,g);P.insertBefore(T.node,M.node)}}},{key:"addImage",value:function(t,e){var i=this.w,a=t.path,s=t.x,r=void 0===s?0:s,n=t.y,o=void 0===n?0:n,l=t.width,h=void 0===l?20:l,c=t.height,d=void 0===c?20:c,u=t.appendTo,g=void 0===u?".apexcharts-svg":u,p=i.globals.dom.Paper.image(a);p.size(h,d).move(r,o);var f=i.globals.dom.baseEl.querySelector(g);return f&&f.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,a=t.context,s=t.type,r=t.contextMethod,n=a,o=n.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),h=l.childNodes.length+1,c=new Oi,d=Object.assign({},"xaxis"===s?c.xAxisAnnotation:"yaxis"===s?c.yAxisAnnotation:c.pointAnnotation),u=v.extend(d,e);switch(s){case"xaxis":this.addXaxisAnnotation(u,l,h);break;case"yaxis":this.addYaxisAnnotation(u,l,h);break;case"point":this.addPointAnnotation(u,l,h)}var g=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(h,"']")),p=this.helpers.addBackgroundToAnno(g,u);return p&&l.insertBefore(p.node,g),i&&o.globals.memory.methodsToExec.push({context:n,id:u.id?u.id:v.randomId(),method:r,label:"addAnnotation",params:e}),a}},{key:"clearAnnotations",value:function(t){for(var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),a=e.globals.memory.methodsToExec.length-1;a>=0;a--)"addText"!==e.globals.memory.methodsToExec[a].label&&"addAnnotation"!==e.globals.memory.methodsToExec[a].label||e.globals.memory.methodsToExec.splice(a,1);i=v.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(e));a&&(i.globals.memory.methodsToExec.map((function(t,a){t.id===e&&i.globals.memory.methodsToExec.splice(a,1)})),Array.prototype.forEach.call(a,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),Di=function(t){var e,i=t.isTimeline,a=t.ctx,s=t.seriesIndex,r=t.dataPointIndex,n=t.y1,o=t.y2,l=t.w,h=l.globals.seriesRangeStart[s][r],c=l.globals.seriesRangeEnd[s][r],d=l.globals.labels[r],u=l.config.series[s].name?l.config.series[s].name:"",g=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,f={w:l,seriesIndex:s,dataPointIndex:r,start:h,end:c};("function"==typeof p&&(u=p(u,f)),null!==(e=l.config.series[s].data[r])&&void 0!==e&&e.x&&(d=l.config.series[s].data[r].x),i)||"datetime"===l.config.xaxis.type&&(d=new Xi(a).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(a).formatDate,w:l}));"function"==typeof g&&(d=g(d,f)),Number.isFinite(n)&&Number.isFinite(o)&&(h=n,c=o);var x="",b="",m=l.globals.colors[s];if(void 0===l.config.tooltip.x.formatter)if("datetime"===l.config.xaxis.type){var v=new zi(a);x=v.formatDate(v.getDate(h),l.config.tooltip.x.format),b=v.formatDate(v.getDate(c),l.config.tooltip.x.format)}else x=h,b=c;else x=l.config.tooltip.x.formatter(h),b=l.config.tooltip.x.formatter(c);return{start:h,end:c,startVal:x,endVal:b,ylabel:d,color:m,seriesName:u}},_i=function(t){var e=t.color,i=t.seriesName,a=t.ylabel,s=t.start,r=t.end,n=t.seriesIndex,o=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(n);s=l.yLbFormatter(s),r=l.yLbFormatter(r);var h=l.yLbFormatter(t.w.globals.series[n][o]),c='\n '.concat(s,'\n - \n ').concat(r,"\n ");return'
'+(i||"")+'
'+a+": "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[n].type||"rangeBar"===t.w.config.series[n].type?c:"".concat(h,""):c)+"
"},Ni=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){this.hideYAxis();return v.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var i=e.w.config.series[e.seriesIndex].name;return null!==t?i+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),u(u({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,a=e.dataPointIndex,s=e.w,r=function(){var t=s.globals.seriesRangeStart[i][a];return s.globals.seriesRangeEnd[i][a]-t};return s.globals.comboCharts?"rangeBar"===s.config.series[i].type||"rangeArea"===s.config.series[i].type?r():t:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Di(u(u({},t),{},{isTimeline:!0})),i=e.color,a=e.seriesName,s=e.ylabel,r=e.startVal,n=e.endVal;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t):function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,i;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(i=t.plotOptions.bar)&&void 0!==i&&i.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}}}}},{key:"brush",value:function(t){return v.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return u(u({},t),{},{plotOptions:u(u({},t.plotOptions),{},{bar:u(u({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return v.isNumber(t)?Math.floor(t):t};var a=t.xaxis.labels.formatter,s=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(s=i.map((function(t){return Array.isArray(t)?t:String(t)}))),s&&s.length&&(t.xaxis.labels.formatter=function(t){return v.isNumber(t)?a(s[Math.floor(t)-1]):a(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,i,a,s){var r=t.globals.seriesCandleO[e][i],n=t.globals.seriesCandleH[e][i],o=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],h=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==s?'
\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][i],"\n
"):'
')+"
".concat(a[0],': ')+r+"
"+"
".concat(a[1],': ')+n+"
"+(o?"
".concat(a[2],': ')+o+"
":"")+"
".concat(a[3],': ')+l+"
"+"
".concat(a[4],': ')+h+"
"}}]),t}(),Wi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(t){var e=t.responsiveOverride,i=this.opts,a=new Oi,s=new Ni(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),n={};if(i&&"object"===b(i)){var o,l,h,c,d,u,g,p,f,x,m={};m=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?s[i.chart.type]():s.line(),null!==(o=i.plotOptions)&&void 0!==o&&null!==(l=o.bar)&&void 0!==l&&l.isFunnel&&(m=s.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(m=s.stackedBars()),null!==(h=i.chart.brush)&&void 0!==h&&h.enabled&&(m=s.brush(m)),null!==(c=i.plotOptions)&&void 0!==c&&null!==(d=c.line)&&void 0!==d&&d.isSlopeChart&&(m=s.slope()),i.chart.stacked&&"100%"===i.chart.stackType&&(i=s.stacked100(i)),null!==(u=i.plotOptions)&&void 0!==u&&null!==(g=u.bar)&&void 0!==g&&g.isDumbbell&&(i=s.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},e||(i.xaxis.convertedCatToNumeric=!1),(null!==(p=(i=this.checkForCatToNumericXAxis(this.chartType,m,i)).chart.sparkline)&&void 0!==p&&p.enabled||null!==(f=window.Apex.chart)&&void 0!==f&&null!==(x=f.sparkline)&&void 0!==x&&x.enabled)&&(m=s.sparkline(m)),n=v.extend(r,m)}var y=v.extend(n,window.Apex);return r=v.extend(y,i),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var a,s,r=new Ni(i),n=("bar"===t||"boxPlot"===t)&&(null===(a=i.plotOptions)||void 0===a||null===(s=a.bar)||void 0===s?void 0:s.horizontal),o="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,l="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,h=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return n||o||!l||"between"===h||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new Oi;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=v.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[v.extend(i.yAxis,t.yaxis)]:t.yaxis=v.extendArray(t.yaxis,i.yAxis);var a=!1;t.yaxis.forEach((function(t){t.logarithmic&&(a=!0)}));var s=t.series;return e&&!s&&(s=e.config.series),a&&s.length!==t.yaxis.length&&s.length&&(t.yaxis=s.map((function(e,a){if(e.name||(s[a].name="series-".concat(a+1)),t.yaxis[a])return t.yaxis[a].seriesName=s[a].name,t.yaxis[a];var r=v.extend(i.yAxis,t.yaxis[0]);return r.show=!1,r}))),a&&s.length>1&&s.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.yaxis=v.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.xaxis=v.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new Oi;return t.annotations.points=v.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),Bi=function(){function t(){i(this,t)}return s(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:t.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=v.extend({},t),e.initialSeries=v.clone(t.series),e.lastXAxis=v.clone(e.initialConfig.xaxis),e.lastYAxis=v.clone(e.initialConfig.yaxis),e}}]),t}(),Gi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(){var t=new Wi(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new Bi).init(t)}}}]),t}(),ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return s(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,a=parseInt(e.globals.gridWidth,10),s=parseInt(e.globals.gridHeight,10),r=a>s?a:s,n=t.image,o=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=r+1,l=r):(o=t.width,l=t.height);var h=document.createElementNS(e.globals.SVGNS,"pattern");Mi.setAttrs(h,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var c=document.createElementNS(e.globals.SVGNS,"image");h.appendChild(c),c.setAttributeNS(window.SVG.xlink,"href",n),Mi.setAttrs(c,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),c.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(h)}},{key:"getSeriesIndex",value:function(t){var e=this.w,i=e.config.chart.type;return("bar"===i||"rangeBar"===i)&&e.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var i,a=this.w,s=null,n=null,o=r(t);try{for(o.s();!(i=o.n()).done;){var l=i.value;l>=e.threshold?(null===s||l>s)&&(s=l):(null===n||l-1?x=v.getOpacityFromRGBA(c):m=v.hexToRgba(v.rgb2hex(c),x),t.opacity&&(x=t.opacity),"pattern"===p&&(n=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:n,fillColor:c,fillOpacity:x,defaultColor:m})),b){var y=f(l.fill.gradient.colorStops)||[],w=l.fill.gradient.type;h&&(y[this.seriesIndex]=this.computeColorStops(s.globals.series[this.seriesIndex],l.plotOptions.line.colors),w="vertical"),o=this.handleGradientFill({type:w,fillConfig:t.fillConfig,fillColor:c,fillOpacity:x,colorStops:y,i:this.seriesIndex})}if("image"===p){var k=l.fill.image.src,A=t.patternID?t.patternID:"",C="pattern".concat(s.globals.cuid).concat(t.seriesNumber+1).concat(A);-1===this.patternIDs.indexOf(C)&&(this.clippedImgArea({opacity:x,image:Array.isArray(k)?t.seriesNumber-1&&(p=v.getOpacityFromRGBA(g));var f=void 0===o.gradient.opacityTo?a:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[n]:o.gradient.opacityTo;if(void 0===o.gradient.gradientToColors||0===o.gradient.gradientToColors.length)d="dark"===o.gradient.shade?c.shadeColor(-1*parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i):c.shadeColor(parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i);else if(o.gradient.gradientToColors[l.seriesNumber]){var x=o.gradient.gradientToColors[l.seriesNumber];d=x,x.indexOf("rgba")>-1&&(f=v.getOpacityFromRGBA(x))}else d=i;if(o.gradient.gradientFrom&&(g=o.gradient.gradientFrom),o.gradient.gradientTo&&(d=o.gradient.gradientTo),o.gradient.inverseColors){var b=g;g=d,d=b}return g.indexOf("rgb")>-1&&(g=v.rgb2hex(g)),d.indexOf("rgb")>-1&&(d=v.rgb2hex(d)),h.drawGradient(e,g,d,p,f,l.size,o.gradient.stops,r,n)}}]),t}(),Vi=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],r=this.w,n=e,o=t,l=null,h=new Mi(this.ctx),c=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(o.x))for(var d=0;d0:r.config.markers.size>0)||s||c){p||(f+=" w".concat(v.randomId()));var x=this.getMarkerConfig({cssClass:f,seriesIndex:e,dataPointIndex:g});if(r.config.series[n].data[g]&&(r.config.series[n].data[g].fillColor&&(x.pointFillColor=r.config.series[n].data[g].fillColor),r.config.series[n].data[g].strokeColor&&(x.pointStrokeColor=r.config.series[n].data[g].strokeColor)),void 0!==a&&(x.pSize=a),(o.x[d]<-r.globals.markers.largestSize||o.x[d]>r.globals.gridWidth+r.globals.markers.largestSize||o.y[d]<-r.globals.markers.largestSize||o.y[d]>r.globals.gridHeight+r.globals.markers.largestSize)&&(x.pSize=0),!p)(r.globals.markers.size[e]>0||s||c)&&!l&&(l=h.group({class:s||c?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),(u=h.drawMarker(o.x[d],o.y[d],x)).attr("rel",g),u.attr("j",g),u.attr("index",e),u.node.setAttribute("default-marker-size",x.pSize),new Li(this.ctx).setSelectionFilter(u,e,g),this.addEvents(u),l&&l.add(u)}else void 0===r.globals.pointsArray[e]&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([o.x[d],o.y[d]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,i=t.seriesIndex,a=t.dataPointIndex,s=void 0===a?null:a,r=t.radius,n=void 0===r?null:r,o=t.size,l=void 0===o?null:o,h=t.strokeWidth,c=void 0===h?null:h,d=this.w,u=this.getMarkerStyle(i),g=null===l?d.globals.markers.size[i]:l,p=d.config.markers;return null!==s&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===i&&t.dataPointIndex===s&&(u.pointStrokeColor=t.strokeColor,u.pointFillColor=t.fillColor,g=t.size,u.pointShape=t.shape)})),{pSize:null===n?g:n,pRadius:null!==n?n:p.radius,pointStrokeWidth:null!==c?c:Array.isArray(p.strokeWidth)?p.strokeWidth[i]:p.strokeWidth,pointStrokeColor:u.pointStrokeColor,pointFillColor:u.pointFillColor,shape:u.pointShape||(Array.isArray(p.shape)?p.shape[i]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[i]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[i]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[i]:p.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(t){var e=this.w,i=new Mi(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,a=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[t]:a,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),Ui=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return s(t,[{key:"draw",value:function(t,e,i){var a=this.w,s=new Mi(this.ctx),r=i.realIndex,n=i.pointsPos,o=i.zRatio,l=i.elParent,h=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(h.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(n.x))for(var c=0;cp.maxBubbleRadius&&(g=p.maxBubbleRadius)}var f=n.x[c],x=n.y[c];if(g=g||0,null!==x&&void 0!==a.globals.series[r][d]||(u=!1),u){var b=this.drawPoint(f,x,g,r,d,e);h.add(b)}l.add(h)}}},{key:"drawPoint",value:function(t,e,i,a,s,r){var n=this.w,o=a,l=new y(this.ctx),h=new Li(this.ctx),c=new ji(this.ctx),d=new Vi(this.ctx),u=new Mi(this.ctx),g=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:s,radius:"bubble"===n.config.chart.type||n.globals.comboCharts&&n.config.series[a]&&"bubble"===n.config.series[a].type?i:null}),p=c.fillPath({seriesNumber:a,dataPointIndex:s,color:g.pointFillColor,patternUnits:"objectBoundingBox",value:n.globals.series[a][r]}),f=u.drawMarker(t,e,g);if(n.config.series[o].data[s]&&n.config.series[o].data[s].fillColor&&(p=n.config.series[o].data[s].fillColor),f.attr({fill:p}),n.config.chart.dropShadow.enabled){var x=n.config.chart.dropShadow;h.dropShadow(f,x,a)}if(!this.initialAnim||n.globals.dataChanged||n.globals.resized)n.globals.animationEnded=!0;else{var b=n.config.chart.animations.speed;l.animateMarker(f,b,n.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(f)}),100)}))}return f.attr({rel:s,j:s,index:a,"default-marker-size":g.pSize}),h.setSelectionFilter(f,a,s),d.addEvents(f),f.node.classList.add("apexcharts-marker"),f}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}]),t}(),qi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"dataLabelsCorrection",value:function(t,e,i,a,s,r,n){var o=this.w,l=!1,h=new Mi(this.ctx).getTextRects(i,n),c=h.width,d=h.height;e<0&&(e=0),e>o.globals.gridHeight+d&&(e=o.globals.gridHeight+d/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:t,y:e,width:c,height:d});var u=o.globals.dataLabelsRects[a].length-2,g=void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(void 0!==o.globals.dataLabelsRects[a][u]){var p=o.globals.dataLabelsRects[a][g];(t>p.x+p.width||e>p.y+p.height||e+de.globals.gridWidth+b.textRects.width+30)&&(o="");var m=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(m=e.globals.dataLabels.style.colors[n]),"function"==typeof m&&(m=m({series:e.globals.series,seriesIndex:r,dataPointIndex:n,w:e})),u&&(m=u);var v=d.offsetX,y=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(v=0,y=0),e.globals.isSlopeChart&&(0!==n&&(v=-2*d.offsetX+5),0!==n&&n!==e.config.series[r].data.length-1&&(v=0)),b.drawnextLabel){if((x=i.drawText({width:100,height:parseInt(d.style.fontSize,10),x:a+v,y:s+y,foreColor:m,textAnchor:l||d.textAnchor,text:o,fontSize:h||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"})).attr({class:f||"apexcharts-datalabel",cx:a,cy:s}),d.dropShadow.enabled){var w=d.dropShadow;new Li(this.ctx).dropShadow(x,w)}c.add(x),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(n)}return x}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,a=i.config.dataLabels.background,s=a.padding,r=a.padding/2,n=e.width,o=e.height,l=new Mi(this.ctx).drawRect(e.x-s,e.y-r/2,n+2*s,o+r,a.borderRadius,"transparent"!==i.config.chart.background&&i.config.chart.background?i.config.chart.background:"#fff",a.opacity,a.borderWidth,a.borderColor);a.dropShadow.enabled&&new Li(this.ctx).dropShadow(l,a.dropShadow);return l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,s=v.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,t&&(e&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i-1&&(t[i].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,i=this.getSeriesByName(t),a=parseInt(null==i?void 0:i.getAttribute("data:realIndex"),10),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),r=null,n=null,o=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){r=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),n=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']"));var l=e.globals.seriesYAxisReverseMap[a];o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']"));else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var h=0;h=t.from&&(r0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1)for(var s=i.config.series.map((function(t,a){return t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(a)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(i.config.series[a].type)>-1)?a:-1})),r="asc"===t?0:s.length-1;"asc"===t?r=0;"asc"===t?r++:r--)if(-1!==s[r]){a=s[r];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,a){for(var s=e[i].childNodes,r={type:a,paths:[],realIndex:e[i].getAttribute("data:realIndex")},n=0;n0)for(var a=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),a=[],s=function(t){var e=function(e){return i[t].getAttribute(e)},s={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};a.push({rect:s,color:i[t].getAttribute("color")})},r=0;r0?t:[]}));return t}}]),t}(),$i=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,a=this.w.globals,s="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,r=0;r=5?this.twoDSeries.push(v.parseNumber(t[e].data[r][4])):this.twoDSeries.push(v.parseNumber(t[e].data[r][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var n=new Date(t[e].data[r][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(t[e].data[r][0]);for(var o=0;o-1&&(r=this.activeSeriesIndex);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,r=new zi(i),n=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isRangeBar="rangeBar"===a.chart.type&&s.isBarHorizontal,s.hasXaxisGroups="category"===a.xaxis.type&&a.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=a.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?s.seriesNames.push(t.name):s.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var o=[],l=f(new Set(a.series.map((function(t){return t.group}))));a.series.forEach((function(t,e){var i=l.indexOf(t.group);o[i]||(o[i]=[]),o[i].push(s.seriesNames[e])})),s.seriesGroups=o;for(var h=function(){for(var t=0;t0&&(this.twoDSeriesX=n,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var d=t[c].data.map((function(t){return v.parseNumber(t)}));s.series.push(d)}s.seriesZ.push(this.threeDSeries),void 0!==t[c].color?s.seriesColors.push(t[c].color):s.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var a=0;a0)i.labels=e.xaxis.categories;else if(e.labels.length>0)i.labels=e.labels.slice();else if(this.fallbackToCategory){if(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric)new Ni(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t)}else this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,a=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var s=i.series.map((function(t,e){return t.data.filter((function(t,e,i){return i.findIndex((function(e){return e.x===t.x}))===e}))})),r=s.reduce((function(t,e,i,a){return a[t].length>e.length?t:i}),0),n=0;n0&&s==i.length&&e.push(a)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}]),t}(),Ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),a=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",a*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"getSvgString",value:function(){var t=this;return new Promise((function(e){var i=t.w,a=i.config.chart.toolbar.export.width,s=i.config.chart.toolbar.export.scale||a/i.globals.svgWidth;s||(s=1);var r=t.w.globals.dom.Paper.svg(),n=t.w.globals.dom.Paper.node.cloneNode(!0);1!==s&&t.scaleSvgNode(n,s),t.convertImagesToBase64(n).then((function(){r=(new XMLSerializer).serializeToString(n),e(r.replace(/ /g," "))}))}))}},{key:"convertImagesToBase64",value:function(t){var e=this,i=t.getElementsByTagName("image"),a=Array.from(i).map((function(t){var i=t.getAttributeNS("http://www.w3.org/1999/xlink","href");return i&&!i.startsWith("data:")?e.getBase64FromUrl(i).then((function(e){t.setAttributeNS("http://www.w3.org/1999/xlink","href",e)})).catch((function(t){console.error("Error converting image to base64:",t)})):Promise.resolve()}));return Promise.all(a)}},{key:"getBase64FromUrl",value:function(t){return new Promise((function(e,i){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var t=document.createElement("canvas");t.width=a.width,t.height=a.height,t.getContext("2d").drawImage(a,0,0),e(t.toDataURL())},a.onerror=i,a.src=t}))}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var t=this;return new Promise((function(e){t.cleanup(),t.getSvgString().then((function(t){var i=new Blob([t],{type:"image/svg+xml;charset=utf-8"});e(URL.createObjectURL(i))}))}))}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var a=e.w,s=t?t.scale||t.width/a.globals.svgWidth:1;e.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*s,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var n="transparent"!==a.config.chart.background&&a.config.chart.background?a.config.chart.background:"#fff",o=r.getContext("2d");o.fillStyle=n,o.fillRect(0,0,r.width*s,r.height*s),e.getSvgString().then((function(t){var e="data:image/svg+xml,"+encodeURIComponent(t),a=new Image;a.crossOrigin="anonymous",a.onload=function(){if(o.drawImage(a,0,0),r.msToBlob){var t=r.msToBlob();i({blob:t})}else{var e=r.toDataURL("image/png");i({imgURI:e})}},a.src=e}))}))}},{key:"exportToSVG",value:function(){var t=this;this.svgUrl().then((function(e){t.triggerDownload(e,t.w.config.chart.toolbar.export.svg.filename,".svg")}))}},{key:"exportToPng",value:function(){var t=this,e=this.w.config.chart.toolbar.export.scale,i=this.w.config.chart.toolbar.export.width,a=e?{scale:e}:i?{width:i}:void 0;this.dataURI(a).then((function(e){var i=e.imgURI,a=e.blob;a?navigator.msSaveOrOpenBlob(a,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,a=t.fileName,s=t.columnDelimiter,r=void 0===s?",":s,n=t.lineDelimiter,o=void 0===n?"\n":n,l=this.w;i||(i=l.config.series);var h=[],c=[],d="",u=l.globals.series.map((function(t,e){return-1===l.globals.collapsedSeriesIndices.indexOf(e)?t:[]})),g=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.categoryFormatter?l.config.chart.toolbar.export.csv.categoryFormatter(t):"datetime"===l.config.xaxis.type&&String(t).length>=10?new Date(t).toDateString():v.isNumber(t)?t:t.split(r).join("")},p=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},x=Math.max.apply(Math,f(i.map((function(t){return t.data?t.data.length:0})))),b=new $i(this.ctx),m=new Ri(this.ctx),y=function(t){var i="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var a=l.globals.yLabelFormatters[0],s=new Zi(e.ctx).getActiveConfigSeriesIndex();i=a(l.globals.labels[t],{seriesIndex:s,dataPointIndex:t,w:l})}else i=m.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?i=l.config.xaxis.categories[t]:l.config.labels.length&&(i=l.config.labels[t]))}else i=l.config.labels[t];return null===i?"nullvalue":(Array.isArray(i)&&(i=i.join(" ")),v.isNumber(i)?i:i.split(r).join(""))},w=function(t,e){if(h.length&&0===e&&c.push(h.join(r)),t.data){t.data=t.data.length&&t.data||f(Array(x)).map((function(){return""}));for(var a=0;a0&&!s.globals.isBarHorizontal&&(this.xaxisLabels=s.globals.timescaleLabels.slice()),s.config.xaxis.overwriteCategories&&(this.xaxisLabels=s.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===s.config.xaxis.position?this.offY=0:this.offY=s.globals.gridHeight,this.offY=this.offY+s.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.xaxisBorderWidth=s.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=s.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=s.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=s.config.xaxis.axisBorder.height,this.yaxis=s.config.yaxis[0]}return s(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new Mi(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});i.add(a);for(var s=[],r=0;r6&&void 0!==arguments[6]?arguments[6]:{},h=[],c=[],d=this.w,u=l.xaxisFontSize||this.xaxisFontSize,g=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,f=l.fontWeight||d.config.xaxis.labels.style.fontWeight,x=l.cssClass||d.config.xaxis.labels.style.cssClass,b=d.globals.padHorizontal,m=a.length,v="category"===d.config.xaxis.type?d.globals.dataPoints:m;if(0===v&&m>v&&(v=m),s){var y=v>1?v-1:v;n=d.globals.gridWidth/Math.min(y,m-1),b=b+r(0,n)/2+d.config.xaxis.labels.offsetX}else n=d.globals.gridWidth/v,b=b+r(0,n)+d.config.xaxis.labels.offsetX;for(var w=function(s){var l=b-r(s,n)/2+d.config.xaxis.labels.offsetX;0===s&&1===m&&n/2===b&&1===v&&(l=d.globals.gridWidth/2);var y=o.axesUtils.getLabel(a,d.globals.timescaleLabels,l,s,h,u,t),w=28;d.globals.rotateXLabels&&t&&(w=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(w+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(u)+(d.globals.xAxisLabelsHeight-d.globals.xAxisGroupLabelsHeight)+(d.globals.rotateXLabels?10:0)),y=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(s,y,m):o.axesUtils.checkForOverflowingLabels(s,y,m,h,c);if(d.config.xaxis.labels.show){var k=e.drawText({x:y.x,y:o.offY+d.config.xaxis.labels.offsetY+w-("top"===d.config.xaxis.position?d.globals.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:"middle",fontWeight:y.isBold?600:f,fontSize:u,fontFamily:g,foreColor:Array.isArray(p)?t&&d.config.xaxis.convertedCatToNumeric?p[d.globals.minX+s-1]:p[s]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(i.add(k),k.on("click",(function(t){if("function"==typeof d.config.chart.events.xAxisLabelClick){var e=Object.assign({},d,{labelIndex:s});d.config.chart.events.xAxisLabelClick(t,o.ctx,e)}})),t){var A=document.createElementNS(d.globals.SVGNS,"title");A.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,k.node.appendChild(A),""!==y.text&&(h.push(y.text),c.push(y))}}sa.globals.gridWidth)){var r=this.offY+a.config.xaxis.axisTicks.offsetY;if(e=e+r+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(e=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new Mi(this.ctx).drawLine(t+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,s+a.config.xaxis.axisTicks.offsetX,e+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var s=0;s0){var h=s[s.length-1].getBBox(),c=s[0].getBBox();h.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),c.x+c.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var d=0;d0&&(this.xaxisLabels=a.globals.timescaleLabels.slice())}return s(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new Mi(this.ctx);t||(t=i.group({class:"apexcharts-grid"}));var a=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),s=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(s),t.add(a),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new Mi(this.ctx),a=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,f(t.config.stroke.width)):t.config.stroke.width,s=function(t){var i=document.createElementNS(e.SVGNS,"clipPath");return i.setAttribute("id",t),i};e.dom.elGridRectMask=s("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=s("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=s("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=s("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=s("nonForecastMask".concat(e.cuid));var r=0,n=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),n=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=i.drawRect(-a/2-r-2,-a/2-2,e.gridWidth+a+n+r+4,e.gridHeight+a+4,0,"#fff");var o=t.globals.markers.largestSize;e.dom.elGridRectMarker=i.drawRect(-o,-o,e.gridWidth+2*o,e.gridHeight+2*o,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,a=t.y1,s=t.x2,r=t.y2,n=t.xCount,o=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===n-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:i,y1:a,x2:s,y2:r,xCount:n,parent:o});var h=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var c=l.globals.groups;if(c){for(var d=0,u=0;d0&&"datetime"!==t.config.xaxis.type&&(s=e.yAxisScale[a].result.length-1);this._drawXYLines({xCount:s,tickAmount:r})}else s=r,r=e.xTickAmount,this._drawInvertedXYLines({xCount:s,tickAmount:r});return this.drawGridBands(s,r),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/s}}},{key:"drawGridBands",value:function(t,e){var i,a,s=this,r=this.w;if((null===(i=r.config.grid.row.colors)||void 0===i?void 0:i.length)>0&&function(t,i,a,n,o,l){for(var h=0,c=0;h=r.config.grid[t].colors.length&&(c=0),s._drawGridBandRect({c:c,x1:a,y1:n,x2:o,y2:l,type:t}),n+=r.globals.gridHeight/e}("row",e,0,0,r.globals.gridWidth,r.globals.gridHeight/e),(null===(a=r.config.grid.column.colors)||void 0===a?void 0:a.length)>0){var n=r.globals.isBarHorizontal||"on"!==r.config.xaxis.tickPlacement||"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric?t:t-1;r.globals.isXNumeric&&(n=r.globals.xAxisScale.result.length-1);for(var o=r.globals.padHorizontal,l=r.globals.padHorizontal+r.globals.gridWidth/n,h=r.globals.gridHeight,c=0,d=0;c=r.config.grid.column.colors.length&&(d=0),"datetime"===r.config.xaxis.type)o=this.xaxisLabels[c].position,l=((null===(u=this.xaxisLabels[c+1])||void 0===u?void 0:u.position)||r.globals.gridWidth)-this.xaxisLabels[c].position;this._drawGridBandRect({c:d,x1:o,y1:0,x2:l,y2:h,type:"column"}),o+=r.globals.gridWidth/n}}}}]),t}(),ta=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"niceScale",value:function(t,e){var i,a,s,r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=1e-11,l=this.w,h=l.globals;h.isBarHorizontal?(i=l.config.xaxis,a=Math.max((h.svgWidth-100)/25,2)):(i=l.config.yaxis[n],a=Math.max((h.svgHeight-100)/15,2)),v.isNumber(a)||(a=10),s=void 0!==i.min&&null!==i.min,r=void 0!==i.max&&null!==i.min;var c=void 0!==i.stepSize&&null!==i.stepSize,d=void 0!==i.tickAmount&&null!==i.tickAmount,u=d?i.tickAmount:h.niceScaleDefaultTicks[Math.min(Math.round(a/2),h.niceScaleDefaultTicks.length-1)];if(h.isMultipleYAxis&&!d&&h.multiAxisTickAmount>0&&(u=h.multiAxisTickAmount,d=!0),u="dataPoints"===u?h.dataPoints-1:Math.abs(Math.round(u)),(t===Number.MIN_VALUE&&0===e||!v.isNumber(t)&&!v.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=v.isNumber(i.min)?i.min:0,e=v.isNumber(i.max)?i.max:t+u,h.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var g=e;e=t,t=g}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var p=[];u<1&&(u=1);var f=u,x=Math.abs(e-t);!s&&t>0&&t/x<.15&&(t=0,s=!0),!r&&e<0&&-e/x<.15&&(e=0,r=!0);var b=(x=Math.abs(e-t))/f,m=b,y=Math.floor(Math.log10(m)),w=Math.pow(10,y),k=Math.ceil(m/w);if(b=m=(k=h.niceScaleAllowedMagMsd[0===h.yValueDecimal?0:1][k])*w,h.isBarHorizontal&&i.stepSize&&"datetime"!==i.type?(b=i.stepSize,c=!0):c&&(b=i.stepSize),c&&i.forceNiceScale){var A=Math.floor(Math.log10(b));b*=Math.pow(10,y-A)}if(s&&r){var C=x/f;if(d)if(c)if(0!=v.mod(x,b)){var S=v.getGCD(b,C);b=C/S<10?S:C}else 0==v.mod(b,C)?b=C:(C=b,d=!1);else b=C;else if(c)0==v.mod(x,b)?C=b:b=C;else if(0==v.mod(x,b))C=b;else{C=x/(f=Math.ceil(x/b));var L=v.getGCD(x,b);x/La&&(t=e-b*u,t+=b*Math.floor((M-t)/b))}else if(s)if(d)e=t+b*f;else{var P=e;e=b*Math.ceil(e/b),Math.abs(e-t)/v.getGCD(x,b)>a&&(e=t+b*u,e+=b*Math.ceil((P-e)/b))}}else if(h.isMultipleYAxis&&d){var I=b*Math.floor(t/b),T=I+b*f;T0&&t16&&v.getPrimeFactors(f).length<2&&f++,!d&&i.forceNiceScale&&0===h.yValueDecimal&&f>x&&(f=x,b=Math.round(x/f)),f>a&&(!d&&!c||i.forceNiceScale)){var z=v.getPrimeFactors(f),X=z.length-1,R=f;t:for(var Y=0;YN);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,r=Math.abs(e-t),n=[];if(t===e)return{result:n=[t],niceMin:n[0],niceMax:n[n.length-1]};"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,r))&&(i=this.w.globals.dataPoints-1),s||(s=r/i),s=Math.round(10*(s+Number.EPSILON))/10,i===Number.MAX_VALUE&&(i=5,s=1);for(var o=t;i>=0;)n.push(o),o=v.preciseAddition(o,s),i-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,i){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));for(var a=[],s=Math.ceil(Math.log(e)/Math.log(i)+1),r=Math.floor(Math.log(t)/Math.log(i));r5?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase):this.logarithmicScale(e,i,r.logBase)):i!==-Number.MAX_VALUE&&v.isNumber(i)&&e!==Number.MAX_VALUE&&v.isNumber(e)?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.niceScale(e,i,t)):a.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var i=this.w,a=i.globals,s=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&v.isNumber(e)){var r=a.xTickAmount+1;s<10&&s>1&&(r=s),a.xAxisScale=this.linearScale(t,e,r,0,i.config.xaxis.stepSize)}else a.xAxisScale=this.linearScale(0,10,10);return a.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,i=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var a=i.seriesYAxisMap,s=i.minYArr,r=i.maxYArr;i.allSeriesCollapsed=!0,i.barGroups=[],a.forEach((function(a,n){var o=[];a.forEach((function(t){var i=e.series[t].group;o.indexOf(i)<0&&o.push(i)})),a.length>0?function(){var l,h,c=Number.MAX_VALUE,d=-Number.MAX_VALUE,u=c,g=d;if(e.chart.stacked)!function(){var t=new Array(i.dataPoints).fill(0),s=[],r=[],p=[];o.forEach((function(){s.push(t.map((function(){return Number.MIN_VALUE}))),r.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var f=function(t){!l&&e.series[a[t]].type&&(l=e.series[a[t]].type);var c=a[t];h=e.series[c].group?e.series[c].group:"axis-".concat(n),!(i.collapsedSeriesIndices.indexOf(c)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(c)<0)||(i.allSeriesCollapsed=!1,o.forEach((function(t,a){if(e.series[c].group===t)for(var n=0;n=0?r[a][n]+=o:p[a][n]+=o,s[a][n]+=o,u=Math.min(u,o),g=Math.max(g,o)}}))),"bar"!==l&&"column"!==l||i.barGroups.push(h)},x=0;x1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w.config,r=this.w.globals,n=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=t+1);var l=r.series,h=l,c=l;"candlestick"===s.chart.type?(h=r.seriesCandleL,c=r.seriesCandleH):"boxPlot"===s.chart.type?(h=r.seriesCandleO,c=r.seriesCandleC):r.isRangeData&&(h=r.seriesRangeStart,c=r.seriesRangeEnd);var d=!1;if(r.seriesX.length>=a){var u,g=null===(u=r.brushSource)||void 0===u?void 0:u.w.config.chart.brush;(s.chart.zoom.enabled&&s.chart.zoom.autoScaleYaxis||null!=g&&g.enabled&&null!=g&&g.autoScaleYaxis)&&(d=!0)}for(var p=t;px&&r.seriesX[p][b]>s.xaxis.max;b--);}for(var m=x;m<=b&&mh[p][m]&&h[p][m]<0&&(o=h[p][m])}else r.hasNullValues=!0}"bar"!==f&&"column"!==f||(o<0&&n<0&&(n=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,e=Math.min(e,0)))}return"rangeBar"===s.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&(o=e),"bar"===s.chart.type&&(o<0&&n<0&&(n=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:n,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i,a=Number.MAX_VALUE;if(t.isMultipleYAxis){a=Number.MAX_VALUE;for(var s=0;st.dataPoints&&0!==t.dataPoints&&(a=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(a=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var s=t.maxX-t.minX;s<30&&(a=s-1)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var r=[],n=t.minX-1;n0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,a-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var s=e-a[i-1];s>0&&(t.minXDiff=Math.min(s,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var i=e.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map((function(t){return t}))]);var a={},s={};i.forEach((function(i){a[i]=[],s[i]=[],t.w.config.series.map((function(t,a){return i.indexOf(e.seriesNames[a])>-1?a:null})).filter((function(t){return null!==t})).forEach((function(r){for(var n=0;n0?a[i][n]+=parseFloat(e.series[r][n])+1e-4:s[i][n]+=parseFloat(e.series[r][n]))}}))})),Object.entries(a).forEach((function(t){var i=p(t,1)[0];a[i].forEach((function(t,r){e.maxY=Math.max(e.maxY,a[i][r]),e.minY=Math.min(e.minY,s[i][r])}))}))}}}]),t}(),ia=function(){function t(e,a){i(this,t),this.ctx=e,this.elgrid=a,this.w=e.w;var s=this.w;this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.axisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xAxisoffX="bottom"===s.config.xaxis.position?s.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Ri(e)}return s(t,[{key:"drawYaxis",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.yaxis[t].labels.style,s=a.fontSize,r=a.fontFamily,n=a.fontWeight,o=i.group({class:"apexcharts-yaxis",rel:t,transform:"translate(".concat(e.globals.translateYAxisX[t],", 0)")});if(this.axesUtils.isYAxisHidden(t))return o;var l=i.group({class:"apexcharts-yaxis-texts-g"});o.add(l);var h=e.globals.yAxisScale[t].result.length-1,c=e.globals.gridHeight/h,d=e.globals.yLabelFormatters[t],u=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){var g=e.globals.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?g=0:"heatmap"===e.config.chart.type&&(g-=c/2),g+=parseInt(s,10)/3;for(var p=h;p>=0;p--){var f=d(u[p],p,e),x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(x*=-1);var b=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(a.colors,t),y=Array.isArray(m)?m[p]:m,w=v.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),k=i.drawText({x:x,y:g,text:w.includes(f)&&!e.config.yaxis[t].labels.showDuplicates?"":f,textAnchor:b,fontSize:s,fontFamily:r,fontWeight:n,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(a.cssClass)});l.add(k),this.addTooltip(k,f),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(i,k,firstLabel,e.config.yaxis[t].labels.rotate),g+=c}}return this.addYAxisTitle(i,o,t),this.addAxisBorder(i,o,t,h,c),o}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var i=document.createElementNS(this.w.globals.SVGNS,"title");i.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(i)}},{key:"rotateLabel",value:function(t,e,i,a){var s=t.rotateAroundCenter(i.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(a," ").concat(s.x," ").concat(r.y,")"))}},{key:"addYAxisTitle",value:function(t,e,i){var a=this.w;if(void 0!==a.config.yaxis[i].title.text){var s=t.group({class:"apexcharts-yaxis-title"}),r=a.config.yaxis[i].opposite?a.globals.translateYAxisX[i]:0,n=t.drawText({x:r,y:a.globals.gridHeight/2+a.globals.translateY+a.config.yaxis[i].title.offsetY,text:a.config.yaxis[i].title.text,textAnchor:"end",foreColor:a.config.yaxis[i].title.style.color,fontSize:a.config.yaxis[i].title.style.fontSize,fontWeight:a.config.yaxis[i].title.style.fontWeight,fontFamily:a.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(a.config.yaxis[i].title.style.cssClass)});s.add(n),e.add(s)}}},{key:"addAxisBorder",value:function(t,e,i,a,s){var r=this.w,n=r.config.yaxis[i].axisBorder,o=31+n.offsetX;if(r.config.yaxis[i].opposite&&(o=-31-n.offsetX),n.show){var l=t.drawLine(o,r.globals.translateY+n.offsetY-2,o,r.globals.gridHeight+r.globals.translateY+n.offsetY+2,n.color,0,n.width);e.add(l)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,a,n,r.config.yaxis[i].axisTicks,i,s,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});a.add(s);var r=e.globals.yAxisScale[t].result.length-1,n=e.globals.gridWidth/r+.1,o=n+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,h=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),c=e.globals.timescaleLabels;if(c.length>0&&(this.xaxisLabels=c.slice(),r=(h=c.slice()).length),e.config.xaxis.labels.show)for(var d=c.length?0:r;c.length?d=0;c.length?d++:d--){var u=l(h[d],d,e),g=e.globals.gridWidth+e.globals.padHorizontal-(o-n+e.config.xaxis.labels.offsetX);if(c.length){var p=this.axesUtils.getLabel(h,c,g,d,this.drawnLabels,this.xaxisFontSize);g=p.x,u=p.text,this.drawnLabels.push(p.text),0===d&&e.globals.skipFirstTimelinelabel&&(u=""),d===h.length-1&&e.globals.skipLastTimelinelabel&&(u="")}var f=i.drawText({x:g,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:u,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});s.add(f),f.tspan(u),this.addTooltip(f,u),o+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.xaxis.axisBorder;if(a.show){var s=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(s-=15);var r=i.drawLine(e.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new Mi(this.ctx);if(void 0!==e.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});a.add(s),t.add(a)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),r=s?s.getBoundingClientRect():{width:0,height:0},n=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),o=n?n.getBoundingClientRect():{width:0,height:0};if(n){var l=this.xPaddingForYAxisTitle(t,r,o,e);n.setAttribute("x",l.xPos-(e?10:0));var h=a.rotateAroundCenter(n);n.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(h.x," ").concat(h.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var s=this.w,r=0,n=10;return void 0===s.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(a?r=e.width+s.config.yaxis[t].title.offsetX+i.width/2+n/2:(r=-1*e.width+s.config.yaxis[t].title.offsetX+n/2+i.width/2,s.globals.isBarHorizontal&&(n=25,r=-1*e.width-s.config.yaxis[t].title.offsetX-n)),{xPos:r,padd:n})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,a=0,s=0,r=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach((function(o,l){var h=i.globals.ignoreYAxisIndexes.includes(l)||!o.show||o.floating||0===t[l].width,c=t[l].width+e[l].width;o.opposite?i.globals.isBarHorizontal?(s=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=s-o.labels.offsetX):(s=i.globals.gridWidth+i.globals.translateX+n,h||(n+=c+20),i.globals.translateYAxisX[l]=s-o.labels.offsetX+20):(a=i.globals.translateX-r,h||(r+=c+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;v.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,i){var a=t.config.yaxis[i];if(a&&!a.floating&&void 0!==a.labels.align){var s=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=v.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"))),n=s.getBoundingClientRect();r.forEach((function(t){t.setAttribute("text-anchor",a.labels.align)})),"left"!==a.labels.align||a.opposite?"center"===a.labels.align?s.setAttribute("transform","translate(".concat(n.width/2*(a.opposite?1:-1),", 0)")):"right"===a.labels.align&&a.opposite&&s.setAttribute("transform","translate(".concat(n.width,", 0)")):s.setAttribute("transform","translate(-".concat(n.width,", 0)"))}}))}}]),t}(),aa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.documentEvent=v.bind(this.documentEvent,this)}return s(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var a=i.globals.events[t].indexOf(e);-1!==a&&i.globals.events[t].splice(a,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var a=i.globals.events[t],s=a.length,r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=v.extend(Hi,i);this.w.globals.locale=a.options}}]),t}(),ra=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawAxis",value:function(t,e){var i,a,s=this,r=this.w.globals,n=this.w.config,o=new Qi(this.ctx,e),l=new ia(this.ctx,e);r.axisCharts&&"radar"!==t&&(r.isBarHorizontal?(a=l.drawYaxisInversed(0),i=o.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(a)):(i=o.drawXaxis(),r.dom.elGraphical.add(i),n.yaxis.map((function(t,e){if(-1===r.ignoreYAxisIndexes.indexOf(e)&&(a=l.drawYaxis(e),r.dom.Paper.add(a),"back"===s.w.config.grid.position)){var i=r.dom.Paper.children()[1];i.remove(),r.dom.Paper.add(i)}}))))}}]),t}(),na=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Li(this.ctx),a=t.config.xaxis.crosshairs.fill.gradient,s=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,n=a.colorFrom,o=a.colorTo,l=a.opacityFrom,h=a.opacityTo,c=a.stops,d=s.enabled,u=s.left,g=s.top,p=s.blur,f=s.color,x=s.opacity,b=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(b=e.drawGradient("vertical",n,o,l,h,null,c,null));var m=e.drawRect();1===t.config.xaxis.crosshairs.width&&(m=e.drawLine());var y=t.globals.gridHeight;(!v.isNumber(y)||y<0)&&(y=0);var w=t.config.xaxis.crosshairs.width;(!v.isNumber(w)||w<0)&&(w=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:w,height:y,fill:b,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),d&&(m=i.dropShadow(m,{left:u,top:g,blur:p,color:f,opacity:x})),t.globals.dom.elGraphical.add(m)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var s=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(s)}var r=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(r)}}]),t}(),oa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,a=i.config;if(0!==a.responsive.length){var s=a.responsive.slice();s.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var r=new Wi({}),n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=s[0].breakpoint,n=window.innerWidth>0?window.innerWidth:screen.width;if(n>a){var o=v.clone(i.globals.initialConfig);o.series=v.clone(i.config.series);var l=Pi.extendArrayProps(r,o,i);t=v.extend(l,t),t=v.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var h=0;h0&&"function"==typeof t[0]?(this.isColorFn=!0,i.config.series.map((function(a,s){var r=t[s]||t[0];return"function"==typeof r?r({value:i.globals.axisCharts?i.globals.series[s][0]||0:i.globals.series[s],seriesIndex:s,dataPointIndex:s,w:e.w}):r}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,i){t&&(e[i]=t)}))}},{key:"getMonochromeColors",value:function(t,e,i){var a=t.color,s=t.shadeIntensity,r=t.shadeTo,n=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,o=1/(n/s),l=0;return Array.from({length:n},(function(){var t="dark"===r?i.shadeColor(-1*l,a):i.shadeColor(l,a);return l+=o,t}))}},{key:"applyColorTypes",value:function(t,e){var i=this,a=this.w;t.forEach((function(t){a.globals[t].colors=void 0===a.config[t].colors?i.isColorFn?a.config.colors:e:a.config[t].colors.slice(),i.pushExtraColors(a.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=e||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),t.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,i=[];e.config.series.forEach((function(s,r){s.data.forEach((function(s,n){var o;o=e.globals.series[r][n],a=e.config.dataLabels.formatter(o,{ctx:t.dCtx.ctx,seriesIndex:r,dataPointIndex:n,w:e}),i.push(a)}))}));var a=v.getLargestStringFromArr(i),s=new Mi(this.dCtx.ctx),r=e.config.dataLabels.style,n=s.getTextRects(a,parseInt(r.fontSize),r.fontFamily);return{width:1.05*n.width,height:n.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var a=e.map((function(t,e){return Array.isArray(t)?t.length:1})),s=Math.max.apply(Math,f(a));i=e[a.indexOf(s)]}return i}}]),t}(),da=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();t={width:a.width,height:a.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var s=e.globals.xLabelFormatter,r=v.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);e.globals.isBarHorizontal&&(n=r=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var o=new Xi(this.dCtx.ctx),l=r;r=o.xLabelFormat(s,r,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),n=o.xLabelFormat(s,n,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(n=r="1");var h=new Mi(this.dCtx.ctx),c=h.getTextRects(r,e.config.xaxis.labels.style.fontSize),d=c;if(r!==n&&(d=h.getTextRects(n,e.config.xaxis.labels.style.fontSize)),(t={width:c.width>=d.width?c.width:d.width,height:c.height>=d.height?c.height:d.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return h.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};c=u(r),r!==n&&(d=u(n)),t.height=(c.height>d.height?c.height:d.height)/1.5,t.width=c.width>d.width?c.width:d.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var i,a=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,s=e.globals.groups.map((function(t){return t.title})),r=v.getLargestStringFromArr(s),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),o=new Mi(this.dCtx.ctx),l=o.getTextRects(r,a),h=l;return r!==n&&(h=o.getTextRects(n,a)),i={width:l.width>=h.width?l.width:h.width,height:l.height>=h.height?l.height:h.height},e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new Mi(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,i=a.height}return{width:e,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(t){return t.value})),a=i.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Mi(this.dCtx.ctx).getTextRects(a,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,a=i.globals,s=i.config,r=s.xaxis.type,n=t.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,o){s.yaxis.length>1&&function(t){return-1!==a.collapsedSeriesIndices.indexOf(t)}(o)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var o=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+n/1.75-e.dCtx.yAxisWidthRight,h=o.position-n/1.75+e.dCtx.yAxisWidthLeft,c="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>a.svgWidth-a.translateX-c&&(a.skipLastTimelinelabel=!0),h<-(t.show&&!t.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===r?e.dCtx.gridPad.right(null===(a=String(c(e,o)))||void 0===a?void 0:a.length)?t:e}),d),g=u=c(u,o);if(void 0!==u&&0!==u.length||(u=l.niceMax),e.globals.isBarHorizontal){a=0;var p=e.globals.labels.slice();u=v.getLargestStringFromArr(p),u=c(u,{seriesIndex:n,dataPointIndex:-1,w:e}),g=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,p)}var f=new Mi(t.dCtx.ctx),x="rotate(".concat(r.labels.rotate," 0 0)"),b=f.getTextRects(u,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1),m=b;u!==g&&(m=f.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1)),i.push({width:(h>m.width||h>b.width?h:m.width>b.width?m.width:b.width)+a,height:m.height>b.height?m.height:b.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,a){if(e.show&&void 0!==e.title.text){var s=new Mi(t.dCtx.ctx),r="rotate(".concat(e.title.rotate," 0 0)"),n=s.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);i.push({width:n.width,height:n.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,a=0,s=t.globals.yAxisScale.length>1?10:0,r=new Ri(this.dCtx.ctx),n=function(n,o){var l=t.config.yaxis[o].floating,h=0;n.width>0&&!l?(h=n.width+s,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(o)&&(h=h-n.width-s)):h=l||r.isYAxisHidden(o)?0:5,t.config.yaxis[o].opposite?a+=h:i+=h,e+=h};return t.globals.yLabelsCoords.map((function(t,e){n(t,e)})),t.globals.yTitleCoords.map((function(t,e){n(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,e}}]),t}(),ga=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w,i=e.config,a=e.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.series.length)return 0;var s=function(t){return["bar","rangeBar","candlestick","boxPlot"].includes(t)},r=i.chart.type,n=0,o=s(r)?i.series.length:1;a.comboBarCount>0&&(o=a.comboBarCount),a.collapsedSeries.forEach((function(t){s(t.type)&&(o-=1)})),i.chart.stacked&&(o=1);var l=s(r)||a.comboBarCount>0,h=Math.abs(a.initialMaxX-a.initialMinX);if(l&&a.isXNumeric&&!a.isBarHorizontal&&o>0&&0!==h){h<=3&&(h=a.dataPoints);var c=h/t,d=a.minXDiff&&a.minXDiff/c>0?a.minXDiff/c:0;d>t/2&&(d/=2),(n=d*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),a.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,a=this.dCtx.isSparkline||!i.axisCharts?0:10;["title","subtitle"].forEach((function(s){void 0!==e.config[s].text?a+=e.config[s].margin:a+=t.dCtx.isSparkline||!i.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||i.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight-=s.height+r.height+a,i.translateY+=s.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,a=new Ri(this.dCtx.ctx);i.config.yaxis.forEach((function(s,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||s.floating||a.isYAxisHidden(r)||(s.opposite&&(i.globals.translateX-=e[r].width+t[r].width+parseInt(s.labels.style.fontSize,10)/1.2+12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),pa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new ca(this),this.dimYAxis=new ua(this),this.dimXAxis=new da(this),this.dimGrid=new ga(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return s(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,i=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var a=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,f(e.config.stroke.width)):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var i=p(e,2),a=i[0],s=i[1];t.gridPad[a]=Math.max(s,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(a/2,this.gridPad.top),this.gridPad.bottom=Math.max(a/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var s=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*s,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:a[i].width,index:i}),e.globals.yTitleCoords.push({width:s[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o,n),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,h=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var c=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,h=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,h=0,c=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(r);var d=function(){i.translateX=l+t.datalabelsCoords.width,i.gridHeight=i.svgHeight-t.lgRect.height-h-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(c=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=c,d();break;case"top":i.translateY=this.lgRect.height+c,d();break;case"left":i.translateY=c,i.translateX=this.lgRect.width+l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":i.translateY=c,i.translateX=l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new ia(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,a=0;t.config.legend.show&&!t.config.legend.floating&&(a=20);var s="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[s].offsetY,n=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating){e.gridHeight=e.svgHeight;var o=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(o,e.gridHeight),e.translateY=r,void(e.translateX=n+(e.svgWidth-e.gridWidth)/2)}switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=r-10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+r+10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-a,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+this.lgRect.width+a;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-a-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,i){var a=this.w,s=a.globals.hasXaxisGroups?2:1,r=i.height+t.height+e.height,n=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,o=a.globals.rotateXLabels?22:10,l=a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0;this.xAxisHeight=r*n+s*o+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeightc&&(this.yAxisWidth=c)}}]),t}(),fa=function(){function t(e){i(this,t),this.w=e.w,this.lgCtx=e}return s(t,[{key:"getLegendStyles",value:function(){var t,e,i,a=document.createElement("style");a.setAttribute("type","text/css");var s=(null===(t=this.lgCtx.ctx)||void 0===t||null===(e=t.opts)||void 0===e||null===(i=e.chart)||void 0===i?void 0:i.nonce)||this.w.config.chart.nonce;s&&a.setAttribute("nonce",s);var r=document.createTextNode("\n .apexcharts-flip-y {\n transform: scaleY(-1) translateY(-100%);\n transform-origin: top;\n transform-box: fill-box;\n }\n .apexcharts-flip-x {\n transform: scaleX(-1);\n transform-origin: center;\n transform-box: fill-box;\n }\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-right: 1px;\n }\n\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }\n\n ");return a.appendChild(r),a}},{key:"getLegendDimensions",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(t,e){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var s=null,r=null;if(a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),r=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),r=parseInt(s.getAttribute("rel"),10)-1),e)[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,r)}));else this.hideSeries({seriesEl:s,realIndex:r})}else{var n=a.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(t+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=a.config.plotOptions.pie.donut.labels;new Mi(this.lgCtx.ctx).pathMouseDown(n,null),this.lgCtx.ctx.pie.printDataLabelsInner(n.node,l)}n.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(t){var e=t.realIndex,i=this.w,a=i.globals,s=v.clone(i.config.series);if(a.axisCharts){var r=i.config.yaxis[a.seriesYAxisReverseMap[e]],n={index:e,data:s[e].data.slice(),type:s[e].type||i.config.chart.type};if(r&&r.show&&r.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(e)<0&&(a.ancillaryCollapsedSeries.push(n),a.ancillaryCollapsedSeriesIndices.push(e));else if(a.collapsedSeriesIndices.indexOf(e)<0){a.collapsedSeries.push(n),a.collapsedSeriesIndices.push(e);var o=a.risingSeries.indexOf(e);a.risingSeries.splice(o,1)}}else a.collapsedSeries.push({index:e,data:s[e]}),a.collapsedSeriesIndices.push(e);return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.config.series.length,this._getSeriesBasedOnCollapsedState(s)}},{key:"hideSeries",value:function(t){for(var e=t.seriesEl,i=t.realIndex,a=this.w,s=this.getSeriesAfterCollapsing({realIndex:i}),r=e.childNodes,n=0;n0){for(var r=0;r1;if(this.legendHelpers.appendToForeignObject(),(a||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,i=t.fillcolor,a=this.w,s=document.createElement("span");s.classList.add("apexcharts-legend-marker");var r=a.config.legend.markers.shape||a.config.markers.shape,n=r;Array.isArray(r)&&(n=r[e]);var o=Array.isArray(a.config.legend.markers.size)?parseFloat(a.config.legend.markers.size[e]):parseFloat(a.config.legend.markers.size),l=Array.isArray(a.config.legend.markers.offsetX)?parseFloat(a.config.legend.markers.offsetX[e]):parseFloat(a.config.legend.markers.offsetX),h=Array.isArray(a.config.legend.markers.offsetY)?parseFloat(a.config.legend.markers.offsetY[e]):parseFloat(a.config.legend.markers.offsetY),c=Array.isArray(a.config.legend.markers.strokeWidth)?parseFloat(a.config.legend.markers.strokeWidth[e]):parseFloat(a.config.legend.markers.strokeWidth),d=s.style;if(d.height=2*(o+c)+"px",d.width=2*(o+c)+"px",d.left=l+"px",d.top=h+"px",a.config.legend.markers.customHTML)d.background="transparent",d.color=i[e],Array.isArray(a.config.legend.markers.customHTML)?a.config.legend.markers.customHTML[e]&&(s.innerHTML=a.config.legend.markers.customHTML[e]()):s.innerHTML=a.config.legend.markers.customHTML();else{var g=new Vi(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(n),seriesIndex:e,strokeWidth:c,size:o}),p=window.SVG().addTo(s).size("100%","100%"),f=new Mi(this.ctx).drawMarker(0,0,u(u({},g),{},{pointFillColor:Array.isArray(i)?i[e]:g.pointFillColor,shape:n}));a.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),p.add(f)}return s}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,a=e.globals.seriesNames,s=e.config.legend.markers.fillColors?e.config.legend.markers.fillColors.slice():e.globals.colors.slice();if("heatmap"===e.config.chart.type){var r=e.config.plotOptions.heatmap.colorScale.ranges;a=r.map((function(t){return t.name?t.name:t.from+" - "+t.to})),s=r.map((function(t){return t.color}))}else this.isBarsDistributed&&(a=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(a=e.config.legend.customLegendItems);for(var n=e.globals.legendFormatter,o=e.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var h,c=n(a[l],{seriesIndex:l,w:e}),d=!1,u=!1;if(e.globals.collapsedSeries.length>0)for(var g=0;g0)for(var p=0;p0?l-10:0)+(h>0?h-10:0)}a.style.position="absolute",r=r+t+i.config.legend.offsetX,n=n+e+i.config.legend.offsetY,a.style.left=r+"px",a.style.top=n+"px","right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px");["width","height"].forEach((function(t){a.style[t]&&(a.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new pa(this.ctx),i=e.dimHelpers.getTitleSubtitleCoords("title"),a=e.dimHelpers.getTitleSubtitleCoords("subtitle"),s=0;"top"===t.config.legend.position&&(s=i.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,s)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new Zi(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new Zi(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,a="true"===t.target.getAttribute("data:collapsed"),s=this.w.config.chart.events.legendClick;"function"==typeof s&&s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;"function"==typeof r&&t.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),t}(),ba=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=a.globals.minX,this.maxX=a.globals.maxX}return s(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=e.config.chart.toolbar.offsetY+"px",a.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s\n \n \n\n'),n("zoomOut",this.elZoomOut,'\n \n \n\n');var o=function(i){t.t[i]&&e.config.chart[i].enabled&&r.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'\n \n \n \n':'\n \n \n',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&e.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,'\n \n \n'),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;lthis.wheelDelay&&(this.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){a-i.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,i=this.w;this.minX=i.globals.isRangeBar?i.globals.minY:i.globals.minX,this.maxX=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;var a=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(a){var s,r,n,o=(t.clientX-a.left)/a.width,l=this.minX,h=this.maxX,c=h-l;if(t.deltaY<0){var d=l+o*c;r=d-(s=.5*c)/2,n=d+s/2}else r=l-(s=1.5*c)/2,n=h+s/2;if(!i.globals.isRangeBar){r=Math.max(r,i.globals.initialMinX),n=Math.min(n,i.globals.initialMaxX);var u=.01*(i.globals.initialMaxX-i.globals.initialMinX);if(n-r0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,i,a,s){return"l"===s||"r"===s?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resizing",this.selectionDragging.bind(this,"resizing")))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(u(u({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,a=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i;t.globals.isRangeBar&&(i=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,a=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var s={x:i,y:0,width:a,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(s),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,a=t.width,s=t.height,r=t.translateX,n=void 0===r?0:r,o=t.translateY,l=void 0===o?0:o,h=this.w,c=this.zoomRect,d=this.selectionRect;if(this.dragged||null!==h.globals.selection){var u={transform:"translate("+n+", "+l+")"};h.globals.zoomEnabled&&this.dragged&&(a<0&&(a=1),c.attr({x:e,y:i,width:a,height:s,fill:h.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":h.config.chart.zoom.zoomedArea.fill.opacity,stroke:h.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":h.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":h.config.chart.zoom.zoomedArea.stroke.opacity}),Mi.setAttrs(c.node,u)),h.globals.selectionEnabled&&(d.attr({x:e,y:i,width:a>0?a:0,height:s>0?s:0,fill:h.config.chart.selection.fill.color,"fill-opacity":h.config.chart.selection.fill.opacity,stroke:h.config.chart.selection.stroke.color,"stroke-width":h.config.chart.selection.stroke.width,"stroke-dasharray":h.config.chart.selection.stroke.dashArray,"stroke-opacity":h.config.chart.selection.stroke.opacity}),Mi.setAttrs(d.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.gridRect.getBoundingClientRect(),n=s.startX-1,o=s.startY,l=!1,h=!1,c=s.clientX-r.left-n,d=s.clientY-r.top-o,g={translateX:a.globals.translateX,translateY:a.globals.translateY};return Math.abs(c+n)>a.globals.gridWidth?c=a.globals.gridWidth-n:s.clientX-r.left<0&&(c=n),n>s.clientX-r.left&&(l=!0,c=Math.abs(c)),o>s.clientY-r.top&&(h=!0,d=Math.abs(d)),g=u(u({},g="x"===i?{x:l?n-c:n,y:0,width:c,height:a.globals.gridHeight}:"y"===i?{x:0,y:h?o-d:o,width:a.globals.gridWidth,height:d}:{x:l?n-c:n,y:h?o-d:o,width:c,height:d}),{},{translateX:a.globals.translateX,translateY:a.globals.translateY}),s.drawSelectionRect(g),s.selectionDragging("resizing"),g}},{key:"selectionDragging",value:function(t,e){var i=this,a=this.w;if(e){e.preventDefault();var s=e.detail,r=s.handler,n=s.box,o=n.x,l=n.y;othis.constraints.x2&&(o=this.constraints.x2-n.w),n.y2>this.constraints.y2&&(l=this.constraints.y2-n.h),r.move(o,l);var h=this.xyRatios,c=this.selectionRect,d=0;"resizing"===t&&(d=30);var u=function(t){return parseFloat(c.node.getAttribute(t))},g={x:u("x"),y:u("y"),width:u("width"),height:u("height")};a.globals.selection=g,"function"==typeof a.config.chart.events.selection&&a.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,s,r,n=i.gridRect.getBoundingClientRect(),o=c.node.getBoundingClientRect();a.globals.isRangeBar?(t=a.globals.yAxisScale[0].niceMin+(o.left-n.left)*h.invertedYRatio,e=a.globals.yAxisScale[0].niceMin+(o.right-n.left)*h.invertedYRatio,s=0,r=1):(t=a.globals.xAxisScale.niceMin+(o.left-n.left)*h.xRatio,e=a.globals.xAxisScale.niceMin+(o.right-n.left)*h.xRatio,s=a.globals.yAxisScale[0].niceMin+(n.bottom-o.bottom)*h.yRatio[0],r=a.globals.yAxisScale[0].niceMax-(o.top-n.top)*h.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:s,max:r}};a.config.chart.events.selection(i.ctx,l),a.config.chart.brush.enabled&&void 0!==a.config.chart.events.brushScrolled&&a.config.chart.events.brushScrolled(i.ctx,l)}),d))}}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.xyRatios,n=this.ctx.toolbar;if(s.startX>s.endX){var o=s.startX;s.startX=s.endX,s.endX=o}if(s.startY>s.endY){var l=s.startY;s.startY=s.endY,s.endY=l}var h=void 0,c=void 0;a.globals.isRangeBar?(h=a.globals.yAxisScale[0].niceMin+s.startX*r.invertedYRatio,c=a.globals.yAxisScale[0].niceMin+s.endX*r.invertedYRatio):(h=a.globals.xAxisScale.niceMin+s.startX*r.xRatio,c=a.globals.xAxisScale.niceMin+s.endX*r.xRatio);var d=[],u=[];if(a.config.yaxis.forEach((function(t,e){var i=a.globals.seriesYAxisMap[e][0];d.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.startY),u.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.endY)})),s.dragged&&(s.dragX>10||s.dragY>10)&&h!==c)if(a.globals.zoomEnabled){var g=v.clone(a.globals.initialConfig.yaxis),p=v.clone(a.globals.initialConfig.xaxis);if(a.globals.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),c=Math.floor(c),h<1&&(h=1,c=a.globals.dataPoints),c-h<2&&(c=h+1)),"xy"!==i&&"x"!==i||(p={min:h,max:c}),"xy"!==i&&"y"!==i||g.forEach((function(t,e){g[e].min=u[e],g[e].max=d[e]})),n){var f=n.getBeforeZoomRange(p,g);f&&(p=f.xaxis?f.xaxis:p,g=f.yaxis?f.yaxis:g)}var x={xaxis:p};a.config.chart.group||(x.yaxis=g),s.ctx.updateHelpers._updateOptions(x,!1,s.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&n.zoomCallback(p,g)}else if(a.globals.selectionEnabled){var b,m=null;b={min:h,max:c},"xy"!==i&&"y"!==i||(m=v.clone(a.config.yaxis)).forEach((function(t,e){m[e].min=u[e],m[e].max=d[e]})),a.globals.selection=s.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(s.ctx,{xaxis:b,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,a=e;if(void 0!==i.globals.lastClientPosition.x){var s=i.globals.lastClientPosition.x-a.clientX,r=i.globals.lastClientPosition.y-a.clientY;Math.abs(s)>Math.abs(r)&&s>0?this.moveDirection="left":Math.abs(s)>Math.abs(r)&&s<0?this.moveDirection="right":Math.abs(r)>Math.abs(s)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(s)&&r<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var n=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||a.panScrolled(n,o)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,a=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+a,i=t.globals.maxX+a):"right"===this.moveDirection&&(e=t.globals.minX-a,i=t.globals.maxX-a),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,a=this.xyRatios,s=v.clone(i.globals.initialConfig.yaxis),r=a.xRatio,n=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(r=a.invertedYRatio,n=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(t=n+i.globals.gridWidth/15*r,e=o+i.globals.gridWidth/15*r):"right"===this.moveDirection&&(t=n-i.globals.gridWidth/15*r,e=o-i.globals.gridWidth/15*r),i.globals.isRangeBar||(ti.globals.initialMaxX)&&(t=n,e=o);var l={xaxis:{min:t,max:e}};i.config.chart.group||(l.yaxis=s),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var a=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),a}(),va=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return s(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,a=t.clientX,s=t.clientY,r=this.w,n=i.getBoundingClientRect(),o=n.width,l=n.height,h=o/(r.globals.dataPoints-1),c=l/r.globals.dataPoints,d=this.hasBars();!r.globals.comboCharts&&!d||r.config.xaxis.convertedCatToNumeric||(h=o/r.globals.dataPoints);var u=a-n.left-r.globals.barPadForNumericAxis,g=s-n.top;u<0||g<0||u>o||g>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var p=Math.round(u/h),f=Math.floor(g/c);d&&!r.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(u/h),p-=1);var x=null,b=null,m=r.globals.seriesXvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))})),y=r.globals.seriesYvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))}));if(r.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),k=u*(w.width/o),A=g*(w.height/l);x=(b=this.closestInMultiArray(k,A,m,y)).index,p=b.j,null!==x&&(m=r.globals.seriesXvalues[x],p=(b=this.closestInArray(k,m)).index)}return r.globals.capturedSeriesIndex=null===x?-1:x,(!p||p<1)&&(p=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=f:r.globals.capturedDataPointIndex=p,{capturedSeries:x,j:r.globals.isBarHorizontal?f:p,hoverX:u,hoverY:g}}},{key:"closestInMultiArray",value:function(t,e,i,a){var s=this.w,r=0,n=null,o=-1;s.globals.series.length>1?r=this.getFirstActiveXArray(i):n=0;var l=i[r][0],h=Math.abs(t-l);if(i.forEach((function(e){e.forEach((function(e,i){var a=Math.abs(t-e);a<=h&&(h=a,o=i)}))})),-1!==o){var c=a[r][o],d=Math.abs(e-c);n=r,a.forEach((function(t,i){var a=Math.abs(e-t[o]);a<=d&&(d=a,n=i)}))}return{index:n,j:o}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,i=0,a=t.map((function(t,e){return t.length>0?e:-1})),s=0;s0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=f(t)).sort((function(t,e){var i=Number(t.getAttribute("data:realIndex")),a=Number(e.getAttribute("data:realIndex"));return ai?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var i=Number(t.getAttribute("cx")),a=Number(t.getAttribute("cy")),s=t.getAttribute("shape");return new Mi(this.ctx).getMarkerPath(i,a,s,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s ').concat(i.attrs.name,""),e+="
".concat(i.val,"
")})),m.innerHTML=t+"",v.innerHTML=e+""};n?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?y():(m.innerHTML="",v.innerHTML=""):y()}else m.innerHTML="",v.innerHTML="";null!==p&&(a[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:"");if(n&&f[0]){if(l.config.tooltip.hideEmptySeries){var w=a[e].querySelector(".apexcharts-tooltip-marker"),k=a[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(c)?(w.style.display="none",k.style.display="none"):(w.style.display="block",k.style.display="block")}null==c||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)?f[0].parentNode.style.display="none":f[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)&&(f[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var i=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));a&&(a.classList.add("apexcharts-active"),a.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",n="",o=null,l=null,h={series:a.globals.series,seriesIndex:e,dataPointIndex:i,w:a},c=a.globals.ttZFormatter;null===i?l=a.globals.series[e]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(r=s[e][i],0===s[e].length&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=new $i(this.ctx).isFormatXY()?void 0!==a.config.series[e].data[i]?a.config.series[e].data[i].x:"":void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var d=r;a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?r=new Xi(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(this.ctx).formatDate,w:this.w}):r=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](d,h):a.globals.xLabelFormatter(d,h);return void 0!==a.config.tooltip.x.formatter&&(r=a.globals.ttKeyFormatter(d,h)),a.globals.seriesZ.length>0&&a.globals.seriesZ[e].length>0&&(o=c(a.globals.seriesZ[e][i],a)),n="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(d,h):r,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,a=t.y1,s=t.y2,r=t.w,n=this.ttCtx.getElTooltip(),o=r.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]),n.innerHTML=o({ctx:this.ctx,series:r.globals.series,seriesIndex:e,dataPointIndex:i,y1:a,y2:s,w:r})}}]),t}(),wa=function(){function t(e){i(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return s(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=t-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(null!==e&&(r=a.globals.gridWidth/n*e),null===s||a.globals.isBarHorizontal||(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=r;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Mi.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Mi.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=e.globals.translateX;var s;s=new Mi(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=e.globals.translateY+a,r=i.yaxisTTEls[t].getBoundingClientRect().height,n=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(n-=26),s-=r/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=n+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),n=s.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(t)+o+5,h=parseFloat(e)+o/2;if(l>a.globals.gridWidth/2&&(l=l-n.ttWidth-o-10),l>a.globals.gridWidth-n.ttWidth-10&&(l=a.globals.gridWidth-n.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var c=s.getElGrid().getBoundingClientRect();(l=s.e.clientX-c.left)>a.globals.gridWidth/2&&(l-=s.tooltipRect.ttWidth),(h=s.e.clientY+a.globals.translateY-c.top)>a.globals.gridHeight/2&&(h-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+h>a.globals.gridHeight&&(h=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(l)||(l+=a.globals.translateX,r.style.left=l+"px",r.style.top=h+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),r=0;r0){var g=u.getAttribute("shape"),p=l.getMarkerPath(s,r,g,1.5*c);u.setAttribute("d",p)}this.moveXCrosshairs(s),o.fixedTooltip||this.moveTooltip(s,r,c)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,a=i.w,s=0,r=0,n=a.globals.pointsArray,o=new Zi(this.ctx),l=new Mi(this.ctx);e=o.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var h=i.tooltipUtil.getHoverMarkerSize(e);n[e]&&(s=n[e][t][0],r=n[e][t][1]);var c=i.tooltipUtil.getAllMarkers();if(null!==c)for(var d=0;d0){var b=l.getMarkerPath(s,g,f,h);c[d].setAttribute("d",b)}else c[d].setAttribute("d","")}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,r||a.globals.gridHeight,h)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(r=new Zi(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"']"));n||"number"!=typeof e||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var o=n?parseFloat(n.getAttribute("cx")):0,l=n?parseFloat(n.getAttribute("cy")):0,h=n?parseFloat(n.getAttribute("barWidth")):0,c=a.getElGrid().getBoundingClientRect(),d=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!d&&(o-=s%2!=0?h/2:0),n&&d&&(o-=h/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[t-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[t]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?l-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?l=a.e.clientY-c.top-a.tooltipRect.ttHeight/2:l+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(l=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,l||i.globals.gridHeight)}}]),t}(),ka=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new wa(e)}return s(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Vi(this.ctx),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=f(a),t.config.chart.stacked&&a.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w;"bubble"!==s.config.chart.type&&this.newPointSize(t,e);var r=e.getAttribute("cx"),n=e.getAttribute("cy");if(null!==i&&null!==a&&(r=i,n=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===s.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(r,n,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,a=this.ttCtx,s=t,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=e.config.markers.hover.size,o=0;o0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],i);t[e].setAttribute("d",a)}else t[e].setAttribute("d","M0,0")}}}]),t}(),Aa=function(){function t(e){i(this,t),this.w=e.w;var a=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!a.globals.isBarHorizontal&&"rangeBar"===a.config.chart.type&&a.config.plotOptions.bar.rangeBarGroupRows}return s(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,s=t.y,r=t.type,n=this.ttCtx,o=this.w;if(e.target.classList.contains("apexcharts-".concat(r,"-rect"))){var l=this.getAttr(e,"i"),h=this.getAttr(e,"j"),c=this.getAttr(e,"cx"),d=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),g=this.getAttr(e,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:h,shared:!1,e:e}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=h,a=c+n.tooltipRect.ttWidth/2+u,s=d+n.tooltipRect.ttHeight/2-g/2,n.tooltipPosition.moveXCrosshairs(c+u/2),a>o.globals.gridWidth/2&&(a=c-n.tooltipRect.ttWidth/2+u),n.w.config.tooltip.followCursor){var p=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-p.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),s=o.globals.clientY-p.top-(s>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=t.x,n=t.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var h=parseInt(s.paths.getAttribute("cx"),10),c=parseInt(s.paths.getAttribute("cy"),10),d=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),e=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=v.findAncestor(s.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,e,i),o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=i,r=h,n=c+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var g=l.getElGrid().getBoundingClientRect();n=l.e.clientY+o.globals.translateY-g.top}d<0&&(n=c),l.marker.enlargeCurrentPoint(i,s.paths,r,n)}return{x:r,y:n}}},{key:"handleBarTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=this.ttCtx,o=n.getElTooltip(),l=0,h=0,c=0,d=this.getBarTooltipXY({e:a,opt:s});if(null!==d.j||0!==d.barHeight||0!==d.barWidth){e=d.i;var u=d.j;if(r.globals.capturedSeriesIndex=e,r.globals.capturedDataPointIndex=u,r.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!r.config.tooltip.shared?(h=d.x,c=d.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[e]:r.config.stroke.width,l=h):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(c)&&(c=r.globals.svgHeight-n.tooltipRect.ttHeight),parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),h+n.tooltipRect.ttWidth>r.globals.gridWidth?h-=n.tooltipRect.ttWidth:h<0&&(h=0),n.w.config.tooltip.followCursor){var g=n.getElGrid().getBoundingClientRect();c=n.e.clientY-g.top}null===n.tooltip&&(n.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?n.tooltipPosition.moveXCrosshairs(l+i/2):n.tooltipPosition.moveXCrosshairs(l)),!n.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(c=c+r.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=h+r.globals.translateX+"px",o.style.top=c+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,i=t.e,a=t.opt,s=this.w,r=null,n=this.ttCtx,o=0,l=0,h=0,c=0,d=0,u=i.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){var g=i.target,p=g.getBoundingClientRect(),f=a.elGrid.getBoundingClientRect(),x=p.height;d=p.height;var b=p.width,m=parseInt(g.getAttribute("cx"),10),v=parseInt(g.getAttribute("cy"),10);c=parseFloat(g.getAttribute("barWidth"));var y="touchmove"===i.type?i.touches[0].clientX:i.clientX;r=parseInt(g.getAttribute("j"),10),o=parseInt(g.parentNode.getAttribute("rel"),10)-1;var w=g.getAttribute("data-range-y1"),k=g.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(g.parentNode.getAttribute("data:realIndex"),10));var A=function(t){return s.globals.isXNumeric?m-b/2:e.isVerticalGroupedRangeBar?m+b/2:m-n.dataPointsDividedWidth+b/2},C=function(){return v-n.dataPointsDividedHeight+x/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:r,y1:w?parseInt(w,10):null,y2:k?parseInt(k,10):null,shared:!n.showOnIntersect&&s.config.tooltip.shared,e:i}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(l=y-f.left+15,h=C()):(l=A(),h=i.clientY-f.top-n.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((l=m)0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var a=this.ttCtx,s=this.w,r=s.globals,n=r.seriesYAxisMap[t];if(a.yaxisTooltips[t]&&n.length>0){var o=r.yLabelFormatters[t],l=a.getElGrid().getBoundingClientRect(),h=n[0],c=0;i.yRatio.length>1&&(c=h);var d=(e-l.top)*i.yRatio[c],u=r.maxYArr[h]-r.minYArr[h],g=r.minYArr[h]+(u-d);s.config.yaxis[t].reversed&&(g=r.maxYArr[h]-(u-d)),a.tooltipPosition.moveYCrosshairs(e-l.top),a.yaxisTooltipText[t].innerHTML=o(g),a.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),Sa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.tConfig=a.config.tooltip,this.tooltipUtil=new va(this),this.tooltipLabels=new ya(this),this.tooltipPosition=new wa(this),this.marker=new ka(this),this.intersect=new Aa(this),this.axesTooltip=new Ca(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!a.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return s(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new Qi(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,a=[],s=this.getElTooltip(),r=function(r){var n=document.createElement("div");n.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(r)),n.style.order=i.config.tooltip.inverseOrder?t-r:r+1;var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[r],n.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var a=document.createElement("span");a.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(a),l.appendChild(e)})),n.appendChild(l),s.appendChild(n),a.push(n)},n=0;n0&&this.addPathsEventListeners(g,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(r=r+t.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+t.globals.svgHeight-s-10),e.style.left=r+"px",e.style.top=n+"px",{x:r,y:n,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,a=function(a){var s={paths:t[a],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[a].addEventListener(e,i.onSeriesHover.bind(i,s),{capture:!1,passive:!0})}))},s=0;s=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(t,e)}),20-a))}},{key:"seriesHover",value:function(t,e){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||0===s.globals.dataPoints)||(a.length?a.forEach((function(a){var s=i.getElTooltip(a),r={paths:t.paths,tooltipEl:s,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===i.w.globals.minX&&a.w.globals.maxX===i.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:r,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,a=t.opt,s=t.e,r=e.w,n=this.getElTooltip(e);if(n){if(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=s,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared)if(this.tConfig.onDatasetHover.highlightDataSeries)new Zi(e).toggleSeriesOnHover(s,s.target.parentNode);i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect})}}},{key:"axisChartsTooltips",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=s.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,ln.top+n.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var h=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(h)<0)return void this.handleMouseOut(s)}var c=this.getElTooltip(),d=this.getElXCrosshairs(),u=[];r.config.chart.group&&(u=this.ctx.getSyncedCharts());var g=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;null!==d&&d.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),g&&!this.showOnIntersect||u.length>1)this.handleStickyTooltip(a,o,l,s);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:e,y:i,type:r.config.chart.type});e=f.x,i=f.y,c.style.left=e+"px",c.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:e,y:i});if(this.yaxisTooltips.length)for(var x=0;xl.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(t,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||s.globals.isBarHorizontal){var h=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,h,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,i,a){var s=this.w;if(!this.tConfig.shared&&null===s.globals.series[e][a])return void this.handleMouseOut(i);if(void 0!==s.globals.series[e][a])this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,a,i.ttItems):this.create(t,this,e,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var r=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,r,a,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Mi(this.ctx),i=t.globals.dom.Paper.find(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,A=this.w,C=e;"mouseup"===t.type&&this.markerClick(t,i,a),null===k&&(k=this.tConfig.shared);var S=this.tooltipUtil.hasMarkers(i),L=this.tooltipUtil.getElBars();if(A.config.legend.tooltipHoverFormatter){var M=A.config.legend.tooltipHoverFormatter,P=Array.from(this.legendLabels);P.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var I=0;I0?C.marker.enlargePoints(a):C.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var E=new Mi(this.ctx),H=A.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var O=0;O0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*k)),w){u=u+d.height/2-b/2-2}var C=e.globals.series[i][a]<0,S=o;switch(this.barCtx.isReversed&&(S=o+(C?c:-c)),f.position){case"center":g=w?C?S-c/2+v:S+c/2-v:C?S-c/2+d.height/2+v:S+c/2+d.height/2-v;break;case"bottom":g=w?C?S-c+v:S+c-v:C?S-c+d.height+b+v:S+c-d.height/2+b-v;break;case"top":g=w?C?S+v:S-v:C?S-d.height/2-v:S+d.height+v}if(this.barCtx.lastActiveBarSerieIndex===s&&x.enabled){var L=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:a}),p.fontSize);r=C?S-L.height/2-v-x.offsetY+18:S+L.height+v+x.offsetY-18;var M=A;n=y+(e.globals.isXNumeric?-h*e.globals.barGroups.length/2:e.globals.barGroups.length*h/2-(e.globals.barGroups.length-1)*h-M)+x.offsetX}return e.config.chart.stacked||(g<0?g=0+b:g+d.height/3>e.globals.gridHeight&&(g=e.globals.gridHeight-b)),{bcx:l,bcy:o,dataLabelsX:u,dataLabelsY:g,totalDataLabelsX:n,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,a=t.i,s=t.j,r=t.realIndex,n=t.bcy,o=t.barHeight,l=t.barWidth,h=t.textRects,c=t.dataLabelsX,d=t.strokeWidth,u=t.dataLabelsConfig,g=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,f=t.offX,x=t.offY,b=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var m,v,y=n-(this.barCtx.isRangeBar?0:b)+o/2+h.height/2+x-3,w="start",k=e.globals.series[a][s]<0,A=i;switch(this.barCtx.isReversed&&(A=i+(k?-l:l),w=k?"start":"end"),g.position){case"center":c=k?A+l/2-f:Math.max(h.width/2,A-l/2)+f;break;case"bottom":c=k?A+l-d-f:A-l+d+f;break;case"top":c=k?A-d-f:A-d+f}if(this.barCtx.lastActiveBarSerieIndex===r&&p.enabled){var C=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:s}),u.fontSize);k?(m=A-d-f-p.offsetX,w="end"):m=A+f+p.offsetX+(this.barCtx.isReversed?-(l+d):d),v=y-h.height/2+C.height/2+p.offsetY+d}return e.config.chart.stacked||("start"===u.textAnchor?c-h.width<0?c=k?h.width+d:d:c+h.width>e.globals.gridWidth&&(c=k?e.globals.gridWidth-d:e.globals.gridWidth-h.width-d):"middle"===u.textAnchor?c-h.width/2<0?c=h.width/2+d:c+h.width/2>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width/2-d):"end"===u.textAnchor&&(c<1?c=h.width+d:c+1>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width-d))),{bcx:i,bcy:n,dataLabelsX:c,dataLabelsY:y,totalDataLabelsX:m,totalDataLabelsY:v,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.i,r=t.j,n=t.textRects,o=t.barHeight,l=t.barWidth,h=t.dataLabelsConfig,c=this.w,d="rotate(0)";"vertical"===c.config.plotOptions.bar.dataLabels.orientation&&(d="rotate(-90, ".concat(e,", ").concat(i,")"));var g=new qi(this.barCtx.ctx),p=new Mi(this.barCtx.ctx),f=h.formatter,x=null,b=c.globals.collapsedSeriesIndices.indexOf(s)>-1;if(h.enabled&&!b){x=p.group({class:"apexcharts-data-labels",transform:d});var m="";void 0!==a&&(m=f(a,u(u({},c),{},{seriesIndex:s,dataPointIndex:r,w:c}))),!a&&c.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(m="");var v=c.globals.series[s][r]<0,y=c.config.plotOptions.bar.dataLabels.position;if("vertical"===c.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(h.textAnchor=v?"end":"start"),"center"===y&&(h.textAnchor="middle"),"bottom"===y&&(h.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels)lMath.abs(l)&&(m=""):n.height/1.6>Math.abs(o)&&(m=""));var w=u({},h);this.barCtx.isHorizontal&&a<0&&("start"===h.textAnchor?w.textAnchor="end":"end"===h.textAnchor&&(w.textAnchor="start")),g.plotDataLabelsText({x:e,y:i,text:m,i:s,j:r,parent:x,dataLabelsConfig:w,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}},{key:"drawTotalDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.realIndex,r=t.textAnchor,n=t.barTotalDataLabelsConfig;this.w;var o,l=new Mi(this.barCtx.ctx);return n.enabled&&void 0!==e&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===s&&(o=l.drawText({x:e,y:i,foreColor:n.style.color,text:a,textAnchor:r,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),o}}]),t}(),Ma=function(){function t(e){i(this,t),this.w=e.w,this.barCtx=e}return s(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[i].length),e.globals.isXNumeric)for(var a=0;ae.globals.minX&&e.globals.seriesX[i][a]0&&(a=l.globals.minXDiff/d),(r=a/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),n=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+(a-r*this.barCtx.seriesLen)/2}return l.globals.barHeight=s,l.globals.barWidth=r,{x:t,y:e,yDivision:i,xDivision:a,barHeight:s,barWidth:r,zeroH:n,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,i,a){var s,r,n,o,l=this.w,h=this.barCtx.ctx.fill,c=null,d=this.barCtx.barOptions.distributed?i:e;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(a){t[e][i]>=a.from&&t[e][i]<=a.to&&(c=a.color)}));return h.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:a,dataPointIndex:i,color:c,value:t[e][i],fillConfig:null===(s=l.config.series[e].data[i])||void 0===s?void 0:s.fill,fillType:null!==(r=l.config.series[e].data[i])&&void 0!==r&&null!==(n=r.fill)&&void 0!==n&&n.type?null===(o=l.config.series[e].data[i])||void 0===o?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[a]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,i){var a=0,s=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"createBorderRadiusArr",value:function(t){var e,i=this.w,a=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,s=t.length,n=0|(null===(e=t[0])||void 0===e?void 0:e.length),o=Array.from({length:s},(function(){return Array(n).fill(a?"top":"none")}));if(a)return o;for(var l=0;l0?(h.push(u),d++):g<0&&(c.push(u),d++)}if(h.length>0&&0===c.length)if(1===h.length)o[h[0]][l]="both";else{var p,f=h[0],x=h[h.length-1],b=r(h);try{for(b.s();!(p=b.n()).done;){var m=p.value;o[m][l]=m===f?"bottom":m===x?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===h.length)if(1===c.length)o[c[0]][l]="both";else{var v,y=Math.max.apply(Math,c),w=Math.min.apply(Math,c),k=r(c);try{for(k.s();!(v=k.n()).done;){var A=v.value;o[A][l]=A===y?"bottom":A===w?"top":"none"}}catch(t){k.e(t)}finally{k.f()}}else if(h.length>0&&c.length>0){var C,S=h[h.length-1],L=r(h);try{for(L.s();!(C=L.n()).done;){var M=C.value;o[M][l]=M===S?"top":"none"}}catch(t){L.e(t)}finally{L.f()}var P,I=Math.max.apply(Math,c),T=r(c);try{for(T.s();!(P=T.n()).done;){var z=P.value;o[z][l]=z===I?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else if(1===d){o[h[0]||c[0]][l]="both"}}return o}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,a=t.x1,s=t.x2,r=t.y1,n=t.y2,o=t.elSeries,l=this.w,h=new Mi(this.barCtx.ctx),c=new Zi(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var d=this.barCtx.barOptions.colors.backgroundBarColors[e],u=h.drawRect(void 0!==a?a:0,void 0!==r?r:0,void 0!==s?s:l.globals.gridWidth,void 0!==n?n:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,i=t.barWidth,a=t.barXPosition,s=t.y1,r=t.y2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.columnWidthOffset&&(x=a-g.config.series[c].data[u].columnWidthOffset/2,f=i+g.config.series[c].data[u].columnWidthOffset);var b=n/2,m=x+b,v=x+f-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001-b*y,r+=.001+b*y;var w=p.move(m,s),k=p.move(m,s),A=p.line(v,s);if(g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1)),w=w+p.line(m,r)+p.line(v,r)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(m,s)+A+A+A+A+A+p.line(m,s)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).yArrj.push(r-b*y),C.yArrjF.push(Math.abs(s-r+n*y)),C.yArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"getBarpaths",value:function(t){var e,i=t.barYPosition,a=t.barHeight,s=t.x1,r=t.x2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.barHeightOffset&&(f=i-g.config.series[c].data[u].barHeightOffset/2,x=a+g.config.series[c].data[u].barHeightOffset);var b=n/2,m=f+b,v=f+x-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001+b*y,r+=.001-b*y;var w=p.move(s,m),k=p.move(s,m);g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1));var A=p.line(s,v);if(w=w+p.line(r,m)+p.line(r,v)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(s,m)+A+A+A+A+A+p.line(s,m)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).xArrj.push(r+b*y),C.xArrjF.push(Math.abs(s-r-n*y)),C.xArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;a2&&void 0!==arguments[2])||arguments[2]?e:null;return null!=t&&(i=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(t,e,i){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?e:null;return null!=t&&(a=e-t/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(t,e,i,a,s,r){var n=this,l=this.w,h=[],c=function(a,s){var l;h.push((o(l={},t,"x"===t?n.getXForValue(a,e,!1):n.getYForValue(a,i,r,!1)),o(l,"attrs",s),l))};if(l.globals.seriesGoals[a]&&l.globals.seriesGoals[a][s]&&Array.isArray(l.globals.seriesGoals[a][s])&&l.globals.seriesGoals[a][s].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,g={strokeHeight:"x"===t?0:l.globals.markers.size[a],strokeWidth:"x"===t?l.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[a])?d[a][0]:d[a]};c(l.globals.seriesRangeStart[a][s],g),c(l.globals.seriesRangeEnd[a][s],u(u({},g),{},{strokeColor:Array.isArray(d[a])?d[a][1]:d[a]}))}return h}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,a=t.goalX,s=t.goalY,r=t.barWidth,n=t.barHeight,o=new Mi(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var h=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach((function(t){if(t.x>=-1&&t.x<=o.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:n/2,a=i+e+n/2;h=o.drawLine(t.x,a-2*e,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(h)}})):Array.isArray(s)&&s.forEach((function(t){if(t.y>=-1&&t.y<=o.w.globals.gridHeight+1){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:r/2,a=e+i+r/2;h=o.drawLine(a-2*i,t.y,a,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(h)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,i=t.currPaths,a=t.color,s=this.w,r=e.x,n=e.x1,o=e.barYPosition,l=i.x,h=i.x1,c=i.barYPosition,d=o+i.barHeight,u=new Mi(this.barCtx.ctx),g=new v,p=u.move(n,d)+u.line(r,d)+u.line(l,c)+u.line(h,c)+u.line(n,d)+("around"===s.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return u.drawPath({d:p,fill:g.shadeColor(.5,v.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,i=t.i,a=t.j,s=this.w,r=0,n=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map((function(t,e){return e})):(null===(e=s.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=s.globals.seriesPercent[t][a];e&&r++,t-1})),a=this.barCtx.columnGroupIndices,s=a.indexOf(i);return s<0&&(a.push(i),s=a.length-1),{groupIndex:i,columnGroupIndex:s}}}]),t}(),Pa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w;var s=this.w;this.barOptions=s.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=s.config.stroke.width,this.isNullValue=!1,this.isRangeBar=s.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!s.globals.isBarHorizontal&&s.globals.seriesRange.length&&s.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=a,null!==this.xyRatios&&(this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.invertedXRatio=a.invertedXRatio,this.invertedYRatio=a.invertedYRatio,this.baseLineY=a.baseLineY,this.baseLineInvertedY=a.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var r=new Zi(this.ctx);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var n=r.getBarSeriesIndices(),o=new Pi(this.ctx);this.stackedSeriesTotals=o.getStackedSeriesTotals(this.w.config.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}))),this.barHelpers=new Ma(this)}return s(t,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=new Pi(this.ctx,i);t=s.getLogSeries(t),this.series=t,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var n=0,o=0;n0&&(this.visibleI=this.visibleI+1);var w=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[b],this.translationsIndex=b);var A=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var C=this.barHelpers.initialPositions();p=C.y,w=C.barHeight,h=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,l=C.xDivision,c=C.zeroH,this.isHorizontal||x.push(g+k/2);var S=a.group({class:"apexcharts-datalabels","data:realIndex":b});i.globals.delayedElements.push({el:S.node}),S.node.classList.add("apexcharts-element-hidden");var L=a.group({class:"apexcharts-bar-goals-markers"}),M=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");for(var P=0;P0){var R=this.barHelpers.drawBarShadow({color:"string"==typeof X&&-1===(null==X?void 0:X.indexOf("url"))?X:v.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});if(M.add(R),i.config.chart.dropShadow.enabled)new Li(this.ctx).dropShadow(R,i.config.chart.dropShadow,b)}this.pathArr.push(T);var Y=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:w,barWidth:k});Y&&L.add(Y),p=T.y,g=T.x,P>0&&x.push(g+k/2),f.push(p),this.renderSeries({realIndex:b,pathFill:X,j:P,i:n,columnGroupIndex:m,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:I,elSeries:y,x:g,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:w),barWidth:Math.abs(T.barWidth?T.barWidth:k),elDataLabelsWrap:S,elGoalsMarkers:L,elBarShadows:M,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[b]=x,i.globals.seriesYvalues[b]=f,r.add(y)}return r}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,a=t.lineFill,s=t.j,r=t.i,n=t.columnGroupIndex,o=t.pathFrom,l=t.pathTo,h=t.strokeWidth,c=t.elSeries,d=t.x,u=t.y,g=t.y1,p=t.y2,f=t.series,x=t.barHeight,b=t.barWidth,m=t.barXPosition,v=t.barYPosition,y=t.elDataLabelsWrap,w=t.elGoalsMarkers,k=t.elBarShadows,A=t.visibleSeries,C=t.type,S=t.classes,L=this.w,M=new Mi(this.ctx);if(!a){var P="function"==typeof L.globals.stroke.colors[e]?function(t){var e,i=L.config.stroke.colors;return Array.isArray(i)&&i.length>0&&((e=i[t])||(e=""),"function"==typeof e)?e({value:L.globals.series[t][s],dataPointIndex:s,w:L}):e}(e):L.globals.stroke.colors[e];a=this.barOptions.distributed?L.globals.stroke.colors[s]:P}L.config.series[r].data[s]&&L.config.series[r].data[s].strokeColor&&(a=L.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var I=s/L.config.chart.animations.animateGradually.delay*(L.config.chart.animations.speed/L.globals.dataPoints)/2.4,T=M.renderPaths({i:r,j:s,realIndex:e,pathFrom:o,pathTo:l,stroke:a,strokeWidth:h,strokeLineCap:L.config.stroke.lineCap,fill:i,animationDelay:I,initialSpeed:L.config.chart.animations.speed,dataChangeSpeed:L.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(C,"-area ").concat(S),chartType:C});T.attr("clip-path","url(#gridRectBarMask".concat(L.globals.cuid,")"));var z=L.config.forecastDataPoints;z.count>0&&s>=L.globals.dataPoints-z.count&&(T.node.setAttribute("stroke-dasharray",z.dashArray),T.node.setAttribute("stroke-width",z.strokeWidth),T.node.setAttribute("fill-opacity",z.fillOpacity)),void 0!==g&&void 0!==p&&(T.attr("data-range-y1",g),T.attr("data-range-y2",p)),new Li(this.ctx).setSelectionFilter(T,e,s),c.add(T);var X=new La(this).handleBarDataLabels({x:d,y:u,y1:g,y2:p,i:r,j:s,series:f,realIndex:e,columnGroupIndex:n,barHeight:x,barWidth:b,barXPosition:m,barYPosition:v,renderedPath:T,visibleSeries:A});return null!==X.dataLabels&&y.add(X.dataLabels),X.totalDataLabels&&y.add(X.totalDataLabels),c.add(y),w&&c.add(w),k&&c.add(k),c}},{key:"drawBarPaths",value:function(t){var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.yDivision,h=t.elSeries,c=this.w,d=i.i,u=i.j;if(c.globals.isXNumeric)e=(o=(c.globals.seriesX[d][u]-c.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var g=0,p=0;c.globals.seriesPercent.forEach((function(t,e){t[u]&&g++,e0&&(a=this.seriesLen*a/g),e=o+a*this.visibleI,e-=a*p}else e=o+a*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[d][u],r)-r)/2),n=this.barHelpers.getXForValue(this.series[d][u],r);var f=this.barHelpers.getBarpaths({barYPosition:e,barHeight:a,x1:r,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:d,j:u,w:c});return c.globals.isXNumeric||(o+=l),this.barHelpers.barBackground({j:u,i:d,y1:e-a*this.visibleI,y2:a*this.seriesLen,elSeries:h}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x1:r,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",r,null,d,u),barYPosition:e,barHeight:a}}},{key:"drawColumnPaths",value:function(t){var e,i=t.indexes,a=t.x,s=t.y,r=t.xDivision,n=t.barWidth,o=t.zeroH,l=t.strokeWidth,h=t.elSeries,c=this.w,d=i.realIndex,u=i.translationsIndex,g=i.i,p=i.j,f=i.bc;if(c.globals.isXNumeric){var x=this.getBarXForNumericXAxis({x:a,j:p,realIndex:d,barWidth:n});a=x.x,e=x.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var b=this.barHelpers.getZeroValueEncounters({i:g,j:p}),m=b.nonZeroColumns,v=b.zeroEncounters;m>0&&(n=this.seriesLen*n/m),e=a+n*this.visibleI,e-=n*v}else e=a+n*this.visibleI;s=this.barHelpers.getYForValue(this.series[g][p],o,u);var y=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:n,y1:o,y2:s,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:d,i:g,j:p,w:c});return c.globals.isXNumeric||(a+=r),this.barHelpers.barBackground({bc:f,j:p,i:g,x1:e-l/2-n*this.visibleI,x2:n*this.seriesLen+l/2,elSeries:h}),{pathTo:y.pathTo,pathFrom:y.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,g,p,u),barXPosition:e,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,i=t.barWidth,a=t.realIndex,s=t.j,r=this.w,n=a;return r.globals.seriesX[a].length||(n=r.globals.maxValsInArrayIndex),v.isNumber(r.globals.seriesX[n][s])&&(e=(r.globals.seriesX[n][s]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:e+i*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var i,a=this.w,s=0;s0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==a.globals.previousPaths[s].paths[e]&&(i=a.globals.previousPaths[s].paths[e].d)}return i}}]),t}(),Ia=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this,a=this.w;this.graphics=new Mi(this.ctx),this.bar=new Pa(this.ctx,this.xyRatios);var s=new Pi(this.ctx,a);t=s.getLogSeries(t),this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===a.config.chart.stackType&&(t=a.globals.comboCharts?e.map((function(t){return a.globals.seriesPercent[t]})):a.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);for(var r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),n=0,o=0,l=function(s,l){var h=void 0,c=void 0,d=void 0,g=void 0,p=a.globals.comboCharts?e[s]:s,f=i.barHelpers.getGroupIndex(p),x=f.groupIndex,b=f.columnGroupIndex;i.groupCtx=i[a.globals.seriesGroups[x]];var m=[],y=[],w=0;i.yRatio.length>1&&(i.yaxisIndex=a.globals.seriesYAxisReverseMap[p][0],w=p),i.isReversed=a.config.yaxis[i.yaxisIndex]&&a.config.yaxis[i.yaxisIndex].reversed;var k=i.graphics.group({class:"apexcharts-series",seriesName:v.escapeString(a.globals.seriesNames[p]),rel:s+1,"data:realIndex":p});i.ctx.series.addCollapsedClassToSeries(k,p);var A=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),C=i.graphics.group({class:"apexcharts-bar-goals-markers"}),S=0,L=0,M=i.initialPositions(n,o,h,c,d,g,w);o=M.y,S=M.barHeight,c=M.yDivision,g=M.zeroW,n=M.x,L=M.barWidth,h=M.xDivision,d=M.zeroH,a.globals.barHeight=S,a.globals.barWidth=L,i.barHelpers.initializeStackedXYVars(i),1===i.groupCtx.prevY.length&&i.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(i.groupCtx.prevY[0]=i.groupCtx.prevY[0].map((function(){return d})),i.groupCtx.prevYF[0]=i.groupCtx.prevYF[0].map((function(){return 0})));for(var P=0;P0||"top"===i.barHelpers.arrBorderRadius[p][P]&&a.globals.series[p][P]<0)&&(Y=E),k=i.renderSeries({realIndex:p,pathFill:R,j:P,i:s,columnGroupIndex:b,pathFrom:z.pathFrom,pathTo:z.pathTo,strokeWidth:I,elSeries:k,x:n,y:o,series:t,barHeight:S,barWidth:L,elDataLabelsWrap:A,elGoalsMarkers:C,type:"bar",visibleSeries:b,classes:Y})}a.globals.seriesXvalues[p]=m,a.globals.seriesYvalues[p]=y,i.groupCtx.prevY.push(i.groupCtx.yArrj),i.groupCtx.prevYF.push(i.groupCtx.yArrjF),i.groupCtx.prevYVal.push(i.groupCtx.yArrjVal),i.groupCtx.prevX.push(i.groupCtx.xArrj),i.groupCtx.prevXF.push(i.groupCtx.xArrjF),i.groupCtx.prevXVal.push(i.groupCtx.xArrjVal),r.add(k)},h=0,c=0;h1?l=(i=h.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(d).indexOf("%")?l=parseInt(d,10):l*=parseInt(d,10)/100,s=this.isReversed?this.baseLineY[n]:h.globals.gridHeight-this.baseLineY[n],t=h.globals.padHorizontal+(i-l)/2}var u=h.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:i,barHeight:o/u,barWidth:l/u,zeroH:s,zeroW:r}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.columnGroupIndex,h=t.seriesGroup,c=t.yDivision,d=t.elSeries,u=this.w,g=o+l*a,p=i.i,f=i.j,x=i.realIndex,b=i.translationsIndex,m=0,v=0;v0){var w=r;this.groupCtx.prevXVal[y-1][f]<0?w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[y-1][f]:this.groupCtx.prevXVal[y-1][f]>=0&&(w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]:this.groupCtx.prevX[y-1][f]-m+2*(this.isReversed?m:0)),e=w}else e=r;n=null===this.series[p][f]?e:e+this.series[p][f]/this.invertedYRatio-2*(this.isReversed?this.series[p][f]/this.invertedYRatio:0);var k=this.barHelpers.getBarpaths({barYPosition:g,barHeight:a,x1:e,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,seriesGroup:h,i:p,j:f,w:u});return this.barHelpers.barBackground({j:f,i:p,y1:g,y2:a,elSeries:d}),o+=c,{pathTo:k.pathTo,pathFrom:k.pathFrom,goalX:this.barHelpers.getGoalValues("x",r,null,p,f,b),barXPosition:e,barYPosition:g,x:n,y:o}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,r=t.barWidth,n=t.zeroH,o=t.columnGroupIndex,l=t.seriesGroup,h=t.elSeries,c=this.w,d=e.i,u=e.j,g=e.bc,p=e.realIndex,f=e.translationsIndex;if(c.globals.isXNumeric){var x=c.globals.seriesX[p][u];x||(x=0),i=(x-c.globals.minX)/this.xRatio-r/2*c.globals.barGroups.length}for(var b,m=i+o*r,v=0,y=0;y0&&!c.globals.isXNumeric||w>0&&c.globals.isXNumeric&&c.globals.seriesX[p-1][u]===c.globals.seriesX[p][u]){var k,A,C,S=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var L=1;L=0?C-v+2*(this.isReversed?v:0):C;break}if((null===(T=this.groupCtx.prevYVal[w-P])||void 0===T?void 0:T[u])>=0){A=this.series[d][u]>=0?C:C+v-2*(this.isReversed?v:0);break}}void 0===A&&(A=c.globals.gridHeight),b=null!==(k=this.groupCtx.prevYF[0])&&void 0!==k&&k.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?n:A}else b=n;a=this.series[d][u]?b-this.series[d][u]/this.yRatio[f]+2*(this.isReversed?this.series[d][u]/this.yRatio[f]:0):b;var z=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:r,y1:b,y2:a,yRatio:this.yRatio[f],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:d,j:u,w:c});return this.barHelpers.barBackground({bc:g,j:u,i:d,x1:m,x2:r,elSeries:h}),{pathTo:z.pathTo,pathFrom:z.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,n,d,u),barXPosition:m,x:c.globals.isXNumeric?i:i+s,y:a}}}]),a}(),Ta=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e,i){var a=this,s=this.w,r=new Mi(this.ctx),n=s.globals.comboCharts?e:s.config.chart.type,o=new ji(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=s.config.plotOptions.bar.horizontal;var l=new Pi(this.ctx,s);t=l.getLogSeries(t),this.series=t,this.yRatio=l.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var h=r.group({class:"apexcharts-".concat(n,"-series apexcharts-plot-series")}),c=function(e){a.isBoxPlot="boxPlot"===s.config.chart.type||"boxPlot"===s.config.series[e].type;var n,l,c,d,g=void 0,p=void 0,f=[],x=[],b=s.globals.comboCharts?i[e]:e,m=a.barHelpers.getGroupIndex(b).columnGroupIndex,y=r.group({class:"apexcharts-series",seriesName:v.escapeString(s.globals.seriesNames[b]),rel:e+1,"data:realIndex":b});a.ctx.series.addCollapsedClassToSeries(y,b),t[e].length>0&&(a.visibleI=a.visibleI+1);var w,k,A=0;a.yRatio.length>1&&(a.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],A=b);var C=a.barHelpers.initialPositions();p=C.y,w=C.barHeight,l=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,n=C.xDivision,c=C.zeroH,x.push(g+k/2);for(var S=r.group({class:"apexcharts-datalabels","data:realIndex":b}),L=r.group({class:"apexcharts-bar-goals-markers"}),M=function(i){var r=a.barHelpers.getStrokeWidth(e,i,b),h=null,v={indexes:{i:e,j:i,realIndex:b,translationsIndex:A},x:g,y:p,strokeWidth:r,elSeries:y};h=a.isHorizontal?a.drawHorizontalBoxPaths(u(u({},v),{},{yDivision:l,barHeight:w,zeroW:d})):a.drawVerticalBoxPaths(u(u({},v),{},{xDivision:n,barWidth:k,zeroH:c})),p=h.y,g=h.x;var C=a.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:h.barYPosition,goalX:h.goalX,goalY:h.goalY,barHeight:w,barWidth:k});C&&L.add(C),i>0&&x.push(g+k/2),f.push(p),h.pathTo.forEach((function(n,l){var c=!a.isBoxPlot&&a.candlestickOptions.wick.useFillColor?h.color[l]:s.globals.stroke.colors[e],d=o.fillPath({seriesNumber:b,dataPointIndex:i,color:h.color[l],value:t[e][i]});a.renderSeries({realIndex:b,pathFill:d,lineFill:c,j:i,i:e,pathFrom:h.pathFrom,pathTo:n,strokeWidth:r,elSeries:y,x:g,y:p,series:t,columnGroupIndex:m,barHeight:w,barWidth:k,elDataLabelsWrap:S,elGoalsMarkers:L,visibleSeries:a.visibleI,type:s.config.chart.type})}))},P=0;Pb.c&&(d=!1);var y=Math.min(b.o,b.c),w=Math.max(b.o,b.c),k=b.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[u][c]-o.globals.minX)/this.xRatio-s/2);var A=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(y=r,w=r):(y=r-y/x,w=r-w/x,m=r-b.h/x,v=r-b.l/x,k=r-b.m/x);var C=l.move(A,r),S=l.move(A+s/2,y);return o.globals.previousPaths.length>0&&(S=this.getPreviousPath(u,c,!0)),C=this.isBoxPlot?[l.move(A,y)+l.line(A+s/2,y)+l.line(A+s/2,m)+l.line(A+s/4,m)+l.line(A+s-s/4,m)+l.line(A+s/2,m)+l.line(A+s/2,y)+l.line(A+s,y)+l.line(A+s,k)+l.line(A,k)+l.line(A,y+n/2),l.move(A,k)+l.line(A+s,k)+l.line(A+s,w)+l.line(A+s/2,w)+l.line(A+s/2,v)+l.line(A+s-s/4,v)+l.line(A+s/4,v)+l.line(A+s/2,v)+l.line(A+s/2,w)+l.line(A,w)+l.line(A,k)+"z"]:[l.move(A,w)+l.line(A+s/2,w)+l.line(A+s/2,m)+l.line(A+s/2,w)+l.line(A+s,w)+l.line(A+s,y)+l.line(A+s/2,y)+l.line(A+s/2,v)+l.line(A+s/2,y)+l.line(A,y)+l.line(A,w-n/2)],S+=l.move(A,y),o.globals.isXNumeric||(i+=a),{pathTo:C,pathFrom:S,x:i,y:w,goalY:this.barHelpers.getGoalValues("y",null,r,h,c,e.translationsIndex),barXPosition:A,color:this.isBoxPlot?f:d?[g]:[p]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var i=t.y,a=t.yDivision,s=t.barHeight,r=t.zeroW,n=t.strokeWidth,o=this.w,l=new Mi(this.ctx),h=e.i,c=e.j,d=this.boxOptions.colors.lower;this.isBoxPlot&&(d=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,g=e.realIndex,p=this.getOHLCValue(g,c),f=r,x=r,b=Math.min(p.o,p.c),m=Math.max(p.o,p.c),v=p.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[g][c]-o.globals.minX)/this.invertedXRatio-s/2);var y=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(b=r,m=r):(b=r+b/u,m=r+m/u,f=r+p.h/u,x=r+p.l/u,v=r+p.m/u);var w=l.move(r,y),k=l.move(b,y+s/2);return o.globals.previousPaths.length>0&&(k=this.getPreviousPath(g,c,!0)),w=[l.move(b,y)+l.line(b,y+s/2)+l.line(f,y+s/2)+l.line(f,y+s/2-s/4)+l.line(f,y+s/2+s/4)+l.line(f,y+s/2)+l.line(b,y+s/2)+l.line(b,y+s)+l.line(v,y+s)+l.line(v,y)+l.line(b+n/2,y),l.move(v,y)+l.line(v,y+s)+l.line(m,y+s)+l.line(m,y+s/2)+l.line(x,y+s/2)+l.line(x,y+s-s/4)+l.line(x,y+s/4)+l.line(x,y+s/2)+l.line(m,y+s/2)+l.line(m,y)+l.line(v,y)+"z"],k+=l.move(b,y),o.globals.isXNumeric||(i+=a),{pathTo:w,pathFrom:k,x:m,y:i,goalX:this.barHelpers.getGoalValues("x",r,null,h,c),barYPosition:y,color:d}}},{key:"getOHLCValue",value:function(t,e){var i=this.w,a=new Pi(this.ctx,i),s=a.getLogValAtSeriesIndex(i.globals.seriesCandleH[t][e],t),r=a.getLogValAtSeriesIndex(i.globals.seriesCandleO[t][e],t),n=a.getLogValAtSeriesIndex(i.globals.seriesCandleM[t][e],t),o=a.getLogValAtSeriesIndex(i.globals.seriesCandleC[t][e],t),l=a.getLogValAtSeriesIndex(i.globals.seriesCandleL[t][e],t);return{o:this.isBoxPlot?s:r,h:this.isBoxPlot?r:s,m:n,l:this.isBoxPlot?o:l,c:this.isBoxPlot?l:o}}}]),a}(),za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,a){var s=this.w,r=1,n=s.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,i);s.globals.hasNegs||a?r=s.config.plotOptions[t].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):(1-o.percent/100)*(1.25*n):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(r=1-o.percent/100,"treemap"===t&&(r=(1-o.percent/100)*(1.25*n)));var l=o.color,h=new v;if(s.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var c=h.shadeColor(-1*r,o.color);l=v.hexToRgba(v.isColorHex(c)?c:v.rgb2hex(c),s.config.fill.opacity)}else{var d=h.shadeColor(r,o.color);l=v.hexToRgba(v.isColorHex(d)?d:v.rgb2hex(d),s.config.fill.opacity)}return{color:l,colorProps:o}}},{key:"determineColor",value:function(t,e,i){var a=this.w,s=a.globals.series[e][i],r=a.config.plotOptions[t],n=r.colorScale.inverse?i:e;r.distributed&&"treemap"===a.config.chart.type&&(n=i);var o=a.globals.colors[n],l=null,h=Math.min.apply(Math,f(a.globals.series[e])),c=Math.max.apply(Math,f(a.globals.series[e]));r.distributed||"heatmap"!==t||(h=a.globals.minY,c=a.globals.maxY),void 0!==r.colorScale.min&&(h=r.colorScale.mina.globals.maxY?r.colorScale.max:a.globals.maxY);var d=Math.abs(c)+Math.abs(h),u=100*s/(0===d?d-1e-6:d);r.colorScale.ranges.length>0&&r.colorScale.ranges.map((function(t,e){if(s>=t.from&&s<=t.to){o=t.color,l=t.foreColor?t.foreColor:null,h=t.from,c=t.to;var i=Math.abs(c)+Math.abs(h);u=100*s/(0===i?i-1e-6:i)}}));return{color:o,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,a=t.y,s=t.i,r=t.j,n=t.colorProps,o=t.fontSize,l=this.w.config.dataLabels,h=new Mi(this.ctx),c=new qi(this.ctx),d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});var u=l.offsetX,g=l.offsetY,p=i+u,f=a+parseFloat(l.style.fontSize)/3+g;c.plotDataLabelsText({x:p,y:f,text:e,i:s,j:r,color:n.foreColor,parent:d,fontSize:o,dataLabelsConfig:l})}return d}},{key:"addListeners",value:function(t){var e=new Mi(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),Xa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w,this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new za(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return s(t,[{key:"draw",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var s=e.globals.gridWidth/e.globals.dataPoints,r=e.globals.gridHeight/e.globals.series.length,n=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var h=o?0:l.length-1;o?h=0;o?h++:h--){var c=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:v.escapeString(e.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(this.ctx.series.addCollapsedClassToSeries(c,h),e.config.chart.dropShadow.enabled){var d=e.config.chart.dropShadow;new Li(this.ctx).dropShadow(c,d,h)}for(var u=0,g=e.config.plotOptions.heatmap.shadeIntensity,p=0;p-1&&this.pieClicked(d),i.config.dataLabels.enabled){var w=m.x,k=m.y,A=100*g/this.fullAngle+"%";if(0!==g&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(h=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(h)>this.fullAngle&&(h-=this.fullAngle);var c=Math.PI*(h-90)/180,d=i.centerX+r*Math.cos(l),u=i.centerY+r*Math.sin(l),g=i.centerX+r*Math.cos(c),p=i.centerY+r*Math.sin(c),f=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,h),x=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),b=s>180?1:0,m=["M",d,u,"A",r,r,0,b,1,g,p];return e="donut"===i.chartType?[].concat(m,["L",f.x,f.y,"A",i.donutSize,i.donutSize,0,b,0,x.x,x.y,"L",d,u,"z"]).join(" "):"pie"===i.chartType||"polarArea"===i.chartType?[].concat(m,["L",i.centerX,i.centerY,"L",d,u]).join(" "):[].concat(m).join(" "),n.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new ta(this.ctx),a=new Mi(this.ctx),s=new Ra(this.ctx),r=a.group(),n=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),h=o.result.length;this.maxY=o.niceMax;for(var c=e.globals.radialSize,d=c/(h-1),u=0;u1&&t.total.show&&(s=t.total.color);var n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,r),a||"function"!=typeof t.total.formatter||(i=t.total.formatter(r));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,r):"",null!==n&&(n.textContent=e),null!==o&&(o.textContent=i),null!==n&&(n.style.fill=s)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,a=t.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,s,a,t);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,a=new Mi(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(0!==s.strokeWidth){for(var r=[],n=360/i.globals.series.length,o=0;o0&&(f=e.getPreviousPath(n));for(var x=0;x=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?s-=10:t.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,a=0;a0&&parseInt(s.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[a].paths[0]&&(i=e.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var a=[],s=0;s=360&&(u=360-Math.abs(this.startAngle)-.1);var g=i.drawPath({d:"",stroke:c,strokeWidth:n*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){var p=h.dropShadow;s.dropShadow(g,p)}l.add(g),g.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(g,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:d,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return a}},{key:"drawArcs",value:function(t){var e=this.w,i=new Mi(this.ctx),a=new ji(this.ctx),s=new Li(this.ctx),r=i.group(),n=this.getStrokeWidth(t);t.size=t.size-n/2;var o=e.config.plotOptions.radialBar.hollow.background,l=t.size-n*t.series.length-this.margin*t.series.length-n*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(t,r,l,o));var c=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:o||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var d=e.config.plotOptions.radialBar.hollow.dropShadow;s.dropShadow(c,d)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var g=null;if(this.radialDataLabels.show){var p=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");g=this.renderInnerDataLabels(p,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})}"back"===e.config.plotOptions.radialBar.hollow.position&&(r.add(c),g&&r.add(g));var f=!1;e.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var x=f?t.series.length-1:0;f?x>=0:x100?100:t.series[x])/100,A=Math.round(this.totalAngle*k)+this.startAngle,C=void 0;e.globals.dataChanged&&(w=this.startAngle,C=Math.round(this.totalAngle*v.negToZero(e.globals.previousPaths[x])/100)+w),Math.abs(A)+Math.abs(y)>360&&(A-=.01),Math.abs(C)+Math.abs(w)>360&&(C-=.01);var S=A-y,L=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[x]:e.config.stroke.dashArray,M=i.drawPath({d:"",stroke:m,strokeWidth:n,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+x,strokeDashArray:L});if(Mi.setAttrs(M.node,{"data:angle":S,"data:value":t.series[x]}),e.config.chart.dropShadow.enabled){var P=e.config.chart.dropShadow;s.dropShadow(M,P,x)}if(s.setSelectionFilter(M,0,x),this.addListeners(M,this.radialDataLabels),b.add(M),M.attr({index:0,j:x}),this.barLabels.enabled){var I=v.polarToCartesian(t.centerX,t.centerY,t.size,y),T=this.barLabels.formatter(e.globals.seriesNames[x],{seriesIndex:x,w:e}),z=["apexcharts-radialbar-label"];this.barLabels.onClick||z.push("apexcharts-no-click");var X=this.barLabels.useSeriesColors?e.globals.colors[x]:e.config.chart.foreColor;X||(X=e.config.chart.foreColor);var R=I.x+this.barLabels.offsetX,Y=I.y+this.barLabels.offsetY,E=i.drawText({x:R,y:Y,text:T,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:X,cssClass:z.join(" ")});E.on("click",this.onBarLabelClick),E.attr({rel:x+1}),0!==y&&E.attr({"transform-origin":"".concat(R," ").concat(Y),transform:"rotate(".concat(y," 0 0)")}),b.add(E)}var H=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(H=e.config.chart.animations.speed),e.globals.dataChanged&&(H=e.config.chart.animations.dynamicAnimation.speed),this.animDur=H/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(M,{centerX:t.centerX,centerY:t.centerY,endAngle:A,startAngle:y,prevEndAngle:C,prevStartAngle:w,size:t.size,i:x,totalItems:2,animBeginArr:this.animBeginArr,dur:H,shouldSetPrevPaths:!0})}return{g:r,elHollow:c,dataLabels:g}}},{key:"drawHollow",value:function(t){var e=new Mi(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,a){var s=this.w,r=new ji(this.ctx),n=v.randomId(),o=s.config.plotOptions.radialBar.hollow.image;if(s.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:o,patternID:"pattern".concat(s.globals.cuid).concat(n)}),a="url(#pattern".concat(s.globals.cuid).concat(n,")");else{var l=s.config.plotOptions.radialBar.hollow.imageWidth,h=s.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===h){var c=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-e.width/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+s.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(c)}else{var d=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-l/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-h/2+s.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,h)}));e.add(d)}}return a}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,i=this.barLabels.onClick,a=this.w;i&&i(a.globals.seriesNames[e],{w:a,seriesIndex:e})}}]),r}(),Oa=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var s=a.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),r=0;r0&&(this.visibleI=this.visibleI+1);var x=0,b=0,m=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[g][0],m=g);var y=this.barHelpers.initialPositions();d=y.y,h=y.zeroW,c=y.x,b=y.barWidth,x=y.barHeight,n=y.xDivision,o=y.yDivision,l=y.zeroH;for(var w=a.group({class:"apexcharts-datalabels","data:realIndex":g}),k=a.group({class:"apexcharts-rangebar-goals-markers"}),A=0;A0}));return this.isHorizontal?(a=u.config.plotOptions.bar.rangeBarGroupRows?r+h*b:r+o*this.visibleI+h*b,m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(a=(o=d.barHeight/g.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+g.indexOf(p))+h*b)):(b>-1&&!u.globals.timescaleLabels.length&&(s=u.config.plotOptions.bar.rangeBarGroupRows?n+c*b:n+l*this.visibleI+c*b),m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(s=(l=d.barWidth/g.length)*this.visibleI+c*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+g.indexOf(p))+c*b)),{barYPosition:a,barXPosition:s,barHeight:o,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.xDivision,s=t.barWidth,r=t.barXPosition,n=t.zeroH,o=this.w,l=e.i,h=e.j,c=e.realIndex,d=e.translationsIndex,u=this.yRatio[d],g=this.getRangeValue(c,h),p=Math.min(g.start,g.end),f=Math.max(g.start,g.end);void 0===this.series[l][h]||null===this.series[l][h]?p=n:(p=n-p/u,f=n-f/u);var x=Math.abs(f-p),b=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:s,y1:p,y2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:c,i:c,j:h,w:o});if(o.globals.isXNumeric){var m=this.getBarXForNumericXAxis({x:i,j:h,realIndex:c,barWidth:s});i=m.x,r=m.barXPosition}else i+=a;return{pathTo:b.pathTo,pathFrom:b.pathFrom,barHeight:x,x:i,y:g.start<0&&g.end<0?p:f,goalY:this.barHelpers.getGoalValues("y",null,n,l,h,d),barXPosition:r}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,a=t.y1,s=t.y2,r=t.yDivision,n=t.barHeight,o=t.barYPosition,l=t.zeroW,h=this.w,c=e.realIndex,d=e.j,u=this.preventBarOverflow(l+a/this.invertedYRatio),g=this.preventBarOverflow(l+s/this.invertedYRatio),p=this.getRangeValue(c,d),f=Math.abs(g-u),x=this.barHelpers.getBarpaths({barYPosition:o,barHeight:n,x1:u,x2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:c,realIndex:c,j:d,w:h});return h.globals.isXNumeric||(i+=r),{pathTo:x.pathTo,pathFrom:x.pathFrom,barWidth:f,x:p.start<0&&p.end<0?u:g,goalX:this.barHelpers.getGoalValues("x",l,null,c,d),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}}]),a}(),Fa=function(){function t(e){i(this,t),this.w=e.w,this.lineCtx=e}return s(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new Pi(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,a=t.x,s=t.y,r=t.i,n=t.j,o=t.prevY,l=this.w,h=[],c=[];if(0===n){var d=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(d=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),h.push(d),c.push(v.isNumber(e[r][0])?o+l.config.markers.offsetY:null),h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null)}else h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null);return{x:h,y:c}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,a=t.realIndex,s=this.w,r=0;r0&&parseInt(n.realIndex,10)===parseInt(a,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,e=s.globals.previousPaths[r].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[r].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[r].paths[1]&&(e=s.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e,i,a,s=t.i,r=t.realIndex,n=t.series,o=t.prevY,l=t.lineYPosition,h=t.translationsIndex,c=this.w,d=c.config.chart.stacked&&!c.globals.comboCharts||c.config.chart.stacked&&c.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[r])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[r])||void 0===i?void 0:i.type));if(void 0!==(null===(a=n[s])||void 0===a?void 0:a[0]))o=(l=d&&s>0?this.lineCtx.prevSeriesY[s-1][0]:this.lineCtx.zeroY)-n[s][0]/this.lineCtx.yRatio[h]+2*(this.lineCtx.isReversed?n[s][0]/this.lineCtx.yRatio[h]:0);else if(d&&s>0&&void 0===n[s][0])for(var u=s-1;u>=0;u--)if(null!==n[u][0]&&void 0!==n[u][0]){o=l=this.lineCtx.prevSeriesY[u][0];break}return{prevY:o,lineYPosition:l}}}]),t}(),Da=function(t){for(var e,i,a,s,r=function(t){for(var e=[],i=t[0],a=t[1],s=e[0]=Wa(i,a),r=1,n=t.length-1;r9&&(s=3*a/Math.sqrt(s),r[l]=s*e,r[l+1]=s*i);for(var h=0;h<=n;h++)s=(t[Math.min(n,h+1)][0]-t[Math.max(0,h-1)][0])/(6*(1+r[h]*r[h])),o.push([s||0,r[h]*s||0]);return o},_a=function(t){var e=Da(t),i=t[1],a=t[0],s=[],r=e[1],n=e[0];s.push(a,[a[0]+n[0],a[1]+n[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(var o=2,l=e.length;o1&&a[1].length<6){var s=a[0].length;a[1]=[2*a[0][s-2]-a[0][s-4],2*a[0][s-1]-a[0][s-3]].concat(a[1])}a[0]=a[0].slice(-2)}return a};function Wa(t,e){return(e[1]-t[1])/(e[0]-t[0])}var Ba=function(){function t(e,a,s){i(this,t),this.ctx=e,this.w=e.w,this.xyRatios=a,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||s,this.scatter=new Ui(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Fa(this),this.markers=new Vi(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return s(t,[{key:"draw",value:function(t,e,i,a){var s,r=this.w,n=new Mi(this.ctx),o=r.globals.comboCharts?e:r.config.chart.type,l=n.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),h=new Pi(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=h.getLogSeries(t),this.yRatio=h.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var c=[],d=0;d1?g:0;this._initSerieVariables(t,d,g);var f=[],x=[],b=[],m=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,g),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(m=(r.globals.seriesX[g][0]-r.globals.minX)/this.xRatio),b.push(m);var v,y=m,w=void 0,k=y,A=this.zeroY,C=this.zeroY;A=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:t,prevY:A,lineYPosition:0,translationsIndex:p}).prevY,"monotoneCubic"===r.config.stroke.curve&&null===t[d][0]?f.push(null):f.push(A),v=A;"rangeArea"===o&&(w=C=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:a,prevY:C,lineYPosition:0,translationsIndex:p}).prevY,x.push(null!==f[0]?C:null));var S=this._calculatePathsFrom({type:o,series:t,i:d,realIndex:g,translationsIndex:p,prevX:k,prevY:A,prevY2:C}),L=[f[0]],M=[x[0]],P={type:o,series:t,realIndex:g,translationsIndex:p,i:d,x:m,y:1,pX:y,pY:v,pathsFrom:S,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:b,yArrj:f,y2Arrj:x,seriesRangeEnd:a},I=this._iterateOverDataPoints(u(u({},P),{},{iterations:"rangeArea"===o?t[d].length-1:void 0,isRangeStart:!0}));if("rangeArea"===o){for(var T=this._calculatePathsFrom({series:a,i:d,realIndex:g,prevX:k,prevY:C}),z=this._iterateOverDataPoints(u(u({},P),{},{series:a,xArrj:[m],yArrj:L,y2Arrj:M,pY:w,areaPaths:I.areaPaths,pathsFrom:T,iterations:a[d].length-1,isRangeStart:!1})),X=I.linePaths.length/2,R=0;R=0;Y--)l.add(c[Y]);else for(var E=0;E1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[r]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",zIndex:void 0!==a.config.series[i].zIndex?a.config.series[i].zIndex:i,seriesName:v.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i});var n=t[e].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,a,s,r=t.type,n=t.series,o=t.i,l=t.realIndex,h=t.translationsIndex,c=t.prevX,d=t.prevY,u=t.prevY2,g=this.w,p=new Mi(this.ctx);if(null===n[o][0]){for(var f=0;f0){var x=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:l});a=x.pathFromLine,s=x.pathFromArea}return{prevX:c,prevY:d,linePath:e,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(t){var e=t.type,i=t.realIndex,a=t.i,s=t.paths,r=this.w,n=new Mi(this.ctx),o=new ji(this.ctx);this.prevSeriesY.push(s.yArrj),r.globals.seriesXvalues[i]=s.xArrj,r.globals.seriesYvalues[i]=s.yArrj;var l=r.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var h=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-l.count-1],c=n.drawRect(h,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(c.node);var d=n.drawRect(0,0,h,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(d.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var g={i:a,realIndex:i,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var p=o.fillPath({seriesNumber:i}),f=0;f0&&"rangeArea"!==e){var A=n.renderPaths(w);A.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&A.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(A),A.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),k.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,i,a=this,s=t.type,r=t.series,n=t.iterations,o=t.realIndex,l=t.translationsIndex,h=t.i,c=t.x,d=t.y,u=t.pX,g=t.pY,p=t.pathsFrom,f=t.linePaths,x=t.areaPaths,b=t.seriesIndex,m=t.lineYPosition,y=t.xArrj,w=t.yArrj,k=t.y2Arrj,A=t.isRangeStart,C=t.seriesRangeEnd,S=this.w,L=new Mi(this.ctx),M=this.yRatio,P=p.prevY,I=p.linePath,T=p.areaPath,z=p.pathFromLine,X=p.pathFromArea,R=v.isNumber(S.globals.minYArr[o])?S.globals.minYArr[o]:S.globals.minY;n||(n=S.globals.dataPoints>1?S.globals.dataPoints-1:S.globals.dataPoints);var Y=function(t,e){return e-t/M[l]+2*(a.isReversed?t/M[l]:0)},E=d,H=S.config.chart.stacked&&!S.globals.comboCharts||S.config.chart.stacked&&S.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[o])||void 0===i?void 0:i.type)),O=S.config.stroke.curve;Array.isArray(O)&&(O=Array.isArray(b)?O[b[h]]:O[h]);for(var F,D=0,_=0;_0&&S.globals.collapsedSeries.length0;e--){if(!(S.globals.collapsedSeriesIndices.indexOf((null==b?void 0:b[e])||e)>-1))return e;e--}return 0}(h-1)][_+1]}else m=this.zeroY;else m=this.zeroY;N?d=Y(R,m):(d=Y(r[h][_+1],m),"rangeArea"===s&&(E=Y(C[h][_+1],m))),y.push(c),!N||"smooth"!==S.config.stroke.curve&&"monotoneCubic"!==S.config.stroke.curve?(w.push(d),k.push(E)):(w.push(null),k.push(null));var B=this.lineHelpers.calculatePoints({series:r,x:c,y:d,realIndex:o,i:h,j:_,prevY:P}),G=this._createPaths({type:s,series:r,i:h,realIndex:o,j:_,x:c,y:d,y2:E,xArrj:y,yArrj:w,y2Arrj:k,pX:u,pY:g,pathState:D,segmentStartX:F,linePath:I,areaPath:T,linePaths:f,areaPaths:x,curve:O,isRangeStart:A});x=G.areaPaths,f=G.linePaths,u=G.pX,g=G.pY,D=G.pathState,F=G.segmentStartX,T=G.areaPath,I=G.linePath,!this.appendPathFrom||S.globals.hasNullValues||"monotoneCubic"===O&&"rangeArea"===s||(z+=L.line(c,this.areaBottomY),X+=L.line(c,this.areaBottomY)),this.handleNullDataPoints(r,B,h,_,o),this._handleMarkersAndLabels({type:s,pointsPos:B,i:h,j:_,realIndex:o,isRangeStart:A})}return{yArrj:w,xArrj:y,pathFromArea:X,areaPaths:x,pathFromLine:z,linePaths:f,linePath:I,areaPath:T}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,i=t.pointsPos,a=t.isRangeStart,s=t.i,r=t.j,n=t.realIndex,o=this.w,l=new qi(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var h=this.markers.plotChartMarkers(i,n,r+1);null!==h&&this.elPointsMain.add(h)}var c=l.drawDataLabel({type:e,isRangeStart:a,pos:i,i:n,j:r+1});null!==c&&this.elDataLabelsWrap.add(c)}},{key:"_createPaths",value:function(t){var e=t.type,i=t.series,a=t.i;t.realIndex;var s,r=t.j,n=t.x,o=t.y,l=t.xArrj,h=t.yArrj,c=t.y2,d=t.y2Arrj,u=t.pX,g=t.pY,p=t.pathState,f=t.segmentStartX,x=t.linePath,b=t.areaPath,m=t.linePaths,v=t.areaPaths,y=t.curve,w=t.isRangeStart,k=new Mi(this.ctx),A=this.areaBottomY,C="rangeArea"===e,S="rangeArea"===e&&w;switch(y){case"monotoneCubic":var L=w?h:d;switch(p){case 0:if(null===L[r+1])break;p=1;case 1:if(!(C?l.length===i[a].length:r===i[a].length-2))break;case 2:var M=w?l:l.slice().reverse(),P=w?L:L.slice().reverse(),I=(s=P,M.map((function(t,e){return[t,s[e]]})).filter((function(t){return null!==t[1]}))),T=I.length>1?_a(I):I,z=[];C&&(S?v=I:z=v.reverse());var X=0,R=0;if(function(t,e){for(var i=function(t){var e=[],i=0;return t.forEach((function(t){null!==t?i++:i>0&&(e.push(i),i=0)})),i>0&&e.push(i),e}(t),a=[],s=0,r=0;s4?(e+="C".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]),e+=", ".concat(a[4],", ").concat(a[5])):s>2&&(e+="S".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]))}return e}(t),i=R,a=(R+=t.length)-1;S?x=k.move(I[i][0],I[i][1])+e:C?x=k.move(z[i][0],z[i][1])+k.line(I[i][0],I[i][1])+e+k.line(z[a][0],z[a][1]):(x=k.move(I[i][0],I[i][1])+e,b=x+k.line(I[a][0],A)+k.line(I[i][0],A)+"z",v.push(b)),m.push(x)})),C&&X>1&&!S){var Y=m.slice(X).reverse();m.splice(X),Y.forEach((function(t){return m.push(t)}))}p=0}break;case"smooth":var E=.35*(n-u);if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.curve(n,o,n,o,n,c)+k.move(n,c)),b+=k.curve(n,o,n,o,n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o;break;default:var F=function(t,e,i){var a=[];switch(t){case"stepline":a=k.line(e,null,"H")+k.line(null,i,"V");break;case"linestep":a=k.line(null,i,"V")+k.line(e,null,"H");break;case"straight":a=k.line(e,i)}return a};if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.line(n,c)),b+=k.line(n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o}return{linePaths:m,areaPaths:v,pX:u,pY:g,pathState:p,segmentStartX:f,linePath:x,areaPath:b}}},{key:"handleNullDataPoints",value:function(t,e,i,a,s){var r=this.w;if(null===t[i][a]&&r.config.markers.showNullDataPoints||1===t[i].length){var n=this.strokeWidth-r.config.markers.strokeWidth/2;n>0||(n=0);var o=this.markers.plotChartMarkers(e,s,a+1,n,!0);null!==o&&this.elPointsMain.add(o)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,a,s){this.xoffset=e,this.yoffset=i,this.height=s,this.width=a,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],a=this.xoffset,s=this.yoffset,n=r(t)/this.height,o=r(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var a=e/this.height,s=this.width-a;i=new t(this.xoffset+a,this.yoffset,s,this.height)}else{var r=e/this.width,n=this.height-r;i=new t(this.xoffset,this.yoffset+r,this.width,n)}return i}}function e(e,a,s,n,o){n=void 0===n?0:n,o=void 0===o?0:o;var l=i(function(t,e){var i,a=[],s=e/r(t);for(i=0;i=n}(e,l=t[0],o)?(e.push(l),i(t.slice(1),e,s,n)):(h=s.cutArea(r(e),n),n.push(s.getCoordinates(e)),i(t,[],h,n)),n;n.push(s.getCoordinates(e))}function a(t,e){var i=Math.min.apply(Math,t),a=Math.max.apply(Math,t),s=r(t);return Math.max(Math.pow(e,2)*a/Math.pow(s,2),Math.pow(s,2)/(Math.pow(e,2)*i))}function s(t){return t&&t.constructor===Array}function r(t){var e,i=0;for(e=0;er-a&&l.width<=n-s){var h=o.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(h.x," ").concat(h.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,i,a,s,r){var n=new Mi(this.ctx),o=n.getTextRects(t,e).width+this.w.config.stroke.width+5>s-i&&r-a>s-i?r-a:s-i,l=n.getTextBasedOnMaxWidth({text:t,maxWidth:o,fontSize:e});return t.length!==l.length&&o/e<5?"":l}},{key:"animateTreemap",value:function(t,e,i,a){var s=new y(this.ctx);s.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,(function(){s.animationCompleted(t)}))}}]),t}(),ja=86400,Va=10/ja,Ua=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return s(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new zi(this.ctx),r=(e-t)/864e5;this.determineInterval(r),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,r5e4&&(a.globals.disableZoomOut=!0);var n=s.getTimeUnitsfromTimestamp(t,e,this.utc),o=a.globals.gridWidth/r,l=o/24,h=l/60,c=h/60,d=Math.floor(24*r),g=Math.floor(1440*r),p=Math.floor(r*ja),f=Math.floor(r),x=Math.floor(r/30),b=Math.floor(r/365),m={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},v={firstVal:m,currentMillisecond:m.minMillisecond,currentSecond:m.minSecond,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:l,minutesWidthOnXAxis:h,secondsWidthOnXAxis:c,numberOfSeconds:p,numberOfMinutes:g,numberOfHours:d,numberOfDays:f,numberOfMonths:x,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var y=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?u(u({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?u(u({},e),{},{value:t.value}):"minute"===t.unit?u(u({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?u(u({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return y.filter((function(t){var e=1,s=Math.ceil(a.globals.gridWidth/120),r=t.value;void 0!==a.config.xaxis.tickAmount&&(s=a.config.xaxis.tickAmount),y.length>s&&(e=Math.floor(y.length/s));var n=!1,o=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(n=!0);break;case"half_year":e=7,"year"===t.unit&&(n=!0);break;case"months":e=1,"year"===t.unit&&(n=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(n=!0),30===r&&(o=!0);break;case"months_days":e=10,"month"===t.unit&&(n=!0),30===r&&(o=!0);break;case"week_days":e=8,"month"===t.unit&&(n=!0);break;case"days":e=1,"month"===t.unit&&(n=!0);break;case"hours":"day"===t.unit&&(n=!0);break;case"minutes_fives":case"seconds_fives":r%5!=0&&(o=!0);break;case"seconds_tens":r%10!=0&&(o=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!o)return!0}else if((r%e==0||n)&&!o)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,a=this.formatDates(t),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new pa(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.daysWidthOnXAxis,r=t.numberOfYears,n=e.minYear,o=0,l=new zi(this.ctx),h="year";if(e.minDate>1||e.minMonth>0){var c=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(l.determineDaysOfYear(e.minYear)-c+1)*s,n=e.minYear+1,this.timeScaleArray.push({position:o,value:n,unit:h,year:n,month:v.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:o,value:n,unit:h,year:a,month:v.monthMod(i+1)});for(var d=n,u=o,g=0;g1){l=(h.determineDaysOfMonths(a+1,e.minYear)-i+1)*r,o=v.monthMod(a+1);var u=s+d,g=v.monthMod(o),p=o;0===o&&(c="year",p=u,g=1,u+=d+=1),this.timeScaleArray.push({position:l,value:p,unit:c,year:u,month:g})}else this.timeScaleArray.push({position:l,value:o,unit:c,year:s,month:v.monthMod(a)});for(var f=o+1,x=l,b=0,m=1;bn.determineDaysOfMonths(e+1,i)?(h=1,o="month",u=e+=1,e):e},d=(24-e.minHour)*s,u=l,g=c(h,i,a);0===e.minHour&&1===e.minDate?(d=0,u=v.monthMod(e.minMonth),o="month",h=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(d=0,l=e.minDate,u=l,g=c(h=l,i,a)),this.timeScaleArray.push({position:d,value:u,unit:o,year:this._getYear(a,g,0),month:v.monthMod(g),day:h});for(var p=d,f=0;fo.determineDaysOfMonths(e+1,s)&&(f=1,e+=1),{month:e,date:f}},c=function(t,e){return t>o.determineDaysOfMonths(e+1,s)?e+=1:e},d=60-(e.minMinute+e.minSecond/60),u=d*r,g=e.minHour+1,p=g;60===d&&(u=0,p=g=e.minHour);var f=i;p>=24&&(p=0,l="day",g=f+=1);var x=h(f,a).month;x=c(f,x),this.timeScaleArray.push({position:u,value:g,unit:l,day:f,hour:p,year:s,month:v.monthMod(x)}),p++;for(var b=u,m=0;m=24)p=0,l="day",x=h(f+=1,x).month,x=c(f,x);var y=this._getYear(s,x,0);b=60*r+b;var w=0===p?f:p;this.timeScaleArray.push({position:b,value:w,unit:l,hour:p,day:f,year:y,month:v.monthMod(x)}),p++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.minutesWidthOnXAxis,h=t.secondsWidthOnXAxis,c=t.numberOfMinutes,d=a+1,u=r,g=n,p=o,f=s,x=(60-i-e/1e3)*h,b=0;b=60&&(d=0,24===(f+=1)&&(f=0)),this.timeScaleArray.push({position:x,value:d,unit:"minute",hour:f,minute:d,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,d++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.secondsWidthOnXAxis,h=t.numberOfSeconds,c=i+1,d=a,u=r,g=n,p=o,f=s,x=(1e3-e)/1e3*l,b=0;b=60&&(c=0,++d>=60&&(d=0,24===++f&&(f=0))),this.timeScaleArray.push({position:x,value:c,unit:"second",hour:f,minute:d,second:c,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,c++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var a=t.value.toString(),s=new zi(e.ctx),r=e.createRawDateString(t,a),n=s.getDate(s.parseDate(r));if(e.utc||(n=s.getDate(s.parseDateWithTimezone(r))),void 0===i.config.xaxis.labels.format){var o="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(o=l.year),"month"===t.unit&&(o=l.month),"day"===t.unit&&(o=l.day),"hour"===t.unit&&(o=l.hour),"minute"===t.unit&&(o=l.minute),"second"===t.unit&&(o=l.second),a=s.formatDate(n,o)}else a=s.formatDate(n,i.config.xaxis.labels.format);return{dateString:r,position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,a=new Mi(this.ctx),s=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(s=!0,e=a.getTextRects(t[0].value).width);var r=0,n=t.map((function(n,o){if(o>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=s?e:a.getTextRects(t[r].value).width,h=t[r].position;return n.position>h+l+10?(r=o,n):null}return n}));return n=n.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),qa=function(){function t(e,a){i(this,t),this.ctx=a,this.w=a.w,this.el=e}return s(t,[{key:"setupElements",value:function(){var t=this.w,e=t.globals,i=t.config,a=i.chart.type;e.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(a),e.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(a),e.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(a)&&i.plotOptions.bar.horizontal,e.chartClass=".apexcharts".concat(e.chartID),e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),Mi.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas ".concat(e.chartClass.substring(1))}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=window.SVG().addTo(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(i.chart.offsetX,", ").concat(i.chart.offsetY,")")}),e.dom.Paper.node.style.background="dark"!==i.theme.mode||i.chart.background?"light"!==i.theme.mode||i.chart.background?i.chart.background:"#fff":"#424242",this.setSVGDimensions(),e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject"),Mi.setAttrs(e.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap),e.dom.Paper.node.appendChild(e.dom.elLegendForeign),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,a=this.ctx,s=i.config,r=i.globals,n={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},o=s.chart.type||"line",l=null,h=0;r.series.forEach((function(e,a){var s=t[a].type||o;n[s]?("rangeArea"===s?(n[s].series.push(r.seriesRangeStart[a]),n[s].seriesRangeEnd.push(r.seriesRangeEnd[a])):n[s].series.push(e),n[s].i.push(a),"column"!==s&&"bar"!==s||(i.globals.columnSeries=n.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(s)?l=s:"bar"===s?(n.column.series.push(e),n.column.i.push(a)):console.warn("You have specified an unrecognized series type (".concat(s,").")),o!==s&&"scatter"!==s&&h++})),h>0&&(l&&console.warn("Chart or series type ".concat(l," cannot appear with other chart or series types.")),n.column.series.length>0&&s.plotOptions.bar.horizontal&&(h-=n.column.series.length,n.column={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||(r.comboCharts=h>0);var c=new Ba(a,e),d=new Ta(a,e);a.pie=new Ya(a);var u=new Ha(a);a.rangeBar=new Oa(a,e);var g=new Ea(a),p=[];if(r.comboCharts){var x,b,m=new Pi(a);if(n.area.series.length>0)(x=p).push.apply(x,f(m.drawSeriesByGroup(n.area,r.areaGroups,"area",c)));if(n.column.series.length>0)if(s.chart.stacked){var v=new Ia(a,e);p.push(v.draw(n.column.series,n.column.i))}else a.bar=new Pa(a,e),p.push(a.bar.draw(n.column.series,n.column.i));if(n.rangeArea.series.length>0&&p.push(c.draw(n.rangeArea.series,"rangeArea",n.rangeArea.i,n.rangeArea.seriesRangeEnd)),n.line.series.length>0)(b=p).push.apply(b,f(m.drawSeriesByGroup(n.line,r.lineGroups,"line",c)));if(n.candlestick.series.length>0&&p.push(d.draw(n.candlestick.series,"candlestick",n.candlestick.i)),n.boxPlot.series.length>0&&p.push(d.draw(n.boxPlot.series,"boxPlot",n.boxPlot.i)),n.rangeBar.series.length>0&&p.push(a.rangeBar.draw(n.rangeBar.series,n.rangeBar.i)),n.scatter.series.length>0){var y=new Ba(a,e,!0);p.push(y.draw(n.scatter.series,"scatter",n.scatter.i))}if(n.bubble.series.length>0){var w=new Ba(a,e,!0);p.push(w.draw(n.bubble.series,"bubble",n.bubble.i))}}else switch(s.chart.type){case"line":p=c.draw(r.series,"line");break;case"area":p=c.draw(r.series,"area");break;case"bar":if(s.chart.stacked)p=new Ia(a,e).draw(r.series);else a.bar=new Pa(a,e),p=a.bar.draw(r.series);break;case"candlestick":p=new Ta(a,e).draw(r.series,"candlestick");break;case"boxPlot":p=new Ta(a,e).draw(r.series,s.chart.type);break;case"rangeBar":p=a.rangeBar.draw(r.series);break;case"rangeArea":p=c.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":p=new Xa(a,e).draw(r.series);break;case"treemap":p=new Ga(a,e).draw(r.series);break;case"pie":case"donut":case"polarArea":p=a.pie.draw(r.series);break;case"radialBar":p=u.draw(r.series);break;case"radar":p=g.draw(r.series);break;default:p=c.draw(r.series)}return p}},{key:"setSVGDimensions",value:function(){var t=this.w,e=t.globals,i=t.config;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto",e.svgWidth=i.chart.width,e.svgHeight=i.chart.height;var a=v.getDimensions(this.el),s=i.chart.width.toString().split(/[0-9]+/g).pop();"%"===s?v.isNumber(a[0])&&(0===a[0].width&&(a=v.getDimensions(this.el.parentNode)),e.svgWidth=a[0]*parseInt(i.chart.width,10)/100):"px"!==s&&""!==s||(e.svgWidth=parseInt(i.chart.width,10));var r=String(i.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===r){var n=v.getDimensions(this.el.parentNode);e.svgHeight=n[1]*parseInt(i.chart.height,10)/100}else e.svgHeight=parseInt(i.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Mi.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==r){var o=i.chart.sparkline.enabled?0:e.axisCharts?i.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(e.svgHeight+o,"px")}e.dom.elWrap.style.width="".concat(e.svgWidth,"px"),e.dom.elWrap.style.height="".concat(e.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i=t.translateX;Mi.setAttrs(t.dom.elGraphical.node,{transform:"translate(".concat(i,", ").concat(e,")")})}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,a=t.config.chart.sparkline.enabled?1:15;a+=t.config.grid.padding.bottom,["top","bottom"].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(i=new xa(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var s=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*t.globals.radialSize;if(s&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var n=v.getBoundingClientRect(s);r=n.bottom;var o=n.bottom-n.top;r=Math.max(2.05*t.globals.radialSize,o)}var l=Math.ceil(r+e.translateY+i+a);e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).includes("%")||(e.dom.elWrap.style.height="".concat(l,"px"),Mi.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(l,"px"))}},{key:"coreCalculations",value:function(){new ea(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(){return[]}))},i=new Bi,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=e(),a.seriesYvalues=e()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var t=this.w,e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new na(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new na(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Ua(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new Pi(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var i=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];i.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){return t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){return t.updateSourceChart(i)})})),e.config.chart.events.selection=function(t,e){i.forEach((function(t){ApexCharts.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:e.xaxis.min,max:e.xaxis.max}},!1,!1,!1,!1)}))}}}}]),t}(),Za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"_updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(n){var o=[e.ctx];s&&(o=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(o=[e.ctx],e.ctx.w.globals.isExecCalled=!1),o.forEach((function(s,l){var h=s.w;if(h.globals.shouldAnimate=a,i||(h.globals.resized=!0,h.globals.dataChanged=!0,a&&s.series.getPreviousPaths()),t&&"object"===b(t)&&(s.config=new Wi(t),t=Pi.extendArrayProps(s.config,t,h),s.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,h.config=v.extend(h.config,t),r&&(h.globals.lastXAxis=t.xaxis?v.clone(t.xaxis):[],h.globals.lastYAxis=t.yaxis?v.clone(t.yaxis):[],h.globals.initialConfig=v.extend({},h.config),h.globals.initialSeries=v.clone(h.config.series),t.series))){for(var c=0;c2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(s){var r,n=i.w;return n.globals.shouldAnimate=e,n.globals.dataChanged=!0,e&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?(0===(r=t.map((function(t,e){return i._extendSeries(t,e)}))).length&&(r=[{data:[]}]),n.config.series=r):n.config.series=t.slice(),a&&(n.globals.initialConfig.series=v.clone(n.config.series),n.globals.initialSeries=v.clone(n.config.series)),i.ctx.update().then((function(){s(i.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var i=this.w,a=i.config.series[e];return u(u({},i.config.series[e]),{},{name:t.name?t.name:null==a?void 0:a.name,color:t.color?t.color:null==a?void 0:a.color,type:t.type?t.type:null==a?void 0:a.type,group:t.group?t.group:null==a?void 0:a.group,hidden:void 0!==t.hidden?t.hidden:null==a?void 0:a.hidden,data:t.data?t.data:null==a?void 0:a.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(e,"'], ").concat(s," circle[j='").concat(e,"'], ").concat(s," rect[j='").concat(e,"']")):void 0===e&&(a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(t,"']")),"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),a?(new Mi(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new Ni(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;t&&t.xaxis&&(a=t.xaxis),t&&t.yaxis&&(s=t.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;var r=function(t){void 0!==s[t]&&(i.config.yaxis[t].min=s[t].min,i.config.yaxis[t].max=s[t].max)};i.config.yaxis.map((function(t,a){i.globals.zoomed||void 0!==s[a]?r(a):void 0!==e.ctx.opts.yaxis[a]&&(t.min=e.ctx.opts.yaxis[a].min,t.max=e.ctx.opts.yaxis[a].max)}))}}]),t}();!function(){function t(){for(var t=arguments.length>0&&arguments[0]!==h?arguments[0]:[],s=arguments.length>1?arguments[1]:h,r=arguments.length>2?arguments[2]:h,n=arguments.length>3?arguments[3]:h,o=arguments.length>4?arguments[4]:h,l=arguments.length>5?arguments[5]:h,h=arguments.length>6?arguments[6]:h,c=t.slice(s,r||h),d=n.slice(o,l||h),u=0,g={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};;){if(c[u]=e.call(g,c[u]),d[u]=e.call(p,d[u]),c[u][0]!=d[u][0]||"M"==c[u][0]||"A"==c[u][0]&&(c[u][4]!=d[u][4]||c[u][5]!=d[u][5])?(Array.prototype.splice.apply(c,[u,1].concat(a.call(g,c[u]))),Array.prototype.splice.apply(d,[u,1].concat(a.call(p,d[u])))):(c[u]=i.call(g,c[u]),d[u]=i.call(p,d[u])),++u==c.length&&u==d.length)break;u==c.length&&c.push(["C",g.pos[0],g.pos[1],g.pos[0],g.pos[1],g.pos[0],g.pos[1]]),u==d.length&&d.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]])}return{start:c,dest:d}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function i(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function a(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var i,a,s,r,n,o,l,h,c,d,u,g,p,f,x,b,m,v,y,w,k,A,C,S,L,M,P=Math.abs(e[1]),I=Math.abs(e[2]),T=e[3]%360,z=e[4],X=e[5],R=e[6],Y=e[7],E=new bt(t),H=new bt(R,Y),O=[];if(0===P||0===I||E.x===H.x&&E.y===H.y)return[["C",E.x,E.y,H.x,H.y,H.x,H.y]];i=new bt((E.x-H.x)/2,(E.y-H.y)/2).transform((new vt).rotate(T)),a=i.x*i.x/(P*P)+i.y*i.y/(I*I),a>1&&(P*=a=Math.sqrt(a),I*=a);s=(new vt).rotate(T).scale(1/P,1/I).rotate(-T),E=E.transform(s),H=H.transform(s),r=[H.x-E.x,H.y-E.y],o=r[0]*r[0]+r[1]*r[1],n=Math.sqrt(o),r[0]/=n,r[1]/=n,l=o<4?Math.sqrt(1-o/4):0,z===X&&(l*=-1);h=new bt((H.x+E.x)/2+l*-r[1],(H.y+E.y)/2+l*r[0]),c=new bt(E.x-h.x,E.y-h.y),d=new bt(H.x-h.x,H.y-h.y),u=Math.acos(c.x/Math.sqrt(c.x*c.x+c.y*c.y)),c.y<0&&(u*=-1);g=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(g*=-1);X&&u>g&&(g+=2*Math.PI);!X&&u0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(!1===e)return!1;for(var i=e,a=t.length;i(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class Ja{constructor(t){t.remember("_draggable",this),this.el=t,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(t){t?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(t){const e=!t.type.indexOf("mouse");if(e&&1!==t.which&&0!==t.buttons)return;if(this.el.dispatch("beforedrag",{event:t,handler:this}).defaultPrevented)return;t.preventDefault(),t.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point($a(t));const i=(e?"mouseup":"touchend")+".drag";zt(window,(e?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),zt(window,i,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:t,handler:this,box:this.box})}drag(t){const{box:e,lastClick:i}=this,a=this.el.point($a(t)),s=a.x-i.x,r=a.y-i.y;if(!s&&!r)return e;const n=e.x+s,o=e.y+r;this.box=new kt(n,o,e.w,e.h),this.lastClick=a,this.el.dispatch("dragmove",{event:t,handler:this,box:this.box}).defaultPrevented||this.move(n,o)}move(t,e){"svg"===this.el.type?gi.prototype.move.call(this.el,t,e):this.el.move(t,e)}endDrag(t){this.drag(t),this.el.fire("dragend",{event:t,handler:this,box:this.box}),Xt(window,"mousemove.drag"),Xt(window,"touchmove.drag"),Xt(window,"mouseup.drag"),Xt(window,"touchend.drag"),this.init(!0)}} /*! * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse * @version 4.0.1 @@ -17,13 +17,13 @@ function Qa(t,e,i,a=null){return function(s){s.preventDefault(),s.stopPropagation();var r=s.pageX||s.touches[0].pageX,n=s.pageY||s.touches[0].pageY;e.fire(t,{x:r,y:n,event:s,index:a,points:i})}}function Ka([t,e],{a:i,b:a,c:s,d:r,e:n,f:o}){return[t*i+e*s+n,t*a+e*r+o]}Q(Gt,{draggable(t=!0){return(this.remember("_draggable")||new Ja(this)).init(t),this}});let ts=class{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",Qa(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",Qa("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>Ka(t,e))),this.rotationPoint=Ka(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}};const es=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ts?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this}; /*! * @svgdotjs/svg.resize.js - An extension for svg.js which allows to resize elements which are selected -* @version 2.0.4 +* @version 2.0.2 * https://github.com/svgdotjs/svg.resize.js * * @copyright [object Object] * @license MIT * -* BUILT: Fri Sep 13 2024 12:43:14 GMT+0200 (Central European Summer Time) +* BUILT: Mon Jul 01 2024 15:05:58 GMT+0200 (Central European Summer Time) */ /*! * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse @@ -35,4 +35,4 @@ function Qa(t,e,i,a=null){return function(s){s.preventDefault(),s.stopPropagatio * * BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time) */ -function is(t,e,i,a=null){return function(s){s.preventDefault(),s.stopPropagation();var r=s.pageX||s.touches[0].pageX,n=s.pageY||s.touches[0].pageY;e.fire(t,{x:r,y:n,event:s,index:a,points:i})}}function as([t,e],{a:i,b:a,c:s,d:r,e:n,f:o}){return[t*i+e*s+n,t*a+e*r+o]}Q(Gt,{select:es(ts)}),Q([Ge,je,xe],{pointSelect:es(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",Qa("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>Ka(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class ss{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",is(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",is("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>as(t,e))),this.rotationPoint=as(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const rs=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ss?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this};Q(Gt,{select:rs(ss)}),Q([Ge,je,xe],{pointSelect:rs(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",is("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>as(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const ns=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),os=t=>{let e=1/0,i=1/0,a=-1/0,s=-1/0;for(let r=0;r{const s=t-e[0],r=(a-e[1])*i;return[s*i+e[0],r+e[1]]}));return os(a)}(this.box,s,r)}this.el.dispatch("resize",{box:new kt(l),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.size(l.width,l.height).move(l.x,l.y)}movePoint(t){this.lastEvent=t;const{x:e,y:i}=this.snapToGrid(this.el.point(ns(t))),a=this.el.array().slice();a[this.index]=[e,i],this.el.dispatch("resize",{box:os(a),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.plot(a)}rotate(t){this.lastEvent=t;const e=this.startPoint,i=this.el.point(ns(t)),{cx:a,cy:s}=this.box,r=e.x-a,n=e.y-s,o=i.x-a,l=i.y-s,h=Math.sqrt(r*r+n*n)*Math.sqrt(o*o+l*l);if(0===h)return;let c=Math.acos((r*o+n*l)/h)/Math.PI*180;if(!c)return;i.xdiv {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}';var h=(null===(l=t.opts.chart)||void 0===l?void 0:l.nonce)||t.w.config.chart.nonce;h&&o.setAttribute("nonce",h),r?s.prepend(o):n.head.appendChild(o)}var c=t.create(t.w.config.series,{});if(!c)return e(t);t.mount(c).then((function(){"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(c)})).catch((function(t){i(t)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var i=this,a=this.w;new hs(this).initModules();var s=this.w.globals;if(s.noData=!1,s.animationEnded=!1,!v.elementExists(this.el))return s.animationEnded=!0,this.destroy(),null;(this.responsive.checkResponsiveConfig(e),a.config.xaxis.convertedCatToNumeric)&&new Ni(a.config).convertCatToNumericXaxis(a.config,this.ctx);if(this.core.setupElements(),"treemap"===a.config.chart.type&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),0===s.svgWidth)return s.animationEnded=!0,null;var r=t;t.forEach((function(t,e){t.hidden&&(r=i.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}))}));var n=Pi.checkComboSeries(r,a.config.chart.type);s.comboCharts=n.comboCharts,s.comboBarCount=n.comboBarCount;var o=r.every((function(t){return t.data&&0===t.data.length}));(0===r.length||o&&s.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(r),this.theme.init(),new Vi(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),s.noData&&s.collapsedSeries.length!==s.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),s.axisCharts&&(this.core.coreCalculations(),"category"!==a.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new Pi(this).getLargestMarkerSize(),this.dimensions.plotCoords();var l=this.core.xySettings();this.grid.createGridMask();var h=this.core.plotChartType(r,l),c=new qi(this);return c.bringForward(),a.config.dataLabels.background.enabled&&c.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:h,xyRatios:l,dimensions:{plot:{left:a.globals.translateX,top:a.globals.translateY,width:a.globals.gridWidth,height:a.globals.gridHeight}}}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise((function(s,r){if(null===i.el)return r(new Error("Not enough data to display or target element not found"));(null===e||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new Ki(i);var n,o,l=i.grid.drawGrid();(i.annotations=new Fi(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position)&&(l&&a.globals.dom.elGraphical.add(l.el),null!=l&&null!==(n=l.elGridBorders)&&void 0!==n&&n.node&&a.globals.dom.elGraphical.add(l.elGridBorders));if(Array.isArray(e.elGraph))for(var h=0;h0&&a.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),s(i)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,e){var i=ds.get(e);i&&(i.disconnect(),ds.delete(e))}(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,i){e.id===v.escapeString(t)&&Apex._chartInstances.splice(i,1)})),new cs(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w;return n.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,i){return e.updateHelpers._extendSeries(t,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,a,s,r)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,e,i)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(t,e,a)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(t,e,a)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(t,e,a)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;e&&(i=e),i.annotations.removeAnnotation(i,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Ji(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ji(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var e=v.escapeString(t);if(Apex._chartInstances){var i=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i2?s-2:0),n=2;n{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",Qa("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>Ka(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class ss{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",is(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",is("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>as(t,e))),this.rotationPoint=as(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const rs=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ss?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this};Q(Gt,{select:rs(ss)}),Q([Ge,je,xe],{pointSelect:rs(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",is("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>as(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const ns=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),os=t=>{let e=1/0,i=1/0,a=-1/0,s=-1/0;for(let r=0;r{const s=t-e[0],r=(a-e[1])*i;return[s*i+e[0],r+e[1]]}));return os(a)}(this.box,s,r)}this.el.dispatch("resize",{box:new kt(l),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.move(l.x,l.y).size(l.width,l.height)}movePoint(t){this.lastEvent=t;const{x:e,y:i}=this.snapToGrid(this.el.point(ns(t))),a=this.el.array().slice();a[this.index]=[e,i],this.el.dispatch("resize",{box:os(a),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.plot(a)}rotate(t){this.lastEvent=t;const e=this.el.point(ns(t)),i=this.box.cx,a=this.box.cy,s=this.startPoint.x-i,r=this.startPoint.y-a,n=e.x-i,o=e.y-a,l=Math.sqrt(s*s+r*r)*Math.sqrt(n*n+o*o);if(0===l)return;let h=Math.acos((s*n+r*o)/l)/Math.PI*180;e.xdiv {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}';var h=(null===(l=t.opts.chart)||void 0===l?void 0:l.nonce)||t.w.config.chart.nonce;h&&o.setAttribute("nonce",h),r?s.prepend(o):n.head.appendChild(o)}var c=t.create(t.w.config.series,{});if(!c)return e(t);t.mount(c).then((function(){"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(c)})).catch((function(t){i(t)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var i=this,a=this.w;new hs(this).initModules();var s=this.w.globals;if(s.noData=!1,s.animationEnded=!1,!v.elementExists(this.el))return s.animationEnded=!0,this.destroy(),null;(this.responsive.checkResponsiveConfig(e),a.config.xaxis.convertedCatToNumeric)&&new Ni(a.config).convertCatToNumericXaxis(a.config,this.ctx);if(this.core.setupElements(),"treemap"===a.config.chart.type&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),0===s.svgWidth)return s.animationEnded=!0,null;var r=t;t.forEach((function(t,e){t.hidden&&(r=i.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}))}));var n=Pi.checkComboSeries(r,a.config.chart.type);s.comboCharts=n.comboCharts,s.comboBarCount=n.comboBarCount;var o=r.every((function(t){return t.data&&0===t.data.length}));(0===r.length||o&&s.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(r),this.theme.init(),new Vi(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),s.noData&&s.collapsedSeries.length!==s.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),s.axisCharts&&(this.core.coreCalculations(),"category"!==a.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new Pi(this).getLargestMarkerSize(),this.dimensions.plotCoords();var l=this.core.xySettings();this.grid.createGridMask();var h=this.core.plotChartType(r,l),c=new qi(this);return c.bringForward(),a.config.dataLabels.background.enabled&&c.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:h,xyRatios:l,dimensions:{plot:{left:a.globals.translateX,top:a.globals.translateY,width:a.globals.gridWidth,height:a.globals.gridHeight}}}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise((function(s,r){if(null===i.el)return r(new Error("Not enough data to display or target element not found"));(null===e||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new Ki(i);var n,o,l=i.grid.drawGrid();(i.annotations=new Fi(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position)&&(l&&a.globals.dom.elGraphical.add(l.el),null!=l&&null!==(n=l.elGridBorders)&&void 0!==n&&n.node&&a.globals.dom.elGraphical.add(l.elGridBorders));if(Array.isArray(e.elGraph))for(var h=0;h0&&a.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),s(i)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,e){var i=ds.get(e);i&&(i.disconnect(),ds.delete(e))}(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,i){e.id===v.escapeString(t)&&Apex._chartInstances.splice(i,1)})),new cs(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w;return n.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,i){return e.updateHelpers._extendSeries(t,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,a,s,r)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,e,i)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(t,e,a)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(t,e,a)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(t,e,a)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;e&&(i=e),i.annotations.removeAnnotation(i,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Ji(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ji(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var e=v.escapeString(t);if(Apex._chartInstances){var i=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i2?s-2:0),n=2;nt.length)&&(e=t.length);for(var i=0,a=Array(e);i=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,n=!0,o=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){o=!0,r=t},f:function(){try{n||null==i.return||i.return()}finally{if(o)throw r}}}}function n(t){var i=c();return function(){var a,s=l(t);if(i){var r=l(this).constructor;a=Reflect.construct(s,arguments,r)}else a=s.apply(this,arguments);return function(t,i){if(i&&("object"==typeof i||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return e(t)}(this,a)}}function o(t,e,i){return(e=x(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function d(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function u(t){for(var e=1;e>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-r)*s)+r)+256*(Math.round((a-n)*s)+n)+(Math.round((a-o)*s)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,i){return t.isColorHex(i)?this.shadeHexColor(e,i):this.shadeRGBColor(e,i)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===b(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,i=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var i="",a=t<0?"-":"",s=e[0].replace(".",""),r=Number(e[1])+1;if(r<0){for(i=a+"0.";r++;)i+="0";return i+s.replace(/^-/,"")}for(r-=s.length;r--;)i+="0";return s+i}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),i=t.clientHeight,a=t.clientWidth;return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[a-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),i]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:"x",i=t.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,i){if(i>=t.length)for(var a=i-t.length+1;a--;)t.push(void 0);return t.splice(i,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style.key=e[i])}},{key:"preciseAddition",value:function(t,e){var i=(String(t).split(".")[1]||"").length,a=(String(e).split(".")[1]||"").length,s=Math.pow(10,Math.max(i,a));return(Math.round(t*s)+Math.round(e*s))/s}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*a),e=Math.round(Math.abs(e)*a);e;){var s=e;e=t%e,t=s}return t/a}},{key:"getPrimeFactors",value:function(t){for(var e=[],i=2;t>=2;)t%i==0?(e.push(i),t/=i):i++;return e}},{key:"mod",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*a))%(e=Math.round(Math.abs(e)*a))/a}}]),t}(),y=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"animateLine",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animateMarker",value:function(t,e,i,a){t.attr({opacity:0}).animate(e).attr({opacity:1}).after((function(){a()}))}},{key:"animateRect",value:function(t,e,i,a,s){t.attr(e).animate(a).attr(i).after((function(){return s()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.realIndex,a=t.j,s=t.fill,r=t.pathFrom,n=t.pathTo,o=t.speed,l=t.delay,h=this.w,c=0;h.config.chart.animations.animateGradually.enabled&&(c=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&"bar"!==h.config.chart.type&&(c=0),this.morphSVG(e,i,a,"line"!==h.config.chart.type||h.globals.comboCharts?s:"stroke",r,n,o,l*c)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){var e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,i,a,s,r,n,o){var l=this,h=this.w;s||(s=t.attr("pathFrom")),r||(r=t.attr("pathTo"));var c=function(t){return"radar"===h.config.chart.type&&(n=1),"M 0 ".concat(h.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=c()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=c()),h.globals.shouldAnimate||(n=1),t.plot(s).animate(1,o).plot(s).animate(n,o).plot(r).after((function(){v.isNumber(i)?i===h.globals.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&l.animationCompleted(t):"none"!==a&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&e===h.globals.series.length-1||h.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}]),t}();const w={},k=[];function A(t,e){if(Array.isArray(t))for(const i of t)A(i,e);else if("object"!=typeof t)S(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(const e in t)A(e,t[e])}function C(t){return w[t]||{}}function S(t){k.push(...t)}function L(t,e){let i;const a=t.length,s=[];for(i=0;iz.has(t.nodeName),R=(t,e,i={})=>{const a={...e};for(const t in a)a[t].valueOf()===i[t]&&delete a[t];Object.keys(a).length?t.node.setAttribute("data-svgjs",JSON.stringify(a)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},E="http://www.w3.org/2000/svg",Y="http://www.w3.org/2000/xmlns/",H="http://www.w3.org/1999/xlink",O={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function F(){return O.window}let D=class{};const _={},N="___SYMBOL___ROOT___";function W(t,e=E){return O.document.createElementNS(e,t)}function B(t,e=!1){if(t instanceof D)return t;if("object"==typeof t)return U(t);if(null==t)return new _[N];if("string"==typeof t&&"<"!==t.charAt(0))return U(O.document.querySelector(t));const i=e?O.document.createElement("div"):W("svg");return i.innerHTML=t,t=U(i.firstChild),i.removeChild(i.firstChild),t}function G(t,e){return e&&(e instanceof O.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:W(t)}function V(t){if(!t)return null;if(t.instance instanceof D)return t.instance;if("#document-fragment"===t.nodeName)return new _.Fragment(t);let e=P(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":_[e]||(e="Dom"),new _[e](t)}let U=V;function q(t,e=t.name,i=!1){return _[e]=t,i&&(_[N]=t),S(Object.getOwnPropertyNames(t.prototype)),t}let Z=1e3;function $(t){return"Svgjs"+P(t)+Z++}function J(t){for(let e=t.children.length-1;e>=0;e--)J(t.children[e]);return t.id?(t.id=$(t.nodeName),t):t}function Q(t,e){let i,a;for(a=(t=Array.isArray(t)?t:[t]).length-1;a>=0;a--)for(i in e)t[a].prototype[i]=e[i]}function K(t){return function(...e){const i=e[e.length-1];return!i||i.constructor!==Object||i instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(i)}}A("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=B(t)).before(this),this},insertAfter:function(t){return(t=B(t)).after(this),this}});const tt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,et=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,it=/rgb\((\d+),(\d+),(\d+)\)/,at=/(#[a-z_][a-z0-9\-_]*)/i,st=/\)\s*,?\s*/,rt=/\s/g,nt=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ot=/^rgb\(/,lt=/^(\s+)?$/,ht=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ct=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,dt=/[\s,]+/,ut=/[MLHVCSQTAZ]/i;function gt(t){const e=Math.round(t),i=Math.max(0,Math.min(255,e)).toString(16);return 1===i.length?"0"+i:i}function pt(t,e){for(let i=e.length;i--;)if(null==t[e[i]])return!1;return!0}function ft(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}A("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(dt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),A("Dom",{css:function(t,e){const i={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);i[e[0]]=e[1]})),i;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;i[e]=this.node.style.getPropertyValue(t)}return i}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||lt.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||lt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),A("Dom",{data:function(t,e,i){if(null==t)return this.data(L(function(t,e){let i;const a=t.length,s=[];for(i=0;i0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const i of t)e[i]=this.data(i);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===i||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),A("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class xt{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof xt||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:i,round:a,sin:s,PI:r}=Math;if("vibrant"===t){const t=24*i()+57,e=38*i()+45,a=360*i();return new xt(t,e,a,"lch")}if("sine"===t){const t=a(80*s(2*r*(e=null==e?i():e)/.5+.01)+150),n=a(50*s(2*r*e/.5+4.6)+200),o=a(100*s(2*r*e/.5+2.3)+150);return new xt(t,n,o)}if("pastel"===t){const t=8*i()+86,e=17*i()+9,a=360*i();return new xt(t,e,a,"lch")}if("dark"===t){const t=10+10*i(),e=50*i()+86,a=360*i();return new xt(t,e,a,"lch")}if("rgb"===t){const t=255*i(),e=255*i(),a=255*i();return new xt(t,e,a)}if("lab"===t){const t=100*i(),e=256*i()-128,a=256*i()-128;return new xt(t,e,a,"lab")}if("grey"===t){const t=255*i();return new xt(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(nt.test(t)||ot.test(t))}cmyk(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.min(1-a,1-s,1-r);if(1===n)return new xt(0,0,0,1,"cmyk");return new xt((1-a-n)/(1-n),(1-s-n)/(1-n),(1-r-n)/(1-n),n,"cmyk")}hsl(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.max(a,s,r),o=Math.min(a,s,r),l=(n+o)/2,h=n===o,c=n-o;return new xt(360*(h?0:n===a?((s-r)/c+(s.5?c/(2-n-o):c/(n+o)),100*l,"hsl")}init(t=0,e=0,i=0,a=0,s="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)s="string"==typeof a?a:s,a="string"==typeof a?0:a,Object.assign(this,{_a:t,_b:e,_c:i,_d:a,space:s});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const i=function(t,e){const i=pt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:pt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:pt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:pt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:pt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:pt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return i.space=e||i.space,i}(t,e);Object.assign(this,i)}else if("string"==typeof t)if(ot.test(t)){const e=t.replace(rt,""),[i,a,s]=it.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}else{if(!nt.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,i,a,s]=et.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}}const{_a:r,_b:n,_c:o,_d:l}=this,h="rgb"===this.space?{r:r,g:n,b:o}:"xyz"===this.space?{x:r,y:n,z:o}:"hsl"===this.space?{h:r,s:n,l:o}:"lab"===this.space?{l:r,a:n,b:o}:"lch"===this.space?{l:r,c:n,h:o}:"cmyk"===this.space?{c:r,m:n,y:o,k:l}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:i}=this.xyz();return new xt(116*e-16,500*(t-e),200*(e-i),"lab")}lch(){const{l:t,a:e,b:i}=this.lab(),a=Math.sqrt(e**2+i**2);let s=180*Math.atan2(i,e)/Math.PI;s<0&&(s*=-1,s=360-s);return new xt(t,a,s,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:a,a:s,b:r}=this;if("lch"===this.space){const{c:t,h:e}=this,i=Math.PI/180;s=t*Math.cos(i*e),r=t*Math.sin(i*e)}const n=(a+16)/116,o=s/500+n,l=n-r/200,h=16/116,c=.008856,d=7.787;t=.95047*(o**3>c?o**3:(o-h)/d),e=1*(n**3>c?n**3:(n-h)/d),i=1.08883*(l**3>c?l**3:(l-h)/d)}const a=3.2406*t+-1.5372*e+-.4986*i,s=-.9689*t+1.8758*e+.0415*i,r=.0557*t+-.204*e+1.057*i,n=Math.pow,o=.0031308,l=a>o?1.055*n(a,1/2.4)-.055:12.92*a,h=s>o?1.055*n(s,1/2.4)-.055:12.92*s,c=r>o?1.055*n(r,1/2.4)-.055:12.92*r;return new xt(255*l,255*h,255*c)}if("hsl"===this.space){let{h:t,s:e,l:i}=this;if(t/=360,e/=100,i/=100,0===e){i*=255;return new xt(i,i,i)}const a=i<.5?i*(1+e):i+e-i*e,s=2*i-a,r=255*ft(s,a,t+1/3),n=255*ft(s,a,t),o=255*ft(s,a,t-1/3);return new xt(r,n,o)}if("cmyk"===this.space){const{c:t,m:e,y:i,k:a}=this,s=255*(1-Math.min(1,t*(1-a)+a)),r=255*(1-Math.min(1,e*(1-a)+a)),n=255*(1-Math.min(1,i*(1-a)+a));return new xt(s,r,n)}return this;var t}toArray(){const{_a:t,_b:e,_c:i,_d:a,space:s}=this;return[t,e,i,a,s]}toHex(){const[t,e,i]=this._clamped().map(gt);return`#${t}${e}${i}`}toRgb(){const[t,e,i]=this._clamped();return`rgb(${t},${e},${i})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,o=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,l=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,h=(.4124*n+.3576*o+.1805*l)/.95047,c=(.2126*n+.7152*o+.0722*l)/1,d=(.0193*n+.1192*o+.9505*l)/1.08883,u=h>.008856?Math.pow(h,1/3):7.787*h+16/116,g=c>.008856?Math.pow(c,1/3):7.787*c+16/116,p=d>.008856?Math.pow(d,1/3):7.787*d+16/116;return new xt(u,g,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:i}=this.rgb(),{max:a,min:s,round:r}=Math;return[t,e,i].map((t=>a(0,s(r(t),255))))}}class bt{constructor(...t){this.init(...t)}clone(){return new bt(this)}init(t,e){const i=0,a=0,s=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==s.x?i:s.x,this.y=null==s.y?a:s.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){vt.isMatrixLike(t)||(t=new vt(t));const{x:e,y:i}=this;return this.x=t.a*e+t.c*i+t.e,this.y=t.b*e+t.d*i+t.f,this}}function mt(t,e,i){return Math.abs(e-t)<(i||1e-6)}class vt{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,i=t.flip&&(e||"x"===t.flip)?-1:1,a=t.flip&&(e||"y"===t.flip)?-1:1,s=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,r=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,n=t.scale&&t.scale.length?t.scale[0]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleX)?t.scaleX*i:i,o=t.scale&&t.scale.length?t.scale[1]*a:isFinite(t.scale)?t.scale*a:isFinite(t.scaleY)?t.scaleY*a:a,l=t.shear||0,h=t.rotate||t.theta||0,c=new bt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),d=c.x,u=c.y,g=new bt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=g.x,f=g.y,x=new bt(t.translate||t.tx||t.translateX,t.ty||t.translateY),b=x.x,m=x.y,v=new bt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:n,scaleY:o,skewX:s,skewY:r,shear:l,theta:h,rx:v.x,ry:v.y,tx:b,ty:m,ox:d,oy:u,px:p,py:f}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,i){const a=t.a*e.a+t.c*e.b,s=t.b*e.a+t.d*e.b,r=t.a*e.c+t.c*e.d,n=t.b*e.c+t.d*e.d,o=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return i.a=a,i.b=s,i.c=r,i.d=n,i.e=o,i.f=l,i}around(t,e,i){return this.clone().aroundO(t,e,i)}aroundO(t,e,i){const a=t||0,s=e||0;return this.translateO(-a,-s).lmultiplyO(i).translateO(a,s)}clone(){return new vt(this)}decompose(t=0,e=0){const i=this.a,a=this.b,s=this.c,r=this.d,n=this.e,o=this.f,l=i*r-a*s,h=l>0?1:-1,c=h*Math.sqrt(i*i+a*a),d=Math.atan2(h*a,h*i),u=180/Math.PI*d,g=Math.cos(d),p=Math.sin(d),f=(i*s+a*r)/l,x=s*c/(f*i-a)||r*c/(f*a+i);return{scaleX:c,scaleY:x,shear:f,rotate:u,translateX:n-t+t*g*c+e*(f*g*c-p*x),translateY:o-e+t*p*c+e*(f*p*c+g*x),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new vt(t);return mt(this.a,e.a)&&mt(this.b,e.b)&&mt(this.c,e.c)&&mt(this.d,e.d)&&mt(this.e,e.e)&&mt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=vt.fromArray([1,0,0,1,0,0]);return t=t instanceof Gt?t.matrixify():"string"==typeof t?vt.fromArray(t.split(dt).map(parseFloat)):Array.isArray(t)?vt.fromArray(t):"object"==typeof t&&vt.isMatrixLike(t)?t:"object"==typeof t?(new vt).transform(t):6===arguments.length?vt.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,i=this.c,a=this.d,s=this.e,r=this.f,n=t*a-e*i;if(!n)throw new Error("Cannot invert "+this);const o=a/n,l=-e/n,h=-i/n,c=t/n,d=-(o*s+h*r),u=-(l*s+c*r);return this.a=o,this.b=l,this.c=h,this.d=c,this.e=d,this.f=u,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(this,e,this)}rotate(t,e,i){return this.clone().rotateO(t,e,i)}rotateO(t,e=0,i=0){t=M(t);const a=Math.cos(t),s=Math.sin(t),{a:r,b:n,c:o,d:l,e:h,f:c}=this;return this.a=r*a-n*s,this.b=n*a+r*s,this.c=o*a-l*s,this.d=l*a+o*s,this.e=h*a-c*s+i*s-e*a+e,this.f=c*a+h*s-e*s-i*a+i,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t);const{a:s,b:r,c:n,d:o,e:l,f:h}=this;return this.a=s*t,this.b=r*e,this.c=n*t,this.d=o*e,this.e=l*t-i*t+i,this.f=h*e-a*e+a,this}shear(t,e,i){return this.clone().shearO(t,e,i)}shearO(t,e=0,i=0){const{a:a,b:s,c:r,d:n,e:o,f:l}=this;return this.a=a+s*t,this.c=r+n*t,this.e=o+l*t-i*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t),t=M(t),e=M(e);const s=Math.tan(t),r=Math.tan(e),{a:n,b:o,c:l,d:h,e:c,f:d}=this;return this.a=n+o*s,this.b=o+n*r,this.c=l+h*s,this.d=h+l*r,this.e=c+d*s-a*s,this.f=d+c*r-i*r,this}skewX(t,e,i){return this.skew(t,0,e,i)}skewY(t,e,i){return this.skew(0,t,e,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(vt.isMatrixLike(t)){return new vt(t).multiplyO(this)}const e=vt.formatTransforms(t),{x:i,y:a}=new bt(e.ox,e.oy).transform(this),s=(new vt).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-i,-a).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(i,a);if(isFinite(e.px)||isFinite(e.py)){const t=new bt(i,a).transform(s),r=isFinite(e.px)?e.px-t.x:0,n=isFinite(e.py)?e.py-t.y:0;s.translateO(r,n)}return s.translateO(e.tx,e.ty),s}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function yt(){if(!yt.nodes){const t=B().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;yt.nodes={svg:t,path:e}}if(!yt.nodes.svg.node.parentNode){const t=O.document.body||O.document.documentElement;yt.nodes.svg.addTo(t)}return yt.nodes}function wt(t){return!(t.width||t.height||t.x||t.y)}q(vt,"Matrix");class kt{constructor(...t){this.init(...t)}addOffset(){return this.x+=O.window.pageXOffset,this.y+=O.window.pageYOffset,new kt(this)}init(t){return t="string"==typeof t?t.split(dt).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return wt(this)}merge(t){const e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),a=Math.max(this.x+this.width,t.x+t.width)-e,s=Math.max(this.y+this.height,t.y+t.height)-i;return new kt(e,i,a,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof vt||(t=new vt(t));let e=1/0,i=-1/0,a=1/0,s=-1/0;return[new bt(this.x,this.y),new bt(this.x2,this.y),new bt(this.x,this.y2),new bt(this.x2,this.y2)].forEach((function(r){r=r.transform(t),e=Math.min(e,r.x),i=Math.max(i,r.x),a=Math.min(a,r.y),s=Math.max(s,r.y)})),new kt(e,a,i-e,s-a)}}function At(t,e,i){let a;try{if(a=e(t.node),wt(a)&&((s=t.node)!==O.document&&!(O.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===O.document}).call(O.document.documentElement,s)))throw new Error("Element not in the dom")}catch(e){a=i(t)}var s;return a}A({viewbox:{viewbox(t,e,i,a){return null==t?new kt(this.attr("viewBox")):this.attr("viewBox",new kt(t,e,i,a))},zoom(t,e){let{width:i,height:a}=this.attr(["width","height"]);if((i||a)&&"string"!=typeof i&&"string"!=typeof a||(i=this.node.clientWidth,a=this.node.clientHeight),!i||!a)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const s=this.viewbox(),r=i/s.width,n=a/s.height,o=Math.min(r,n);if(null==t)return o;let l=o/t;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new bt(i/2/r+s.x,a/2/n+s.y);const h=new kt(s).transform(new vt({scale:l,origin:e}));return this.viewbox(h)}}}),q(kt,"Box");class Ct extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}Q([Ct],{each(t,...e){return"function"==typeof t?this.map(((e,i,a)=>t.call(e,e,i,a))):this.map((i=>i[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const St=["toArray","constructor","each"];function Lt(t,e){return new Ct(L((e||O.document).querySelectorAll(t),(function(t){return V(t)})))}Ct.extend=function(t){t=t.reduce(((t,e)=>(St.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),Q([Ct],t)};let Mt=0;const Pt={};function It(t){let e=t.getEventHolder();return e===O.window&&(e=Pt),e.events||(e.events={}),e.events}function Tt(t){return t.getEventTarget()}function zt(t,e,i,a,s){const r=i.bind(a||t),n=B(t),o=It(n),l=Tt(n);e=Array.isArray(e)?e:e.split(dt),i._svgjsListenerId||(i._svgjsListenerId=++Mt),e.forEach((function(t){const e=t.split(".")[0],a=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][a]=o[e][a]||{},o[e][a][i._svgjsListenerId]=r,l.addEventListener(e,r,s||!1)}))}function Xt(t,e,i,a){const s=B(t),r=It(s),n=Tt(s);("function"!=typeof i||(i=i._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(dt)).forEach((function(t){const e=t&&t.split(".")[0],o=t&&t.split(".")[1];let l,h;if(i)r[e]&&r[e][o||"*"]&&(n.removeEventListener(e,r[e][o||"*"][i],a||!1),delete r[e][o||"*"][i]);else if(e&&o){if(r[e]&&r[e][o]){for(h in r[e][o])Xt(n,[e,o].join("."),h);delete r[e][o]}}else if(o)for(t in r)for(l in r[t])o===l&&Xt(n,[t,o].join("."));else if(e){if(r[e]){for(l in r[e])Xt(n,[e,l].join("."));delete r[e]}}else{for(t in r)Xt(n,t);!function(t){let e=t.getEventHolder();e===O.window&&(e=Pt),e.events&&(e.events={})}(s)}}))}class Rt extends D{addEventListener(){}dispatch(t,e,i){return function(t,e,i,a){const s=Tt(t);return e instanceof O.window.Event||(e=new O.window.CustomEvent(e,{detail:i,cancelable:!0,...a})),s.dispatchEvent(e),e}(this,t,e,i)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const i=e[t.type];for(const e in i)for(const a in i[e])i[e][a](t);return!t.defaultPrevented}fire(t,e,i){return this.dispatch(t,e,i),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,i){return Xt(this,t,e,i),this}on(t,e,i,a){return zt(this,t,e,i,a),this}removeEventListener(){}}function Et(){}q(Rt,"EventTarget");const Yt=400,Ht=">",Ot=0,Ft={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Dt extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(dt).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class _t{constructor(...t){this.init(...t)}convert(t){return new _t(this.value,t)}divide(t){return t=new _t(t),new _t(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(tt))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof _t&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new _t(t),new _t(this-t,this.unit||t.unit)}plus(t){return t=new _t(t),new _t(this+t,this.unit||t.unit)}times(t){return t=new _t(t),new _t(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Nt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Wt=[];class Bt extends Rt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=B(t)).removeNamespace&&this.node instanceof O.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return B(t).put(this,e)}children(){return new Ct(L(this.node.children,(function(t){return V(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let i=this.node.cloneNode(t);return e&&(i=J(i)),new this.constructor(i)}each(t,e){const i=this.children();let a,s;for(a=0,s=i.length;a=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=$(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return V(this.node.lastChild)}matches(t){const e=this.node,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return i&&i.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=V(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=V(e.node.parentNode));return e}put(t,e){return t=B(t),this.add(t,e),t}putIn(t,e){return B(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=B(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const i=10**t,a=this.attr(e);for(const t in a)"number"==typeof a[t]&&(a[t]=Math.round(a[t]*i)/i);return this.attr(a),this}svg(t,e){return this.xml(t,e,E)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const i=e.index(this);return e.put(t,i).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let i=this;if(null!=t){if(i=V(i.node.cloneNode(!0)),e){const e=t(i);if(i=e||i,!1===e)return""}i.each((function(){const e=t(this),i=e||this;!1===e?this.remove():e&&this!==i&&this.replace(i)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;const a=W("wrapper",i),s=O.document.createDocumentFragment();a.innerHTML=t;for(let t=a.children.length;t--;)s.appendChild(a.firstElementChild);const r=this.parent();return e?this.replace(s)&&r:this.add(s)}}Q(Bt,{attr:function(t,e,i){if(null==t){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=ht.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ft[t]:ht.test(e)?parseFloat(e):e;"number"==typeof(e=Wt.reduce(((e,i)=>i(t,e,this)),e))?e=new _t(e):Nt.has(t)&&xt.isColor(e)?e=new xt(e):e.constructor===Array&&(e=new Dt(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return Lt(t,this.node)},findOne:function(t){return V(this.node.querySelector(t))}}),q(Bt,"Dom");class Gt extends Bt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new _t(t).plus(this.x()))}dy(t=0){return this.y(new _t(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=B(t));const i=new Ct;let a=this;for(;(a=a.parent())&&a.node!==O.document&&"#document-fragment"!==a.nodeName&&(i.push(a),e||a.node!==t.node)&&(!e||!a.matches(t));)if(a.node===this.root().node)return null;return i}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(at);return e?B(e[1]):null}root(){const t=this.parent(function(t){return _[t]}(N));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const i=I(this,t,e);return this.width(new _t(i.width)).height(new _t(i.height))}width(t){return this.attr("width",t)}writeDataToDom(){return R(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}Q(Gt,{bbox:function(){const t=At(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(yt().svg).show(),i=e.node.getBBox();return e.remove(),i}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new kt(t)},rbox:function(t){const e=At(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),i=new kt(e);return t?i.transform(t.screenCTM().inverseO()):i.addOffset()},inside:function(t,e){const i=this.bbox();return t>i.x&&e>i.y&&t=0;i--)null!=e[jt[t][i]]&&this.attr(jt.prefix(t,jt[t][i]),e[jt[t][i]]);return this},A(["Element","Runner"],e)})),A(["Element","Runner"],{matrix:function(t,e,i,a,s,r){return null==t?new vt(this):this.attr("transform",new vt(t,e,i,a,s,r))},rotate:function(t,e,i){return this.transform({rotate:t,ox:e,oy:i},!0)},skew:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:i},!0):this.transform({skew:[t,e],ox:i,oy:a},!0)},shear:function(t,e,i){return this.transform({shear:t,ox:e,oy:i},!0)},scale:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:i},!0):this.transform({scale:[t,e],ox:i,oy:a},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),A("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new _t(t)):this.rx(t).ry(e)}}),A("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new bt(this.node.getPointAtLength(t))}}),A(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});A("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),A("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){const t=(this.attr("transform")||"").split(st).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(dt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(vt.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new vt);return t},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);const i=this.screenCTM(),a=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(a.multiply(i)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new vt(this).decompose();return null==t?e:e[t]}vt.isMatrixLike(t)||(t={...t,origin:T(t,this)});const i=new vt(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});class Vt extends Gt{flatten(){return this.each((function(){if(this instanceof Vt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(i,a){return a[a.length-i-1].toParent(t,e)})),this.remove()}}q(Vt,"Container");class Ut extends Vt{constructor(t,e=t){super(G("defs",t),e)}flatten(){return this}ungroup(){return this}}q(Ut,"Defs");class qt extends Gt{}function Zt(t){return this.attr("rx",t)}function $t(t){return this.attr("ry",t)}function Jt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Qt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Kt(t){return this.attr("cx",t)}function te(t){return this.attr("cy",t)}function ee(t){return null==t?2*this.rx():this.rx(new _t(t).divide(2))}function ie(t){return null==t?2*this.ry():this.ry(new _t(t).divide(2))}q(qt,"Shape");var ae=Object.freeze({__proto__:null,cx:Kt,cy:te,height:ie,rx:Zt,ry:$t,width:ee,x:Jt,y:Qt});class se extends qt{constructor(t,e=t){super(G("ellipse",t),e)}size(t,e){const i=I(this,t,e);return this.rx(new _t(i.width).divide(2)).ry(new _t(i.height).divide(2))}}Q(se,ae),A("Container",{ellipse:K((function(t=0,e=t){return this.put(new se).size(t,e).move(0,0)}))}),q(se,"Ellipse");class re extends Bt{constructor(t=O.document.createDocumentFragment()){super(t)}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){const t=new Bt(W("wrapper",i));return t.add(this.node.cloneNode(!0)),t.xml(!1,i)}return super.xml(t,!1,i)}}function ne(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new _t(t),fy:new _t(e)}):this.attr({x1:new _t(t),y1:new _t(e)})}function oe(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new _t(t),cy:new _t(e)}):this.attr({x2:new _t(t),y2:new _t(e)})}q(re,"Fragment");var le=Object.freeze({__proto__:null,from:ne,to:oe});class he extends Vt{constructor(t,e){super(G(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,i){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}Q(he,le),A({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:K((function(t,e){return this.put(new he(t)).update(e)}))}}),q(he,"Gradient");class ce extends Vt{constructor(t,e=t){super(G("pattern",t),e)}attr(t,e,i){return"transform"===t&&(t="patternTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}A({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:K((function(t,e,i){return this.put(new ce).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),q(ce,"Pattern");let de=class extends qt{constructor(t,e=t){super(G("image",t),e)}load(t,e){if(!t)return this;const i=new O.window.Image;return zt(i,"load",(function(t){const a=this.parent(ce);0===this.width()&&0===this.height()&&this.size(i.width,i.height),a instanceof ce&&0===a.width()&&0===a.height()&&a.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),zt(i,"load error",(function(){Xt(i)})),this.attr("href",i.src=t,H)}};var ue;ue=function(t,e,i){return"fill"!==t&&"stroke"!==t||ct.test(e)&&(e=i.root().defs().image(e)),e instanceof de&&(e=i.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Wt.push(ue),A({Container:{image:K((function(t,e){return this.put(new de).size(0,0).load(t,e)}))}}),q(de,"Image");class ge extends Dt{bbox(){let t=-1/0,e=-1/0,i=1/0,a=1/0;return this.forEach((function(s){t=Math.max(s[0],t),e=Math.max(s[1],e),i=Math.min(s[0],i),a=Math.min(s[1],a)})),new kt(i,a,t-i,e-a)}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let i=this.length-1;i>=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(dt).map(parseFloat)).length%2!=0&&t.pop();for(let i=0,a=t.length;i=0;i--)a.width&&(this[i][0]=(this[i][0]-a.x)*t/a.width+a.x),a.height&&(this[i][1]=(this[i][1]-a.y)*e/a.height+a.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,i=this.length;e":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,i,a){return function(s){return s<0?t>0?e/t*s:i>0?a/i*s:0:s>1?i<1?(1-a)/(1-i)*s+(a-i)/(1-i):t<1?(1-e)/(1-t)*s+(e-t)/(1-t):1:3*s*(1-s)**2*e+3*s**2*(1-s)*a+s**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let i=t;return"none"===e?--i:"both"===e&&++i,(a,s=!1)=>{let r=Math.floor(a*t);const n=a*r%1==0;return"start"!==e&&"both"!==e||++r,s&&n&&--r,a>=0&&r<0&&(r=0),a<=1&&r>i&&(r=i),r/i}}};class ye{done(){return!1}}class we extends ye{constructor(t=Ht){super(),this.ease=ve[t]||t}step(t,e,i){return"number"!=typeof t?i<1?t:e:t+(e-t)*this.ease(i)}}class ke extends ye{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,i,a){return this.stepper(t,e,i,a)}}function Ae(){const t=(this._duration||500)/1e3,e=this._overshoot||0,i=Math.PI,a=Math.log(e/100+1e-10),s=-a/Math.sqrt(i*i+a*a),r=3.9/(s*t);this.d=2*s*r,this.k=r*r}Q(class extends ke{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;i>100&&(i=16),i/=1e3;const s=a.velocity||0,r=-this.d*s-this.k*(t-e),n=t+s*i+r*i*i/2;return a.velocity=s+r*i,a.done=Math.abs(e-n)+Math.abs(s)<.002,a.done?e:n}},{duration:me("_duration",Ae),overshoot:me("_overshoot",Ae)});Q(class extends ke{constructor(t=.1,e=.01,i=0,a=1e3){super(),this.p(t).i(e).d(i).windup(a)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;const s=e-t;let r=(a.integral||0)+s*i;const n=(s-(a.error||0))/i,o=this._windup;return!1!==o&&(r=Math.max(-o,Math.min(r,o))),a.error=s,a.integral=r,a.done=Math.abs(s)<.001,a.done?e:t+(this.P*s+this.I*r+this.D*n)}},{windup:me("_windup"),p:me("P"),i:me("I"),d:me("D")});const Ce={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Se={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Le="mlhvqtcsaz".split("");for(let t=0,e=Le.length;t=0;a--)i=this[a][0],"M"===i||"L"===i||"T"===i?(this[a][1]+=t,this[a][2]+=e):"H"===i?this[a][1]+=t:"V"===i?this[a][1]+=e:"C"===i||"S"===i||"Q"===i?(this[a][1]+=t,this[a][2]+=e,this[a][3]+=t,this[a][4]+=e,"C"===i&&(this[a][5]+=t,this[a][6]+=e)):"A"===i&&(this[a][6]+=t,this[a][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let i=0,a="";const s={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new bt,p:new bt};for(;s.lastToken=a,a=t.charAt(i++);)if(s.inSegment||!Pe(s,a))if("."!==a)if(isNaN(parseInt(a)))if(Re.has(a))s.inNumber&&Ie(s,!1);else if("-"!==a&&"+"!==a)if("E"!==a.toUpperCase()){if(ut.test(a)){if(s.inNumber)Ie(s,!1);else{if(!Me(s))throw new Error("parser Error");Te(s)}--i}}else s.number+=a,s.hasExponent=!0;else{if(s.inNumber&&!Xe(s)){Ie(s,!1),--i;continue}s.number+=a,s.inNumber=!0}else{if("0"===s.number||ze(s)){s.inNumber=!0,s.number=a,Ie(s,!0);continue}s.inNumber=!0,s.number+=a}else{if(s.pointSeen||s.hasExponent){Ie(s,!1),--i;continue}s.inNumber=!0,s.pointSeen=!0,s.number+=a}return s.inNumber&&Ie(s,!1),s.inSegment&&Me(s)&&Te(s),s.segments}(t)}size(t,e){const i=this.bbox();let a,s;for(i.width=0===i.width?1:i.width,i.height=0===i.height?1:i.height,a=this.length-1;a>=0;a--)s=this[a][0],"M"===s||"L"===s||"T"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y):"H"===s?this[a][1]=(this[a][1]-i.x)*t/i.width+i.x:"V"===s?this[a][1]=(this[a][1]-i.y)*e/i.height+i.y:"C"===s||"S"===s||"Q"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y,this[a][3]=(this[a][3]-i.x)*t/i.width+i.x,this[a][4]=(this[a][4]-i.y)*e/i.height+i.y,"C"===s&&(this[a][5]=(this[a][5]-i.x)*t/i.width+i.x,this[a][6]=(this[a][6]-i.y)*e/i.height+i.y)):"A"===s&&(this[a][1]=this[a][1]*t/i.width,this[a][2]=this[a][2]*e/i.height,this[a][6]=(this[a][6]-i.x)*t/i.width+i.x,this[a][7]=(this[a][7]-i.y)*e/i.height+i.y);return this}toString(){return function(t){let e="";for(let i=0,a=t.length;i{const e=typeof t;return"number"===e?_t:"string"===e?xt.isColor(t)?xt:dt.test(t)?ut.test(t)?Ee:Dt:tt.test(t)?_t:Oe:Ne.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Dt:"object"===e?_e:Oe};class He{constructor(t){this._stepper=t||new we("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Ye(t));let e=new this._type(t);return this._type===xt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===_e&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Oe{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Fe{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Fe.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Fe.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const De=(t,e)=>t[0]e[0]?1:0;class _e{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let i=0,a=e.length;it.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const i=e.shift(),a=e.shift(),s=e.shift(),r=e.splice(0,s);t[i]=new a(r)}return t}}const Ne=[Oe,Fe,_e];class We extends qt{constructor(t,e=t){super(G("path",t),e)}array(){return this._array||(this._array=new Ee(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Ee(t))}size(t,e){const i=I(this,t,e);return this.attr("d",this.array().size(i.width,i.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}We.prototype.MorphArray=Ee,A({Container:{path:K((function(t){return this.put(new We).plot(t||new Ee)}))}}),q(We,"Path");var Be=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new ge(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new ge(t))},size:function(t,e){const i=I(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}});class Ge extends qt{constructor(t,e=t){super(G("polygon",t),e)}}A({Container:{polygon:K((function(t){return this.put(new Ge).plot(t||new ge)}))}}),Q(Ge,fe),Q(Ge,Be),q(Ge,"Polygon");class je extends qt{constructor(t,e=t){super(G("polyline",t),e)}}A({Container:{polyline:K((function(t){return this.put(new je).plot(t||new ge)}))}}),Q(je,fe),Q(je,Be),q(je,"Polyline");class Ve extends qt{constructor(t,e=t){super(G("rect",t),e)}}Q(Ve,{rx:Zt,ry:$t}),A({Container:{rect:K((function(t,e){return this.put(new Ve).size(t,e)}))}}),q(Ve,"Rect");class Ue{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const qe={nextDraw:null,frames:new Ue,timeouts:new Ue,immediates:new Ue,timer:()=>O.window.performance||O.window.Date,transforms:[],frame(t){const e=qe.frames.push({run:t});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},timeout(t,e){e=e||0;const i=qe.timer().now()+e,a=qe.timeouts.push({run:t,time:i});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),a},immediate(t){const e=qe.immediates.push(t);return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},cancelFrame(t){null!=t&&qe.frames.remove(t)},clearTimeout(t){null!=t&&qe.timeouts.remove(t)},cancelImmediate(t){null!=t&&qe.immediates.remove(t)},_draw(t){let e=null;const i=qe.timeouts.last();for(;(e=qe.timeouts.shift())&&(t>=e.time?e.run():qe.timeouts.push(e),e!==i););let a=null;const s=qe.frames.last();for(;a!==s&&(a=qe.frames.shift());)a.run(t);let r=null;for(;r=qe.immediates.shift();)r();qe.nextDraw=qe.timeouts.first()||qe.frames.first()?O.window.requestAnimationFrame(qe._draw):null}},Ze=function(t){const e=t.start,i=t.runner.duration();return{start:e,duration:i,end:e+i,runner:t.runner}},$e=function(){const t=O.window;return(t.performance||t.Date).now()};class Je extends Rt{constructor(t=$e){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const i=Math.abs(e);return this.speed(t?-i:i)}schedule(t,e,i){if(null==t)return this._runners.map(Ze);let a=0;const s=this.getEndTime();if(e=e||0,null==i||"last"===i||"after"===i)a=s;else if("absolute"===i||"start"===i)a=e,e=0;else if("now"===i)a=this._time;else if("relative"===i){const i=this.getRunnerInfoById(t.id);i&&(a=i.start+e,e=0)}else{if("with-last"!==i)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();a=t?t.start:this._time}}t.unschedule(),t.timeline(this);const r=t.persist(),n={persist:null===r?this._persist:r,start:a+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(n),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return qe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let i=e-this._lastSourceTime;t&&(i=0);const a=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=a,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],i=e.runner;this._time-e.start<=0&&i.reset()}let s=!1;for(let t=0,e=this._runners.length;t0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}A({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Je,this._timeline):(this._timeline=t,this)}}});class Qe extends Rt{constructor(t){super(),this.id=Qe.id++,t="function"==typeof(t=null==t?Yt:t)?new ke(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ke,this._stepper=this._isDeclarative?t:new we,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new vt,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,i){let a=1,s=!1,r=0;return e=e??Ot,i=i||"last","object"!=typeof(t=t??Yt)||t instanceof ye||(e=t.delay??e,i=t.when??i,s=t.swing||s,a=t.times??a,r=t.wait??r,t=t.duration??Yt),{duration:t,delay:e,swing:s,times:a,wait:r,when:i}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,i){const a=Qe.sanitise(t,e,i),s=new Qe(a.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(a).schedule(a.delay,a.when)}clearTransform(){return this.transforms=new vt,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new we(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,i){return"object"==typeof t&&(e=t.swing,i=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=i||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),i=(this._time-t*e)/this._duration;return Math.min(t+i,this._times)}const i=t%1,a=e*Math.floor(t)+this._duration*i;return this.time(a)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,i=this._duration,a=this._wait,s=this._times,r=this._swing,n=this._reverse;let o;if(null==t){const t=function(t){const e=r*Math.floor(t%(2*(a+i))/(a+i)),s=e&&!n||!e&&n,o=Math.pow(-1,s)*(t%(a+i))/i+s;return Math.max(Math.min(o,1),0)},l=s*(a+i)-a;return o=e<=0?Math.round(t(1e-5)):e=0;this._lastPosition=e;const a=this.duration(),s=this._lastTime<=0&&this._time>0,r=this._lastTime=a;this._lastTime=this._time,s&&this.fire("start",this);const n=this._isDeclarative;this.done=!n&&!r&&this._time>=a,this._reseted=!1;let o=!1;return(i||n)&&(this._initialise(i),this.transforms=new vt,o=this._run(n?t:e),this.fire("step",this)),this.done=this.done||o&&n,r&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,i=this._queue.length;et.lmultiplyO(e),ei=t=>t.transforms;function ii(){const t=this._transformationRunners.runners.map(ei).reduce(ti,new vt);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class ai{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Ke).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const i=this.ids.indexOf(t+1);return this.ids.splice(i,1,t+1),this.runners.splice(i,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;ee.id<=t.id)).map(ei).reduce(ti,new vt)},_addRunner(t){this._transformationRunners.add(t),qe.cancelImmediate(this._frameId),this._frameId=qe.immediate(ii.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new ai).add(new Ke(new vt(this))))}}});Q(Qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,i){if("string"==typeof e)return this.styleAttr(t,{[e]:i});let a=e;if(this._tryRetarget(t,a))return this;let s=new He(this._stepper).to(a),r=Object.keys(a);return this.queue((function(){s=s.from(this.element()[t](r))}),(function(e){return this.element()[t](s.at(e).valueOf()),s.done()}),(function(e){const i=Object.keys(e),n=(o=r,i.filter((t=>!o.includes(t))));var o;if(n.length){const e=this.element()[t](n),i=new _e(s.from()).valueOf();Object.assign(i,e),s.from(i)}const l=new _e(s.to()).valueOf();Object.assign(l,e),s.to(l),r=i,a=e})),this._rememberMorpher(t,s),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let i=new He(this._stepper).to(new _t(t));return this.queue((function(){i=i.from(this.element().zoom())}),(function(t){return this.element().zoom(i.at(t),e),i.done()}),(function(t,a){e=a,i.to(t)})),this._rememberMorpher("zoom",i),this},transform(t,e,i){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const a=vt.isMatrixLike(t);i=null!=t.affine?t.affine:null!=i?i:!a;const s=new He(this._stepper).type(i?Fe:vt);let r,n,o,l,h;return this.queue((function(){n=n||this.element(),r=r||T(t,n),h=new vt(e?void 0:n),n._addRunner(this),e||n._clearTransformRunnersBefore(this)}),(function(c){e||this.clearTransform();const{x:d,y:u}=new bt(r).transform(n._currentTransform(this));let g=new vt({...t,origin:[d,u]}),p=this._isDeclarative&&o?o:h;if(i){g=g.decompose(d,u),p=p.decompose(d,u);const t=g.rotate,e=p.rotate,i=[t-360,t,t+360],a=i.map((t=>Math.abs(t-e))),s=Math.min(...a),r=a.indexOf(s);g.rotate=i[r]}e&&(a||(g.rotate=t.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),s.from(p),s.to(g);const f=s.at(c);return l=f.rotate,o=new vt(f),this.addTransform(o),n._addRunner(this),s.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(r=T(e,n)),t={...e,origin:r}}),!0),this._isDeclarative&&this._rememberMorpher("transform",s),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new _t(e),this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);let a=null;return this.queue((function(){a=this.element()[t](),i.from(a),i.to(a+e)}),(function(e){return this.element()[t](i.at(e)),i.done()}),(function(t){i.to(a+new _t(t))})),this._rememberMorpher(t,i),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);return this.queue((function(){i.from(this.element()[t]())}),(function(e){return this.element()[t](i.at(e)),i.done()})),this._rememberMorpher(t,i),this},_queueNumber(t,e){return this._queueObject(t,new _t(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let i;return t&&e||(i=this._element.bbox()),t||(t=i.width/i.height*e),e||(e=i.height/i.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,i,a){if(4===arguments.length)return this.plot([t,e,i,a]);if(this._tryRetarget("plot",t))return this;const s=new He(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){s.from(this._element.array())}),(function(t){return this._element.plot(s.at(t)),s.done()})),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,i,a){return this._queueObject("viewbox",new kt(t,e,i,a))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Q(Qe,{rx:Zt,ry:$t,from:ne,to:oe}),q(Qe,"Runner");class si extends Vt{constructor(t,e=t){super(G("svg",t),e),this.namespace()}defs(){return this.isRoot()?V(this.node.querySelector("defs"))||this.put(new Ut):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof O.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:E,version:"1.1"}).attr("xmlns:xlink",H,Y):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Y).attr("xmlns:svgjs",null,Y)}root(){return this.isRoot()?this:super.root()}}A({Container:{nested:K((function(){return this.put(new si)}))}}),q(si,"Svg",!0);let ri=class extends Vt{constructor(t,e=t){super(G("symbol",t),e)}};A({Container:{symbol:K((function(){return this.put(new ri)}))}}),q(ri,"Symbol");var ni=Object.freeze({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,i=this.bbox()){return this.cx(t,i).cy(e,i)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,i=this.bbox()){return this.x(t,i).y(e,i)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(O.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}});class oi extends qt{constructor(t,e=t){super(G("text",t),e),this.dom.leading=this.dom.leading??new _t(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new _t(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const i=this.dom.leading;this.each((function(a){if(X(this.node))return;const s=O.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=i*new _t(s);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=r:(this.attr("dy",a?r+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new _t(t.leading||1.3),this}writeDataToDom(){return R(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let i=0;t="";for(let a=0,s=e.length;a{let a;try{a=i.node instanceof F().SVGSVGElement?new kt(i.attr(["x","y","width","height"])):i.bbox()}catch(t){return}const s=new vt(i),r=s.translate(t,e).transform(s.inverse()),n=new bt(a.x,a.y).transform(r);i.move(n.x,n.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,i=this.bbox()){const a=t-i.x,s=e-i.y;return this.dmove(a,s)},size:function(t,e,i=this.bbox()){const a=I(this,t,e,i),s=a.width/i.width,r=a.height/i.height;return this.children().forEach((t=>{const e=new bt(i).transform(new vt(t).inverse());t.scale(s,r,e.x,e.y)})),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}});class gi extends Vt{constructor(t,e=t){super(G("g",t),e)}}Q(gi,ui),A({Container:{group:K((function(){return this.put(new gi)}))}}),q(gi,"G");class pi extends Vt{constructor(t,e=t){super(G("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,H)}}Q(pi,ui),A({Container:{link:K((function(t){return this.put(new pi).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const i=e.index(t);return e.add(this,i),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new pi,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),q(pi,"A");class fi extends Vt{constructor(t,e=t){super(G("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Lt("svg [mask*="+this.id()+"]")}}A({Container:{mask:K((function(){return this.defs().put(new fi)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof fi?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),q(fi,"Mask");class xi extends Gt{constructor(t,e=t){super(G("stop",t),e)}update(t){return("number"==typeof t||t instanceof _t)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new _t(t.offset)),this}}A({Gradient:{stop:function(t,e,i){return this.put(new xi).update(t,e,i)}}}),q(xi,"Stop");class bi extends Gt{constructor(t,e=t){super(G("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,i={}){return this.rule("@font-face",{fontFamily:t,src:e,...i})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let i=t+"{";for(const t in e)i+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return i+="}",i}(t,e))}}A("Dom",{style(t,e){return this.put(new bi).rule(t,e)},fontface(t,e,i){return this.put(new bi).font(t,e,i)}}),q(bi,"Style");class mi extends oi{constructor(t,e=t){super(G("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let i=null;return e&&(i=e.plot(t)),null==t?i:this}track(){return this.reference("href")}}A({Container:{textPath:K((function(t,e){return t instanceof oi||(t=this.text(t)),t.path(e)}))},Text:{path:K((function(t,e=!0){const i=new mi;let a;if(t instanceof We||(t=this.defs().path(t)),i.attr("href","#"+t,H),e)for(;a=this.node.firstChild;)i.node.appendChild(a);return this.put(i)})),textPath(){return this.findOne("textPath")}},Path:{text:K((function(t){return t instanceof oi||(t=(new oi).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Lt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),mi.prototype.MorphArray=Ee,q(mi,"TextPath");class vi extends qt{constructor(t,e=t){super(G("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,H)}}A({Container:{use:K((function(t,e){return this.put(new vi).use(t,e)}))}}),q(vi,"Use");const yi=B;Q([si,ri,de,ce,be],C("viewbox")),Q([xe,je,Ge,We],C("marker")),Q(oi,C("Text")),Q(We,C("Path")),Q(Ut,C("Defs")),Q([oi,li],C("Tspan")),Q([Ve,se,he,Qe],C("radius")),Q(Rt,C("EventTarget")),Q(Bt,C("Dom")),Q(Gt,C("Element")),Q(qt,C("Shape")),Q([Vt,re],C("Container")),Q(he,C("Gradient")),Q(Qe,C("Runner")),Ct.extend([...new Set(k)]),function(t=[]){Ne.push(...[].concat(t))}([_t,xt,kt,vt,Dt,ge,Ee,bt]),Q(Ne,{to(t){return(new He).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,i,a,s){return this.fromArray(t.map((function(t,r){return a.step(t,e[r],i,s[r],s)})))}});class wi extends Gt{constructor(t){super(G("filter",t),t),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(t,e){return!(t=super.put(t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return Lt('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class ki extends Gt{constructor(t,e){super(t,e),this.result(this.id())}in(t){if(null==t){const t=this.attr("in");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in",t)}result(t){return this.attr("result",t)}toString(){return this.result()}}const Ai=t=>function(...e){for(let i=t.length;i--;)null!=e[i]&&this.attr(t[i],e[i])},Ci={blend:Ai(["in","in2","mode"]),colorMatrix:Ai(["type","values"]),composite:Ai(["in","in2","operator"]),convolveMatrix:function(t){t=new Dt(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Ai(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Ai(["in","dx","dy","stdDeviation"]),flood:Ai(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,H)},morphology:Ai(["operator","radius"]),offset:Ai(["dx","dy"]),specularLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Ai([]),turbulence:Ai(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((t=>{const e=P(t),i=Ci[t];wi[e+"Effect"]=class extends ki{constructor(t){super(G("fe"+e,t),t)}update(t){return i.apply(this,t),this}},wi.prototype[t]=K((function(t,...i){const a=new wi[e+"Effect"];return null==t?this.put(a):("function"==typeof t?t.call(a,a):i.unshift(t),this.put(a).update(i))}))})),Q(wi,{merge(t){const e=this.put(new wi.MergeEffect);if("function"==typeof t)return t.call(e,e),e;return(t instanceof Array?t:[...arguments]).forEach((t=>{t instanceof wi.MergeNode?e.put(t):e.mergeNode(t)})),e},componentTransfer(t={}){const e=this.put(new wi.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;if(!(t.r||t.g||t.b||t.a)){t={r:t,g:t,b:t,a:t}}for(const i in t)e.add(new(wi["Func"+i.toUpperCase()])(t[i]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((t=>{const e=P(t);wi[e]=class extends ki{constructor(t){super(G("fe"+e,t),t)}}}));["funcR","funcG","funcB","funcA"].forEach((function(t){const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.ComponentTransferEffect.prototype[t]=i}));["distantLight","pointLight","spotLight"].forEach((t=>{const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.DiffuseLightingEffect.prototype[t]=i,wi.SpecularLightingEffect.prototype[t]=i})),Q(wi.MergeEffect,{mergeNode(t){return this.put(new wi.MergeNode).attr("in",t)}}),Q(Ut,{filter:function(t){const e=this.put(new wi);return"function"==typeof t&&t.call(e,e),e}}),Q(Vt,{filter:function(t){return this.defs().filter(t)}}),Q(Gt,{filterWith:function(t){const e=t instanceof wi?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const Si={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,i,a){return this.parent()&&this.parent().diffuseLighting(t,i,a).in(this)},displacementMap:function(t,e,i,a){return this.parent()&&this.parent().displacementMap(this,t,e,i,a)},dropShadow:function(t,e,i){return this.parent()&&this.parent().dropShadow(this,t,e,i).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){return t=t instanceof Array?t:[...t],this.parent()&&this.parent().merge(this,...t)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,i,a,s){return this.parent()&&this.parent().specularLighting(t,i,a,s).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,a,s){return this.parent()&&this.parent().turbulence(t,e,i,a,s).in(this)}};Q(ki,Si),Q(wi.MergeEffect,{in:function(t){return t instanceof wi.MergeNode?this.add(t,0):this.add((new wi.MergeNode).in(t),0),this}}),Q([wi.CompositeEffect,wi.BlendEffect,wi.DisplacementMapEffect],{in2:function(t){if(null==t){const t=this.attr("in2");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in2",t)}}),wi.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var Li=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getDefaultFilter",value:function(t,e){var i=this.w;t.unfilter(!0),(new wi).size("120%","180%","-5%","-40%"),i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"applyFilter",value:function(t,e,i){var a,s=this,r=this.w;if(t.unfilter(!0),"none"!==i){var n,o,l=r.config.chart.dropShadow,h="lighten"===i?2:.3;if(t.filterWith((function(t){t.colorMatrix({type:"matrix",values:"\n ".concat(h," 0 0 0 0\n 0 ").concat(h," 0 0 0\n 0 0 ").concat(h," 0 0\n 0 0 0 1 0\n "),in:"SourceGraphic",result:"brightness"}),l.enabled&&s.addShadow(t,e,l,"brightness")})),!l.noUserSpaceOnUse)null===(n=t.filterer())||void 0===n||null===(o=n.node)||void 0===o||o.setAttribute("filterUnits","userSpaceOnUse");this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node)}else this.getDefaultFilter(t,e)}},{key:"addShadow",value:function(t,e,i,a){var s,r=this.w,n=i.blur,o=i.top,l=i.left,h=i.color,c=i.opacity;if(h=Array.isArray(h)?h[e]:h,(null===(s=r.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:a,dx:l,dy:o,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:n,result:"blur"}),t.flood({"flood-color":h,"flood-opacity":c,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",a])}},{key:"dropShadow",value:function(t,e){var i,a,s,r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.w;if(t.unfilter(!0),v.isMsEdge()&&"radialBar"===o.config.chart.type)return t;if((null===(i=o.config.chart.dropShadow.enabledOnSeries)||void 0===i?void 0:i.length)>0&&-1===(null===(s=o.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.indexOf(n)))return t;return t.filterWith((function(t){r.addShadow(t,n,e,"SourceGraphic")})),e.noUserSpaceOnUse||t.filterer().node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node),t}},{key:"setSelectionFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;"none"!==s&&this.applyFilter(t,e,s.type)}}},{key:"_scaleFilterSize",value:function(t){if(t){!function(e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}}]),t}(),Mi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"roundPathCorners",value:function(t,e){function i(t,e,i){var s=e.x-t.x,r=e.y-t.y,n=Math.sqrt(s*s+r*r);return a(t,e,Math.min(1,i/n))}function a(t,e,i){return{x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}}function s(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function r(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var n=t.split(/[,\s]/).reduce((function(t,e){var i=e.match("([a-zA-Z])(.+)");return i?(t.push(i[1]),t.push(i[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),o=[];if(n.length>1){var l=r(n[0]),h=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(h=["L",l.x,l.y],n[n.length-1]=h),o.push(n[0]);for(var c=1;c2&&"L"==u[0]&&g.length>2&&"L"==g[0]){var p,f,x=r(d),b=r(u),m=r(g);p=i(b,x,e),f=i(b,m,e),s(u,p),u.origPoint=b,o.push(u);var v=a(p,b,.5),y=a(b,f,.5),w=["C",v.x,v.y,y.x,y.y,f.x,f.y];w.origPoint=b,o.push(w)}else o.push(u)}if(h){var k=r(o[o.length-1]);o.push(["Z"]),s(o[0],k)}}else o=n;return o.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":n,"stroke-linecap":o})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,c=this.w.globals.dom.Paper.rect();return c.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":h}),c.node.setAttribute("fill",r),c}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:a,stroke:e,"stroke-width":i})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var i=this.w.globals.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,s=void 0===a?"#a8a8a8":a,r=t.strokeWidth,n=void 0===r?1:r,o=t.fill,l=t.fillOpacity,h=void 0===l?1:l,c=t.strokeOpacity,d=void 0===c?1:c,u=t.classes,g=t.strokeLinecap,p=void 0===g?null:g,f=t.strokeDashArray,x=void 0===f?0:f,b=this.w;return null===p&&(p=b.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(b.globals.gridHeight)),b.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":h,stroke:s,"stroke-opacity":d,"stroke-linecap":p,"stroke-width":n,"stroke-dasharray":x,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){var i=["M",t,e].join(" ");return i}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=[" L",t,e].join(" "):"H"===i?a=[" H",t].join(" "):"V"===i&&(a=[" V",e].join(" ")),a}},{key:"curve",value:function(t,e,i,a,s,r){var n=["C",t,e,i,a,s,r].join(" ");return n}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,s,r,n){var o="A";arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(o="a");var l=[o,t,e,i,a,s,r,n].join(" ");return l}},{key:"renderPaths",value:function(t){var e,i=t.j,a=t.realIndex,s=t.pathFrom,r=t.pathTo,n=t.stroke,o=t.strokeWidth,l=t.strokeLinecap,h=t.fill,c=t.animationDelay,d=t.initialSpeed,g=t.dataChangeSpeed,p=t.className,f=t.chartType,x=t.shouldClipToGrid,b=void 0===x||x,m=t.bindEventsOnPaths,v=void 0===m||m,w=t.drawShadow,k=void 0===w||w,A=this.w,C=new Li(this.ctx),S=new y(this.ctx),L=this.w.config.chart.animations.enabled,M=L&&this.w.config.chart.animations.dynamicAnimation.enabled,P=!!(L&&!A.globals.resized||M&&A.globals.dataChanged&&A.globals.shouldAnimate);P?e=s:(e=r,A.globals.animationEnded=!0);var I=A.config.stroke.dashArray,T=0;T=Array.isArray(I)?I[a]:A.config.stroke.dashArray;var z=this.drawPath({d:e,stroke:n,strokeWidth:o,fill:h,fillOpacity:1,classes:p,strokeLinecap:l,strokeDashArray:T});z.attr("index",a),b&&("bar"===f&&!A.globals.isHorizontal||A.globals.comboCharts?z.attr({"clip-path":"url(#gridRectBarMask".concat(A.globals.cuid,")")}):z.attr({"clip-path":"url(#gridRectMask".concat(A.globals.cuid,")")})),A.config.chart.dropShadow.enabled&&k&&C.dropShadow(z,A.config.chart.dropShadow,a),v&&(z.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,z)),z.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,z)),z.node.addEventListener("mousedown",this.pathMouseDown.bind(this,z))),z.attr({pathTo:r,pathFrom:s});var X={el:z,j:i,realIndex:a,pathFrom:s,pathTo:r,fill:h,strokeWidth:o,delay:c};return!L||A.globals.resized||A.globals.dataChanged?!A.globals.resized&&A.globals.dataChanged||S.showDelayedElements():S.animatePathsGradually(u(u({},X),{},{speed:d})),A.globals.dataChanged&&M&&P&&S.animatePathsGradually(u(u({},X),{},{speed:g})),z}},{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,i,(function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:a,width:s+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:a,width:s}):"squares"===t?r.rect(e,i).fill("none").stroke({color:a,width:s}):"circles"===t&&r.circle(e).fill("none").stroke({color:a,width:s})}))}},{key:"drawGradient",value:function(t,e,i,a,s){var r,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,c=this.w;e.length<9&&0===e.indexOf("#")&&(e=v.hexToRgba(e,a)),i.length<9&&0===i.indexOf("#")&&(i=v.hexToRgba(i,s));var d=0,u=1,g=1,p=null;null!==o&&(d=void 0!==o[0]?o[0]/100:0,u=void 0!==o[1]?o[1]/100:1,g=void 0!==o[2]?o[2]/100:1,p=void 0!==o[3]?o[3]/100:null);var f=!("donut"!==c.config.chart.type&&"pie"!==c.config.chart.type&&"polarArea"!==c.config.chart.type&&"bubble"!==c.config.chart.type);if(r=l&&0!==l.length?c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){(Array.isArray(l[h])?l[h]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){t.stop(d,e,a),t.stop(u,i,s),t.stop(g,i,s),null!==p&&t.stop(p,e,a)})),f){var x=c.globals.gridWidth/2,b=c.globals.gridHeight/2;"bubble"!==c.config.chart.type?r.attr({gradientUnits:"userSpaceOnUse",cx:x,cy:b,r:n}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?r.from(0,0).to(0,1):"diagonal"===t?r.from(0,0).to(1,1):"horizontal"===t?r.from(0,1).to(1,1):"diagonal2"===t&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,i=t.maxWidth,a=t.fontSize,s=t.fontFamily,r=this.getTextRects(e,a,s),n=r.width/e.length,o=Math.floor(i/n);return i-1){var o=i.globals.selectedDataPoints[s].indexOf(r);i.globals.selectedDataPoints[s].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),h=i.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),c=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),a.getDefaultFilter(t,s)}))};c(l),c(h)}t.node.setAttribute("selected","true"),n="true",void 0===i.globals.selectedDataPoints[s]&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(r)}if("true"===n){var d=i.config.states.active.filter;if("none"!==d)a.applyFilter(t,s,d.type);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}}else if("none"!==i.config.states.active.filter.type)if("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice)a.getDefaultFilter(t,s);else{u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,a){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w,n=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),r.globals.dom.Paper.add(n);var o=n.bbox();return s||(o=n.node.getBoundingClientRect()),n.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i/1.1)return void(t.textContent=e.substring(0,a)+"...");t.textContent="."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}(),Pi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getStackedSeriesTotals",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,i=[];if(0===e.globals.series.length)return i;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,i=[];return e.globals.seriesGroups.forEach((function(a){var s=[];e.config.series.forEach((function(t,i){a.indexOf(e.globals.seriesNames[i])>-1&&s.push(i)}));var r=e.globals.series.map((function(t,e){return-1===s.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));i.push(t.getStackedSeriesTotals(r))})),i}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,i=[],a=[],s=[],r=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){s.push(e),a.push(null)})),e.yaxis.forEach((function(t,e){i[e]=[]}));var n=[];e.yaxis.forEach((function(t,a){var o=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,n){if(e.name===t){var l=n;a===n||r?!r||s.indexOf(n)>-1?i[a].push([a,n]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[n].push([n,a]),l=a),o=!0,-1!==(l=s.indexOf(l))&&s.splice(l,1)}}))}))}o||n.push(a)})),i=i.map((function(t,e){var i=[];return t.forEach((function(t){a[t[1]]=t[0],i.push(t[1])})),i}));for(var o=e.yaxis.length-1,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,i){return t===i[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map((function(t,i){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),i}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var i=0;if(Array.isArray(t))for(var a=0;at&&i.globals.seriesX[s][n]0){var g=function(t,e){var i=s.config.yaxis[s.globals.seriesYAxisReverseMap[e]],r=t<0?-1:1;return t=Math.abs(t),i.logarithmic&&(t=a.getBaseLog(i.logBase,t)),-r*t/n[e]};if(r.isMultipleYAxis){l=[];for(var p=0;p0&&e.forEach((function(e){var n=[],o=[];t.i.forEach((function(i,a){s.config.series[i].group===e&&(n.push(t.series[a]),o.push(i))})),n.length>0&&r.push(a.draw(n,i,o))})),r}}],[{key:"checkComboSeries",value:function(t,e){var i=!1,a=0,s=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||a++,void 0!==t.type&&t.type!==e&&s++})),s>0&&(i=!0),{comboBarCount:a,comboCharts:i}}},{key:"extendArrayProps",value:function(t,e,i){var a,s,r,n,o,l;(null!==(a=e)&&void 0!==a&&a.yaxis&&(e=t.extendYAxis(e,i)),null!==(s=e)&&void 0!==s&&s.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(r=e)&&void 0!==r&&null!==(n=r.annotations)&&void 0!==n&&n.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(l=o.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e)));return e}}]),t}(),Ii=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e}return s(t,[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===t.label.orientation){var a=null!==e?e:0,s=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(null!==s){var r=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-r.height+4);var n="top"===t.label.position?r.width:-r.width;s.setAttribute("y",parseFloat(s.getAttribute("y"))+n);var o=this.annoCtx.graphics.rotateAroundCenter(s),l=o.x,h=o.y;s.setAttribute("transform","rotate(-90 ".concat(l," ").concat(h,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=t.getBoundingClientRect(),r=e.label.style.padding,n=r.left,o=r.right,l=r.top,h=r.bottom;if("vertical"===e.label.orientation){var c=[n,o,l,h];l=c[0],h=c[1],n=c[2],o=c[3]}var d=s.left-a.left-n,u=s.top-a.top-l,g=this.annoCtx.graphics.drawRect(d-i.globals.barPadForNumericAxis,u,s.width+n+o,s.height+l+h,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&g.node.classList.add(e.id),g}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,a,s){var r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(a,"']"));if(r){var n=r.parentNode,o=t.addBackgroundToAnno(r,i);o&&(n.insertBefore(o.node,r),i.label.mouseEnter&&o.node.addEventListener("mouseenter",i.label.mouseEnter.bind(t,i)),i.label.mouseLeave&&o.node.addEventListener("mouseleave",i.label.mouseLeave.bind(t,i)),i.label.click&&o.node.addEventListener("click",i.label.click.bind(t,i)))}};e.config.annotations.xaxis.forEach((function(t,e){return i(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return i(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return i(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var i,a=this.w,s="y1"===t?e.y:e.y2,r=!1;if(this.annoCtx.invertAxis){var n=a.config.xaxis.convertedCatToNumeric?a.globals.categoryLabels:a.globals.labels,o=n.indexOf(s),l=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(o+1,")"));i=l?parseFloat(l.getAttribute("y")):(a.globals.gridHeight/n.length-1)*(o+1)-a.globals.barHeight,void 0!==e.seriesIndex&&a.globals.barHeight&&(i-=a.globals.barHeight/2*(a.globals.series.length-1)-a.globals.barHeight*e.seriesIndex)}else{var h,c=a.globals.seriesYAxisMap[e.yAxisIndex][0],d=a.config.yaxis[e.yAxisIndex].logarithmic?new Pi(this.annoCtx.ctx).getLogVal(a.config.yaxis[e.yAxisIndex].logBase,s,c)/a.globals.yLogRatio[c]:(s-a.globals.minYArr[c])/(a.globals.yRange[c]/a.globals.gridHeight);i=a.globals.gridHeight-Math.min(Math.max(d,0),a.globals.gridHeight),r=d>a.globals.gridHeight||d<0,!e.marker||void 0!==e.y&&null!==e.y||(i=0),null!==(h=a.config.yaxis[e.yAxisIndex])&&void 0!==h&&h.reversed&&(i=d)}return"string"==typeof s&&s.includes("px")&&(i=parseFloat(s)),{yP:i,clipped:r}}},{key:"getX1X2",value:function(t,e){var i=this.w,a="x1"===t?e.x:e.x2,s=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,r=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,n=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,o=!1,l=this.annoCtx.inversedReversedAxis?(r-a)/(n/i.globals.gridWidth):(a-s)/(n/i.globals.gridWidth);return"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||i.config.chart.sparkline.enabled||(l=this.getStringX(a)),"string"==typeof a&&a.includes("px")&&(l=parseFloat(a)),null==a&&e.marker&&(l=i.globals.gridWidth),void 0!==e.seriesIndex&&i.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=i.globals.barWidth/2*(i.globals.series.length-1)-i.globals.barWidth*e.seriesIndex),l>i.globals.gridWidth?(l=i.globals.gridWidth,o=!0):l<0&&(l=0,o=!0),{x:l,clipped:o}}},{key:"getStringX",value:function(t){var e=this.w,i=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var a=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),s=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(a+1,")"));return s&&(i=parseFloat(s.getAttribute("x"))),i}}]),t}(),Ti=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addXaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=this.helpers.getX1X2("x1",t),n=r.x,o=r.clipped,l=!0,h=t.label.text,c=t.strokeDashArray;if(v.isNumber(n)){if(null===t.x2||void 0===t.x2){if(!o){var d=this.annoCtx.graphics.drawLine(n+t.offsetX,0+t.offsetY,n+t.offsetX,s.globals.gridHeight+t.offsetY,t.borderColor,c,t.borderWidth);e.appendChild(d.node),t.id&&d.node.classList.add(t.id)}}else{var u=this.helpers.getX1X2("x2",t);if(a=u.x,l=u.clipped,!o||!l){if(a12?u-12:0===u?12:u;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(g))).replace(/(^|[^\\])h/g,"$1"+g);var p=a?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var x=a?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);var b=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var m=u<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));var v=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var y=-t.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){var k=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(k)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var A=(a?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(n[0],"g"),n[A])).replace(new RegExp(o[0],"g"),o[A])).replace(new RegExp(s[0],"g"),s[c])).replace(new RegExp(r[0],"g"),r[c])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var a=this.w;void 0!==a.config.xaxis.min&&(t=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(e=a.config.xaxis.max);var s=this.getDate(t),r=this.getDate(e),n=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=v.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),Xi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return s(t,[{key:"xLabelFormat",value:function(t,e,i,a){var s=this.w;if("datetime"===s.config.xaxis.type&&void 0===s.config.xaxis.labels.formatter&&void 0===s.config.tooltip.x.formatter){var r=new zi(this.ctx);return r.formatDate(r.getDate(e),s.config.tooltip.x.format)}return t(e,i,a)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,i){var a=this.w;if(v.isNumber(t))if(0!==a.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:a.globals.yValueDecimal);else{var s=t.toFixed(0);t=t==s?s:t.toFixed(1)}return t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(v.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(v.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var i=e.globals.maxX-e.globals.minX;return i>0&&i<100?t.toFixed(1):t.toFixed(0)}if(e.globals.isBarHorizontal)if(e.globals.maxY-e.globals.minYArr<4)return t.toFixed(1);return t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,a){void 0!==i.labels.formatter?e.globals.yLabelFormatters[a]=i.labels.formatter:e.globals.yLabelFormatters[a]=function(s){return e.globals.xyCharts?Array.isArray(s)?s.map((function(e){return t.defaultYFormatter(e,i,a)})):t.defaultYFormatter(s,i,a):s}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),Ri=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getLabel",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",n=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,l=void 0===t[a]?"":t[a],h=l,c=o.globals.xLabelFormatter,d=o.config.xaxis.labels.formatter,u=!1,g=new Xi(this.ctx),p=l;n&&(h=g.xLabelFormat(c,l,p,{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o}),void 0!==d&&(h=d(l,t[a],{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o})));var f,x;e.length>0?(f=e[a].unit,x=null,e.forEach((function(t){"month"===t.unit?x="year":"day"===t.unit?x="month":"hour"===t.unit?x="day":"minute"===t.unit&&(x="hour")})),u=x===f,i=e[a].position,h=e[a].value):"datetime"===o.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var b=new Mi(this.ctx),m={};m=o.globals.rotateXLabels&&n?b.getTextRects(h,parseInt(r,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):b.getTextRects(h,parseInt(r,10));var v=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||s.indexOf(h)>=0&&v)&&(h=""),{x:i,text:h,textRect:m,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var a=this.w,s=a.config.xaxis.tickAmount;return"dataPoints"===s&&(s=Math.round(a.globals.gridWidth/120)),s>i||t%Math.round(i/(s+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,a,s){var r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=s[s.length-1];e.xa.length||a.some((function(t){return Array.isArray(t.seriesName)}))?t:i.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,i=e.config.yaxis[t];if(!i.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!i.showForNullSeries){var a=e.globals.seriesYAxisMap[t],s=new Pi(this.ctx);return a.every((function(t){return s.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,i,a,s,r,n){var o=this.w,l=new Mi(this.ctx),h=o.globals.translateY+o.config.yaxis[s].labels.offsetY;if(o.globals.isBarHorizontal?h=0:"heatmap"===o.config.chart.type&&(h+=r/2),a.show&&e>0){!0===o.config.yaxis[s].opposite&&(t+=a.width);for(var c=e;c>=0;c--){var d=l.drawLine(t+i.offsetX-a.width+a.offsetX,h+a.offsetY,t+i.offsetX+a.offsetX,h+a.offsetY,a.color);n.add(d),h+=r}}}}]),t}(),Ei=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx),this.axesUtils=new Ri(this.annoCtx)}return s(t,[{key:"addYaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=t.strokeDashArray,n=this.helpers.getY1Y2("y1",t),o=n.yP,l=n.clipped,h=!0,c=!1,d=t.label.text;if(null===t.y2||void 0===t.y2){if(!l){c=!0;var u=this.annoCtx.graphics.drawLine(0+t.offsetX,o+t.offsetY,this._getYAxisAnnotationWidth(t),o+t.offsetY,t.borderColor,r,t.borderWidth);e.appendChild(u.node),t.id&&u.node.classList.add(t.id)}}else{if(a=(n=this.helpers.getY1Y2("y2",t)).yP,h=n.clipped,a>o){var g=o;o=a,a=g}if(!l||!h){c=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,a+t.offsetY,this._getYAxisAnnotationWidth(t),o-a,0,t.fillColor,t.opacity,1,t.borderColor,r);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(c){var f="right"===t.label.position?s.globals.gridWidth:"center"===t.label.position?s.globals.gridWidth/2:0,x=this.annoCtx.graphics.drawText({x:f+t.label.offsetX,y:(null!=a?a:o)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});x.attr({rel:i}),e.appendChild(x.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;e.globals.gridWidth;return(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,a){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,i.node,a)})),i}}]),t}(),Yi=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addPointAnnotation",value:function(t,e,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",t),s=a.x,r=a.clipped,n=(a=this.helpers.getY1Y2("y1",t)).yP,o=a.clipped;if(v.isNumber(s)&&!o&&!r){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},h=this.annoCtx.graphics.drawMarker(s+t.marker.offsetX,n+t.marker.offsetY,l);e.appendChild(h.node);var c=t.label.text?t.label.text:"",d=this.annoCtx.graphics.drawText({x:s+t.label.offsetX,y:n+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:c,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(d.attr({rel:i}),e.appendChild(d.node),t.customSVG.SVG){var u=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});u.attr({transform:"translate(".concat(s+t.customSVG.offsetX,", ").concat(n+t.customSVG.offsetY,")")}),u.node.innerHTML=t.customSVG.SVG,e.appendChild(u.node)}if(t.image.path){var g=t.image.width?t.image.width:20,p=t.image.height?t.image.height:20;h=this.annoCtx.addImage({x:s+t.image.offsetX-g/2,y:n+t.image.offsetY-p/2,width:g,height:p,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&h.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&h.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&h.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,a){t.addPointAnnotation(e,i.node,a)})),i}}]),t}();var Hi={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},Oi=function(){function t(){i(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return s(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[Hi],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),Fi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.graphics=new Mi(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Ii(this),this.xAxisAnnotations=new Ti(this),this.yAxisAnnotations=new Ei(this),this.pointsAnnotations=new Yi(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return s(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=t.config.chart.animations.enabled,r=[e,i,a],n=[i.node,e.node,a.node],o=0;o<3;o++)t.globals.dom.elGraphical.add(r[o]),!s||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&n[o].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:n[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,a=t.y,s=t.text,r=t.textAnchor,n=t.foreColor,o=t.fontSize,l=t.fontFamily,h=t.fontWeight,c=t.cssClass,d=t.backgroundColor,u=t.borderWidth,g=t.strokeDashArray,p=t.borderRadius,f=t.borderColor,x=t.appendTo,b=void 0===x?".apexcharts-svg":x,m=t.paddingLeft,v=void 0===m?4:m,y=t.paddingRight,w=void 0===y?4:y,k=t.paddingBottom,A=void 0===k?2:k,C=t.paddingTop,S=void 0===C?2:C,L=this.w,M=this.graphics.drawText({x:i,y:a,text:s,textAnchor:r||"start",fontSize:o||"12px",fontWeight:h||"regular",fontFamily:l||L.config.chart.fontFamily,foreColor:n||L.config.chart.foreColor,cssClass:c}),P=L.globals.dom.baseEl.querySelector(b);P&&P.appendChild(M.node);var I=M.bbox();if(s){var T=this.graphics.drawRect(I.x-v,I.y-S,I.width+v+w,I.height+A+S,p,d||"transparent",1,u,f,g);P.insertBefore(T.node,M.node)}}},{key:"addImage",value:function(t,e){var i=this.w,a=t.path,s=t.x,r=void 0===s?0:s,n=t.y,o=void 0===n?0:n,l=t.width,h=void 0===l?20:l,c=t.height,d=void 0===c?20:c,u=t.appendTo,g=void 0===u?".apexcharts-svg":u,p=i.globals.dom.Paper.image(a);p.size(h,d).move(r,o);var f=i.globals.dom.baseEl.querySelector(g);return f&&f.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,a=t.context,s=t.type,r=t.contextMethod,n=a,o=n.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),h=l.childNodes.length+1,c=new Oi,d=Object.assign({},"xaxis"===s?c.xAxisAnnotation:"yaxis"===s?c.yAxisAnnotation:c.pointAnnotation),u=v.extend(d,e);switch(s){case"xaxis":this.addXaxisAnnotation(u,l,h);break;case"yaxis":this.addYaxisAnnotation(u,l,h);break;case"point":this.addPointAnnotation(u,l,h)}var g=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(h,"']")),p=this.helpers.addBackgroundToAnno(g,u);return p&&l.insertBefore(p.node,g),i&&o.globals.memory.methodsToExec.push({context:n,id:u.id?u.id:v.randomId(),method:r,label:"addAnnotation",params:e}),a}},{key:"clearAnnotations",value:function(t){for(var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),a=e.globals.memory.methodsToExec.length-1;a>=0;a--)"addText"!==e.globals.memory.methodsToExec[a].label&&"addAnnotation"!==e.globals.memory.methodsToExec[a].label||e.globals.memory.methodsToExec.splice(a,1);i=v.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(e));a&&(i.globals.memory.methodsToExec.map((function(t,a){t.id===e&&i.globals.memory.methodsToExec.splice(a,1)})),Array.prototype.forEach.call(a,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),Di=function(t){var e,i=t.isTimeline,a=t.ctx,s=t.seriesIndex,r=t.dataPointIndex,n=t.y1,o=t.y2,l=t.w,h=l.globals.seriesRangeStart[s][r],c=l.globals.seriesRangeEnd[s][r],d=l.globals.labels[r],u=l.config.series[s].name?l.config.series[s].name:"",g=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,f={w:l,seriesIndex:s,dataPointIndex:r,start:h,end:c};("function"==typeof p&&(u=p(u,f)),null!==(e=l.config.series[s].data[r])&&void 0!==e&&e.x&&(d=l.config.series[s].data[r].x),i)||"datetime"===l.config.xaxis.type&&(d=new Xi(a).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(a).formatDate,w:l}));"function"==typeof g&&(d=g(d,f)),Number.isFinite(n)&&Number.isFinite(o)&&(h=n,c=o);var x="",b="",m=l.globals.colors[s];if(void 0===l.config.tooltip.x.formatter)if("datetime"===l.config.xaxis.type){var v=new zi(a);x=v.formatDate(v.getDate(h),l.config.tooltip.x.format),b=v.formatDate(v.getDate(c),l.config.tooltip.x.format)}else x=h,b=c;else x=l.config.tooltip.x.formatter(h),b=l.config.tooltip.x.formatter(c);return{start:h,end:c,startVal:x,endVal:b,ylabel:d,color:m,seriesName:u}},_i=function(t){var e=t.color,i=t.seriesName,a=t.ylabel,s=t.start,r=t.end,n=t.seriesIndex,o=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(n);s=l.yLbFormatter(s),r=l.yLbFormatter(r);var h=l.yLbFormatter(t.w.globals.series[n][o]),c='\n '.concat(s,'\n - \n ').concat(r,"\n ");return'
'+(i||"")+'
'+a+": "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[n].type||"rangeBar"===t.w.config.series[n].type?c:"".concat(h,""):c)+"
"},Ni=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){this.hideYAxis();return v.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var i=e.w.config.series[e.seriesIndex].name;return null!==t?i+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),u(u({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,a=e.dataPointIndex,s=e.w,r=function(){var t=s.globals.seriesRangeStart[i][a];return s.globals.seriesRangeEnd[i][a]-t};return s.globals.comboCharts?"rangeBar"===s.config.series[i].type||"rangeArea"===s.config.series[i].type?r():t:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Di(u(u({},t),{},{isTimeline:!0})),i=e.color,a=e.seriesName,s=e.ylabel,r=e.startVal,n=e.endVal;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t):function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,i;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(i=t.plotOptions.bar)&&void 0!==i&&i.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}}}}},{key:"brush",value:function(t){return v.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return u(u({},t),{},{plotOptions:u(u({},t.plotOptions),{},{bar:u(u({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return v.isNumber(t)?Math.floor(t):t};var a=t.xaxis.labels.formatter,s=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(s=i.map((function(t){return Array.isArray(t)?t:String(t)}))),s&&s.length&&(t.xaxis.labels.formatter=function(t){return v.isNumber(t)?a(s[Math.floor(t)-1]):a(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,i,a,s){var r=t.globals.seriesCandleO[e][i],n=t.globals.seriesCandleH[e][i],o=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],h=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==s?'
\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][i],"\n
"):'
')+"
".concat(a[0],': ')+r+"
"+"
".concat(a[1],': ')+n+"
"+(o?"
".concat(a[2],': ')+o+"
":"")+"
".concat(a[3],': ')+l+"
"+"
".concat(a[4],': ')+h+"
"}}]),t}(),Wi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(t){var e=t.responsiveOverride,i=this.opts,a=new Oi,s=new Ni(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),n={};if(i&&"object"===b(i)){var o,l,h,c,d,u,g,p,f,x,m={};m=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?s[i.chart.type]():s.line(),null!==(o=i.plotOptions)&&void 0!==o&&null!==(l=o.bar)&&void 0!==l&&l.isFunnel&&(m=s.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(m=s.stackedBars()),null!==(h=i.chart.brush)&&void 0!==h&&h.enabled&&(m=s.brush(m)),null!==(c=i.plotOptions)&&void 0!==c&&null!==(d=c.line)&&void 0!==d&&d.isSlopeChart&&(m=s.slope()),i.chart.stacked&&"100%"===i.chart.stackType&&(i=s.stacked100(i)),null!==(u=i.plotOptions)&&void 0!==u&&null!==(g=u.bar)&&void 0!==g&&g.isDumbbell&&(i=s.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},e||(i.xaxis.convertedCatToNumeric=!1),(null!==(p=(i=this.checkForCatToNumericXAxis(this.chartType,m,i)).chart.sparkline)&&void 0!==p&&p.enabled||null!==(f=window.Apex.chart)&&void 0!==f&&null!==(x=f.sparkline)&&void 0!==x&&x.enabled)&&(m=s.sparkline(m)),n=v.extend(r,m)}var y=v.extend(n,window.Apex);return r=v.extend(y,i),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var a,s,r=new Ni(i),n=("bar"===t||"boxPlot"===t)&&(null===(a=i.plotOptions)||void 0===a||null===(s=a.bar)||void 0===s?void 0:s.horizontal),o="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,l="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,h=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return n||o||!l||"between"===h||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new Oi;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=v.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[v.extend(i.yAxis,t.yaxis)]:t.yaxis=v.extendArray(t.yaxis,i.yAxis);var a=!1;t.yaxis.forEach((function(t){t.logarithmic&&(a=!0)}));var s=t.series;return e&&!s&&(s=e.config.series),a&&s.length!==t.yaxis.length&&s.length&&(t.yaxis=s.map((function(e,a){if(e.name||(s[a].name="series-".concat(a+1)),t.yaxis[a])return t.yaxis[a].seriesName=s[a].name,t.yaxis[a];var r=v.extend(i.yAxis,t.yaxis[0]);return r.show=!1,r}))),a&&s.length>1&&s.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.yaxis=v.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.xaxis=v.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new Oi;return t.annotations.points=v.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),Bi=function(){function t(){i(this,t)}return s(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:t.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=v.extend({},t),e.initialSeries=v.clone(t.series),e.lastXAxis=v.clone(e.initialConfig.xaxis),e.lastYAxis=v.clone(e.initialConfig.yaxis),e}}]),t}(),Gi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(){var t=new Wi(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new Bi).init(t)}}}]),t}(),ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return s(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,a=parseInt(e.globals.gridWidth,10),s=parseInt(e.globals.gridHeight,10),r=a>s?a:s,n=t.image,o=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=r+1,l=r):(o=t.width,l=t.height);var h=document.createElementNS(e.globals.SVGNS,"pattern");Mi.setAttrs(h,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var c=document.createElementNS(e.globals.SVGNS,"image");h.appendChild(c),c.setAttributeNS(window.SVG.xlink,"href",n),Mi.setAttrs(c,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),c.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(h)}},{key:"getSeriesIndex",value:function(t){var e=this.w,i=e.config.chart.type;return("bar"===i||"rangeBar"===i)&&e.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var i,a=this.w,s=null,n=null,o=r(t);try{for(o.s();!(i=o.n()).done;){var l=i.value;l>=e.threshold?(null===s||l>s)&&(s=l):(null===n||l-1?x=v.getOpacityFromRGBA(c):m=v.hexToRgba(v.rgb2hex(c),x),t.opacity&&(x=t.opacity),"pattern"===p&&(n=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:n,fillColor:c,fillOpacity:x,defaultColor:m})),b){var y=f(l.fill.gradient.colorStops)||[],w=l.fill.gradient.type;h&&(y[this.seriesIndex]=this.computeColorStops(s.globals.series[this.seriesIndex],l.plotOptions.line.colors),w="vertical"),o=this.handleGradientFill({type:w,fillConfig:t.fillConfig,fillColor:c,fillOpacity:x,colorStops:y,i:this.seriesIndex})}if("image"===p){var k=l.fill.image.src,A=t.patternID?t.patternID:"",C="pattern".concat(s.globals.cuid).concat(t.seriesNumber+1).concat(A);-1===this.patternIDs.indexOf(C)&&(this.clippedImgArea({opacity:x,image:Array.isArray(k)?t.seriesNumber-1&&(p=v.getOpacityFromRGBA(g));var f=void 0===o.gradient.opacityTo?a:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[n]:o.gradient.opacityTo;if(void 0===o.gradient.gradientToColors||0===o.gradient.gradientToColors.length)d="dark"===o.gradient.shade?c.shadeColor(-1*parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i):c.shadeColor(parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i);else if(o.gradient.gradientToColors[l.seriesNumber]){var x=o.gradient.gradientToColors[l.seriesNumber];d=x,x.indexOf("rgba")>-1&&(f=v.getOpacityFromRGBA(x))}else d=i;if(o.gradient.gradientFrom&&(g=o.gradient.gradientFrom),o.gradient.gradientTo&&(d=o.gradient.gradientTo),o.gradient.inverseColors){var b=g;g=d,d=b}return g.indexOf("rgb")>-1&&(g=v.rgb2hex(g)),d.indexOf("rgb")>-1&&(d=v.rgb2hex(d)),h.drawGradient(e,g,d,p,f,l.size,o.gradient.stops,r,n)}}]),t}(),Vi=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],r=this.w,n=e,o=t,l=null,h=new Mi(this.ctx),c=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(o.x))for(var d=0;d0:r.config.markers.size>0)||s||c){p||(f+=" w".concat(v.randomId()));var x=this.getMarkerConfig({cssClass:f,seriesIndex:e,dataPointIndex:g});if(r.config.series[n].data[g]&&(r.config.series[n].data[g].fillColor&&(x.pointFillColor=r.config.series[n].data[g].fillColor),r.config.series[n].data[g].strokeColor&&(x.pointStrokeColor=r.config.series[n].data[g].strokeColor)),void 0!==a&&(x.pSize=a),(o.x[d]<-r.globals.markers.largestSize||o.x[d]>r.globals.gridWidth+r.globals.markers.largestSize||o.y[d]<-r.globals.markers.largestSize||o.y[d]>r.globals.gridHeight+r.globals.markers.largestSize)&&(x.pSize=0),!p)(r.globals.markers.size[e]>0||s||c)&&!l&&(l=h.group({class:s||c?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),(u=h.drawMarker(o.x[d],o.y[d],x)).attr("rel",g),u.attr("j",g),u.attr("index",e),u.node.setAttribute("default-marker-size",x.pSize),new Li(this.ctx).setSelectionFilter(u,e,g),this.addEvents(u),l&&l.add(u)}else void 0===r.globals.pointsArray[e]&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([o.x[d],o.y[d]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,i=t.seriesIndex,a=t.dataPointIndex,s=void 0===a?null:a,r=t.radius,n=void 0===r?null:r,o=t.size,l=void 0===o?null:o,h=t.strokeWidth,c=void 0===h?null:h,d=this.w,u=this.getMarkerStyle(i),g=null===l?d.globals.markers.size[i]:l,p=d.config.markers;return null!==s&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===i&&t.dataPointIndex===s&&(u.pointStrokeColor=t.strokeColor,u.pointFillColor=t.fillColor,g=t.size,u.pointShape=t.shape)})),{pSize:null===n?g:n,pRadius:null!==n?n:p.radius,pointStrokeWidth:null!==c?c:Array.isArray(p.strokeWidth)?p.strokeWidth[i]:p.strokeWidth,pointStrokeColor:u.pointStrokeColor,pointFillColor:u.pointFillColor,shape:u.pointShape||(Array.isArray(p.shape)?p.shape[i]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[i]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[i]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[i]:p.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(t){var e=this.w,i=new Mi(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,a=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[t]:a,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),Ui=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return s(t,[{key:"draw",value:function(t,e,i){var a=this.w,s=new Mi(this.ctx),r=i.realIndex,n=i.pointsPos,o=i.zRatio,l=i.elParent,h=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(h.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(n.x))for(var c=0;cp.maxBubbleRadius&&(g=p.maxBubbleRadius)}var f=n.x[c],x=n.y[c];if(g=g||0,null!==x&&void 0!==a.globals.series[r][d]||(u=!1),u){var b=this.drawPoint(f,x,g,r,d,e);h.add(b)}l.add(h)}}},{key:"drawPoint",value:function(t,e,i,a,s,r){var n=this.w,o=a,l=new y(this.ctx),h=new Li(this.ctx),c=new ji(this.ctx),d=new Vi(this.ctx),u=new Mi(this.ctx),g=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:s,radius:"bubble"===n.config.chart.type||n.globals.comboCharts&&n.config.series[a]&&"bubble"===n.config.series[a].type?i:null}),p=c.fillPath({seriesNumber:a,dataPointIndex:s,color:g.pointFillColor,patternUnits:"objectBoundingBox",value:n.globals.series[a][r]}),f=u.drawMarker(t,e,g);if(n.config.series[o].data[s]&&n.config.series[o].data[s].fillColor&&(p=n.config.series[o].data[s].fillColor),f.attr({fill:p}),n.config.chart.dropShadow.enabled){var x=n.config.chart.dropShadow;h.dropShadow(f,x,a)}if(!this.initialAnim||n.globals.dataChanged||n.globals.resized)n.globals.animationEnded=!0;else{var b=n.config.chart.animations.speed;l.animateMarker(f,b,n.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(f)}),100)}))}return f.attr({rel:s,j:s,index:a,"default-marker-size":g.pSize}),h.setSelectionFilter(f,a,s),d.addEvents(f),f.node.classList.add("apexcharts-marker"),f}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}]),t}(),qi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"dataLabelsCorrection",value:function(t,e,i,a,s,r,n){var o=this.w,l=!1,h=new Mi(this.ctx).getTextRects(i,n),c=h.width,d=h.height;e<0&&(e=0),e>o.globals.gridHeight+d&&(e=o.globals.gridHeight+d/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:t,y:e,width:c,height:d});var u=o.globals.dataLabelsRects[a].length-2,g=void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(void 0!==o.globals.dataLabelsRects[a][u]){var p=o.globals.dataLabelsRects[a][g];(t>p.x+p.width||e>p.y+p.height||e+de.globals.gridWidth+b.textRects.width+30)&&(o="");var m=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(m=e.globals.dataLabels.style.colors[n]),"function"==typeof m&&(m=m({series:e.globals.series,seriesIndex:r,dataPointIndex:n,w:e})),u&&(m=u);var v=d.offsetX,y=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(v=0,y=0),e.globals.isSlopeChart&&(0!==n&&(v=-2*d.offsetX+5),0!==n&&n!==e.config.series[r].data.length-1&&(v=0)),b.drawnextLabel){if((x=i.drawText({width:100,height:parseInt(d.style.fontSize,10),x:a+v,y:s+y,foreColor:m,textAnchor:l||d.textAnchor,text:o,fontSize:h||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"})).attr({class:f||"apexcharts-datalabel",cx:a,cy:s}),d.dropShadow.enabled){var w=d.dropShadow;new Li(this.ctx).dropShadow(x,w)}c.add(x),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(n)}return x}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,a=i.config.dataLabels.background,s=a.padding,r=a.padding/2,n=e.width,o=e.height,l=new Mi(this.ctx).drawRect(e.x-s,e.y-r/2,n+2*s,o+r,a.borderRadius,"transparent"!==i.config.chart.background&&i.config.chart.background?i.config.chart.background:"#fff",a.opacity,a.borderWidth,a.borderColor);a.dropShadow.enabled&&new Li(this.ctx).dropShadow(l,a.dropShadow);return l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,s=v.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,t&&(e&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i-1&&(t[i].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,i=this.getSeriesByName(t),a=parseInt(null==i?void 0:i.getAttribute("data:realIndex"),10),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),r=null,n=null,o=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){r=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),n=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']"));var l=e.globals.seriesYAxisReverseMap[a];o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']"));else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var h=0;h=t.from&&(r0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1)for(var s=i.config.series.map((function(t,a){return t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(a)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(i.config.series[a].type)>-1)?a:-1})),r="asc"===t?0:s.length-1;"asc"===t?r=0;"asc"===t?r++:r--)if(-1!==s[r]){a=s[r];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,a){for(var s=e[i].childNodes,r={type:a,paths:[],realIndex:e[i].getAttribute("data:realIndex")},n=0;n0)for(var a=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),a=[],s=function(t){var e=function(e){return i[t].getAttribute(e)},s={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};a.push({rect:s,color:i[t].getAttribute("color")})},r=0;r0?t:[]}));return t}}]),t}(),$i=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,a=this.w.globals,s="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,r=0;r=5?this.twoDSeries.push(v.parseNumber(t[e].data[r][4])):this.twoDSeries.push(v.parseNumber(t[e].data[r][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var n=new Date(t[e].data[r][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(t[e].data[r][0]);for(var o=0;o-1&&(r=this.activeSeriesIndex);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,r=new zi(i),n=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isRangeBar="rangeBar"===a.chart.type&&s.isBarHorizontal,s.hasXaxisGroups="category"===a.xaxis.type&&a.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=a.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?s.seriesNames.push(t.name):s.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var o=[],l=f(new Set(a.series.map((function(t){return t.group}))));a.series.forEach((function(t,e){var i=l.indexOf(t.group);o[i]||(o[i]=[]),o[i].push(s.seriesNames[e])})),s.seriesGroups=o;for(var h=function(){for(var t=0;t0&&(this.twoDSeriesX=n,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var d=t[c].data.map((function(t){return v.parseNumber(t)}));s.series.push(d)}s.seriesZ.push(this.threeDSeries),void 0!==t[c].color?s.seriesColors.push(t[c].color):s.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var a=0;a0)i.labels=e.xaxis.categories;else if(e.labels.length>0)i.labels=e.labels.slice();else if(this.fallbackToCategory){if(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric)new Ni(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t)}else this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,a=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var s=i.series.map((function(t,e){return t.data.filter((function(t,e,i){return i.findIndex((function(e){return e.x===t.x}))===e}))})),r=s.reduce((function(t,e,i,a){return a[t].length>e.length?t:i}),0),n=0;n0&&s==i.length&&e.push(a)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}]),t}(),Ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),a=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",a*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"getSvgString",value:function(){var t=this;return new Promise((function(e){var i=t.w,a=i.config.chart.toolbar.export.width,s=i.config.chart.toolbar.export.scale||a/i.globals.svgWidth;s||(s=1);var r=t.w.globals.dom.Paper.svg(),n=t.w.globals.dom.Paper.node.cloneNode(!0);1!==s&&t.scaleSvgNode(n,s),t.convertImagesToBase64(n).then((function(){r=(new XMLSerializer).serializeToString(n),e(r.replace(/ /g," "))}))}))}},{key:"convertImagesToBase64",value:function(t){var e=this,i=t.getElementsByTagName("image"),a=Array.from(i).map((function(t){var i=t.getAttributeNS("http://www.w3.org/1999/xlink","href");return i&&!i.startsWith("data:")?e.getBase64FromUrl(i).then((function(e){t.setAttributeNS("http://www.w3.org/1999/xlink","href",e)})).catch((function(t){console.error("Error converting image to base64:",t)})):Promise.resolve()}));return Promise.all(a)}},{key:"getBase64FromUrl",value:function(t){return new Promise((function(e,i){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var t=document.createElement("canvas");t.width=a.width,t.height=a.height,t.getContext("2d").drawImage(a,0,0),e(t.toDataURL())},a.onerror=i,a.src=t}))}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var t=this;return new Promise((function(e){t.cleanup(),t.getSvgString().then((function(t){var i=new Blob([t],{type:"image/svg+xml;charset=utf-8"});e(URL.createObjectURL(i))}))}))}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var a=e.w,s=t?t.scale||t.width/a.globals.svgWidth:1;e.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*s,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var n="transparent"!==a.config.chart.background&&a.config.chart.background?a.config.chart.background:"#fff",o=r.getContext("2d");o.fillStyle=n,o.fillRect(0,0,r.width*s,r.height*s),e.getSvgString().then((function(t){var e="data:image/svg+xml,"+encodeURIComponent(t),a=new Image;a.crossOrigin="anonymous",a.onload=function(){if(o.drawImage(a,0,0),r.msToBlob){var t=r.msToBlob();i({blob:t})}else{var e=r.toDataURL("image/png");i({imgURI:e})}},a.src=e}))}))}},{key:"exportToSVG",value:function(){var t=this;this.svgUrl().then((function(e){t.triggerDownload(e,t.w.config.chart.toolbar.export.svg.filename,".svg")}))}},{key:"exportToPng",value:function(){var t=this,e=this.w.config.chart.toolbar.export.scale,i=this.w.config.chart.toolbar.export.width,a=e?{scale:e}:i?{width:i}:void 0;this.dataURI(a).then((function(e){var i=e.imgURI,a=e.blob;a?navigator.msSaveOrOpenBlob(a,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,a=t.fileName,s=t.columnDelimiter,r=void 0===s?",":s,n=t.lineDelimiter,o=void 0===n?"\n":n,l=this.w;i||(i=l.config.series);var h=[],c=[],d="",u=l.globals.series.map((function(t,e){return-1===l.globals.collapsedSeriesIndices.indexOf(e)?t:[]})),g=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.categoryFormatter?l.config.chart.toolbar.export.csv.categoryFormatter(t):"datetime"===l.config.xaxis.type&&String(t).length>=10?new Date(t).toDateString():v.isNumber(t)?t:t.split(r).join("")},p=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},x=Math.max.apply(Math,f(i.map((function(t){return t.data?t.data.length:0})))),b=new $i(this.ctx),m=new Ri(this.ctx),y=function(t){var i="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var a=l.globals.yLabelFormatters[0],s=new Zi(e.ctx).getActiveConfigSeriesIndex();i=a(l.globals.labels[t],{seriesIndex:s,dataPointIndex:t,w:l})}else i=m.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?i=l.config.xaxis.categories[t]:l.config.labels.length&&(i=l.config.labels[t]))}else i=l.config.labels[t];return null===i?"nullvalue":(Array.isArray(i)&&(i=i.join(" ")),v.isNumber(i)?i:i.split(r).join(""))},w=function(t,e){if(h.length&&0===e&&c.push(h.join(r)),t.data){t.data=t.data.length&&t.data||f(Array(x)).map((function(){return""}));for(var a=0;a0&&!s.globals.isBarHorizontal&&(this.xaxisLabels=s.globals.timescaleLabels.slice()),s.config.xaxis.overwriteCategories&&(this.xaxisLabels=s.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===s.config.xaxis.position?this.offY=0:this.offY=s.globals.gridHeight,this.offY=this.offY+s.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.xaxisBorderWidth=s.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=s.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=s.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=s.config.xaxis.axisBorder.height,this.yaxis=s.config.yaxis[0]}return s(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new Mi(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});i.add(a);for(var s=[],r=0;r6&&void 0!==arguments[6]?arguments[6]:{},h=[],c=[],d=this.w,u=l.xaxisFontSize||this.xaxisFontSize,g=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,f=l.fontWeight||d.config.xaxis.labels.style.fontWeight,x=l.cssClass||d.config.xaxis.labels.style.cssClass,b=d.globals.padHorizontal,m=a.length,v="category"===d.config.xaxis.type?d.globals.dataPoints:m;if(0===v&&m>v&&(v=m),s){var y=v>1?v-1:v;n=d.globals.gridWidth/Math.min(y,m-1),b=b+r(0,n)/2+d.config.xaxis.labels.offsetX}else n=d.globals.gridWidth/v,b=b+r(0,n)+d.config.xaxis.labels.offsetX;for(var w=function(s){var l=b-r(s,n)/2+d.config.xaxis.labels.offsetX;0===s&&1===m&&n/2===b&&1===v&&(l=d.globals.gridWidth/2);var y=o.axesUtils.getLabel(a,d.globals.timescaleLabels,l,s,h,u,t),w=28;d.globals.rotateXLabels&&t&&(w=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(w+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(u)+(d.globals.xAxisLabelsHeight-d.globals.xAxisGroupLabelsHeight)+(d.globals.rotateXLabels?10:0)),y=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(s,y,m):o.axesUtils.checkForOverflowingLabels(s,y,m,h,c);if(d.config.xaxis.labels.show){var k=e.drawText({x:y.x,y:o.offY+d.config.xaxis.labels.offsetY+w-("top"===d.config.xaxis.position?d.globals.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:"middle",fontWeight:y.isBold?600:f,fontSize:u,fontFamily:g,foreColor:Array.isArray(p)?t&&d.config.xaxis.convertedCatToNumeric?p[d.globals.minX+s-1]:p[s]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(i.add(k),k.on("click",(function(t){if("function"==typeof d.config.chart.events.xAxisLabelClick){var e=Object.assign({},d,{labelIndex:s});d.config.chart.events.xAxisLabelClick(t,o.ctx,e)}})),t){var A=document.createElementNS(d.globals.SVGNS,"title");A.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,k.node.appendChild(A),""!==y.text&&(h.push(y.text),c.push(y))}}sa.globals.gridWidth)){var r=this.offY+a.config.xaxis.axisTicks.offsetY;if(e=e+r+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(e=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new Mi(this.ctx).drawLine(t+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,s+a.config.xaxis.axisTicks.offsetX,e+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var s=0;s0){var h=s[s.length-1].getBBox(),c=s[0].getBBox();h.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),c.x+c.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var d=0;d0&&(this.xaxisLabels=a.globals.timescaleLabels.slice())}return s(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new Mi(this.ctx);t||(t=i.group({class:"apexcharts-grid"}));var a=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),s=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(s),t.add(a),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new Mi(this.ctx),a=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,f(t.config.stroke.width)):t.config.stroke.width,s=function(t){var i=document.createElementNS(e.SVGNS,"clipPath");return i.setAttribute("id",t),i};e.dom.elGridRectMask=s("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=s("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=s("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=s("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=s("nonForecastMask".concat(e.cuid));var r=0,n=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),n=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=i.drawRect(-a/2-r-2,-a/2-2,e.gridWidth+a+n+r+4,e.gridHeight+a+4,0,"#fff");var o=t.globals.markers.largestSize;e.dom.elGridRectMarker=i.drawRect(-o,-o,e.gridWidth+2*o,e.gridHeight+2*o,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,a=t.y1,s=t.x2,r=t.y2,n=t.xCount,o=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===n-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:i,y1:a,x2:s,y2:r,xCount:n,parent:o});var h=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var c=l.globals.groups;if(c){for(var d=0,u=0;d0&&"datetime"!==t.config.xaxis.type&&(s=e.yAxisScale[a].result.length-1);this._drawXYLines({xCount:s,tickAmount:r})}else s=r,r=e.xTickAmount,this._drawInvertedXYLines({xCount:s,tickAmount:r});return this.drawGridBands(s,r),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/s}}},{key:"drawGridBands",value:function(t,e){var i,a,s=this,r=this.w;if((null===(i=r.config.grid.row.colors)||void 0===i?void 0:i.length)>0&&function(t,i,a,n,o,l){for(var h=0,c=0;h=r.config.grid[t].colors.length&&(c=0),s._drawGridBandRect({c:c,x1:a,y1:n,x2:o,y2:l,type:t}),n+=r.globals.gridHeight/e}("row",e,0,0,r.globals.gridWidth,r.globals.gridHeight/e),(null===(a=r.config.grid.column.colors)||void 0===a?void 0:a.length)>0){var n=r.globals.isBarHorizontal||"on"!==r.config.xaxis.tickPlacement||"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric?t:t-1;r.globals.isXNumeric&&(n=r.globals.xAxisScale.result.length-1);for(var o=r.globals.padHorizontal,l=r.globals.padHorizontal+r.globals.gridWidth/n,h=r.globals.gridHeight,c=0,d=0;c=r.config.grid.column.colors.length&&(d=0),"datetime"===r.config.xaxis.type)o=this.xaxisLabels[c].position,l=((null===(u=this.xaxisLabels[c+1])||void 0===u?void 0:u.position)||r.globals.gridWidth)-this.xaxisLabels[c].position;this._drawGridBandRect({c:d,x1:o,y1:0,x2:l,y2:h,type:"column"}),o+=r.globals.gridWidth/n}}}}]),t}(),ta=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"niceScale",value:function(t,e){var i,a,s,r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=1e-11,l=this.w,h=l.globals;h.isBarHorizontal?(i=l.config.xaxis,a=Math.max((h.svgWidth-100)/25,2)):(i=l.config.yaxis[n],a=Math.max((h.svgHeight-100)/15,2)),v.isNumber(a)||(a=10),s=void 0!==i.min&&null!==i.min,r=void 0!==i.max&&null!==i.min;var c=void 0!==i.stepSize&&null!==i.stepSize,d=void 0!==i.tickAmount&&null!==i.tickAmount,u=d?i.tickAmount:h.niceScaleDefaultTicks[Math.min(Math.round(a/2),h.niceScaleDefaultTicks.length-1)];if(h.isMultipleYAxis&&!d&&h.multiAxisTickAmount>0&&(u=h.multiAxisTickAmount,d=!0),u="dataPoints"===u?h.dataPoints-1:Math.abs(Math.round(u)),(t===Number.MIN_VALUE&&0===e||!v.isNumber(t)&&!v.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=v.isNumber(i.min)?i.min:0,e=v.isNumber(i.max)?i.max:t+u,h.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var g=e;e=t,t=g}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var p=[];u<1&&(u=1);var f=u,x=Math.abs(e-t);!s&&t>0&&t/x<.15&&(t=0,s=!0),!r&&e<0&&-e/x<.15&&(e=0,r=!0);var b=(x=Math.abs(e-t))/f,m=b,y=Math.floor(Math.log10(m)),w=Math.pow(10,y),k=Math.ceil(m/w);if(b=m=(k=h.niceScaleAllowedMagMsd[0===h.yValueDecimal?0:1][k])*w,h.isBarHorizontal&&i.stepSize&&"datetime"!==i.type?(b=i.stepSize,c=!0):c&&(b=i.stepSize),c&&i.forceNiceScale){var A=Math.floor(Math.log10(b));b*=Math.pow(10,y-A)}if(s&&r){var C=x/f;if(d)if(c)if(0!=v.mod(x,b)){var S=v.getGCD(b,C);b=C/S<10?S:C}else 0==v.mod(b,C)?b=C:(C=b,d=!1);else b=C;else if(c)0==v.mod(x,b)?C=b:b=C;else if(0==v.mod(x,b))C=b;else{C=x/(f=Math.ceil(x/b));var L=v.getGCD(x,b);x/La&&(t=e-b*u,t+=b*Math.floor((M-t)/b))}else if(s)if(d)e=t+b*f;else{var P=e;e=b*Math.ceil(e/b),Math.abs(e-t)/v.getGCD(x,b)>a&&(e=t+b*u,e+=b*Math.ceil((P-e)/b))}}else if(h.isMultipleYAxis&&d){var I=b*Math.floor(t/b),T=I+b*f;T0&&t16&&v.getPrimeFactors(f).length<2&&f++,!d&&i.forceNiceScale&&0===h.yValueDecimal&&f>x&&(f=x,b=Math.round(x/f)),f>a&&(!d&&!c||i.forceNiceScale)){var z=v.getPrimeFactors(f),X=z.length-1,R=f;t:for(var E=0;EN);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,r=Math.abs(e-t),n=[];if(t===e)return{result:n=[t],niceMin:n[0],niceMax:n[n.length-1]};"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,r))&&(i=this.w.globals.dataPoints-1),s||(s=r/i),s=Math.round(10*(s+Number.EPSILON))/10,i===Number.MAX_VALUE&&(i=5,s=1);for(var o=t;i>=0;)n.push(o),o=v.preciseAddition(o,s),i-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,i){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));for(var a=[],s=Math.ceil(Math.log(e)/Math.log(i)+1),r=Math.floor(Math.log(t)/Math.log(i));r5?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase):this.logarithmicScale(e,i,r.logBase)):i!==-Number.MAX_VALUE&&v.isNumber(i)&&e!==Number.MAX_VALUE&&v.isNumber(e)?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.niceScale(e,i,t)):a.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var i=this.w,a=i.globals,s=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&v.isNumber(e)){var r=a.xTickAmount+1;s<10&&s>1&&(r=s),a.xAxisScale=this.linearScale(t,e,r,0,i.config.xaxis.stepSize)}else a.xAxisScale=this.linearScale(0,10,10);return a.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,i=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var a=i.seriesYAxisMap,s=i.minYArr,r=i.maxYArr;i.allSeriesCollapsed=!0,i.barGroups=[],a.forEach((function(a,n){var o=[];a.forEach((function(t){var i=e.series[t].group;o.indexOf(i)<0&&o.push(i)})),a.length>0?function(){var l,h,c=Number.MAX_VALUE,d=-Number.MAX_VALUE,u=c,g=d;if(e.chart.stacked)!function(){var t=new Array(i.dataPoints).fill(0),s=[],r=[],p=[];o.forEach((function(){s.push(t.map((function(){return Number.MIN_VALUE}))),r.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var f=function(t){!l&&e.series[a[t]].type&&(l=e.series[a[t]].type);var c=a[t];h=e.series[c].group?e.series[c].group:"axis-".concat(n),!(i.collapsedSeriesIndices.indexOf(c)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(c)<0)||(i.allSeriesCollapsed=!1,o.forEach((function(t,a){if(e.series[c].group===t)for(var n=0;n=0?r[a][n]+=o:p[a][n]+=o,s[a][n]+=o,u=Math.min(u,o),g=Math.max(g,o)}}))),"bar"!==l&&"column"!==l||i.barGroups.push(h)},x=0;x1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w.config,r=this.w.globals,n=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=t+1);var l=r.series,h=l,c=l;"candlestick"===s.chart.type?(h=r.seriesCandleL,c=r.seriesCandleH):"boxPlot"===s.chart.type?(h=r.seriesCandleO,c=r.seriesCandleC):r.isRangeData&&(h=r.seriesRangeStart,c=r.seriesRangeEnd);var d=!1;if(r.seriesX.length>=a){var u,g=null===(u=r.brushSource)||void 0===u?void 0:u.w.config.chart.brush;(s.chart.zoom.enabled&&s.chart.zoom.autoScaleYaxis||null!=g&&g.enabled&&null!=g&&g.autoScaleYaxis)&&(d=!0)}for(var p=t;px&&r.seriesX[p][b]>s.xaxis.max;b--);}for(var m=x;m<=b&&mh[p][m]&&h[p][m]<0&&(o=h[p][m])}else r.hasNullValues=!0}"bar"!==f&&"column"!==f||(o<0&&n<0&&(n=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,e=Math.min(e,0)))}return"rangeBar"===s.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&(o=e),"bar"===s.chart.type&&(o<0&&n<0&&(n=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:n,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i,a=Number.MAX_VALUE;if(t.isMultipleYAxis){a=Number.MAX_VALUE;for(var s=0;st.dataPoints&&0!==t.dataPoints&&(a=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(a=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var s=t.maxX-t.minX;s<30&&(a=s-1)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var r=[],n=t.minX-1;n0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,a-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var s=e-a[i-1];s>0&&(t.minXDiff=Math.min(s,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var i=e.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map((function(t){return t}))]);var a={},s={};i.forEach((function(i){a[i]=[],s[i]=[],t.w.config.series.map((function(t,a){return i.indexOf(e.seriesNames[a])>-1?a:null})).filter((function(t){return null!==t})).forEach((function(r){for(var n=0;n0?a[i][n]+=parseFloat(e.series[r][n])+1e-4:s[i][n]+=parseFloat(e.series[r][n]))}}))})),Object.entries(a).forEach((function(t){var i=p(t,1)[0];a[i].forEach((function(t,r){e.maxY=Math.max(e.maxY,a[i][r]),e.minY=Math.min(e.minY,s[i][r])}))}))}}}]),t}(),ia=function(){function t(e,a){i(this,t),this.ctx=e,this.elgrid=a,this.w=e.w;var s=this.w;this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.axisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xAxisoffX="bottom"===s.config.xaxis.position?s.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Ri(e)}return s(t,[{key:"drawYaxis",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.yaxis[t].labels.style,s=a.fontSize,r=a.fontFamily,n=a.fontWeight,o=i.group({class:"apexcharts-yaxis",rel:t,transform:"translate(".concat(e.globals.translateYAxisX[t],", 0)")});if(this.axesUtils.isYAxisHidden(t))return o;var l=i.group({class:"apexcharts-yaxis-texts-g"});o.add(l);var h=e.globals.yAxisScale[t].result.length-1,c=e.globals.gridHeight/h,d=e.globals.yLabelFormatters[t],u=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){var g=e.globals.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?g=0:"heatmap"===e.config.chart.type&&(g-=c/2),g+=parseInt(s,10)/3;for(var p=h;p>=0;p--){var f=d(u[p],p,e),x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(x*=-1);var b=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(a.colors,t),y=Array.isArray(m)?m[p]:m,w=v.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),k=i.drawText({x:x,y:g,text:w.includes(f)&&!e.config.yaxis[t].labels.showDuplicates?"":f,textAnchor:b,fontSize:s,fontFamily:r,fontWeight:n,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(a.cssClass)});l.add(k),this.addTooltip(k,f),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(i,k,firstLabel,e.config.yaxis[t].labels.rotate),g+=c}}return this.addYAxisTitle(i,o,t),this.addAxisBorder(i,o,t,h,c),o}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var i=document.createElementNS(this.w.globals.SVGNS,"title");i.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(i)}},{key:"rotateLabel",value:function(t,e,i,a){var s=t.rotateAroundCenter(i.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(a," ").concat(s.x," ").concat(r.y,")"))}},{key:"addYAxisTitle",value:function(t,e,i){var a=this.w;if(void 0!==a.config.yaxis[i].title.text){var s=t.group({class:"apexcharts-yaxis-title"}),r=a.config.yaxis[i].opposite?a.globals.translateYAxisX[i]:0,n=t.drawText({x:r,y:a.globals.gridHeight/2+a.globals.translateY+a.config.yaxis[i].title.offsetY,text:a.config.yaxis[i].title.text,textAnchor:"end",foreColor:a.config.yaxis[i].title.style.color,fontSize:a.config.yaxis[i].title.style.fontSize,fontWeight:a.config.yaxis[i].title.style.fontWeight,fontFamily:a.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(a.config.yaxis[i].title.style.cssClass)});s.add(n),e.add(s)}}},{key:"addAxisBorder",value:function(t,e,i,a,s){var r=this.w,n=r.config.yaxis[i].axisBorder,o=31+n.offsetX;if(r.config.yaxis[i].opposite&&(o=-31-n.offsetX),n.show){var l=t.drawLine(o,r.globals.translateY+n.offsetY-2,o,r.globals.gridHeight+r.globals.translateY+n.offsetY+2,n.color,0,n.width);e.add(l)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,a,n,r.config.yaxis[i].axisTicks,i,s,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});a.add(s);var r=e.globals.yAxisScale[t].result.length-1,n=e.globals.gridWidth/r+.1,o=n+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,h=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),c=e.globals.timescaleLabels;if(c.length>0&&(this.xaxisLabels=c.slice(),r=(h=c.slice()).length),e.config.xaxis.labels.show)for(var d=c.length?0:r;c.length?d=0;c.length?d++:d--){var u=l(h[d],d,e),g=e.globals.gridWidth+e.globals.padHorizontal-(o-n+e.config.xaxis.labels.offsetX);if(c.length){var p=this.axesUtils.getLabel(h,c,g,d,this.drawnLabels,this.xaxisFontSize);g=p.x,u=p.text,this.drawnLabels.push(p.text),0===d&&e.globals.skipFirstTimelinelabel&&(u=""),d===h.length-1&&e.globals.skipLastTimelinelabel&&(u="")}var f=i.drawText({x:g,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:u,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});s.add(f),f.tspan(u),this.addTooltip(f,u),o+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.xaxis.axisBorder;if(a.show){var s=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(s-=15);var r=i.drawLine(e.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new Mi(this.ctx);if(void 0!==e.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});a.add(s),t.add(a)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),r=s?s.getBoundingClientRect():{width:0,height:0},n=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),o=n?n.getBoundingClientRect():{width:0,height:0};if(n){var l=this.xPaddingForYAxisTitle(t,r,o,e);n.setAttribute("x",l.xPos-(e?10:0));var h=a.rotateAroundCenter(n);n.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(h.x," ").concat(h.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var s=this.w,r=0,n=10;return void 0===s.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(a?r=e.width+s.config.yaxis[t].title.offsetX+i.width/2+n/2:(r=-1*e.width+s.config.yaxis[t].title.offsetX+n/2+i.width/2,s.globals.isBarHorizontal&&(n=25,r=-1*e.width-s.config.yaxis[t].title.offsetX-n)),{xPos:r,padd:n})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,a=0,s=0,r=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach((function(o,l){var h=i.globals.ignoreYAxisIndexes.includes(l)||!o.show||o.floating||0===t[l].width,c=t[l].width+e[l].width;o.opposite?i.globals.isBarHorizontal?(s=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=s-o.labels.offsetX):(s=i.globals.gridWidth+i.globals.translateX+n,h||(n+=c+20),i.globals.translateYAxisX[l]=s-o.labels.offsetX+20):(a=i.globals.translateX-r,h||(r+=c+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;v.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,i){var a=t.config.yaxis[i];if(a&&!a.floating&&void 0!==a.labels.align){var s=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=v.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"))),n=s.getBoundingClientRect();r.forEach((function(t){t.setAttribute("text-anchor",a.labels.align)})),"left"!==a.labels.align||a.opposite?"center"===a.labels.align?s.setAttribute("transform","translate(".concat(n.width/2*(a.opposite?1:-1),", 0)")):"right"===a.labels.align&&a.opposite&&s.setAttribute("transform","translate(".concat(n.width,", 0)")):s.setAttribute("transform","translate(-".concat(n.width,", 0)"))}}))}}]),t}(),aa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.documentEvent=v.bind(this.documentEvent,this)}return s(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var a=i.globals.events[t].indexOf(e);-1!==a&&i.globals.events[t].splice(a,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var a=i.globals.events[t],s=a.length,r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=v.extend(Hi,i);this.w.globals.locale=a.options}}]),t}(),ra=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawAxis",value:function(t,e){var i,a,s=this,r=this.w.globals,n=this.w.config,o=new Qi(this.ctx,e),l=new ia(this.ctx,e);r.axisCharts&&"radar"!==t&&(r.isBarHorizontal?(a=l.drawYaxisInversed(0),i=o.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(a)):(i=o.drawXaxis(),r.dom.elGraphical.add(i),n.yaxis.map((function(t,e){if(-1===r.ignoreYAxisIndexes.indexOf(e)&&(a=l.drawYaxis(e),r.dom.Paper.add(a),"back"===s.w.config.grid.position)){var i=r.dom.Paper.children()[1];i.remove(),r.dom.Paper.add(i)}}))))}}]),t}(),na=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Li(this.ctx),a=t.config.xaxis.crosshairs.fill.gradient,s=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,n=a.colorFrom,o=a.colorTo,l=a.opacityFrom,h=a.opacityTo,c=a.stops,d=s.enabled,u=s.left,g=s.top,p=s.blur,f=s.color,x=s.opacity,b=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(b=e.drawGradient("vertical",n,o,l,h,null,c,null));var m=e.drawRect();1===t.config.xaxis.crosshairs.width&&(m=e.drawLine());var y=t.globals.gridHeight;(!v.isNumber(y)||y<0)&&(y=0);var w=t.config.xaxis.crosshairs.width;(!v.isNumber(w)||w<0)&&(w=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:w,height:y,fill:b,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),d&&(m=i.dropShadow(m,{left:u,top:g,blur:p,color:f,opacity:x})),t.globals.dom.elGraphical.add(m)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var s=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(s)}var r=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(r)}}]),t}(),oa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,a=i.config;if(0!==a.responsive.length){var s=a.responsive.slice();s.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var r=new Wi({}),n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=s[0].breakpoint,n=window.innerWidth>0?window.innerWidth:screen.width;if(n>a){var o=v.clone(i.globals.initialConfig);o.series=v.clone(i.config.series);var l=Pi.extendArrayProps(r,o,i);t=v.extend(l,t),t=v.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var h=0;h0&&"function"==typeof t[0]?(this.isColorFn=!0,i.config.series.map((function(a,s){var r=t[s]||t[0];return"function"==typeof r?r({value:i.globals.axisCharts?i.globals.series[s][0]||0:i.globals.series[s],seriesIndex:s,dataPointIndex:s,w:e.w}):r}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,i){t&&(e[i]=t)}))}},{key:"getMonochromeColors",value:function(t,e,i){var a=t.color,s=t.shadeIntensity,r=t.shadeTo,n=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,o=1/(n/s),l=0;return Array.from({length:n},(function(){var t="dark"===r?i.shadeColor(-1*l,a):i.shadeColor(l,a);return l+=o,t}))}},{key:"applyColorTypes",value:function(t,e){var i=this,a=this.w;t.forEach((function(t){a.globals[t].colors=void 0===a.config[t].colors?i.isColorFn?a.config.colors:e:a.config[t].colors.slice(),i.pushExtraColors(a.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=e||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),t.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,i=[];e.config.series.forEach((function(s,r){s.data.forEach((function(s,n){var o;o=e.globals.series[r][n],a=e.config.dataLabels.formatter(o,{ctx:t.dCtx.ctx,seriesIndex:r,dataPointIndex:n,w:e}),i.push(a)}))}));var a=v.getLargestStringFromArr(i),s=new Mi(this.dCtx.ctx),r=e.config.dataLabels.style,n=s.getTextRects(a,parseInt(r.fontSize),r.fontFamily);return{width:1.05*n.width,height:n.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var a=e.map((function(t,e){return Array.isArray(t)?t.length:1})),s=Math.max.apply(Math,f(a));i=e[a.indexOf(s)]}return i}}]),t}(),da=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();t={width:a.width,height:a.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var s=e.globals.xLabelFormatter,r=v.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);e.globals.isBarHorizontal&&(n=r=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var o=new Xi(this.dCtx.ctx),l=r;r=o.xLabelFormat(s,r,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),n=o.xLabelFormat(s,n,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(n=r="1");var h=new Mi(this.dCtx.ctx),c=h.getTextRects(r,e.config.xaxis.labels.style.fontSize),d=c;if(r!==n&&(d=h.getTextRects(n,e.config.xaxis.labels.style.fontSize)),(t={width:c.width>=d.width?c.width:d.width,height:c.height>=d.height?c.height:d.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return h.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};c=u(r),r!==n&&(d=u(n)),t.height=(c.height>d.height?c.height:d.height)/1.5,t.width=c.width>d.width?c.width:d.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var i,a=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,s=e.globals.groups.map((function(t){return t.title})),r=v.getLargestStringFromArr(s),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),o=new Mi(this.dCtx.ctx),l=o.getTextRects(r,a),h=l;return r!==n&&(h=o.getTextRects(n,a)),i={width:l.width>=h.width?l.width:h.width,height:l.height>=h.height?l.height:h.height},e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new Mi(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,i=a.height}return{width:e,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(t){return t.value})),a=i.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Mi(this.dCtx.ctx).getTextRects(a,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,a=i.globals,s=i.config,r=s.xaxis.type,n=t.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,o){s.yaxis.length>1&&function(t){return-1!==a.collapsedSeriesIndices.indexOf(t)}(o)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var o=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+n/1.75-e.dCtx.yAxisWidthRight,h=o.position-n/1.75+e.dCtx.yAxisWidthLeft,c="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>a.svgWidth-a.translateX-c&&(a.skipLastTimelinelabel=!0),h<-(t.show&&!t.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===r?e.dCtx.gridPad.right(null===(a=String(c(e,o)))||void 0===a?void 0:a.length)?t:e}),d),g=u=c(u,o);if(void 0!==u&&0!==u.length||(u=l.niceMax),e.globals.isBarHorizontal){a=0;var p=e.globals.labels.slice();u=v.getLargestStringFromArr(p),u=c(u,{seriesIndex:n,dataPointIndex:-1,w:e}),g=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,p)}var f=new Mi(t.dCtx.ctx),x="rotate(".concat(r.labels.rotate," 0 0)"),b=f.getTextRects(u,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1),m=b;u!==g&&(m=f.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1)),i.push({width:(h>m.width||h>b.width?h:m.width>b.width?m.width:b.width)+a,height:m.height>b.height?m.height:b.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,a){if(e.show&&void 0!==e.title.text){var s=new Mi(t.dCtx.ctx),r="rotate(".concat(e.title.rotate," 0 0)"),n=s.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);i.push({width:n.width,height:n.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,a=0,s=t.globals.yAxisScale.length>1?10:0,r=new Ri(this.dCtx.ctx),n=function(n,o){var l=t.config.yaxis[o].floating,h=0;n.width>0&&!l?(h=n.width+s,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(o)&&(h=h-n.width-s)):h=l||r.isYAxisHidden(o)?0:5,t.config.yaxis[o].opposite?a+=h:i+=h,e+=h};return t.globals.yLabelsCoords.map((function(t,e){n(t,e)})),t.globals.yTitleCoords.map((function(t,e){n(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,e}}]),t}(),ga=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w,i=e.config,a=e.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.series.length)return 0;var s=function(t){return["bar","rangeBar","candlestick","boxPlot"].includes(t)},r=i.chart.type,n=0,o=s(r)?i.series.length:1;a.comboBarCount>0&&(o=a.comboBarCount),a.collapsedSeries.forEach((function(t){s(t.type)&&(o-=1)})),i.chart.stacked&&(o=1);var l=s(r)||a.comboBarCount>0,h=Math.abs(a.initialMaxX-a.initialMinX);if(l&&a.isXNumeric&&!a.isBarHorizontal&&o>0&&0!==h){h<=3&&(h=a.dataPoints);var c=h/t,d=a.minXDiff&&a.minXDiff/c>0?a.minXDiff/c:0;d>t/2&&(d/=2),(n=d*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),a.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,a=this.dCtx.isSparkline||!i.axisCharts?0:10;["title","subtitle"].forEach((function(s){void 0!==e.config[s].text?a+=e.config[s].margin:a+=t.dCtx.isSparkline||!i.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||i.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight-=s.height+r.height+a,i.translateY+=s.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,a=new Ri(this.dCtx.ctx);i.config.yaxis.forEach((function(s,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||s.floating||a.isYAxisHidden(r)||(s.opposite&&(i.globals.translateX-=e[r].width+t[r].width+parseInt(s.labels.style.fontSize,10)/1.2+12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),pa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new ca(this),this.dimYAxis=new ua(this),this.dimXAxis=new da(this),this.dimGrid=new ga(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return s(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,i=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var a=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,f(e.config.stroke.width)):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var i=p(e,2),a=i[0],s=i[1];t.gridPad[a]=Math.max(s,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(a/2,this.gridPad.top),this.gridPad.bottom=Math.max(a/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var s=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*s,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:a[i].width,index:i}),e.globals.yTitleCoords.push({width:s[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o,n),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,h=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var c=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,h=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,h=0,c=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(r);var d=function(){i.translateX=l+t.datalabelsCoords.width,i.gridHeight=i.svgHeight-t.lgRect.height-h-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(c=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=c,d();break;case"top":i.translateY=this.lgRect.height+c,d();break;case"left":i.translateY=c,i.translateX=this.lgRect.width+l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":i.translateY=c,i.translateX=l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new ia(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,a=0;t.config.legend.show&&!t.config.legend.floating&&(a=20);var s="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[s].offsetY,n=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating){e.gridHeight=e.svgHeight;var o=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(o,e.gridHeight),e.translateY=r,void(e.translateX=n+(e.svgWidth-e.gridWidth)/2)}switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=r-10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+r+10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-a,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+this.lgRect.width+a;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-a-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,i){var a=this.w,s=a.globals.hasXaxisGroups?2:1,r=i.height+t.height+e.height,n=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,o=a.globals.rotateXLabels?22:10,l=a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0;this.xAxisHeight=r*n+s*o+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeightc&&(this.yAxisWidth=c)}}]),t}(),fa=function(){function t(e){i(this,t),this.w=e.w,this.lgCtx=e}return s(t,[{key:"getLegendStyles",value:function(){var t,e,i,a=document.createElement("style");a.setAttribute("type","text/css");var s=(null===(t=this.lgCtx.ctx)||void 0===t||null===(e=t.opts)||void 0===e||null===(i=e.chart)||void 0===i?void 0:i.nonce)||this.w.config.chart.nonce;s&&a.setAttribute("nonce",s);var r=document.createTextNode("\n .apexcharts-flip-y {\n transform: scaleY(-1) translateY(-100%);\n transform-origin: top;\n transform-box: fill-box;\n }\n .apexcharts-flip-x {\n transform: scaleX(-1);\n transform-origin: center;\n transform-box: fill-box;\n }\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-right: 1px;\n }\n\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }\n\n ");return a.appendChild(r),a}},{key:"getLegendDimensions",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(t,e){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var s=null,r=null;if(a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),r=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),r=parseInt(s.getAttribute("rel"),10)-1),e)[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,r)}));else this.hideSeries({seriesEl:s,realIndex:r})}else{var n=a.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(t+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=a.config.plotOptions.pie.donut.labels;new Mi(this.lgCtx.ctx).pathMouseDown(n,null),this.lgCtx.ctx.pie.printDataLabelsInner(n.node,l)}n.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(t){var e=t.realIndex,i=this.w,a=i.globals,s=v.clone(i.config.series);if(a.axisCharts){var r=i.config.yaxis[a.seriesYAxisReverseMap[e]],n={index:e,data:s[e].data.slice(),type:s[e].type||i.config.chart.type};if(r&&r.show&&r.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(e)<0&&(a.ancillaryCollapsedSeries.push(n),a.ancillaryCollapsedSeriesIndices.push(e));else if(a.collapsedSeriesIndices.indexOf(e)<0){a.collapsedSeries.push(n),a.collapsedSeriesIndices.push(e);var o=a.risingSeries.indexOf(e);a.risingSeries.splice(o,1)}}else a.collapsedSeries.push({index:e,data:s[e]}),a.collapsedSeriesIndices.push(e);return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.config.series.length,this._getSeriesBasedOnCollapsedState(s)}},{key:"hideSeries",value:function(t){for(var e=t.seriesEl,i=t.realIndex,a=this.w,s=this.getSeriesAfterCollapsing({realIndex:i}),r=e.childNodes,n=0;n0){for(var r=0;r1;if(this.legendHelpers.appendToForeignObject(),(a||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,i=t.fillcolor,a=this.w,s=document.createElement("span");s.classList.add("apexcharts-legend-marker");var r=a.config.legend.markers.shape||a.config.markers.shape,n=r;Array.isArray(r)&&(n=r[e]);var o=Array.isArray(a.config.legend.markers.size)?parseFloat(a.config.legend.markers.size[e]):parseFloat(a.config.legend.markers.size),l=Array.isArray(a.config.legend.markers.offsetX)?parseFloat(a.config.legend.markers.offsetX[e]):parseFloat(a.config.legend.markers.offsetX),h=Array.isArray(a.config.legend.markers.offsetY)?parseFloat(a.config.legend.markers.offsetY[e]):parseFloat(a.config.legend.markers.offsetY),c=Array.isArray(a.config.legend.markers.strokeWidth)?parseFloat(a.config.legend.markers.strokeWidth[e]):parseFloat(a.config.legend.markers.strokeWidth),d=s.style;if(d.height=2*(o+c)+"px",d.width=2*(o+c)+"px",d.left=l+"px",d.top=h+"px",a.config.legend.markers.customHTML)d.background="transparent",d.color=i[e],Array.isArray(a.config.legend.markers.customHTML)?a.config.legend.markers.customHTML[e]&&(s.innerHTML=a.config.legend.markers.customHTML[e]()):s.innerHTML=a.config.legend.markers.customHTML();else{var g=new Vi(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(n),seriesIndex:e,strokeWidth:c,size:o}),p=window.SVG().addTo(s).size("100%","100%"),f=new Mi(this.ctx).drawMarker(0,0,u(u({},g),{},{pointFillColor:Array.isArray(i)?i[e]:g.pointFillColor,shape:n}));a.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),p.add(f)}return s}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,a=e.globals.seriesNames,s=e.config.legend.markers.fillColors?e.config.legend.markers.fillColors.slice():e.globals.colors.slice();if("heatmap"===e.config.chart.type){var r=e.config.plotOptions.heatmap.colorScale.ranges;a=r.map((function(t){return t.name?t.name:t.from+" - "+t.to})),s=r.map((function(t){return t.color}))}else this.isBarsDistributed&&(a=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(a=e.config.legend.customLegendItems);for(var n=e.globals.legendFormatter,o=e.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var h,c=n(a[l],{seriesIndex:l,w:e}),d=!1,u=!1;if(e.globals.collapsedSeries.length>0)for(var g=0;g0)for(var p=0;p0?l-10:0)+(h>0?h-10:0)}a.style.position="absolute",r=r+t+i.config.legend.offsetX,n=n+e+i.config.legend.offsetY,a.style.left=r+"px",a.style.top=n+"px","right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px");["width","height"].forEach((function(t){a.style[t]&&(a.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new pa(this.ctx),i=e.dimHelpers.getTitleSubtitleCoords("title"),a=e.dimHelpers.getTitleSubtitleCoords("subtitle"),s=0;"top"===t.config.legend.position&&(s=i.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,s)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new Zi(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new Zi(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,a="true"===t.target.getAttribute("data:collapsed"),s=this.w.config.chart.events.legendClick;"function"==typeof s&&s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;"function"==typeof r&&t.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),t}(),ba=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=a.globals.minX,this.maxX=a.globals.maxX}return s(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=e.config.chart.toolbar.offsetY+"px",a.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s\n \n \n\n'),n("zoomOut",this.elZoomOut,'\n \n \n\n');var o=function(i){t.t[i]&&e.config.chart[i].enabled&&r.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'\n \n \n \n':'\n \n \n',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&e.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,'\n \n \n'),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;lthis.wheelDelay&&(this.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){a-i.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,i=this.w;this.minX=i.globals.isRangeBar?i.globals.minY:i.globals.minX,this.maxX=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;var a=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(a){var s,r,n,o=(t.clientX-a.left)/a.width,l=this.minX,h=this.maxX,c=h-l;if(t.deltaY<0){var d=l+o*c;r=d-(s=.5*c)/2,n=d+s/2}else r=l-(s=1.5*c)/2,n=h+s/2;if(!i.globals.isRangeBar){r=Math.max(r,i.globals.initialMinX),n=Math.min(n,i.globals.initialMaxX);var u=.01*(i.globals.initialMaxX-i.globals.initialMinX);if(n-r0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,i,a,s){return"l"===s||"r"===s?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resizing",this.selectionDragging.bind(this,"resizing")))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(u(u({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,a=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i;t.globals.isRangeBar&&(i=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,a=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var s={x:i,y:0,width:a,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(s),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,a=t.width,s=t.height,r=t.translateX,n=void 0===r?0:r,o=t.translateY,l=void 0===o?0:o,h=this.w,c=this.zoomRect,d=this.selectionRect;if(this.dragged||null!==h.globals.selection){var u={transform:"translate("+n+", "+l+")"};h.globals.zoomEnabled&&this.dragged&&(a<0&&(a=1),c.attr({x:e,y:i,width:a,height:s,fill:h.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":h.config.chart.zoom.zoomedArea.fill.opacity,stroke:h.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":h.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":h.config.chart.zoom.zoomedArea.stroke.opacity}),Mi.setAttrs(c.node,u)),h.globals.selectionEnabled&&(d.attr({x:e,y:i,width:a>0?a:0,height:s>0?s:0,fill:h.config.chart.selection.fill.color,"fill-opacity":h.config.chart.selection.fill.opacity,stroke:h.config.chart.selection.stroke.color,"stroke-width":h.config.chart.selection.stroke.width,"stroke-dasharray":h.config.chart.selection.stroke.dashArray,"stroke-opacity":h.config.chart.selection.stroke.opacity}),Mi.setAttrs(d.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.gridRect.getBoundingClientRect(),n=s.startX-1,o=s.startY,l=!1,h=!1,c=s.clientX-r.left-n,d=s.clientY-r.top-o,g={translateX:a.globals.translateX,translateY:a.globals.translateY};return Math.abs(c+n)>a.globals.gridWidth?c=a.globals.gridWidth-n:s.clientX-r.left<0&&(c=n),n>s.clientX-r.left&&(l=!0,c=Math.abs(c)),o>s.clientY-r.top&&(h=!0,d=Math.abs(d)),g=u(u({},g="x"===i?{x:l?n-c:n,y:0,width:c,height:a.globals.gridHeight}:"y"===i?{x:0,y:h?o-d:o,width:a.globals.gridWidth,height:d}:{x:l?n-c:n,y:h?o-d:o,width:c,height:d}),{},{translateX:a.globals.translateX,translateY:a.globals.translateY}),s.drawSelectionRect(g),s.selectionDragging("resizing"),g}},{key:"selectionDragging",value:function(t,e){var i=this,a=this.w;if(e){e.preventDefault();var s=e.detail,r=s.handler,n=s.box,o=n.x,l=n.y;othis.constraints.x2&&(o=this.constraints.x2-n.w),n.y2>this.constraints.y2&&(l=this.constraints.y2-n.h),r.move(o,l);var h=this.xyRatios,c=this.selectionRect,d=0;"resizing"===t&&(d=30);var u=function(t){return parseFloat(c.node.getAttribute(t))},g={x:u("x"),y:u("y"),width:u("width"),height:u("height")};a.globals.selection=g,"function"==typeof a.config.chart.events.selection&&a.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,s,r,n=i.gridRect.getBoundingClientRect(),o=c.node.getBoundingClientRect();a.globals.isRangeBar?(t=a.globals.yAxisScale[0].niceMin+(o.left-n.left)*h.invertedYRatio,e=a.globals.yAxisScale[0].niceMin+(o.right-n.left)*h.invertedYRatio,s=0,r=1):(t=a.globals.xAxisScale.niceMin+(o.left-n.left)*h.xRatio,e=a.globals.xAxisScale.niceMin+(o.right-n.left)*h.xRatio,s=a.globals.yAxisScale[0].niceMin+(n.bottom-o.bottom)*h.yRatio[0],r=a.globals.yAxisScale[0].niceMax-(o.top-n.top)*h.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:s,max:r}};a.config.chart.events.selection(i.ctx,l),a.config.chart.brush.enabled&&void 0!==a.config.chart.events.brushScrolled&&a.config.chart.events.brushScrolled(i.ctx,l)}),d))}}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.xyRatios,n=this.ctx.toolbar;if(s.startX>s.endX){var o=s.startX;s.startX=s.endX,s.endX=o}if(s.startY>s.endY){var l=s.startY;s.startY=s.endY,s.endY=l}var h=void 0,c=void 0;a.globals.isRangeBar?(h=a.globals.yAxisScale[0].niceMin+s.startX*r.invertedYRatio,c=a.globals.yAxisScale[0].niceMin+s.endX*r.invertedYRatio):(h=a.globals.xAxisScale.niceMin+s.startX*r.xRatio,c=a.globals.xAxisScale.niceMin+s.endX*r.xRatio);var d=[],u=[];if(a.config.yaxis.forEach((function(t,e){var i=a.globals.seriesYAxisMap[e][0];d.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.startY),u.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.endY)})),s.dragged&&(s.dragX>10||s.dragY>10)&&h!==c)if(a.globals.zoomEnabled){var g=v.clone(a.globals.initialConfig.yaxis),p=v.clone(a.globals.initialConfig.xaxis);if(a.globals.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),c=Math.floor(c),h<1&&(h=1,c=a.globals.dataPoints),c-h<2&&(c=h+1)),"xy"!==i&&"x"!==i||(p={min:h,max:c}),"xy"!==i&&"y"!==i||g.forEach((function(t,e){g[e].min=u[e],g[e].max=d[e]})),n){var f=n.getBeforeZoomRange(p,g);f&&(p=f.xaxis?f.xaxis:p,g=f.yaxis?f.yaxis:g)}var x={xaxis:p};a.config.chart.group||(x.yaxis=g),s.ctx.updateHelpers._updateOptions(x,!1,s.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&n.zoomCallback(p,g)}else if(a.globals.selectionEnabled){var b,m=null;b={min:h,max:c},"xy"!==i&&"y"!==i||(m=v.clone(a.config.yaxis)).forEach((function(t,e){m[e].min=u[e],m[e].max=d[e]})),a.globals.selection=s.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(s.ctx,{xaxis:b,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,a=e;if(void 0!==i.globals.lastClientPosition.x){var s=i.globals.lastClientPosition.x-a.clientX,r=i.globals.lastClientPosition.y-a.clientY;Math.abs(s)>Math.abs(r)&&s>0?this.moveDirection="left":Math.abs(s)>Math.abs(r)&&s<0?this.moveDirection="right":Math.abs(r)>Math.abs(s)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(s)&&r<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var n=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||a.panScrolled(n,o)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,a=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+a,i=t.globals.maxX+a):"right"===this.moveDirection&&(e=t.globals.minX-a,i=t.globals.maxX-a),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,a=this.xyRatios,s=v.clone(i.globals.initialConfig.yaxis),r=a.xRatio,n=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(r=a.invertedYRatio,n=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(t=n+i.globals.gridWidth/15*r,e=o+i.globals.gridWidth/15*r):"right"===this.moveDirection&&(t=n-i.globals.gridWidth/15*r,e=o-i.globals.gridWidth/15*r),i.globals.isRangeBar||(ti.globals.initialMaxX)&&(t=n,e=o);var l={xaxis:{min:t,max:e}};i.config.chart.group||(l.yaxis=s),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var a=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),a}(),va=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return s(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,a=t.clientX,s=t.clientY,r=this.w,n=i.getBoundingClientRect(),o=n.width,l=n.height,h=o/(r.globals.dataPoints-1),c=l/r.globals.dataPoints,d=this.hasBars();!r.globals.comboCharts&&!d||r.config.xaxis.convertedCatToNumeric||(h=o/r.globals.dataPoints);var u=a-n.left-r.globals.barPadForNumericAxis,g=s-n.top;u<0||g<0||u>o||g>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var p=Math.round(u/h),f=Math.floor(g/c);d&&!r.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(u/h),p-=1);var x=null,b=null,m=r.globals.seriesXvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))})),y=r.globals.seriesYvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))}));if(r.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),k=u*(w.width/o),A=g*(w.height/l);x=(b=this.closestInMultiArray(k,A,m,y)).index,p=b.j,null!==x&&(m=r.globals.seriesXvalues[x],p=(b=this.closestInArray(k,m)).index)}return r.globals.capturedSeriesIndex=null===x?-1:x,(!p||p<1)&&(p=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=f:r.globals.capturedDataPointIndex=p,{capturedSeries:x,j:r.globals.isBarHorizontal?f:p,hoverX:u,hoverY:g}}},{key:"closestInMultiArray",value:function(t,e,i,a){var s=this.w,r=0,n=null,o=-1;s.globals.series.length>1?r=this.getFirstActiveXArray(i):n=0;var l=i[r][0],h=Math.abs(t-l);if(i.forEach((function(e){e.forEach((function(e,i){var a=Math.abs(t-e);a<=h&&(h=a,o=i)}))})),-1!==o){var c=a[r][o],d=Math.abs(e-c);n=r,a.forEach((function(t,i){var a=Math.abs(e-t[o]);a<=d&&(d=a,n=i)}))}return{index:n,j:o}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,i=0,a=t.map((function(t,e){return t.length>0?e:-1})),s=0;s0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=f(t)).sort((function(t,e){var i=Number(t.getAttribute("data:realIndex")),a=Number(e.getAttribute("data:realIndex"));return ai?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var i=Number(t.getAttribute("cx")),a=Number(t.getAttribute("cy")),s=t.getAttribute("shape");return new Mi(this.ctx).getMarkerPath(i,a,s,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s ').concat(i.attrs.name,""),e+="
".concat(i.val,"
")})),m.innerHTML=t+"",v.innerHTML=e+""};n?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?y():(m.innerHTML="",v.innerHTML=""):y()}else m.innerHTML="",v.innerHTML="";null!==p&&(a[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:"");if(n&&f[0]){if(l.config.tooltip.hideEmptySeries){var w=a[e].querySelector(".apexcharts-tooltip-marker"),k=a[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(c)?(w.style.display="none",k.style.display="none"):(w.style.display="block",k.style.display="block")}null==c||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)?f[0].parentNode.style.display="none":f[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)&&(f[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var i=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));a&&(a.classList.add("apexcharts-active"),a.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",n="",o=null,l=null,h={series:a.globals.series,seriesIndex:e,dataPointIndex:i,w:a},c=a.globals.ttZFormatter;null===i?l=a.globals.series[e]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(r=s[e][i],0===s[e].length&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=new $i(this.ctx).isFormatXY()?void 0!==a.config.series[e].data[i]?a.config.series[e].data[i].x:"":void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var d=r;a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?r=new Xi(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(this.ctx).formatDate,w:this.w}):r=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](d,h):a.globals.xLabelFormatter(d,h);return void 0!==a.config.tooltip.x.formatter&&(r=a.globals.ttKeyFormatter(d,h)),a.globals.seriesZ.length>0&&a.globals.seriesZ[e].length>0&&(o=c(a.globals.seriesZ[e][i],a)),n="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(d,h):r,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,a=t.y1,s=t.y2,r=t.w,n=this.ttCtx.getElTooltip(),o=r.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]),n.innerHTML=o({ctx:this.ctx,series:r.globals.series,seriesIndex:e,dataPointIndex:i,y1:a,y2:s,w:r})}}]),t}(),wa=function(){function t(e){i(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return s(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=t-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(null!==e&&(r=a.globals.gridWidth/n*e),null===s||a.globals.isBarHorizontal||(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=r;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Mi.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Mi.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=e.globals.translateX;var s;s=new Mi(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=e.globals.translateY+a,r=i.yaxisTTEls[t].getBoundingClientRect().height,n=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(n-=26),s-=r/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=n+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),n=s.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(t)+o+5,h=parseFloat(e)+o/2;if(l>a.globals.gridWidth/2&&(l=l-n.ttWidth-o-10),l>a.globals.gridWidth-n.ttWidth-10&&(l=a.globals.gridWidth-n.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var c=s.getElGrid().getBoundingClientRect();(l=s.e.clientX-c.left)>a.globals.gridWidth/2&&(l-=s.tooltipRect.ttWidth),(h=s.e.clientY+a.globals.translateY-c.top)>a.globals.gridHeight/2&&(h-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+h>a.globals.gridHeight&&(h=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(l)||(l+=a.globals.translateX,r.style.left=l+"px",r.style.top=h+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),r=0;r0){var g=u.getAttribute("shape"),p=l.getMarkerPath(s,r,g,1.5*c);u.setAttribute("d",p)}this.moveXCrosshairs(s),o.fixedTooltip||this.moveTooltip(s,r,c)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,a=i.w,s=0,r=0,n=a.globals.pointsArray,o=new Zi(this.ctx),l=new Mi(this.ctx);e=o.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var h=i.tooltipUtil.getHoverMarkerSize(e);n[e]&&(s=n[e][t][0],r=n[e][t][1]);var c=i.tooltipUtil.getAllMarkers();if(null!==c)for(var d=0;d0){var b=l.getMarkerPath(s,g,f,h);c[d].setAttribute("d",b)}else c[d].setAttribute("d","")}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,r||a.globals.gridHeight,h)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(r=new Zi(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"']"));n||"number"!=typeof e||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var o=n?parseFloat(n.getAttribute("cx")):0,l=n?parseFloat(n.getAttribute("cy")):0,h=n?parseFloat(n.getAttribute("barWidth")):0,c=a.getElGrid().getBoundingClientRect(),d=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!d&&(o-=s%2!=0?h/2:0),n&&d&&i.globals.comboCharts&&(o-=h/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[t-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[t]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?l-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?l=a.e.clientY-c.top-a.tooltipRect.ttHeight/2:l+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(l=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,l||i.globals.gridHeight)}}]),t}(),ka=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new wa(e)}return s(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Vi(this.ctx),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=f(a),t.config.chart.stacked&&a.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w;"bubble"!==s.config.chart.type&&this.newPointSize(t,e);var r=e.getAttribute("cx"),n=e.getAttribute("cy");if(null!==i&&null!==a&&(r=i,n=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===s.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(r,n,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,a=this.ttCtx,s=t,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=e.config.markers.hover.size,o=0;o0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],i);t[e].setAttribute("d",a)}else t[e].setAttribute("d","M0,0")}}}]),t}(),Aa=function(){function t(e){i(this,t),this.w=e.w;var a=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!a.globals.isBarHorizontal&&"rangeBar"===a.config.chart.type&&a.config.plotOptions.bar.rangeBarGroupRows}return s(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,s=t.y,r=t.type,n=this.ttCtx,o=this.w;if(e.target.classList.contains("apexcharts-".concat(r,"-rect"))){var l=this.getAttr(e,"i"),h=this.getAttr(e,"j"),c=this.getAttr(e,"cx"),d=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),g=this.getAttr(e,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:h,shared:!1,e:e}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=h,a=c+n.tooltipRect.ttWidth/2+u,s=d+n.tooltipRect.ttHeight/2-g/2,n.tooltipPosition.moveXCrosshairs(c+u/2),a>o.globals.gridWidth/2&&(a=c-n.tooltipRect.ttWidth/2+u),n.w.config.tooltip.followCursor){var p=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-p.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),s=o.globals.clientY-p.top-(s>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=t.x,n=t.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var h=parseInt(s.paths.getAttribute("cx"),10),c=parseInt(s.paths.getAttribute("cy"),10),d=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),e=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=v.findAncestor(s.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,e,i),o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=i,r=h,n=c+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var g=l.getElGrid().getBoundingClientRect();n=l.e.clientY+o.globals.translateY-g.top}d<0&&(n=c),l.marker.enlargeCurrentPoint(i,s.paths,r,n)}return{x:r,y:n}}},{key:"handleBarTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=this.ttCtx,o=n.getElTooltip(),l=0,h=0,c=0,d=this.getBarTooltipXY({e:a,opt:s});if(null!==d.j||0!==d.barHeight||0!==d.barWidth){e=d.i;var u=d.j;if(r.globals.capturedSeriesIndex=e,r.globals.capturedDataPointIndex=u,r.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!r.config.tooltip.shared?(h=d.x,c=d.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[e]:r.config.stroke.width,l=h):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(c)&&(c=r.globals.svgHeight-n.tooltipRect.ttHeight),parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),h+n.tooltipRect.ttWidth>r.globals.gridWidth?h-=n.tooltipRect.ttWidth:h<0&&(h=0),n.w.config.tooltip.followCursor){var g=n.getElGrid().getBoundingClientRect();c=n.e.clientY-g.top}null===n.tooltip&&(n.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?n.tooltipPosition.moveXCrosshairs(l+i/2):n.tooltipPosition.moveXCrosshairs(l)),!n.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(c=c+r.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=h+r.globals.translateX+"px",o.style.top=c+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,i=t.e,a=t.opt,s=this.w,r=null,n=this.ttCtx,o=0,l=0,h=0,c=0,d=0,u=i.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){var g=i.target,p=g.getBoundingClientRect(),f=a.elGrid.getBoundingClientRect(),x=p.height;d=p.height;var b=p.width,m=parseInt(g.getAttribute("cx"),10),v=parseInt(g.getAttribute("cy"),10);c=parseFloat(g.getAttribute("barWidth"));var y="touchmove"===i.type?i.touches[0].clientX:i.clientX;r=parseInt(g.getAttribute("j"),10),o=parseInt(g.parentNode.getAttribute("rel"),10)-1;var w=g.getAttribute("data-range-y1"),k=g.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(g.parentNode.getAttribute("data:realIndex"),10));var A=function(t){return s.globals.isXNumeric?m-b/2:e.isVerticalGroupedRangeBar?m+b/2:m-n.dataPointsDividedWidth+b/2},C=function(){return v-n.dataPointsDividedHeight+x/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:r,y1:w?parseInt(w,10):null,y2:k?parseInt(k,10):null,shared:!n.showOnIntersect&&s.config.tooltip.shared,e:i}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(l=y-f.left+15,h=C()):(l=A(),h=i.clientY-f.top-n.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((l=m)0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var a=this.ttCtx,s=this.w,r=s.globals,n=r.seriesYAxisMap[t];if(a.yaxisTooltips[t]&&n.length>0){var o=r.yLabelFormatters[t],l=a.getElGrid().getBoundingClientRect(),h=n[0],c=0;i.yRatio.length>1&&(c=h);var d=(e-l.top)*i.yRatio[c],u=r.maxYArr[h]-r.minYArr[h],g=r.minYArr[h]+(u-d);s.config.yaxis[t].reversed&&(g=r.maxYArr[h]-(u-d)),a.tooltipPosition.moveYCrosshairs(e-l.top),a.yaxisTooltipText[t].innerHTML=o(g),a.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),Sa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.tConfig=a.config.tooltip,this.tooltipUtil=new va(this),this.tooltipLabels=new ya(this),this.tooltipPosition=new wa(this),this.marker=new ka(this),this.intersect=new Aa(this),this.axesTooltip=new Ca(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!a.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return s(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new Qi(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,a=[],s=this.getElTooltip(),r=function(r){var n=document.createElement("div");n.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(r)),n.style.order=i.config.tooltip.inverseOrder?t-r:r+1;var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[r],n.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var a=document.createElement("span");a.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(a),l.appendChild(e)})),n.appendChild(l),s.appendChild(n),a.push(n)},n=0;n0&&this.addPathsEventListeners(g,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(r=r+t.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+t.globals.svgHeight-s-10),e.style.left=r+"px",e.style.top=n+"px",{x:r,y:n,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,a=function(a){var s={paths:t[a],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[a].addEventListener(e,i.onSeriesHover.bind(i,s),{capture:!1,passive:!0})}))},s=0;s=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(t,e)}),20-a))}},{key:"seriesHover",value:function(t,e){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||0===s.globals.dataPoints)||(a.length?a.forEach((function(a){var s=i.getElTooltip(a),r={paths:t.paths,tooltipEl:s,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===i.w.globals.minX&&a.w.globals.maxX===i.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:r,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,a=t.opt,s=t.e,r=e.w,n=this.getElTooltip(e);if(n){if(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=s,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared)if(this.tConfig.onDatasetHover.highlightDataSeries)new Zi(e).toggleSeriesOnHover(s,s.target.parentNode);i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect})}}},{key:"axisChartsTooltips",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=s.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,ln.top+n.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var h=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(h)<0)return void this.handleMouseOut(s)}var c=this.getElTooltip(),d=this.getElXCrosshairs(),u=[];r.config.chart.group&&(u=this.ctx.getSyncedCharts());var g=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;null!==d&&d.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),g&&!this.showOnIntersect||u.length>1)this.handleStickyTooltip(a,o,l,s);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:e,y:i,type:r.config.chart.type});e=f.x,i=f.y,c.style.left=e+"px",c.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:e,y:i});if(this.yaxisTooltips.length)for(var x=0;xl.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(t,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||s.globals.isBarHorizontal){var h=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,h,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,i,a){var s=this.w;if(!this.tConfig.shared&&null===s.globals.series[e][a])return void this.handleMouseOut(i);if(void 0!==s.globals.series[e][a])this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,a,i.ttItems):this.create(t,this,e,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var r=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,r,a,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Mi(this.ctx),i=t.globals.dom.Paper.find(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,A=this.w,C=e;"mouseup"===t.type&&this.markerClick(t,i,a),null===k&&(k=this.tConfig.shared);var S=this.tooltipUtil.hasMarkers(i),L=this.tooltipUtil.getElBars();if(A.config.legend.tooltipHoverFormatter){var M=A.config.legend.tooltipHoverFormatter,P=Array.from(this.legendLabels);P.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var I=0;I0?C.marker.enlargePoints(a):C.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var Y=new Mi(this.ctx),H=A.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var O=0;O0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*k)),w){u=u+d.height/2-b/2-2}var C=e.globals.series[i][a]<0,S=o;switch(this.barCtx.isReversed&&(S=o+(C?c:-c)),f.position){case"center":g=w?C?S-c/2+v:S+c/2-v:C?S-c/2+d.height/2+v:S+c/2+d.height/2-v;break;case"bottom":g=w?C?S-c+v:S+c-v:C?S-c+d.height+b+v:S+c-d.height/2+b-v;break;case"top":g=w?C?S+v:S-v:C?S-d.height/2-v:S+d.height+v}if(this.barCtx.lastActiveBarSerieIndex===s&&x.enabled){var L=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:a}),p.fontSize);r=C?S-L.height/2-v-x.offsetY+18:S+L.height+v+x.offsetY-18;var M=A;n=y+(e.globals.isXNumeric?-h*e.globals.barGroups.length/2:e.globals.barGroups.length*h/2-(e.globals.barGroups.length-1)*h-M)+x.offsetX}return e.config.chart.stacked||(g<0?g=0+b:g+d.height/3>e.globals.gridHeight&&(g=e.globals.gridHeight-b)),{bcx:l,bcy:o,dataLabelsX:u,dataLabelsY:g,totalDataLabelsX:n,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,a=t.i,s=t.j,r=t.realIndex,n=t.bcy,o=t.barHeight,l=t.barWidth,h=t.textRects,c=t.dataLabelsX,d=t.strokeWidth,u=t.dataLabelsConfig,g=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,f=t.offX,x=t.offY,b=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var m,v,y=n-(this.barCtx.isRangeBar?0:b)+o/2+h.height/2+x-3,w="start",k=e.globals.series[a][s]<0,A=i;switch(this.barCtx.isReversed&&(A=i+(k?-l:l),w=k?"start":"end"),g.position){case"center":c=k?A+l/2-f:Math.max(h.width/2,A-l/2)+f;break;case"bottom":c=k?A+l-d-f:A-l+d+f;break;case"top":c=k?A-d-f:A-d+f}if(this.barCtx.lastActiveBarSerieIndex===r&&p.enabled){var C=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:s}),u.fontSize);k?(m=A-d-f-p.offsetX,w="end"):m=A+f+p.offsetX+(this.barCtx.isReversed?-(l+d):d),v=y-h.height/2+C.height/2+p.offsetY+d}return e.config.chart.stacked||("start"===u.textAnchor?c-h.width<0?c=k?h.width+d:d:c+h.width>e.globals.gridWidth&&(c=k?e.globals.gridWidth-d:e.globals.gridWidth-h.width-d):"middle"===u.textAnchor?c-h.width/2<0?c=h.width/2+d:c+h.width/2>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width/2-d):"end"===u.textAnchor&&(c<1?c=h.width+d:c+1>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width-d))),{bcx:i,bcy:n,dataLabelsX:c,dataLabelsY:y,totalDataLabelsX:m,totalDataLabelsY:v,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.i,r=t.j,n=t.textRects,o=t.barHeight,l=t.barWidth,h=t.dataLabelsConfig,c=this.w,d="rotate(0)";"vertical"===c.config.plotOptions.bar.dataLabels.orientation&&(d="rotate(-90, ".concat(e,", ").concat(i,")"));var g=new qi(this.barCtx.ctx),p=new Mi(this.barCtx.ctx),f=h.formatter,x=null,b=c.globals.collapsedSeriesIndices.indexOf(s)>-1;if(h.enabled&&!b){x=p.group({class:"apexcharts-data-labels",transform:d});var m="";void 0!==a&&(m=f(a,u(u({},c),{},{seriesIndex:s,dataPointIndex:r,w:c}))),!a&&c.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(m="");var v=c.globals.series[s][r]<0,y=c.config.plotOptions.bar.dataLabels.position;if("vertical"===c.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(h.textAnchor=v?"end":"start"),"center"===y&&(h.textAnchor="middle"),"bottom"===y&&(h.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels)lMath.abs(l)&&(m=""):n.height/1.6>Math.abs(o)&&(m=""));var w=u({},h);this.barCtx.isHorizontal&&a<0&&("start"===h.textAnchor?w.textAnchor="end":"end"===h.textAnchor&&(w.textAnchor="start")),g.plotDataLabelsText({x:e,y:i,text:m,i:s,j:r,parent:x,dataLabelsConfig:w,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}},{key:"drawTotalDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.realIndex,r=t.textAnchor,n=t.barTotalDataLabelsConfig;this.w;var o,l=new Mi(this.barCtx.ctx);return n.enabled&&void 0!==e&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===s&&(o=l.drawText({x:e,y:i,foreColor:n.style.color,text:a,textAnchor:r,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),o}}]),t}(),Ma=function(){function t(e){i(this,t),this.w=e.w,this.barCtx=e}return s(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[i].length),e.globals.isXNumeric)for(var a=0;ae.globals.minX&&e.globals.seriesX[i][a]0&&(a=l.globals.minXDiff/d),(r=a/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),n=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+(a-r*this.barCtx.seriesLen)/2}return l.globals.barHeight=s,l.globals.barWidth=r,{x:t,y:e,yDivision:i,xDivision:a,barHeight:s,barWidth:r,zeroH:n,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,i,a){var s,r,n,o,l=this.w,h=this.barCtx.ctx.fill,c=null,d=this.barCtx.barOptions.distributed?i:e;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(a){t[e][i]>=a.from&&t[e][i]<=a.to&&(c=a.color)}));return h.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:a,dataPointIndex:i,color:c,value:t[e][i],fillConfig:null===(s=l.config.series[e].data[i])||void 0===s?void 0:s.fill,fillType:null!==(r=l.config.series[e].data[i])&&void 0!==r&&null!==(n=r.fill)&&void 0!==n&&n.type?null===(o=l.config.series[e].data[i])||void 0===o?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[a]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,i){var a=0,s=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"createBorderRadiusArr",value:function(t){var e,i=this.w,a=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,s=t.length,n=0|(null===(e=t[0])||void 0===e?void 0:e.length),o=Array.from({length:s},(function(){return Array(n).fill(a?"top":"none")}));if(a)return o;for(var l=0;l0?(h.push(u),d++):g<0&&(c.push(u),d++)}if(h.length>0&&0===c.length)if(1===h.length)o[h[0]][l]="both";else{var p,f=h[0],x=h[h.length-1],b=r(h);try{for(b.s();!(p=b.n()).done;){var m=p.value;o[m][l]=m===f?"bottom":m===x?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===h.length)if(1===c.length)o[c[0]][l]="both";else{var v,y=Math.max.apply(Math,c),w=Math.min.apply(Math,c),k=r(c);try{for(k.s();!(v=k.n()).done;){var A=v.value;o[A][l]=A===y?"bottom":A===w?"top":"none"}}catch(t){k.e(t)}finally{k.f()}}else if(h.length>0&&c.length>0){var C,S=h[h.length-1],L=r(h);try{for(L.s();!(C=L.n()).done;){var M=C.value;o[M][l]=M===S?"top":"none"}}catch(t){L.e(t)}finally{L.f()}var P,I=Math.max.apply(Math,c),T=r(c);try{for(T.s();!(P=T.n()).done;){var z=P.value;o[z][l]=z===I?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else if(1===d){o[h[0]||c[0]][l]="both"}}return o}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,a=t.x1,s=t.x2,r=t.y1,n=t.y2,o=t.elSeries,l=this.w,h=new Mi(this.barCtx.ctx),c=new Zi(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var d=this.barCtx.barOptions.colors.backgroundBarColors[e],u=h.drawRect(void 0!==a?a:0,void 0!==r?r:0,void 0!==s?s:l.globals.gridWidth,void 0!==n?n:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,i=t.barWidth,a=t.barXPosition,s=t.y1,r=t.y2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.columnWidthOffset&&(x=a-g.config.series[c].data[u].columnWidthOffset/2,f=i+g.config.series[c].data[u].columnWidthOffset);var b=n/2,m=x+b,v=x+f-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001-b*y,r+=.001+b*y;var w=p.move(m,s),k=p.move(m,s),A=p.line(v,s);if(g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1)),w=w+p.line(m,r)+p.line(v,r)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(m,s)+A+A+A+A+A+p.line(m,s)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).yArrj.push(r-b*y),C.yArrjF.push(Math.abs(s-r+n*y)),C.yArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"getBarpaths",value:function(t){var e,i=t.barYPosition,a=t.barHeight,s=t.x1,r=t.x2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.barHeightOffset&&(f=i-g.config.series[c].data[u].barHeightOffset/2,x=a+g.config.series[c].data[u].barHeightOffset);var b=n/2,m=f+b,v=f+x-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001+b*y,r+=.001-b*y;var w=p.move(s,m),k=p.move(s,m);g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1));var A=p.line(s,v);if(w=w+p.line(r,m)+p.line(r,v)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(s,m)+A+A+A+A+A+p.line(s,m)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).xArrj.push(r+b*y),C.xArrjF.push(Math.abs(s-r-n*y)),C.xArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;a2&&void 0!==arguments[2])||arguments[2]?e:null;return null!=t&&(i=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(t,e,i){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?e:null;return null!=t&&(a=e-t/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(t,e,i,a,s,r){var n=this,l=this.w,h=[],c=function(a,s){var l;h.push((o(l={},t,"x"===t?n.getXForValue(a,e,!1):n.getYForValue(a,i,r,!1)),o(l,"attrs",s),l))};if(l.globals.seriesGoals[a]&&l.globals.seriesGoals[a][s]&&Array.isArray(l.globals.seriesGoals[a][s])&&l.globals.seriesGoals[a][s].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,g={strokeHeight:"x"===t?0:l.globals.markers.size[a],strokeWidth:"x"===t?l.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[a])?d[a][0]:d[a]};c(l.globals.seriesRangeStart[a][s],g),c(l.globals.seriesRangeEnd[a][s],u(u({},g),{},{strokeColor:Array.isArray(d[a])?d[a][1]:d[a]}))}return h}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,a=t.goalX,s=t.goalY,r=t.barWidth,n=t.barHeight,o=new Mi(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var h=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach((function(t){if(t.x>=-1&&t.x<=o.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:n/2,a=i+e+n/2;h=o.drawLine(t.x,a-2*e,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(h)}})):Array.isArray(s)&&s.forEach((function(t){if(t.y>=-1&&t.y<=o.w.globals.gridHeight+1){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:r/2,a=e+i+r/2;h=o.drawLine(a-2*i,t.y,a,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(h)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,i=t.currPaths,a=t.color,s=this.w,r=e.x,n=e.x1,o=e.barYPosition,l=i.x,h=i.x1,c=i.barYPosition,d=o+i.barHeight,u=new Mi(this.barCtx.ctx),g=new v,p=u.move(n,d)+u.line(r,d)+u.line(l,c)+u.line(h,c)+u.line(n,d)+("around"===s.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return u.drawPath({d:p,fill:g.shadeColor(.5,v.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,i=t.i,a=t.j,s=this.w,r=0,n=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map((function(t,e){return e})):(null===(e=s.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=s.globals.seriesPercent[t][a];e&&r++,t-1})),a=this.barCtx.columnGroupIndices,s=a.indexOf(i);return s<0&&(a.push(i),s=a.length-1),{groupIndex:i,columnGroupIndex:s}}}]),t}(),Pa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w;var s=this.w;this.barOptions=s.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=s.config.stroke.width,this.isNullValue=!1,this.isRangeBar=s.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!s.globals.isBarHorizontal&&s.globals.seriesRange.length&&s.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=a,null!==this.xyRatios&&(this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.invertedXRatio=a.invertedXRatio,this.invertedYRatio=a.invertedYRatio,this.baseLineY=a.baseLineY,this.baseLineInvertedY=a.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var r=new Zi(this.ctx);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var n=r.getBarSeriesIndices(),o=new Pi(this.ctx);this.stackedSeriesTotals=o.getStackedSeriesTotals(this.w.config.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}))),this.barHelpers=new Ma(this)}return s(t,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=new Pi(this.ctx,i);t=s.getLogSeries(t),this.series=t,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var n=0,o=0;n0&&(this.visibleI=this.visibleI+1);var w=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[b],this.translationsIndex=b);var A=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var C=this.barHelpers.initialPositions();p=C.y,w=C.barHeight,h=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,l=C.xDivision,c=C.zeroH,this.isHorizontal||x.push(g+k/2);var S=a.group({class:"apexcharts-datalabels","data:realIndex":b});i.globals.delayedElements.push({el:S.node}),S.node.classList.add("apexcharts-element-hidden");var L=a.group({class:"apexcharts-bar-goals-markers"}),M=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");for(var P=0;P0){var R=this.barHelpers.drawBarShadow({color:"string"==typeof X&&-1===(null==X?void 0:X.indexOf("url"))?X:v.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});if(M.add(R),i.config.chart.dropShadow.enabled)new Li(this.ctx).dropShadow(R,i.config.chart.dropShadow,b)}this.pathArr.push(T);var E=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:w,barWidth:k});E&&L.add(E),p=T.y,g=T.x,P>0&&x.push(g+k/2),f.push(p),this.renderSeries({realIndex:b,pathFill:X,j:P,i:n,columnGroupIndex:m,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:I,elSeries:y,x:g,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:w),barWidth:Math.abs(T.barWidth?T.barWidth:k),elDataLabelsWrap:S,elGoalsMarkers:L,elBarShadows:M,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[b]=x,i.globals.seriesYvalues[b]=f,r.add(y)}return r}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,a=t.lineFill,s=t.j,r=t.i,n=t.columnGroupIndex,o=t.pathFrom,l=t.pathTo,h=t.strokeWidth,c=t.elSeries,d=t.x,u=t.y,g=t.y1,p=t.y2,f=t.series,x=t.barHeight,b=t.barWidth,m=t.barXPosition,v=t.barYPosition,y=t.elDataLabelsWrap,w=t.elGoalsMarkers,k=t.elBarShadows,A=t.visibleSeries,C=t.type,S=t.classes,L=this.w,M=new Mi(this.ctx);if(!a){var P="function"==typeof L.globals.stroke.colors[e]?function(t){var e,i=L.config.stroke.colors;return Array.isArray(i)&&i.length>0&&((e=i[t])||(e=""),"function"==typeof e)?e({value:L.globals.series[t][s],dataPointIndex:s,w:L}):e}(e):L.globals.stroke.colors[e];a=this.barOptions.distributed?L.globals.stroke.colors[s]:P}L.config.series[r].data[s]&&L.config.series[r].data[s].strokeColor&&(a=L.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var I=s/L.config.chart.animations.animateGradually.delay*(L.config.chart.animations.speed/L.globals.dataPoints)/2.4,T=M.renderPaths({i:r,j:s,realIndex:e,pathFrom:o,pathTo:l,stroke:a,strokeWidth:h,strokeLineCap:L.config.stroke.lineCap,fill:i,animationDelay:I,initialSpeed:L.config.chart.animations.speed,dataChangeSpeed:L.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(C,"-area ").concat(S),chartType:C});T.attr("clip-path","url(#gridRectBarMask".concat(L.globals.cuid,")"));var z=L.config.forecastDataPoints;z.count>0&&s>=L.globals.dataPoints-z.count&&(T.node.setAttribute("stroke-dasharray",z.dashArray),T.node.setAttribute("stroke-width",z.strokeWidth),T.node.setAttribute("fill-opacity",z.fillOpacity)),void 0!==g&&void 0!==p&&(T.attr("data-range-y1",g),T.attr("data-range-y2",p)),new Li(this.ctx).setSelectionFilter(T,e,s),c.add(T);var X=new La(this).handleBarDataLabels({x:d,y:u,y1:g,y2:p,i:r,j:s,series:f,realIndex:e,columnGroupIndex:n,barHeight:x,barWidth:b,barXPosition:m,barYPosition:v,renderedPath:T,visibleSeries:A});return null!==X.dataLabels&&y.add(X.dataLabels),X.totalDataLabels&&y.add(X.totalDataLabels),c.add(y),w&&c.add(w),k&&c.add(k),c}},{key:"drawBarPaths",value:function(t){var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.yDivision,h=t.elSeries,c=this.w,d=i.i,u=i.j;if(c.globals.isXNumeric)e=(o=(c.globals.seriesX[d][u]-c.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var g=0,p=0;c.globals.seriesPercent.forEach((function(t,e){t[u]&&g++,e0&&(a=this.seriesLen*a/g),e=o+a*this.visibleI,e-=a*p}else e=o+a*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[d][u],r)-r)/2),n=this.barHelpers.getXForValue(this.series[d][u],r);var f=this.barHelpers.getBarpaths({barYPosition:e,barHeight:a,x1:r,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:d,j:u,w:c});return c.globals.isXNumeric||(o+=l),this.barHelpers.barBackground({j:u,i:d,y1:e-a*this.visibleI,y2:a*this.seriesLen,elSeries:h}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x1:r,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",r,null,d,u),barYPosition:e,barHeight:a}}},{key:"drawColumnPaths",value:function(t){var e,i=t.indexes,a=t.x,s=t.y,r=t.xDivision,n=t.barWidth,o=t.zeroH,l=t.strokeWidth,h=t.elSeries,c=this.w,d=i.realIndex,u=i.translationsIndex,g=i.i,p=i.j,f=i.bc;if(c.globals.isXNumeric){var x=this.getBarXForNumericXAxis({x:a,j:p,realIndex:d,barWidth:n});a=x.x,e=x.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var b=this.barHelpers.getZeroValueEncounters({i:g,j:p}),m=b.nonZeroColumns,v=b.zeroEncounters;m>0&&(n=this.seriesLen*n/m),e=a+n*this.visibleI,e-=n*v}else e=a+n*this.visibleI;s=this.barHelpers.getYForValue(this.series[g][p],o,u);var y=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:n,y1:o,y2:s,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:d,i:g,j:p,w:c});return c.globals.isXNumeric||(a+=r),this.barHelpers.barBackground({bc:f,j:p,i:g,x1:e-l/2-n*this.visibleI,x2:n*this.seriesLen+l/2,elSeries:h}),{pathTo:y.pathTo,pathFrom:y.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,g,p,u),barXPosition:e,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,i=t.barWidth,a=t.realIndex,s=t.j,r=this.w,n=a;return r.globals.seriesX[a].length||(n=r.globals.maxValsInArrayIndex),v.isNumber(r.globals.seriesX[n][s])&&(e=(r.globals.seriesX[n][s]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:e+i*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var i,a=this.w,s=0;s0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==a.globals.previousPaths[s].paths[e]&&(i=a.globals.previousPaths[s].paths[e].d)}return i}}]),t}(),Ia=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this,a=this.w;this.graphics=new Mi(this.ctx),this.bar=new Pa(this.ctx,this.xyRatios);var s=new Pi(this.ctx,a);t=s.getLogSeries(t),this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===a.config.chart.stackType&&(t=a.globals.comboCharts?e.map((function(t){return a.globals.seriesPercent[t]})):a.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);for(var r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),n=0,o=0,l=function(s,l){var h=void 0,c=void 0,d=void 0,g=void 0,p=a.globals.comboCharts?e[s]:s,f=i.barHelpers.getGroupIndex(p),x=f.groupIndex,b=f.columnGroupIndex;i.groupCtx=i[a.globals.seriesGroups[x]];var m=[],y=[],w=0;i.yRatio.length>1&&(i.yaxisIndex=a.globals.seriesYAxisReverseMap[p][0],w=p),i.isReversed=a.config.yaxis[i.yaxisIndex]&&a.config.yaxis[i.yaxisIndex].reversed;var k=i.graphics.group({class:"apexcharts-series",seriesName:v.escapeString(a.globals.seriesNames[p]),rel:s+1,"data:realIndex":p});i.ctx.series.addCollapsedClassToSeries(k,p);var A=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),C=i.graphics.group({class:"apexcharts-bar-goals-markers"}),S=0,L=0,M=i.initialPositions(n,o,h,c,d,g,w);o=M.y,S=M.barHeight,c=M.yDivision,g=M.zeroW,n=M.x,L=M.barWidth,h=M.xDivision,d=M.zeroH,a.globals.barHeight=S,a.globals.barWidth=L,i.barHelpers.initializeStackedXYVars(i),1===i.groupCtx.prevY.length&&i.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(i.groupCtx.prevY[0]=i.groupCtx.prevY[0].map((function(){return d})),i.groupCtx.prevYF[0]=i.groupCtx.prevYF[0].map((function(){return 0})));for(var P=0;P0||"top"===i.barHelpers.arrBorderRadius[p][P]&&a.globals.series[p][P]<0)&&(E=Y),k=i.renderSeries({realIndex:p,pathFill:R,j:P,i:s,columnGroupIndex:b,pathFrom:z.pathFrom,pathTo:z.pathTo,strokeWidth:I,elSeries:k,x:n,y:o,series:t,barHeight:S,barWidth:L,elDataLabelsWrap:A,elGoalsMarkers:C,type:"bar",visibleSeries:b,classes:E})}a.globals.seriesXvalues[p]=m,a.globals.seriesYvalues[p]=y,i.groupCtx.prevY.push(i.groupCtx.yArrj),i.groupCtx.prevYF.push(i.groupCtx.yArrjF),i.groupCtx.prevYVal.push(i.groupCtx.yArrjVal),i.groupCtx.prevX.push(i.groupCtx.xArrj),i.groupCtx.prevXF.push(i.groupCtx.xArrjF),i.groupCtx.prevXVal.push(i.groupCtx.xArrjVal),r.add(k)},h=0,c=0;h1?l=(i=h.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(d).indexOf("%")?l=parseInt(d,10):l*=parseInt(d,10)/100,s=this.isReversed?this.baseLineY[n]:h.globals.gridHeight-this.baseLineY[n],t=h.globals.padHorizontal+(i-l)/2}var u=h.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:i,barHeight:o/u,barWidth:l/u,zeroH:s,zeroW:r}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.columnGroupIndex,h=t.seriesGroup,c=t.yDivision,d=t.elSeries,u=this.w,g=o+l*a,p=i.i,f=i.j,x=i.realIndex,b=i.translationsIndex,m=0,v=0;v0){var w=r;this.groupCtx.prevXVal[y-1][f]<0?w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[y-1][f]:this.groupCtx.prevXVal[y-1][f]>=0&&(w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]:this.groupCtx.prevX[y-1][f]-m+2*(this.isReversed?m:0)),e=w}else e=r;n=null===this.series[p][f]?e:e+this.series[p][f]/this.invertedYRatio-2*(this.isReversed?this.series[p][f]/this.invertedYRatio:0);var k=this.barHelpers.getBarpaths({barYPosition:g,barHeight:a,x1:e,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,seriesGroup:h,i:p,j:f,w:u});return this.barHelpers.barBackground({j:f,i:p,y1:g,y2:a,elSeries:d}),o+=c,{pathTo:k.pathTo,pathFrom:k.pathFrom,goalX:this.barHelpers.getGoalValues("x",r,null,p,f,b),barXPosition:e,barYPosition:g,x:n,y:o}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,r=t.barWidth,n=t.zeroH,o=t.columnGroupIndex,l=t.seriesGroup,h=t.elSeries,c=this.w,d=e.i,u=e.j,g=e.bc,p=e.realIndex,f=e.translationsIndex;if(c.globals.isXNumeric){var x=c.globals.seriesX[p][u];x||(x=0),i=(x-c.globals.minX)/this.xRatio-r/2*c.globals.barGroups.length}for(var b,m=i+o*r,v=0,y=0;y0&&!c.globals.isXNumeric||w>0&&c.globals.isXNumeric&&c.globals.seriesX[p-1][u]===c.globals.seriesX[p][u]){var k,A,C,S=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var L=1;L=0?C-v+2*(this.isReversed?v:0):C;break}if((null===(T=this.groupCtx.prevYVal[w-P])||void 0===T?void 0:T[u])>=0){A=this.series[d][u]>=0?C:C+v-2*(this.isReversed?v:0);break}}void 0===A&&(A=c.globals.gridHeight),b=null!==(k=this.groupCtx.prevYF[0])&&void 0!==k&&k.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?n:A}else b=n;a=this.series[d][u]?b-this.series[d][u]/this.yRatio[f]+2*(this.isReversed?this.series[d][u]/this.yRatio[f]:0):b;var z=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:r,y1:b,y2:a,yRatio:this.yRatio[f],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:d,j:u,w:c});return this.barHelpers.barBackground({bc:g,j:u,i:d,x1:m,x2:r,elSeries:h}),{pathTo:z.pathTo,pathFrom:z.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,n,d,u),barXPosition:m,x:c.globals.isXNumeric?i:i+s,y:a}}}]),a}(),Ta=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e,i){var a=this,s=this.w,r=new Mi(this.ctx),n=s.globals.comboCharts?e:s.config.chart.type,o=new ji(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=s.config.plotOptions.bar.horizontal;var l=new Pi(this.ctx,s);t=l.getLogSeries(t),this.series=t,this.yRatio=l.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var h=r.group({class:"apexcharts-".concat(n,"-series apexcharts-plot-series")}),c=function(e){a.isBoxPlot="boxPlot"===s.config.chart.type||"boxPlot"===s.config.series[e].type;var n,l,c,d,g=void 0,p=void 0,f=[],x=[],b=s.globals.comboCharts?i[e]:e,m=a.barHelpers.getGroupIndex(b).columnGroupIndex,y=r.group({class:"apexcharts-series",seriesName:v.escapeString(s.globals.seriesNames[b]),rel:e+1,"data:realIndex":b});a.ctx.series.addCollapsedClassToSeries(y,b),t[e].length>0&&(a.visibleI=a.visibleI+1);var w,k,A=0;a.yRatio.length>1&&(a.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],A=b);var C=a.barHelpers.initialPositions();p=C.y,w=C.barHeight,l=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,n=C.xDivision,c=C.zeroH,x.push(g+k/2);for(var S=r.group({class:"apexcharts-datalabels","data:realIndex":b}),L=r.group({class:"apexcharts-bar-goals-markers"}),M=function(i){var r=a.barHelpers.getStrokeWidth(e,i,b),h=null,v={indexes:{i:e,j:i,realIndex:b,translationsIndex:A},x:g,y:p,strokeWidth:r,elSeries:y};h=a.isHorizontal?a.drawHorizontalBoxPaths(u(u({},v),{},{yDivision:l,barHeight:w,zeroW:d})):a.drawVerticalBoxPaths(u(u({},v),{},{xDivision:n,barWidth:k,zeroH:c})),p=h.y,g=h.x;var C=a.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:h.barYPosition,goalX:h.goalX,goalY:h.goalY,barHeight:w,barWidth:k});C&&L.add(C),i>0&&x.push(g+k/2),f.push(p),h.pathTo.forEach((function(n,l){var c=!a.isBoxPlot&&a.candlestickOptions.wick.useFillColor?h.color[l]:s.globals.stroke.colors[e],d=o.fillPath({seriesNumber:b,dataPointIndex:i,color:h.color[l],value:t[e][i]});a.renderSeries({realIndex:b,pathFill:d,lineFill:c,j:i,i:e,pathFrom:h.pathFrom,pathTo:n,strokeWidth:r,elSeries:y,x:g,y:p,series:t,columnGroupIndex:m,barHeight:w,barWidth:k,elDataLabelsWrap:S,elGoalsMarkers:L,visibleSeries:a.visibleI,type:s.config.chart.type})}))},P=0;Pb.c&&(d=!1);var y=Math.min(b.o,b.c),w=Math.max(b.o,b.c),k=b.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[x][c]-o.globals.minX)/this.xRatio-s/2);var A=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(y=r,w=r):(y=r-y/f,w=r-w/f,m=r-b.h/f,v=r-b.l/f,k=r-b.m/f);var C=l.move(A,r),S=l.move(A+s/2,y);return o.globals.previousPaths.length>0&&(S=this.getPreviousPath(x,c,!0)),C=this.isBoxPlot?[l.move(A,y)+l.line(A+s/2,y)+l.line(A+s/2,m)+l.line(A+s/4,m)+l.line(A+s-s/4,m)+l.line(A+s/2,m)+l.line(A+s/2,y)+l.line(A+s,y)+l.line(A+s,k)+l.line(A,k)+l.line(A,y+n/2),l.move(A,k)+l.line(A+s,k)+l.line(A+s,w)+l.line(A+s/2,w)+l.line(A+s/2,v)+l.line(A+s-s/4,v)+l.line(A+s/4,v)+l.line(A+s/2,v)+l.line(A+s/2,w)+l.line(A,w)+l.line(A,k)+"z"]:[l.move(A,w)+l.line(A+s/2,w)+l.line(A+s/2,m)+l.line(A+s/2,w)+l.line(A+s,w)+l.line(A+s,y)+l.line(A+s/2,y)+l.line(A+s/2,v)+l.line(A+s/2,y)+l.line(A,y)+l.line(A,w-n/2)],S+=l.move(A,y),o.globals.isXNumeric||(i+=a),{pathTo:C,pathFrom:S,x:i,y:w,goalY:this.barHelpers.getGoalValues("y",null,r,h,c,e.translationsIndex),barXPosition:A,color:this.isBoxPlot?p:d?[u]:[g]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var i=t.y,a=t.yDivision,s=t.barHeight,r=t.zeroW,n=t.strokeWidth,o=this.w,l=new Mi(this.ctx),h=e.i,c=e.j,d=this.boxOptions.colors.lower;this.isBoxPlot&&(d=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,g=e.realIndex,p=this.getOHLCValue(g,c),f=r,x=r,b=Math.min(p.o,p.c),m=Math.max(p.o,p.c),v=p.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[g][c]-o.globals.minX)/this.invertedXRatio-s/2);var y=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(b=r,m=r):(b=r+b/u,m=r+m/u,f=r+p.h/u,x=r+p.l/u,v=r+p.m/u);var w=l.move(r,y),k=l.move(b,y+s/2);return o.globals.previousPaths.length>0&&(k=this.getPreviousPath(g,c,!0)),w=[l.move(b,y)+l.line(b,y+s/2)+l.line(f,y+s/2)+l.line(f,y+s/2-s/4)+l.line(f,y+s/2+s/4)+l.line(f,y+s/2)+l.line(b,y+s/2)+l.line(b,y+s)+l.line(v,y+s)+l.line(v,y)+l.line(b+n/2,y),l.move(v,y)+l.line(v,y+s)+l.line(m,y+s)+l.line(m,y+s/2)+l.line(x,y+s/2)+l.line(x,y+s-s/4)+l.line(x,y+s/4)+l.line(x,y+s/2)+l.line(m,y+s/2)+l.line(m,y)+l.line(v,y)+"z"],k+=l.move(b,y),o.globals.isXNumeric||(i+=a),{pathTo:w,pathFrom:k,x:m,y:i,goalX:this.barHelpers.getGoalValues("x",r,null,h,c),barYPosition:y,color:d}}},{key:"getOHLCValue",value:function(t,e){var i=this.w;return{o:this.isBoxPlot?i.globals.seriesCandleH[t][e]:i.globals.seriesCandleO[t][e],h:this.isBoxPlot?i.globals.seriesCandleO[t][e]:i.globals.seriesCandleH[t][e],m:i.globals.seriesCandleM[t][e],l:this.isBoxPlot?i.globals.seriesCandleC[t][e]:i.globals.seriesCandleL[t][e],c:this.isBoxPlot?i.globals.seriesCandleL[t][e]:i.globals.seriesCandleC[t][e]}}}]),a}(),za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,a){var s=this.w,r=1,n=s.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,i);s.globals.hasNegs||a?r=s.config.plotOptions[t].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):(1-o.percent/100)*(1.25*n):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(r=1-o.percent/100,"treemap"===t&&(r=(1-o.percent/100)*(1.25*n)));var l=o.color,h=new v;if(s.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var c=h.shadeColor(-1*r,o.color);l=v.hexToRgba(v.isColorHex(c)?c:v.rgb2hex(c),s.config.fill.opacity)}else{var d=h.shadeColor(r,o.color);l=v.hexToRgba(v.isColorHex(d)?d:v.rgb2hex(d),s.config.fill.opacity)}return{color:l,colorProps:o}}},{key:"determineColor",value:function(t,e,i){var a=this.w,s=a.globals.series[e][i],r=a.config.plotOptions[t],n=r.colorScale.inverse?i:e;r.distributed&&"treemap"===a.config.chart.type&&(n=i);var o=a.globals.colors[n],l=null,h=Math.min.apply(Math,f(a.globals.series[e])),c=Math.max.apply(Math,f(a.globals.series[e]));r.distributed||"heatmap"!==t||(h=a.globals.minY,c=a.globals.maxY),void 0!==r.colorScale.min&&(h=r.colorScale.mina.globals.maxY?r.colorScale.max:a.globals.maxY);var d=Math.abs(c)+Math.abs(h),u=100*s/(0===d?d-1e-6:d);r.colorScale.ranges.length>0&&r.colorScale.ranges.map((function(t,e){if(s>=t.from&&s<=t.to){o=t.color,l=t.foreColor?t.foreColor:null,h=t.from,c=t.to;var i=Math.abs(c)+Math.abs(h);u=100*s/(0===i?i-1e-6:i)}}));return{color:o,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,a=t.y,s=t.i,r=t.j,n=t.colorProps,o=t.fontSize,l=this.w.config.dataLabels,h=new Mi(this.ctx),c=new qi(this.ctx),d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});var u=l.offsetX,g=l.offsetY,p=i+u,f=a+parseFloat(l.style.fontSize)/3+g;c.plotDataLabelsText({x:p,y:f,text:e,i:s,j:r,color:n.foreColor,parent:d,fontSize:o,dataLabelsConfig:l})}return d}},{key:"addListeners",value:function(t){var e=new Mi(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),Xa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w,this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new za(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return s(t,[{key:"draw",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var s=e.globals.gridWidth/e.globals.dataPoints,r=e.globals.gridHeight/e.globals.series.length,n=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var h=o?0:l.length-1;o?h=0;o?h++:h--){var c=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:v.escapeString(e.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(this.ctx.series.addCollapsedClassToSeries(c,h),e.config.chart.dropShadow.enabled){var d=e.config.chart.dropShadow;new Li(this.ctx).dropShadow(c,d,h)}for(var u=0,g=e.config.plotOptions.heatmap.shadeIntensity,p=0;p-1&&this.pieClicked(d),i.config.dataLabels.enabled){var w=m.x,k=m.y,A=100*g/this.fullAngle+"%";if(0!==g&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(h=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(h)>this.fullAngle&&(h-=this.fullAngle);var c=Math.PI*(h-90)/180,d=i.centerX+r*Math.cos(l),u=i.centerY+r*Math.sin(l),g=i.centerX+r*Math.cos(c),p=i.centerY+r*Math.sin(c),f=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,h),x=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),b=s>180?1:0,m=["M",d,u,"A",r,r,0,b,1,g,p];return e="donut"===i.chartType?[].concat(m,["L",f.x,f.y,"A",i.donutSize,i.donutSize,0,b,0,x.x,x.y,"L",d,u,"z"]).join(" "):"pie"===i.chartType||"polarArea"===i.chartType?[].concat(m,["L",i.centerX,i.centerY,"L",d,u]).join(" "):[].concat(m).join(" "),n.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new ta(this.ctx),a=new Mi(this.ctx),s=new Ra(this.ctx),r=a.group(),n=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),h=o.result.length;this.maxY=o.niceMax;for(var c=e.globals.radialSize,d=c/(h-1),u=0;u1&&t.total.show&&(s=t.total.color);var n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,r),a||"function"!=typeof t.total.formatter||(i=t.total.formatter(r));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,r):"",null!==n&&(n.textContent=e),null!==o&&(o.textContent=i),null!==n&&(n.style.fill=s)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,a=t.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,s,a,t);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,a=new Mi(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(0!==s.strokeWidth){for(var r=[],n=360/i.globals.series.length,o=0;o0&&(f=e.getPreviousPath(n));for(var x=0;x=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?s-=10:t.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,a=0;a0&&parseInt(s.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[a].paths[0]&&(i=e.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var a=[],s=0;s=360&&(u=360-Math.abs(this.startAngle)-.1);var g=i.drawPath({d:"",stroke:c,strokeWidth:n*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){var p=h.dropShadow;s.dropShadow(g,p)}l.add(g),g.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(g,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:d,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return a}},{key:"drawArcs",value:function(t){var e=this.w,i=new Mi(this.ctx),a=new ji(this.ctx),s=new Li(this.ctx),r=i.group(),n=this.getStrokeWidth(t);t.size=t.size-n/2;var o=e.config.plotOptions.radialBar.hollow.background,l=t.size-n*t.series.length-this.margin*t.series.length-n*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(t,r,l,o));var c=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:o||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var d=e.config.plotOptions.radialBar.hollow.dropShadow;s.dropShadow(c,d)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var g=null;if(this.radialDataLabels.show){var p=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");g=this.renderInnerDataLabels(p,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})}"back"===e.config.plotOptions.radialBar.hollow.position&&(r.add(c),g&&r.add(g));var f=!1;e.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var x=f?t.series.length-1:0;f?x>=0:x100?100:t.series[x])/100,A=Math.round(this.totalAngle*k)+this.startAngle,C=void 0;e.globals.dataChanged&&(w=this.startAngle,C=Math.round(this.totalAngle*v.negToZero(e.globals.previousPaths[x])/100)+w),Math.abs(A)+Math.abs(y)>360&&(A-=.01),Math.abs(C)+Math.abs(w)>360&&(C-=.01);var S=A-y,L=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[x]:e.config.stroke.dashArray,M=i.drawPath({d:"",stroke:m,strokeWidth:n,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+x,strokeDashArray:L});if(Mi.setAttrs(M.node,{"data:angle":S,"data:value":t.series[x]}),e.config.chart.dropShadow.enabled){var P=e.config.chart.dropShadow;s.dropShadow(M,P,x)}if(s.setSelectionFilter(M,0,x),this.addListeners(M,this.radialDataLabels),b.add(M),M.attr({index:0,j:x}),this.barLabels.enabled){var I=v.polarToCartesian(t.centerX,t.centerY,t.size,y),T=this.barLabels.formatter(e.globals.seriesNames[x],{seriesIndex:x,w:e}),z=["apexcharts-radialbar-label"];this.barLabels.onClick||z.push("apexcharts-no-click");var X=this.barLabels.useSeriesColors?e.globals.colors[x]:e.config.chart.foreColor;X||(X=e.config.chart.foreColor);var R=I.x+this.barLabels.offsetX,E=I.y+this.barLabels.offsetY,Y=i.drawText({x:R,y:E,text:T,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:X,cssClass:z.join(" ")});Y.on("click",this.onBarLabelClick),Y.attr({rel:x+1}),0!==y&&Y.attr({"transform-origin":"".concat(R," ").concat(E),transform:"rotate(".concat(y," 0 0)")}),b.add(Y)}var H=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(H=e.config.chart.animations.speed),e.globals.dataChanged&&(H=e.config.chart.animations.dynamicAnimation.speed),this.animDur=H/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(M,{centerX:t.centerX,centerY:t.centerY,endAngle:A,startAngle:y,prevEndAngle:C,prevStartAngle:w,size:t.size,i:x,totalItems:2,animBeginArr:this.animBeginArr,dur:H,shouldSetPrevPaths:!0})}return{g:r,elHollow:c,dataLabels:g}}},{key:"drawHollow",value:function(t){var e=new Mi(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,a){var s=this.w,r=new ji(this.ctx),n=v.randomId(),o=s.config.plotOptions.radialBar.hollow.image;if(s.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:o,patternID:"pattern".concat(s.globals.cuid).concat(n)}),a="url(#pattern".concat(s.globals.cuid).concat(n,")");else{var l=s.config.plotOptions.radialBar.hollow.imageWidth,h=s.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===h){var c=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-e.width/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+s.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(c)}else{var d=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-l/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-h/2+s.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,h)}));e.add(d)}}return a}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,i=this.barLabels.onClick,a=this.w;i&&i(a.globals.seriesNames[e],{w:a,seriesIndex:e})}}]),r}(),Oa=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var s=a.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),r=0;r0&&(this.visibleI=this.visibleI+1);var x=0,b=0,m=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[g][0],m=g);var y=this.barHelpers.initialPositions();d=y.y,h=y.zeroW,c=y.x,b=y.barWidth,x=y.barHeight,n=y.xDivision,o=y.yDivision,l=y.zeroH;for(var w=a.group({class:"apexcharts-datalabels","data:realIndex":g}),k=a.group({class:"apexcharts-rangebar-goals-markers"}),A=0;A0}));return this.isHorizontal?(a=u.config.plotOptions.bar.rangeBarGroupRows?r+h*b:r+o*this.visibleI+h*b,m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(a=(o=d.barHeight/g.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+g.indexOf(p))+h*b)):(b>-1&&!u.globals.timescaleLabels.length&&(s=u.config.plotOptions.bar.rangeBarGroupRows?n+c*b:n+l*this.visibleI+c*b),m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(s=(l=d.barWidth/g.length)*this.visibleI+c*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+g.indexOf(p))+c*b)),{barYPosition:a,barXPosition:s,barHeight:o,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.xDivision,s=t.barWidth,r=t.barXPosition,n=t.zeroH,o=this.w,l=e.i,h=e.j,c=e.realIndex,d=e.translationsIndex,u=this.yRatio[d],g=this.getRangeValue(c,h),p=Math.min(g.start,g.end),f=Math.max(g.start,g.end);void 0===this.series[l][h]||null===this.series[l][h]?p=n:(p=n-p/u,f=n-f/u);var x=Math.abs(f-p),b=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:s,y1:p,y2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:c,i:c,j:h,w:o});if(o.globals.isXNumeric){var m=this.getBarXForNumericXAxis({x:i,j:h,realIndex:c,barWidth:s});i=m.x,r=m.barXPosition}else i+=a;return{pathTo:b.pathTo,pathFrom:b.pathFrom,barHeight:x,x:i,y:g.start<0&&g.end<0?p:f,goalY:this.barHelpers.getGoalValues("y",null,n,l,h,d),barXPosition:r}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,a=t.y1,s=t.y2,r=t.yDivision,n=t.barHeight,o=t.barYPosition,l=t.zeroW,h=this.w,c=e.realIndex,d=e.j,u=this.preventBarOverflow(l+a/this.invertedYRatio),g=this.preventBarOverflow(l+s/this.invertedYRatio),p=this.getRangeValue(c,d),f=Math.abs(g-u),x=this.barHelpers.getBarpaths({barYPosition:o,barHeight:n,x1:u,x2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:c,realIndex:c,j:d,w:h});return h.globals.isXNumeric||(i+=r),{pathTo:x.pathTo,pathFrom:x.pathFrom,barWidth:f,x:p.start<0&&p.end<0?u:g,goalX:this.barHelpers.getGoalValues("x",l,null,c,d),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}}]),a}(),Fa=function(){function t(e){i(this,t),this.w=e.w,this.lineCtx=e}return s(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new Pi(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,a=t.x,s=t.y,r=t.i,n=t.j,o=t.prevY,l=this.w,h=[],c=[];if(0===n){var d=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(d=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),h.push(d),c.push(v.isNumber(e[r][0])?o+l.config.markers.offsetY:null),h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null)}else h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null);return{x:h,y:c}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,a=t.realIndex,s=this.w,r=0;r0&&parseInt(n.realIndex,10)===parseInt(a,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,e=s.globals.previousPaths[r].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[r].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[r].paths[1]&&(e=s.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e,i,a,s=t.i,r=t.realIndex,n=t.series,o=t.prevY,l=t.lineYPosition,h=t.translationsIndex,c=this.w,d=c.config.chart.stacked&&!c.globals.comboCharts||c.config.chart.stacked&&c.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[r])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[r])||void 0===i?void 0:i.type));if(void 0!==(null===(a=n[s])||void 0===a?void 0:a[0]))o=(l=d&&s>0?this.lineCtx.prevSeriesY[s-1][0]:this.lineCtx.zeroY)-n[s][0]/this.lineCtx.yRatio[h]+2*(this.lineCtx.isReversed?n[s][0]/this.lineCtx.yRatio[h]:0);else if(d&&s>0&&void 0===n[s][0])for(var u=s-1;u>=0;u--)if(null!==n[u][0]&&void 0!==n[u][0]){o=l=this.lineCtx.prevSeriesY[u][0];break}return{prevY:o,lineYPosition:l}}}]),t}(),Da=function(t){for(var e,i,a,s,r=function(t){for(var e=[],i=t[0],a=t[1],s=e[0]=Wa(i,a),r=1,n=t.length-1;r9&&(s=3*a/Math.sqrt(s),r[l]=s*e,r[l+1]=s*i);for(var h=0;h<=n;h++)s=(t[Math.min(n,h+1)][0]-t[Math.max(0,h-1)][0])/(6*(1+r[h]*r[h])),o.push([s||0,r[h]*s||0]);return o},_a=function(t){var e=Da(t),i=t[1],a=t[0],s=[],r=e[1],n=e[0];s.push(a,[a[0]+n[0],a[1]+n[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(var o=2,l=e.length;o1&&a[1].length<6){var s=a[0].length;a[1]=[2*a[0][s-2]-a[0][s-4],2*a[0][s-1]-a[0][s-3]].concat(a[1])}a[0]=a[0].slice(-2)}return a};function Wa(t,e){return(e[1]-t[1])/(e[0]-t[0])}var Ba=function(){function t(e,a,s){i(this,t),this.ctx=e,this.w=e.w,this.xyRatios=a,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||s,this.scatter=new Ui(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Fa(this),this.markers=new Vi(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return s(t,[{key:"draw",value:function(t,e,i,a){var s,r=this.w,n=new Mi(this.ctx),o=r.globals.comboCharts?e:r.config.chart.type,l=n.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),h=new Pi(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=h.getLogSeries(t),this.yRatio=h.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var c=[],d=0;d1?g:0;this._initSerieVariables(t,d,g);var f=[],x=[],b=[],m=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,g),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(m=(r.globals.seriesX[g][0]-r.globals.minX)/this.xRatio),b.push(m);var v,y=m,w=void 0,k=y,A=this.zeroY,C=this.zeroY;A=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:t,prevY:A,lineYPosition:0,translationsIndex:p}).prevY,"monotoneCubic"===r.config.stroke.curve&&null===t[d][0]?f.push(null):f.push(A),v=A;"rangeArea"===o&&(w=C=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:a,prevY:C,lineYPosition:0,translationsIndex:p}).prevY,x.push(null!==f[0]?C:null));var S=this._calculatePathsFrom({type:o,series:t,i:d,realIndex:g,translationsIndex:p,prevX:k,prevY:A,prevY2:C}),L=[f[0]],M=[x[0]],P={type:o,series:t,realIndex:g,translationsIndex:p,i:d,x:m,y:1,pX:y,pY:v,pathsFrom:S,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:b,yArrj:f,y2Arrj:x,seriesRangeEnd:a},I=this._iterateOverDataPoints(u(u({},P),{},{iterations:"rangeArea"===o?t[d].length-1:void 0,isRangeStart:!0}));if("rangeArea"===o){for(var T=this._calculatePathsFrom({series:a,i:d,realIndex:g,prevX:k,prevY:C}),z=this._iterateOverDataPoints(u(u({},P),{},{series:a,xArrj:[m],yArrj:L,y2Arrj:M,pY:w,areaPaths:I.areaPaths,pathsFrom:T,iterations:a[d].length-1,isRangeStart:!1})),X=I.linePaths.length/2,R=0;R=0;E--)l.add(c[E]);else for(var Y=0;Y1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[r]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",zIndex:void 0!==a.config.series[i].zIndex?a.config.series[i].zIndex:i,seriesName:v.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i});var n=t[e].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,a,s,r=t.type,n=t.series,o=t.i,l=t.realIndex,h=t.translationsIndex,c=t.prevX,d=t.prevY,u=t.prevY2,g=this.w,p=new Mi(this.ctx);if(null===n[o][0]){for(var f=0;f0){var x=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:l});a=x.pathFromLine,s=x.pathFromArea}return{prevX:c,prevY:d,linePath:e,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(t){var e=t.type,i=t.realIndex,a=t.i,s=t.paths,r=this.w,n=new Mi(this.ctx),o=new ji(this.ctx);this.prevSeriesY.push(s.yArrj),r.globals.seriesXvalues[i]=s.xArrj,r.globals.seriesYvalues[i]=s.yArrj;var l=r.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var h=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-l.count-1],c=n.drawRect(h,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(c.node);var d=n.drawRect(0,0,h,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(d.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var g={i:a,realIndex:i,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var p=o.fillPath({seriesNumber:i}),f=0;f0&&"rangeArea"!==e){var A=n.renderPaths(w);A.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&A.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(A),A.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),k.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,i,a=this,s=t.type,r=t.series,n=t.iterations,o=t.realIndex,l=t.translationsIndex,h=t.i,c=t.x,d=t.y,u=t.pX,g=t.pY,p=t.pathsFrom,f=t.linePaths,x=t.areaPaths,b=t.seriesIndex,m=t.lineYPosition,y=t.xArrj,w=t.yArrj,k=t.y2Arrj,A=t.isRangeStart,C=t.seriesRangeEnd,S=this.w,L=new Mi(this.ctx),M=this.yRatio,P=p.prevY,I=p.linePath,T=p.areaPath,z=p.pathFromLine,X=p.pathFromArea,R=v.isNumber(S.globals.minYArr[o])?S.globals.minYArr[o]:S.globals.minY;n||(n=S.globals.dataPoints>1?S.globals.dataPoints-1:S.globals.dataPoints);var E=function(t,e){return e-t/M[l]+2*(a.isReversed?t/M[l]:0)},Y=d,H=S.config.chart.stacked&&!S.globals.comboCharts||S.config.chart.stacked&&S.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[o])||void 0===i?void 0:i.type)),O=S.config.stroke.curve;Array.isArray(O)&&(O=Array.isArray(b)?O[b[h]]:O[h]);for(var F,D=0,_=0;_0&&S.globals.collapsedSeries.length0;e--){if(!(S.globals.collapsedSeriesIndices.indexOf((null==b?void 0:b[e])||e)>-1))return e;e--}return 0}(h-1)][_+1]}else m=this.zeroY;else m=this.zeroY;N?d=E(R,m):(d=E(r[h][_+1],m),"rangeArea"===s&&(Y=E(C[h][_+1],m))),y.push(c),!N||"smooth"!==S.config.stroke.curve&&"monotoneCubic"!==S.config.stroke.curve?(w.push(d),k.push(Y)):(w.push(null),k.push(null));var B=this.lineHelpers.calculatePoints({series:r,x:c,y:d,realIndex:o,i:h,j:_,prevY:P}),G=this._createPaths({type:s,series:r,i:h,realIndex:o,j:_,x:c,y:d,y2:Y,xArrj:y,yArrj:w,y2Arrj:k,pX:u,pY:g,pathState:D,segmentStartX:F,linePath:I,areaPath:T,linePaths:f,areaPaths:x,curve:O,isRangeStart:A});x=G.areaPaths,f=G.linePaths,u=G.pX,g=G.pY,D=G.pathState,F=G.segmentStartX,T=G.areaPath,I=G.linePath,!this.appendPathFrom||S.globals.hasNullValues||"monotoneCubic"===O&&"rangeArea"===s||(z+=L.line(c,this.areaBottomY),X+=L.line(c,this.areaBottomY)),this.handleNullDataPoints(r,B,h,_,o),this._handleMarkersAndLabels({type:s,pointsPos:B,i:h,j:_,realIndex:o,isRangeStart:A})}return{yArrj:w,xArrj:y,pathFromArea:X,areaPaths:x,pathFromLine:z,linePaths:f,linePath:I,areaPath:T}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,i=t.pointsPos,a=t.isRangeStart,s=t.i,r=t.j,n=t.realIndex,o=this.w,l=new qi(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var h=this.markers.plotChartMarkers(i,n,r+1);null!==h&&this.elPointsMain.add(h)}var c=l.drawDataLabel({type:e,isRangeStart:a,pos:i,i:n,j:r+1});null!==c&&this.elDataLabelsWrap.add(c)}},{key:"_createPaths",value:function(t){var e=t.type,i=t.series,a=t.i;t.realIndex;var s,r=t.j,n=t.x,o=t.y,l=t.xArrj,h=t.yArrj,c=t.y2,d=t.y2Arrj,u=t.pX,g=t.pY,p=t.pathState,f=t.segmentStartX,x=t.linePath,b=t.areaPath,m=t.linePaths,v=t.areaPaths,y=t.curve,w=t.isRangeStart,k=new Mi(this.ctx),A=this.areaBottomY,C="rangeArea"===e,S="rangeArea"===e&&w;switch(y){case"monotoneCubic":var L=w?h:d;switch(p){case 0:if(null===L[r+1])break;p=1;case 1:if(!(C?l.length===i[a].length:r===i[a].length-2))break;case 2:var M=w?l:l.slice().reverse(),P=w?L:L.slice().reverse(),I=(s=P,M.map((function(t,e){return[t,s[e]]})).filter((function(t){return null!==t[1]}))),T=I.length>1?_a(I):I,z=[];C&&(S?v=I:z=v.reverse());var X=0,R=0;if(function(t,e){for(var i=function(t){var e=[],i=0;return t.forEach((function(t){null!==t?i++:i>0&&(e.push(i),i=0)})),i>0&&e.push(i),e}(t),a=[],s=0,r=0;s4?(e+="C".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]),e+=", ".concat(a[4],", ").concat(a[5])):s>2&&(e+="S".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]))}return e}(t),i=R,a=(R+=t.length)-1;S?x=k.move(I[i][0],I[i][1])+e:C?x=k.move(z[i][0],z[i][1])+k.line(I[i][0],I[i][1])+e+k.line(z[a][0],z[a][1]):(x=k.move(I[i][0],I[i][1])+e,b=x+k.line(I[a][0],A)+k.line(I[i][0],A)+"z",v.push(b)),m.push(x)})),C&&X>1&&!S){var E=m.slice(X).reverse();m.splice(X),E.forEach((function(t){return m.push(t)}))}p=0}break;case"smooth":var Y=.35*(n-u);if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.curve(n,o,n,o,n,c)+k.move(n,c)),b+=k.curve(n,o,n,o,n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o;break;default:var F=function(t,e,i){var a=[];switch(t){case"stepline":a=k.line(e,null,"H")+k.line(null,i,"V");break;case"linestep":a=k.line(null,i,"V")+k.line(e,null,"H");break;case"straight":a=k.line(e,i)}return a};if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.line(n,c)),b+=k.line(n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o}return{linePaths:m,areaPaths:v,pX:u,pY:g,pathState:p,segmentStartX:f,linePath:x,areaPath:b}}},{key:"handleNullDataPoints",value:function(t,e,i,a,s){var r=this.w;if(null===t[i][a]&&r.config.markers.showNullDataPoints||1===t[i].length){var n=this.strokeWidth-r.config.markers.strokeWidth/2;n>0||(n=0);var o=this.markers.plotChartMarkers(e,s,a+1,n,!0);null!==o&&this.elPointsMain.add(o)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,a,s){this.xoffset=e,this.yoffset=i,this.height=s,this.width=a,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],a=this.xoffset,s=this.yoffset,n=r(t)/this.height,o=r(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var a=e/this.height,s=this.width-a;i=new t(this.xoffset+a,this.yoffset,s,this.height)}else{var r=e/this.width,n=this.height-r;i=new t(this.xoffset,this.yoffset+r,this.width,n)}return i}}function e(e,a,s,n,o){n=void 0===n?0:n,o=void 0===o?0:o;var l=i(function(t,e){var i,a=[],s=e/r(t);for(i=0;i=n}(e,l=t[0],o)?(e.push(l),i(t.slice(1),e,s,n)):(h=s.cutArea(r(e),n),n.push(s.getCoordinates(e)),i(t,[],h,n)),n;n.push(s.getCoordinates(e))}function a(t,e){var i=Math.min.apply(Math,t),a=Math.max.apply(Math,t),s=r(t);return Math.max(Math.pow(e,2)*a/Math.pow(s,2),Math.pow(s,2)/(Math.pow(e,2)*i))}function s(t){return t&&t.constructor===Array}function r(t){var e,i=0;for(e=0;er-a&&l.width<=n-s){var h=o.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(h.x," ").concat(h.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,i,a,s,r){var n=new Mi(this.ctx),o=n.getTextRects(t,e).width+this.w.config.stroke.width+5>s-i&&r-a>s-i?r-a:s-i,l=n.getTextBasedOnMaxWidth({text:t,maxWidth:o,fontSize:e});return t.length!==l.length&&o/e<5?"":l}},{key:"animateTreemap",value:function(t,e,i,a){var s=new y(this.ctx);s.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,(function(){s.animationCompleted(t)}))}}]),t}(),ja=86400,Va=10/ja,Ua=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return s(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new zi(this.ctx),r=(e-t)/864e5;this.determineInterval(r),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,r5e4&&(a.globals.disableZoomOut=!0);var n=s.getTimeUnitsfromTimestamp(t,e,this.utc),o=a.globals.gridWidth/r,l=o/24,h=l/60,c=h/60,d=Math.floor(24*r),g=Math.floor(1440*r),p=Math.floor(r*ja),f=Math.floor(r),x=Math.floor(r/30),b=Math.floor(r/365),m={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},v={firstVal:m,currentMillisecond:m.minMillisecond,currentSecond:m.minSecond,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:l,minutesWidthOnXAxis:h,secondsWidthOnXAxis:c,numberOfSeconds:p,numberOfMinutes:g,numberOfHours:d,numberOfDays:f,numberOfMonths:x,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var y=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?u(u({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?u(u({},e),{},{value:t.value}):"minute"===t.unit?u(u({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?u(u({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return y.filter((function(t){var e=1,s=Math.ceil(a.globals.gridWidth/120),r=t.value;void 0!==a.config.xaxis.tickAmount&&(s=a.config.xaxis.tickAmount),y.length>s&&(e=Math.floor(y.length/s));var n=!1,o=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(n=!0);break;case"half_year":e=7,"year"===t.unit&&(n=!0);break;case"months":e=1,"year"===t.unit&&(n=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(n=!0),30===r&&(o=!0);break;case"months_days":e=10,"month"===t.unit&&(n=!0),30===r&&(o=!0);break;case"week_days":e=8,"month"===t.unit&&(n=!0);break;case"days":e=1,"month"===t.unit&&(n=!0);break;case"hours":"day"===t.unit&&(n=!0);break;case"minutes_fives":case"seconds_fives":r%5!=0&&(o=!0);break;case"seconds_tens":r%10!=0&&(o=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!o)return!0}else if((r%e==0||n)&&!o)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,a=this.formatDates(t),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new pa(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.daysWidthOnXAxis,r=t.numberOfYears,n=e.minYear,o=0,l=new zi(this.ctx),h="year";if(e.minDate>1||e.minMonth>0){var c=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(l.determineDaysOfYear(e.minYear)-c+1)*s,n=e.minYear+1,this.timeScaleArray.push({position:o,value:n,unit:h,year:n,month:v.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:o,value:n,unit:h,year:a,month:v.monthMod(i+1)});for(var d=n,u=o,g=0;g1){l=(h.determineDaysOfMonths(a+1,e.minYear)-i+1)*r,o=v.monthMod(a+1);var u=s+d,g=v.monthMod(o),p=o;0===o&&(c="year",p=u,g=1,u+=d+=1),this.timeScaleArray.push({position:l,value:p,unit:c,year:u,month:g})}else this.timeScaleArray.push({position:l,value:o,unit:c,year:s,month:v.monthMod(a)});for(var f=o+1,x=l,b=0,m=1;bn.determineDaysOfMonths(e+1,i)?(h=1,o="month",u=e+=1,e):e},d=(24-e.minHour)*s,u=l,g=c(h,i,a);0===e.minHour&&1===e.minDate?(d=0,u=v.monthMod(e.minMonth),o="month",h=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(d=0,l=e.minDate,u=l,g=c(h=l,i,a)),this.timeScaleArray.push({position:d,value:u,unit:o,year:this._getYear(a,g,0),month:v.monthMod(g),day:h});for(var p=d,f=0;fo.determineDaysOfMonths(e+1,s)&&(f=1,e+=1),{month:e,date:f}},c=function(t,e){return t>o.determineDaysOfMonths(e+1,s)?e+=1:e},d=60-(e.minMinute+e.minSecond/60),u=d*r,g=e.minHour+1,p=g;60===d&&(u=0,p=g=e.minHour);var f=i;p>=24&&(p=0,l="day",g=f+=1);var x=h(f,a).month;x=c(f,x),this.timeScaleArray.push({position:u,value:g,unit:l,day:f,hour:p,year:s,month:v.monthMod(x)}),p++;for(var b=u,m=0;m=24)p=0,l="day",x=h(f+=1,x).month,x=c(f,x);var y=this._getYear(s,x,0);b=60*r+b;var w=0===p?f:p;this.timeScaleArray.push({position:b,value:w,unit:l,hour:p,day:f,year:y,month:v.monthMod(x)}),p++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.minutesWidthOnXAxis,h=t.secondsWidthOnXAxis,c=t.numberOfMinutes,d=a+1,u=r,g=n,p=o,f=s,x=(60-i-e/1e3)*h,b=0;b=60&&(d=0,24===(f+=1)&&(f=0)),this.timeScaleArray.push({position:x,value:d,unit:"minute",hour:f,minute:d,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,d++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.secondsWidthOnXAxis,h=t.numberOfSeconds,c=i+1,d=a,u=r,g=n,p=o,f=s,x=(1e3-e)/1e3*l,b=0;b=60&&(c=0,++d>=60&&(d=0,24===++f&&(f=0))),this.timeScaleArray.push({position:x,value:c,unit:"second",hour:f,minute:d,second:c,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,c++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var a=t.value.toString(),s=new zi(e.ctx),r=e.createRawDateString(t,a),n=s.getDate(s.parseDate(r));if(e.utc||(n=s.getDate(s.parseDateWithTimezone(r))),void 0===i.config.xaxis.labels.format){var o="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(o=l.year),"month"===t.unit&&(o=l.month),"day"===t.unit&&(o=l.day),"hour"===t.unit&&(o=l.hour),"minute"===t.unit&&(o=l.minute),"second"===t.unit&&(o=l.second),a=s.formatDate(n,o)}else a=s.formatDate(n,i.config.xaxis.labels.format);return{dateString:r,position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,a=new Mi(this.ctx),s=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(s=!0,e=a.getTextRects(t[0].value).width);var r=0,n=t.map((function(n,o){if(o>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=s?e:a.getTextRects(t[r].value).width,h=t[r].position;return n.position>h+l+10?(r=o,n):null}return n}));return n=n.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),qa=function(){function t(e,a){i(this,t),this.ctx=a,this.w=a.w,this.el=e}return s(t,[{key:"setupElements",value:function(){var t=this.w,e=t.globals,i=t.config,a=i.chart.type;e.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(a),e.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(a),e.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(a)&&i.plotOptions.bar.horizontal,e.chartClass=".apexcharts".concat(e.chartID),e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),Mi.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas ".concat(e.chartClass.substring(1))}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=window.SVG().addTo(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(i.chart.offsetX,", ").concat(i.chart.offsetY,")")}),e.dom.Paper.node.style.background="dark"!==i.theme.mode||i.chart.background?"light"!==i.theme.mode||i.chart.background?i.chart.background:"#fff":"#424242",this.setSVGDimensions(),e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject"),Mi.setAttrs(e.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap),e.dom.Paper.node.appendChild(e.dom.elLegendForeign),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,a=this.ctx,s=i.config,r=i.globals,n={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},o=s.chart.type||"line",l=null,h=0;r.series.forEach((function(e,a){var s=t[a].type||o;n[s]?("rangeArea"===s?(n[s].series.push(r.seriesRangeStart[a]),n[s].seriesRangeEnd.push(r.seriesRangeEnd[a])):n[s].series.push(e),n[s].i.push(a),"column"!==s&&"bar"!==s||(i.globals.columnSeries=n.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(s)?l=s:"bar"===s?(n.column.series.push(e),n.column.i.push(a)):console.warn("You have specified an unrecognized series type (".concat(s,").")),o!==s&&"scatter"!==s&&h++})),h>0&&(l&&console.warn("Chart or series type ".concat(l," cannot appear with other chart or series types.")),n.column.series.length>0&&s.plotOptions.bar.horizontal&&(h-=n.column.series.length,n.column={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||(r.comboCharts=h>0);var c=new Ba(a,e),d=new Ta(a,e);a.pie=new Ea(a);var u=new Ha(a);a.rangeBar=new Oa(a,e);var g=new Ya(a),p=[];if(r.comboCharts){var x,b,m=new Pi(a);if(n.area.series.length>0)(x=p).push.apply(x,f(m.drawSeriesByGroup(n.area,r.areaGroups,"area",c)));if(n.column.series.length>0)if(s.chart.stacked){var v=new Ia(a,e);p.push(v.draw(n.column.series,n.column.i))}else a.bar=new Pa(a,e),p.push(a.bar.draw(n.column.series,n.column.i));if(n.rangeArea.series.length>0&&p.push(c.draw(n.rangeArea.series,"rangeArea",n.rangeArea.i,n.rangeArea.seriesRangeEnd)),n.line.series.length>0)(b=p).push.apply(b,f(m.drawSeriesByGroup(n.line,r.lineGroups,"line",c)));if(n.candlestick.series.length>0&&p.push(d.draw(n.candlestick.series,"candlestick",n.candlestick.i)),n.boxPlot.series.length>0&&p.push(d.draw(n.boxPlot.series,"boxPlot",n.boxPlot.i)),n.rangeBar.series.length>0&&p.push(a.rangeBar.draw(n.rangeBar.series,n.rangeBar.i)),n.scatter.series.length>0){var y=new Ba(a,e,!0);p.push(y.draw(n.scatter.series,"scatter",n.scatter.i))}if(n.bubble.series.length>0){var w=new Ba(a,e,!0);p.push(w.draw(n.bubble.series,"bubble",n.bubble.i))}}else switch(s.chart.type){case"line":p=c.draw(r.series,"line");break;case"area":p=c.draw(r.series,"area");break;case"bar":if(s.chart.stacked)p=new Ia(a,e).draw(r.series);else a.bar=new Pa(a,e),p=a.bar.draw(r.series);break;case"candlestick":p=new Ta(a,e).draw(r.series,"candlestick");break;case"boxPlot":p=new Ta(a,e).draw(r.series,s.chart.type);break;case"rangeBar":p=a.rangeBar.draw(r.series);break;case"rangeArea":p=c.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":p=new Xa(a,e).draw(r.series);break;case"treemap":p=new Ga(a,e).draw(r.series);break;case"pie":case"donut":case"polarArea":p=a.pie.draw(r.series);break;case"radialBar":p=u.draw(r.series);break;case"radar":p=g.draw(r.series);break;default:p=c.draw(r.series)}return p}},{key:"setSVGDimensions",value:function(){var t=this.w,e=t.globals,i=t.config;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto",e.svgWidth=i.chart.width,e.svgHeight=i.chart.height;var a=v.getDimensions(this.el),s=i.chart.width.toString().split(/[0-9]+/g).pop();"%"===s?v.isNumber(a[0])&&(0===a[0].width&&(a=v.getDimensions(this.el.parentNode)),e.svgWidth=a[0]*parseInt(i.chart.width,10)/100):"px"!==s&&""!==s||(e.svgWidth=parseInt(i.chart.width,10));var r=String(i.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===r){var n=v.getDimensions(this.el.parentNode);e.svgHeight=n[1]*parseInt(i.chart.height,10)/100}else e.svgHeight=parseInt(i.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Mi.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==r){var o=i.chart.sparkline.enabled?0:e.axisCharts?i.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(e.svgHeight+o,"px")}e.dom.elWrap.style.width="".concat(e.svgWidth,"px"),e.dom.elWrap.style.height="".concat(e.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i=t.translateX;Mi.setAttrs(t.dom.elGraphical.node,{transform:"translate(".concat(i,", ").concat(e,")")})}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,a=t.config.chart.sparkline.enabled?1:15;a+=t.config.grid.padding.bottom,["top","bottom"].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(i=new xa(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var s=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*t.globals.radialSize;if(s&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var n=v.getBoundingClientRect(s);r=n.bottom;var o=n.bottom-n.top;r=Math.max(2.05*t.globals.radialSize,o)}var l=Math.ceil(r+e.translateY+i+a);e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).includes("%")||(e.dom.elWrap.style.height="".concat(l,"px"),Mi.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(l,"px"))}},{key:"coreCalculations",value:function(){new ea(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(){return[]}))},i=new Bi,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=e(),a.seriesYvalues=e()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var t=this.w,e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new na(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new na(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Ua(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new Pi(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var i=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];i.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){return t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){return t.updateSourceChart(i)})})),e.config.chart.events.selection=function(t,e){i.forEach((function(t){ApexCharts.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:e.xaxis.min,max:e.xaxis.max}},!1,!1,!1,!1)}))}}}}]),t}(),Za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"_updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(n){var o=[e.ctx];s&&(o=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(o=[e.ctx],e.ctx.w.globals.isExecCalled=!1),o.forEach((function(s,l){var h=s.w;if(h.globals.shouldAnimate=a,i||(h.globals.resized=!0,h.globals.dataChanged=!0,a&&s.series.getPreviousPaths()),t&&"object"===b(t)&&(s.config=new Wi(t),t=Pi.extendArrayProps(s.config,t,h),s.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,h.config=v.extend(h.config,t),r&&(h.globals.lastXAxis=t.xaxis?v.clone(t.xaxis):[],h.globals.lastYAxis=t.yaxis?v.clone(t.yaxis):[],h.globals.initialConfig=v.extend({},h.config),h.globals.initialSeries=v.clone(h.config.series),t.series))){for(var c=0;c2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(s){var r,n=i.w;return n.globals.shouldAnimate=e,n.globals.dataChanged=!0,e&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?(0===(r=t.map((function(t,e){return i._extendSeries(t,e)}))).length&&(r=[{data:[]}]),n.config.series=r):n.config.series=t.slice(),a&&(n.globals.initialConfig.series=v.clone(n.config.series),n.globals.initialSeries=v.clone(n.config.series)),i.ctx.update().then((function(){s(i.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var i=this.w,a=i.config.series[e];return u(u({},i.config.series[e]),{},{name:t.name?t.name:null==a?void 0:a.name,color:t.color?t.color:null==a?void 0:a.color,type:t.type?t.type:null==a?void 0:a.type,group:t.group?t.group:null==a?void 0:a.group,hidden:void 0!==t.hidden?t.hidden:null==a?void 0:a.hidden,data:t.data?t.data:null==a?void 0:a.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(e,"'], ").concat(s," circle[j='").concat(e,"'], ").concat(s," rect[j='").concat(e,"']")):void 0===e&&(a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(t,"']")),"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),a?(new Mi(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new Ni(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;t&&t.xaxis&&(a=t.xaxis),t&&t.yaxis&&(s=t.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;var r=function(t){void 0!==s[t]&&(i.config.yaxis[t].min=s[t].min,i.config.yaxis[t].max=s[t].max)};i.config.yaxis.map((function(t,a){i.globals.zoomed||void 0!==s[a]?r(a):void 0!==e.ctx.opts.yaxis[a]&&(t.min=e.ctx.opts.yaxis[a].min,t.max=e.ctx.opts.yaxis[a].max)}))}}]),t}();!function(){function t(){for(var t=arguments.length>0&&arguments[0]!==h?arguments[0]:[],s=arguments.length>1?arguments[1]:h,r=arguments.length>2?arguments[2]:h,n=arguments.length>3?arguments[3]:h,o=arguments.length>4?arguments[4]:h,l=arguments.length>5?arguments[5]:h,h=arguments.length>6?arguments[6]:h,c=t.slice(s,r||h),d=n.slice(o,l||h),u=0,g={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};;){if(c[u]=e.call(g,c[u]),d[u]=e.call(p,d[u]),c[u][0]!=d[u][0]||"M"==c[u][0]||"A"==c[u][0]&&(c[u][4]!=d[u][4]||c[u][5]!=d[u][5])?(Array.prototype.splice.apply(c,[u,1].concat(a.call(g,c[u]))),Array.prototype.splice.apply(d,[u,1].concat(a.call(p,d[u])))):(c[u]=i.call(g,c[u]),d[u]=i.call(p,d[u])),++u==c.length&&u==d.length)break;u==c.length&&c.push(["C",g.pos[0],g.pos[1],g.pos[0],g.pos[1],g.pos[0],g.pos[1]]),u==d.length&&d.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]])}return{start:c,dest:d}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function i(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function a(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var i,a,s,r,n,o,l,h,c,d,u,g,p,f,x,b,m,v,y,w,k,A,C,S,L,M,P=Math.abs(e[1]),I=Math.abs(e[2]),T=e[3]%360,z=e[4],X=e[5],R=e[6],E=e[7],Y=new bt(t),H=new bt(R,E),O=[];if(0===P||0===I||Y.x===H.x&&Y.y===H.y)return[["C",Y.x,Y.y,H.x,H.y,H.x,H.y]];i=new bt((Y.x-H.x)/2,(Y.y-H.y)/2).transform((new vt).rotate(T)),a=i.x*i.x/(P*P)+i.y*i.y/(I*I),a>1&&(P*=a=Math.sqrt(a),I*=a);s=(new vt).rotate(T).scale(1/P,1/I).rotate(-T),Y=Y.transform(s),H=H.transform(s),r=[H.x-Y.x,H.y-Y.y],o=r[0]*r[0]+r[1]*r[1],n=Math.sqrt(o),r[0]/=n,r[1]/=n,l=o<4?Math.sqrt(1-o/4):0,z===X&&(l*=-1);h=new bt((H.x+Y.x)/2+l*-r[1],(H.y+Y.y)/2+l*r[0]),c=new bt(Y.x-h.x,Y.y-h.y),d=new bt(H.x-h.x,H.y-h.y),u=Math.acos(c.x/Math.sqrt(c.x*c.x+c.y*c.y)),c.y<0&&(u*=-1);g=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(g*=-1);X&&u>g&&(g+=2*Math.PI);!X&&u0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(!1===e)return!1;for(var i=e,a=t.length;i(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class Ja{constructor(t){t.remember("_draggable",this),this.el=t,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(t){t?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(t){const e=!t.type.indexOf("mouse");if(e&&1!==t.which&&0!==t.buttons)return;if(this.el.dispatch("beforedrag",{event:t,handler:this}).defaultPrevented)return;t.preventDefault(),t.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point($a(t));const i=(e?"mouseup":"touchend")+".drag";zt(window,(e?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),zt(window,i,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:t,handler:this,box:this.box})}drag(t){const{box:e,lastClick:i}=this,a=this.el.point($a(t)),s=a.x-i.x,r=a.y-i.y;if(!s&&!r)return e;const n=e.x+s,o=e.y+r;this.box=new kt(n,o,e.w,e.h),this.lastClick=a,this.el.dispatch("dragmove",{event:t,handler:this,box:this.box}).defaultPrevented||this.move(n,o)}move(t,e){"svg"===this.el.type?gi.prototype.move.call(this.el,t,e):this.el.move(t,e)}endDrag(t){this.drag(t),this.el.fire("dragend",{event:t,handler:this,box:this.box}),Xt(window,"mousemove.drag"),Xt(window,"touchmove.drag"),Xt(window,"mouseup.drag"),Xt(window,"touchend.drag"),this.init(!0)}} +function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=Array(e);i=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,n=!0,o=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){o=!0,r=t},f:function(){try{n||null==i.return||i.return()}finally{if(o)throw r}}}}function n(t){var i=c();return function(){var a,s=l(t);if(i){var r=l(this).constructor;a=Reflect.construct(s,arguments,r)}else a=s.apply(this,arguments);return function(t,i){if(i&&("object"==typeof i||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return e(t)}(this,a)}}function o(t,e,i){return(e=x(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function d(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function u(t){for(var e=1;e>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-r)*s)+r)+256*(Math.round((a-n)*s)+n)+(Math.round((a-o)*s)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,i){return t.isColorHex(i)?this.shadeHexColor(e,i):this.shadeRGBColor(e,i)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===b(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,i=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var i="",a=t<0?"-":"",s=e[0].replace(".",""),r=Number(e[1])+1;if(r<0){for(i=a+"0.";r++;)i+="0";return i+s.replace(/^-/,"")}for(r-=s.length;r--;)i+="0";return s+i}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),i=t.clientHeight,a=t.clientWidth;return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[a-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),i]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:"x",i=t.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,i){if(i>=t.length)for(var a=i-t.length+1;a--;)t.push(void 0);return t.splice(i,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style.key=e[i])}},{key:"preciseAddition",value:function(t,e){var i=(String(t).split(".")[1]||"").length,a=(String(e).split(".")[1]||"").length,s=Math.pow(10,Math.max(i,a));return(Math.round(t*s)+Math.round(e*s))/s}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*a),e=Math.round(Math.abs(e)*a);e;){var s=e;e=t%e,t=s}return t/a}},{key:"getPrimeFactors",value:function(t){for(var e=[],i=2;t>=2;)t%i==0?(e.push(i),t/=i):i++;return e}},{key:"mod",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*a))%(e=Math.round(Math.abs(e)*a))/a}}]),t}(),y=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"animateLine",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animateMarker",value:function(t,e,i,a){t.attr({opacity:0}).animate(e).attr({opacity:1}).after((function(){a()}))}},{key:"animateRect",value:function(t,e,i,a,s){t.attr(e).animate(a).attr(i).after((function(){return s()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.realIndex,a=t.j,s=t.fill,r=t.pathFrom,n=t.pathTo,o=t.speed,l=t.delay,h=this.w,c=0;h.config.chart.animations.animateGradually.enabled&&(c=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&"bar"!==h.config.chart.type&&(c=0),this.morphSVG(e,i,a,"line"!==h.config.chart.type||h.globals.comboCharts?s:"stroke",r,n,o,l*c)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){var e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,i,a,s,r,n,o){var l=this,h=this.w;s||(s=t.attr("pathFrom")),r||(r=t.attr("pathTo"));var c=function(t){return"radar"===h.config.chart.type&&(n=1),"M 0 ".concat(h.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=c()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=c()),h.globals.shouldAnimate||(n=1),t.plot(s).animate(1,o).plot(s).animate(n,o).plot(r).after((function(){v.isNumber(i)?i===h.globals.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&l.animationCompleted(t):"none"!==a&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&e===h.globals.series.length-1||h.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}]),t}();const w={},k=[];function A(t,e){if(Array.isArray(t))for(const i of t)A(i,e);else if("object"!=typeof t)S(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(const e in t)A(e,t[e])}function C(t){return w[t]||{}}function S(t){k.push(...t)}function L(t,e){let i;const a=t.length,s=[];for(i=0;iz.has(t.nodeName),R=(t,e,i={})=>{const a={...e};for(const t in a)a[t].valueOf()===i[t]&&delete a[t];Object.keys(a).length?t.node.setAttribute("data-svgjs",JSON.stringify(a)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},Y="http://www.w3.org/2000/svg",E="http://www.w3.org/2000/xmlns/",H="http://www.w3.org/1999/xlink",O={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function F(){return O.window}let D=class{};const _={},N="___SYMBOL___ROOT___";function W(t,e=Y){return O.document.createElementNS(e,t)}function B(t,e=!1){if(t instanceof D)return t;if("object"==typeof t)return U(t);if(null==t)return new _[N];if("string"==typeof t&&"<"!==t.charAt(0))return U(O.document.querySelector(t));const i=e?O.document.createElement("div"):W("svg");return i.innerHTML=t,t=U(i.firstChild),i.removeChild(i.firstChild),t}function G(t,e){return e&&(e instanceof O.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:W(t)}function V(t){if(!t)return null;if(t.instance instanceof D)return t.instance;if("#document-fragment"===t.nodeName)return new _.Fragment(t);let e=P(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":_[e]||(e="Dom"),new _[e](t)}let U=V;function q(t,e=t.name,i=!1){return _[e]=t,i&&(_[N]=t),S(Object.getOwnPropertyNames(t.prototype)),t}let Z=1e3;function $(t){return"Svgjs"+P(t)+Z++}function J(t){for(let e=t.children.length-1;e>=0;e--)J(t.children[e]);return t.id?(t.id=$(t.nodeName),t):t}function Q(t,e){let i,a;for(a=(t=Array.isArray(t)?t:[t]).length-1;a>=0;a--)for(i in e)t[a].prototype[i]=e[i]}function K(t){return function(...e){const i=e[e.length-1];return!i||i.constructor!==Object||i instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(i)}}A("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=B(t)).before(this),this},insertAfter:function(t){return(t=B(t)).after(this),this}});const tt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,et=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,it=/rgb\((\d+),(\d+),(\d+)\)/,at=/(#[a-z_][a-z0-9\-_]*)/i,st=/\)\s*,?\s*/,rt=/\s/g,nt=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ot=/^rgb\(/,lt=/^(\s+)?$/,ht=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ct=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,dt=/[\s,]+/,ut=/[MLHVCSQTAZ]/i;function gt(t){const e=Math.round(t),i=Math.max(0,Math.min(255,e)).toString(16);return 1===i.length?"0"+i:i}function pt(t,e){for(let i=e.length;i--;)if(null==t[e[i]])return!1;return!0}function ft(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}A("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(dt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),A("Dom",{css:function(t,e){const i={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);i[e[0]]=e[1]})),i;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;i[e]=this.node.style.getPropertyValue(t)}return i}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||lt.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||lt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),A("Dom",{data:function(t,e,i){if(null==t)return this.data(L(function(t,e){let i;const a=t.length,s=[];for(i=0;i0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const i of t)e[i]=this.data(i);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===i||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),A("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class xt{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof xt||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:i,round:a,sin:s,PI:r}=Math;if("vibrant"===t){const t=24*i()+57,e=38*i()+45,a=360*i();return new xt(t,e,a,"lch")}if("sine"===t){const t=a(80*s(2*r*(e=null==e?i():e)/.5+.01)+150),n=a(50*s(2*r*e/.5+4.6)+200),o=a(100*s(2*r*e/.5+2.3)+150);return new xt(t,n,o)}if("pastel"===t){const t=8*i()+86,e=17*i()+9,a=360*i();return new xt(t,e,a,"lch")}if("dark"===t){const t=10+10*i(),e=50*i()+86,a=360*i();return new xt(t,e,a,"lch")}if("rgb"===t){const t=255*i(),e=255*i(),a=255*i();return new xt(t,e,a)}if("lab"===t){const t=100*i(),e=256*i()-128,a=256*i()-128;return new xt(t,e,a,"lab")}if("grey"===t){const t=255*i();return new xt(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(nt.test(t)||ot.test(t))}cmyk(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.min(1-a,1-s,1-r);if(1===n)return new xt(0,0,0,1,"cmyk");return new xt((1-a-n)/(1-n),(1-s-n)/(1-n),(1-r-n)/(1-n),n,"cmyk")}hsl(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.max(a,s,r),o=Math.min(a,s,r),l=(n+o)/2,h=n===o,c=n-o;return new xt(360*(h?0:n===a?((s-r)/c+(s.5?c/(2-n-o):c/(n+o)),100*l,"hsl")}init(t=0,e=0,i=0,a=0,s="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)s="string"==typeof a?a:s,a="string"==typeof a?0:a,Object.assign(this,{_a:t,_b:e,_c:i,_d:a,space:s});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const i=function(t,e){const i=pt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:pt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:pt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:pt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:pt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:pt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return i.space=e||i.space,i}(t,e);Object.assign(this,i)}else if("string"==typeof t)if(ot.test(t)){const e=t.replace(rt,""),[i,a,s]=it.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}else{if(!nt.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,i,a,s]=et.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}}const{_a:r,_b:n,_c:o,_d:l}=this,h="rgb"===this.space?{r:r,g:n,b:o}:"xyz"===this.space?{x:r,y:n,z:o}:"hsl"===this.space?{h:r,s:n,l:o}:"lab"===this.space?{l:r,a:n,b:o}:"lch"===this.space?{l:r,c:n,h:o}:"cmyk"===this.space?{c:r,m:n,y:o,k:l}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:i}=this.xyz();return new xt(116*e-16,500*(t-e),200*(e-i),"lab")}lch(){const{l:t,a:e,b:i}=this.lab(),a=Math.sqrt(e**2+i**2);let s=180*Math.atan2(i,e)/Math.PI;s<0&&(s*=-1,s=360-s);return new xt(t,a,s,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:a,a:s,b:r}=this;if("lch"===this.space){const{c:t,h:e}=this,i=Math.PI/180;s=t*Math.cos(i*e),r=t*Math.sin(i*e)}const n=(a+16)/116,o=s/500+n,l=n-r/200,h=16/116,c=.008856,d=7.787;t=.95047*(o**3>c?o**3:(o-h)/d),e=1*(n**3>c?n**3:(n-h)/d),i=1.08883*(l**3>c?l**3:(l-h)/d)}const a=3.2406*t+-1.5372*e+-.4986*i,s=-.9689*t+1.8758*e+.0415*i,r=.0557*t+-.204*e+1.057*i,n=Math.pow,o=.0031308,l=a>o?1.055*n(a,1/2.4)-.055:12.92*a,h=s>o?1.055*n(s,1/2.4)-.055:12.92*s,c=r>o?1.055*n(r,1/2.4)-.055:12.92*r;return new xt(255*l,255*h,255*c)}if("hsl"===this.space){let{h:t,s:e,l:i}=this;if(t/=360,e/=100,i/=100,0===e){i*=255;return new xt(i,i,i)}const a=i<.5?i*(1+e):i+e-i*e,s=2*i-a,r=255*ft(s,a,t+1/3),n=255*ft(s,a,t),o=255*ft(s,a,t-1/3);return new xt(r,n,o)}if("cmyk"===this.space){const{c:t,m:e,y:i,k:a}=this,s=255*(1-Math.min(1,t*(1-a)+a)),r=255*(1-Math.min(1,e*(1-a)+a)),n=255*(1-Math.min(1,i*(1-a)+a));return new xt(s,r,n)}return this;var t}toArray(){const{_a:t,_b:e,_c:i,_d:a,space:s}=this;return[t,e,i,a,s]}toHex(){const[t,e,i]=this._clamped().map(gt);return`#${t}${e}${i}`}toRgb(){const[t,e,i]=this._clamped();return`rgb(${t},${e},${i})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,o=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,l=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,h=(.4124*n+.3576*o+.1805*l)/.95047,c=(.2126*n+.7152*o+.0722*l)/1,d=(.0193*n+.1192*o+.9505*l)/1.08883,u=h>.008856?Math.pow(h,1/3):7.787*h+16/116,g=c>.008856?Math.pow(c,1/3):7.787*c+16/116,p=d>.008856?Math.pow(d,1/3):7.787*d+16/116;return new xt(u,g,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:i}=this.rgb(),{max:a,min:s,round:r}=Math;return[t,e,i].map((t=>a(0,s(r(t),255))))}}class bt{constructor(...t){this.init(...t)}clone(){return new bt(this)}init(t,e){const i=0,a=0,s=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==s.x?i:s.x,this.y=null==s.y?a:s.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){vt.isMatrixLike(t)||(t=new vt(t));const{x:e,y:i}=this;return this.x=t.a*e+t.c*i+t.e,this.y=t.b*e+t.d*i+t.f,this}}function mt(t,e,i){return Math.abs(e-t)<(i||1e-6)}class vt{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,i=t.flip&&(e||"x"===t.flip)?-1:1,a=t.flip&&(e||"y"===t.flip)?-1:1,s=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,r=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,n=t.scale&&t.scale.length?t.scale[0]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleX)?t.scaleX*i:i,o=t.scale&&t.scale.length?t.scale[1]*a:isFinite(t.scale)?t.scale*a:isFinite(t.scaleY)?t.scaleY*a:a,l=t.shear||0,h=t.rotate||t.theta||0,c=new bt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),d=c.x,u=c.y,g=new bt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=g.x,f=g.y,x=new bt(t.translate||t.tx||t.translateX,t.ty||t.translateY),b=x.x,m=x.y,v=new bt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:n,scaleY:o,skewX:s,skewY:r,shear:l,theta:h,rx:v.x,ry:v.y,tx:b,ty:m,ox:d,oy:u,px:p,py:f}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,i){const a=t.a*e.a+t.c*e.b,s=t.b*e.a+t.d*e.b,r=t.a*e.c+t.c*e.d,n=t.b*e.c+t.d*e.d,o=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return i.a=a,i.b=s,i.c=r,i.d=n,i.e=o,i.f=l,i}around(t,e,i){return this.clone().aroundO(t,e,i)}aroundO(t,e,i){const a=t||0,s=e||0;return this.translateO(-a,-s).lmultiplyO(i).translateO(a,s)}clone(){return new vt(this)}decompose(t=0,e=0){const i=this.a,a=this.b,s=this.c,r=this.d,n=this.e,o=this.f,l=i*r-a*s,h=l>0?1:-1,c=h*Math.sqrt(i*i+a*a),d=Math.atan2(h*a,h*i),u=180/Math.PI*d,g=Math.cos(d),p=Math.sin(d),f=(i*s+a*r)/l,x=s*c/(f*i-a)||r*c/(f*a+i);return{scaleX:c,scaleY:x,shear:f,rotate:u,translateX:n-t+t*g*c+e*(f*g*c-p*x),translateY:o-e+t*p*c+e*(f*p*c+g*x),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new vt(t);return mt(this.a,e.a)&&mt(this.b,e.b)&&mt(this.c,e.c)&&mt(this.d,e.d)&&mt(this.e,e.e)&&mt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=vt.fromArray([1,0,0,1,0,0]);return t=t instanceof Gt?t.matrixify():"string"==typeof t?vt.fromArray(t.split(dt).map(parseFloat)):Array.isArray(t)?vt.fromArray(t):"object"==typeof t&&vt.isMatrixLike(t)?t:"object"==typeof t?(new vt).transform(t):6===arguments.length?vt.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,i=this.c,a=this.d,s=this.e,r=this.f,n=t*a-e*i;if(!n)throw new Error("Cannot invert "+this);const o=a/n,l=-e/n,h=-i/n,c=t/n,d=-(o*s+h*r),u=-(l*s+c*r);return this.a=o,this.b=l,this.c=h,this.d=c,this.e=d,this.f=u,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(this,e,this)}rotate(t,e,i){return this.clone().rotateO(t,e,i)}rotateO(t,e=0,i=0){t=M(t);const a=Math.cos(t),s=Math.sin(t),{a:r,b:n,c:o,d:l,e:h,f:c}=this;return this.a=r*a-n*s,this.b=n*a+r*s,this.c=o*a-l*s,this.d=l*a+o*s,this.e=h*a-c*s+i*s-e*a+e,this.f=c*a+h*s-e*s-i*a+i,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t);const{a:s,b:r,c:n,d:o,e:l,f:h}=this;return this.a=s*t,this.b=r*e,this.c=n*t,this.d=o*e,this.e=l*t-i*t+i,this.f=h*e-a*e+a,this}shear(t,e,i){return this.clone().shearO(t,e,i)}shearO(t,e=0,i=0){const{a:a,b:s,c:r,d:n,e:o,f:l}=this;return this.a=a+s*t,this.c=r+n*t,this.e=o+l*t-i*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t),t=M(t),e=M(e);const s=Math.tan(t),r=Math.tan(e),{a:n,b:o,c:l,d:h,e:c,f:d}=this;return this.a=n+o*s,this.b=o+n*r,this.c=l+h*s,this.d=h+l*r,this.e=c+d*s-a*s,this.f=d+c*r-i*r,this}skewX(t,e,i){return this.skew(t,0,e,i)}skewY(t,e,i){return this.skew(0,t,e,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(vt.isMatrixLike(t)){return new vt(t).multiplyO(this)}const e=vt.formatTransforms(t),{x:i,y:a}=new bt(e.ox,e.oy).transform(this),s=(new vt).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-i,-a).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(i,a);if(isFinite(e.px)||isFinite(e.py)){const t=new bt(i,a).transform(s),r=isFinite(e.px)?e.px-t.x:0,n=isFinite(e.py)?e.py-t.y:0;s.translateO(r,n)}return s.translateO(e.tx,e.ty),s}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function yt(){if(!yt.nodes){const t=B().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;yt.nodes={svg:t,path:e}}if(!yt.nodes.svg.node.parentNode){const t=O.document.body||O.document.documentElement;yt.nodes.svg.addTo(t)}return yt.nodes}function wt(t){return!(t.width||t.height||t.x||t.y)}q(vt,"Matrix");class kt{constructor(...t){this.init(...t)}addOffset(){return this.x+=O.window.pageXOffset,this.y+=O.window.pageYOffset,new kt(this)}init(t){return t="string"==typeof t?t.split(dt).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return wt(this)}merge(t){const e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),a=Math.max(this.x+this.width,t.x+t.width)-e,s=Math.max(this.y+this.height,t.y+t.height)-i;return new kt(e,i,a,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof vt||(t=new vt(t));let e=1/0,i=-1/0,a=1/0,s=-1/0;return[new bt(this.x,this.y),new bt(this.x2,this.y),new bt(this.x,this.y2),new bt(this.x2,this.y2)].forEach((function(r){r=r.transform(t),e=Math.min(e,r.x),i=Math.max(i,r.x),a=Math.min(a,r.y),s=Math.max(s,r.y)})),new kt(e,a,i-e,s-a)}}function At(t,e,i){let a;try{if(a=e(t.node),wt(a)&&((s=t.node)!==O.document&&!(O.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===O.document}).call(O.document.documentElement,s)))throw new Error("Element not in the dom")}catch(e){a=i(t)}var s;return a}A({viewbox:{viewbox(t,e,i,a){return null==t?new kt(this.attr("viewBox")):this.attr("viewBox",new kt(t,e,i,a))},zoom(t,e){let{width:i,height:a}=this.attr(["width","height"]);if((i||a)&&"string"!=typeof i&&"string"!=typeof a||(i=this.node.clientWidth,a=this.node.clientHeight),!i||!a)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const s=this.viewbox(),r=i/s.width,n=a/s.height,o=Math.min(r,n);if(null==t)return o;let l=o/t;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new bt(i/2/r+s.x,a/2/n+s.y);const h=new kt(s).transform(new vt({scale:l,origin:e}));return this.viewbox(h)}}}),q(kt,"Box");class Ct extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}Q([Ct],{each(t,...e){return"function"==typeof t?this.map(((e,i,a)=>t.call(e,e,i,a))):this.map((i=>i[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const St=["toArray","constructor","each"];function Lt(t,e){return new Ct(L((e||O.document).querySelectorAll(t),(function(t){return V(t)})))}Ct.extend=function(t){t=t.reduce(((t,e)=>(St.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),Q([Ct],t)};let Mt=0;const Pt={};function It(t){let e=t.getEventHolder();return e===O.window&&(e=Pt),e.events||(e.events={}),e.events}function Tt(t){return t.getEventTarget()}function zt(t,e,i,a,s){const r=i.bind(a||t),n=B(t),o=It(n),l=Tt(n);e=Array.isArray(e)?e:e.split(dt),i._svgjsListenerId||(i._svgjsListenerId=++Mt),e.forEach((function(t){const e=t.split(".")[0],a=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][a]=o[e][a]||{},o[e][a][i._svgjsListenerId]=r,l.addEventListener(e,r,s||!1)}))}function Xt(t,e,i,a){const s=B(t),r=It(s),n=Tt(s);("function"!=typeof i||(i=i._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(dt)).forEach((function(t){const e=t&&t.split(".")[0],o=t&&t.split(".")[1];let l,h;if(i)r[e]&&r[e][o||"*"]&&(n.removeEventListener(e,r[e][o||"*"][i],a||!1),delete r[e][o||"*"][i]);else if(e&&o){if(r[e]&&r[e][o]){for(h in r[e][o])Xt(n,[e,o].join("."),h);delete r[e][o]}}else if(o)for(t in r)for(l in r[t])o===l&&Xt(n,[t,o].join("."));else if(e){if(r[e]){for(l in r[e])Xt(n,[e,l].join("."));delete r[e]}}else{for(t in r)Xt(n,t);!function(t){let e=t.getEventHolder();e===O.window&&(e=Pt),e.events&&(e.events={})}(s)}}))}class Rt extends D{addEventListener(){}dispatch(t,e,i){return function(t,e,i,a){const s=Tt(t);return e instanceof O.window.Event||(e=new O.window.CustomEvent(e,{detail:i,cancelable:!0,...a})),s.dispatchEvent(e),e}(this,t,e,i)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const i=e[t.type];for(const e in i)for(const a in i[e])i[e][a](t);return!t.defaultPrevented}fire(t,e,i){return this.dispatch(t,e,i),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,i){return Xt(this,t,e,i),this}on(t,e,i,a){return zt(this,t,e,i,a),this}removeEventListener(){}}function Yt(){}q(Rt,"EventTarget");const Et=400,Ht=">",Ot=0,Ft={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Dt extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(dt).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class _t{constructor(...t){this.init(...t)}convert(t){return new _t(this.value,t)}divide(t){return t=new _t(t),new _t(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(tt))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof _t&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new _t(t),new _t(this-t,this.unit||t.unit)}plus(t){return t=new _t(t),new _t(this+t,this.unit||t.unit)}times(t){return t=new _t(t),new _t(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Nt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Wt=[];class Bt extends Rt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=B(t)).removeNamespace&&this.node instanceof O.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return B(t).put(this,e)}children(){return new Ct(L(this.node.children,(function(t){return V(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let i=this.node.cloneNode(t);return e&&(i=J(i)),new this.constructor(i)}each(t,e){const i=this.children();let a,s;for(a=0,s=i.length;a=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=$(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return V(this.node.lastChild)}matches(t){const e=this.node,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return i&&i.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=V(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=V(e.node.parentNode));return e}put(t,e){return t=B(t),this.add(t,e),t}putIn(t,e){return B(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=B(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const i=10**t,a=this.attr(e);for(const t in a)"number"==typeof a[t]&&(a[t]=Math.round(a[t]*i)/i);return this.attr(a),this}svg(t,e){return this.xml(t,e,Y)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const i=e.index(this);return e.put(t,i).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let i=this;if(null!=t){if(i=V(i.node.cloneNode(!0)),e){const e=t(i);if(i=e||i,!1===e)return""}i.each((function(){const e=t(this),i=e||this;!1===e?this.remove():e&&this!==i&&this.replace(i)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;const a=W("wrapper",i),s=O.document.createDocumentFragment();a.innerHTML=t;for(let t=a.children.length;t--;)s.appendChild(a.firstElementChild);const r=this.parent();return e?this.replace(s)&&r:this.add(s)}}Q(Bt,{attr:function(t,e,i){if(null==t){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=ht.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ft[t]:ht.test(e)?parseFloat(e):e;"number"==typeof(e=Wt.reduce(((e,i)=>i(t,e,this)),e))?e=new _t(e):Nt.has(t)&&xt.isColor(e)?e=new xt(e):e.constructor===Array&&(e=new Dt(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return Lt(t,this.node)},findOne:function(t){return V(this.node.querySelector(t))}}),q(Bt,"Dom");class Gt extends Bt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new _t(t).plus(this.x()))}dy(t=0){return this.y(new _t(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=B(t));const i=new Ct;let a=this;for(;(a=a.parent())&&a.node!==O.document&&"#document-fragment"!==a.nodeName&&(i.push(a),e||a.node!==t.node)&&(!e||!a.matches(t));)if(a.node===this.root().node)return null;return i}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(at);return e?B(e[1]):null}root(){const t=this.parent(function(t){return _[t]}(N));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const i=I(this,t,e);return this.width(new _t(i.width)).height(new _t(i.height))}width(t){return this.attr("width",t)}writeDataToDom(){return R(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}Q(Gt,{bbox:function(){const t=At(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(yt().svg).show(),i=e.node.getBBox();return e.remove(),i}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new kt(t)},rbox:function(t){const e=At(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),i=new kt(e);return t?i.transform(t.screenCTM().inverseO()):i.addOffset()},inside:function(t,e){const i=this.bbox();return t>i.x&&e>i.y&&t=0;i--)null!=e[jt[t][i]]&&this.attr(jt.prefix(t,jt[t][i]),e[jt[t][i]]);return this},A(["Element","Runner"],e)})),A(["Element","Runner"],{matrix:function(t,e,i,a,s,r){return null==t?new vt(this):this.attr("transform",new vt(t,e,i,a,s,r))},rotate:function(t,e,i){return this.transform({rotate:t,ox:e,oy:i},!0)},skew:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:i},!0):this.transform({skew:[t,e],ox:i,oy:a},!0)},shear:function(t,e,i){return this.transform({shear:t,ox:e,oy:i},!0)},scale:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:i},!0):this.transform({scale:[t,e],ox:i,oy:a},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),A("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new _t(t)):this.rx(t).ry(e)}}),A("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new bt(this.node.getPointAtLength(t))}}),A(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});A("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),A("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){const t=(this.attr("transform")||"").split(st).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(dt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(vt.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new vt);return t},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);const i=this.screenCTM(),a=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(a.multiply(i)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new vt(this).decompose();return null==t?e:e[t]}vt.isMatrixLike(t)||(t={...t,origin:T(t,this)});const i=new vt(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});class Vt extends Gt{flatten(){return this.each((function(){if(this instanceof Vt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(i,a){return a[a.length-i-1].toParent(t,e)})),this.remove()}}q(Vt,"Container");class Ut extends Vt{constructor(t,e=t){super(G("defs",t),e)}flatten(){return this}ungroup(){return this}}q(Ut,"Defs");class qt extends Gt{}function Zt(t){return this.attr("rx",t)}function $t(t){return this.attr("ry",t)}function Jt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Qt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Kt(t){return this.attr("cx",t)}function te(t){return this.attr("cy",t)}function ee(t){return null==t?2*this.rx():this.rx(new _t(t).divide(2))}function ie(t){return null==t?2*this.ry():this.ry(new _t(t).divide(2))}q(qt,"Shape");var ae=Object.freeze({__proto__:null,cx:Kt,cy:te,height:ie,rx:Zt,ry:$t,width:ee,x:Jt,y:Qt});class se extends qt{constructor(t,e=t){super(G("ellipse",t),e)}size(t,e){const i=I(this,t,e);return this.rx(new _t(i.width).divide(2)).ry(new _t(i.height).divide(2))}}Q(se,ae),A("Container",{ellipse:K((function(t=0,e=t){return this.put(new se).size(t,e).move(0,0)}))}),q(se,"Ellipse");class re extends Bt{constructor(t=O.document.createDocumentFragment()){super(t)}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){const t=new Bt(W("wrapper",i));return t.add(this.node.cloneNode(!0)),t.xml(!1,i)}return super.xml(t,!1,i)}}function ne(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new _t(t),fy:new _t(e)}):this.attr({x1:new _t(t),y1:new _t(e)})}function oe(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new _t(t),cy:new _t(e)}):this.attr({x2:new _t(t),y2:new _t(e)})}q(re,"Fragment");var le=Object.freeze({__proto__:null,from:ne,to:oe});class he extends Vt{constructor(t,e){super(G(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,i){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}Q(he,le),A({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:K((function(t,e){return this.put(new he(t)).update(e)}))}}),q(he,"Gradient");class ce extends Vt{constructor(t,e=t){super(G("pattern",t),e)}attr(t,e,i){return"transform"===t&&(t="patternTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}A({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:K((function(t,e,i){return this.put(new ce).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),q(ce,"Pattern");let de=class extends qt{constructor(t,e=t){super(G("image",t),e)}load(t,e){if(!t)return this;const i=new O.window.Image;return zt(i,"load",(function(t){const a=this.parent(ce);0===this.width()&&0===this.height()&&this.size(i.width,i.height),a instanceof ce&&0===a.width()&&0===a.height()&&a.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),zt(i,"load error",(function(){Xt(i)})),this.attr("href",i.src=t,H)}};var ue;ue=function(t,e,i){return"fill"!==t&&"stroke"!==t||ct.test(e)&&(e=i.root().defs().image(e)),e instanceof de&&(e=i.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Wt.push(ue),A({Container:{image:K((function(t,e){return this.put(new de).size(0,0).load(t,e)}))}}),q(de,"Image");class ge extends Dt{bbox(){let t=-1/0,e=-1/0,i=1/0,a=1/0;return this.forEach((function(s){t=Math.max(s[0],t),e=Math.max(s[1],e),i=Math.min(s[0],i),a=Math.min(s[1],a)})),new kt(i,a,t-i,e-a)}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let i=this.length-1;i>=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(dt).map(parseFloat)).length%2!=0&&t.pop();for(let i=0,a=t.length;i=0;i--)a.width&&(this[i][0]=(this[i][0]-a.x)*t/a.width+a.x),a.height&&(this[i][1]=(this[i][1]-a.y)*e/a.height+a.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,i=this.length;e":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,i,a){return function(s){return s<0?t>0?e/t*s:i>0?a/i*s:0:s>1?i<1?(1-a)/(1-i)*s+(a-i)/(1-i):t<1?(1-e)/(1-t)*s+(e-t)/(1-t):1:3*s*(1-s)**2*e+3*s**2*(1-s)*a+s**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let i=t;return"none"===e?--i:"both"===e&&++i,(a,s=!1)=>{let r=Math.floor(a*t);const n=a*r%1==0;return"start"!==e&&"both"!==e||++r,s&&n&&--r,a>=0&&r<0&&(r=0),a<=1&&r>i&&(r=i),r/i}}};class ye{done(){return!1}}class we extends ye{constructor(t=Ht){super(),this.ease=ve[t]||t}step(t,e,i){return"number"!=typeof t?i<1?t:e:t+(e-t)*this.ease(i)}}class ke extends ye{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,i,a){return this.stepper(t,e,i,a)}}function Ae(){const t=(this._duration||500)/1e3,e=this._overshoot||0,i=Math.PI,a=Math.log(e/100+1e-10),s=-a/Math.sqrt(i*i+a*a),r=3.9/(s*t);this.d=2*s*r,this.k=r*r}Q(class extends ke{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;i>100&&(i=16),i/=1e3;const s=a.velocity||0,r=-this.d*s-this.k*(t-e),n=t+s*i+r*i*i/2;return a.velocity=s+r*i,a.done=Math.abs(e-n)+Math.abs(s)<.002,a.done?e:n}},{duration:me("_duration",Ae),overshoot:me("_overshoot",Ae)});Q(class extends ke{constructor(t=.1,e=.01,i=0,a=1e3){super(),this.p(t).i(e).d(i).windup(a)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;const s=e-t;let r=(a.integral||0)+s*i;const n=(s-(a.error||0))/i,o=this._windup;return!1!==o&&(r=Math.max(-o,Math.min(r,o))),a.error=s,a.integral=r,a.done=Math.abs(s)<.001,a.done?e:t+(this.P*s+this.I*r+this.D*n)}},{windup:me("_windup"),p:me("P"),i:me("I"),d:me("D")});const Ce={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Se={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Le="mlhvqtcsaz".split("");for(let t=0,e=Le.length;t=0;a--)i=this[a][0],"M"===i||"L"===i||"T"===i?(this[a][1]+=t,this[a][2]+=e):"H"===i?this[a][1]+=t:"V"===i?this[a][1]+=e:"C"===i||"S"===i||"Q"===i?(this[a][1]+=t,this[a][2]+=e,this[a][3]+=t,this[a][4]+=e,"C"===i&&(this[a][5]+=t,this[a][6]+=e)):"A"===i&&(this[a][6]+=t,this[a][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let i=0,a="";const s={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new bt,p:new bt};for(;s.lastToken=a,a=t.charAt(i++);)if(s.inSegment||!Pe(s,a))if("."!==a)if(isNaN(parseInt(a)))if(Re.has(a))s.inNumber&&Ie(s,!1);else if("-"!==a&&"+"!==a)if("E"!==a.toUpperCase()){if(ut.test(a)){if(s.inNumber)Ie(s,!1);else{if(!Me(s))throw new Error("parser Error");Te(s)}--i}}else s.number+=a,s.hasExponent=!0;else{if(s.inNumber&&!Xe(s)){Ie(s,!1),--i;continue}s.number+=a,s.inNumber=!0}else{if("0"===s.number||ze(s)){s.inNumber=!0,s.number=a,Ie(s,!0);continue}s.inNumber=!0,s.number+=a}else{if(s.pointSeen||s.hasExponent){Ie(s,!1),--i;continue}s.inNumber=!0,s.pointSeen=!0,s.number+=a}return s.inNumber&&Ie(s,!1),s.inSegment&&Me(s)&&Te(s),s.segments}(t)}size(t,e){const i=this.bbox();let a,s;for(i.width=0===i.width?1:i.width,i.height=0===i.height?1:i.height,a=this.length-1;a>=0;a--)s=this[a][0],"M"===s||"L"===s||"T"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y):"H"===s?this[a][1]=(this[a][1]-i.x)*t/i.width+i.x:"V"===s?this[a][1]=(this[a][1]-i.y)*e/i.height+i.y:"C"===s||"S"===s||"Q"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y,this[a][3]=(this[a][3]-i.x)*t/i.width+i.x,this[a][4]=(this[a][4]-i.y)*e/i.height+i.y,"C"===s&&(this[a][5]=(this[a][5]-i.x)*t/i.width+i.x,this[a][6]=(this[a][6]-i.y)*e/i.height+i.y)):"A"===s&&(this[a][1]=this[a][1]*t/i.width,this[a][2]=this[a][2]*e/i.height,this[a][6]=(this[a][6]-i.x)*t/i.width+i.x,this[a][7]=(this[a][7]-i.y)*e/i.height+i.y);return this}toString(){return function(t){let e="";for(let i=0,a=t.length;i{const e=typeof t;return"number"===e?_t:"string"===e?xt.isColor(t)?xt:dt.test(t)?ut.test(t)?Ye:Dt:tt.test(t)?_t:Oe:Ne.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Dt:"object"===e?_e:Oe};class He{constructor(t){this._stepper=t||new we("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Ee(t));let e=new this._type(t);return this._type===xt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===_e&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Oe{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Fe{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Fe.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Fe.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const De=(t,e)=>t[0]e[0]?1:0;class _e{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let i=0,a=e.length;it.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const i=e.shift(),a=e.shift(),s=e.shift(),r=e.splice(0,s);t[i]=new a(r)}return t}}const Ne=[Oe,Fe,_e];class We extends qt{constructor(t,e=t){super(G("path",t),e)}array(){return this._array||(this._array=new Ye(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Ye(t))}size(t,e){const i=I(this,t,e);return this.attr("d",this.array().size(i.width,i.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}We.prototype.MorphArray=Ye,A({Container:{path:K((function(t){return this.put(new We).plot(t||new Ye)}))}}),q(We,"Path");var Be=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new ge(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new ge(t))},size:function(t,e){const i=I(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}});class Ge extends qt{constructor(t,e=t){super(G("polygon",t),e)}}A({Container:{polygon:K((function(t){return this.put(new Ge).plot(t||new ge)}))}}),Q(Ge,fe),Q(Ge,Be),q(Ge,"Polygon");class je extends qt{constructor(t,e=t){super(G("polyline",t),e)}}A({Container:{polyline:K((function(t){return this.put(new je).plot(t||new ge)}))}}),Q(je,fe),Q(je,Be),q(je,"Polyline");class Ve extends qt{constructor(t,e=t){super(G("rect",t),e)}}Q(Ve,{rx:Zt,ry:$t}),A({Container:{rect:K((function(t,e){return this.put(new Ve).size(t,e)}))}}),q(Ve,"Rect");class Ue{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const qe={nextDraw:null,frames:new Ue,timeouts:new Ue,immediates:new Ue,timer:()=>O.window.performance||O.window.Date,transforms:[],frame(t){const e=qe.frames.push({run:t});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},timeout(t,e){e=e||0;const i=qe.timer().now()+e,a=qe.timeouts.push({run:t,time:i});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),a},immediate(t){const e=qe.immediates.push(t);return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},cancelFrame(t){null!=t&&qe.frames.remove(t)},clearTimeout(t){null!=t&&qe.timeouts.remove(t)},cancelImmediate(t){null!=t&&qe.immediates.remove(t)},_draw(t){let e=null;const i=qe.timeouts.last();for(;(e=qe.timeouts.shift())&&(t>=e.time?e.run():qe.timeouts.push(e),e!==i););let a=null;const s=qe.frames.last();for(;a!==s&&(a=qe.frames.shift());)a.run(t);let r=null;for(;r=qe.immediates.shift();)r();qe.nextDraw=qe.timeouts.first()||qe.frames.first()?O.window.requestAnimationFrame(qe._draw):null}},Ze=function(t){const e=t.start,i=t.runner.duration();return{start:e,duration:i,end:e+i,runner:t.runner}},$e=function(){const t=O.window;return(t.performance||t.Date).now()};class Je extends Rt{constructor(t=$e){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const i=Math.abs(e);return this.speed(t?-i:i)}schedule(t,e,i){if(null==t)return this._runners.map(Ze);let a=0;const s=this.getEndTime();if(e=e||0,null==i||"last"===i||"after"===i)a=s;else if("absolute"===i||"start"===i)a=e,e=0;else if("now"===i)a=this._time;else if("relative"===i){const i=this.getRunnerInfoById(t.id);i&&(a=i.start+e,e=0)}else{if("with-last"!==i)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();a=t?t.start:this._time}}t.unschedule(),t.timeline(this);const r=t.persist(),n={persist:null===r?this._persist:r,start:a+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(n),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return qe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let i=e-this._lastSourceTime;t&&(i=0);const a=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=a,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],i=e.runner;this._time-e.start<=0&&i.reset()}let s=!1;for(let t=0,e=this._runners.length;t0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}A({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Je,this._timeline):(this._timeline=t,this)}}});class Qe extends Rt{constructor(t){super(),this.id=Qe.id++,t="function"==typeof(t=null==t?Et:t)?new ke(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ke,this._stepper=this._isDeclarative?t:new we,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new vt,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,i){let a=1,s=!1,r=0;return e=e??Ot,i=i||"last","object"!=typeof(t=t??Et)||t instanceof ye||(e=t.delay??e,i=t.when??i,s=t.swing||s,a=t.times??a,r=t.wait??r,t=t.duration??Et),{duration:t,delay:e,swing:s,times:a,wait:r,when:i}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,i){const a=Qe.sanitise(t,e,i),s=new Qe(a.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(a).schedule(a.delay,a.when)}clearTransform(){return this.transforms=new vt,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new we(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,i){return"object"==typeof t&&(e=t.swing,i=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=i||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),i=(this._time-t*e)/this._duration;return Math.min(t+i,this._times)}const i=t%1,a=e*Math.floor(t)+this._duration*i;return this.time(a)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,i=this._duration,a=this._wait,s=this._times,r=this._swing,n=this._reverse;let o;if(null==t){const t=function(t){const e=r*Math.floor(t%(2*(a+i))/(a+i)),s=e&&!n||!e&&n,o=Math.pow(-1,s)*(t%(a+i))/i+s;return Math.max(Math.min(o,1),0)},l=s*(a+i)-a;return o=e<=0?Math.round(t(1e-5)):e=0;this._lastPosition=e;const a=this.duration(),s=this._lastTime<=0&&this._time>0,r=this._lastTime=a;this._lastTime=this._time,s&&this.fire("start",this);const n=this._isDeclarative;this.done=!n&&!r&&this._time>=a,this._reseted=!1;let o=!1;return(i||n)&&(this._initialise(i),this.transforms=new vt,o=this._run(n?t:e),this.fire("step",this)),this.done=this.done||o&&n,r&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,i=this._queue.length;et.lmultiplyO(e),ei=t=>t.transforms;function ii(){const t=this._transformationRunners.runners.map(ei).reduce(ti,new vt);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class ai{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Ke).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const i=this.ids.indexOf(t+1);return this.ids.splice(i,1,t+1),this.runners.splice(i,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;ee.id<=t.id)).map(ei).reduce(ti,new vt)},_addRunner(t){this._transformationRunners.add(t),qe.cancelImmediate(this._frameId),this._frameId=qe.immediate(ii.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new ai).add(new Ke(new vt(this))))}}});Q(Qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,i){if("string"==typeof e)return this.styleAttr(t,{[e]:i});let a=e;if(this._tryRetarget(t,a))return this;let s=new He(this._stepper).to(a),r=Object.keys(a);return this.queue((function(){s=s.from(this.element()[t](r))}),(function(e){return this.element()[t](s.at(e).valueOf()),s.done()}),(function(e){const i=Object.keys(e),n=(o=r,i.filter((t=>!o.includes(t))));var o;if(n.length){const e=this.element()[t](n),i=new _e(s.from()).valueOf();Object.assign(i,e),s.from(i)}const l=new _e(s.to()).valueOf();Object.assign(l,e),s.to(l),r=i,a=e})),this._rememberMorpher(t,s),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let i=new He(this._stepper).to(new _t(t));return this.queue((function(){i=i.from(this.element().zoom())}),(function(t){return this.element().zoom(i.at(t),e),i.done()}),(function(t,a){e=a,i.to(t)})),this._rememberMorpher("zoom",i),this},transform(t,e,i){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const a=vt.isMatrixLike(t);i=null!=t.affine?t.affine:null!=i?i:!a;const s=new He(this._stepper).type(i?Fe:vt);let r,n,o,l,h;return this.queue((function(){n=n||this.element(),r=r||T(t,n),h=new vt(e?void 0:n),n._addRunner(this),e||n._clearTransformRunnersBefore(this)}),(function(c){e||this.clearTransform();const{x:d,y:u}=new bt(r).transform(n._currentTransform(this));let g=new vt({...t,origin:[d,u]}),p=this._isDeclarative&&o?o:h;if(i){g=g.decompose(d,u),p=p.decompose(d,u);const t=g.rotate,e=p.rotate,i=[t-360,t,t+360],a=i.map((t=>Math.abs(t-e))),s=Math.min(...a),r=a.indexOf(s);g.rotate=i[r]}e&&(a||(g.rotate=t.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),s.from(p),s.to(g);const f=s.at(c);return l=f.rotate,o=new vt(f),this.addTransform(o),n._addRunner(this),s.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(r=T(e,n)),t={...e,origin:r}}),!0),this._isDeclarative&&this._rememberMorpher("transform",s),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new _t(e),this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);let a=null;return this.queue((function(){a=this.element()[t](),i.from(a),i.to(a+e)}),(function(e){return this.element()[t](i.at(e)),i.done()}),(function(t){i.to(a+new _t(t))})),this._rememberMorpher(t,i),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);return this.queue((function(){i.from(this.element()[t]())}),(function(e){return this.element()[t](i.at(e)),i.done()})),this._rememberMorpher(t,i),this},_queueNumber(t,e){return this._queueObject(t,new _t(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let i;return t&&e||(i=this._element.bbox()),t||(t=i.width/i.height*e),e||(e=i.height/i.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,i,a){if(4===arguments.length)return this.plot([t,e,i,a]);if(this._tryRetarget("plot",t))return this;const s=new He(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){s.from(this._element.array())}),(function(t){return this._element.plot(s.at(t)),s.done()})),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,i,a){return this._queueObject("viewbox",new kt(t,e,i,a))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Q(Qe,{rx:Zt,ry:$t,from:ne,to:oe}),q(Qe,"Runner");class si extends Vt{constructor(t,e=t){super(G("svg",t),e),this.namespace()}defs(){return this.isRoot()?V(this.node.querySelector("defs"))||this.put(new Ut):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof O.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:Y,version:"1.1"}).attr("xmlns:xlink",H,E):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,E).attr("xmlns:svgjs",null,E)}root(){return this.isRoot()?this:super.root()}}A({Container:{nested:K((function(){return this.put(new si)}))}}),q(si,"Svg",!0);let ri=class extends Vt{constructor(t,e=t){super(G("symbol",t),e)}};A({Container:{symbol:K((function(){return this.put(new ri)}))}}),q(ri,"Symbol");var ni=Object.freeze({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,i=this.bbox()){return this.cx(t,i).cy(e,i)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,i=this.bbox()){return this.x(t,i).y(e,i)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(O.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}});class oi extends qt{constructor(t,e=t){super(G("text",t),e),this.dom.leading=this.dom.leading??new _t(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new _t(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const i=this.dom.leading;this.each((function(a){if(X(this.node))return;const s=O.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=i*new _t(s);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=r:(this.attr("dy",a?r+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new _t(t.leading||1.3),this}writeDataToDom(){return R(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let i=0;t="";for(let a=0,s=e.length;a{let a;try{a=i.node instanceof F().SVGSVGElement?new kt(i.attr(["x","y","width","height"])):i.bbox()}catch(t){return}const s=new vt(i),r=s.translate(t,e).transform(s.inverse()),n=new bt(a.x,a.y).transform(r);i.move(n.x,n.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,i=this.bbox()){const a=t-i.x,s=e-i.y;return this.dmove(a,s)},size:function(t,e,i=this.bbox()){const a=I(this,t,e,i),s=a.width/i.width,r=a.height/i.height;return this.children().forEach((t=>{const e=new bt(i).transform(new vt(t).inverse());t.scale(s,r,e.x,e.y)})),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}});class gi extends Vt{constructor(t,e=t){super(G("g",t),e)}}Q(gi,ui),A({Container:{group:K((function(){return this.put(new gi)}))}}),q(gi,"G");class pi extends Vt{constructor(t,e=t){super(G("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,H)}}Q(pi,ui),A({Container:{link:K((function(t){return this.put(new pi).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const i=e.index(t);return e.add(this,i),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new pi,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),q(pi,"A");class fi extends Vt{constructor(t,e=t){super(G("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Lt("svg [mask*="+this.id()+"]")}}A({Container:{mask:K((function(){return this.defs().put(new fi)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof fi?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),q(fi,"Mask");class xi extends Gt{constructor(t,e=t){super(G("stop",t),e)}update(t){return("number"==typeof t||t instanceof _t)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new _t(t.offset)),this}}A({Gradient:{stop:function(t,e,i){return this.put(new xi).update(t,e,i)}}}),q(xi,"Stop");class bi extends Gt{constructor(t,e=t){super(G("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,i={}){return this.rule("@font-face",{fontFamily:t,src:e,...i})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let i=t+"{";for(const t in e)i+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return i+="}",i}(t,e))}}A("Dom",{style(t,e){return this.put(new bi).rule(t,e)},fontface(t,e,i){return this.put(new bi).font(t,e,i)}}),q(bi,"Style");class mi extends oi{constructor(t,e=t){super(G("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let i=null;return e&&(i=e.plot(t)),null==t?i:this}track(){return this.reference("href")}}A({Container:{textPath:K((function(t,e){return t instanceof oi||(t=this.text(t)),t.path(e)}))},Text:{path:K((function(t,e=!0){const i=new mi;let a;if(t instanceof We||(t=this.defs().path(t)),i.attr("href","#"+t,H),e)for(;a=this.node.firstChild;)i.node.appendChild(a);return this.put(i)})),textPath(){return this.findOne("textPath")}},Path:{text:K((function(t){return t instanceof oi||(t=(new oi).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Lt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),mi.prototype.MorphArray=Ye,q(mi,"TextPath");class vi extends qt{constructor(t,e=t){super(G("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,H)}}A({Container:{use:K((function(t,e){return this.put(new vi).use(t,e)}))}}),q(vi,"Use");const yi=B;Q([si,ri,de,ce,be],C("viewbox")),Q([xe,je,Ge,We],C("marker")),Q(oi,C("Text")),Q(We,C("Path")),Q(Ut,C("Defs")),Q([oi,li],C("Tspan")),Q([Ve,se,he,Qe],C("radius")),Q(Rt,C("EventTarget")),Q(Bt,C("Dom")),Q(Gt,C("Element")),Q(qt,C("Shape")),Q([Vt,re],C("Container")),Q(he,C("Gradient")),Q(Qe,C("Runner")),Ct.extend([...new Set(k)]),function(t=[]){Ne.push(...[].concat(t))}([_t,xt,kt,vt,Dt,ge,Ye,bt]),Q(Ne,{to(t){return(new He).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,i,a,s){return this.fromArray(t.map((function(t,r){return a.step(t,e[r],i,s[r],s)})))}});class wi extends Gt{constructor(t){super(G("filter",t),t),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(t,e){return!(t=super.put(t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return Lt('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class ki extends Gt{constructor(t,e){super(t,e),this.result(this.id())}in(t){if(null==t){const t=this.attr("in");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in",t)}result(t){return this.attr("result",t)}toString(){return this.result()}}const Ai=t=>function(...e){for(let i=t.length;i--;)null!=e[i]&&this.attr(t[i],e[i])},Ci={blend:Ai(["in","in2","mode"]),colorMatrix:Ai(["type","values"]),composite:Ai(["in","in2","operator"]),convolveMatrix:function(t){t=new Dt(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Ai(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Ai(["in","dx","dy","stdDeviation"]),flood:Ai(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,H)},morphology:Ai(["operator","radius"]),offset:Ai(["dx","dy"]),specularLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Ai([]),turbulence:Ai(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((t=>{const e=P(t),i=Ci[t];wi[e+"Effect"]=class extends ki{constructor(t){super(G("fe"+e,t),t)}update(t){return i.apply(this,t),this}},wi.prototype[t]=K((function(t,...i){const a=new wi[e+"Effect"];return null==t?this.put(a):("function"==typeof t?t.call(a,a):i.unshift(t),this.put(a).update(i))}))})),Q(wi,{merge(t){const e=this.put(new wi.MergeEffect);if("function"==typeof t)return t.call(e,e),e;return(t instanceof Array?t:[...arguments]).forEach((t=>{t instanceof wi.MergeNode?e.put(t):e.mergeNode(t)})),e},componentTransfer(t={}){const e=this.put(new wi.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;if(!(t.r||t.g||t.b||t.a)){t={r:t,g:t,b:t,a:t}}for(const i in t)e.add(new(wi["Func"+i.toUpperCase()])(t[i]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((t=>{const e=P(t);wi[e]=class extends ki{constructor(t){super(G("fe"+e,t),t)}}}));["funcR","funcG","funcB","funcA"].forEach((function(t){const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.ComponentTransferEffect.prototype[t]=i}));["distantLight","pointLight","spotLight"].forEach((t=>{const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.DiffuseLightingEffect.prototype[t]=i,wi.SpecularLightingEffect.prototype[t]=i})),Q(wi.MergeEffect,{mergeNode(t){return this.put(new wi.MergeNode).attr("in",t)}}),Q(Ut,{filter:function(t){const e=this.put(new wi);return"function"==typeof t&&t.call(e,e),e}}),Q(Vt,{filter:function(t){return this.defs().filter(t)}}),Q(Gt,{filterWith:function(t){const e=t instanceof wi?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const Si={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,i,a){return this.parent()&&this.parent().diffuseLighting(t,i,a).in(this)},displacementMap:function(t,e,i,a){return this.parent()&&this.parent().displacementMap(this,t,e,i,a)},dropShadow:function(t,e,i){return this.parent()&&this.parent().dropShadow(this,t,e,i).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){return t=t instanceof Array?t:[...t],this.parent()&&this.parent().merge(this,...t)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,i,a,s){return this.parent()&&this.parent().specularLighting(t,i,a,s).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,a,s){return this.parent()&&this.parent().turbulence(t,e,i,a,s).in(this)}};Q(ki,Si),Q(wi.MergeEffect,{in:function(t){return t instanceof wi.MergeNode?this.add(t,0):this.add((new wi.MergeNode).in(t),0),this}}),Q([wi.CompositeEffect,wi.BlendEffect,wi.DisplacementMapEffect],{in2:function(t){if(null==t){const t=this.attr("in2");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in2",t)}}),wi.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var Li=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getDefaultFilter",value:function(t,e){var i=this.w;t.unfilter(!0),(new wi).size("120%","180%","-5%","-40%"),i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"applyFilter",value:function(t,e,i){var a,s=this,r=this.w;if(t.unfilter(!0),"none"!==i){var n,o,l=r.config.chart.dropShadow,h="lighten"===i?2:.3;if(t.filterWith((function(t){t.colorMatrix({type:"matrix",values:"\n ".concat(h," 0 0 0 0\n 0 ").concat(h," 0 0 0\n 0 0 ").concat(h," 0 0\n 0 0 0 1 0\n "),in:"SourceGraphic",result:"brightness"}),l.enabled&&s.addShadow(t,e,l,"brightness")})),!l.noUserSpaceOnUse)null===(n=t.filterer())||void 0===n||null===(o=n.node)||void 0===o||o.setAttribute("filterUnits","userSpaceOnUse");this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node)}else this.getDefaultFilter(t,e)}},{key:"addShadow",value:function(t,e,i,a){var s,r=this.w,n=i.blur,o=i.top,l=i.left,h=i.color,c=i.opacity;if(h=Array.isArray(h)?h[e]:h,(null===(s=r.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:a,dx:l,dy:o,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:n,result:"blur"}),t.flood({"flood-color":h,"flood-opacity":c,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",a])}},{key:"dropShadow",value:function(t,e){var i,a,s,r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.w;if(t.unfilter(!0),v.isMsEdge()&&"radialBar"===o.config.chart.type)return t;if((null===(i=o.config.chart.dropShadow.enabledOnSeries)||void 0===i?void 0:i.length)>0&&-1===(null===(s=o.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.indexOf(n)))return t;return t.filterWith((function(t){r.addShadow(t,n,e,"SourceGraphic")})),e.noUserSpaceOnUse||t.filterer().node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node),t}},{key:"setSelectionFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;"none"!==s&&this.applyFilter(t,e,s.type)}}},{key:"_scaleFilterSize",value:function(t){if(t){!function(e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}}]),t}(),Mi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"roundPathCorners",value:function(t,e){function i(t,e,i){var s=e.x-t.x,r=e.y-t.y,n=Math.sqrt(s*s+r*r);return a(t,e,Math.min(1,i/n))}function a(t,e,i){return{x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}}function s(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function r(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var n=t.split(/[,\s]/).reduce((function(t,e){var i=e.match("([a-zA-Z])(.+)");return i?(t.push(i[1]),t.push(i[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),o=[];if(n.length>1){var l=r(n[0]),h=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(h=["L",l.x,l.y],n[n.length-1]=h),o.push(n[0]);for(var c=1;c2&&"L"==u[0]&&g.length>2&&"L"==g[0]){var p,f,x=r(d),b=r(u),m=r(g);p=i(b,x,e),f=i(b,m,e),s(u,p),u.origPoint=b,o.push(u);var v=a(p,b,.5),y=a(b,f,.5),w=["C",v.x,v.y,y.x,y.y,f.x,f.y];w.origPoint=b,o.push(w)}else o.push(u)}if(h){var k=r(o[o.length-1]);o.push(["Z"]),s(o[0],k)}}else o=n;return o.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":n,"stroke-linecap":o})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,c=this.w.globals.dom.Paper.rect();return c.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":h}),c.node.setAttribute("fill",r),c}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:a,stroke:e,"stroke-width":i})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var i=this.w.globals.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,s=void 0===a?"#a8a8a8":a,r=t.strokeWidth,n=void 0===r?1:r,o=t.fill,l=t.fillOpacity,h=void 0===l?1:l,c=t.strokeOpacity,d=void 0===c?1:c,u=t.classes,g=t.strokeLinecap,p=void 0===g?null:g,f=t.strokeDashArray,x=void 0===f?0:f,b=this.w;return null===p&&(p=b.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(b.globals.gridHeight)),b.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":h,stroke:s,"stroke-opacity":d,"stroke-linecap":p,"stroke-width":n,"stroke-dasharray":x,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){var i=["M",t,e].join(" ");return i}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=[" L",t,e].join(" "):"H"===i?a=[" H",t].join(" "):"V"===i&&(a=[" V",e].join(" ")),a}},{key:"curve",value:function(t,e,i,a,s,r){var n=["C",t,e,i,a,s,r].join(" ");return n}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,s,r,n){var o="A";arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(o="a");var l=[o,t,e,i,a,s,r,n].join(" ");return l}},{key:"renderPaths",value:function(t){var e,i=t.j,a=t.realIndex,s=t.pathFrom,r=t.pathTo,n=t.stroke,o=t.strokeWidth,l=t.strokeLinecap,h=t.fill,c=t.animationDelay,d=t.initialSpeed,g=t.dataChangeSpeed,p=t.className,f=t.chartType,x=t.shouldClipToGrid,b=void 0===x||x,m=t.bindEventsOnPaths,v=void 0===m||m,w=t.drawShadow,k=void 0===w||w,A=this.w,C=new Li(this.ctx),S=new y(this.ctx),L=this.w.config.chart.animations.enabled,M=L&&this.w.config.chart.animations.dynamicAnimation.enabled,P=!!(L&&!A.globals.resized||M&&A.globals.dataChanged&&A.globals.shouldAnimate);P?e=s:(e=r,A.globals.animationEnded=!0);var I=A.config.stroke.dashArray,T=0;T=Array.isArray(I)?I[a]:A.config.stroke.dashArray;var z=this.drawPath({d:e,stroke:n,strokeWidth:o,fill:h,fillOpacity:1,classes:p,strokeLinecap:l,strokeDashArray:T});z.attr("index",a),b&&("bar"===f&&!A.globals.isHorizontal||A.globals.comboCharts?z.attr({"clip-path":"url(#gridRectBarMask".concat(A.globals.cuid,")")}):z.attr({"clip-path":"url(#gridRectMask".concat(A.globals.cuid,")")})),A.config.chart.dropShadow.enabled&&k&&C.dropShadow(z,A.config.chart.dropShadow,a),v&&(z.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,z)),z.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,z)),z.node.addEventListener("mousedown",this.pathMouseDown.bind(this,z))),z.attr({pathTo:r,pathFrom:s});var X={el:z,j:i,realIndex:a,pathFrom:s,pathTo:r,fill:h,strokeWidth:o,delay:c};return!L||A.globals.resized||A.globals.dataChanged?!A.globals.resized&&A.globals.dataChanged||S.showDelayedElements():S.animatePathsGradually(u(u({},X),{},{speed:d})),A.globals.dataChanged&&M&&P&&S.animatePathsGradually(u(u({},X),{},{speed:g})),z}},{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,i,(function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:a,width:s+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:a,width:s}):"squares"===t?r.rect(e,i).fill("none").stroke({color:a,width:s}):"circles"===t&&r.circle(e).fill("none").stroke({color:a,width:s})}))}},{key:"drawGradient",value:function(t,e,i,a,s){var r,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,c=this.w;e.length<9&&0===e.indexOf("#")&&(e=v.hexToRgba(e,a)),i.length<9&&0===i.indexOf("#")&&(i=v.hexToRgba(i,s));var d=0,u=1,g=1,p=null;null!==o&&(d=void 0!==o[0]?o[0]/100:0,u=void 0!==o[1]?o[1]/100:1,g=void 0!==o[2]?o[2]/100:1,p=void 0!==o[3]?o[3]/100:null);var f=!("donut"!==c.config.chart.type&&"pie"!==c.config.chart.type&&"polarArea"!==c.config.chart.type&&"bubble"!==c.config.chart.type);if(r=l&&0!==l.length?c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){(Array.isArray(l[h])?l[h]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){t.stop(d,e,a),t.stop(u,i,s),t.stop(g,i,s),null!==p&&t.stop(p,e,a)})),f){var x=c.globals.gridWidth/2,b=c.globals.gridHeight/2;"bubble"!==c.config.chart.type?r.attr({gradientUnits:"userSpaceOnUse",cx:x,cy:b,r:n}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?r.from(0,0).to(0,1):"diagonal"===t?r.from(0,0).to(1,1):"horizontal"===t?r.from(0,1).to(1,1):"diagonal2"===t&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,i=t.maxWidth,a=t.fontSize,s=t.fontFamily,r=this.getTextRects(e,a,s),n=r.width/e.length,o=Math.floor(i/n);return i-1){var o=i.globals.selectedDataPoints[s].indexOf(r);i.globals.selectedDataPoints[s].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),h=i.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),c=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),a.getDefaultFilter(t,s)}))};c(l),c(h)}t.node.setAttribute("selected","true"),n="true",void 0===i.globals.selectedDataPoints[s]&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(r)}if("true"===n){var d=i.config.states.active.filter;if("none"!==d)a.applyFilter(t,s,d.type);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}}else if("none"!==i.config.states.active.filter.type)if("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice)a.getDefaultFilter(t,s);else{u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,a){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w,n=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),r.globals.dom.Paper.add(n);var o=n.bbox();return s||(o=n.node.getBoundingClientRect()),n.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i/1.1)return void(t.textContent=e.substring(0,a)+"...");t.textContent="."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}(),Pi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getStackedSeriesTotals",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,i=[];if(0===e.globals.series.length)return i;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,i=[];return e.globals.seriesGroups.forEach((function(a){var s=[];e.config.series.forEach((function(t,i){a.indexOf(e.globals.seriesNames[i])>-1&&s.push(i)}));var r=e.globals.series.map((function(t,e){return-1===s.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));i.push(t.getStackedSeriesTotals(r))})),i}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,i=[],a=[],s=[],r=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){s.push(e),a.push(null)})),e.yaxis.forEach((function(t,e){i[e]=[]}));var n=[];e.yaxis.forEach((function(t,a){var o=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,n){if(e.name===t){var l=n;a===n||r?!r||s.indexOf(n)>-1?i[a].push([a,n]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[n].push([n,a]),l=a),o=!0,-1!==(l=s.indexOf(l))&&s.splice(l,1)}}))}))}o||n.push(a)})),i=i.map((function(t,e){var i=[];return t.forEach((function(t){a[t[1]]=t[0],i.push(t[1])})),i}));for(var o=e.yaxis.length-1,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,i){return t===i[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map((function(t,i){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),i}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var i=0;if(Array.isArray(t))for(var a=0;at&&i.globals.seriesX[s][n]0){var g=function(t,e){var i=s.config.yaxis[s.globals.seriesYAxisReverseMap[e]],r=t<0?-1:1;return t=Math.abs(t),i.logarithmic&&(t=a.getBaseLog(i.logBase,t)),-r*t/n[e]};if(r.isMultipleYAxis){l=[];for(var p=0;p0&&e.forEach((function(e){var n=[],o=[];t.i.forEach((function(i,a){s.config.series[i].group===e&&(n.push(t.series[a]),o.push(i))})),n.length>0&&r.push(a.draw(n,i,o))})),r}}],[{key:"checkComboSeries",value:function(t,e){var i=!1,a=0,s=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||a++,void 0!==t.type&&t.type!==e&&s++})),s>0&&(i=!0),{comboBarCount:a,comboCharts:i}}},{key:"extendArrayProps",value:function(t,e,i){var a,s,r,n,o,l;(null!==(a=e)&&void 0!==a&&a.yaxis&&(e=t.extendYAxis(e,i)),null!==(s=e)&&void 0!==s&&s.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(r=e)&&void 0!==r&&null!==(n=r.annotations)&&void 0!==n&&n.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(l=o.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e)));return e}}]),t}(),Ii=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e}return s(t,[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===t.label.orientation){var a=null!==e?e:0,s=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(null!==s){var r=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-r.height+4);var n="top"===t.label.position?r.width:-r.width;s.setAttribute("y",parseFloat(s.getAttribute("y"))+n);var o=this.annoCtx.graphics.rotateAroundCenter(s),l=o.x,h=o.y;s.setAttribute("transform","rotate(-90 ".concat(l," ").concat(h,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=t.getBoundingClientRect(),r=e.label.style.padding,n=r.left,o=r.right,l=r.top,h=r.bottom;if("vertical"===e.label.orientation){var c=[n,o,l,h];l=c[0],h=c[1],n=c[2],o=c[3]}var d=s.left-a.left-n,u=s.top-a.top-l,g=this.annoCtx.graphics.drawRect(d-i.globals.barPadForNumericAxis,u,s.width+n+o,s.height+l+h,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&g.node.classList.add(e.id),g}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,a,s){var r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(a,"']"));if(r){var n=r.parentNode,o=t.addBackgroundToAnno(r,i);o&&(n.insertBefore(o.node,r),i.label.mouseEnter&&o.node.addEventListener("mouseenter",i.label.mouseEnter.bind(t,i)),i.label.mouseLeave&&o.node.addEventListener("mouseleave",i.label.mouseLeave.bind(t,i)),i.label.click&&o.node.addEventListener("click",i.label.click.bind(t,i)))}};e.config.annotations.xaxis.forEach((function(t,e){return i(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return i(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return i(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var i,a=this.w,s="y1"===t?e.y:e.y2,r=!1;if(this.annoCtx.invertAxis){var n=a.config.xaxis.convertedCatToNumeric?a.globals.categoryLabels:a.globals.labels,o=n.indexOf(s),l=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(o+1,")"));i=l?parseFloat(l.getAttribute("y")):(a.globals.gridHeight/n.length-1)*(o+1)-a.globals.barHeight,void 0!==e.seriesIndex&&a.globals.barHeight&&(i-=a.globals.barHeight/2*(a.globals.series.length-1)-a.globals.barHeight*e.seriesIndex)}else{var h,c=a.globals.seriesYAxisMap[e.yAxisIndex][0],d=a.config.yaxis[e.yAxisIndex].logarithmic?new Pi(this.annoCtx.ctx).getLogVal(a.config.yaxis[e.yAxisIndex].logBase,s,c)/a.globals.yLogRatio[c]:(s-a.globals.minYArr[c])/(a.globals.yRange[c]/a.globals.gridHeight);i=a.globals.gridHeight-Math.min(Math.max(d,0),a.globals.gridHeight),r=d>a.globals.gridHeight||d<0,!e.marker||void 0!==e.y&&null!==e.y||(i=0),null!==(h=a.config.yaxis[e.yAxisIndex])&&void 0!==h&&h.reversed&&(i=d)}return"string"==typeof s&&s.includes("px")&&(i=parseFloat(s)),{yP:i,clipped:r}}},{key:"getX1X2",value:function(t,e){var i=this.w,a="x1"===t?e.x:e.x2,s=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,r=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,n=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,o=!1,l=this.annoCtx.inversedReversedAxis?(r-a)/(n/i.globals.gridWidth):(a-s)/(n/i.globals.gridWidth);return"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||i.config.chart.sparkline.enabled||(l=this.getStringX(a)),"string"==typeof a&&a.includes("px")&&(l=parseFloat(a)),null==a&&e.marker&&(l=i.globals.gridWidth),void 0!==e.seriesIndex&&i.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=i.globals.barWidth/2*(i.globals.series.length-1)-i.globals.barWidth*e.seriesIndex),l>i.globals.gridWidth?(l=i.globals.gridWidth,o=!0):l<0&&(l=0,o=!0),{x:l,clipped:o}}},{key:"getStringX",value:function(t){var e=this.w,i=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var a=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),s=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(a+1,")"));return s&&(i=parseFloat(s.getAttribute("x"))),i}}]),t}(),Ti=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addXaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=this.helpers.getX1X2("x1",t),n=r.x,o=r.clipped,l=!0,h=t.label.text,c=t.strokeDashArray;if(v.isNumber(n)){if(null===t.x2||void 0===t.x2){if(!o){var d=this.annoCtx.graphics.drawLine(n+t.offsetX,0+t.offsetY,n+t.offsetX,s.globals.gridHeight+t.offsetY,t.borderColor,c,t.borderWidth);e.appendChild(d.node),t.id&&d.node.classList.add(t.id)}}else{var u=this.helpers.getX1X2("x2",t);if(a=u.x,l=u.clipped,!o||!l){if(a12?u-12:0===u?12:u;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(g))).replace(/(^|[^\\])h/g,"$1"+g);var p=a?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var x=a?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);var b=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var m=u<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));var v=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var y=-t.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){var k=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(k)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var A=(a?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(n[0],"g"),n[A])).replace(new RegExp(o[0],"g"),o[A])).replace(new RegExp(s[0],"g"),s[c])).replace(new RegExp(r[0],"g"),r[c])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var a=this.w;void 0!==a.config.xaxis.min&&(t=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(e=a.config.xaxis.max);var s=this.getDate(t),r=this.getDate(e),n=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=v.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),Xi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return s(t,[{key:"xLabelFormat",value:function(t,e,i,a){var s=this.w;if("datetime"===s.config.xaxis.type&&void 0===s.config.xaxis.labels.formatter&&void 0===s.config.tooltip.x.formatter){var r=new zi(this.ctx);return r.formatDate(r.getDate(e),s.config.tooltip.x.format)}return t(e,i,a)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,i){var a=this.w;if(v.isNumber(t))if(0!==a.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:a.globals.yValueDecimal);else{var s=t.toFixed(0);t=t==s?s:t.toFixed(1)}return t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(v.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(v.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var i=e.globals.maxX-e.globals.minX;return i>0&&i<100?t.toFixed(1):t.toFixed(0)}if(e.globals.isBarHorizontal)if(e.globals.maxY-e.globals.minYArr<4)return t.toFixed(1);return t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,a){void 0!==i.labels.formatter?e.globals.yLabelFormatters[a]=i.labels.formatter:e.globals.yLabelFormatters[a]=function(s){return e.globals.xyCharts?Array.isArray(s)?s.map((function(e){return t.defaultYFormatter(e,i,a)})):t.defaultYFormatter(s,i,a):s}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),Ri=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getLabel",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",n=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,l=void 0===t[a]?"":t[a],h=l,c=o.globals.xLabelFormatter,d=o.config.xaxis.labels.formatter,u=!1,g=new Xi(this.ctx),p=l;n&&(h=g.xLabelFormat(c,l,p,{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o}),void 0!==d&&(h=d(l,t[a],{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o})));var f,x;e.length>0?(f=e[a].unit,x=null,e.forEach((function(t){"month"===t.unit?x="year":"day"===t.unit?x="month":"hour"===t.unit?x="day":"minute"===t.unit&&(x="hour")})),u=x===f,i=e[a].position,h=e[a].value):"datetime"===o.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var b=new Mi(this.ctx),m={};m=o.globals.rotateXLabels&&n?b.getTextRects(h,parseInt(r,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):b.getTextRects(h,parseInt(r,10));var v=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||s.indexOf(h)>=0&&v)&&(h=""),{x:i,text:h,textRect:m,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var a=this.w,s=a.config.xaxis.tickAmount;return"dataPoints"===s&&(s=Math.round(a.globals.gridWidth/120)),s>i||t%Math.round(i/(s+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,a,s){var r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=s[s.length-1];e.xa.length||a.some((function(t){return Array.isArray(t.seriesName)}))?t:i.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,i=e.config.yaxis[t];if(!i.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!i.showForNullSeries){var a=e.globals.seriesYAxisMap[t],s=new Pi(this.ctx);return a.every((function(t){return s.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,i,a,s,r,n){var o=this.w,l=new Mi(this.ctx),h=o.globals.translateY+o.config.yaxis[s].labels.offsetY;if(o.globals.isBarHorizontal?h=0:"heatmap"===o.config.chart.type&&(h+=r/2),a.show&&e>0){!0===o.config.yaxis[s].opposite&&(t+=a.width);for(var c=e;c>=0;c--){var d=l.drawLine(t+i.offsetX-a.width+a.offsetX,h+a.offsetY,t+i.offsetX+a.offsetX,h+a.offsetY,a.color);n.add(d),h+=r}}}}]),t}(),Yi=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx),this.axesUtils=new Ri(this.annoCtx)}return s(t,[{key:"addYaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=t.strokeDashArray,n=this.helpers.getY1Y2("y1",t),o=n.yP,l=n.clipped,h=!0,c=!1,d=t.label.text;if(null===t.y2||void 0===t.y2){if(!l){c=!0;var u=this.annoCtx.graphics.drawLine(0+t.offsetX,o+t.offsetY,this._getYAxisAnnotationWidth(t),o+t.offsetY,t.borderColor,r,t.borderWidth);e.appendChild(u.node),t.id&&u.node.classList.add(t.id)}}else{if(a=(n=this.helpers.getY1Y2("y2",t)).yP,h=n.clipped,a>o){var g=o;o=a,a=g}if(!l||!h){c=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,a+t.offsetY,this._getYAxisAnnotationWidth(t),o-a,0,t.fillColor,t.opacity,1,t.borderColor,r);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(c){var f="right"===t.label.position?s.globals.gridWidth:"center"===t.label.position?s.globals.gridWidth/2:0,x=this.annoCtx.graphics.drawText({x:f+t.label.offsetX,y:(null!=a?a:o)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});x.attr({rel:i}),e.appendChild(x.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;e.globals.gridWidth;return(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,a){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,i.node,a)})),i}}]),t}(),Ei=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addPointAnnotation",value:function(t,e,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",t),s=a.x,r=a.clipped,n=(a=this.helpers.getY1Y2("y1",t)).yP,o=a.clipped;if(v.isNumber(s)&&!o&&!r){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},h=this.annoCtx.graphics.drawMarker(s+t.marker.offsetX,n+t.marker.offsetY,l);e.appendChild(h.node);var c=t.label.text?t.label.text:"",d=this.annoCtx.graphics.drawText({x:s+t.label.offsetX,y:n+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:c,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(d.attr({rel:i}),e.appendChild(d.node),t.customSVG.SVG){var u=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});u.attr({transform:"translate(".concat(s+t.customSVG.offsetX,", ").concat(n+t.customSVG.offsetY,")")}),u.node.innerHTML=t.customSVG.SVG,e.appendChild(u.node)}if(t.image.path){var g=t.image.width?t.image.width:20,p=t.image.height?t.image.height:20;h=this.annoCtx.addImage({x:s+t.image.offsetX-g/2,y:n+t.image.offsetY-p/2,width:g,height:p,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&h.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&h.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&h.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,a){t.addPointAnnotation(e,i.node,a)})),i}}]),t}();var Hi={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},Oi=function(){function t(){i(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return s(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[Hi],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),Fi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.graphics=new Mi(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Ii(this),this.xAxisAnnotations=new Ti(this),this.yAxisAnnotations=new Yi(this),this.pointsAnnotations=new Ei(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return s(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=t.config.chart.animations.enabled,r=[e,i,a],n=[i.node,e.node,a.node],o=0;o<3;o++)t.globals.dom.elGraphical.add(r[o]),!s||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&n[o].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:n[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,a=t.y,s=t.text,r=t.textAnchor,n=t.foreColor,o=t.fontSize,l=t.fontFamily,h=t.fontWeight,c=t.cssClass,d=t.backgroundColor,u=t.borderWidth,g=t.strokeDashArray,p=t.borderRadius,f=t.borderColor,x=t.appendTo,b=void 0===x?".apexcharts-svg":x,m=t.paddingLeft,v=void 0===m?4:m,y=t.paddingRight,w=void 0===y?4:y,k=t.paddingBottom,A=void 0===k?2:k,C=t.paddingTop,S=void 0===C?2:C,L=this.w,M=this.graphics.drawText({x:i,y:a,text:s,textAnchor:r||"start",fontSize:o||"12px",fontWeight:h||"regular",fontFamily:l||L.config.chart.fontFamily,foreColor:n||L.config.chart.foreColor,cssClass:c}),P=L.globals.dom.baseEl.querySelector(b);P&&P.appendChild(M.node);var I=M.bbox();if(s){var T=this.graphics.drawRect(I.x-v,I.y-S,I.width+v+w,I.height+A+S,p,d||"transparent",1,u,f,g);P.insertBefore(T.node,M.node)}}},{key:"addImage",value:function(t,e){var i=this.w,a=t.path,s=t.x,r=void 0===s?0:s,n=t.y,o=void 0===n?0:n,l=t.width,h=void 0===l?20:l,c=t.height,d=void 0===c?20:c,u=t.appendTo,g=void 0===u?".apexcharts-svg":u,p=i.globals.dom.Paper.image(a);p.size(h,d).move(r,o);var f=i.globals.dom.baseEl.querySelector(g);return f&&f.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,a=t.context,s=t.type,r=t.contextMethod,n=a,o=n.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),h=l.childNodes.length+1,c=new Oi,d=Object.assign({},"xaxis"===s?c.xAxisAnnotation:"yaxis"===s?c.yAxisAnnotation:c.pointAnnotation),u=v.extend(d,e);switch(s){case"xaxis":this.addXaxisAnnotation(u,l,h);break;case"yaxis":this.addYaxisAnnotation(u,l,h);break;case"point":this.addPointAnnotation(u,l,h)}var g=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(h,"']")),p=this.helpers.addBackgroundToAnno(g,u);return p&&l.insertBefore(p.node,g),i&&o.globals.memory.methodsToExec.push({context:n,id:u.id?u.id:v.randomId(),method:r,label:"addAnnotation",params:e}),a}},{key:"clearAnnotations",value:function(t){for(var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),a=e.globals.memory.methodsToExec.length-1;a>=0;a--)"addText"!==e.globals.memory.methodsToExec[a].label&&"addAnnotation"!==e.globals.memory.methodsToExec[a].label||e.globals.memory.methodsToExec.splice(a,1);i=v.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(e));a&&(i.globals.memory.methodsToExec.map((function(t,a){t.id===e&&i.globals.memory.methodsToExec.splice(a,1)})),Array.prototype.forEach.call(a,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),Di=function(t){var e,i=t.isTimeline,a=t.ctx,s=t.seriesIndex,r=t.dataPointIndex,n=t.y1,o=t.y2,l=t.w,h=l.globals.seriesRangeStart[s][r],c=l.globals.seriesRangeEnd[s][r],d=l.globals.labels[r],u=l.config.series[s].name?l.config.series[s].name:"",g=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,f={w:l,seriesIndex:s,dataPointIndex:r,start:h,end:c};("function"==typeof p&&(u=p(u,f)),null!==(e=l.config.series[s].data[r])&&void 0!==e&&e.x&&(d=l.config.series[s].data[r].x),i)||"datetime"===l.config.xaxis.type&&(d=new Xi(a).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(a).formatDate,w:l}));"function"==typeof g&&(d=g(d,f)),Number.isFinite(n)&&Number.isFinite(o)&&(h=n,c=o);var x="",b="",m=l.globals.colors[s];if(void 0===l.config.tooltip.x.formatter)if("datetime"===l.config.xaxis.type){var v=new zi(a);x=v.formatDate(v.getDate(h),l.config.tooltip.x.format),b=v.formatDate(v.getDate(c),l.config.tooltip.x.format)}else x=h,b=c;else x=l.config.tooltip.x.formatter(h),b=l.config.tooltip.x.formatter(c);return{start:h,end:c,startVal:x,endVal:b,ylabel:d,color:m,seriesName:u}},_i=function(t){var e=t.color,i=t.seriesName,a=t.ylabel,s=t.start,r=t.end,n=t.seriesIndex,o=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(n);s=l.yLbFormatter(s),r=l.yLbFormatter(r);var h=l.yLbFormatter(t.w.globals.series[n][o]),c='\n '.concat(s,'\n - \n ').concat(r,"\n ");return'
'+(i||"")+'
'+a+": "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[n].type||"rangeBar"===t.w.config.series[n].type?c:"".concat(h,""):c)+"
"},Ni=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){this.hideYAxis();return v.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var i=e.w.config.series[e.seriesIndex].name;return null!==t?i+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),u(u({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,a=e.dataPointIndex,s=e.w,r=function(){var t=s.globals.seriesRangeStart[i][a];return s.globals.seriesRangeEnd[i][a]-t};return s.globals.comboCharts?"rangeBar"===s.config.series[i].type||"rangeArea"===s.config.series[i].type?r():t:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Di(u(u({},t),{},{isTimeline:!0})),i=e.color,a=e.seriesName,s=e.ylabel,r=e.startVal,n=e.endVal;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t):function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,i;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(i=t.plotOptions.bar)&&void 0!==i&&i.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}}}}},{key:"brush",value:function(t){return v.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return u(u({},t),{},{plotOptions:u(u({},t.plotOptions),{},{bar:u(u({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return v.isNumber(t)?Math.floor(t):t};var a=t.xaxis.labels.formatter,s=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(s=i.map((function(t){return Array.isArray(t)?t:String(t)}))),s&&s.length&&(t.xaxis.labels.formatter=function(t){return v.isNumber(t)?a(s[Math.floor(t)-1]):a(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,i,a,s){var r=t.globals.seriesCandleO[e][i],n=t.globals.seriesCandleH[e][i],o=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],h=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==s?'
\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][i],"\n
"):'
')+"
".concat(a[0],': ')+r+"
"+"
".concat(a[1],': ')+n+"
"+(o?"
".concat(a[2],': ')+o+"
":"")+"
".concat(a[3],': ')+l+"
"+"
".concat(a[4],': ')+h+"
"}}]),t}(),Wi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(t){var e=t.responsiveOverride,i=this.opts,a=new Oi,s=new Ni(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),n={};if(i&&"object"===b(i)){var o,l,h,c,d,u,g,p,f,x,m={};m=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?s[i.chart.type]():s.line(),null!==(o=i.plotOptions)&&void 0!==o&&null!==(l=o.bar)&&void 0!==l&&l.isFunnel&&(m=s.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(m=s.stackedBars()),null!==(h=i.chart.brush)&&void 0!==h&&h.enabled&&(m=s.brush(m)),null!==(c=i.plotOptions)&&void 0!==c&&null!==(d=c.line)&&void 0!==d&&d.isSlopeChart&&(m=s.slope()),i.chart.stacked&&"100%"===i.chart.stackType&&(i=s.stacked100(i)),null!==(u=i.plotOptions)&&void 0!==u&&null!==(g=u.bar)&&void 0!==g&&g.isDumbbell&&(i=s.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},e||(i.xaxis.convertedCatToNumeric=!1),(null!==(p=(i=this.checkForCatToNumericXAxis(this.chartType,m,i)).chart.sparkline)&&void 0!==p&&p.enabled||null!==(f=window.Apex.chart)&&void 0!==f&&null!==(x=f.sparkline)&&void 0!==x&&x.enabled)&&(m=s.sparkline(m)),n=v.extend(r,m)}var y=v.extend(n,window.Apex);return r=v.extend(y,i),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var a,s,r=new Ni(i),n=("bar"===t||"boxPlot"===t)&&(null===(a=i.plotOptions)||void 0===a||null===(s=a.bar)||void 0===s?void 0:s.horizontal),o="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,l="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,h=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return n||o||!l||"between"===h||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new Oi;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=v.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[v.extend(i.yAxis,t.yaxis)]:t.yaxis=v.extendArray(t.yaxis,i.yAxis);var a=!1;t.yaxis.forEach((function(t){t.logarithmic&&(a=!0)}));var s=t.series;return e&&!s&&(s=e.config.series),a&&s.length!==t.yaxis.length&&s.length&&(t.yaxis=s.map((function(e,a){if(e.name||(s[a].name="series-".concat(a+1)),t.yaxis[a])return t.yaxis[a].seriesName=s[a].name,t.yaxis[a];var r=v.extend(i.yAxis,t.yaxis[0]);return r.show=!1,r}))),a&&s.length>1&&s.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.yaxis=v.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.xaxis=v.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new Oi;return t.annotations.points=v.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),Bi=function(){function t(){i(this,t)}return s(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:t.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=v.extend({},t),e.initialSeries=v.clone(t.series),e.lastXAxis=v.clone(e.initialConfig.xaxis),e.lastYAxis=v.clone(e.initialConfig.yaxis),e}}]),t}(),Gi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(){var t=new Wi(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new Bi).init(t)}}}]),t}(),ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return s(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,a=parseInt(e.globals.gridWidth,10),s=parseInt(e.globals.gridHeight,10),r=a>s?a:s,n=t.image,o=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=r+1,l=r):(o=t.width,l=t.height);var h=document.createElementNS(e.globals.SVGNS,"pattern");Mi.setAttrs(h,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var c=document.createElementNS(e.globals.SVGNS,"image");h.appendChild(c),c.setAttributeNS(window.SVG.xlink,"href",n),Mi.setAttrs(c,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),c.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(h)}},{key:"getSeriesIndex",value:function(t){var e=this.w,i=e.config.chart.type;return("bar"===i||"rangeBar"===i)&&e.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var i,a=this.w,s=null,n=null,o=r(t);try{for(o.s();!(i=o.n()).done;){var l=i.value;l>=e.threshold?(null===s||l>s)&&(s=l):(null===n||l-1?x=v.getOpacityFromRGBA(c):m=v.hexToRgba(v.rgb2hex(c),x),t.opacity&&(x=t.opacity),"pattern"===p&&(n=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:n,fillColor:c,fillOpacity:x,defaultColor:m})),b){var y=f(l.fill.gradient.colorStops)||[],w=l.fill.gradient.type;h&&(y[this.seriesIndex]=this.computeColorStops(s.globals.series[this.seriesIndex],l.plotOptions.line.colors),w="vertical"),o=this.handleGradientFill({type:w,fillConfig:t.fillConfig,fillColor:c,fillOpacity:x,colorStops:y,i:this.seriesIndex})}if("image"===p){var k=l.fill.image.src,A=t.patternID?t.patternID:"",C="pattern".concat(s.globals.cuid).concat(t.seriesNumber+1).concat(A);-1===this.patternIDs.indexOf(C)&&(this.clippedImgArea({opacity:x,image:Array.isArray(k)?t.seriesNumber-1&&(p=v.getOpacityFromRGBA(g));var f=void 0===o.gradient.opacityTo?a:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[n]:o.gradient.opacityTo;if(void 0===o.gradient.gradientToColors||0===o.gradient.gradientToColors.length)d="dark"===o.gradient.shade?c.shadeColor(-1*parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i):c.shadeColor(parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i);else if(o.gradient.gradientToColors[l.seriesNumber]){var x=o.gradient.gradientToColors[l.seriesNumber];d=x,x.indexOf("rgba")>-1&&(f=v.getOpacityFromRGBA(x))}else d=i;if(o.gradient.gradientFrom&&(g=o.gradient.gradientFrom),o.gradient.gradientTo&&(d=o.gradient.gradientTo),o.gradient.inverseColors){var b=g;g=d,d=b}return g.indexOf("rgb")>-1&&(g=v.rgb2hex(g)),d.indexOf("rgb")>-1&&(d=v.rgb2hex(d)),h.drawGradient(e,g,d,p,f,l.size,o.gradient.stops,r,n)}}]),t}(),Vi=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],r=this.w,n=e,o=t,l=null,h=new Mi(this.ctx),c=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(o.x))for(var d=0;d0:r.config.markers.size>0)||s||c){p||(f+=" w".concat(v.randomId()));var x=this.getMarkerConfig({cssClass:f,seriesIndex:e,dataPointIndex:g});if(r.config.series[n].data[g]&&(r.config.series[n].data[g].fillColor&&(x.pointFillColor=r.config.series[n].data[g].fillColor),r.config.series[n].data[g].strokeColor&&(x.pointStrokeColor=r.config.series[n].data[g].strokeColor)),void 0!==a&&(x.pSize=a),(o.x[d]<-r.globals.markers.largestSize||o.x[d]>r.globals.gridWidth+r.globals.markers.largestSize||o.y[d]<-r.globals.markers.largestSize||o.y[d]>r.globals.gridHeight+r.globals.markers.largestSize)&&(x.pSize=0),!p)(r.globals.markers.size[e]>0||s||c)&&!l&&(l=h.group({class:s||c?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),(u=h.drawMarker(o.x[d],o.y[d],x)).attr("rel",g),u.attr("j",g),u.attr("index",e),u.node.setAttribute("default-marker-size",x.pSize),new Li(this.ctx).setSelectionFilter(u,e,g),this.addEvents(u),l&&l.add(u)}else void 0===r.globals.pointsArray[e]&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([o.x[d],o.y[d]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,i=t.seriesIndex,a=t.dataPointIndex,s=void 0===a?null:a,r=t.radius,n=void 0===r?null:r,o=t.size,l=void 0===o?null:o,h=t.strokeWidth,c=void 0===h?null:h,d=this.w,u=this.getMarkerStyle(i),g=null===l?d.globals.markers.size[i]:l,p=d.config.markers;return null!==s&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===i&&t.dataPointIndex===s&&(u.pointStrokeColor=t.strokeColor,u.pointFillColor=t.fillColor,g=t.size,u.pointShape=t.shape)})),{pSize:null===n?g:n,pRadius:null!==n?n:p.radius,pointStrokeWidth:null!==c?c:Array.isArray(p.strokeWidth)?p.strokeWidth[i]:p.strokeWidth,pointStrokeColor:u.pointStrokeColor,pointFillColor:u.pointFillColor,shape:u.pointShape||(Array.isArray(p.shape)?p.shape[i]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[i]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[i]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[i]:p.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(t){var e=this.w,i=new Mi(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,a=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[t]:a,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),Ui=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return s(t,[{key:"draw",value:function(t,e,i){var a=this.w,s=new Mi(this.ctx),r=i.realIndex,n=i.pointsPos,o=i.zRatio,l=i.elParent,h=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(h.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(n.x))for(var c=0;cp.maxBubbleRadius&&(g=p.maxBubbleRadius)}var f=n.x[c],x=n.y[c];if(g=g||0,null!==x&&void 0!==a.globals.series[r][d]||(u=!1),u){var b=this.drawPoint(f,x,g,r,d,e);h.add(b)}l.add(h)}}},{key:"drawPoint",value:function(t,e,i,a,s,r){var n=this.w,o=a,l=new y(this.ctx),h=new Li(this.ctx),c=new ji(this.ctx),d=new Vi(this.ctx),u=new Mi(this.ctx),g=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:s,radius:"bubble"===n.config.chart.type||n.globals.comboCharts&&n.config.series[a]&&"bubble"===n.config.series[a].type?i:null}),p=c.fillPath({seriesNumber:a,dataPointIndex:s,color:g.pointFillColor,patternUnits:"objectBoundingBox",value:n.globals.series[a][r]}),f=u.drawMarker(t,e,g);if(n.config.series[o].data[s]&&n.config.series[o].data[s].fillColor&&(p=n.config.series[o].data[s].fillColor),f.attr({fill:p}),n.config.chart.dropShadow.enabled){var x=n.config.chart.dropShadow;h.dropShadow(f,x,a)}if(!this.initialAnim||n.globals.dataChanged||n.globals.resized)n.globals.animationEnded=!0;else{var b=n.config.chart.animations.speed;l.animateMarker(f,b,n.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(f)}),100)}))}return f.attr({rel:s,j:s,index:a,"default-marker-size":g.pSize}),h.setSelectionFilter(f,a,s),d.addEvents(f),f.node.classList.add("apexcharts-marker"),f}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}]),t}(),qi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"dataLabelsCorrection",value:function(t,e,i,a,s,r,n){var o=this.w,l=!1,h=new Mi(this.ctx).getTextRects(i,n),c=h.width,d=h.height;e<0&&(e=0),e>o.globals.gridHeight+d&&(e=o.globals.gridHeight+d/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:t,y:e,width:c,height:d});var u=o.globals.dataLabelsRects[a].length-2,g=void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(void 0!==o.globals.dataLabelsRects[a][u]){var p=o.globals.dataLabelsRects[a][g];(t>p.x+p.width||e>p.y+p.height||e+de.globals.gridWidth+b.textRects.width+30)&&(o="");var m=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(m=e.globals.dataLabels.style.colors[n]),"function"==typeof m&&(m=m({series:e.globals.series,seriesIndex:r,dataPointIndex:n,w:e})),u&&(m=u);var v=d.offsetX,y=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(v=0,y=0),e.globals.isSlopeChart&&(0!==n&&(v=-2*d.offsetX+5),0!==n&&n!==e.config.series[r].data.length-1&&(v=0)),b.drawnextLabel){if((x=i.drawText({width:100,height:parseInt(d.style.fontSize,10),x:a+v,y:s+y,foreColor:m,textAnchor:l||d.textAnchor,text:o,fontSize:h||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"})).attr({class:f||"apexcharts-datalabel",cx:a,cy:s}),d.dropShadow.enabled){var w=d.dropShadow;new Li(this.ctx).dropShadow(x,w)}c.add(x),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(n)}return x}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,a=i.config.dataLabels.background,s=a.padding,r=a.padding/2,n=e.width,o=e.height,l=new Mi(this.ctx).drawRect(e.x-s,e.y-r/2,n+2*s,o+r,a.borderRadius,"transparent"!==i.config.chart.background&&i.config.chart.background?i.config.chart.background:"#fff",a.opacity,a.borderWidth,a.borderColor);a.dropShadow.enabled&&new Li(this.ctx).dropShadow(l,a.dropShadow);return l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,s=v.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,t&&(e&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i-1&&(t[i].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,i=this.getSeriesByName(t),a=parseInt(null==i?void 0:i.getAttribute("data:realIndex"),10),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),r=null,n=null,o=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){r=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),n=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']"));var l=e.globals.seriesYAxisReverseMap[a];o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']"));else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var h=0;h=t.from&&(r0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1)for(var s=i.config.series.map((function(t,a){return t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(a)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(i.config.series[a].type)>-1)?a:-1})),r="asc"===t?0:s.length-1;"asc"===t?r=0;"asc"===t?r++:r--)if(-1!==s[r]){a=s[r];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,a){for(var s=e[i].childNodes,r={type:a,paths:[],realIndex:e[i].getAttribute("data:realIndex")},n=0;n0)for(var a=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),a=[],s=function(t){var e=function(e){return i[t].getAttribute(e)},s={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};a.push({rect:s,color:i[t].getAttribute("color")})},r=0;r0?t:[]}));return t}}]),t}(),$i=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,a=this.w.globals,s="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,r=0;r=5?this.twoDSeries.push(v.parseNumber(t[e].data[r][4])):this.twoDSeries.push(v.parseNumber(t[e].data[r][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var n=new Date(t[e].data[r][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(t[e].data[r][0]);for(var o=0;o-1&&(r=this.activeSeriesIndex);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,r=new zi(i),n=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isRangeBar="rangeBar"===a.chart.type&&s.isBarHorizontal,s.hasXaxisGroups="category"===a.xaxis.type&&a.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=a.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?s.seriesNames.push(t.name):s.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var o=[],l=f(new Set(a.series.map((function(t){return t.group}))));a.series.forEach((function(t,e){var i=l.indexOf(t.group);o[i]||(o[i]=[]),o[i].push(s.seriesNames[e])})),s.seriesGroups=o;for(var h=function(){for(var t=0;t0&&(this.twoDSeriesX=n,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var d=t[c].data.map((function(t){return v.parseNumber(t)}));s.series.push(d)}s.seriesZ.push(this.threeDSeries),void 0!==t[c].color?s.seriesColors.push(t[c].color):s.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var a=0;a0)i.labels=e.xaxis.categories;else if(e.labels.length>0)i.labels=e.labels.slice();else if(this.fallbackToCategory){if(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric)new Ni(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t)}else this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,a=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var s=i.series.map((function(t,e){return t.data.filter((function(t,e,i){return i.findIndex((function(e){return e.x===t.x}))===e}))})),r=s.reduce((function(t,e,i,a){return a[t].length>e.length?t:i}),0),n=0;n0&&s==i.length&&e.push(a)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}]),t}(),Ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),a=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",a*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"getSvgString",value:function(){var t=this;return new Promise((function(e){var i=t.w,a=i.config.chart.toolbar.export.width,s=i.config.chart.toolbar.export.scale||a/i.globals.svgWidth;s||(s=1);var r=t.w.globals.dom.Paper.svg(),n=t.w.globals.dom.Paper.node.cloneNode(!0);1!==s&&t.scaleSvgNode(n,s),t.convertImagesToBase64(n).then((function(){r=(new XMLSerializer).serializeToString(n),e(r.replace(/ /g," "))}))}))}},{key:"convertImagesToBase64",value:function(t){var e=this,i=t.getElementsByTagName("image"),a=Array.from(i).map((function(t){var i=t.getAttributeNS("http://www.w3.org/1999/xlink","href");return i&&!i.startsWith("data:")?e.getBase64FromUrl(i).then((function(e){t.setAttributeNS("http://www.w3.org/1999/xlink","href",e)})).catch((function(t){console.error("Error converting image to base64:",t)})):Promise.resolve()}));return Promise.all(a)}},{key:"getBase64FromUrl",value:function(t){return new Promise((function(e,i){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var t=document.createElement("canvas");t.width=a.width,t.height=a.height,t.getContext("2d").drawImage(a,0,0),e(t.toDataURL())},a.onerror=i,a.src=t}))}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var t=this;return new Promise((function(e){t.cleanup(),t.getSvgString().then((function(t){var i=new Blob([t],{type:"image/svg+xml;charset=utf-8"});e(URL.createObjectURL(i))}))}))}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var a=e.w,s=t?t.scale||t.width/a.globals.svgWidth:1;e.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*s,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var n="transparent"!==a.config.chart.background&&a.config.chart.background?a.config.chart.background:"#fff",o=r.getContext("2d");o.fillStyle=n,o.fillRect(0,0,r.width*s,r.height*s),e.getSvgString().then((function(t){var e="data:image/svg+xml,"+encodeURIComponent(t),a=new Image;a.crossOrigin="anonymous",a.onload=function(){if(o.drawImage(a,0,0),r.msToBlob){var t=r.msToBlob();i({blob:t})}else{var e=r.toDataURL("image/png");i({imgURI:e})}},a.src=e}))}))}},{key:"exportToSVG",value:function(){var t=this;this.svgUrl().then((function(e){t.triggerDownload(e,t.w.config.chart.toolbar.export.svg.filename,".svg")}))}},{key:"exportToPng",value:function(){var t=this,e=this.w.config.chart.toolbar.export.scale,i=this.w.config.chart.toolbar.export.width,a=e?{scale:e}:i?{width:i}:void 0;this.dataURI(a).then((function(e){var i=e.imgURI,a=e.blob;a?navigator.msSaveOrOpenBlob(a,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,a=t.fileName,s=t.columnDelimiter,r=void 0===s?",":s,n=t.lineDelimiter,o=void 0===n?"\n":n,l=this.w;i||(i=l.config.series);var h=[],c=[],d="",u=l.globals.series.map((function(t,e){return-1===l.globals.collapsedSeriesIndices.indexOf(e)?t:[]})),g=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.categoryFormatter?l.config.chart.toolbar.export.csv.categoryFormatter(t):"datetime"===l.config.xaxis.type&&String(t).length>=10?new Date(t).toDateString():v.isNumber(t)?t:t.split(r).join("")},p=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},x=Math.max.apply(Math,f(i.map((function(t){return t.data?t.data.length:0})))),b=new $i(this.ctx),m=new Ri(this.ctx),y=function(t){var i="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var a=l.globals.yLabelFormatters[0],s=new Zi(e.ctx).getActiveConfigSeriesIndex();i=a(l.globals.labels[t],{seriesIndex:s,dataPointIndex:t,w:l})}else i=m.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?i=l.config.xaxis.categories[t]:l.config.labels.length&&(i=l.config.labels[t]))}else i=l.config.labels[t];return null===i?"nullvalue":(Array.isArray(i)&&(i=i.join(" ")),v.isNumber(i)?i:i.split(r).join(""))},w=function(t,e){if(h.length&&0===e&&c.push(h.join(r)),t.data){t.data=t.data.length&&t.data||f(Array(x)).map((function(){return""}));for(var a=0;a0&&!s.globals.isBarHorizontal&&(this.xaxisLabels=s.globals.timescaleLabels.slice()),s.config.xaxis.overwriteCategories&&(this.xaxisLabels=s.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===s.config.xaxis.position?this.offY=0:this.offY=s.globals.gridHeight,this.offY=this.offY+s.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.xaxisBorderWidth=s.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=s.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=s.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=s.config.xaxis.axisBorder.height,this.yaxis=s.config.yaxis[0]}return s(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new Mi(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});i.add(a);for(var s=[],r=0;r6&&void 0!==arguments[6]?arguments[6]:{},h=[],c=[],d=this.w,u=l.xaxisFontSize||this.xaxisFontSize,g=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,f=l.fontWeight||d.config.xaxis.labels.style.fontWeight,x=l.cssClass||d.config.xaxis.labels.style.cssClass,b=d.globals.padHorizontal,m=a.length,v="category"===d.config.xaxis.type?d.globals.dataPoints:m;if(0===v&&m>v&&(v=m),s){var y=v>1?v-1:v;n=d.globals.gridWidth/Math.min(y,m-1),b=b+r(0,n)/2+d.config.xaxis.labels.offsetX}else n=d.globals.gridWidth/v,b=b+r(0,n)+d.config.xaxis.labels.offsetX;for(var w=function(s){var l=b-r(s,n)/2+d.config.xaxis.labels.offsetX;0===s&&1===m&&n/2===b&&1===v&&(l=d.globals.gridWidth/2);var y=o.axesUtils.getLabel(a,d.globals.timescaleLabels,l,s,h,u,t),w=28;d.globals.rotateXLabels&&t&&(w=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(w+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(u)+(d.globals.xAxisLabelsHeight-d.globals.xAxisGroupLabelsHeight)+(d.globals.rotateXLabels?10:0)),y=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(s,y,m):o.axesUtils.checkForOverflowingLabels(s,y,m,h,c);if(d.config.xaxis.labels.show){var k=e.drawText({x:y.x,y:o.offY+d.config.xaxis.labels.offsetY+w-("top"===d.config.xaxis.position?d.globals.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:"middle",fontWeight:y.isBold?600:f,fontSize:u,fontFamily:g,foreColor:Array.isArray(p)?t&&d.config.xaxis.convertedCatToNumeric?p[d.globals.minX+s-1]:p[s]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(i.add(k),k.on("click",(function(t){if("function"==typeof d.config.chart.events.xAxisLabelClick){var e=Object.assign({},d,{labelIndex:s});d.config.chart.events.xAxisLabelClick(t,o.ctx,e)}})),t){var A=document.createElementNS(d.globals.SVGNS,"title");A.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,k.node.appendChild(A),""!==y.text&&(h.push(y.text),c.push(y))}}sa.globals.gridWidth)){var r=this.offY+a.config.xaxis.axisTicks.offsetY;if(e=e+r+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(e=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new Mi(this.ctx).drawLine(t+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,s+a.config.xaxis.axisTicks.offsetX,e+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var s=0;s0){var h=s[s.length-1].getBBox(),c=s[0].getBBox();h.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),c.x+c.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var d=0;d0&&(this.xaxisLabels=a.globals.timescaleLabels.slice())}return s(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new Mi(this.ctx);t||(t=i.group({class:"apexcharts-grid"}));var a=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),s=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(s),t.add(a),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new Mi(this.ctx),a=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,f(t.config.stroke.width)):t.config.stroke.width,s=function(t){var i=document.createElementNS(e.SVGNS,"clipPath");return i.setAttribute("id",t),i};e.dom.elGridRectMask=s("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=s("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=s("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=s("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=s("nonForecastMask".concat(e.cuid));var r=0,n=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),n=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=i.drawRect(-a/2-r-2,-a/2-2,e.gridWidth+a+n+r+4,e.gridHeight+a+4,0,"#fff");var o=t.globals.markers.largestSize;e.dom.elGridRectMarker=i.drawRect(-o,-o,e.gridWidth+2*o,e.gridHeight+2*o,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,a=t.y1,s=t.x2,r=t.y2,n=t.xCount,o=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===n-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:i,y1:a,x2:s,y2:r,xCount:n,parent:o});var h=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var c=l.globals.groups;if(c){for(var d=0,u=0;d0&&"datetime"!==t.config.xaxis.type&&(s=e.yAxisScale[a].result.length-1);this._drawXYLines({xCount:s,tickAmount:r})}else s=r,r=e.xTickAmount,this._drawInvertedXYLines({xCount:s,tickAmount:r});return this.drawGridBands(s,r),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/s}}},{key:"drawGridBands",value:function(t,e){var i,a,s=this,r=this.w;if((null===(i=r.config.grid.row.colors)||void 0===i?void 0:i.length)>0&&function(t,i,a,n,o,l){for(var h=0,c=0;h=r.config.grid[t].colors.length&&(c=0),s._drawGridBandRect({c:c,x1:a,y1:n,x2:o,y2:l,type:t}),n+=r.globals.gridHeight/e}("row",e,0,0,r.globals.gridWidth,r.globals.gridHeight/e),(null===(a=r.config.grid.column.colors)||void 0===a?void 0:a.length)>0){var n=r.globals.isBarHorizontal||"on"!==r.config.xaxis.tickPlacement||"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric?t:t-1;r.globals.isXNumeric&&(n=r.globals.xAxisScale.result.length-1);for(var o=r.globals.padHorizontal,l=r.globals.padHorizontal+r.globals.gridWidth/n,h=r.globals.gridHeight,c=0,d=0;c=r.config.grid.column.colors.length&&(d=0),"datetime"===r.config.xaxis.type)o=this.xaxisLabels[c].position,l=((null===(u=this.xaxisLabels[c+1])||void 0===u?void 0:u.position)||r.globals.gridWidth)-this.xaxisLabels[c].position;this._drawGridBandRect({c:d,x1:o,y1:0,x2:l,y2:h,type:"column"}),o+=r.globals.gridWidth/n}}}}]),t}(),ta=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"niceScale",value:function(t,e){var i,a,s,r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=1e-11,l=this.w,h=l.globals;h.isBarHorizontal?(i=l.config.xaxis,a=Math.max((h.svgWidth-100)/25,2)):(i=l.config.yaxis[n],a=Math.max((h.svgHeight-100)/15,2)),v.isNumber(a)||(a=10),s=void 0!==i.min&&null!==i.min,r=void 0!==i.max&&null!==i.min;var c=void 0!==i.stepSize&&null!==i.stepSize,d=void 0!==i.tickAmount&&null!==i.tickAmount,u=d?i.tickAmount:h.niceScaleDefaultTicks[Math.min(Math.round(a/2),h.niceScaleDefaultTicks.length-1)];if(h.isMultipleYAxis&&!d&&h.multiAxisTickAmount>0&&(u=h.multiAxisTickAmount,d=!0),u="dataPoints"===u?h.dataPoints-1:Math.abs(Math.round(u)),(t===Number.MIN_VALUE&&0===e||!v.isNumber(t)&&!v.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=v.isNumber(i.min)?i.min:0,e=v.isNumber(i.max)?i.max:t+u,h.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var g=e;e=t,t=g}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var p=[];u<1&&(u=1);var f=u,x=Math.abs(e-t);!s&&t>0&&t/x<.15&&(t=0,s=!0),!r&&e<0&&-e/x<.15&&(e=0,r=!0);var b=(x=Math.abs(e-t))/f,m=b,y=Math.floor(Math.log10(m)),w=Math.pow(10,y),k=Math.ceil(m/w);if(b=m=(k=h.niceScaleAllowedMagMsd[0===h.yValueDecimal?0:1][k])*w,h.isBarHorizontal&&i.stepSize&&"datetime"!==i.type?(b=i.stepSize,c=!0):c&&(b=i.stepSize),c&&i.forceNiceScale){var A=Math.floor(Math.log10(b));b*=Math.pow(10,y-A)}if(s&&r){var C=x/f;if(d)if(c)if(0!=v.mod(x,b)){var S=v.getGCD(b,C);b=C/S<10?S:C}else 0==v.mod(b,C)?b=C:(C=b,d=!1);else b=C;else if(c)0==v.mod(x,b)?C=b:b=C;else if(0==v.mod(x,b))C=b;else{C=x/(f=Math.ceil(x/b));var L=v.getGCD(x,b);x/La&&(t=e-b*u,t+=b*Math.floor((M-t)/b))}else if(s)if(d)e=t+b*f;else{var P=e;e=b*Math.ceil(e/b),Math.abs(e-t)/v.getGCD(x,b)>a&&(e=t+b*u,e+=b*Math.ceil((P-e)/b))}}else if(h.isMultipleYAxis&&d){var I=b*Math.floor(t/b),T=I+b*f;T0&&t16&&v.getPrimeFactors(f).length<2&&f++,!d&&i.forceNiceScale&&0===h.yValueDecimal&&f>x&&(f=x,b=Math.round(x/f)),f>a&&(!d&&!c||i.forceNiceScale)){var z=v.getPrimeFactors(f),X=z.length-1,R=f;t:for(var Y=0;YN);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,r=Math.abs(e-t),n=[];if(t===e)return{result:n=[t],niceMin:n[0],niceMax:n[n.length-1]};"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,r))&&(i=this.w.globals.dataPoints-1),s||(s=r/i),s=Math.round(10*(s+Number.EPSILON))/10,i===Number.MAX_VALUE&&(i=5,s=1);for(var o=t;i>=0;)n.push(o),o=v.preciseAddition(o,s),i-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,i){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));for(var a=[],s=Math.ceil(Math.log(e)/Math.log(i)+1),r=Math.floor(Math.log(t)/Math.log(i));r5?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase):this.logarithmicScale(e,i,r.logBase)):i!==-Number.MAX_VALUE&&v.isNumber(i)&&e!==Number.MAX_VALUE&&v.isNumber(e)?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.niceScale(e,i,t)):a.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var i=this.w,a=i.globals,s=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&v.isNumber(e)){var r=a.xTickAmount+1;s<10&&s>1&&(r=s),a.xAxisScale=this.linearScale(t,e,r,0,i.config.xaxis.stepSize)}else a.xAxisScale=this.linearScale(0,10,10);return a.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,i=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var a=i.seriesYAxisMap,s=i.minYArr,r=i.maxYArr;i.allSeriesCollapsed=!0,i.barGroups=[],a.forEach((function(a,n){var o=[];a.forEach((function(t){var i=e.series[t].group;o.indexOf(i)<0&&o.push(i)})),a.length>0?function(){var l,h,c=Number.MAX_VALUE,d=-Number.MAX_VALUE,u=c,g=d;if(e.chart.stacked)!function(){var t=new Array(i.dataPoints).fill(0),s=[],r=[],p=[];o.forEach((function(){s.push(t.map((function(){return Number.MIN_VALUE}))),r.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var f=function(t){!l&&e.series[a[t]].type&&(l=e.series[a[t]].type);var c=a[t];h=e.series[c].group?e.series[c].group:"axis-".concat(n),!(i.collapsedSeriesIndices.indexOf(c)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(c)<0)||(i.allSeriesCollapsed=!1,o.forEach((function(t,a){if(e.series[c].group===t)for(var n=0;n=0?r[a][n]+=o:p[a][n]+=o,s[a][n]+=o,u=Math.min(u,o),g=Math.max(g,o)}}))),"bar"!==l&&"column"!==l||i.barGroups.push(h)},x=0;x1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w.config,r=this.w.globals,n=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=t+1);var l=r.series,h=l,c=l;"candlestick"===s.chart.type?(h=r.seriesCandleL,c=r.seriesCandleH):"boxPlot"===s.chart.type?(h=r.seriesCandleO,c=r.seriesCandleC):r.isRangeData&&(h=r.seriesRangeStart,c=r.seriesRangeEnd);var d=!1;if(r.seriesX.length>=a){var u,g=null===(u=r.brushSource)||void 0===u?void 0:u.w.config.chart.brush;(s.chart.zoom.enabled&&s.chart.zoom.autoScaleYaxis||null!=g&&g.enabled&&null!=g&&g.autoScaleYaxis)&&(d=!0)}for(var p=t;px&&r.seriesX[p][b]>s.xaxis.max;b--);}for(var m=x;m<=b&&mh[p][m]&&h[p][m]<0&&(o=h[p][m])}else r.hasNullValues=!0}"bar"!==f&&"column"!==f||(o<0&&n<0&&(n=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,e=Math.min(e,0)))}return"rangeBar"===s.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&(o=e),"bar"===s.chart.type&&(o<0&&n<0&&(n=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:n,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i,a=Number.MAX_VALUE;if(t.isMultipleYAxis){a=Number.MAX_VALUE;for(var s=0;st.dataPoints&&0!==t.dataPoints&&(a=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(a=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var s=t.maxX-t.minX;s<30&&(a=s-1)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var r=[],n=t.minX-1;n0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,a-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var s=e-a[i-1];s>0&&(t.minXDiff=Math.min(s,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var i=e.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map((function(t){return t}))]);var a={},s={};i.forEach((function(i){a[i]=[],s[i]=[],t.w.config.series.map((function(t,a){return i.indexOf(e.seriesNames[a])>-1?a:null})).filter((function(t){return null!==t})).forEach((function(r){for(var n=0;n0?a[i][n]+=parseFloat(e.series[r][n])+1e-4:s[i][n]+=parseFloat(e.series[r][n]))}}))})),Object.entries(a).forEach((function(t){var i=p(t,1)[0];a[i].forEach((function(t,r){e.maxY=Math.max(e.maxY,a[i][r]),e.minY=Math.min(e.minY,s[i][r])}))}))}}}]),t}(),ia=function(){function t(e,a){i(this,t),this.ctx=e,this.elgrid=a,this.w=e.w;var s=this.w;this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.axisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xAxisoffX="bottom"===s.config.xaxis.position?s.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Ri(e)}return s(t,[{key:"drawYaxis",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.yaxis[t].labels.style,s=a.fontSize,r=a.fontFamily,n=a.fontWeight,o=i.group({class:"apexcharts-yaxis",rel:t,transform:"translate(".concat(e.globals.translateYAxisX[t],", 0)")});if(this.axesUtils.isYAxisHidden(t))return o;var l=i.group({class:"apexcharts-yaxis-texts-g"});o.add(l);var h=e.globals.yAxisScale[t].result.length-1,c=e.globals.gridHeight/h,d=e.globals.yLabelFormatters[t],u=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){var g=e.globals.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?g=0:"heatmap"===e.config.chart.type&&(g-=c/2),g+=parseInt(s,10)/3;for(var p=h;p>=0;p--){var f=d(u[p],p,e),x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(x*=-1);var b=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(a.colors,t),y=Array.isArray(m)?m[p]:m,w=v.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),k=i.drawText({x:x,y:g,text:w.includes(f)&&!e.config.yaxis[t].labels.showDuplicates?"":f,textAnchor:b,fontSize:s,fontFamily:r,fontWeight:n,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(a.cssClass)});l.add(k),this.addTooltip(k,f),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(i,k,firstLabel,e.config.yaxis[t].labels.rotate),g+=c}}return this.addYAxisTitle(i,o,t),this.addAxisBorder(i,o,t,h,c),o}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var i=document.createElementNS(this.w.globals.SVGNS,"title");i.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(i)}},{key:"rotateLabel",value:function(t,e,i,a){var s=t.rotateAroundCenter(i.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(a," ").concat(s.x," ").concat(r.y,")"))}},{key:"addYAxisTitle",value:function(t,e,i){var a=this.w;if(void 0!==a.config.yaxis[i].title.text){var s=t.group({class:"apexcharts-yaxis-title"}),r=a.config.yaxis[i].opposite?a.globals.translateYAxisX[i]:0,n=t.drawText({x:r,y:a.globals.gridHeight/2+a.globals.translateY+a.config.yaxis[i].title.offsetY,text:a.config.yaxis[i].title.text,textAnchor:"end",foreColor:a.config.yaxis[i].title.style.color,fontSize:a.config.yaxis[i].title.style.fontSize,fontWeight:a.config.yaxis[i].title.style.fontWeight,fontFamily:a.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(a.config.yaxis[i].title.style.cssClass)});s.add(n),e.add(s)}}},{key:"addAxisBorder",value:function(t,e,i,a,s){var r=this.w,n=r.config.yaxis[i].axisBorder,o=31+n.offsetX;if(r.config.yaxis[i].opposite&&(o=-31-n.offsetX),n.show){var l=t.drawLine(o,r.globals.translateY+n.offsetY-2,o,r.globals.gridHeight+r.globals.translateY+n.offsetY+2,n.color,0,n.width);e.add(l)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,a,n,r.config.yaxis[i].axisTicks,i,s,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});a.add(s);var r=e.globals.yAxisScale[t].result.length-1,n=e.globals.gridWidth/r+.1,o=n+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,h=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),c=e.globals.timescaleLabels;if(c.length>0&&(this.xaxisLabels=c.slice(),r=(h=c.slice()).length),e.config.xaxis.labels.show)for(var d=c.length?0:r;c.length?d=0;c.length?d++:d--){var u=l(h[d],d,e),g=e.globals.gridWidth+e.globals.padHorizontal-(o-n+e.config.xaxis.labels.offsetX);if(c.length){var p=this.axesUtils.getLabel(h,c,g,d,this.drawnLabels,this.xaxisFontSize);g=p.x,u=p.text,this.drawnLabels.push(p.text),0===d&&e.globals.skipFirstTimelinelabel&&(u=""),d===h.length-1&&e.globals.skipLastTimelinelabel&&(u="")}var f=i.drawText({x:g,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:u,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});s.add(f),f.tspan(u),this.addTooltip(f,u),o+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.xaxis.axisBorder;if(a.show){var s=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(s-=15);var r=i.drawLine(e.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new Mi(this.ctx);if(void 0!==e.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});a.add(s),t.add(a)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),r=s?s.getBoundingClientRect():{width:0,height:0},n=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),o=n?n.getBoundingClientRect():{width:0,height:0};if(n){var l=this.xPaddingForYAxisTitle(t,r,o,e);n.setAttribute("x",l.xPos-(e?10:0));var h=a.rotateAroundCenter(n);n.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(h.x," ").concat(h.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var s=this.w,r=0,n=10;return void 0===s.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(a?r=e.width+s.config.yaxis[t].title.offsetX+i.width/2+n/2:(r=-1*e.width+s.config.yaxis[t].title.offsetX+n/2+i.width/2,s.globals.isBarHorizontal&&(n=25,r=-1*e.width-s.config.yaxis[t].title.offsetX-n)),{xPos:r,padd:n})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,a=0,s=0,r=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach((function(o,l){var h=i.globals.ignoreYAxisIndexes.includes(l)||!o.show||o.floating||0===t[l].width,c=t[l].width+e[l].width;o.opposite?i.globals.isBarHorizontal?(s=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=s-o.labels.offsetX):(s=i.globals.gridWidth+i.globals.translateX+n,h||(n+=c+20),i.globals.translateYAxisX[l]=s-o.labels.offsetX+20):(a=i.globals.translateX-r,h||(r+=c+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;v.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,i){var a=t.config.yaxis[i];if(a&&!a.floating&&void 0!==a.labels.align){var s=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=v.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"))),n=s.getBoundingClientRect();r.forEach((function(t){t.setAttribute("text-anchor",a.labels.align)})),"left"!==a.labels.align||a.opposite?"center"===a.labels.align?s.setAttribute("transform","translate(".concat(n.width/2*(a.opposite?1:-1),", 0)")):"right"===a.labels.align&&a.opposite&&s.setAttribute("transform","translate(".concat(n.width,", 0)")):s.setAttribute("transform","translate(-".concat(n.width,", 0)"))}}))}}]),t}(),aa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.documentEvent=v.bind(this.documentEvent,this)}return s(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var a=i.globals.events[t].indexOf(e);-1!==a&&i.globals.events[t].splice(a,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var a=i.globals.events[t],s=a.length,r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=v.extend(Hi,i);this.w.globals.locale=a.options}}]),t}(),ra=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawAxis",value:function(t,e){var i,a,s=this,r=this.w.globals,n=this.w.config,o=new Qi(this.ctx,e),l=new ia(this.ctx,e);r.axisCharts&&"radar"!==t&&(r.isBarHorizontal?(a=l.drawYaxisInversed(0),i=o.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(a)):(i=o.drawXaxis(),r.dom.elGraphical.add(i),n.yaxis.map((function(t,e){if(-1===r.ignoreYAxisIndexes.indexOf(e)&&(a=l.drawYaxis(e),r.dom.Paper.add(a),"back"===s.w.config.grid.position)){var i=r.dom.Paper.children()[1];i.remove(),r.dom.Paper.add(i)}}))))}}]),t}(),na=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Li(this.ctx),a=t.config.xaxis.crosshairs.fill.gradient,s=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,n=a.colorFrom,o=a.colorTo,l=a.opacityFrom,h=a.opacityTo,c=a.stops,d=s.enabled,u=s.left,g=s.top,p=s.blur,f=s.color,x=s.opacity,b=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(b=e.drawGradient("vertical",n,o,l,h,null,c,null));var m=e.drawRect();1===t.config.xaxis.crosshairs.width&&(m=e.drawLine());var y=t.globals.gridHeight;(!v.isNumber(y)||y<0)&&(y=0);var w=t.config.xaxis.crosshairs.width;(!v.isNumber(w)||w<0)&&(w=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:w,height:y,fill:b,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),d&&(m=i.dropShadow(m,{left:u,top:g,blur:p,color:f,opacity:x})),t.globals.dom.elGraphical.add(m)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var s=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(s)}var r=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(r)}}]),t}(),oa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,a=i.config;if(0!==a.responsive.length){var s=a.responsive.slice();s.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var r=new Wi({}),n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=s[0].breakpoint,n=window.innerWidth>0?window.innerWidth:screen.width;if(n>a){var o=v.clone(i.globals.initialConfig);o.series=v.clone(i.config.series);var l=Pi.extendArrayProps(r,o,i);t=v.extend(l,t),t=v.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var h=0;h0&&"function"==typeof t[0]?(this.isColorFn=!0,i.config.series.map((function(a,s){var r=t[s]||t[0];return"function"==typeof r?r({value:i.globals.axisCharts?i.globals.series[s][0]||0:i.globals.series[s],seriesIndex:s,dataPointIndex:s,w:e.w}):r}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,i){t&&(e[i]=t)}))}},{key:"getMonochromeColors",value:function(t,e,i){var a=t.color,s=t.shadeIntensity,r=t.shadeTo,n=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,o=1/(n/s),l=0;return Array.from({length:n},(function(){var t="dark"===r?i.shadeColor(-1*l,a):i.shadeColor(l,a);return l+=o,t}))}},{key:"applyColorTypes",value:function(t,e){var i=this,a=this.w;t.forEach((function(t){a.globals[t].colors=void 0===a.config[t].colors?i.isColorFn?a.config.colors:e:a.config[t].colors.slice(),i.pushExtraColors(a.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=e||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),t.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,i=[];e.config.series.forEach((function(s,r){s.data.forEach((function(s,n){var o;o=e.globals.series[r][n],a=e.config.dataLabels.formatter(o,{ctx:t.dCtx.ctx,seriesIndex:r,dataPointIndex:n,w:e}),i.push(a)}))}));var a=v.getLargestStringFromArr(i),s=new Mi(this.dCtx.ctx),r=e.config.dataLabels.style,n=s.getTextRects(a,parseInt(r.fontSize),r.fontFamily);return{width:1.05*n.width,height:n.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var a=e.map((function(t,e){return Array.isArray(t)?t.length:1})),s=Math.max.apply(Math,f(a));i=e[a.indexOf(s)]}return i}}]),t}(),da=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();t={width:a.width,height:a.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var s=e.globals.xLabelFormatter,r=v.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);e.globals.isBarHorizontal&&(n=r=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var o=new Xi(this.dCtx.ctx),l=r;r=o.xLabelFormat(s,r,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),n=o.xLabelFormat(s,n,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(n=r="1");var h=new Mi(this.dCtx.ctx),c=h.getTextRects(r,e.config.xaxis.labels.style.fontSize),d=c;if(r!==n&&(d=h.getTextRects(n,e.config.xaxis.labels.style.fontSize)),(t={width:c.width>=d.width?c.width:d.width,height:c.height>=d.height?c.height:d.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return h.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};c=u(r),r!==n&&(d=u(n)),t.height=(c.height>d.height?c.height:d.height)/1.5,t.width=c.width>d.width?c.width:d.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var i,a=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,s=e.globals.groups.map((function(t){return t.title})),r=v.getLargestStringFromArr(s),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),o=new Mi(this.dCtx.ctx),l=o.getTextRects(r,a),h=l;return r!==n&&(h=o.getTextRects(n,a)),i={width:l.width>=h.width?l.width:h.width,height:l.height>=h.height?l.height:h.height},e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new Mi(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,i=a.height}return{width:e,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(t){return t.value})),a=i.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Mi(this.dCtx.ctx).getTextRects(a,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,a=i.globals,s=i.config,r=s.xaxis.type,n=t.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,o){s.yaxis.length>1&&function(t){return-1!==a.collapsedSeriesIndices.indexOf(t)}(o)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var o=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+n/1.75-e.dCtx.yAxisWidthRight,h=o.position-n/1.75+e.dCtx.yAxisWidthLeft,c="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>a.svgWidth-a.translateX-c&&(a.skipLastTimelinelabel=!0),h<-(t.show&&!t.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===r?e.dCtx.gridPad.right(null===(a=String(c(e,o)))||void 0===a?void 0:a.length)?t:e}),d),g=u=c(u,o);if(void 0!==u&&0!==u.length||(u=l.niceMax),e.globals.isBarHorizontal){a=0;var p=e.globals.labels.slice();u=v.getLargestStringFromArr(p),u=c(u,{seriesIndex:n,dataPointIndex:-1,w:e}),g=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,p)}var f=new Mi(t.dCtx.ctx),x="rotate(".concat(r.labels.rotate," 0 0)"),b=f.getTextRects(u,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1),m=b;u!==g&&(m=f.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1)),i.push({width:(h>m.width||h>b.width?h:m.width>b.width?m.width:b.width)+a,height:m.height>b.height?m.height:b.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,a){if(e.show&&void 0!==e.title.text){var s=new Mi(t.dCtx.ctx),r="rotate(".concat(e.title.rotate," 0 0)"),n=s.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);i.push({width:n.width,height:n.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,a=0,s=t.globals.yAxisScale.length>1?10:0,r=new Ri(this.dCtx.ctx),n=function(n,o){var l=t.config.yaxis[o].floating,h=0;n.width>0&&!l?(h=n.width+s,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(o)&&(h=h-n.width-s)):h=l||r.isYAxisHidden(o)?0:5,t.config.yaxis[o].opposite?a+=h:i+=h,e+=h};return t.globals.yLabelsCoords.map((function(t,e){n(t,e)})),t.globals.yTitleCoords.map((function(t,e){n(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,e}}]),t}(),ga=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w,i=e.config,a=e.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.series.length)return 0;var s=function(t){return["bar","rangeBar","candlestick","boxPlot"].includes(t)},r=i.chart.type,n=0,o=s(r)?i.series.length:1;a.comboBarCount>0&&(o=a.comboBarCount),a.collapsedSeries.forEach((function(t){s(t.type)&&(o-=1)})),i.chart.stacked&&(o=1);var l=s(r)||a.comboBarCount>0,h=Math.abs(a.initialMaxX-a.initialMinX);if(l&&a.isXNumeric&&!a.isBarHorizontal&&o>0&&0!==h){h<=3&&(h=a.dataPoints);var c=h/t,d=a.minXDiff&&a.minXDiff/c>0?a.minXDiff/c:0;d>t/2&&(d/=2),(n=d*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),a.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,a=this.dCtx.isSparkline||!i.axisCharts?0:10;["title","subtitle"].forEach((function(s){void 0!==e.config[s].text?a+=e.config[s].margin:a+=t.dCtx.isSparkline||!i.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||i.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight-=s.height+r.height+a,i.translateY+=s.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,a=new Ri(this.dCtx.ctx);i.config.yaxis.forEach((function(s,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||s.floating||a.isYAxisHidden(r)||(s.opposite&&(i.globals.translateX-=e[r].width+t[r].width+parseInt(s.labels.style.fontSize,10)/1.2+12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),pa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new ca(this),this.dimYAxis=new ua(this),this.dimXAxis=new da(this),this.dimGrid=new ga(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return s(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,i=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var a=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,f(e.config.stroke.width)):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var i=p(e,2),a=i[0],s=i[1];t.gridPad[a]=Math.max(s,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(a/2,this.gridPad.top),this.gridPad.bottom=Math.max(a/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var s=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*s,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:a[i].width,index:i}),e.globals.yTitleCoords.push({width:s[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o,n),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,h=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var c=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,h=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,h=0,c=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(r);var d=function(){i.translateX=l+t.datalabelsCoords.width,i.gridHeight=i.svgHeight-t.lgRect.height-h-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(c=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=c,d();break;case"top":i.translateY=this.lgRect.height+c,d();break;case"left":i.translateY=c,i.translateX=this.lgRect.width+l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":i.translateY=c,i.translateX=l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new ia(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,a=0;t.config.legend.show&&!t.config.legend.floating&&(a=20);var s="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[s].offsetY,n=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating){e.gridHeight=e.svgHeight;var o=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(o,e.gridHeight),e.translateY=r,void(e.translateX=n+(e.svgWidth-e.gridWidth)/2)}switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=r-10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+r+10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-a,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+this.lgRect.width+a;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-a-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,i){var a=this.w,s=a.globals.hasXaxisGroups?2:1,r=i.height+t.height+e.height,n=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,o=a.globals.rotateXLabels?22:10,l=a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0;this.xAxisHeight=r*n+s*o+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeightc&&(this.yAxisWidth=c)}}]),t}(),fa=function(){function t(e){i(this,t),this.w=e.w,this.lgCtx=e}return s(t,[{key:"getLegendStyles",value:function(){var t,e,i,a=document.createElement("style");a.setAttribute("type","text/css");var s=(null===(t=this.lgCtx.ctx)||void 0===t||null===(e=t.opts)||void 0===e||null===(i=e.chart)||void 0===i?void 0:i.nonce)||this.w.config.chart.nonce;s&&a.setAttribute("nonce",s);var r=document.createTextNode("\n .apexcharts-flip-y {\n transform: scaleY(-1) translateY(-100%);\n transform-origin: top;\n transform-box: fill-box;\n }\n .apexcharts-flip-x {\n transform: scaleX(-1);\n transform-origin: center;\n transform-box: fill-box;\n }\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-right: 1px;\n }\n\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }\n\n ");return a.appendChild(r),a}},{key:"getLegendDimensions",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(t,e){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var s=null,r=null;if(a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),r=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),r=parseInt(s.getAttribute("rel"),10)-1),e)[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,r)}));else this.hideSeries({seriesEl:s,realIndex:r})}else{var n=a.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(t+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=a.config.plotOptions.pie.donut.labels;new Mi(this.lgCtx.ctx).pathMouseDown(n,null),this.lgCtx.ctx.pie.printDataLabelsInner(n.node,l)}n.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(t){var e=t.realIndex,i=this.w,a=i.globals,s=v.clone(i.config.series);if(a.axisCharts){var r=i.config.yaxis[a.seriesYAxisReverseMap[e]],n={index:e,data:s[e].data.slice(),type:s[e].type||i.config.chart.type};if(r&&r.show&&r.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(e)<0&&(a.ancillaryCollapsedSeries.push(n),a.ancillaryCollapsedSeriesIndices.push(e));else if(a.collapsedSeriesIndices.indexOf(e)<0){a.collapsedSeries.push(n),a.collapsedSeriesIndices.push(e);var o=a.risingSeries.indexOf(e);a.risingSeries.splice(o,1)}}else a.collapsedSeries.push({index:e,data:s[e]}),a.collapsedSeriesIndices.push(e);return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.config.series.length,this._getSeriesBasedOnCollapsedState(s)}},{key:"hideSeries",value:function(t){for(var e=t.seriesEl,i=t.realIndex,a=this.w,s=this.getSeriesAfterCollapsing({realIndex:i}),r=e.childNodes,n=0;n0){for(var r=0;r1;if(this.legendHelpers.appendToForeignObject(),(a||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,i=t.fillcolor,a=this.w,s=document.createElement("span");s.classList.add("apexcharts-legend-marker");var r=a.config.legend.markers.shape||a.config.markers.shape,n=r;Array.isArray(r)&&(n=r[e]);var o=Array.isArray(a.config.legend.markers.size)?parseFloat(a.config.legend.markers.size[e]):parseFloat(a.config.legend.markers.size),l=Array.isArray(a.config.legend.markers.offsetX)?parseFloat(a.config.legend.markers.offsetX[e]):parseFloat(a.config.legend.markers.offsetX),h=Array.isArray(a.config.legend.markers.offsetY)?parseFloat(a.config.legend.markers.offsetY[e]):parseFloat(a.config.legend.markers.offsetY),c=Array.isArray(a.config.legend.markers.strokeWidth)?parseFloat(a.config.legend.markers.strokeWidth[e]):parseFloat(a.config.legend.markers.strokeWidth),d=s.style;if(d.height=2*(o+c)+"px",d.width=2*(o+c)+"px",d.left=l+"px",d.top=h+"px",a.config.legend.markers.customHTML)d.background="transparent",d.color=i[e],Array.isArray(a.config.legend.markers.customHTML)?a.config.legend.markers.customHTML[e]&&(s.innerHTML=a.config.legend.markers.customHTML[e]()):s.innerHTML=a.config.legend.markers.customHTML();else{var g=new Vi(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(n),seriesIndex:e,strokeWidth:c,size:o}),p=window.SVG().addTo(s).size("100%","100%"),f=new Mi(this.ctx).drawMarker(0,0,u(u({},g),{},{pointFillColor:Array.isArray(i)?i[e]:g.pointFillColor,shape:n}));a.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),p.add(f)}return s}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,a=e.globals.seriesNames,s=e.config.legend.markers.fillColors?e.config.legend.markers.fillColors.slice():e.globals.colors.slice();if("heatmap"===e.config.chart.type){var r=e.config.plotOptions.heatmap.colorScale.ranges;a=r.map((function(t){return t.name?t.name:t.from+" - "+t.to})),s=r.map((function(t){return t.color}))}else this.isBarsDistributed&&(a=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(a=e.config.legend.customLegendItems);for(var n=e.globals.legendFormatter,o=e.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var h,c=n(a[l],{seriesIndex:l,w:e}),d=!1,u=!1;if(e.globals.collapsedSeries.length>0)for(var g=0;g0)for(var p=0;p0?l-10:0)+(h>0?h-10:0)}a.style.position="absolute",r=r+t+i.config.legend.offsetX,n=n+e+i.config.legend.offsetY,a.style.left=r+"px",a.style.top=n+"px","right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px");["width","height"].forEach((function(t){a.style[t]&&(a.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new pa(this.ctx),i=e.dimHelpers.getTitleSubtitleCoords("title"),a=e.dimHelpers.getTitleSubtitleCoords("subtitle"),s=0;"top"===t.config.legend.position&&(s=i.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,s)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new Zi(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new Zi(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,a="true"===t.target.getAttribute("data:collapsed"),s=this.w.config.chart.events.legendClick;"function"==typeof s&&s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;"function"==typeof r&&t.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),t}(),ba=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=a.globals.minX,this.maxX=a.globals.maxX}return s(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=e.config.chart.toolbar.offsetY+"px",a.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s\n \n \n\n'),n("zoomOut",this.elZoomOut,'\n \n \n\n');var o=function(i){t.t[i]&&e.config.chart[i].enabled&&r.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'\n \n \n \n':'\n \n \n',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&e.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,'\n \n \n'),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;lthis.wheelDelay&&(this.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){a-i.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,i=this.w;this.minX=i.globals.isRangeBar?i.globals.minY:i.globals.minX,this.maxX=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;var a=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(a){var s,r,n,o=(t.clientX-a.left)/a.width,l=this.minX,h=this.maxX,c=h-l;if(t.deltaY<0){var d=l+o*c;r=d-(s=.5*c)/2,n=d+s/2}else r=l-(s=1.5*c)/2,n=h+s/2;if(!i.globals.isRangeBar){r=Math.max(r,i.globals.initialMinX),n=Math.min(n,i.globals.initialMaxX);var u=.01*(i.globals.initialMaxX-i.globals.initialMinX);if(n-r0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,i,a,s){return"l"===s||"r"===s?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resizing",this.selectionDragging.bind(this,"resizing")))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(u(u({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,a=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i;t.globals.isRangeBar&&(i=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,a=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var s={x:i,y:0,width:a,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(s),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,a=t.width,s=t.height,r=t.translateX,n=void 0===r?0:r,o=t.translateY,l=void 0===o?0:o,h=this.w,c=this.zoomRect,d=this.selectionRect;if(this.dragged||null!==h.globals.selection){var u={transform:"translate("+n+", "+l+")"};h.globals.zoomEnabled&&this.dragged&&(a<0&&(a=1),c.attr({x:e,y:i,width:a,height:s,fill:h.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":h.config.chart.zoom.zoomedArea.fill.opacity,stroke:h.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":h.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":h.config.chart.zoom.zoomedArea.stroke.opacity}),Mi.setAttrs(c.node,u)),h.globals.selectionEnabled&&(d.attr({x:e,y:i,width:a>0?a:0,height:s>0?s:0,fill:h.config.chart.selection.fill.color,"fill-opacity":h.config.chart.selection.fill.opacity,stroke:h.config.chart.selection.stroke.color,"stroke-width":h.config.chart.selection.stroke.width,"stroke-dasharray":h.config.chart.selection.stroke.dashArray,"stroke-opacity":h.config.chart.selection.stroke.opacity}),Mi.setAttrs(d.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.gridRect.getBoundingClientRect(),n=s.startX-1,o=s.startY,l=!1,h=!1,c=s.clientX-r.left-n,d=s.clientY-r.top-o,g={translateX:a.globals.translateX,translateY:a.globals.translateY};return Math.abs(c+n)>a.globals.gridWidth?c=a.globals.gridWidth-n:s.clientX-r.left<0&&(c=n),n>s.clientX-r.left&&(l=!0,c=Math.abs(c)),o>s.clientY-r.top&&(h=!0,d=Math.abs(d)),g=u(u({},g="x"===i?{x:l?n-c:n,y:0,width:c,height:a.globals.gridHeight}:"y"===i?{x:0,y:h?o-d:o,width:a.globals.gridWidth,height:d}:{x:l?n-c:n,y:h?o-d:o,width:c,height:d}),{},{translateX:a.globals.translateX,translateY:a.globals.translateY}),s.drawSelectionRect(g),s.selectionDragging("resizing"),g}},{key:"selectionDragging",value:function(t,e){var i=this,a=this.w;if(e){e.preventDefault();var s=e.detail,r=s.handler,n=s.box,o=n.x,l=n.y;othis.constraints.x2&&(o=this.constraints.x2-n.w),n.y2>this.constraints.y2&&(l=this.constraints.y2-n.h),r.move(o,l);var h=this.xyRatios,c=this.selectionRect,d=0;"resizing"===t&&(d=30);var u=function(t){return parseFloat(c.node.getAttribute(t))},g={x:u("x"),y:u("y"),width:u("width"),height:u("height")};a.globals.selection=g,"function"==typeof a.config.chart.events.selection&&a.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,s,r,n=i.gridRect.getBoundingClientRect(),o=c.node.getBoundingClientRect();a.globals.isRangeBar?(t=a.globals.yAxisScale[0].niceMin+(o.left-n.left)*h.invertedYRatio,e=a.globals.yAxisScale[0].niceMin+(o.right-n.left)*h.invertedYRatio,s=0,r=1):(t=a.globals.xAxisScale.niceMin+(o.left-n.left)*h.xRatio,e=a.globals.xAxisScale.niceMin+(o.right-n.left)*h.xRatio,s=a.globals.yAxisScale[0].niceMin+(n.bottom-o.bottom)*h.yRatio[0],r=a.globals.yAxisScale[0].niceMax-(o.top-n.top)*h.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:s,max:r}};a.config.chart.events.selection(i.ctx,l),a.config.chart.brush.enabled&&void 0!==a.config.chart.events.brushScrolled&&a.config.chart.events.brushScrolled(i.ctx,l)}),d))}}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.xyRatios,n=this.ctx.toolbar;if(s.startX>s.endX){var o=s.startX;s.startX=s.endX,s.endX=o}if(s.startY>s.endY){var l=s.startY;s.startY=s.endY,s.endY=l}var h=void 0,c=void 0;a.globals.isRangeBar?(h=a.globals.yAxisScale[0].niceMin+s.startX*r.invertedYRatio,c=a.globals.yAxisScale[0].niceMin+s.endX*r.invertedYRatio):(h=a.globals.xAxisScale.niceMin+s.startX*r.xRatio,c=a.globals.xAxisScale.niceMin+s.endX*r.xRatio);var d=[],u=[];if(a.config.yaxis.forEach((function(t,e){var i=a.globals.seriesYAxisMap[e][0];d.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.startY),u.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.endY)})),s.dragged&&(s.dragX>10||s.dragY>10)&&h!==c)if(a.globals.zoomEnabled){var g=v.clone(a.globals.initialConfig.yaxis),p=v.clone(a.globals.initialConfig.xaxis);if(a.globals.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),c=Math.floor(c),h<1&&(h=1,c=a.globals.dataPoints),c-h<2&&(c=h+1)),"xy"!==i&&"x"!==i||(p={min:h,max:c}),"xy"!==i&&"y"!==i||g.forEach((function(t,e){g[e].min=u[e],g[e].max=d[e]})),n){var f=n.getBeforeZoomRange(p,g);f&&(p=f.xaxis?f.xaxis:p,g=f.yaxis?f.yaxis:g)}var x={xaxis:p};a.config.chart.group||(x.yaxis=g),s.ctx.updateHelpers._updateOptions(x,!1,s.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&n.zoomCallback(p,g)}else if(a.globals.selectionEnabled){var b,m=null;b={min:h,max:c},"xy"!==i&&"y"!==i||(m=v.clone(a.config.yaxis)).forEach((function(t,e){m[e].min=u[e],m[e].max=d[e]})),a.globals.selection=s.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(s.ctx,{xaxis:b,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,a=e;if(void 0!==i.globals.lastClientPosition.x){var s=i.globals.lastClientPosition.x-a.clientX,r=i.globals.lastClientPosition.y-a.clientY;Math.abs(s)>Math.abs(r)&&s>0?this.moveDirection="left":Math.abs(s)>Math.abs(r)&&s<0?this.moveDirection="right":Math.abs(r)>Math.abs(s)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(s)&&r<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var n=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||a.panScrolled(n,o)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,a=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+a,i=t.globals.maxX+a):"right"===this.moveDirection&&(e=t.globals.minX-a,i=t.globals.maxX-a),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,a=this.xyRatios,s=v.clone(i.globals.initialConfig.yaxis),r=a.xRatio,n=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(r=a.invertedYRatio,n=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(t=n+i.globals.gridWidth/15*r,e=o+i.globals.gridWidth/15*r):"right"===this.moveDirection&&(t=n-i.globals.gridWidth/15*r,e=o-i.globals.gridWidth/15*r),i.globals.isRangeBar||(ti.globals.initialMaxX)&&(t=n,e=o);var l={xaxis:{min:t,max:e}};i.config.chart.group||(l.yaxis=s),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var a=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),a}(),va=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return s(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,a=t.clientX,s=t.clientY,r=this.w,n=i.getBoundingClientRect(),o=n.width,l=n.height,h=o/(r.globals.dataPoints-1),c=l/r.globals.dataPoints,d=this.hasBars();!r.globals.comboCharts&&!d||r.config.xaxis.convertedCatToNumeric||(h=o/r.globals.dataPoints);var u=a-n.left-r.globals.barPadForNumericAxis,g=s-n.top;u<0||g<0||u>o||g>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var p=Math.round(u/h),f=Math.floor(g/c);d&&!r.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(u/h),p-=1);var x=null,b=null,m=r.globals.seriesXvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))})),y=r.globals.seriesYvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))}));if(r.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),k=u*(w.width/o),A=g*(w.height/l);x=(b=this.closestInMultiArray(k,A,m,y)).index,p=b.j,null!==x&&(m=r.globals.seriesXvalues[x],p=(b=this.closestInArray(k,m)).index)}return r.globals.capturedSeriesIndex=null===x?-1:x,(!p||p<1)&&(p=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=f:r.globals.capturedDataPointIndex=p,{capturedSeries:x,j:r.globals.isBarHorizontal?f:p,hoverX:u,hoverY:g}}},{key:"closestInMultiArray",value:function(t,e,i,a){var s=this.w,r=0,n=null,o=-1;s.globals.series.length>1?r=this.getFirstActiveXArray(i):n=0;var l=i[r][0],h=Math.abs(t-l);if(i.forEach((function(e){e.forEach((function(e,i){var a=Math.abs(t-e);a<=h&&(h=a,o=i)}))})),-1!==o){var c=a[r][o],d=Math.abs(e-c);n=r,a.forEach((function(t,i){var a=Math.abs(e-t[o]);a<=d&&(d=a,n=i)}))}return{index:n,j:o}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,i=0,a=t.map((function(t,e){return t.length>0?e:-1})),s=0;s0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=f(t)).sort((function(t,e){var i=Number(t.getAttribute("data:realIndex")),a=Number(e.getAttribute("data:realIndex"));return ai?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var i=Number(t.getAttribute("cx")),a=Number(t.getAttribute("cy")),s=t.getAttribute("shape");return new Mi(this.ctx).getMarkerPath(i,a,s,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s ').concat(i.attrs.name,""),e+="
".concat(i.val,"
")})),m.innerHTML=t+"",v.innerHTML=e+""};n?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?y():(m.innerHTML="",v.innerHTML=""):y()}else m.innerHTML="",v.innerHTML="";null!==p&&(a[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:"");if(n&&f[0]){if(l.config.tooltip.hideEmptySeries){var w=a[e].querySelector(".apexcharts-tooltip-marker"),k=a[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(c)?(w.style.display="none",k.style.display="none"):(w.style.display="block",k.style.display="block")}null==c||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)?f[0].parentNode.style.display="none":f[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)&&(f[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var i=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));a&&(a.classList.add("apexcharts-active"),a.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",n="",o=null,l=null,h={series:a.globals.series,seriesIndex:e,dataPointIndex:i,w:a},c=a.globals.ttZFormatter;null===i?l=a.globals.series[e]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(r=s[e][i],0===s[e].length&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=new $i(this.ctx).isFormatXY()?void 0!==a.config.series[e].data[i]?a.config.series[e].data[i].x:"":void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var d=r;a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?r=new Xi(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(this.ctx).formatDate,w:this.w}):r=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](d,h):a.globals.xLabelFormatter(d,h);return void 0!==a.config.tooltip.x.formatter&&(r=a.globals.ttKeyFormatter(d,h)),a.globals.seriesZ.length>0&&a.globals.seriesZ[e].length>0&&(o=c(a.globals.seriesZ[e][i],a)),n="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(d,h):r,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,a=t.y1,s=t.y2,r=t.w,n=this.ttCtx.getElTooltip(),o=r.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]),n.innerHTML=o({ctx:this.ctx,series:r.globals.series,seriesIndex:e,dataPointIndex:i,y1:a,y2:s,w:r})}}]),t}(),wa=function(){function t(e){i(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return s(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=t-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(null!==e&&(r=a.globals.gridWidth/n*e),null===s||a.globals.isBarHorizontal||(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=r;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Mi.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Mi.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=e.globals.translateX;var s;s=new Mi(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=e.globals.translateY+a,r=i.yaxisTTEls[t].getBoundingClientRect().height,n=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(n-=26),s-=r/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=n+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),n=s.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(t)+o+5,h=parseFloat(e)+o/2;if(l>a.globals.gridWidth/2&&(l=l-n.ttWidth-o-10),l>a.globals.gridWidth-n.ttWidth-10&&(l=a.globals.gridWidth-n.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var c=s.getElGrid().getBoundingClientRect();(l=s.e.clientX-c.left)>a.globals.gridWidth/2&&(l-=s.tooltipRect.ttWidth),(h=s.e.clientY+a.globals.translateY-c.top)>a.globals.gridHeight/2&&(h-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+h>a.globals.gridHeight&&(h=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(l)||(l+=a.globals.translateX,r.style.left=l+"px",r.style.top=h+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),r=0;r0){var g=u.getAttribute("shape"),p=l.getMarkerPath(s,r,g,1.5*c);u.setAttribute("d",p)}this.moveXCrosshairs(s),o.fixedTooltip||this.moveTooltip(s,r,c)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,a=i.w,s=0,r=0,n=a.globals.pointsArray,o=new Zi(this.ctx),l=new Mi(this.ctx);e=o.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var h=i.tooltipUtil.getHoverMarkerSize(e);n[e]&&(s=n[e][t][0],r=n[e][t][1]);var c=i.tooltipUtil.getAllMarkers();if(null!==c)for(var d=0;d0){var b=l.getMarkerPath(s,g,f,h);c[d].setAttribute("d",b)}else c[d].setAttribute("d","")}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,r||a.globals.gridHeight,h)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(r=new Zi(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"']"));n||"number"!=typeof e||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var o=n?parseFloat(n.getAttribute("cx")):0,l=n?parseFloat(n.getAttribute("cy")):0,h=n?parseFloat(n.getAttribute("barWidth")):0,c=a.getElGrid().getBoundingClientRect(),d=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!d&&(o-=s%2!=0?h/2:0),n&&d&&(o-=h/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[t-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[t]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?l-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?l=a.e.clientY-c.top-a.tooltipRect.ttHeight/2:l+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(l=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,l||i.globals.gridHeight)}}]),t}(),ka=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new wa(e)}return s(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Vi(this.ctx),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=f(a),t.config.chart.stacked&&a.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w;"bubble"!==s.config.chart.type&&this.newPointSize(t,e);var r=e.getAttribute("cx"),n=e.getAttribute("cy");if(null!==i&&null!==a&&(r=i,n=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===s.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(r,n,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,a=this.ttCtx,s=t,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=e.config.markers.hover.size,o=0;o0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],i);t[e].setAttribute("d",a)}else t[e].setAttribute("d","M0,0")}}}]),t}(),Aa=function(){function t(e){i(this,t),this.w=e.w;var a=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!a.globals.isBarHorizontal&&"rangeBar"===a.config.chart.type&&a.config.plotOptions.bar.rangeBarGroupRows}return s(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,s=t.y,r=t.type,n=this.ttCtx,o=this.w;if(e.target.classList.contains("apexcharts-".concat(r,"-rect"))){var l=this.getAttr(e,"i"),h=this.getAttr(e,"j"),c=this.getAttr(e,"cx"),d=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),g=this.getAttr(e,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:h,shared:!1,e:e}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=h,a=c+n.tooltipRect.ttWidth/2+u,s=d+n.tooltipRect.ttHeight/2-g/2,n.tooltipPosition.moveXCrosshairs(c+u/2),a>o.globals.gridWidth/2&&(a=c-n.tooltipRect.ttWidth/2+u),n.w.config.tooltip.followCursor){var p=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-p.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),s=o.globals.clientY-p.top-(s>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=t.x,n=t.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var h=parseInt(s.paths.getAttribute("cx"),10),c=parseInt(s.paths.getAttribute("cy"),10),d=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),e=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=v.findAncestor(s.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,e,i),o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=i,r=h,n=c+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var g=l.getElGrid().getBoundingClientRect();n=l.e.clientY+o.globals.translateY-g.top}d<0&&(n=c),l.marker.enlargeCurrentPoint(i,s.paths,r,n)}return{x:r,y:n}}},{key:"handleBarTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=this.ttCtx,o=n.getElTooltip(),l=0,h=0,c=0,d=this.getBarTooltipXY({e:a,opt:s});if(null!==d.j||0!==d.barHeight||0!==d.barWidth){e=d.i;var u=d.j;if(r.globals.capturedSeriesIndex=e,r.globals.capturedDataPointIndex=u,r.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!r.config.tooltip.shared?(h=d.x,c=d.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[e]:r.config.stroke.width,l=h):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(c)&&(c=r.globals.svgHeight-n.tooltipRect.ttHeight),parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),h+n.tooltipRect.ttWidth>r.globals.gridWidth?h-=n.tooltipRect.ttWidth:h<0&&(h=0),n.w.config.tooltip.followCursor){var g=n.getElGrid().getBoundingClientRect();c=n.e.clientY-g.top}null===n.tooltip&&(n.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?n.tooltipPosition.moveXCrosshairs(l+i/2):n.tooltipPosition.moveXCrosshairs(l)),!n.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(c=c+r.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=h+r.globals.translateX+"px",o.style.top=c+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,i=t.e,a=t.opt,s=this.w,r=null,n=this.ttCtx,o=0,l=0,h=0,c=0,d=0,u=i.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){var g=i.target,p=g.getBoundingClientRect(),f=a.elGrid.getBoundingClientRect(),x=p.height;d=p.height;var b=p.width,m=parseInt(g.getAttribute("cx"),10),v=parseInt(g.getAttribute("cy"),10);c=parseFloat(g.getAttribute("barWidth"));var y="touchmove"===i.type?i.touches[0].clientX:i.clientX;r=parseInt(g.getAttribute("j"),10),o=parseInt(g.parentNode.getAttribute("rel"),10)-1;var w=g.getAttribute("data-range-y1"),k=g.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(g.parentNode.getAttribute("data:realIndex"),10));var A=function(t){return s.globals.isXNumeric?m-b/2:e.isVerticalGroupedRangeBar?m+b/2:m-n.dataPointsDividedWidth+b/2},C=function(){return v-n.dataPointsDividedHeight+x/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:r,y1:w?parseInt(w,10):null,y2:k?parseInt(k,10):null,shared:!n.showOnIntersect&&s.config.tooltip.shared,e:i}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(l=y-f.left+15,h=C()):(l=A(),h=i.clientY-f.top-n.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((l=m)0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var a=this.ttCtx,s=this.w,r=s.globals,n=r.seriesYAxisMap[t];if(a.yaxisTooltips[t]&&n.length>0){var o=r.yLabelFormatters[t],l=a.getElGrid().getBoundingClientRect(),h=n[0],c=0;i.yRatio.length>1&&(c=h);var d=(e-l.top)*i.yRatio[c],u=r.maxYArr[h]-r.minYArr[h],g=r.minYArr[h]+(u-d);s.config.yaxis[t].reversed&&(g=r.maxYArr[h]-(u-d)),a.tooltipPosition.moveYCrosshairs(e-l.top),a.yaxisTooltipText[t].innerHTML=o(g),a.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),Sa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.tConfig=a.config.tooltip,this.tooltipUtil=new va(this),this.tooltipLabels=new ya(this),this.tooltipPosition=new wa(this),this.marker=new ka(this),this.intersect=new Aa(this),this.axesTooltip=new Ca(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!a.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return s(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new Qi(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,a=[],s=this.getElTooltip(),r=function(r){var n=document.createElement("div");n.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(r)),n.style.order=i.config.tooltip.inverseOrder?t-r:r+1;var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[r],n.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var a=document.createElement("span");a.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(a),l.appendChild(e)})),n.appendChild(l),s.appendChild(n),a.push(n)},n=0;n0&&this.addPathsEventListeners(g,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(r=r+t.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+t.globals.svgHeight-s-10),e.style.left=r+"px",e.style.top=n+"px",{x:r,y:n,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,a=function(a){var s={paths:t[a],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[a].addEventListener(e,i.onSeriesHover.bind(i,s),{capture:!1,passive:!0})}))},s=0;s=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(t,e)}),20-a))}},{key:"seriesHover",value:function(t,e){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||0===s.globals.dataPoints)||(a.length?a.forEach((function(a){var s=i.getElTooltip(a),r={paths:t.paths,tooltipEl:s,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===i.w.globals.minX&&a.w.globals.maxX===i.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:r,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,a=t.opt,s=t.e,r=e.w,n=this.getElTooltip(e);if(n){if(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=s,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared)if(this.tConfig.onDatasetHover.highlightDataSeries)new Zi(e).toggleSeriesOnHover(s,s.target.parentNode);i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect})}}},{key:"axisChartsTooltips",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=s.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,ln.top+n.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var h=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(h)<0)return void this.handleMouseOut(s)}var c=this.getElTooltip(),d=this.getElXCrosshairs(),u=[];r.config.chart.group&&(u=this.ctx.getSyncedCharts());var g=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;null!==d&&d.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),g&&!this.showOnIntersect||u.length>1)this.handleStickyTooltip(a,o,l,s);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:e,y:i,type:r.config.chart.type});e=f.x,i=f.y,c.style.left=e+"px",c.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:e,y:i});if(this.yaxisTooltips.length)for(var x=0;xl.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(t,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||s.globals.isBarHorizontal){var h=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,h,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,i,a){var s=this.w;if(!this.tConfig.shared&&null===s.globals.series[e][a])return void this.handleMouseOut(i);if(void 0!==s.globals.series[e][a])this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,a,i.ttItems):this.create(t,this,e,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var r=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,r,a,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Mi(this.ctx),i=t.globals.dom.Paper.find(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,A=this.w,C=e;"mouseup"===t.type&&this.markerClick(t,i,a),null===k&&(k=this.tConfig.shared);var S=this.tooltipUtil.hasMarkers(i),L=this.tooltipUtil.getElBars();if(A.config.legend.tooltipHoverFormatter){var M=A.config.legend.tooltipHoverFormatter,P=Array.from(this.legendLabels);P.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var I=0;I0?C.marker.enlargePoints(a):C.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var E=new Mi(this.ctx),H=A.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var O=0;O0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*k)),w){u=u+d.height/2-b/2-2}var C=e.globals.series[i][a]<0,S=o;switch(this.barCtx.isReversed&&(S=o+(C?c:-c)),f.position){case"center":g=w?C?S-c/2+v:S+c/2-v:C?S-c/2+d.height/2+v:S+c/2+d.height/2-v;break;case"bottom":g=w?C?S-c+v:S+c-v:C?S-c+d.height+b+v:S+c-d.height/2+b-v;break;case"top":g=w?C?S+v:S-v:C?S-d.height/2-v:S+d.height+v}if(this.barCtx.lastActiveBarSerieIndex===s&&x.enabled){var L=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:a}),p.fontSize);r=C?S-L.height/2-v-x.offsetY+18:S+L.height+v+x.offsetY-18;var M=A;n=y+(e.globals.isXNumeric?-h*e.globals.barGroups.length/2:e.globals.barGroups.length*h/2-(e.globals.barGroups.length-1)*h-M)+x.offsetX}return e.config.chart.stacked||(g<0?g=0+b:g+d.height/3>e.globals.gridHeight&&(g=e.globals.gridHeight-b)),{bcx:l,bcy:o,dataLabelsX:u,dataLabelsY:g,totalDataLabelsX:n,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,a=t.i,s=t.j,r=t.realIndex,n=t.bcy,o=t.barHeight,l=t.barWidth,h=t.textRects,c=t.dataLabelsX,d=t.strokeWidth,u=t.dataLabelsConfig,g=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,f=t.offX,x=t.offY,b=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var m,v,y=n-(this.barCtx.isRangeBar?0:b)+o/2+h.height/2+x-3,w="start",k=e.globals.series[a][s]<0,A=i;switch(this.barCtx.isReversed&&(A=i+(k?-l:l),w=k?"start":"end"),g.position){case"center":c=k?A+l/2-f:Math.max(h.width/2,A-l/2)+f;break;case"bottom":c=k?A+l-d-f:A-l+d+f;break;case"top":c=k?A-d-f:A-d+f}if(this.barCtx.lastActiveBarSerieIndex===r&&p.enabled){var C=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:s}),u.fontSize);k?(m=A-d-f-p.offsetX,w="end"):m=A+f+p.offsetX+(this.barCtx.isReversed?-(l+d):d),v=y-h.height/2+C.height/2+p.offsetY+d}return e.config.chart.stacked||("start"===u.textAnchor?c-h.width<0?c=k?h.width+d:d:c+h.width>e.globals.gridWidth&&(c=k?e.globals.gridWidth-d:e.globals.gridWidth-h.width-d):"middle"===u.textAnchor?c-h.width/2<0?c=h.width/2+d:c+h.width/2>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width/2-d):"end"===u.textAnchor&&(c<1?c=h.width+d:c+1>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width-d))),{bcx:i,bcy:n,dataLabelsX:c,dataLabelsY:y,totalDataLabelsX:m,totalDataLabelsY:v,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.i,r=t.j,n=t.textRects,o=t.barHeight,l=t.barWidth,h=t.dataLabelsConfig,c=this.w,d="rotate(0)";"vertical"===c.config.plotOptions.bar.dataLabels.orientation&&(d="rotate(-90, ".concat(e,", ").concat(i,")"));var g=new qi(this.barCtx.ctx),p=new Mi(this.barCtx.ctx),f=h.formatter,x=null,b=c.globals.collapsedSeriesIndices.indexOf(s)>-1;if(h.enabled&&!b){x=p.group({class:"apexcharts-data-labels",transform:d});var m="";void 0!==a&&(m=f(a,u(u({},c),{},{seriesIndex:s,dataPointIndex:r,w:c}))),!a&&c.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(m="");var v=c.globals.series[s][r]<0,y=c.config.plotOptions.bar.dataLabels.position;if("vertical"===c.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(h.textAnchor=v?"end":"start"),"center"===y&&(h.textAnchor="middle"),"bottom"===y&&(h.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels)lMath.abs(l)&&(m=""):n.height/1.6>Math.abs(o)&&(m=""));var w=u({},h);this.barCtx.isHorizontal&&a<0&&("start"===h.textAnchor?w.textAnchor="end":"end"===h.textAnchor&&(w.textAnchor="start")),g.plotDataLabelsText({x:e,y:i,text:m,i:s,j:r,parent:x,dataLabelsConfig:w,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}},{key:"drawTotalDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.realIndex,r=t.textAnchor,n=t.barTotalDataLabelsConfig;this.w;var o,l=new Mi(this.barCtx.ctx);return n.enabled&&void 0!==e&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===s&&(o=l.drawText({x:e,y:i,foreColor:n.style.color,text:a,textAnchor:r,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),o}}]),t}(),Ma=function(){function t(e){i(this,t),this.w=e.w,this.barCtx=e}return s(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[i].length),e.globals.isXNumeric)for(var a=0;ae.globals.minX&&e.globals.seriesX[i][a]0&&(a=l.globals.minXDiff/d),(r=a/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),n=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+(a-r*this.barCtx.seriesLen)/2}return l.globals.barHeight=s,l.globals.barWidth=r,{x:t,y:e,yDivision:i,xDivision:a,barHeight:s,barWidth:r,zeroH:n,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,i,a){var s,r,n,o,l=this.w,h=this.barCtx.ctx.fill,c=null,d=this.barCtx.barOptions.distributed?i:e;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(a){t[e][i]>=a.from&&t[e][i]<=a.to&&(c=a.color)}));return h.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:a,dataPointIndex:i,color:c,value:t[e][i],fillConfig:null===(s=l.config.series[e].data[i])||void 0===s?void 0:s.fill,fillType:null!==(r=l.config.series[e].data[i])&&void 0!==r&&null!==(n=r.fill)&&void 0!==n&&n.type?null===(o=l.config.series[e].data[i])||void 0===o?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[a]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,i){var a=0,s=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"createBorderRadiusArr",value:function(t){var e,i=this.w,a=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,s=t.length,n=0|(null===(e=t[0])||void 0===e?void 0:e.length),o=Array.from({length:s},(function(){return Array(n).fill(a?"top":"none")}));if(a)return o;for(var l=0;l0?(h.push(u),d++):g<0&&(c.push(u),d++)}if(h.length>0&&0===c.length)if(1===h.length)o[h[0]][l]="both";else{var p,f=h[0],x=h[h.length-1],b=r(h);try{for(b.s();!(p=b.n()).done;){var m=p.value;o[m][l]=m===f?"bottom":m===x?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===h.length)if(1===c.length)o[c[0]][l]="both";else{var v,y=Math.max.apply(Math,c),w=Math.min.apply(Math,c),k=r(c);try{for(k.s();!(v=k.n()).done;){var A=v.value;o[A][l]=A===y?"bottom":A===w?"top":"none"}}catch(t){k.e(t)}finally{k.f()}}else if(h.length>0&&c.length>0){var C,S=h[h.length-1],L=r(h);try{for(L.s();!(C=L.n()).done;){var M=C.value;o[M][l]=M===S?"top":"none"}}catch(t){L.e(t)}finally{L.f()}var P,I=Math.max.apply(Math,c),T=r(c);try{for(T.s();!(P=T.n()).done;){var z=P.value;o[z][l]=z===I?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else if(1===d){o[h[0]||c[0]][l]="both"}}return o}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,a=t.x1,s=t.x2,r=t.y1,n=t.y2,o=t.elSeries,l=this.w,h=new Mi(this.barCtx.ctx),c=new Zi(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var d=this.barCtx.barOptions.colors.backgroundBarColors[e],u=h.drawRect(void 0!==a?a:0,void 0!==r?r:0,void 0!==s?s:l.globals.gridWidth,void 0!==n?n:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,i=t.barWidth,a=t.barXPosition,s=t.y1,r=t.y2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.columnWidthOffset&&(x=a-g.config.series[c].data[u].columnWidthOffset/2,f=i+g.config.series[c].data[u].columnWidthOffset);var b=n/2,m=x+b,v=x+f-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001-b*y,r+=.001+b*y;var w=p.move(m,s),k=p.move(m,s),A=p.line(v,s);if(g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1)),w=w+p.line(m,r)+p.line(v,r)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(m,s)+A+A+A+A+A+p.line(m,s)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).yArrj.push(r-b*y),C.yArrjF.push(Math.abs(s-r+n*y)),C.yArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"getBarpaths",value:function(t){var e,i=t.barYPosition,a=t.barHeight,s=t.x1,r=t.x2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.barHeightOffset&&(f=i-g.config.series[c].data[u].barHeightOffset/2,x=a+g.config.series[c].data[u].barHeightOffset);var b=n/2,m=f+b,v=f+x-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001+b*y,r+=.001-b*y;var w=p.move(s,m),k=p.move(s,m);g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1));var A=p.line(s,v);if(w=w+p.line(r,m)+p.line(r,v)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(s,m)+A+A+A+A+A+p.line(s,m)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).xArrj.push(r+b*y),C.xArrjF.push(Math.abs(s-r-n*y)),C.xArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;a2&&void 0!==arguments[2])||arguments[2]?e:null;return null!=t&&(i=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(t,e,i){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?e:null;return null!=t&&(a=e-t/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(t,e,i,a,s,r){var n=this,l=this.w,h=[],c=function(a,s){var l;h.push((o(l={},t,"x"===t?n.getXForValue(a,e,!1):n.getYForValue(a,i,r,!1)),o(l,"attrs",s),l))};if(l.globals.seriesGoals[a]&&l.globals.seriesGoals[a][s]&&Array.isArray(l.globals.seriesGoals[a][s])&&l.globals.seriesGoals[a][s].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,g={strokeHeight:"x"===t?0:l.globals.markers.size[a],strokeWidth:"x"===t?l.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[a])?d[a][0]:d[a]};c(l.globals.seriesRangeStart[a][s],g),c(l.globals.seriesRangeEnd[a][s],u(u({},g),{},{strokeColor:Array.isArray(d[a])?d[a][1]:d[a]}))}return h}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,a=t.goalX,s=t.goalY,r=t.barWidth,n=t.barHeight,o=new Mi(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var h=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach((function(t){if(t.x>=-1&&t.x<=o.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:n/2,a=i+e+n/2;h=o.drawLine(t.x,a-2*e,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(h)}})):Array.isArray(s)&&s.forEach((function(t){if(t.y>=-1&&t.y<=o.w.globals.gridHeight+1){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:r/2,a=e+i+r/2;h=o.drawLine(a-2*i,t.y,a,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(h)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,i=t.currPaths,a=t.color,s=this.w,r=e.x,n=e.x1,o=e.barYPosition,l=i.x,h=i.x1,c=i.barYPosition,d=o+i.barHeight,u=new Mi(this.barCtx.ctx),g=new v,p=u.move(n,d)+u.line(r,d)+u.line(l,c)+u.line(h,c)+u.line(n,d)+("around"===s.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return u.drawPath({d:p,fill:g.shadeColor(.5,v.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,i=t.i,a=t.j,s=this.w,r=0,n=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map((function(t,e){return e})):(null===(e=s.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=s.globals.seriesPercent[t][a];e&&r++,t-1})),a=this.barCtx.columnGroupIndices,s=a.indexOf(i);return s<0&&(a.push(i),s=a.length-1),{groupIndex:i,columnGroupIndex:s}}}]),t}(),Pa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w;var s=this.w;this.barOptions=s.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=s.config.stroke.width,this.isNullValue=!1,this.isRangeBar=s.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!s.globals.isBarHorizontal&&s.globals.seriesRange.length&&s.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=a,null!==this.xyRatios&&(this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.invertedXRatio=a.invertedXRatio,this.invertedYRatio=a.invertedYRatio,this.baseLineY=a.baseLineY,this.baseLineInvertedY=a.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var r=new Zi(this.ctx);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var n=r.getBarSeriesIndices(),o=new Pi(this.ctx);this.stackedSeriesTotals=o.getStackedSeriesTotals(this.w.config.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}))),this.barHelpers=new Ma(this)}return s(t,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=new Pi(this.ctx,i);t=s.getLogSeries(t),this.series=t,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var n=0,o=0;n0&&(this.visibleI=this.visibleI+1);var w=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[b],this.translationsIndex=b);var A=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var C=this.barHelpers.initialPositions();p=C.y,w=C.barHeight,h=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,l=C.xDivision,c=C.zeroH,this.isHorizontal||x.push(g+k/2);var S=a.group({class:"apexcharts-datalabels","data:realIndex":b});i.globals.delayedElements.push({el:S.node}),S.node.classList.add("apexcharts-element-hidden");var L=a.group({class:"apexcharts-bar-goals-markers"}),M=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");for(var P=0;P0){var R=this.barHelpers.drawBarShadow({color:"string"==typeof X&&-1===(null==X?void 0:X.indexOf("url"))?X:v.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});if(M.add(R),i.config.chart.dropShadow.enabled)new Li(this.ctx).dropShadow(R,i.config.chart.dropShadow,b)}this.pathArr.push(T);var Y=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:w,barWidth:k});Y&&L.add(Y),p=T.y,g=T.x,P>0&&x.push(g+k/2),f.push(p),this.renderSeries({realIndex:b,pathFill:X,j:P,i:n,columnGroupIndex:m,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:I,elSeries:y,x:g,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:w),barWidth:Math.abs(T.barWidth?T.barWidth:k),elDataLabelsWrap:S,elGoalsMarkers:L,elBarShadows:M,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[b]=x,i.globals.seriesYvalues[b]=f,r.add(y)}return r}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,a=t.lineFill,s=t.j,r=t.i,n=t.columnGroupIndex,o=t.pathFrom,l=t.pathTo,h=t.strokeWidth,c=t.elSeries,d=t.x,u=t.y,g=t.y1,p=t.y2,f=t.series,x=t.barHeight,b=t.barWidth,m=t.barXPosition,v=t.barYPosition,y=t.elDataLabelsWrap,w=t.elGoalsMarkers,k=t.elBarShadows,A=t.visibleSeries,C=t.type,S=t.classes,L=this.w,M=new Mi(this.ctx);if(!a){var P="function"==typeof L.globals.stroke.colors[e]?function(t){var e,i=L.config.stroke.colors;return Array.isArray(i)&&i.length>0&&((e=i[t])||(e=""),"function"==typeof e)?e({value:L.globals.series[t][s],dataPointIndex:s,w:L}):e}(e):L.globals.stroke.colors[e];a=this.barOptions.distributed?L.globals.stroke.colors[s]:P}L.config.series[r].data[s]&&L.config.series[r].data[s].strokeColor&&(a=L.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var I=s/L.config.chart.animations.animateGradually.delay*(L.config.chart.animations.speed/L.globals.dataPoints)/2.4,T=M.renderPaths({i:r,j:s,realIndex:e,pathFrom:o,pathTo:l,stroke:a,strokeWidth:h,strokeLineCap:L.config.stroke.lineCap,fill:i,animationDelay:I,initialSpeed:L.config.chart.animations.speed,dataChangeSpeed:L.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(C,"-area ").concat(S),chartType:C});T.attr("clip-path","url(#gridRectBarMask".concat(L.globals.cuid,")"));var z=L.config.forecastDataPoints;z.count>0&&s>=L.globals.dataPoints-z.count&&(T.node.setAttribute("stroke-dasharray",z.dashArray),T.node.setAttribute("stroke-width",z.strokeWidth),T.node.setAttribute("fill-opacity",z.fillOpacity)),void 0!==g&&void 0!==p&&(T.attr("data-range-y1",g),T.attr("data-range-y2",p)),new Li(this.ctx).setSelectionFilter(T,e,s),c.add(T);var X=new La(this).handleBarDataLabels({x:d,y:u,y1:g,y2:p,i:r,j:s,series:f,realIndex:e,columnGroupIndex:n,barHeight:x,barWidth:b,barXPosition:m,barYPosition:v,renderedPath:T,visibleSeries:A});return null!==X.dataLabels&&y.add(X.dataLabels),X.totalDataLabels&&y.add(X.totalDataLabels),c.add(y),w&&c.add(w),k&&c.add(k),c}},{key:"drawBarPaths",value:function(t){var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.yDivision,h=t.elSeries,c=this.w,d=i.i,u=i.j;if(c.globals.isXNumeric)e=(o=(c.globals.seriesX[d][u]-c.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var g=0,p=0;c.globals.seriesPercent.forEach((function(t,e){t[u]&&g++,e0&&(a=this.seriesLen*a/g),e=o+a*this.visibleI,e-=a*p}else e=o+a*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[d][u],r)-r)/2),n=this.barHelpers.getXForValue(this.series[d][u],r);var f=this.barHelpers.getBarpaths({barYPosition:e,barHeight:a,x1:r,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:d,j:u,w:c});return c.globals.isXNumeric||(o+=l),this.barHelpers.barBackground({j:u,i:d,y1:e-a*this.visibleI,y2:a*this.seriesLen,elSeries:h}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x1:r,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",r,null,d,u),barYPosition:e,barHeight:a}}},{key:"drawColumnPaths",value:function(t){var e,i=t.indexes,a=t.x,s=t.y,r=t.xDivision,n=t.barWidth,o=t.zeroH,l=t.strokeWidth,h=t.elSeries,c=this.w,d=i.realIndex,u=i.translationsIndex,g=i.i,p=i.j,f=i.bc;if(c.globals.isXNumeric){var x=this.getBarXForNumericXAxis({x:a,j:p,realIndex:d,barWidth:n});a=x.x,e=x.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var b=this.barHelpers.getZeroValueEncounters({i:g,j:p}),m=b.nonZeroColumns,v=b.zeroEncounters;m>0&&(n=this.seriesLen*n/m),e=a+n*this.visibleI,e-=n*v}else e=a+n*this.visibleI;s=this.barHelpers.getYForValue(this.series[g][p],o,u);var y=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:n,y1:o,y2:s,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:d,i:g,j:p,w:c});return c.globals.isXNumeric||(a+=r),this.barHelpers.barBackground({bc:f,j:p,i:g,x1:e-l/2-n*this.visibleI,x2:n*this.seriesLen+l/2,elSeries:h}),{pathTo:y.pathTo,pathFrom:y.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,g,p,u),barXPosition:e,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,i=t.barWidth,a=t.realIndex,s=t.j,r=this.w,n=a;return r.globals.seriesX[a].length||(n=r.globals.maxValsInArrayIndex),v.isNumber(r.globals.seriesX[n][s])&&(e=(r.globals.seriesX[n][s]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:e+i*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var i,a=this.w,s=0;s0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==a.globals.previousPaths[s].paths[e]&&(i=a.globals.previousPaths[s].paths[e].d)}return i}}]),t}(),Ia=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this,a=this.w;this.graphics=new Mi(this.ctx),this.bar=new Pa(this.ctx,this.xyRatios);var s=new Pi(this.ctx,a);t=s.getLogSeries(t),this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===a.config.chart.stackType&&(t=a.globals.comboCharts?e.map((function(t){return a.globals.seriesPercent[t]})):a.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);for(var r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),n=0,o=0,l=function(s,l){var h=void 0,c=void 0,d=void 0,g=void 0,p=a.globals.comboCharts?e[s]:s,f=i.barHelpers.getGroupIndex(p),x=f.groupIndex,b=f.columnGroupIndex;i.groupCtx=i[a.globals.seriesGroups[x]];var m=[],y=[],w=0;i.yRatio.length>1&&(i.yaxisIndex=a.globals.seriesYAxisReverseMap[p][0],w=p),i.isReversed=a.config.yaxis[i.yaxisIndex]&&a.config.yaxis[i.yaxisIndex].reversed;var k=i.graphics.group({class:"apexcharts-series",seriesName:v.escapeString(a.globals.seriesNames[p]),rel:s+1,"data:realIndex":p});i.ctx.series.addCollapsedClassToSeries(k,p);var A=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),C=i.graphics.group({class:"apexcharts-bar-goals-markers"}),S=0,L=0,M=i.initialPositions(n,o,h,c,d,g,w);o=M.y,S=M.barHeight,c=M.yDivision,g=M.zeroW,n=M.x,L=M.barWidth,h=M.xDivision,d=M.zeroH,a.globals.barHeight=S,a.globals.barWidth=L,i.barHelpers.initializeStackedXYVars(i),1===i.groupCtx.prevY.length&&i.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(i.groupCtx.prevY[0]=i.groupCtx.prevY[0].map((function(){return d})),i.groupCtx.prevYF[0]=i.groupCtx.prevYF[0].map((function(){return 0})));for(var P=0;P0||"top"===i.barHelpers.arrBorderRadius[p][P]&&a.globals.series[p][P]<0)&&(Y=E),k=i.renderSeries({realIndex:p,pathFill:R,j:P,i:s,columnGroupIndex:b,pathFrom:z.pathFrom,pathTo:z.pathTo,strokeWidth:I,elSeries:k,x:n,y:o,series:t,barHeight:S,barWidth:L,elDataLabelsWrap:A,elGoalsMarkers:C,type:"bar",visibleSeries:b,classes:Y})}a.globals.seriesXvalues[p]=m,a.globals.seriesYvalues[p]=y,i.groupCtx.prevY.push(i.groupCtx.yArrj),i.groupCtx.prevYF.push(i.groupCtx.yArrjF),i.groupCtx.prevYVal.push(i.groupCtx.yArrjVal),i.groupCtx.prevX.push(i.groupCtx.xArrj),i.groupCtx.prevXF.push(i.groupCtx.xArrjF),i.groupCtx.prevXVal.push(i.groupCtx.xArrjVal),r.add(k)},h=0,c=0;h1?l=(i=h.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(d).indexOf("%")?l=parseInt(d,10):l*=parseInt(d,10)/100,s=this.isReversed?this.baseLineY[n]:h.globals.gridHeight-this.baseLineY[n],t=h.globals.padHorizontal+(i-l)/2}var u=h.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:i,barHeight:o/u,barWidth:l/u,zeroH:s,zeroW:r}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.columnGroupIndex,h=t.seriesGroup,c=t.yDivision,d=t.elSeries,u=this.w,g=o+l*a,p=i.i,f=i.j,x=i.realIndex,b=i.translationsIndex,m=0,v=0;v0){var w=r;this.groupCtx.prevXVal[y-1][f]<0?w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[y-1][f]:this.groupCtx.prevXVal[y-1][f]>=0&&(w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]:this.groupCtx.prevX[y-1][f]-m+2*(this.isReversed?m:0)),e=w}else e=r;n=null===this.series[p][f]?e:e+this.series[p][f]/this.invertedYRatio-2*(this.isReversed?this.series[p][f]/this.invertedYRatio:0);var k=this.barHelpers.getBarpaths({barYPosition:g,barHeight:a,x1:e,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,seriesGroup:h,i:p,j:f,w:u});return this.barHelpers.barBackground({j:f,i:p,y1:g,y2:a,elSeries:d}),o+=c,{pathTo:k.pathTo,pathFrom:k.pathFrom,goalX:this.barHelpers.getGoalValues("x",r,null,p,f,b),barXPosition:e,barYPosition:g,x:n,y:o}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,r=t.barWidth,n=t.zeroH,o=t.columnGroupIndex,l=t.seriesGroup,h=t.elSeries,c=this.w,d=e.i,u=e.j,g=e.bc,p=e.realIndex,f=e.translationsIndex;if(c.globals.isXNumeric){var x=c.globals.seriesX[p][u];x||(x=0),i=(x-c.globals.minX)/this.xRatio-r/2*c.globals.barGroups.length}for(var b,m=i+o*r,v=0,y=0;y0&&!c.globals.isXNumeric||w>0&&c.globals.isXNumeric&&c.globals.seriesX[p-1][u]===c.globals.seriesX[p][u]){var k,A,C,S=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var L=1;L=0?C-v+2*(this.isReversed?v:0):C;break}if((null===(T=this.groupCtx.prevYVal[w-P])||void 0===T?void 0:T[u])>=0){A=this.series[d][u]>=0?C:C+v-2*(this.isReversed?v:0);break}}void 0===A&&(A=c.globals.gridHeight),b=null!==(k=this.groupCtx.prevYF[0])&&void 0!==k&&k.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?n:A}else b=n;a=this.series[d][u]?b-this.series[d][u]/this.yRatio[f]+2*(this.isReversed?this.series[d][u]/this.yRatio[f]:0):b;var z=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:r,y1:b,y2:a,yRatio:this.yRatio[f],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:d,j:u,w:c});return this.barHelpers.barBackground({bc:g,j:u,i:d,x1:m,x2:r,elSeries:h}),{pathTo:z.pathTo,pathFrom:z.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,n,d,u),barXPosition:m,x:c.globals.isXNumeric?i:i+s,y:a}}}]),a}(),Ta=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e,i){var a=this,s=this.w,r=new Mi(this.ctx),n=s.globals.comboCharts?e:s.config.chart.type,o=new ji(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=s.config.plotOptions.bar.horizontal;var l=new Pi(this.ctx,s);t=l.getLogSeries(t),this.series=t,this.yRatio=l.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var h=r.group({class:"apexcharts-".concat(n,"-series apexcharts-plot-series")}),c=function(e){a.isBoxPlot="boxPlot"===s.config.chart.type||"boxPlot"===s.config.series[e].type;var n,l,c,d,g=void 0,p=void 0,f=[],x=[],b=s.globals.comboCharts?i[e]:e,m=a.barHelpers.getGroupIndex(b).columnGroupIndex,y=r.group({class:"apexcharts-series",seriesName:v.escapeString(s.globals.seriesNames[b]),rel:e+1,"data:realIndex":b});a.ctx.series.addCollapsedClassToSeries(y,b),t[e].length>0&&(a.visibleI=a.visibleI+1);var w,k,A=0;a.yRatio.length>1&&(a.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],A=b);var C=a.barHelpers.initialPositions();p=C.y,w=C.barHeight,l=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,n=C.xDivision,c=C.zeroH,x.push(g+k/2);for(var S=r.group({class:"apexcharts-datalabels","data:realIndex":b}),L=r.group({class:"apexcharts-bar-goals-markers"}),M=function(i){var r=a.barHelpers.getStrokeWidth(e,i,b),h=null,v={indexes:{i:e,j:i,realIndex:b,translationsIndex:A},x:g,y:p,strokeWidth:r,elSeries:y};h=a.isHorizontal?a.drawHorizontalBoxPaths(u(u({},v),{},{yDivision:l,barHeight:w,zeroW:d})):a.drawVerticalBoxPaths(u(u({},v),{},{xDivision:n,barWidth:k,zeroH:c})),p=h.y,g=h.x;var C=a.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:h.barYPosition,goalX:h.goalX,goalY:h.goalY,barHeight:w,barWidth:k});C&&L.add(C),i>0&&x.push(g+k/2),f.push(p),h.pathTo.forEach((function(n,l){var c=!a.isBoxPlot&&a.candlestickOptions.wick.useFillColor?h.color[l]:s.globals.stroke.colors[e],d=o.fillPath({seriesNumber:b,dataPointIndex:i,color:h.color[l],value:t[e][i]});a.renderSeries({realIndex:b,pathFill:d,lineFill:c,j:i,i:e,pathFrom:h.pathFrom,pathTo:n,strokeWidth:r,elSeries:y,x:g,y:p,series:t,columnGroupIndex:m,barHeight:w,barWidth:k,elDataLabelsWrap:S,elGoalsMarkers:L,visibleSeries:a.visibleI,type:s.config.chart.type})}))},P=0;Pb.c&&(d=!1);var y=Math.min(b.o,b.c),w=Math.max(b.o,b.c),k=b.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[u][c]-o.globals.minX)/this.xRatio-s/2);var A=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(y=r,w=r):(y=r-y/x,w=r-w/x,m=r-b.h/x,v=r-b.l/x,k=r-b.m/x);var C=l.move(A,r),S=l.move(A+s/2,y);return o.globals.previousPaths.length>0&&(S=this.getPreviousPath(u,c,!0)),C=this.isBoxPlot?[l.move(A,y)+l.line(A+s/2,y)+l.line(A+s/2,m)+l.line(A+s/4,m)+l.line(A+s-s/4,m)+l.line(A+s/2,m)+l.line(A+s/2,y)+l.line(A+s,y)+l.line(A+s,k)+l.line(A,k)+l.line(A,y+n/2),l.move(A,k)+l.line(A+s,k)+l.line(A+s,w)+l.line(A+s/2,w)+l.line(A+s/2,v)+l.line(A+s-s/4,v)+l.line(A+s/4,v)+l.line(A+s/2,v)+l.line(A+s/2,w)+l.line(A,w)+l.line(A,k)+"z"]:[l.move(A,w)+l.line(A+s/2,w)+l.line(A+s/2,m)+l.line(A+s/2,w)+l.line(A+s,w)+l.line(A+s,y)+l.line(A+s/2,y)+l.line(A+s/2,v)+l.line(A+s/2,y)+l.line(A,y)+l.line(A,w-n/2)],S+=l.move(A,y),o.globals.isXNumeric||(i+=a),{pathTo:C,pathFrom:S,x:i,y:w,goalY:this.barHelpers.getGoalValues("y",null,r,h,c,e.translationsIndex),barXPosition:A,color:this.isBoxPlot?f:d?[g]:[p]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var i=t.y,a=t.yDivision,s=t.barHeight,r=t.zeroW,n=t.strokeWidth,o=this.w,l=new Mi(this.ctx),h=e.i,c=e.j,d=this.boxOptions.colors.lower;this.isBoxPlot&&(d=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,g=e.realIndex,p=this.getOHLCValue(g,c),f=r,x=r,b=Math.min(p.o,p.c),m=Math.max(p.o,p.c),v=p.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[g][c]-o.globals.minX)/this.invertedXRatio-s/2);var y=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(b=r,m=r):(b=r+b/u,m=r+m/u,f=r+p.h/u,x=r+p.l/u,v=r+p.m/u);var w=l.move(r,y),k=l.move(b,y+s/2);return o.globals.previousPaths.length>0&&(k=this.getPreviousPath(g,c,!0)),w=[l.move(b,y)+l.line(b,y+s/2)+l.line(f,y+s/2)+l.line(f,y+s/2-s/4)+l.line(f,y+s/2+s/4)+l.line(f,y+s/2)+l.line(b,y+s/2)+l.line(b,y+s)+l.line(v,y+s)+l.line(v,y)+l.line(b+n/2,y),l.move(v,y)+l.line(v,y+s)+l.line(m,y+s)+l.line(m,y+s/2)+l.line(x,y+s/2)+l.line(x,y+s-s/4)+l.line(x,y+s/4)+l.line(x,y+s/2)+l.line(m,y+s/2)+l.line(m,y)+l.line(v,y)+"z"],k+=l.move(b,y),o.globals.isXNumeric||(i+=a),{pathTo:w,pathFrom:k,x:m,y:i,goalX:this.barHelpers.getGoalValues("x",r,null,h,c),barYPosition:y,color:d}}},{key:"getOHLCValue",value:function(t,e){var i=this.w,a=new Pi(this.ctx,i),s=a.getLogValAtSeriesIndex(i.globals.seriesCandleH[t][e],t),r=a.getLogValAtSeriesIndex(i.globals.seriesCandleO[t][e],t),n=a.getLogValAtSeriesIndex(i.globals.seriesCandleM[t][e],t),o=a.getLogValAtSeriesIndex(i.globals.seriesCandleC[t][e],t),l=a.getLogValAtSeriesIndex(i.globals.seriesCandleL[t][e],t);return{o:this.isBoxPlot?s:r,h:this.isBoxPlot?r:s,m:n,l:this.isBoxPlot?o:l,c:this.isBoxPlot?l:o}}}]),a}(),za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,a){var s=this.w,r=1,n=s.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,i);s.globals.hasNegs||a?r=s.config.plotOptions[t].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):(1-o.percent/100)*(1.25*n):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(r=1-o.percent/100,"treemap"===t&&(r=(1-o.percent/100)*(1.25*n)));var l=o.color,h=new v;if(s.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var c=h.shadeColor(-1*r,o.color);l=v.hexToRgba(v.isColorHex(c)?c:v.rgb2hex(c),s.config.fill.opacity)}else{var d=h.shadeColor(r,o.color);l=v.hexToRgba(v.isColorHex(d)?d:v.rgb2hex(d),s.config.fill.opacity)}return{color:l,colorProps:o}}},{key:"determineColor",value:function(t,e,i){var a=this.w,s=a.globals.series[e][i],r=a.config.plotOptions[t],n=r.colorScale.inverse?i:e;r.distributed&&"treemap"===a.config.chart.type&&(n=i);var o=a.globals.colors[n],l=null,h=Math.min.apply(Math,f(a.globals.series[e])),c=Math.max.apply(Math,f(a.globals.series[e]));r.distributed||"heatmap"!==t||(h=a.globals.minY,c=a.globals.maxY),void 0!==r.colorScale.min&&(h=r.colorScale.mina.globals.maxY?r.colorScale.max:a.globals.maxY);var d=Math.abs(c)+Math.abs(h),u=100*s/(0===d?d-1e-6:d);r.colorScale.ranges.length>0&&r.colorScale.ranges.map((function(t,e){if(s>=t.from&&s<=t.to){o=t.color,l=t.foreColor?t.foreColor:null,h=t.from,c=t.to;var i=Math.abs(c)+Math.abs(h);u=100*s/(0===i?i-1e-6:i)}}));return{color:o,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,a=t.y,s=t.i,r=t.j,n=t.colorProps,o=t.fontSize,l=this.w.config.dataLabels,h=new Mi(this.ctx),c=new qi(this.ctx),d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});var u=l.offsetX,g=l.offsetY,p=i+u,f=a+parseFloat(l.style.fontSize)/3+g;c.plotDataLabelsText({x:p,y:f,text:e,i:s,j:r,color:n.foreColor,parent:d,fontSize:o,dataLabelsConfig:l})}return d}},{key:"addListeners",value:function(t){var e=new Mi(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),Xa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w,this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new za(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return s(t,[{key:"draw",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var s=e.globals.gridWidth/e.globals.dataPoints,r=e.globals.gridHeight/e.globals.series.length,n=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var h=o?0:l.length-1;o?h=0;o?h++:h--){var c=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:v.escapeString(e.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(this.ctx.series.addCollapsedClassToSeries(c,h),e.config.chart.dropShadow.enabled){var d=e.config.chart.dropShadow;new Li(this.ctx).dropShadow(c,d,h)}for(var u=0,g=e.config.plotOptions.heatmap.shadeIntensity,p=0;p-1&&this.pieClicked(d),i.config.dataLabels.enabled){var w=m.x,k=m.y,A=100*g/this.fullAngle+"%";if(0!==g&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(h=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(h)>this.fullAngle&&(h-=this.fullAngle);var c=Math.PI*(h-90)/180,d=i.centerX+r*Math.cos(l),u=i.centerY+r*Math.sin(l),g=i.centerX+r*Math.cos(c),p=i.centerY+r*Math.sin(c),f=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,h),x=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),b=s>180?1:0,m=["M",d,u,"A",r,r,0,b,1,g,p];return e="donut"===i.chartType?[].concat(m,["L",f.x,f.y,"A",i.donutSize,i.donutSize,0,b,0,x.x,x.y,"L",d,u,"z"]).join(" "):"pie"===i.chartType||"polarArea"===i.chartType?[].concat(m,["L",i.centerX,i.centerY,"L",d,u]).join(" "):[].concat(m).join(" "),n.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new ta(this.ctx),a=new Mi(this.ctx),s=new Ra(this.ctx),r=a.group(),n=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),h=o.result.length;this.maxY=o.niceMax;for(var c=e.globals.radialSize,d=c/(h-1),u=0;u1&&t.total.show&&(s=t.total.color);var n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,r),a||"function"!=typeof t.total.formatter||(i=t.total.formatter(r));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,r):"",null!==n&&(n.textContent=e),null!==o&&(o.textContent=i),null!==n&&(n.style.fill=s)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,a=t.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,s,a,t);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,a=new Mi(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(0!==s.strokeWidth){for(var r=[],n=360/i.globals.series.length,o=0;o0&&(f=e.getPreviousPath(n));for(var x=0;x=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?s-=10:t.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,a=0;a0&&parseInt(s.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[a].paths[0]&&(i=e.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var a=[],s=0;s=360&&(u=360-Math.abs(this.startAngle)-.1);var g=i.drawPath({d:"",stroke:c,strokeWidth:n*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){var p=h.dropShadow;s.dropShadow(g,p)}l.add(g),g.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(g,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:d,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return a}},{key:"drawArcs",value:function(t){var e=this.w,i=new Mi(this.ctx),a=new ji(this.ctx),s=new Li(this.ctx),r=i.group(),n=this.getStrokeWidth(t);t.size=t.size-n/2;var o=e.config.plotOptions.radialBar.hollow.background,l=t.size-n*t.series.length-this.margin*t.series.length-n*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(t,r,l,o));var c=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:o||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var d=e.config.plotOptions.radialBar.hollow.dropShadow;s.dropShadow(c,d)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var g=null;if(this.radialDataLabels.show){var p=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");g=this.renderInnerDataLabels(p,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})}"back"===e.config.plotOptions.radialBar.hollow.position&&(r.add(c),g&&r.add(g));var f=!1;e.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var x=f?t.series.length-1:0;f?x>=0:x100?100:t.series[x])/100,A=Math.round(this.totalAngle*k)+this.startAngle,C=void 0;e.globals.dataChanged&&(w=this.startAngle,C=Math.round(this.totalAngle*v.negToZero(e.globals.previousPaths[x])/100)+w),Math.abs(A)+Math.abs(y)>360&&(A-=.01),Math.abs(C)+Math.abs(w)>360&&(C-=.01);var S=A-y,L=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[x]:e.config.stroke.dashArray,M=i.drawPath({d:"",stroke:m,strokeWidth:n,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+x,strokeDashArray:L});if(Mi.setAttrs(M.node,{"data:angle":S,"data:value":t.series[x]}),e.config.chart.dropShadow.enabled){var P=e.config.chart.dropShadow;s.dropShadow(M,P,x)}if(s.setSelectionFilter(M,0,x),this.addListeners(M,this.radialDataLabels),b.add(M),M.attr({index:0,j:x}),this.barLabels.enabled){var I=v.polarToCartesian(t.centerX,t.centerY,t.size,y),T=this.barLabels.formatter(e.globals.seriesNames[x],{seriesIndex:x,w:e}),z=["apexcharts-radialbar-label"];this.barLabels.onClick||z.push("apexcharts-no-click");var X=this.barLabels.useSeriesColors?e.globals.colors[x]:e.config.chart.foreColor;X||(X=e.config.chart.foreColor);var R=I.x+this.barLabels.offsetX,Y=I.y+this.barLabels.offsetY,E=i.drawText({x:R,y:Y,text:T,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:X,cssClass:z.join(" ")});E.on("click",this.onBarLabelClick),E.attr({rel:x+1}),0!==y&&E.attr({"transform-origin":"".concat(R," ").concat(Y),transform:"rotate(".concat(y," 0 0)")}),b.add(E)}var H=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(H=e.config.chart.animations.speed),e.globals.dataChanged&&(H=e.config.chart.animations.dynamicAnimation.speed),this.animDur=H/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(M,{centerX:t.centerX,centerY:t.centerY,endAngle:A,startAngle:y,prevEndAngle:C,prevStartAngle:w,size:t.size,i:x,totalItems:2,animBeginArr:this.animBeginArr,dur:H,shouldSetPrevPaths:!0})}return{g:r,elHollow:c,dataLabels:g}}},{key:"drawHollow",value:function(t){var e=new Mi(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,a){var s=this.w,r=new ji(this.ctx),n=v.randomId(),o=s.config.plotOptions.radialBar.hollow.image;if(s.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:o,patternID:"pattern".concat(s.globals.cuid).concat(n)}),a="url(#pattern".concat(s.globals.cuid).concat(n,")");else{var l=s.config.plotOptions.radialBar.hollow.imageWidth,h=s.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===h){var c=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-e.width/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+s.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(c)}else{var d=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-l/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-h/2+s.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,h)}));e.add(d)}}return a}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,i=this.barLabels.onClick,a=this.w;i&&i(a.globals.seriesNames[e],{w:a,seriesIndex:e})}}]),r}(),Oa=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var s=a.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),r=0;r0&&(this.visibleI=this.visibleI+1);var x=0,b=0,m=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[g][0],m=g);var y=this.barHelpers.initialPositions();d=y.y,h=y.zeroW,c=y.x,b=y.barWidth,x=y.barHeight,n=y.xDivision,o=y.yDivision,l=y.zeroH;for(var w=a.group({class:"apexcharts-datalabels","data:realIndex":g}),k=a.group({class:"apexcharts-rangebar-goals-markers"}),A=0;A0}));return this.isHorizontal?(a=u.config.plotOptions.bar.rangeBarGroupRows?r+h*b:r+o*this.visibleI+h*b,m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(a=(o=d.barHeight/g.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+g.indexOf(p))+h*b)):(b>-1&&!u.globals.timescaleLabels.length&&(s=u.config.plotOptions.bar.rangeBarGroupRows?n+c*b:n+l*this.visibleI+c*b),m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(s=(l=d.barWidth/g.length)*this.visibleI+c*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+g.indexOf(p))+c*b)),{barYPosition:a,barXPosition:s,barHeight:o,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.xDivision,s=t.barWidth,r=t.barXPosition,n=t.zeroH,o=this.w,l=e.i,h=e.j,c=e.realIndex,d=e.translationsIndex,u=this.yRatio[d],g=this.getRangeValue(c,h),p=Math.min(g.start,g.end),f=Math.max(g.start,g.end);void 0===this.series[l][h]||null===this.series[l][h]?p=n:(p=n-p/u,f=n-f/u);var x=Math.abs(f-p),b=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:s,y1:p,y2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:c,i:c,j:h,w:o});if(o.globals.isXNumeric){var m=this.getBarXForNumericXAxis({x:i,j:h,realIndex:c,barWidth:s});i=m.x,r=m.barXPosition}else i+=a;return{pathTo:b.pathTo,pathFrom:b.pathFrom,barHeight:x,x:i,y:g.start<0&&g.end<0?p:f,goalY:this.barHelpers.getGoalValues("y",null,n,l,h,d),barXPosition:r}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,a=t.y1,s=t.y2,r=t.yDivision,n=t.barHeight,o=t.barYPosition,l=t.zeroW,h=this.w,c=e.realIndex,d=e.j,u=this.preventBarOverflow(l+a/this.invertedYRatio),g=this.preventBarOverflow(l+s/this.invertedYRatio),p=this.getRangeValue(c,d),f=Math.abs(g-u),x=this.barHelpers.getBarpaths({barYPosition:o,barHeight:n,x1:u,x2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:c,realIndex:c,j:d,w:h});return h.globals.isXNumeric||(i+=r),{pathTo:x.pathTo,pathFrom:x.pathFrom,barWidth:f,x:p.start<0&&p.end<0?u:g,goalX:this.barHelpers.getGoalValues("x",l,null,c,d),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}}]),a}(),Fa=function(){function t(e){i(this,t),this.w=e.w,this.lineCtx=e}return s(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new Pi(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,a=t.x,s=t.y,r=t.i,n=t.j,o=t.prevY,l=this.w,h=[],c=[];if(0===n){var d=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(d=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),h.push(d),c.push(v.isNumber(e[r][0])?o+l.config.markers.offsetY:null),h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null)}else h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null);return{x:h,y:c}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,a=t.realIndex,s=this.w,r=0;r0&&parseInt(n.realIndex,10)===parseInt(a,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,e=s.globals.previousPaths[r].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[r].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[r].paths[1]&&(e=s.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e,i,a,s=t.i,r=t.realIndex,n=t.series,o=t.prevY,l=t.lineYPosition,h=t.translationsIndex,c=this.w,d=c.config.chart.stacked&&!c.globals.comboCharts||c.config.chart.stacked&&c.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[r])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[r])||void 0===i?void 0:i.type));if(void 0!==(null===(a=n[s])||void 0===a?void 0:a[0]))o=(l=d&&s>0?this.lineCtx.prevSeriesY[s-1][0]:this.lineCtx.zeroY)-n[s][0]/this.lineCtx.yRatio[h]+2*(this.lineCtx.isReversed?n[s][0]/this.lineCtx.yRatio[h]:0);else if(d&&s>0&&void 0===n[s][0])for(var u=s-1;u>=0;u--)if(null!==n[u][0]&&void 0!==n[u][0]){o=l=this.lineCtx.prevSeriesY[u][0];break}return{prevY:o,lineYPosition:l}}}]),t}(),Da=function(t){for(var e,i,a,s,r=function(t){for(var e=[],i=t[0],a=t[1],s=e[0]=Wa(i,a),r=1,n=t.length-1;r9&&(s=3*a/Math.sqrt(s),r[l]=s*e,r[l+1]=s*i);for(var h=0;h<=n;h++)s=(t[Math.min(n,h+1)][0]-t[Math.max(0,h-1)][0])/(6*(1+r[h]*r[h])),o.push([s||0,r[h]*s||0]);return o},_a=function(t){var e=Da(t),i=t[1],a=t[0],s=[],r=e[1],n=e[0];s.push(a,[a[0]+n[0],a[1]+n[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(var o=2,l=e.length;o1&&a[1].length<6){var s=a[0].length;a[1]=[2*a[0][s-2]-a[0][s-4],2*a[0][s-1]-a[0][s-3]].concat(a[1])}a[0]=a[0].slice(-2)}return a};function Wa(t,e){return(e[1]-t[1])/(e[0]-t[0])}var Ba=function(){function t(e,a,s){i(this,t),this.ctx=e,this.w=e.w,this.xyRatios=a,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||s,this.scatter=new Ui(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Fa(this),this.markers=new Vi(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return s(t,[{key:"draw",value:function(t,e,i,a){var s,r=this.w,n=new Mi(this.ctx),o=r.globals.comboCharts?e:r.config.chart.type,l=n.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),h=new Pi(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=h.getLogSeries(t),this.yRatio=h.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var c=[],d=0;d1?g:0;this._initSerieVariables(t,d,g);var f=[],x=[],b=[],m=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,g),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(m=(r.globals.seriesX[g][0]-r.globals.minX)/this.xRatio),b.push(m);var v,y=m,w=void 0,k=y,A=this.zeroY,C=this.zeroY;A=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:t,prevY:A,lineYPosition:0,translationsIndex:p}).prevY,"monotoneCubic"===r.config.stroke.curve&&null===t[d][0]?f.push(null):f.push(A),v=A;"rangeArea"===o&&(w=C=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:a,prevY:C,lineYPosition:0,translationsIndex:p}).prevY,x.push(null!==f[0]?C:null));var S=this._calculatePathsFrom({type:o,series:t,i:d,realIndex:g,translationsIndex:p,prevX:k,prevY:A,prevY2:C}),L=[f[0]],M=[x[0]],P={type:o,series:t,realIndex:g,translationsIndex:p,i:d,x:m,y:1,pX:y,pY:v,pathsFrom:S,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:b,yArrj:f,y2Arrj:x,seriesRangeEnd:a},I=this._iterateOverDataPoints(u(u({},P),{},{iterations:"rangeArea"===o?t[d].length-1:void 0,isRangeStart:!0}));if("rangeArea"===o){for(var T=this._calculatePathsFrom({series:a,i:d,realIndex:g,prevX:k,prevY:C}),z=this._iterateOverDataPoints(u(u({},P),{},{series:a,xArrj:[m],yArrj:L,y2Arrj:M,pY:w,areaPaths:I.areaPaths,pathsFrom:T,iterations:a[d].length-1,isRangeStart:!1})),X=I.linePaths.length/2,R=0;R=0;Y--)l.add(c[Y]);else for(var E=0;E1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[r]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",zIndex:void 0!==a.config.series[i].zIndex?a.config.series[i].zIndex:i,seriesName:v.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i});var n=t[e].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,a,s,r=t.type,n=t.series,o=t.i,l=t.realIndex,h=t.translationsIndex,c=t.prevX,d=t.prevY,u=t.prevY2,g=this.w,p=new Mi(this.ctx);if(null===n[o][0]){for(var f=0;f0){var x=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:l});a=x.pathFromLine,s=x.pathFromArea}return{prevX:c,prevY:d,linePath:e,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(t){var e=t.type,i=t.realIndex,a=t.i,s=t.paths,r=this.w,n=new Mi(this.ctx),o=new ji(this.ctx);this.prevSeriesY.push(s.yArrj),r.globals.seriesXvalues[i]=s.xArrj,r.globals.seriesYvalues[i]=s.yArrj;var l=r.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var h=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-l.count-1],c=n.drawRect(h,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(c.node);var d=n.drawRect(0,0,h,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(d.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var g={i:a,realIndex:i,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var p=o.fillPath({seriesNumber:i}),f=0;f0&&"rangeArea"!==e){var A=n.renderPaths(w);A.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&A.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(A),A.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),k.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,i,a=this,s=t.type,r=t.series,n=t.iterations,o=t.realIndex,l=t.translationsIndex,h=t.i,c=t.x,d=t.y,u=t.pX,g=t.pY,p=t.pathsFrom,f=t.linePaths,x=t.areaPaths,b=t.seriesIndex,m=t.lineYPosition,y=t.xArrj,w=t.yArrj,k=t.y2Arrj,A=t.isRangeStart,C=t.seriesRangeEnd,S=this.w,L=new Mi(this.ctx),M=this.yRatio,P=p.prevY,I=p.linePath,T=p.areaPath,z=p.pathFromLine,X=p.pathFromArea,R=v.isNumber(S.globals.minYArr[o])?S.globals.minYArr[o]:S.globals.minY;n||(n=S.globals.dataPoints>1?S.globals.dataPoints-1:S.globals.dataPoints);var Y=function(t,e){return e-t/M[l]+2*(a.isReversed?t/M[l]:0)},E=d,H=S.config.chart.stacked&&!S.globals.comboCharts||S.config.chart.stacked&&S.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[o])||void 0===i?void 0:i.type)),O=S.config.stroke.curve;Array.isArray(O)&&(O=Array.isArray(b)?O[b[h]]:O[h]);for(var F,D=0,_=0;_0&&S.globals.collapsedSeries.length0;e--){if(!(S.globals.collapsedSeriesIndices.indexOf((null==b?void 0:b[e])||e)>-1))return e;e--}return 0}(h-1)][_+1]}else m=this.zeroY;else m=this.zeroY;N?d=Y(R,m):(d=Y(r[h][_+1],m),"rangeArea"===s&&(E=Y(C[h][_+1],m))),y.push(c),!N||"smooth"!==S.config.stroke.curve&&"monotoneCubic"!==S.config.stroke.curve?(w.push(d),k.push(E)):(w.push(null),k.push(null));var B=this.lineHelpers.calculatePoints({series:r,x:c,y:d,realIndex:o,i:h,j:_,prevY:P}),G=this._createPaths({type:s,series:r,i:h,realIndex:o,j:_,x:c,y:d,y2:E,xArrj:y,yArrj:w,y2Arrj:k,pX:u,pY:g,pathState:D,segmentStartX:F,linePath:I,areaPath:T,linePaths:f,areaPaths:x,curve:O,isRangeStart:A});x=G.areaPaths,f=G.linePaths,u=G.pX,g=G.pY,D=G.pathState,F=G.segmentStartX,T=G.areaPath,I=G.linePath,!this.appendPathFrom||S.globals.hasNullValues||"monotoneCubic"===O&&"rangeArea"===s||(z+=L.line(c,this.areaBottomY),X+=L.line(c,this.areaBottomY)),this.handleNullDataPoints(r,B,h,_,o),this._handleMarkersAndLabels({type:s,pointsPos:B,i:h,j:_,realIndex:o,isRangeStart:A})}return{yArrj:w,xArrj:y,pathFromArea:X,areaPaths:x,pathFromLine:z,linePaths:f,linePath:I,areaPath:T}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,i=t.pointsPos,a=t.isRangeStart,s=t.i,r=t.j,n=t.realIndex,o=this.w,l=new qi(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var h=this.markers.plotChartMarkers(i,n,r+1);null!==h&&this.elPointsMain.add(h)}var c=l.drawDataLabel({type:e,isRangeStart:a,pos:i,i:n,j:r+1});null!==c&&this.elDataLabelsWrap.add(c)}},{key:"_createPaths",value:function(t){var e=t.type,i=t.series,a=t.i;t.realIndex;var s,r=t.j,n=t.x,o=t.y,l=t.xArrj,h=t.yArrj,c=t.y2,d=t.y2Arrj,u=t.pX,g=t.pY,p=t.pathState,f=t.segmentStartX,x=t.linePath,b=t.areaPath,m=t.linePaths,v=t.areaPaths,y=t.curve,w=t.isRangeStart,k=new Mi(this.ctx),A=this.areaBottomY,C="rangeArea"===e,S="rangeArea"===e&&w;switch(y){case"monotoneCubic":var L=w?h:d;switch(p){case 0:if(null===L[r+1])break;p=1;case 1:if(!(C?l.length===i[a].length:r===i[a].length-2))break;case 2:var M=w?l:l.slice().reverse(),P=w?L:L.slice().reverse(),I=(s=P,M.map((function(t,e){return[t,s[e]]})).filter((function(t){return null!==t[1]}))),T=I.length>1?_a(I):I,z=[];C&&(S?v=I:z=v.reverse());var X=0,R=0;if(function(t,e){for(var i=function(t){var e=[],i=0;return t.forEach((function(t){null!==t?i++:i>0&&(e.push(i),i=0)})),i>0&&e.push(i),e}(t),a=[],s=0,r=0;s4?(e+="C".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]),e+=", ".concat(a[4],", ").concat(a[5])):s>2&&(e+="S".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]))}return e}(t),i=R,a=(R+=t.length)-1;S?x=k.move(I[i][0],I[i][1])+e:C?x=k.move(z[i][0],z[i][1])+k.line(I[i][0],I[i][1])+e+k.line(z[a][0],z[a][1]):(x=k.move(I[i][0],I[i][1])+e,b=x+k.line(I[a][0],A)+k.line(I[i][0],A)+"z",v.push(b)),m.push(x)})),C&&X>1&&!S){var Y=m.slice(X).reverse();m.splice(X),Y.forEach((function(t){return m.push(t)}))}p=0}break;case"smooth":var E=.35*(n-u);if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.curve(n,o,n,o,n,c)+k.move(n,c)),b+=k.curve(n,o,n,o,n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o;break;default:var F=function(t,e,i){var a=[];switch(t){case"stepline":a=k.line(e,null,"H")+k.line(null,i,"V");break;case"linestep":a=k.line(null,i,"V")+k.line(e,null,"H");break;case"straight":a=k.line(e,i)}return a};if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.line(n,c)),b+=k.line(n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o}return{linePaths:m,areaPaths:v,pX:u,pY:g,pathState:p,segmentStartX:f,linePath:x,areaPath:b}}},{key:"handleNullDataPoints",value:function(t,e,i,a,s){var r=this.w;if(null===t[i][a]&&r.config.markers.showNullDataPoints||1===t[i].length){var n=this.strokeWidth-r.config.markers.strokeWidth/2;n>0||(n=0);var o=this.markers.plotChartMarkers(e,s,a+1,n,!0);null!==o&&this.elPointsMain.add(o)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,a,s){this.xoffset=e,this.yoffset=i,this.height=s,this.width=a,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],a=this.xoffset,s=this.yoffset,n=r(t)/this.height,o=r(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var a=e/this.height,s=this.width-a;i=new t(this.xoffset+a,this.yoffset,s,this.height)}else{var r=e/this.width,n=this.height-r;i=new t(this.xoffset,this.yoffset+r,this.width,n)}return i}}function e(e,a,s,n,o){n=void 0===n?0:n,o=void 0===o?0:o;var l=i(function(t,e){var i,a=[],s=e/r(t);for(i=0;i=n}(e,l=t[0],o)?(e.push(l),i(t.slice(1),e,s,n)):(h=s.cutArea(r(e),n),n.push(s.getCoordinates(e)),i(t,[],h,n)),n;n.push(s.getCoordinates(e))}function a(t,e){var i=Math.min.apply(Math,t),a=Math.max.apply(Math,t),s=r(t);return Math.max(Math.pow(e,2)*a/Math.pow(s,2),Math.pow(s,2)/(Math.pow(e,2)*i))}function s(t){return t&&t.constructor===Array}function r(t){var e,i=0;for(e=0;er-a&&l.width<=n-s){var h=o.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(h.x," ").concat(h.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,i,a,s,r){var n=new Mi(this.ctx),o=n.getTextRects(t,e).width+this.w.config.stroke.width+5>s-i&&r-a>s-i?r-a:s-i,l=n.getTextBasedOnMaxWidth({text:t,maxWidth:o,fontSize:e});return t.length!==l.length&&o/e<5?"":l}},{key:"animateTreemap",value:function(t,e,i,a){var s=new y(this.ctx);s.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,(function(){s.animationCompleted(t)}))}}]),t}(),ja=86400,Va=10/ja,Ua=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return s(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new zi(this.ctx),r=(e-t)/864e5;this.determineInterval(r),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,r5e4&&(a.globals.disableZoomOut=!0);var n=s.getTimeUnitsfromTimestamp(t,e,this.utc),o=a.globals.gridWidth/r,l=o/24,h=l/60,c=h/60,d=Math.floor(24*r),g=Math.floor(1440*r),p=Math.floor(r*ja),f=Math.floor(r),x=Math.floor(r/30),b=Math.floor(r/365),m={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},v={firstVal:m,currentMillisecond:m.minMillisecond,currentSecond:m.minSecond,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:l,minutesWidthOnXAxis:h,secondsWidthOnXAxis:c,numberOfSeconds:p,numberOfMinutes:g,numberOfHours:d,numberOfDays:f,numberOfMonths:x,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var y=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?u(u({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?u(u({},e),{},{value:t.value}):"minute"===t.unit?u(u({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?u(u({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return y.filter((function(t){var e=1,s=Math.ceil(a.globals.gridWidth/120),r=t.value;void 0!==a.config.xaxis.tickAmount&&(s=a.config.xaxis.tickAmount),y.length>s&&(e=Math.floor(y.length/s));var n=!1,o=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(n=!0);break;case"half_year":e=7,"year"===t.unit&&(n=!0);break;case"months":e=1,"year"===t.unit&&(n=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(n=!0),30===r&&(o=!0);break;case"months_days":e=10,"month"===t.unit&&(n=!0),30===r&&(o=!0);break;case"week_days":e=8,"month"===t.unit&&(n=!0);break;case"days":e=1,"month"===t.unit&&(n=!0);break;case"hours":"day"===t.unit&&(n=!0);break;case"minutes_fives":case"seconds_fives":r%5!=0&&(o=!0);break;case"seconds_tens":r%10!=0&&(o=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!o)return!0}else if((r%e==0||n)&&!o)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,a=this.formatDates(t),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new pa(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.daysWidthOnXAxis,r=t.numberOfYears,n=e.minYear,o=0,l=new zi(this.ctx),h="year";if(e.minDate>1||e.minMonth>0){var c=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(l.determineDaysOfYear(e.minYear)-c+1)*s,n=e.minYear+1,this.timeScaleArray.push({position:o,value:n,unit:h,year:n,month:v.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:o,value:n,unit:h,year:a,month:v.monthMod(i+1)});for(var d=n,u=o,g=0;g1){l=(h.determineDaysOfMonths(a+1,e.minYear)-i+1)*r,o=v.monthMod(a+1);var u=s+d,g=v.monthMod(o),p=o;0===o&&(c="year",p=u,g=1,u+=d+=1),this.timeScaleArray.push({position:l,value:p,unit:c,year:u,month:g})}else this.timeScaleArray.push({position:l,value:o,unit:c,year:s,month:v.monthMod(a)});for(var f=o+1,x=l,b=0,m=1;bn.determineDaysOfMonths(e+1,i)?(h=1,o="month",u=e+=1,e):e},d=(24-e.minHour)*s,u=l,g=c(h,i,a);0===e.minHour&&1===e.minDate?(d=0,u=v.monthMod(e.minMonth),o="month",h=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(d=0,l=e.minDate,u=l,g=c(h=l,i,a)),this.timeScaleArray.push({position:d,value:u,unit:o,year:this._getYear(a,g,0),month:v.monthMod(g),day:h});for(var p=d,f=0;fo.determineDaysOfMonths(e+1,s)&&(f=1,e+=1),{month:e,date:f}},c=function(t,e){return t>o.determineDaysOfMonths(e+1,s)?e+=1:e},d=60-(e.minMinute+e.minSecond/60),u=d*r,g=e.minHour+1,p=g;60===d&&(u=0,p=g=e.minHour);var f=i;p>=24&&(p=0,l="day",g=f+=1);var x=h(f,a).month;x=c(f,x),this.timeScaleArray.push({position:u,value:g,unit:l,day:f,hour:p,year:s,month:v.monthMod(x)}),p++;for(var b=u,m=0;m=24)p=0,l="day",x=h(f+=1,x).month,x=c(f,x);var y=this._getYear(s,x,0);b=60*r+b;var w=0===p?f:p;this.timeScaleArray.push({position:b,value:w,unit:l,hour:p,day:f,year:y,month:v.monthMod(x)}),p++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.minutesWidthOnXAxis,h=t.secondsWidthOnXAxis,c=t.numberOfMinutes,d=a+1,u=r,g=n,p=o,f=s,x=(60-i-e/1e3)*h,b=0;b=60&&(d=0,24===(f+=1)&&(f=0)),this.timeScaleArray.push({position:x,value:d,unit:"minute",hour:f,minute:d,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,d++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.secondsWidthOnXAxis,h=t.numberOfSeconds,c=i+1,d=a,u=r,g=n,p=o,f=s,x=(1e3-e)/1e3*l,b=0;b=60&&(c=0,++d>=60&&(d=0,24===++f&&(f=0))),this.timeScaleArray.push({position:x,value:c,unit:"second",hour:f,minute:d,second:c,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,c++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var a=t.value.toString(),s=new zi(e.ctx),r=e.createRawDateString(t,a),n=s.getDate(s.parseDate(r));if(e.utc||(n=s.getDate(s.parseDateWithTimezone(r))),void 0===i.config.xaxis.labels.format){var o="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(o=l.year),"month"===t.unit&&(o=l.month),"day"===t.unit&&(o=l.day),"hour"===t.unit&&(o=l.hour),"minute"===t.unit&&(o=l.minute),"second"===t.unit&&(o=l.second),a=s.formatDate(n,o)}else a=s.formatDate(n,i.config.xaxis.labels.format);return{dateString:r,position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,a=new Mi(this.ctx),s=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(s=!0,e=a.getTextRects(t[0].value).width);var r=0,n=t.map((function(n,o){if(o>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=s?e:a.getTextRects(t[r].value).width,h=t[r].position;return n.position>h+l+10?(r=o,n):null}return n}));return n=n.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),qa=function(){function t(e,a){i(this,t),this.ctx=a,this.w=a.w,this.el=e}return s(t,[{key:"setupElements",value:function(){var t=this.w,e=t.globals,i=t.config,a=i.chart.type;e.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(a),e.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(a),e.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(a)&&i.plotOptions.bar.horizontal,e.chartClass=".apexcharts".concat(e.chartID),e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),Mi.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas ".concat(e.chartClass.substring(1))}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=window.SVG().addTo(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(i.chart.offsetX,", ").concat(i.chart.offsetY,")")}),e.dom.Paper.node.style.background="dark"!==i.theme.mode||i.chart.background?"light"!==i.theme.mode||i.chart.background?i.chart.background:"#fff":"#424242",this.setSVGDimensions(),e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject"),Mi.setAttrs(e.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap),e.dom.Paper.node.appendChild(e.dom.elLegendForeign),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,a=this.ctx,s=i.config,r=i.globals,n={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},o=s.chart.type||"line",l=null,h=0;r.series.forEach((function(e,a){var s=t[a].type||o;n[s]?("rangeArea"===s?(n[s].series.push(r.seriesRangeStart[a]),n[s].seriesRangeEnd.push(r.seriesRangeEnd[a])):n[s].series.push(e),n[s].i.push(a),"column"!==s&&"bar"!==s||(i.globals.columnSeries=n.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(s)?l=s:"bar"===s?(n.column.series.push(e),n.column.i.push(a)):console.warn("You have specified an unrecognized series type (".concat(s,").")),o!==s&&"scatter"!==s&&h++})),h>0&&(l&&console.warn("Chart or series type ".concat(l," cannot appear with other chart or series types.")),n.column.series.length>0&&s.plotOptions.bar.horizontal&&(h-=n.column.series.length,n.column={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||(r.comboCharts=h>0);var c=new Ba(a,e),d=new Ta(a,e);a.pie=new Ya(a);var u=new Ha(a);a.rangeBar=new Oa(a,e);var g=new Ea(a),p=[];if(r.comboCharts){var x,b,m=new Pi(a);if(n.area.series.length>0)(x=p).push.apply(x,f(m.drawSeriesByGroup(n.area,r.areaGroups,"area",c)));if(n.column.series.length>0)if(s.chart.stacked){var v=new Ia(a,e);p.push(v.draw(n.column.series,n.column.i))}else a.bar=new Pa(a,e),p.push(a.bar.draw(n.column.series,n.column.i));if(n.rangeArea.series.length>0&&p.push(c.draw(n.rangeArea.series,"rangeArea",n.rangeArea.i,n.rangeArea.seriesRangeEnd)),n.line.series.length>0)(b=p).push.apply(b,f(m.drawSeriesByGroup(n.line,r.lineGroups,"line",c)));if(n.candlestick.series.length>0&&p.push(d.draw(n.candlestick.series,"candlestick",n.candlestick.i)),n.boxPlot.series.length>0&&p.push(d.draw(n.boxPlot.series,"boxPlot",n.boxPlot.i)),n.rangeBar.series.length>0&&p.push(a.rangeBar.draw(n.rangeBar.series,n.rangeBar.i)),n.scatter.series.length>0){var y=new Ba(a,e,!0);p.push(y.draw(n.scatter.series,"scatter",n.scatter.i))}if(n.bubble.series.length>0){var w=new Ba(a,e,!0);p.push(w.draw(n.bubble.series,"bubble",n.bubble.i))}}else switch(s.chart.type){case"line":p=c.draw(r.series,"line");break;case"area":p=c.draw(r.series,"area");break;case"bar":if(s.chart.stacked)p=new Ia(a,e).draw(r.series);else a.bar=new Pa(a,e),p=a.bar.draw(r.series);break;case"candlestick":p=new Ta(a,e).draw(r.series,"candlestick");break;case"boxPlot":p=new Ta(a,e).draw(r.series,s.chart.type);break;case"rangeBar":p=a.rangeBar.draw(r.series);break;case"rangeArea":p=c.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":p=new Xa(a,e).draw(r.series);break;case"treemap":p=new Ga(a,e).draw(r.series);break;case"pie":case"donut":case"polarArea":p=a.pie.draw(r.series);break;case"radialBar":p=u.draw(r.series);break;case"radar":p=g.draw(r.series);break;default:p=c.draw(r.series)}return p}},{key:"setSVGDimensions",value:function(){var t=this.w,e=t.globals,i=t.config;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto",e.svgWidth=i.chart.width,e.svgHeight=i.chart.height;var a=v.getDimensions(this.el),s=i.chart.width.toString().split(/[0-9]+/g).pop();"%"===s?v.isNumber(a[0])&&(0===a[0].width&&(a=v.getDimensions(this.el.parentNode)),e.svgWidth=a[0]*parseInt(i.chart.width,10)/100):"px"!==s&&""!==s||(e.svgWidth=parseInt(i.chart.width,10));var r=String(i.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===r){var n=v.getDimensions(this.el.parentNode);e.svgHeight=n[1]*parseInt(i.chart.height,10)/100}else e.svgHeight=parseInt(i.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Mi.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==r){var o=i.chart.sparkline.enabled?0:e.axisCharts?i.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(e.svgHeight+o,"px")}e.dom.elWrap.style.width="".concat(e.svgWidth,"px"),e.dom.elWrap.style.height="".concat(e.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i=t.translateX;Mi.setAttrs(t.dom.elGraphical.node,{transform:"translate(".concat(i,", ").concat(e,")")})}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,a=t.config.chart.sparkline.enabled?1:15;a+=t.config.grid.padding.bottom,["top","bottom"].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(i=new xa(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var s=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*t.globals.radialSize;if(s&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var n=v.getBoundingClientRect(s);r=n.bottom;var o=n.bottom-n.top;r=Math.max(2.05*t.globals.radialSize,o)}var l=Math.ceil(r+e.translateY+i+a);e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).includes("%")||(e.dom.elWrap.style.height="".concat(l,"px"),Mi.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(l,"px"))}},{key:"coreCalculations",value:function(){new ea(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(){return[]}))},i=new Bi,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=e(),a.seriesYvalues=e()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var t=this.w,e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new na(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new na(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Ua(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new Pi(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var i=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];i.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){return t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){return t.updateSourceChart(i)})})),e.config.chart.events.selection=function(t,e){i.forEach((function(t){ApexCharts.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:e.xaxis.min,max:e.xaxis.max}},!1,!1,!1,!1)}))}}}}]),t}(),Za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"_updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(n){var o=[e.ctx];s&&(o=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(o=[e.ctx],e.ctx.w.globals.isExecCalled=!1),o.forEach((function(s,l){var h=s.w;if(h.globals.shouldAnimate=a,i||(h.globals.resized=!0,h.globals.dataChanged=!0,a&&s.series.getPreviousPaths()),t&&"object"===b(t)&&(s.config=new Wi(t),t=Pi.extendArrayProps(s.config,t,h),s.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,h.config=v.extend(h.config,t),r&&(h.globals.lastXAxis=t.xaxis?v.clone(t.xaxis):[],h.globals.lastYAxis=t.yaxis?v.clone(t.yaxis):[],h.globals.initialConfig=v.extend({},h.config),h.globals.initialSeries=v.clone(h.config.series),t.series))){for(var c=0;c2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(s){var r,n=i.w;return n.globals.shouldAnimate=e,n.globals.dataChanged=!0,e&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?(0===(r=t.map((function(t,e){return i._extendSeries(t,e)}))).length&&(r=[{data:[]}]),n.config.series=r):n.config.series=t.slice(),a&&(n.globals.initialConfig.series=v.clone(n.config.series),n.globals.initialSeries=v.clone(n.config.series)),i.ctx.update().then((function(){s(i.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var i=this.w,a=i.config.series[e];return u(u({},i.config.series[e]),{},{name:t.name?t.name:null==a?void 0:a.name,color:t.color?t.color:null==a?void 0:a.color,type:t.type?t.type:null==a?void 0:a.type,group:t.group?t.group:null==a?void 0:a.group,hidden:void 0!==t.hidden?t.hidden:null==a?void 0:a.hidden,data:t.data?t.data:null==a?void 0:a.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(e,"'], ").concat(s," circle[j='").concat(e,"'], ").concat(s," rect[j='").concat(e,"']")):void 0===e&&(a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(t,"']")),"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),a?(new Mi(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new Ni(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;t&&t.xaxis&&(a=t.xaxis),t&&t.yaxis&&(s=t.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;var r=function(t){void 0!==s[t]&&(i.config.yaxis[t].min=s[t].min,i.config.yaxis[t].max=s[t].max)};i.config.yaxis.map((function(t,a){i.globals.zoomed||void 0!==s[a]?r(a):void 0!==e.ctx.opts.yaxis[a]&&(t.min=e.ctx.opts.yaxis[a].min,t.max=e.ctx.opts.yaxis[a].max)}))}}]),t}();!function(){function t(){for(var t=arguments.length>0&&arguments[0]!==h?arguments[0]:[],s=arguments.length>1?arguments[1]:h,r=arguments.length>2?arguments[2]:h,n=arguments.length>3?arguments[3]:h,o=arguments.length>4?arguments[4]:h,l=arguments.length>5?arguments[5]:h,h=arguments.length>6?arguments[6]:h,c=t.slice(s,r||h),d=n.slice(o,l||h),u=0,g={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};;){if(c[u]=e.call(g,c[u]),d[u]=e.call(p,d[u]),c[u][0]!=d[u][0]||"M"==c[u][0]||"A"==c[u][0]&&(c[u][4]!=d[u][4]||c[u][5]!=d[u][5])?(Array.prototype.splice.apply(c,[u,1].concat(a.call(g,c[u]))),Array.prototype.splice.apply(d,[u,1].concat(a.call(p,d[u])))):(c[u]=i.call(g,c[u]),d[u]=i.call(p,d[u])),++u==c.length&&u==d.length)break;u==c.length&&c.push(["C",g.pos[0],g.pos[1],g.pos[0],g.pos[1],g.pos[0],g.pos[1]]),u==d.length&&d.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]])}return{start:c,dest:d}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function i(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function a(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var i,a,s,r,n,o,l,h,c,d,u,g,p,f,x,b,m,v,y,w,k,A,C,S,L,M,P=Math.abs(e[1]),I=Math.abs(e[2]),T=e[3]%360,z=e[4],X=e[5],R=e[6],Y=e[7],E=new bt(t),H=new bt(R,Y),O=[];if(0===P||0===I||E.x===H.x&&E.y===H.y)return[["C",E.x,E.y,H.x,H.y,H.x,H.y]];i=new bt((E.x-H.x)/2,(E.y-H.y)/2).transform((new vt).rotate(T)),a=i.x*i.x/(P*P)+i.y*i.y/(I*I),a>1&&(P*=a=Math.sqrt(a),I*=a);s=(new vt).rotate(T).scale(1/P,1/I).rotate(-T),E=E.transform(s),H=H.transform(s),r=[H.x-E.x,H.y-E.y],o=r[0]*r[0]+r[1]*r[1],n=Math.sqrt(o),r[0]/=n,r[1]/=n,l=o<4?Math.sqrt(1-o/4):0,z===X&&(l*=-1);h=new bt((H.x+E.x)/2+l*-r[1],(H.y+E.y)/2+l*r[0]),c=new bt(E.x-h.x,E.y-h.y),d=new bt(H.x-h.x,H.y-h.y),u=Math.acos(c.x/Math.sqrt(c.x*c.x+c.y*c.y)),c.y<0&&(u*=-1);g=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(g*=-1);X&&u>g&&(g+=2*Math.PI);!X&&u0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(!1===e)return!1;for(var i=e,a=t.length;i(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class Ja{constructor(t){t.remember("_draggable",this),this.el=t,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(t){t?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(t){const e=!t.type.indexOf("mouse");if(e&&1!==t.which&&0!==t.buttons)return;if(this.el.dispatch("beforedrag",{event:t,handler:this}).defaultPrevented)return;t.preventDefault(),t.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point($a(t));const i=(e?"mouseup":"touchend")+".drag";zt(window,(e?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),zt(window,i,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:t,handler:this,box:this.box})}drag(t){const{box:e,lastClick:i}=this,a=this.el.point($a(t)),s=a.x-i.x,r=a.y-i.y;if(!s&&!r)return e;const n=e.x+s,o=e.y+r;this.box=new kt(n,o,e.w,e.h),this.lastClick=a,this.el.dispatch("dragmove",{event:t,handler:this,box:this.box}).defaultPrevented||this.move(n,o)}move(t,e){"svg"===this.el.type?gi.prototype.move.call(this.el,t,e):this.el.move(t,e)}endDrag(t){this.drag(t),this.el.fire("dragend",{event:t,handler:this,box:this.box}),Xt(window,"mousemove.drag"),Xt(window,"touchmove.drag"),Xt(window,"mouseup.drag"),Xt(window,"touchend.drag"),this.init(!0)}} /*! * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse * @version 4.0.1 @@ -17,13 +17,13 @@ function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=Array(e);i{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",Qa(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",Qa("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>Ka(t,e))),this.rotationPoint=Ka(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}};const es=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ts?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this}; /*! * @svgdotjs/svg.resize.js - An extension for svg.js which allows to resize elements which are selected -* @version 2.0.4 +* @version 2.0.2 * https://github.com/svgdotjs/svg.resize.js * * @copyright [object Object] * @license MIT * -* BUILT: Fri Sep 13 2024 12:43:14 GMT+0200 (Central European Summer Time) +* BUILT: Mon Jul 01 2024 15:05:58 GMT+0200 (Central European Summer Time) */ /*! * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse @@ -35,4 +35,4 @@ function Qa(t,e,i,a=null){return function(s){s.preventDefault(),s.stopPropagatio * * BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time) */ -function is(t,e,i,a=null){return function(s){s.preventDefault(),s.stopPropagation();var r=s.pageX||s.touches[0].pageX,n=s.pageY||s.touches[0].pageY;e.fire(t,{x:r,y:n,event:s,index:a,points:i})}}function as([t,e],{a:i,b:a,c:s,d:r,e:n,f:o}){return[t*i+e*s+n,t*a+e*r+o]}Q(Gt,{select:es(ts)}),Q([Ge,je,xe],{pointSelect:es(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",Qa("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>Ka(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class ss{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",is(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",is("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>as(t,e))),this.rotationPoint=as(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const rs=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ss?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this};Q(Gt,{select:rs(ss)}),Q([Ge,je,xe],{pointSelect:rs(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",is("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>as(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const ns=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),os=t=>{let e=1/0,i=1/0,a=-1/0,s=-1/0;for(let r=0;r{const s=t-e[0],r=(a-e[1])*i;return[s*i+e[0],r+e[1]]}));return os(a)}(this.box,s,r)}this.el.dispatch("resize",{box:new kt(l),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.size(l.width,l.height).move(l.x,l.y)}movePoint(t){this.lastEvent=t;const{x:e,y:i}=this.snapToGrid(this.el.point(ns(t))),a=this.el.array().slice();a[this.index]=[e,i],this.el.dispatch("resize",{box:os(a),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.plot(a)}rotate(t){this.lastEvent=t;const e=this.startPoint,i=this.el.point(ns(t)),{cx:a,cy:s}=this.box,r=e.x-a,n=e.y-s,o=i.x-a,l=i.y-s,h=Math.sqrt(r*r+n*n)*Math.sqrt(o*o+l*l);if(0===h)return;let c=Math.acos((r*o+n*l)/h)/Math.PI*180;if(!c)return;i.xdiv {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}';var h=(null===(l=t.opts.chart)||void 0===l?void 0:l.nonce)||t.w.config.chart.nonce;h&&o.setAttribute("nonce",h),r?s.prepend(o):n.head.appendChild(o)}var c=t.create(t.w.config.series,{});if(!c)return e(t);t.mount(c).then((function(){"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(c)})).catch((function(t){i(t)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var i=this,a=this.w;new hs(this).initModules();var s=this.w.globals;if(s.noData=!1,s.animationEnded=!1,!v.elementExists(this.el))return s.animationEnded=!0,this.destroy(),null;(this.responsive.checkResponsiveConfig(e),a.config.xaxis.convertedCatToNumeric)&&new Ni(a.config).convertCatToNumericXaxis(a.config,this.ctx);if(this.core.setupElements(),"treemap"===a.config.chart.type&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),0===s.svgWidth)return s.animationEnded=!0,null;var r=t;t.forEach((function(t,e){t.hidden&&(r=i.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}))}));var n=Pi.checkComboSeries(r,a.config.chart.type);s.comboCharts=n.comboCharts,s.comboBarCount=n.comboBarCount;var o=r.every((function(t){return t.data&&0===t.data.length}));(0===r.length||o&&s.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(r),this.theme.init(),new Vi(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),s.noData&&s.collapsedSeries.length!==s.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),s.axisCharts&&(this.core.coreCalculations(),"category"!==a.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new Pi(this).getLargestMarkerSize(),this.dimensions.plotCoords();var l=this.core.xySettings();this.grid.createGridMask();var h=this.core.plotChartType(r,l),c=new qi(this);return c.bringForward(),a.config.dataLabels.background.enabled&&c.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:h,xyRatios:l,dimensions:{plot:{left:a.globals.translateX,top:a.globals.translateY,width:a.globals.gridWidth,height:a.globals.gridHeight}}}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise((function(s,r){if(null===i.el)return r(new Error("Not enough data to display or target element not found"));(null===e||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new Ki(i);var n,o,l=i.grid.drawGrid();(i.annotations=new Fi(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position)&&(l&&a.globals.dom.elGraphical.add(l.el),null!=l&&null!==(n=l.elGridBorders)&&void 0!==n&&n.node&&a.globals.dom.elGraphical.add(l.elGridBorders));if(Array.isArray(e.elGraph))for(var h=0;h0&&a.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),s(i)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,e){var i=ds.get(e);i&&(i.disconnect(),ds.delete(e))}(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,i){e.id===v.escapeString(t)&&Apex._chartInstances.splice(i,1)})),new cs(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w;return n.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,i){return e.updateHelpers._extendSeries(t,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,a,s,r)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,e,i)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(t,e,a)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(t,e,a)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(t,e,a)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;e&&(i=e),i.annotations.removeAnnotation(i,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Ji(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ji(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var e=v.escapeString(t);if(Apex._chartInstances){var i=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i2?s-2:0),n=2;n{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",Qa("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>Ka(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class ss{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",is(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",is("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>as(t,e))),this.rotationPoint=as(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const rs=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ss?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this};Q(Gt,{select:rs(ss)}),Q([Ge,je,xe],{pointSelect:rs(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",is("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>as(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const ns=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),os=t=>{let e=1/0,i=1/0,a=-1/0,s=-1/0;for(let r=0;r{const s=t-e[0],r=(a-e[1])*i;return[s*i+e[0],r+e[1]]}));return os(a)}(this.box,s,r)}this.el.dispatch("resize",{box:new kt(l),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.move(l.x,l.y).size(l.width,l.height)}movePoint(t){this.lastEvent=t;const{x:e,y:i}=this.snapToGrid(this.el.point(ns(t))),a=this.el.array().slice();a[this.index]=[e,i],this.el.dispatch("resize",{box:os(a),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.plot(a)}rotate(t){this.lastEvent=t;const e=this.el.point(ns(t)),i=this.box.cx,a=this.box.cy,s=this.startPoint.x-i,r=this.startPoint.y-a,n=e.x-i,o=e.y-a,l=Math.sqrt(s*s+r*r)*Math.sqrt(n*n+o*o);if(0===l)return;let h=Math.acos((s*n+r*o)/l)/Math.PI*180;e.xdiv {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}';var h=(null===(l=t.opts.chart)||void 0===l?void 0:l.nonce)||t.w.config.chart.nonce;h&&o.setAttribute("nonce",h),r?s.prepend(o):n.head.appendChild(o)}var c=t.create(t.w.config.series,{});if(!c)return e(t);t.mount(c).then((function(){"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(c)})).catch((function(t){i(t)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var i=this,a=this.w;new hs(this).initModules();var s=this.w.globals;if(s.noData=!1,s.animationEnded=!1,!v.elementExists(this.el))return s.animationEnded=!0,this.destroy(),null;(this.responsive.checkResponsiveConfig(e),a.config.xaxis.convertedCatToNumeric)&&new Ni(a.config).convertCatToNumericXaxis(a.config,this.ctx);if(this.core.setupElements(),"treemap"===a.config.chart.type&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),0===s.svgWidth)return s.animationEnded=!0,null;var r=t;t.forEach((function(t,e){t.hidden&&(r=i.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}))}));var n=Pi.checkComboSeries(r,a.config.chart.type);s.comboCharts=n.comboCharts,s.comboBarCount=n.comboBarCount;var o=r.every((function(t){return t.data&&0===t.data.length}));(0===r.length||o&&s.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(r),this.theme.init(),new Vi(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),s.noData&&s.collapsedSeries.length!==s.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),s.axisCharts&&(this.core.coreCalculations(),"category"!==a.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new Pi(this).getLargestMarkerSize(),this.dimensions.plotCoords();var l=this.core.xySettings();this.grid.createGridMask();var h=this.core.plotChartType(r,l),c=new qi(this);return c.bringForward(),a.config.dataLabels.background.enabled&&c.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:h,xyRatios:l,dimensions:{plot:{left:a.globals.translateX,top:a.globals.translateY,width:a.globals.gridWidth,height:a.globals.gridHeight}}}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise((function(s,r){if(null===i.el)return r(new Error("Not enough data to display or target element not found"));(null===e||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new Ki(i);var n,o,l=i.grid.drawGrid();(i.annotations=new Fi(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position)&&(l&&a.globals.dom.elGraphical.add(l.el),null!=l&&null!==(n=l.elGridBorders)&&void 0!==n&&n.node&&a.globals.dom.elGraphical.add(l.elGridBorders));if(Array.isArray(e.elGraph))for(var h=0;h0&&a.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),s(i)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,e){var i=ds.get(e);i&&(i.disconnect(),ds.delete(e))}(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,i){e.id===v.escapeString(t)&&Apex._chartInstances.splice(i,1)})),new cs(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w;return n.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,i){return e.updateHelpers._extendSeries(t,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,a,s,r)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,e,i)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(t,e,a)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(t,e,a)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(t,e,a)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;e&&(i=e),i.annotations.removeAnnotation(i,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Ji(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ji(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var e=v.escapeString(t);if(Apex._chartInstances){var i=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i2?s-2:0),n=2;nt.length)&&(e=t.length);for(var i=0,a=Array(e);i=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,n=!0,o=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){o=!0,r=t},f:function(){try{n||null==i.return||i.return()}finally{if(o)throw r}}}}function n(t){var i=c();return function(){var a,s=l(t);if(i){var r=l(this).constructor;a=Reflect.construct(s,arguments,r)}else a=s.apply(this,arguments);return function(t,i){if(i&&("object"==typeof i||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return e(t)}(this,a)}}function o(t,e,i){return(e=x(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function d(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function u(t){for(var e=1;e>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-r)*s)+r)+256*(Math.round((a-n)*s)+n)+(Math.round((a-o)*s)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,i){return t.isColorHex(i)?this.shadeHexColor(e,i):this.shadeRGBColor(e,i)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===b(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,i=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var i="",a=t<0?"-":"",s=e[0].replace(".",""),r=Number(e[1])+1;if(r<0){for(i=a+"0.";r++;)i+="0";return i+s.replace(/^-/,"")}for(r-=s.length;r--;)i+="0";return s+i}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),i=t.clientHeight,a=t.clientWidth;return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[a-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),i]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:"x",i=t.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,i){if(i>=t.length)for(var a=i-t.length+1;a--;)t.push(void 0);return t.splice(i,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style.key=e[i])}},{key:"preciseAddition",value:function(t,e){var i=(String(t).split(".")[1]||"").length,a=(String(e).split(".")[1]||"").length,s=Math.pow(10,Math.max(i,a));return(Math.round(t*s)+Math.round(e*s))/s}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*a),e=Math.round(Math.abs(e)*a);e;){var s=e;e=t%e,t=s}return t/a}},{key:"getPrimeFactors",value:function(t){for(var e=[],i=2;t>=2;)t%i==0?(e.push(i),t/=i):i++;return e}},{key:"mod",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*a))%(e=Math.round(Math.abs(e)*a))/a}}]),t}(),y=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"animateLine",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animateMarker",value:function(t,e,i,a){t.attr({opacity:0}).animate(e).attr({opacity:1}).after((function(){a()}))}},{key:"animateRect",value:function(t,e,i,a,s){t.attr(e).animate(a).attr(i).after((function(){return s()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.realIndex,a=t.j,s=t.fill,r=t.pathFrom,n=t.pathTo,o=t.speed,l=t.delay,h=this.w,c=0;h.config.chart.animations.animateGradually.enabled&&(c=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&"bar"!==h.config.chart.type&&(c=0),this.morphSVG(e,i,a,"line"!==h.config.chart.type||h.globals.comboCharts?s:"stroke",r,n,o,l*c)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){var e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,i,a,s,r,n,o){var l=this,h=this.w;s||(s=t.attr("pathFrom")),r||(r=t.attr("pathTo"));var c=function(t){return"radar"===h.config.chart.type&&(n=1),"M 0 ".concat(h.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=c()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=c()),h.globals.shouldAnimate||(n=1),t.plot(s).animate(1,o).plot(s).animate(n,o).plot(r).after((function(){v.isNumber(i)?i===h.globals.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&l.animationCompleted(t):"none"!==a&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&e===h.globals.series.length-1||h.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}]),t}();const w={},k=[];function A(t,e){if(Array.isArray(t))for(const i of t)A(i,e);else if("object"!=typeof t)S(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(const e in t)A(e,t[e])}function C(t){return w[t]||{}}function S(t){k.push(...t)}function L(t,e){let i;const a=t.length,s=[];for(i=0;iz.has(t.nodeName),R=(t,e,i={})=>{const a={...e};for(const t in a)a[t].valueOf()===i[t]&&delete a[t];Object.keys(a).length?t.node.setAttribute("data-svgjs",JSON.stringify(a)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},E="http://www.w3.org/2000/svg",Y="http://www.w3.org/2000/xmlns/",H="http://www.w3.org/1999/xlink",O={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function F(){return O.window}let D=class{};const _={},N="___SYMBOL___ROOT___";function W(t,e=E){return O.document.createElementNS(e,t)}function B(t,e=!1){if(t instanceof D)return t;if("object"==typeof t)return U(t);if(null==t)return new _[N];if("string"==typeof t&&"<"!==t.charAt(0))return U(O.document.querySelector(t));const i=e?O.document.createElement("div"):W("svg");return i.innerHTML=t,t=U(i.firstChild),i.removeChild(i.firstChild),t}function G(t,e){return e&&(e instanceof O.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:W(t)}function V(t){if(!t)return null;if(t.instance instanceof D)return t.instance;if("#document-fragment"===t.nodeName)return new _.Fragment(t);let e=P(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":_[e]||(e="Dom"),new _[e](t)}let U=V;function q(t,e=t.name,i=!1){return _[e]=t,i&&(_[N]=t),S(Object.getOwnPropertyNames(t.prototype)),t}let Z=1e3;function $(t){return"Svgjs"+P(t)+Z++}function J(t){for(let e=t.children.length-1;e>=0;e--)J(t.children[e]);return t.id?(t.id=$(t.nodeName),t):t}function Q(t,e){let i,a;for(a=(t=Array.isArray(t)?t:[t]).length-1;a>=0;a--)for(i in e)t[a].prototype[i]=e[i]}function K(t){return function(...e){const i=e[e.length-1];return!i||i.constructor!==Object||i instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(i)}}A("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=B(t)).before(this),this},insertAfter:function(t){return(t=B(t)).after(this),this}});const tt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,et=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,it=/rgb\((\d+),(\d+),(\d+)\)/,at=/(#[a-z_][a-z0-9\-_]*)/i,st=/\)\s*,?\s*/,rt=/\s/g,nt=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ot=/^rgb\(/,lt=/^(\s+)?$/,ht=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ct=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,dt=/[\s,]+/,ut=/[MLHVCSQTAZ]/i;function gt(t){const e=Math.round(t),i=Math.max(0,Math.min(255,e)).toString(16);return 1===i.length?"0"+i:i}function pt(t,e){for(let i=e.length;i--;)if(null==t[e[i]])return!1;return!0}function ft(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}A("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(dt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),A("Dom",{css:function(t,e){const i={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);i[e[0]]=e[1]})),i;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;i[e]=this.node.style.getPropertyValue(t)}return i}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||lt.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||lt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),A("Dom",{data:function(t,e,i){if(null==t)return this.data(L(function(t,e){let i;const a=t.length,s=[];for(i=0;i0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const i of t)e[i]=this.data(i);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===i||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),A("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class xt{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof xt||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:i,round:a,sin:s,PI:r}=Math;if("vibrant"===t){const t=24*i()+57,e=38*i()+45,a=360*i();return new xt(t,e,a,"lch")}if("sine"===t){const t=a(80*s(2*r*(e=null==e?i():e)/.5+.01)+150),n=a(50*s(2*r*e/.5+4.6)+200),o=a(100*s(2*r*e/.5+2.3)+150);return new xt(t,n,o)}if("pastel"===t){const t=8*i()+86,e=17*i()+9,a=360*i();return new xt(t,e,a,"lch")}if("dark"===t){const t=10+10*i(),e=50*i()+86,a=360*i();return new xt(t,e,a,"lch")}if("rgb"===t){const t=255*i(),e=255*i(),a=255*i();return new xt(t,e,a)}if("lab"===t){const t=100*i(),e=256*i()-128,a=256*i()-128;return new xt(t,e,a,"lab")}if("grey"===t){const t=255*i();return new xt(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(nt.test(t)||ot.test(t))}cmyk(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.min(1-a,1-s,1-r);if(1===n)return new xt(0,0,0,1,"cmyk");return new xt((1-a-n)/(1-n),(1-s-n)/(1-n),(1-r-n)/(1-n),n,"cmyk")}hsl(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.max(a,s,r),o=Math.min(a,s,r),l=(n+o)/2,h=n===o,c=n-o;return new xt(360*(h?0:n===a?((s-r)/c+(s.5?c/(2-n-o):c/(n+o)),100*l,"hsl")}init(t=0,e=0,i=0,a=0,s="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)s="string"==typeof a?a:s,a="string"==typeof a?0:a,Object.assign(this,{_a:t,_b:e,_c:i,_d:a,space:s});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const i=function(t,e){const i=pt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:pt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:pt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:pt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:pt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:pt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return i.space=e||i.space,i}(t,e);Object.assign(this,i)}else if("string"==typeof t)if(ot.test(t)){const e=t.replace(rt,""),[i,a,s]=it.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}else{if(!nt.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,i,a,s]=et.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}}const{_a:r,_b:n,_c:o,_d:l}=this,h="rgb"===this.space?{r:r,g:n,b:o}:"xyz"===this.space?{x:r,y:n,z:o}:"hsl"===this.space?{h:r,s:n,l:o}:"lab"===this.space?{l:r,a:n,b:o}:"lch"===this.space?{l:r,c:n,h:o}:"cmyk"===this.space?{c:r,m:n,y:o,k:l}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:i}=this.xyz();return new xt(116*e-16,500*(t-e),200*(e-i),"lab")}lch(){const{l:t,a:e,b:i}=this.lab(),a=Math.sqrt(e**2+i**2);let s=180*Math.atan2(i,e)/Math.PI;s<0&&(s*=-1,s=360-s);return new xt(t,a,s,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:a,a:s,b:r}=this;if("lch"===this.space){const{c:t,h:e}=this,i=Math.PI/180;s=t*Math.cos(i*e),r=t*Math.sin(i*e)}const n=(a+16)/116,o=s/500+n,l=n-r/200,h=16/116,c=.008856,d=7.787;t=.95047*(o**3>c?o**3:(o-h)/d),e=1*(n**3>c?n**3:(n-h)/d),i=1.08883*(l**3>c?l**3:(l-h)/d)}const a=3.2406*t+-1.5372*e+-.4986*i,s=-.9689*t+1.8758*e+.0415*i,r=.0557*t+-.204*e+1.057*i,n=Math.pow,o=.0031308,l=a>o?1.055*n(a,1/2.4)-.055:12.92*a,h=s>o?1.055*n(s,1/2.4)-.055:12.92*s,c=r>o?1.055*n(r,1/2.4)-.055:12.92*r;return new xt(255*l,255*h,255*c)}if("hsl"===this.space){let{h:t,s:e,l:i}=this;if(t/=360,e/=100,i/=100,0===e){i*=255;return new xt(i,i,i)}const a=i<.5?i*(1+e):i+e-i*e,s=2*i-a,r=255*ft(s,a,t+1/3),n=255*ft(s,a,t),o=255*ft(s,a,t-1/3);return new xt(r,n,o)}if("cmyk"===this.space){const{c:t,m:e,y:i,k:a}=this,s=255*(1-Math.min(1,t*(1-a)+a)),r=255*(1-Math.min(1,e*(1-a)+a)),n=255*(1-Math.min(1,i*(1-a)+a));return new xt(s,r,n)}return this;var t}toArray(){const{_a:t,_b:e,_c:i,_d:a,space:s}=this;return[t,e,i,a,s]}toHex(){const[t,e,i]=this._clamped().map(gt);return`#${t}${e}${i}`}toRgb(){const[t,e,i]=this._clamped();return`rgb(${t},${e},${i})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,o=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,l=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,h=(.4124*n+.3576*o+.1805*l)/.95047,c=(.2126*n+.7152*o+.0722*l)/1,d=(.0193*n+.1192*o+.9505*l)/1.08883,u=h>.008856?Math.pow(h,1/3):7.787*h+16/116,g=c>.008856?Math.pow(c,1/3):7.787*c+16/116,p=d>.008856?Math.pow(d,1/3):7.787*d+16/116;return new xt(u,g,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:i}=this.rgb(),{max:a,min:s,round:r}=Math;return[t,e,i].map((t=>a(0,s(r(t),255))))}}class bt{constructor(...t){this.init(...t)}clone(){return new bt(this)}init(t,e){const i=0,a=0,s=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==s.x?i:s.x,this.y=null==s.y?a:s.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){vt.isMatrixLike(t)||(t=new vt(t));const{x:e,y:i}=this;return this.x=t.a*e+t.c*i+t.e,this.y=t.b*e+t.d*i+t.f,this}}function mt(t,e,i){return Math.abs(e-t)<(i||1e-6)}class vt{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,i=t.flip&&(e||"x"===t.flip)?-1:1,a=t.flip&&(e||"y"===t.flip)?-1:1,s=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,r=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,n=t.scale&&t.scale.length?t.scale[0]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleX)?t.scaleX*i:i,o=t.scale&&t.scale.length?t.scale[1]*a:isFinite(t.scale)?t.scale*a:isFinite(t.scaleY)?t.scaleY*a:a,l=t.shear||0,h=t.rotate||t.theta||0,c=new bt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),d=c.x,u=c.y,g=new bt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=g.x,f=g.y,x=new bt(t.translate||t.tx||t.translateX,t.ty||t.translateY),b=x.x,m=x.y,v=new bt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:n,scaleY:o,skewX:s,skewY:r,shear:l,theta:h,rx:v.x,ry:v.y,tx:b,ty:m,ox:d,oy:u,px:p,py:f}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,i){const a=t.a*e.a+t.c*e.b,s=t.b*e.a+t.d*e.b,r=t.a*e.c+t.c*e.d,n=t.b*e.c+t.d*e.d,o=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return i.a=a,i.b=s,i.c=r,i.d=n,i.e=o,i.f=l,i}around(t,e,i){return this.clone().aroundO(t,e,i)}aroundO(t,e,i){const a=t||0,s=e||0;return this.translateO(-a,-s).lmultiplyO(i).translateO(a,s)}clone(){return new vt(this)}decompose(t=0,e=0){const i=this.a,a=this.b,s=this.c,r=this.d,n=this.e,o=this.f,l=i*r-a*s,h=l>0?1:-1,c=h*Math.sqrt(i*i+a*a),d=Math.atan2(h*a,h*i),u=180/Math.PI*d,g=Math.cos(d),p=Math.sin(d),f=(i*s+a*r)/l,x=s*c/(f*i-a)||r*c/(f*a+i);return{scaleX:c,scaleY:x,shear:f,rotate:u,translateX:n-t+t*g*c+e*(f*g*c-p*x),translateY:o-e+t*p*c+e*(f*p*c+g*x),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new vt(t);return mt(this.a,e.a)&&mt(this.b,e.b)&&mt(this.c,e.c)&&mt(this.d,e.d)&&mt(this.e,e.e)&&mt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=vt.fromArray([1,0,0,1,0,0]);return t=t instanceof Gt?t.matrixify():"string"==typeof t?vt.fromArray(t.split(dt).map(parseFloat)):Array.isArray(t)?vt.fromArray(t):"object"==typeof t&&vt.isMatrixLike(t)?t:"object"==typeof t?(new vt).transform(t):6===arguments.length?vt.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,i=this.c,a=this.d,s=this.e,r=this.f,n=t*a-e*i;if(!n)throw new Error("Cannot invert "+this);const o=a/n,l=-e/n,h=-i/n,c=t/n,d=-(o*s+h*r),u=-(l*s+c*r);return this.a=o,this.b=l,this.c=h,this.d=c,this.e=d,this.f=u,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(this,e,this)}rotate(t,e,i){return this.clone().rotateO(t,e,i)}rotateO(t,e=0,i=0){t=M(t);const a=Math.cos(t),s=Math.sin(t),{a:r,b:n,c:o,d:l,e:h,f:c}=this;return this.a=r*a-n*s,this.b=n*a+r*s,this.c=o*a-l*s,this.d=l*a+o*s,this.e=h*a-c*s+i*s-e*a+e,this.f=c*a+h*s-e*s-i*a+i,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t);const{a:s,b:r,c:n,d:o,e:l,f:h}=this;return this.a=s*t,this.b=r*e,this.c=n*t,this.d=o*e,this.e=l*t-i*t+i,this.f=h*e-a*e+a,this}shear(t,e,i){return this.clone().shearO(t,e,i)}shearO(t,e=0,i=0){const{a:a,b:s,c:r,d:n,e:o,f:l}=this;return this.a=a+s*t,this.c=r+n*t,this.e=o+l*t-i*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t),t=M(t),e=M(e);const s=Math.tan(t),r=Math.tan(e),{a:n,b:o,c:l,d:h,e:c,f:d}=this;return this.a=n+o*s,this.b=o+n*r,this.c=l+h*s,this.d=h+l*r,this.e=c+d*s-a*s,this.f=d+c*r-i*r,this}skewX(t,e,i){return this.skew(t,0,e,i)}skewY(t,e,i){return this.skew(0,t,e,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(vt.isMatrixLike(t)){return new vt(t).multiplyO(this)}const e=vt.formatTransforms(t),{x:i,y:a}=new bt(e.ox,e.oy).transform(this),s=(new vt).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-i,-a).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(i,a);if(isFinite(e.px)||isFinite(e.py)){const t=new bt(i,a).transform(s),r=isFinite(e.px)?e.px-t.x:0,n=isFinite(e.py)?e.py-t.y:0;s.translateO(r,n)}return s.translateO(e.tx,e.ty),s}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function yt(){if(!yt.nodes){const t=B().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;yt.nodes={svg:t,path:e}}if(!yt.nodes.svg.node.parentNode){const t=O.document.body||O.document.documentElement;yt.nodes.svg.addTo(t)}return yt.nodes}function wt(t){return!(t.width||t.height||t.x||t.y)}q(vt,"Matrix");class kt{constructor(...t){this.init(...t)}addOffset(){return this.x+=O.window.pageXOffset,this.y+=O.window.pageYOffset,new kt(this)}init(t){return t="string"==typeof t?t.split(dt).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return wt(this)}merge(t){const e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),a=Math.max(this.x+this.width,t.x+t.width)-e,s=Math.max(this.y+this.height,t.y+t.height)-i;return new kt(e,i,a,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof vt||(t=new vt(t));let e=1/0,i=-1/0,a=1/0,s=-1/0;return[new bt(this.x,this.y),new bt(this.x2,this.y),new bt(this.x,this.y2),new bt(this.x2,this.y2)].forEach((function(r){r=r.transform(t),e=Math.min(e,r.x),i=Math.max(i,r.x),a=Math.min(a,r.y),s=Math.max(s,r.y)})),new kt(e,a,i-e,s-a)}}function At(t,e,i){let a;try{if(a=e(t.node),wt(a)&&((s=t.node)!==O.document&&!(O.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===O.document}).call(O.document.documentElement,s)))throw new Error("Element not in the dom")}catch(e){a=i(t)}var s;return a}A({viewbox:{viewbox(t,e,i,a){return null==t?new kt(this.attr("viewBox")):this.attr("viewBox",new kt(t,e,i,a))},zoom(t,e){let{width:i,height:a}=this.attr(["width","height"]);if((i||a)&&"string"!=typeof i&&"string"!=typeof a||(i=this.node.clientWidth,a=this.node.clientHeight),!i||!a)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const s=this.viewbox(),r=i/s.width,n=a/s.height,o=Math.min(r,n);if(null==t)return o;let l=o/t;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new bt(i/2/r+s.x,a/2/n+s.y);const h=new kt(s).transform(new vt({scale:l,origin:e}));return this.viewbox(h)}}}),q(kt,"Box");class Ct extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}Q([Ct],{each(t,...e){return"function"==typeof t?this.map(((e,i,a)=>t.call(e,e,i,a))):this.map((i=>i[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const St=["toArray","constructor","each"];function Lt(t,e){return new Ct(L((e||O.document).querySelectorAll(t),(function(t){return V(t)})))}Ct.extend=function(t){t=t.reduce(((t,e)=>(St.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),Q([Ct],t)};let Mt=0;const Pt={};function It(t){let e=t.getEventHolder();return e===O.window&&(e=Pt),e.events||(e.events={}),e.events}function Tt(t){return t.getEventTarget()}function zt(t,e,i,a,s){const r=i.bind(a||t),n=B(t),o=It(n),l=Tt(n);e=Array.isArray(e)?e:e.split(dt),i._svgjsListenerId||(i._svgjsListenerId=++Mt),e.forEach((function(t){const e=t.split(".")[0],a=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][a]=o[e][a]||{},o[e][a][i._svgjsListenerId]=r,l.addEventListener(e,r,s||!1)}))}function Xt(t,e,i,a){const s=B(t),r=It(s),n=Tt(s);("function"!=typeof i||(i=i._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(dt)).forEach((function(t){const e=t&&t.split(".")[0],o=t&&t.split(".")[1];let l,h;if(i)r[e]&&r[e][o||"*"]&&(n.removeEventListener(e,r[e][o||"*"][i],a||!1),delete r[e][o||"*"][i]);else if(e&&o){if(r[e]&&r[e][o]){for(h in r[e][o])Xt(n,[e,o].join("."),h);delete r[e][o]}}else if(o)for(t in r)for(l in r[t])o===l&&Xt(n,[t,o].join("."));else if(e){if(r[e]){for(l in r[e])Xt(n,[e,l].join("."));delete r[e]}}else{for(t in r)Xt(n,t);!function(t){let e=t.getEventHolder();e===O.window&&(e=Pt),e.events&&(e.events={})}(s)}}))}class Rt extends D{addEventListener(){}dispatch(t,e,i){return function(t,e,i,a){const s=Tt(t);return e instanceof O.window.Event||(e=new O.window.CustomEvent(e,{detail:i,cancelable:!0,...a})),s.dispatchEvent(e),e}(this,t,e,i)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const i=e[t.type];for(const e in i)for(const a in i[e])i[e][a](t);return!t.defaultPrevented}fire(t,e,i){return this.dispatch(t,e,i),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,i){return Xt(this,t,e,i),this}on(t,e,i,a){return zt(this,t,e,i,a),this}removeEventListener(){}}function Et(){}q(Rt,"EventTarget");const Yt=400,Ht=">",Ot=0,Ft={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Dt extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(dt).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class _t{constructor(...t){this.init(...t)}convert(t){return new _t(this.value,t)}divide(t){return t=new _t(t),new _t(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(tt))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof _t&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new _t(t),new _t(this-t,this.unit||t.unit)}plus(t){return t=new _t(t),new _t(this+t,this.unit||t.unit)}times(t){return t=new _t(t),new _t(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Nt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Wt=[];class Bt extends Rt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=B(t)).removeNamespace&&this.node instanceof O.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return B(t).put(this,e)}children(){return new Ct(L(this.node.children,(function(t){return V(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let i=this.node.cloneNode(t);return e&&(i=J(i)),new this.constructor(i)}each(t,e){const i=this.children();let a,s;for(a=0,s=i.length;a=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=$(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return V(this.node.lastChild)}matches(t){const e=this.node,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return i&&i.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=V(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=V(e.node.parentNode));return e}put(t,e){return t=B(t),this.add(t,e),t}putIn(t,e){return B(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=B(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const i=10**t,a=this.attr(e);for(const t in a)"number"==typeof a[t]&&(a[t]=Math.round(a[t]*i)/i);return this.attr(a),this}svg(t,e){return this.xml(t,e,E)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const i=e.index(this);return e.put(t,i).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let i=this;if(null!=t){if(i=V(i.node.cloneNode(!0)),e){const e=t(i);if(i=e||i,!1===e)return""}i.each((function(){const e=t(this),i=e||this;!1===e?this.remove():e&&this!==i&&this.replace(i)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;const a=W("wrapper",i),s=O.document.createDocumentFragment();a.innerHTML=t;for(let t=a.children.length;t--;)s.appendChild(a.firstElementChild);const r=this.parent();return e?this.replace(s)&&r:this.add(s)}}Q(Bt,{attr:function(t,e,i){if(null==t){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=ht.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ft[t]:ht.test(e)?parseFloat(e):e;"number"==typeof(e=Wt.reduce(((e,i)=>i(t,e,this)),e))?e=new _t(e):Nt.has(t)&&xt.isColor(e)?e=new xt(e):e.constructor===Array&&(e=new Dt(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return Lt(t,this.node)},findOne:function(t){return V(this.node.querySelector(t))}}),q(Bt,"Dom");class Gt extends Bt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new _t(t).plus(this.x()))}dy(t=0){return this.y(new _t(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=B(t));const i=new Ct;let a=this;for(;(a=a.parent())&&a.node!==O.document&&"#document-fragment"!==a.nodeName&&(i.push(a),e||a.node!==t.node)&&(!e||!a.matches(t));)if(a.node===this.root().node)return null;return i}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(at);return e?B(e[1]):null}root(){const t=this.parent(function(t){return _[t]}(N));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const i=I(this,t,e);return this.width(new _t(i.width)).height(new _t(i.height))}width(t){return this.attr("width",t)}writeDataToDom(){return R(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}Q(Gt,{bbox:function(){const t=At(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(yt().svg).show(),i=e.node.getBBox();return e.remove(),i}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new kt(t)},rbox:function(t){const e=At(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),i=new kt(e);return t?i.transform(t.screenCTM().inverseO()):i.addOffset()},inside:function(t,e){const i=this.bbox();return t>i.x&&e>i.y&&t=0;i--)null!=e[jt[t][i]]&&this.attr(jt.prefix(t,jt[t][i]),e[jt[t][i]]);return this},A(["Element","Runner"],e)})),A(["Element","Runner"],{matrix:function(t,e,i,a,s,r){return null==t?new vt(this):this.attr("transform",new vt(t,e,i,a,s,r))},rotate:function(t,e,i){return this.transform({rotate:t,ox:e,oy:i},!0)},skew:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:i},!0):this.transform({skew:[t,e],ox:i,oy:a},!0)},shear:function(t,e,i){return this.transform({shear:t,ox:e,oy:i},!0)},scale:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:i},!0):this.transform({scale:[t,e],ox:i,oy:a},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),A("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new _t(t)):this.rx(t).ry(e)}}),A("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new bt(this.node.getPointAtLength(t))}}),A(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});A("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),A("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){const t=(this.attr("transform")||"").split(st).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(dt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(vt.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new vt);return t},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);const i=this.screenCTM(),a=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(a.multiply(i)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new vt(this).decompose();return null==t?e:e[t]}vt.isMatrixLike(t)||(t={...t,origin:T(t,this)});const i=new vt(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});class Vt extends Gt{flatten(){return this.each((function(){if(this instanceof Vt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(i,a){return a[a.length-i-1].toParent(t,e)})),this.remove()}}q(Vt,"Container");class Ut extends Vt{constructor(t,e=t){super(G("defs",t),e)}flatten(){return this}ungroup(){return this}}q(Ut,"Defs");class qt extends Gt{}function Zt(t){return this.attr("rx",t)}function $t(t){return this.attr("ry",t)}function Jt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Qt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Kt(t){return this.attr("cx",t)}function te(t){return this.attr("cy",t)}function ee(t){return null==t?2*this.rx():this.rx(new _t(t).divide(2))}function ie(t){return null==t?2*this.ry():this.ry(new _t(t).divide(2))}q(qt,"Shape");var ae=Object.freeze({__proto__:null,cx:Kt,cy:te,height:ie,rx:Zt,ry:$t,width:ee,x:Jt,y:Qt});class se extends qt{constructor(t,e=t){super(G("ellipse",t),e)}size(t,e){const i=I(this,t,e);return this.rx(new _t(i.width).divide(2)).ry(new _t(i.height).divide(2))}}Q(se,ae),A("Container",{ellipse:K((function(t=0,e=t){return this.put(new se).size(t,e).move(0,0)}))}),q(se,"Ellipse");class re extends Bt{constructor(t=O.document.createDocumentFragment()){super(t)}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){const t=new Bt(W("wrapper",i));return t.add(this.node.cloneNode(!0)),t.xml(!1,i)}return super.xml(t,!1,i)}}function ne(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new _t(t),fy:new _t(e)}):this.attr({x1:new _t(t),y1:new _t(e)})}function oe(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new _t(t),cy:new _t(e)}):this.attr({x2:new _t(t),y2:new _t(e)})}q(re,"Fragment");var le=Object.freeze({__proto__:null,from:ne,to:oe});class he extends Vt{constructor(t,e){super(G(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,i){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}Q(he,le),A({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:K((function(t,e){return this.put(new he(t)).update(e)}))}}),q(he,"Gradient");class ce extends Vt{constructor(t,e=t){super(G("pattern",t),e)}attr(t,e,i){return"transform"===t&&(t="patternTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}A({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:K((function(t,e,i){return this.put(new ce).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),q(ce,"Pattern");let de=class extends qt{constructor(t,e=t){super(G("image",t),e)}load(t,e){if(!t)return this;const i=new O.window.Image;return zt(i,"load",(function(t){const a=this.parent(ce);0===this.width()&&0===this.height()&&this.size(i.width,i.height),a instanceof ce&&0===a.width()&&0===a.height()&&a.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),zt(i,"load error",(function(){Xt(i)})),this.attr("href",i.src=t,H)}};var ue;ue=function(t,e,i){return"fill"!==t&&"stroke"!==t||ct.test(e)&&(e=i.root().defs().image(e)),e instanceof de&&(e=i.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Wt.push(ue),A({Container:{image:K((function(t,e){return this.put(new de).size(0,0).load(t,e)}))}}),q(de,"Image");class ge extends Dt{bbox(){let t=-1/0,e=-1/0,i=1/0,a=1/0;return this.forEach((function(s){t=Math.max(s[0],t),e=Math.max(s[1],e),i=Math.min(s[0],i),a=Math.min(s[1],a)})),new kt(i,a,t-i,e-a)}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let i=this.length-1;i>=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(dt).map(parseFloat)).length%2!=0&&t.pop();for(let i=0,a=t.length;i=0;i--)a.width&&(this[i][0]=(this[i][0]-a.x)*t/a.width+a.x),a.height&&(this[i][1]=(this[i][1]-a.y)*e/a.height+a.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,i=this.length;e":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,i,a){return function(s){return s<0?t>0?e/t*s:i>0?a/i*s:0:s>1?i<1?(1-a)/(1-i)*s+(a-i)/(1-i):t<1?(1-e)/(1-t)*s+(e-t)/(1-t):1:3*s*(1-s)**2*e+3*s**2*(1-s)*a+s**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let i=t;return"none"===e?--i:"both"===e&&++i,(a,s=!1)=>{let r=Math.floor(a*t);const n=a*r%1==0;return"start"!==e&&"both"!==e||++r,s&&n&&--r,a>=0&&r<0&&(r=0),a<=1&&r>i&&(r=i),r/i}}};class ye{done(){return!1}}class we extends ye{constructor(t=Ht){super(),this.ease=ve[t]||t}step(t,e,i){return"number"!=typeof t?i<1?t:e:t+(e-t)*this.ease(i)}}class ke extends ye{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,i,a){return this.stepper(t,e,i,a)}}function Ae(){const t=(this._duration||500)/1e3,e=this._overshoot||0,i=Math.PI,a=Math.log(e/100+1e-10),s=-a/Math.sqrt(i*i+a*a),r=3.9/(s*t);this.d=2*s*r,this.k=r*r}Q(class extends ke{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;i>100&&(i=16),i/=1e3;const s=a.velocity||0,r=-this.d*s-this.k*(t-e),n=t+s*i+r*i*i/2;return a.velocity=s+r*i,a.done=Math.abs(e-n)+Math.abs(s)<.002,a.done?e:n}},{duration:me("_duration",Ae),overshoot:me("_overshoot",Ae)});Q(class extends ke{constructor(t=.1,e=.01,i=0,a=1e3){super(),this.p(t).i(e).d(i).windup(a)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;const s=e-t;let r=(a.integral||0)+s*i;const n=(s-(a.error||0))/i,o=this._windup;return!1!==o&&(r=Math.max(-o,Math.min(r,o))),a.error=s,a.integral=r,a.done=Math.abs(s)<.001,a.done?e:t+(this.P*s+this.I*r+this.D*n)}},{windup:me("_windup"),p:me("P"),i:me("I"),d:me("D")});const Ce={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Se={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Le="mlhvqtcsaz".split("");for(let t=0,e=Le.length;t=0;a--)i=this[a][0],"M"===i||"L"===i||"T"===i?(this[a][1]+=t,this[a][2]+=e):"H"===i?this[a][1]+=t:"V"===i?this[a][1]+=e:"C"===i||"S"===i||"Q"===i?(this[a][1]+=t,this[a][2]+=e,this[a][3]+=t,this[a][4]+=e,"C"===i&&(this[a][5]+=t,this[a][6]+=e)):"A"===i&&(this[a][6]+=t,this[a][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let i=0,a="";const s={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new bt,p:new bt};for(;s.lastToken=a,a=t.charAt(i++);)if(s.inSegment||!Pe(s,a))if("."!==a)if(isNaN(parseInt(a)))if(Re.has(a))s.inNumber&&Ie(s,!1);else if("-"!==a&&"+"!==a)if("E"!==a.toUpperCase()){if(ut.test(a)){if(s.inNumber)Ie(s,!1);else{if(!Me(s))throw new Error("parser Error");Te(s)}--i}}else s.number+=a,s.hasExponent=!0;else{if(s.inNumber&&!Xe(s)){Ie(s,!1),--i;continue}s.number+=a,s.inNumber=!0}else{if("0"===s.number||ze(s)){s.inNumber=!0,s.number=a,Ie(s,!0);continue}s.inNumber=!0,s.number+=a}else{if(s.pointSeen||s.hasExponent){Ie(s,!1),--i;continue}s.inNumber=!0,s.pointSeen=!0,s.number+=a}return s.inNumber&&Ie(s,!1),s.inSegment&&Me(s)&&Te(s),s.segments}(t)}size(t,e){const i=this.bbox();let a,s;for(i.width=0===i.width?1:i.width,i.height=0===i.height?1:i.height,a=this.length-1;a>=0;a--)s=this[a][0],"M"===s||"L"===s||"T"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y):"H"===s?this[a][1]=(this[a][1]-i.x)*t/i.width+i.x:"V"===s?this[a][1]=(this[a][1]-i.y)*e/i.height+i.y:"C"===s||"S"===s||"Q"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y,this[a][3]=(this[a][3]-i.x)*t/i.width+i.x,this[a][4]=(this[a][4]-i.y)*e/i.height+i.y,"C"===s&&(this[a][5]=(this[a][5]-i.x)*t/i.width+i.x,this[a][6]=(this[a][6]-i.y)*e/i.height+i.y)):"A"===s&&(this[a][1]=this[a][1]*t/i.width,this[a][2]=this[a][2]*e/i.height,this[a][6]=(this[a][6]-i.x)*t/i.width+i.x,this[a][7]=(this[a][7]-i.y)*e/i.height+i.y);return this}toString(){return function(t){let e="";for(let i=0,a=t.length;i{const e=typeof t;return"number"===e?_t:"string"===e?xt.isColor(t)?xt:dt.test(t)?ut.test(t)?Ee:Dt:tt.test(t)?_t:Oe:Ne.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Dt:"object"===e?_e:Oe};class He{constructor(t){this._stepper=t||new we("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Ye(t));let e=new this._type(t);return this._type===xt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===_e&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Oe{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Fe{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Fe.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Fe.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const De=(t,e)=>t[0]e[0]?1:0;class _e{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let i=0,a=e.length;it.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const i=e.shift(),a=e.shift(),s=e.shift(),r=e.splice(0,s);t[i]=new a(r)}return t}}const Ne=[Oe,Fe,_e];class We extends qt{constructor(t,e=t){super(G("path",t),e)}array(){return this._array||(this._array=new Ee(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Ee(t))}size(t,e){const i=I(this,t,e);return this.attr("d",this.array().size(i.width,i.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}We.prototype.MorphArray=Ee,A({Container:{path:K((function(t){return this.put(new We).plot(t||new Ee)}))}}),q(We,"Path");var Be=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new ge(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new ge(t))},size:function(t,e){const i=I(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}});class Ge extends qt{constructor(t,e=t){super(G("polygon",t),e)}}A({Container:{polygon:K((function(t){return this.put(new Ge).plot(t||new ge)}))}}),Q(Ge,fe),Q(Ge,Be),q(Ge,"Polygon");class je extends qt{constructor(t,e=t){super(G("polyline",t),e)}}A({Container:{polyline:K((function(t){return this.put(new je).plot(t||new ge)}))}}),Q(je,fe),Q(je,Be),q(je,"Polyline");class Ve extends qt{constructor(t,e=t){super(G("rect",t),e)}}Q(Ve,{rx:Zt,ry:$t}),A({Container:{rect:K((function(t,e){return this.put(new Ve).size(t,e)}))}}),q(Ve,"Rect");class Ue{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const qe={nextDraw:null,frames:new Ue,timeouts:new Ue,immediates:new Ue,timer:()=>O.window.performance||O.window.Date,transforms:[],frame(t){const e=qe.frames.push({run:t});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},timeout(t,e){e=e||0;const i=qe.timer().now()+e,a=qe.timeouts.push({run:t,time:i});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),a},immediate(t){const e=qe.immediates.push(t);return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},cancelFrame(t){null!=t&&qe.frames.remove(t)},clearTimeout(t){null!=t&&qe.timeouts.remove(t)},cancelImmediate(t){null!=t&&qe.immediates.remove(t)},_draw(t){let e=null;const i=qe.timeouts.last();for(;(e=qe.timeouts.shift())&&(t>=e.time?e.run():qe.timeouts.push(e),e!==i););let a=null;const s=qe.frames.last();for(;a!==s&&(a=qe.frames.shift());)a.run(t);let r=null;for(;r=qe.immediates.shift();)r();qe.nextDraw=qe.timeouts.first()||qe.frames.first()?O.window.requestAnimationFrame(qe._draw):null}},Ze=function(t){const e=t.start,i=t.runner.duration();return{start:e,duration:i,end:e+i,runner:t.runner}},$e=function(){const t=O.window;return(t.performance||t.Date).now()};class Je extends Rt{constructor(t=$e){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const i=Math.abs(e);return this.speed(t?-i:i)}schedule(t,e,i){if(null==t)return this._runners.map(Ze);let a=0;const s=this.getEndTime();if(e=e||0,null==i||"last"===i||"after"===i)a=s;else if("absolute"===i||"start"===i)a=e,e=0;else if("now"===i)a=this._time;else if("relative"===i){const i=this.getRunnerInfoById(t.id);i&&(a=i.start+e,e=0)}else{if("with-last"!==i)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();a=t?t.start:this._time}}t.unschedule(),t.timeline(this);const r=t.persist(),n={persist:null===r?this._persist:r,start:a+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(n),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return qe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let i=e-this._lastSourceTime;t&&(i=0);const a=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=a,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],i=e.runner;this._time-e.start<=0&&i.reset()}let s=!1;for(let t=0,e=this._runners.length;t0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}A({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Je,this._timeline):(this._timeline=t,this)}}});class Qe extends Rt{constructor(t){super(),this.id=Qe.id++,t="function"==typeof(t=null==t?Yt:t)?new ke(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ke,this._stepper=this._isDeclarative?t:new we,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new vt,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,i){let a=1,s=!1,r=0;return e=e??Ot,i=i||"last","object"!=typeof(t=t??Yt)||t instanceof ye||(e=t.delay??e,i=t.when??i,s=t.swing||s,a=t.times??a,r=t.wait??r,t=t.duration??Yt),{duration:t,delay:e,swing:s,times:a,wait:r,when:i}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,i){const a=Qe.sanitise(t,e,i),s=new Qe(a.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(a).schedule(a.delay,a.when)}clearTransform(){return this.transforms=new vt,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new we(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,i){return"object"==typeof t&&(e=t.swing,i=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=i||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),i=(this._time-t*e)/this._duration;return Math.min(t+i,this._times)}const i=t%1,a=e*Math.floor(t)+this._duration*i;return this.time(a)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,i=this._duration,a=this._wait,s=this._times,r=this._swing,n=this._reverse;let o;if(null==t){const t=function(t){const e=r*Math.floor(t%(2*(a+i))/(a+i)),s=e&&!n||!e&&n,o=Math.pow(-1,s)*(t%(a+i))/i+s;return Math.max(Math.min(o,1),0)},l=s*(a+i)-a;return o=e<=0?Math.round(t(1e-5)):e=0;this._lastPosition=e;const a=this.duration(),s=this._lastTime<=0&&this._time>0,r=this._lastTime=a;this._lastTime=this._time,s&&this.fire("start",this);const n=this._isDeclarative;this.done=!n&&!r&&this._time>=a,this._reseted=!1;let o=!1;return(i||n)&&(this._initialise(i),this.transforms=new vt,o=this._run(n?t:e),this.fire("step",this)),this.done=this.done||o&&n,r&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,i=this._queue.length;et.lmultiplyO(e),ei=t=>t.transforms;function ii(){const t=this._transformationRunners.runners.map(ei).reduce(ti,new vt);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class ai{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Ke).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const i=this.ids.indexOf(t+1);return this.ids.splice(i,1,t+1),this.runners.splice(i,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;ee.id<=t.id)).map(ei).reduce(ti,new vt)},_addRunner(t){this._transformationRunners.add(t),qe.cancelImmediate(this._frameId),this._frameId=qe.immediate(ii.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new ai).add(new Ke(new vt(this))))}}});Q(Qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,i){if("string"==typeof e)return this.styleAttr(t,{[e]:i});let a=e;if(this._tryRetarget(t,a))return this;let s=new He(this._stepper).to(a),r=Object.keys(a);return this.queue((function(){s=s.from(this.element()[t](r))}),(function(e){return this.element()[t](s.at(e).valueOf()),s.done()}),(function(e){const i=Object.keys(e),n=(o=r,i.filter((t=>!o.includes(t))));var o;if(n.length){const e=this.element()[t](n),i=new _e(s.from()).valueOf();Object.assign(i,e),s.from(i)}const l=new _e(s.to()).valueOf();Object.assign(l,e),s.to(l),r=i,a=e})),this._rememberMorpher(t,s),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let i=new He(this._stepper).to(new _t(t));return this.queue((function(){i=i.from(this.element().zoom())}),(function(t){return this.element().zoom(i.at(t),e),i.done()}),(function(t,a){e=a,i.to(t)})),this._rememberMorpher("zoom",i),this},transform(t,e,i){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const a=vt.isMatrixLike(t);i=null!=t.affine?t.affine:null!=i?i:!a;const s=new He(this._stepper).type(i?Fe:vt);let r,n,o,l,h;return this.queue((function(){n=n||this.element(),r=r||T(t,n),h=new vt(e?void 0:n),n._addRunner(this),e||n._clearTransformRunnersBefore(this)}),(function(c){e||this.clearTransform();const{x:d,y:u}=new bt(r).transform(n._currentTransform(this));let g=new vt({...t,origin:[d,u]}),p=this._isDeclarative&&o?o:h;if(i){g=g.decompose(d,u),p=p.decompose(d,u);const t=g.rotate,e=p.rotate,i=[t-360,t,t+360],a=i.map((t=>Math.abs(t-e))),s=Math.min(...a),r=a.indexOf(s);g.rotate=i[r]}e&&(a||(g.rotate=t.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),s.from(p),s.to(g);const f=s.at(c);return l=f.rotate,o=new vt(f),this.addTransform(o),n._addRunner(this),s.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(r=T(e,n)),t={...e,origin:r}}),!0),this._isDeclarative&&this._rememberMorpher("transform",s),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new _t(e),this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);let a=null;return this.queue((function(){a=this.element()[t](),i.from(a),i.to(a+e)}),(function(e){return this.element()[t](i.at(e)),i.done()}),(function(t){i.to(a+new _t(t))})),this._rememberMorpher(t,i),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);return this.queue((function(){i.from(this.element()[t]())}),(function(e){return this.element()[t](i.at(e)),i.done()})),this._rememberMorpher(t,i),this},_queueNumber(t,e){return this._queueObject(t,new _t(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let i;return t&&e||(i=this._element.bbox()),t||(t=i.width/i.height*e),e||(e=i.height/i.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,i,a){if(4===arguments.length)return this.plot([t,e,i,a]);if(this._tryRetarget("plot",t))return this;const s=new He(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){s.from(this._element.array())}),(function(t){return this._element.plot(s.at(t)),s.done()})),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,i,a){return this._queueObject("viewbox",new kt(t,e,i,a))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Q(Qe,{rx:Zt,ry:$t,from:ne,to:oe}),q(Qe,"Runner");class si extends Vt{constructor(t,e=t){super(G("svg",t),e),this.namespace()}defs(){return this.isRoot()?V(this.node.querySelector("defs"))||this.put(new Ut):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof O.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:E,version:"1.1"}).attr("xmlns:xlink",H,Y):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Y).attr("xmlns:svgjs",null,Y)}root(){return this.isRoot()?this:super.root()}}A({Container:{nested:K((function(){return this.put(new si)}))}}),q(si,"Svg",!0);let ri=class extends Vt{constructor(t,e=t){super(G("symbol",t),e)}};A({Container:{symbol:K((function(){return this.put(new ri)}))}}),q(ri,"Symbol");var ni=Object.freeze({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,i=this.bbox()){return this.cx(t,i).cy(e,i)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,i=this.bbox()){return this.x(t,i).y(e,i)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(O.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}});class oi extends qt{constructor(t,e=t){super(G("text",t),e),this.dom.leading=this.dom.leading??new _t(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new _t(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const i=this.dom.leading;this.each((function(a){if(X(this.node))return;const s=O.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=i*new _t(s);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=r:(this.attr("dy",a?r+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new _t(t.leading||1.3),this}writeDataToDom(){return R(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let i=0;t="";for(let a=0,s=e.length;a{let a;try{a=i.node instanceof F().SVGSVGElement?new kt(i.attr(["x","y","width","height"])):i.bbox()}catch(t){return}const s=new vt(i),r=s.translate(t,e).transform(s.inverse()),n=new bt(a.x,a.y).transform(r);i.move(n.x,n.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,i=this.bbox()){const a=t-i.x,s=e-i.y;return this.dmove(a,s)},size:function(t,e,i=this.bbox()){const a=I(this,t,e,i),s=a.width/i.width,r=a.height/i.height;return this.children().forEach((t=>{const e=new bt(i).transform(new vt(t).inverse());t.scale(s,r,e.x,e.y)})),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}});class gi extends Vt{constructor(t,e=t){super(G("g",t),e)}}Q(gi,ui),A({Container:{group:K((function(){return this.put(new gi)}))}}),q(gi,"G");class pi extends Vt{constructor(t,e=t){super(G("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,H)}}Q(pi,ui),A({Container:{link:K((function(t){return this.put(new pi).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const i=e.index(t);return e.add(this,i),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new pi,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),q(pi,"A");class fi extends Vt{constructor(t,e=t){super(G("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Lt("svg [mask*="+this.id()+"]")}}A({Container:{mask:K((function(){return this.defs().put(new fi)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof fi?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),q(fi,"Mask");class xi extends Gt{constructor(t,e=t){super(G("stop",t),e)}update(t){return("number"==typeof t||t instanceof _t)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new _t(t.offset)),this}}A({Gradient:{stop:function(t,e,i){return this.put(new xi).update(t,e,i)}}}),q(xi,"Stop");class bi extends Gt{constructor(t,e=t){super(G("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,i={}){return this.rule("@font-face",{fontFamily:t,src:e,...i})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let i=t+"{";for(const t in e)i+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return i+="}",i}(t,e))}}A("Dom",{style(t,e){return this.put(new bi).rule(t,e)},fontface(t,e,i){return this.put(new bi).font(t,e,i)}}),q(bi,"Style");class mi extends oi{constructor(t,e=t){super(G("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let i=null;return e&&(i=e.plot(t)),null==t?i:this}track(){return this.reference("href")}}A({Container:{textPath:K((function(t,e){return t instanceof oi||(t=this.text(t)),t.path(e)}))},Text:{path:K((function(t,e=!0){const i=new mi;let a;if(t instanceof We||(t=this.defs().path(t)),i.attr("href","#"+t,H),e)for(;a=this.node.firstChild;)i.node.appendChild(a);return this.put(i)})),textPath(){return this.findOne("textPath")}},Path:{text:K((function(t){return t instanceof oi||(t=(new oi).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Lt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),mi.prototype.MorphArray=Ee,q(mi,"TextPath");class vi extends qt{constructor(t,e=t){super(G("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,H)}}A({Container:{use:K((function(t,e){return this.put(new vi).use(t,e)}))}}),q(vi,"Use");const yi=B;Q([si,ri,de,ce,be],C("viewbox")),Q([xe,je,Ge,We],C("marker")),Q(oi,C("Text")),Q(We,C("Path")),Q(Ut,C("Defs")),Q([oi,li],C("Tspan")),Q([Ve,se,he,Qe],C("radius")),Q(Rt,C("EventTarget")),Q(Bt,C("Dom")),Q(Gt,C("Element")),Q(qt,C("Shape")),Q([Vt,re],C("Container")),Q(he,C("Gradient")),Q(Qe,C("Runner")),Ct.extend([...new Set(k)]),function(t=[]){Ne.push(...[].concat(t))}([_t,xt,kt,vt,Dt,ge,Ee,bt]),Q(Ne,{to(t){return(new He).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,i,a,s){return this.fromArray(t.map((function(t,r){return a.step(t,e[r],i,s[r],s)})))}});class wi extends Gt{constructor(t){super(G("filter",t),t),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(t,e){return!(t=super.put(t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return Lt('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class ki extends Gt{constructor(t,e){super(t,e),this.result(this.id())}in(t){if(null==t){const t=this.attr("in");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in",t)}result(t){return this.attr("result",t)}toString(){return this.result()}}const Ai=t=>function(...e){for(let i=t.length;i--;)null!=e[i]&&this.attr(t[i],e[i])},Ci={blend:Ai(["in","in2","mode"]),colorMatrix:Ai(["type","values"]),composite:Ai(["in","in2","operator"]),convolveMatrix:function(t){t=new Dt(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Ai(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Ai(["in","dx","dy","stdDeviation"]),flood:Ai(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,H)},morphology:Ai(["operator","radius"]),offset:Ai(["dx","dy"]),specularLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Ai([]),turbulence:Ai(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((t=>{const e=P(t),i=Ci[t];wi[e+"Effect"]=class extends ki{constructor(t){super(G("fe"+e,t),t)}update(t){return i.apply(this,t),this}},wi.prototype[t]=K((function(t,...i){const a=new wi[e+"Effect"];return null==t?this.put(a):("function"==typeof t?t.call(a,a):i.unshift(t),this.put(a).update(i))}))})),Q(wi,{merge(t){const e=this.put(new wi.MergeEffect);if("function"==typeof t)return t.call(e,e),e;return(t instanceof Array?t:[...arguments]).forEach((t=>{t instanceof wi.MergeNode?e.put(t):e.mergeNode(t)})),e},componentTransfer(t={}){const e=this.put(new wi.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;if(!(t.r||t.g||t.b||t.a)){t={r:t,g:t,b:t,a:t}}for(const i in t)e.add(new(wi["Func"+i.toUpperCase()])(t[i]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((t=>{const e=P(t);wi[e]=class extends ki{constructor(t){super(G("fe"+e,t),t)}}}));["funcR","funcG","funcB","funcA"].forEach((function(t){const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.ComponentTransferEffect.prototype[t]=i}));["distantLight","pointLight","spotLight"].forEach((t=>{const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.DiffuseLightingEffect.prototype[t]=i,wi.SpecularLightingEffect.prototype[t]=i})),Q(wi.MergeEffect,{mergeNode(t){return this.put(new wi.MergeNode).attr("in",t)}}),Q(Ut,{filter:function(t){const e=this.put(new wi);return"function"==typeof t&&t.call(e,e),e}}),Q(Vt,{filter:function(t){return this.defs().filter(t)}}),Q(Gt,{filterWith:function(t){const e=t instanceof wi?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const Si={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,i,a){return this.parent()&&this.parent().diffuseLighting(t,i,a).in(this)},displacementMap:function(t,e,i,a){return this.parent()&&this.parent().displacementMap(this,t,e,i,a)},dropShadow:function(t,e,i){return this.parent()&&this.parent().dropShadow(this,t,e,i).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){return t=t instanceof Array?t:[...t],this.parent()&&this.parent().merge(this,...t)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,i,a,s){return this.parent()&&this.parent().specularLighting(t,i,a,s).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,a,s){return this.parent()&&this.parent().turbulence(t,e,i,a,s).in(this)}};Q(ki,Si),Q(wi.MergeEffect,{in:function(t){return t instanceof wi.MergeNode?this.add(t,0):this.add((new wi.MergeNode).in(t),0),this}}),Q([wi.CompositeEffect,wi.BlendEffect,wi.DisplacementMapEffect],{in2:function(t){if(null==t){const t=this.attr("in2");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in2",t)}}),wi.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var Li=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getDefaultFilter",value:function(t,e){var i=this.w;t.unfilter(!0),(new wi).size("120%","180%","-5%","-40%"),i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"applyFilter",value:function(t,e,i){var a,s=this,r=this.w;if(t.unfilter(!0),"none"!==i){var n,o,l=r.config.chart.dropShadow,h="lighten"===i?2:.3;if(t.filterWith((function(t){t.colorMatrix({type:"matrix",values:"\n ".concat(h," 0 0 0 0\n 0 ").concat(h," 0 0 0\n 0 0 ").concat(h," 0 0\n 0 0 0 1 0\n "),in:"SourceGraphic",result:"brightness"}),l.enabled&&s.addShadow(t,e,l,"brightness")})),!l.noUserSpaceOnUse)null===(n=t.filterer())||void 0===n||null===(o=n.node)||void 0===o||o.setAttribute("filterUnits","userSpaceOnUse");this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node)}else this.getDefaultFilter(t,e)}},{key:"addShadow",value:function(t,e,i,a){var s,r=this.w,n=i.blur,o=i.top,l=i.left,h=i.color,c=i.opacity;if(h=Array.isArray(h)?h[e]:h,(null===(s=r.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:a,dx:l,dy:o,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:n,result:"blur"}),t.flood({"flood-color":h,"flood-opacity":c,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",a])}},{key:"dropShadow",value:function(t,e){var i,a,s,r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.w;if(t.unfilter(!0),v.isMsEdge()&&"radialBar"===o.config.chart.type)return t;if((null===(i=o.config.chart.dropShadow.enabledOnSeries)||void 0===i?void 0:i.length)>0&&-1===(null===(s=o.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.indexOf(n)))return t;return t.filterWith((function(t){r.addShadow(t,n,e,"SourceGraphic")})),e.noUserSpaceOnUse||t.filterer().node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node),t}},{key:"setSelectionFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;"none"!==s&&this.applyFilter(t,e,s.type)}}},{key:"_scaleFilterSize",value:function(t){if(t){!function(e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}}]),t}(),Mi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"roundPathCorners",value:function(t,e){function i(t,e,i){var s=e.x-t.x,r=e.y-t.y,n=Math.sqrt(s*s+r*r);return a(t,e,Math.min(1,i/n))}function a(t,e,i){return{x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}}function s(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function r(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var n=t.split(/[,\s]/).reduce((function(t,e){var i=e.match("([a-zA-Z])(.+)");return i?(t.push(i[1]),t.push(i[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),o=[];if(n.length>1){var l=r(n[0]),h=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(h=["L",l.x,l.y],n[n.length-1]=h),o.push(n[0]);for(var c=1;c2&&"L"==u[0]&&g.length>2&&"L"==g[0]){var p,f,x=r(d),b=r(u),m=r(g);p=i(b,x,e),f=i(b,m,e),s(u,p),u.origPoint=b,o.push(u);var v=a(p,b,.5),y=a(b,f,.5),w=["C",v.x,v.y,y.x,y.y,f.x,f.y];w.origPoint=b,o.push(w)}else o.push(u)}if(h){var k=r(o[o.length-1]);o.push(["Z"]),s(o[0],k)}}else o=n;return o.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":n,"stroke-linecap":o})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,c=this.w.globals.dom.Paper.rect();return c.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":h}),c.node.setAttribute("fill",r),c}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:a,stroke:e,"stroke-width":i})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var i=this.w.globals.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,s=void 0===a?"#a8a8a8":a,r=t.strokeWidth,n=void 0===r?1:r,o=t.fill,l=t.fillOpacity,h=void 0===l?1:l,c=t.strokeOpacity,d=void 0===c?1:c,u=t.classes,g=t.strokeLinecap,p=void 0===g?null:g,f=t.strokeDashArray,x=void 0===f?0:f,b=this.w;return null===p&&(p=b.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(b.globals.gridHeight)),b.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":h,stroke:s,"stroke-opacity":d,"stroke-linecap":p,"stroke-width":n,"stroke-dasharray":x,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){var i=["M",t,e].join(" ");return i}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=[" L",t,e].join(" "):"H"===i?a=[" H",t].join(" "):"V"===i&&(a=[" V",e].join(" ")),a}},{key:"curve",value:function(t,e,i,a,s,r){var n=["C",t,e,i,a,s,r].join(" ");return n}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,s,r,n){var o="A";arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(o="a");var l=[o,t,e,i,a,s,r,n].join(" ");return l}},{key:"renderPaths",value:function(t){var e,i=t.j,a=t.realIndex,s=t.pathFrom,r=t.pathTo,n=t.stroke,o=t.strokeWidth,l=t.strokeLinecap,h=t.fill,c=t.animationDelay,d=t.initialSpeed,g=t.dataChangeSpeed,p=t.className,f=t.chartType,x=t.shouldClipToGrid,b=void 0===x||x,m=t.bindEventsOnPaths,v=void 0===m||m,w=t.drawShadow,k=void 0===w||w,A=this.w,C=new Li(this.ctx),S=new y(this.ctx),L=this.w.config.chart.animations.enabled,M=L&&this.w.config.chart.animations.dynamicAnimation.enabled,P=!!(L&&!A.globals.resized||M&&A.globals.dataChanged&&A.globals.shouldAnimate);P?e=s:(e=r,A.globals.animationEnded=!0);var I=A.config.stroke.dashArray,T=0;T=Array.isArray(I)?I[a]:A.config.stroke.dashArray;var z=this.drawPath({d:e,stroke:n,strokeWidth:o,fill:h,fillOpacity:1,classes:p,strokeLinecap:l,strokeDashArray:T});z.attr("index",a),b&&("bar"===f&&!A.globals.isHorizontal||A.globals.comboCharts?z.attr({"clip-path":"url(#gridRectBarMask".concat(A.globals.cuid,")")}):z.attr({"clip-path":"url(#gridRectMask".concat(A.globals.cuid,")")})),A.config.chart.dropShadow.enabled&&k&&C.dropShadow(z,A.config.chart.dropShadow,a),v&&(z.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,z)),z.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,z)),z.node.addEventListener("mousedown",this.pathMouseDown.bind(this,z))),z.attr({pathTo:r,pathFrom:s});var X={el:z,j:i,realIndex:a,pathFrom:s,pathTo:r,fill:h,strokeWidth:o,delay:c};return!L||A.globals.resized||A.globals.dataChanged?!A.globals.resized&&A.globals.dataChanged||S.showDelayedElements():S.animatePathsGradually(u(u({},X),{},{speed:d})),A.globals.dataChanged&&M&&P&&S.animatePathsGradually(u(u({},X),{},{speed:g})),z}},{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,i,(function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:a,width:s+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:a,width:s}):"squares"===t?r.rect(e,i).fill("none").stroke({color:a,width:s}):"circles"===t&&r.circle(e).fill("none").stroke({color:a,width:s})}))}},{key:"drawGradient",value:function(t,e,i,a,s){var r,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,c=this.w;e.length<9&&0===e.indexOf("#")&&(e=v.hexToRgba(e,a)),i.length<9&&0===i.indexOf("#")&&(i=v.hexToRgba(i,s));var d=0,u=1,g=1,p=null;null!==o&&(d=void 0!==o[0]?o[0]/100:0,u=void 0!==o[1]?o[1]/100:1,g=void 0!==o[2]?o[2]/100:1,p=void 0!==o[3]?o[3]/100:null);var f=!("donut"!==c.config.chart.type&&"pie"!==c.config.chart.type&&"polarArea"!==c.config.chart.type&&"bubble"!==c.config.chart.type);if(r=l&&0!==l.length?c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){(Array.isArray(l[h])?l[h]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){t.stop(d,e,a),t.stop(u,i,s),t.stop(g,i,s),null!==p&&t.stop(p,e,a)})),f){var x=c.globals.gridWidth/2,b=c.globals.gridHeight/2;"bubble"!==c.config.chart.type?r.attr({gradientUnits:"userSpaceOnUse",cx:x,cy:b,r:n}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?r.from(0,0).to(0,1):"diagonal"===t?r.from(0,0).to(1,1):"horizontal"===t?r.from(0,1).to(1,1):"diagonal2"===t&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,i=t.maxWidth,a=t.fontSize,s=t.fontFamily,r=this.getTextRects(e,a,s),n=r.width/e.length,o=Math.floor(i/n);return i-1){var o=i.globals.selectedDataPoints[s].indexOf(r);i.globals.selectedDataPoints[s].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),h=i.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),c=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),a.getDefaultFilter(t,s)}))};c(l),c(h)}t.node.setAttribute("selected","true"),n="true",void 0===i.globals.selectedDataPoints[s]&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(r)}if("true"===n){var d=i.config.states.active.filter;if("none"!==d)a.applyFilter(t,s,d.type);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}}else if("none"!==i.config.states.active.filter.type)if("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice)a.getDefaultFilter(t,s);else{u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,a){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w,n=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),r.globals.dom.Paper.add(n);var o=n.bbox();return s||(o=n.node.getBoundingClientRect()),n.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i/1.1)return void(t.textContent=e.substring(0,a)+"...");t.textContent="."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}(),Pi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getStackedSeriesTotals",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,i=[];if(0===e.globals.series.length)return i;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,i=[];return e.globals.seriesGroups.forEach((function(a){var s=[];e.config.series.forEach((function(t,i){a.indexOf(e.globals.seriesNames[i])>-1&&s.push(i)}));var r=e.globals.series.map((function(t,e){return-1===s.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));i.push(t.getStackedSeriesTotals(r))})),i}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,i=[],a=[],s=[],r=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){s.push(e),a.push(null)})),e.yaxis.forEach((function(t,e){i[e]=[]}));var n=[];e.yaxis.forEach((function(t,a){var o=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,n){if(e.name===t){var l=n;a===n||r?!r||s.indexOf(n)>-1?i[a].push([a,n]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[n].push([n,a]),l=a),o=!0,-1!==(l=s.indexOf(l))&&s.splice(l,1)}}))}))}o||n.push(a)})),i=i.map((function(t,e){var i=[];return t.forEach((function(t){a[t[1]]=t[0],i.push(t[1])})),i}));for(var o=e.yaxis.length-1,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,i){return t===i[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map((function(t,i){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),i}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var i=0;if(Array.isArray(t))for(var a=0;at&&i.globals.seriesX[s][n]0){var g=function(t,e){var i=s.config.yaxis[s.globals.seriesYAxisReverseMap[e]],r=t<0?-1:1;return t=Math.abs(t),i.logarithmic&&(t=a.getBaseLog(i.logBase,t)),-r*t/n[e]};if(r.isMultipleYAxis){l=[];for(var p=0;p0&&e.forEach((function(e){var n=[],o=[];t.i.forEach((function(i,a){s.config.series[i].group===e&&(n.push(t.series[a]),o.push(i))})),n.length>0&&r.push(a.draw(n,i,o))})),r}}],[{key:"checkComboSeries",value:function(t,e){var i=!1,a=0,s=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||a++,void 0!==t.type&&t.type!==e&&s++})),s>0&&(i=!0),{comboBarCount:a,comboCharts:i}}},{key:"extendArrayProps",value:function(t,e,i){var a,s,r,n,o,l;(null!==(a=e)&&void 0!==a&&a.yaxis&&(e=t.extendYAxis(e,i)),null!==(s=e)&&void 0!==s&&s.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(r=e)&&void 0!==r&&null!==(n=r.annotations)&&void 0!==n&&n.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(l=o.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e)));return e}}]),t}(),Ii=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e}return s(t,[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===t.label.orientation){var a=null!==e?e:0,s=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(null!==s){var r=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-r.height+4);var n="top"===t.label.position?r.width:-r.width;s.setAttribute("y",parseFloat(s.getAttribute("y"))+n);var o=this.annoCtx.graphics.rotateAroundCenter(s),l=o.x,h=o.y;s.setAttribute("transform","rotate(-90 ".concat(l," ").concat(h,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=t.getBoundingClientRect(),r=e.label.style.padding,n=r.left,o=r.right,l=r.top,h=r.bottom;if("vertical"===e.label.orientation){var c=[n,o,l,h];l=c[0],h=c[1],n=c[2],o=c[3]}var d=s.left-a.left-n,u=s.top-a.top-l,g=this.annoCtx.graphics.drawRect(d-i.globals.barPadForNumericAxis,u,s.width+n+o,s.height+l+h,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&g.node.classList.add(e.id),g}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,a,s){var r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(a,"']"));if(r){var n=r.parentNode,o=t.addBackgroundToAnno(r,i);o&&(n.insertBefore(o.node,r),i.label.mouseEnter&&o.node.addEventListener("mouseenter",i.label.mouseEnter.bind(t,i)),i.label.mouseLeave&&o.node.addEventListener("mouseleave",i.label.mouseLeave.bind(t,i)),i.label.click&&o.node.addEventListener("click",i.label.click.bind(t,i)))}};e.config.annotations.xaxis.forEach((function(t,e){return i(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return i(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return i(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var i,a=this.w,s="y1"===t?e.y:e.y2,r=!1;if(this.annoCtx.invertAxis){var n=a.config.xaxis.convertedCatToNumeric?a.globals.categoryLabels:a.globals.labels,o=n.indexOf(s),l=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(o+1,")"));i=l?parseFloat(l.getAttribute("y")):(a.globals.gridHeight/n.length-1)*(o+1)-a.globals.barHeight,void 0!==e.seriesIndex&&a.globals.barHeight&&(i-=a.globals.barHeight/2*(a.globals.series.length-1)-a.globals.barHeight*e.seriesIndex)}else{var h,c=a.globals.seriesYAxisMap[e.yAxisIndex][0],d=a.config.yaxis[e.yAxisIndex].logarithmic?new Pi(this.annoCtx.ctx).getLogVal(a.config.yaxis[e.yAxisIndex].logBase,s,c)/a.globals.yLogRatio[c]:(s-a.globals.minYArr[c])/(a.globals.yRange[c]/a.globals.gridHeight);i=a.globals.gridHeight-Math.min(Math.max(d,0),a.globals.gridHeight),r=d>a.globals.gridHeight||d<0,!e.marker||void 0!==e.y&&null!==e.y||(i=0),null!==(h=a.config.yaxis[e.yAxisIndex])&&void 0!==h&&h.reversed&&(i=d)}return"string"==typeof s&&s.includes("px")&&(i=parseFloat(s)),{yP:i,clipped:r}}},{key:"getX1X2",value:function(t,e){var i=this.w,a="x1"===t?e.x:e.x2,s=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,r=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,n=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,o=!1,l=this.annoCtx.inversedReversedAxis?(r-a)/(n/i.globals.gridWidth):(a-s)/(n/i.globals.gridWidth);return"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||i.config.chart.sparkline.enabled||(l=this.getStringX(a)),"string"==typeof a&&a.includes("px")&&(l=parseFloat(a)),null==a&&e.marker&&(l=i.globals.gridWidth),void 0!==e.seriesIndex&&i.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=i.globals.barWidth/2*(i.globals.series.length-1)-i.globals.barWidth*e.seriesIndex),l>i.globals.gridWidth?(l=i.globals.gridWidth,o=!0):l<0&&(l=0,o=!0),{x:l,clipped:o}}},{key:"getStringX",value:function(t){var e=this.w,i=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var a=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),s=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(a+1,")"));return s&&(i=parseFloat(s.getAttribute("x"))),i}}]),t}(),Ti=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addXaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=this.helpers.getX1X2("x1",t),n=r.x,o=r.clipped,l=!0,h=t.label.text,c=t.strokeDashArray;if(v.isNumber(n)){if(null===t.x2||void 0===t.x2){if(!o){var d=this.annoCtx.graphics.drawLine(n+t.offsetX,0+t.offsetY,n+t.offsetX,s.globals.gridHeight+t.offsetY,t.borderColor,c,t.borderWidth);e.appendChild(d.node),t.id&&d.node.classList.add(t.id)}}else{var u=this.helpers.getX1X2("x2",t);if(a=u.x,l=u.clipped,!o||!l){if(a12?u-12:0===u?12:u;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(g))).replace(/(^|[^\\])h/g,"$1"+g);var p=a?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var x=a?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);var b=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var m=u<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));var v=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var y=-t.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){var k=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(k)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var A=(a?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(n[0],"g"),n[A])).replace(new RegExp(o[0],"g"),o[A])).replace(new RegExp(s[0],"g"),s[c])).replace(new RegExp(r[0],"g"),r[c])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var a=this.w;void 0!==a.config.xaxis.min&&(t=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(e=a.config.xaxis.max);var s=this.getDate(t),r=this.getDate(e),n=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=v.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),Xi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return s(t,[{key:"xLabelFormat",value:function(t,e,i,a){var s=this.w;if("datetime"===s.config.xaxis.type&&void 0===s.config.xaxis.labels.formatter&&void 0===s.config.tooltip.x.formatter){var r=new zi(this.ctx);return r.formatDate(r.getDate(e),s.config.tooltip.x.format)}return t(e,i,a)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,i){var a=this.w;if(v.isNumber(t))if(0!==a.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:a.globals.yValueDecimal);else{var s=t.toFixed(0);t=t==s?s:t.toFixed(1)}return t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(v.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(v.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var i=e.globals.maxX-e.globals.minX;return i>0&&i<100?t.toFixed(1):t.toFixed(0)}if(e.globals.isBarHorizontal)if(e.globals.maxY-e.globals.minYArr<4)return t.toFixed(1);return t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,a){void 0!==i.labels.formatter?e.globals.yLabelFormatters[a]=i.labels.formatter:e.globals.yLabelFormatters[a]=function(s){return e.globals.xyCharts?Array.isArray(s)?s.map((function(e){return t.defaultYFormatter(e,i,a)})):t.defaultYFormatter(s,i,a):s}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),Ri=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getLabel",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",n=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,l=void 0===t[a]?"":t[a],h=l,c=o.globals.xLabelFormatter,d=o.config.xaxis.labels.formatter,u=!1,g=new Xi(this.ctx),p=l;n&&(h=g.xLabelFormat(c,l,p,{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o}),void 0!==d&&(h=d(l,t[a],{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o})));var f,x;e.length>0?(f=e[a].unit,x=null,e.forEach((function(t){"month"===t.unit?x="year":"day"===t.unit?x="month":"hour"===t.unit?x="day":"minute"===t.unit&&(x="hour")})),u=x===f,i=e[a].position,h=e[a].value):"datetime"===o.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var b=new Mi(this.ctx),m={};m=o.globals.rotateXLabels&&n?b.getTextRects(h,parseInt(r,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):b.getTextRects(h,parseInt(r,10));var v=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||s.indexOf(h)>=0&&v)&&(h=""),{x:i,text:h,textRect:m,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var a=this.w,s=a.config.xaxis.tickAmount;return"dataPoints"===s&&(s=Math.round(a.globals.gridWidth/120)),s>i||t%Math.round(i/(s+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,a,s){var r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=s[s.length-1];e.xa.length||a.some((function(t){return Array.isArray(t.seriesName)}))?t:i.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,i=e.config.yaxis[t];if(!i.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!i.showForNullSeries){var a=e.globals.seriesYAxisMap[t],s=new Pi(this.ctx);return a.every((function(t){return s.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,i,a,s,r,n){var o=this.w,l=new Mi(this.ctx),h=o.globals.translateY+o.config.yaxis[s].labels.offsetY;if(o.globals.isBarHorizontal?h=0:"heatmap"===o.config.chart.type&&(h+=r/2),a.show&&e>0){!0===o.config.yaxis[s].opposite&&(t+=a.width);for(var c=e;c>=0;c--){var d=l.drawLine(t+i.offsetX-a.width+a.offsetX,h+a.offsetY,t+i.offsetX+a.offsetX,h+a.offsetY,a.color);n.add(d),h+=r}}}}]),t}(),Ei=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx),this.axesUtils=new Ri(this.annoCtx)}return s(t,[{key:"addYaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=t.strokeDashArray,n=this.helpers.getY1Y2("y1",t),o=n.yP,l=n.clipped,h=!0,c=!1,d=t.label.text;if(null===t.y2||void 0===t.y2){if(!l){c=!0;var u=this.annoCtx.graphics.drawLine(0+t.offsetX,o+t.offsetY,this._getYAxisAnnotationWidth(t),o+t.offsetY,t.borderColor,r,t.borderWidth);e.appendChild(u.node),t.id&&u.node.classList.add(t.id)}}else{if(a=(n=this.helpers.getY1Y2("y2",t)).yP,h=n.clipped,a>o){var g=o;o=a,a=g}if(!l||!h){c=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,a+t.offsetY,this._getYAxisAnnotationWidth(t),o-a,0,t.fillColor,t.opacity,1,t.borderColor,r);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(c){var f="right"===t.label.position?s.globals.gridWidth:"center"===t.label.position?s.globals.gridWidth/2:0,x=this.annoCtx.graphics.drawText({x:f+t.label.offsetX,y:(null!=a?a:o)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});x.attr({rel:i}),e.appendChild(x.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;e.globals.gridWidth;return(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,a){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,i.node,a)})),i}}]),t}(),Yi=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addPointAnnotation",value:function(t,e,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",t),s=a.x,r=a.clipped,n=(a=this.helpers.getY1Y2("y1",t)).yP,o=a.clipped;if(v.isNumber(s)&&!o&&!r){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},h=this.annoCtx.graphics.drawMarker(s+t.marker.offsetX,n+t.marker.offsetY,l);e.appendChild(h.node);var c=t.label.text?t.label.text:"",d=this.annoCtx.graphics.drawText({x:s+t.label.offsetX,y:n+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:c,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(d.attr({rel:i}),e.appendChild(d.node),t.customSVG.SVG){var u=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});u.attr({transform:"translate(".concat(s+t.customSVG.offsetX,", ").concat(n+t.customSVG.offsetY,")")}),u.node.innerHTML=t.customSVG.SVG,e.appendChild(u.node)}if(t.image.path){var g=t.image.width?t.image.width:20,p=t.image.height?t.image.height:20;h=this.annoCtx.addImage({x:s+t.image.offsetX-g/2,y:n+t.image.offsetY-p/2,width:g,height:p,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&h.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&h.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&h.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,a){t.addPointAnnotation(e,i.node,a)})),i}}]),t}();var Hi={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},Oi=function(){function t(){i(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return s(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[Hi],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),Fi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.graphics=new Mi(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Ii(this),this.xAxisAnnotations=new Ti(this),this.yAxisAnnotations=new Ei(this),this.pointsAnnotations=new Yi(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return s(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=t.config.chart.animations.enabled,r=[e,i,a],n=[i.node,e.node,a.node],o=0;o<3;o++)t.globals.dom.elGraphical.add(r[o]),!s||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&n[o].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:n[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,a=t.y,s=t.text,r=t.textAnchor,n=t.foreColor,o=t.fontSize,l=t.fontFamily,h=t.fontWeight,c=t.cssClass,d=t.backgroundColor,u=t.borderWidth,g=t.strokeDashArray,p=t.borderRadius,f=t.borderColor,x=t.appendTo,b=void 0===x?".apexcharts-svg":x,m=t.paddingLeft,v=void 0===m?4:m,y=t.paddingRight,w=void 0===y?4:y,k=t.paddingBottom,A=void 0===k?2:k,C=t.paddingTop,S=void 0===C?2:C,L=this.w,M=this.graphics.drawText({x:i,y:a,text:s,textAnchor:r||"start",fontSize:o||"12px",fontWeight:h||"regular",fontFamily:l||L.config.chart.fontFamily,foreColor:n||L.config.chart.foreColor,cssClass:c}),P=L.globals.dom.baseEl.querySelector(b);P&&P.appendChild(M.node);var I=M.bbox();if(s){var T=this.graphics.drawRect(I.x-v,I.y-S,I.width+v+w,I.height+A+S,p,d||"transparent",1,u,f,g);P.insertBefore(T.node,M.node)}}},{key:"addImage",value:function(t,e){var i=this.w,a=t.path,s=t.x,r=void 0===s?0:s,n=t.y,o=void 0===n?0:n,l=t.width,h=void 0===l?20:l,c=t.height,d=void 0===c?20:c,u=t.appendTo,g=void 0===u?".apexcharts-svg":u,p=i.globals.dom.Paper.image(a);p.size(h,d).move(r,o);var f=i.globals.dom.baseEl.querySelector(g);return f&&f.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,a=t.context,s=t.type,r=t.contextMethod,n=a,o=n.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),h=l.childNodes.length+1,c=new Oi,d=Object.assign({},"xaxis"===s?c.xAxisAnnotation:"yaxis"===s?c.yAxisAnnotation:c.pointAnnotation),u=v.extend(d,e);switch(s){case"xaxis":this.addXaxisAnnotation(u,l,h);break;case"yaxis":this.addYaxisAnnotation(u,l,h);break;case"point":this.addPointAnnotation(u,l,h)}var g=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(h,"']")),p=this.helpers.addBackgroundToAnno(g,u);return p&&l.insertBefore(p.node,g),i&&o.globals.memory.methodsToExec.push({context:n,id:u.id?u.id:v.randomId(),method:r,label:"addAnnotation",params:e}),a}},{key:"clearAnnotations",value:function(t){for(var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),a=e.globals.memory.methodsToExec.length-1;a>=0;a--)"addText"!==e.globals.memory.methodsToExec[a].label&&"addAnnotation"!==e.globals.memory.methodsToExec[a].label||e.globals.memory.methodsToExec.splice(a,1);i=v.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(e));a&&(i.globals.memory.methodsToExec.map((function(t,a){t.id===e&&i.globals.memory.methodsToExec.splice(a,1)})),Array.prototype.forEach.call(a,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),Di=function(t){var e,i=t.isTimeline,a=t.ctx,s=t.seriesIndex,r=t.dataPointIndex,n=t.y1,o=t.y2,l=t.w,h=l.globals.seriesRangeStart[s][r],c=l.globals.seriesRangeEnd[s][r],d=l.globals.labels[r],u=l.config.series[s].name?l.config.series[s].name:"",g=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,f={w:l,seriesIndex:s,dataPointIndex:r,start:h,end:c};("function"==typeof p&&(u=p(u,f)),null!==(e=l.config.series[s].data[r])&&void 0!==e&&e.x&&(d=l.config.series[s].data[r].x),i)||"datetime"===l.config.xaxis.type&&(d=new Xi(a).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(a).formatDate,w:l}));"function"==typeof g&&(d=g(d,f)),Number.isFinite(n)&&Number.isFinite(o)&&(h=n,c=o);var x="",b="",m=l.globals.colors[s];if(void 0===l.config.tooltip.x.formatter)if("datetime"===l.config.xaxis.type){var v=new zi(a);x=v.formatDate(v.getDate(h),l.config.tooltip.x.format),b=v.formatDate(v.getDate(c),l.config.tooltip.x.format)}else x=h,b=c;else x=l.config.tooltip.x.formatter(h),b=l.config.tooltip.x.formatter(c);return{start:h,end:c,startVal:x,endVal:b,ylabel:d,color:m,seriesName:u}},_i=function(t){var e=t.color,i=t.seriesName,a=t.ylabel,s=t.start,r=t.end,n=t.seriesIndex,o=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(n);s=l.yLbFormatter(s),r=l.yLbFormatter(r);var h=l.yLbFormatter(t.w.globals.series[n][o]),c='\n '.concat(s,'\n - \n ').concat(r,"\n ");return'
'+(i||"")+'
'+a+": "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[n].type||"rangeBar"===t.w.config.series[n].type?c:"".concat(h,""):c)+"
"},Ni=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){this.hideYAxis();return v.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var i=e.w.config.series[e.seriesIndex].name;return null!==t?i+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),u(u({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,a=e.dataPointIndex,s=e.w,r=function(){var t=s.globals.seriesRangeStart[i][a];return s.globals.seriesRangeEnd[i][a]-t};return s.globals.comboCharts?"rangeBar"===s.config.series[i].type||"rangeArea"===s.config.series[i].type?r():t:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Di(u(u({},t),{},{isTimeline:!0})),i=e.color,a=e.seriesName,s=e.ylabel,r=e.startVal,n=e.endVal;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t):function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,i;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(i=t.plotOptions.bar)&&void 0!==i&&i.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}}}}},{key:"brush",value:function(t){return v.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return u(u({},t),{},{plotOptions:u(u({},t.plotOptions),{},{bar:u(u({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return v.isNumber(t)?Math.floor(t):t};var a=t.xaxis.labels.formatter,s=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(s=i.map((function(t){return Array.isArray(t)?t:String(t)}))),s&&s.length&&(t.xaxis.labels.formatter=function(t){return v.isNumber(t)?a(s[Math.floor(t)-1]):a(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,i,a,s){var r=t.globals.seriesCandleO[e][i],n=t.globals.seriesCandleH[e][i],o=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],h=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==s?'
\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][i],"\n
"):'
')+"
".concat(a[0],': ')+r+"
"+"
".concat(a[1],': ')+n+"
"+(o?"
".concat(a[2],': ')+o+"
":"")+"
".concat(a[3],': ')+l+"
"+"
".concat(a[4],': ')+h+"
"}}]),t}(),Wi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(t){var e=t.responsiveOverride,i=this.opts,a=new Oi,s=new Ni(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),n={};if(i&&"object"===b(i)){var o,l,h,c,d,u,g,p,f,x,m={};m=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?s[i.chart.type]():s.line(),null!==(o=i.plotOptions)&&void 0!==o&&null!==(l=o.bar)&&void 0!==l&&l.isFunnel&&(m=s.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(m=s.stackedBars()),null!==(h=i.chart.brush)&&void 0!==h&&h.enabled&&(m=s.brush(m)),null!==(c=i.plotOptions)&&void 0!==c&&null!==(d=c.line)&&void 0!==d&&d.isSlopeChart&&(m=s.slope()),i.chart.stacked&&"100%"===i.chart.stackType&&(i=s.stacked100(i)),null!==(u=i.plotOptions)&&void 0!==u&&null!==(g=u.bar)&&void 0!==g&&g.isDumbbell&&(i=s.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},e||(i.xaxis.convertedCatToNumeric=!1),(null!==(p=(i=this.checkForCatToNumericXAxis(this.chartType,m,i)).chart.sparkline)&&void 0!==p&&p.enabled||null!==(f=window.Apex.chart)&&void 0!==f&&null!==(x=f.sparkline)&&void 0!==x&&x.enabled)&&(m=s.sparkline(m)),n=v.extend(r,m)}var y=v.extend(n,window.Apex);return r=v.extend(y,i),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var a,s,r=new Ni(i),n=("bar"===t||"boxPlot"===t)&&(null===(a=i.plotOptions)||void 0===a||null===(s=a.bar)||void 0===s?void 0:s.horizontal),o="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,l="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,h=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return n||o||!l||"between"===h||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new Oi;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=v.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[v.extend(i.yAxis,t.yaxis)]:t.yaxis=v.extendArray(t.yaxis,i.yAxis);var a=!1;t.yaxis.forEach((function(t){t.logarithmic&&(a=!0)}));var s=t.series;return e&&!s&&(s=e.config.series),a&&s.length!==t.yaxis.length&&s.length&&(t.yaxis=s.map((function(e,a){if(e.name||(s[a].name="series-".concat(a+1)),t.yaxis[a])return t.yaxis[a].seriesName=s[a].name,t.yaxis[a];var r=v.extend(i.yAxis,t.yaxis[0]);return r.show=!1,r}))),a&&s.length>1&&s.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.yaxis=v.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.xaxis=v.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new Oi;return t.annotations.points=v.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),Bi=function(){function t(){i(this,t)}return s(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:t.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=v.extend({},t),e.initialSeries=v.clone(t.series),e.lastXAxis=v.clone(e.initialConfig.xaxis),e.lastYAxis=v.clone(e.initialConfig.yaxis),e}}]),t}(),Gi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(){var t=new Wi(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new Bi).init(t)}}}]),t}(),ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return s(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,a=parseInt(e.globals.gridWidth,10),s=parseInt(e.globals.gridHeight,10),r=a>s?a:s,n=t.image,o=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=r+1,l=r):(o=t.width,l=t.height);var h=document.createElementNS(e.globals.SVGNS,"pattern");Mi.setAttrs(h,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var c=document.createElementNS(e.globals.SVGNS,"image");h.appendChild(c),c.setAttributeNS(window.SVG.xlink,"href",n),Mi.setAttrs(c,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),c.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(h)}},{key:"getSeriesIndex",value:function(t){var e=this.w,i=e.config.chart.type;return("bar"===i||"rangeBar"===i)&&e.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var i,a=this.w,s=null,n=null,o=r(t);try{for(o.s();!(i=o.n()).done;){var l=i.value;l>=e.threshold?(null===s||l>s)&&(s=l):(null===n||l-1?x=v.getOpacityFromRGBA(c):m=v.hexToRgba(v.rgb2hex(c),x),t.opacity&&(x=t.opacity),"pattern"===p&&(n=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:n,fillColor:c,fillOpacity:x,defaultColor:m})),b){var y=f(l.fill.gradient.colorStops)||[],w=l.fill.gradient.type;h&&(y[this.seriesIndex]=this.computeColorStops(s.globals.series[this.seriesIndex],l.plotOptions.line.colors),w="vertical"),o=this.handleGradientFill({type:w,fillConfig:t.fillConfig,fillColor:c,fillOpacity:x,colorStops:y,i:this.seriesIndex})}if("image"===p){var k=l.fill.image.src,A=t.patternID?t.patternID:"",C="pattern".concat(s.globals.cuid).concat(t.seriesNumber+1).concat(A);-1===this.patternIDs.indexOf(C)&&(this.clippedImgArea({opacity:x,image:Array.isArray(k)?t.seriesNumber-1&&(p=v.getOpacityFromRGBA(g));var f=void 0===o.gradient.opacityTo?a:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[n]:o.gradient.opacityTo;if(void 0===o.gradient.gradientToColors||0===o.gradient.gradientToColors.length)d="dark"===o.gradient.shade?c.shadeColor(-1*parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i):c.shadeColor(parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i);else if(o.gradient.gradientToColors[l.seriesNumber]){var x=o.gradient.gradientToColors[l.seriesNumber];d=x,x.indexOf("rgba")>-1&&(f=v.getOpacityFromRGBA(x))}else d=i;if(o.gradient.gradientFrom&&(g=o.gradient.gradientFrom),o.gradient.gradientTo&&(d=o.gradient.gradientTo),o.gradient.inverseColors){var b=g;g=d,d=b}return g.indexOf("rgb")>-1&&(g=v.rgb2hex(g)),d.indexOf("rgb")>-1&&(d=v.rgb2hex(d)),h.drawGradient(e,g,d,p,f,l.size,o.gradient.stops,r,n)}}]),t}(),Vi=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],r=this.w,n=e,o=t,l=null,h=new Mi(this.ctx),c=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(o.x))for(var d=0;d0:r.config.markers.size>0)||s||c){p||(f+=" w".concat(v.randomId()));var x=this.getMarkerConfig({cssClass:f,seriesIndex:e,dataPointIndex:g});if(r.config.series[n].data[g]&&(r.config.series[n].data[g].fillColor&&(x.pointFillColor=r.config.series[n].data[g].fillColor),r.config.series[n].data[g].strokeColor&&(x.pointStrokeColor=r.config.series[n].data[g].strokeColor)),void 0!==a&&(x.pSize=a),(o.x[d]<-r.globals.markers.largestSize||o.x[d]>r.globals.gridWidth+r.globals.markers.largestSize||o.y[d]<-r.globals.markers.largestSize||o.y[d]>r.globals.gridHeight+r.globals.markers.largestSize)&&(x.pSize=0),!p)(r.globals.markers.size[e]>0||s||c)&&!l&&(l=h.group({class:s||c?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),(u=h.drawMarker(o.x[d],o.y[d],x)).attr("rel",g),u.attr("j",g),u.attr("index",e),u.node.setAttribute("default-marker-size",x.pSize),new Li(this.ctx).setSelectionFilter(u,e,g),this.addEvents(u),l&&l.add(u)}else void 0===r.globals.pointsArray[e]&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([o.x[d],o.y[d]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,i=t.seriesIndex,a=t.dataPointIndex,s=void 0===a?null:a,r=t.radius,n=void 0===r?null:r,o=t.size,l=void 0===o?null:o,h=t.strokeWidth,c=void 0===h?null:h,d=this.w,u=this.getMarkerStyle(i),g=null===l?d.globals.markers.size[i]:l,p=d.config.markers;return null!==s&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===i&&t.dataPointIndex===s&&(u.pointStrokeColor=t.strokeColor,u.pointFillColor=t.fillColor,g=t.size,u.pointShape=t.shape)})),{pSize:null===n?g:n,pRadius:null!==n?n:p.radius,pointStrokeWidth:null!==c?c:Array.isArray(p.strokeWidth)?p.strokeWidth[i]:p.strokeWidth,pointStrokeColor:u.pointStrokeColor,pointFillColor:u.pointFillColor,shape:u.pointShape||(Array.isArray(p.shape)?p.shape[i]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[i]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[i]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[i]:p.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(t){var e=this.w,i=new Mi(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,a=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[t]:a,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),Ui=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return s(t,[{key:"draw",value:function(t,e,i){var a=this.w,s=new Mi(this.ctx),r=i.realIndex,n=i.pointsPos,o=i.zRatio,l=i.elParent,h=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(h.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(n.x))for(var c=0;cp.maxBubbleRadius&&(g=p.maxBubbleRadius)}var f=n.x[c],x=n.y[c];if(g=g||0,null!==x&&void 0!==a.globals.series[r][d]||(u=!1),u){var b=this.drawPoint(f,x,g,r,d,e);h.add(b)}l.add(h)}}},{key:"drawPoint",value:function(t,e,i,a,s,r){var n=this.w,o=a,l=new y(this.ctx),h=new Li(this.ctx),c=new ji(this.ctx),d=new Vi(this.ctx),u=new Mi(this.ctx),g=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:s,radius:"bubble"===n.config.chart.type||n.globals.comboCharts&&n.config.series[a]&&"bubble"===n.config.series[a].type?i:null}),p=c.fillPath({seriesNumber:a,dataPointIndex:s,color:g.pointFillColor,patternUnits:"objectBoundingBox",value:n.globals.series[a][r]}),f=u.drawMarker(t,e,g);if(n.config.series[o].data[s]&&n.config.series[o].data[s].fillColor&&(p=n.config.series[o].data[s].fillColor),f.attr({fill:p}),n.config.chart.dropShadow.enabled){var x=n.config.chart.dropShadow;h.dropShadow(f,x,a)}if(!this.initialAnim||n.globals.dataChanged||n.globals.resized)n.globals.animationEnded=!0;else{var b=n.config.chart.animations.speed;l.animateMarker(f,b,n.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(f)}),100)}))}return f.attr({rel:s,j:s,index:a,"default-marker-size":g.pSize}),h.setSelectionFilter(f,a,s),d.addEvents(f),f.node.classList.add("apexcharts-marker"),f}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}]),t}(),qi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"dataLabelsCorrection",value:function(t,e,i,a,s,r,n){var o=this.w,l=!1,h=new Mi(this.ctx).getTextRects(i,n),c=h.width,d=h.height;e<0&&(e=0),e>o.globals.gridHeight+d&&(e=o.globals.gridHeight+d/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:t,y:e,width:c,height:d});var u=o.globals.dataLabelsRects[a].length-2,g=void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(void 0!==o.globals.dataLabelsRects[a][u]){var p=o.globals.dataLabelsRects[a][g];(t>p.x+p.width||e>p.y+p.height||e+de.globals.gridWidth+b.textRects.width+30)&&(o="");var m=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(m=e.globals.dataLabels.style.colors[n]),"function"==typeof m&&(m=m({series:e.globals.series,seriesIndex:r,dataPointIndex:n,w:e})),u&&(m=u);var v=d.offsetX,y=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(v=0,y=0),e.globals.isSlopeChart&&(0!==n&&(v=-2*d.offsetX+5),0!==n&&n!==e.config.series[r].data.length-1&&(v=0)),b.drawnextLabel){if((x=i.drawText({width:100,height:parseInt(d.style.fontSize,10),x:a+v,y:s+y,foreColor:m,textAnchor:l||d.textAnchor,text:o,fontSize:h||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"})).attr({class:f||"apexcharts-datalabel",cx:a,cy:s}),d.dropShadow.enabled){var w=d.dropShadow;new Li(this.ctx).dropShadow(x,w)}c.add(x),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(n)}return x}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,a=i.config.dataLabels.background,s=a.padding,r=a.padding/2,n=e.width,o=e.height,l=new Mi(this.ctx).drawRect(e.x-s,e.y-r/2,n+2*s,o+r,a.borderRadius,"transparent"!==i.config.chart.background&&i.config.chart.background?i.config.chart.background:"#fff",a.opacity,a.borderWidth,a.borderColor);a.dropShadow.enabled&&new Li(this.ctx).dropShadow(l,a.dropShadow);return l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,s=v.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,t&&(e&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i-1&&(t[i].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,i=this.getSeriesByName(t),a=parseInt(null==i?void 0:i.getAttribute("data:realIndex"),10),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),r=null,n=null,o=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){r=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),n=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']"));var l=e.globals.seriesYAxisReverseMap[a];o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']"));else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var h=0;h=t.from&&(r0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1)for(var s=i.config.series.map((function(t,a){return t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(a)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(i.config.series[a].type)>-1)?a:-1})),r="asc"===t?0:s.length-1;"asc"===t?r=0;"asc"===t?r++:r--)if(-1!==s[r]){a=s[r];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,a){for(var s=e[i].childNodes,r={type:a,paths:[],realIndex:e[i].getAttribute("data:realIndex")},n=0;n0)for(var a=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),a=[],s=function(t){var e=function(e){return i[t].getAttribute(e)},s={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};a.push({rect:s,color:i[t].getAttribute("color")})},r=0;r0?t:[]}));return t}}]),t}(),$i=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,a=this.w.globals,s="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,r=0;r=5?this.twoDSeries.push(v.parseNumber(t[e].data[r][4])):this.twoDSeries.push(v.parseNumber(t[e].data[r][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var n=new Date(t[e].data[r][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(t[e].data[r][0]);for(var o=0;o-1&&(r=this.activeSeriesIndex);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,r=new zi(i),n=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isRangeBar="rangeBar"===a.chart.type&&s.isBarHorizontal,s.hasXaxisGroups="category"===a.xaxis.type&&a.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=a.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?s.seriesNames.push(t.name):s.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var o=[],l=f(new Set(a.series.map((function(t){return t.group}))));a.series.forEach((function(t,e){var i=l.indexOf(t.group);o[i]||(o[i]=[]),o[i].push(s.seriesNames[e])})),s.seriesGroups=o;for(var h=function(){for(var t=0;t0&&(this.twoDSeriesX=n,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var d=t[c].data.map((function(t){return v.parseNumber(t)}));s.series.push(d)}s.seriesZ.push(this.threeDSeries),void 0!==t[c].color?s.seriesColors.push(t[c].color):s.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var a=0;a0)i.labels=e.xaxis.categories;else if(e.labels.length>0)i.labels=e.labels.slice();else if(this.fallbackToCategory){if(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric)new Ni(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t)}else this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,a=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var s=i.series.map((function(t,e){return t.data.filter((function(t,e,i){return i.findIndex((function(e){return e.x===t.x}))===e}))})),r=s.reduce((function(t,e,i,a){return a[t].length>e.length?t:i}),0),n=0;n0&&s==i.length&&e.push(a)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}]),t}(),Ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),a=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",a*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"getSvgString",value:function(){var t=this;return new Promise((function(e){var i=t.w,a=i.config.chart.toolbar.export.width,s=i.config.chart.toolbar.export.scale||a/i.globals.svgWidth;s||(s=1);var r=t.w.globals.dom.Paper.svg(),n=t.w.globals.dom.Paper.node.cloneNode(!0);1!==s&&t.scaleSvgNode(n,s),t.convertImagesToBase64(n).then((function(){r=(new XMLSerializer).serializeToString(n),e(r.replace(/ /g," "))}))}))}},{key:"convertImagesToBase64",value:function(t){var e=this,i=t.getElementsByTagName("image"),a=Array.from(i).map((function(t){var i=t.getAttributeNS("http://www.w3.org/1999/xlink","href");return i&&!i.startsWith("data:")?e.getBase64FromUrl(i).then((function(e){t.setAttributeNS("http://www.w3.org/1999/xlink","href",e)})).catch((function(t){console.error("Error converting image to base64:",t)})):Promise.resolve()}));return Promise.all(a)}},{key:"getBase64FromUrl",value:function(t){return new Promise((function(e,i){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var t=document.createElement("canvas");t.width=a.width,t.height=a.height,t.getContext("2d").drawImage(a,0,0),e(t.toDataURL())},a.onerror=i,a.src=t}))}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var t=this;return new Promise((function(e){t.cleanup(),t.getSvgString().then((function(t){var i=new Blob([t],{type:"image/svg+xml;charset=utf-8"});e(URL.createObjectURL(i))}))}))}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var a=e.w,s=t?t.scale||t.width/a.globals.svgWidth:1;e.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*s,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var n="transparent"!==a.config.chart.background&&a.config.chart.background?a.config.chart.background:"#fff",o=r.getContext("2d");o.fillStyle=n,o.fillRect(0,0,r.width*s,r.height*s),e.getSvgString().then((function(t){var e="data:image/svg+xml,"+encodeURIComponent(t),a=new Image;a.crossOrigin="anonymous",a.onload=function(){if(o.drawImage(a,0,0),r.msToBlob){var t=r.msToBlob();i({blob:t})}else{var e=r.toDataURL("image/png");i({imgURI:e})}},a.src=e}))}))}},{key:"exportToSVG",value:function(){var t=this;this.svgUrl().then((function(e){t.triggerDownload(e,t.w.config.chart.toolbar.export.svg.filename,".svg")}))}},{key:"exportToPng",value:function(){var t=this,e=this.w.config.chart.toolbar.export.scale,i=this.w.config.chart.toolbar.export.width,a=e?{scale:e}:i?{width:i}:void 0;this.dataURI(a).then((function(e){var i=e.imgURI,a=e.blob;a?navigator.msSaveOrOpenBlob(a,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,a=t.fileName,s=t.columnDelimiter,r=void 0===s?",":s,n=t.lineDelimiter,o=void 0===n?"\n":n,l=this.w;i||(i=l.config.series);var h=[],c=[],d="",u=l.globals.series.map((function(t,e){return-1===l.globals.collapsedSeriesIndices.indexOf(e)?t:[]})),g=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.categoryFormatter?l.config.chart.toolbar.export.csv.categoryFormatter(t):"datetime"===l.config.xaxis.type&&String(t).length>=10?new Date(t).toDateString():v.isNumber(t)?t:t.split(r).join("")},p=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},x=Math.max.apply(Math,f(i.map((function(t){return t.data?t.data.length:0})))),b=new $i(this.ctx),m=new Ri(this.ctx),y=function(t){var i="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var a=l.globals.yLabelFormatters[0],s=new Zi(e.ctx).getActiveConfigSeriesIndex();i=a(l.globals.labels[t],{seriesIndex:s,dataPointIndex:t,w:l})}else i=m.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?i=l.config.xaxis.categories[t]:l.config.labels.length&&(i=l.config.labels[t]))}else i=l.config.labels[t];return null===i?"nullvalue":(Array.isArray(i)&&(i=i.join(" ")),v.isNumber(i)?i:i.split(r).join(""))},w=function(t,e){if(h.length&&0===e&&c.push(h.join(r)),t.data){t.data=t.data.length&&t.data||f(Array(x)).map((function(){return""}));for(var a=0;a0&&!s.globals.isBarHorizontal&&(this.xaxisLabels=s.globals.timescaleLabels.slice()),s.config.xaxis.overwriteCategories&&(this.xaxisLabels=s.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===s.config.xaxis.position?this.offY=0:this.offY=s.globals.gridHeight,this.offY=this.offY+s.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.xaxisBorderWidth=s.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=s.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=s.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=s.config.xaxis.axisBorder.height,this.yaxis=s.config.yaxis[0]}return s(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new Mi(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});i.add(a);for(var s=[],r=0;r6&&void 0!==arguments[6]?arguments[6]:{},h=[],c=[],d=this.w,u=l.xaxisFontSize||this.xaxisFontSize,g=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,f=l.fontWeight||d.config.xaxis.labels.style.fontWeight,x=l.cssClass||d.config.xaxis.labels.style.cssClass,b=d.globals.padHorizontal,m=a.length,v="category"===d.config.xaxis.type?d.globals.dataPoints:m;if(0===v&&m>v&&(v=m),s){var y=v>1?v-1:v;n=d.globals.gridWidth/Math.min(y,m-1),b=b+r(0,n)/2+d.config.xaxis.labels.offsetX}else n=d.globals.gridWidth/v,b=b+r(0,n)+d.config.xaxis.labels.offsetX;for(var w=function(s){var l=b-r(s,n)/2+d.config.xaxis.labels.offsetX;0===s&&1===m&&n/2===b&&1===v&&(l=d.globals.gridWidth/2);var y=o.axesUtils.getLabel(a,d.globals.timescaleLabels,l,s,h,u,t),w=28;d.globals.rotateXLabels&&t&&(w=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(w+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(u)+(d.globals.xAxisLabelsHeight-d.globals.xAxisGroupLabelsHeight)+(d.globals.rotateXLabels?10:0)),y=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(s,y,m):o.axesUtils.checkForOverflowingLabels(s,y,m,h,c);if(d.config.xaxis.labels.show){var k=e.drawText({x:y.x,y:o.offY+d.config.xaxis.labels.offsetY+w-("top"===d.config.xaxis.position?d.globals.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:"middle",fontWeight:y.isBold?600:f,fontSize:u,fontFamily:g,foreColor:Array.isArray(p)?t&&d.config.xaxis.convertedCatToNumeric?p[d.globals.minX+s-1]:p[s]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(i.add(k),k.on("click",(function(t){if("function"==typeof d.config.chart.events.xAxisLabelClick){var e=Object.assign({},d,{labelIndex:s});d.config.chart.events.xAxisLabelClick(t,o.ctx,e)}})),t){var A=document.createElementNS(d.globals.SVGNS,"title");A.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,k.node.appendChild(A),""!==y.text&&(h.push(y.text),c.push(y))}}sa.globals.gridWidth)){var r=this.offY+a.config.xaxis.axisTicks.offsetY;if(e=e+r+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(e=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new Mi(this.ctx).drawLine(t+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,s+a.config.xaxis.axisTicks.offsetX,e+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var s=0;s0){var h=s[s.length-1].getBBox(),c=s[0].getBBox();h.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),c.x+c.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var d=0;d0&&(this.xaxisLabels=a.globals.timescaleLabels.slice())}return s(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new Mi(this.ctx);t||(t=i.group({class:"apexcharts-grid"}));var a=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),s=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(s),t.add(a),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new Mi(this.ctx),a=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,f(t.config.stroke.width)):t.config.stroke.width,s=function(t){var i=document.createElementNS(e.SVGNS,"clipPath");return i.setAttribute("id",t),i};e.dom.elGridRectMask=s("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=s("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=s("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=s("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=s("nonForecastMask".concat(e.cuid));var r=0,n=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),n=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=i.drawRect(-a/2-r-2,-a/2-2,e.gridWidth+a+n+r+4,e.gridHeight+a+4,0,"#fff");var o=t.globals.markers.largestSize;e.dom.elGridRectMarker=i.drawRect(-o,-o,e.gridWidth+2*o,e.gridHeight+2*o,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,a=t.y1,s=t.x2,r=t.y2,n=t.xCount,o=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===n-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:i,y1:a,x2:s,y2:r,xCount:n,parent:o});var h=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var c=l.globals.groups;if(c){for(var d=0,u=0;d0&&"datetime"!==t.config.xaxis.type&&(s=e.yAxisScale[a].result.length-1);this._drawXYLines({xCount:s,tickAmount:r})}else s=r,r=e.xTickAmount,this._drawInvertedXYLines({xCount:s,tickAmount:r});return this.drawGridBands(s,r),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/s}}},{key:"drawGridBands",value:function(t,e){var i,a,s=this,r=this.w;if((null===(i=r.config.grid.row.colors)||void 0===i?void 0:i.length)>0&&function(t,i,a,n,o,l){for(var h=0,c=0;h=r.config.grid[t].colors.length&&(c=0),s._drawGridBandRect({c:c,x1:a,y1:n,x2:o,y2:l,type:t}),n+=r.globals.gridHeight/e}("row",e,0,0,r.globals.gridWidth,r.globals.gridHeight/e),(null===(a=r.config.grid.column.colors)||void 0===a?void 0:a.length)>0){var n=r.globals.isBarHorizontal||"on"!==r.config.xaxis.tickPlacement||"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric?t:t-1;r.globals.isXNumeric&&(n=r.globals.xAxisScale.result.length-1);for(var o=r.globals.padHorizontal,l=r.globals.padHorizontal+r.globals.gridWidth/n,h=r.globals.gridHeight,c=0,d=0;c=r.config.grid.column.colors.length&&(d=0),"datetime"===r.config.xaxis.type)o=this.xaxisLabels[c].position,l=((null===(u=this.xaxisLabels[c+1])||void 0===u?void 0:u.position)||r.globals.gridWidth)-this.xaxisLabels[c].position;this._drawGridBandRect({c:d,x1:o,y1:0,x2:l,y2:h,type:"column"}),o+=r.globals.gridWidth/n}}}}]),t}(),ta=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"niceScale",value:function(t,e){var i,a,s,r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=1e-11,l=this.w,h=l.globals;h.isBarHorizontal?(i=l.config.xaxis,a=Math.max((h.svgWidth-100)/25,2)):(i=l.config.yaxis[n],a=Math.max((h.svgHeight-100)/15,2)),v.isNumber(a)||(a=10),s=void 0!==i.min&&null!==i.min,r=void 0!==i.max&&null!==i.min;var c=void 0!==i.stepSize&&null!==i.stepSize,d=void 0!==i.tickAmount&&null!==i.tickAmount,u=d?i.tickAmount:h.niceScaleDefaultTicks[Math.min(Math.round(a/2),h.niceScaleDefaultTicks.length-1)];if(h.isMultipleYAxis&&!d&&h.multiAxisTickAmount>0&&(u=h.multiAxisTickAmount,d=!0),u="dataPoints"===u?h.dataPoints-1:Math.abs(Math.round(u)),(t===Number.MIN_VALUE&&0===e||!v.isNumber(t)&&!v.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=v.isNumber(i.min)?i.min:0,e=v.isNumber(i.max)?i.max:t+u,h.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var g=e;e=t,t=g}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var p=[];u<1&&(u=1);var f=u,x=Math.abs(e-t);!s&&t>0&&t/x<.15&&(t=0,s=!0),!r&&e<0&&-e/x<.15&&(e=0,r=!0);var b=(x=Math.abs(e-t))/f,m=b,y=Math.floor(Math.log10(m)),w=Math.pow(10,y),k=Math.ceil(m/w);if(b=m=(k=h.niceScaleAllowedMagMsd[0===h.yValueDecimal?0:1][k])*w,h.isBarHorizontal&&i.stepSize&&"datetime"!==i.type?(b=i.stepSize,c=!0):c&&(b=i.stepSize),c&&i.forceNiceScale){var A=Math.floor(Math.log10(b));b*=Math.pow(10,y-A)}if(s&&r){var C=x/f;if(d)if(c)if(0!=v.mod(x,b)){var S=v.getGCD(b,C);b=C/S<10?S:C}else 0==v.mod(b,C)?b=C:(C=b,d=!1);else b=C;else if(c)0==v.mod(x,b)?C=b:b=C;else if(0==v.mod(x,b))C=b;else{C=x/(f=Math.ceil(x/b));var L=v.getGCD(x,b);x/La&&(t=e-b*u,t+=b*Math.floor((M-t)/b))}else if(s)if(d)e=t+b*f;else{var P=e;e=b*Math.ceil(e/b),Math.abs(e-t)/v.getGCD(x,b)>a&&(e=t+b*u,e+=b*Math.ceil((P-e)/b))}}else if(h.isMultipleYAxis&&d){var I=b*Math.floor(t/b),T=I+b*f;T0&&t16&&v.getPrimeFactors(f).length<2&&f++,!d&&i.forceNiceScale&&0===h.yValueDecimal&&f>x&&(f=x,b=Math.round(x/f)),f>a&&(!d&&!c||i.forceNiceScale)){var z=v.getPrimeFactors(f),X=z.length-1,R=f;t:for(var E=0;EN);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,r=Math.abs(e-t),n=[];if(t===e)return{result:n=[t],niceMin:n[0],niceMax:n[n.length-1]};"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,r))&&(i=this.w.globals.dataPoints-1),s||(s=r/i),s=Math.round(10*(s+Number.EPSILON))/10,i===Number.MAX_VALUE&&(i=5,s=1);for(var o=t;i>=0;)n.push(o),o=v.preciseAddition(o,s),i-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,i){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));for(var a=[],s=Math.ceil(Math.log(e)/Math.log(i)+1),r=Math.floor(Math.log(t)/Math.log(i));r5?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase):this.logarithmicScale(e,i,r.logBase)):i!==-Number.MAX_VALUE&&v.isNumber(i)&&e!==Number.MAX_VALUE&&v.isNumber(e)?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.niceScale(e,i,t)):a.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var i=this.w,a=i.globals,s=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&v.isNumber(e)){var r=a.xTickAmount+1;s<10&&s>1&&(r=s),a.xAxisScale=this.linearScale(t,e,r,0,i.config.xaxis.stepSize)}else a.xAxisScale=this.linearScale(0,10,10);return a.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,i=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var a=i.seriesYAxisMap,s=i.minYArr,r=i.maxYArr;i.allSeriesCollapsed=!0,i.barGroups=[],a.forEach((function(a,n){var o=[];a.forEach((function(t){var i=e.series[t].group;o.indexOf(i)<0&&o.push(i)})),a.length>0?function(){var l,h,c=Number.MAX_VALUE,d=-Number.MAX_VALUE,u=c,g=d;if(e.chart.stacked)!function(){var t=new Array(i.dataPoints).fill(0),s=[],r=[],p=[];o.forEach((function(){s.push(t.map((function(){return Number.MIN_VALUE}))),r.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var f=function(t){!l&&e.series[a[t]].type&&(l=e.series[a[t]].type);var c=a[t];h=e.series[c].group?e.series[c].group:"axis-".concat(n),!(i.collapsedSeriesIndices.indexOf(c)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(c)<0)||(i.allSeriesCollapsed=!1,o.forEach((function(t,a){if(e.series[c].group===t)for(var n=0;n=0?r[a][n]+=o:p[a][n]+=o,s[a][n]+=o,u=Math.min(u,o),g=Math.max(g,o)}}))),"bar"!==l&&"column"!==l||i.barGroups.push(h)},x=0;x1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w.config,r=this.w.globals,n=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=t+1);var l=r.series,h=l,c=l;"candlestick"===s.chart.type?(h=r.seriesCandleL,c=r.seriesCandleH):"boxPlot"===s.chart.type?(h=r.seriesCandleO,c=r.seriesCandleC):r.isRangeData&&(h=r.seriesRangeStart,c=r.seriesRangeEnd);var d=!1;if(r.seriesX.length>=a){var u,g=null===(u=r.brushSource)||void 0===u?void 0:u.w.config.chart.brush;(s.chart.zoom.enabled&&s.chart.zoom.autoScaleYaxis||null!=g&&g.enabled&&null!=g&&g.autoScaleYaxis)&&(d=!0)}for(var p=t;px&&r.seriesX[p][b]>s.xaxis.max;b--);}for(var m=x;m<=b&&mh[p][m]&&h[p][m]<0&&(o=h[p][m])}else r.hasNullValues=!0}"bar"!==f&&"column"!==f||(o<0&&n<0&&(n=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,e=Math.min(e,0)))}return"rangeBar"===s.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&(o=e),"bar"===s.chart.type&&(o<0&&n<0&&(n=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:n,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i,a=Number.MAX_VALUE;if(t.isMultipleYAxis){a=Number.MAX_VALUE;for(var s=0;st.dataPoints&&0!==t.dataPoints&&(a=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(a=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var s=t.maxX-t.minX;s<30&&(a=s-1)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var r=[],n=t.minX-1;n0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,a-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var s=e-a[i-1];s>0&&(t.minXDiff=Math.min(s,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var i=e.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map((function(t){return t}))]);var a={},s={};i.forEach((function(i){a[i]=[],s[i]=[],t.w.config.series.map((function(t,a){return i.indexOf(e.seriesNames[a])>-1?a:null})).filter((function(t){return null!==t})).forEach((function(r){for(var n=0;n0?a[i][n]+=parseFloat(e.series[r][n])+1e-4:s[i][n]+=parseFloat(e.series[r][n]))}}))})),Object.entries(a).forEach((function(t){var i=p(t,1)[0];a[i].forEach((function(t,r){e.maxY=Math.max(e.maxY,a[i][r]),e.minY=Math.min(e.minY,s[i][r])}))}))}}}]),t}(),ia=function(){function t(e,a){i(this,t),this.ctx=e,this.elgrid=a,this.w=e.w;var s=this.w;this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.axisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xAxisoffX="bottom"===s.config.xaxis.position?s.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Ri(e)}return s(t,[{key:"drawYaxis",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.yaxis[t].labels.style,s=a.fontSize,r=a.fontFamily,n=a.fontWeight,o=i.group({class:"apexcharts-yaxis",rel:t,transform:"translate(".concat(e.globals.translateYAxisX[t],", 0)")});if(this.axesUtils.isYAxisHidden(t))return o;var l=i.group({class:"apexcharts-yaxis-texts-g"});o.add(l);var h=e.globals.yAxisScale[t].result.length-1,c=e.globals.gridHeight/h,d=e.globals.yLabelFormatters[t],u=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){var g=e.globals.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?g=0:"heatmap"===e.config.chart.type&&(g-=c/2),g+=parseInt(s,10)/3;for(var p=h;p>=0;p--){var f=d(u[p],p,e),x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(x*=-1);var b=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(a.colors,t),y=Array.isArray(m)?m[p]:m,w=v.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),k=i.drawText({x:x,y:g,text:w.includes(f)&&!e.config.yaxis[t].labels.showDuplicates?"":f,textAnchor:b,fontSize:s,fontFamily:r,fontWeight:n,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(a.cssClass)});l.add(k),this.addTooltip(k,f),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(i,k,firstLabel,e.config.yaxis[t].labels.rotate),g+=c}}return this.addYAxisTitle(i,o,t),this.addAxisBorder(i,o,t,h,c),o}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var i=document.createElementNS(this.w.globals.SVGNS,"title");i.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(i)}},{key:"rotateLabel",value:function(t,e,i,a){var s=t.rotateAroundCenter(i.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(a," ").concat(s.x," ").concat(r.y,")"))}},{key:"addYAxisTitle",value:function(t,e,i){var a=this.w;if(void 0!==a.config.yaxis[i].title.text){var s=t.group({class:"apexcharts-yaxis-title"}),r=a.config.yaxis[i].opposite?a.globals.translateYAxisX[i]:0,n=t.drawText({x:r,y:a.globals.gridHeight/2+a.globals.translateY+a.config.yaxis[i].title.offsetY,text:a.config.yaxis[i].title.text,textAnchor:"end",foreColor:a.config.yaxis[i].title.style.color,fontSize:a.config.yaxis[i].title.style.fontSize,fontWeight:a.config.yaxis[i].title.style.fontWeight,fontFamily:a.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(a.config.yaxis[i].title.style.cssClass)});s.add(n),e.add(s)}}},{key:"addAxisBorder",value:function(t,e,i,a,s){var r=this.w,n=r.config.yaxis[i].axisBorder,o=31+n.offsetX;if(r.config.yaxis[i].opposite&&(o=-31-n.offsetX),n.show){var l=t.drawLine(o,r.globals.translateY+n.offsetY-2,o,r.globals.gridHeight+r.globals.translateY+n.offsetY+2,n.color,0,n.width);e.add(l)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,a,n,r.config.yaxis[i].axisTicks,i,s,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});a.add(s);var r=e.globals.yAxisScale[t].result.length-1,n=e.globals.gridWidth/r+.1,o=n+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,h=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),c=e.globals.timescaleLabels;if(c.length>0&&(this.xaxisLabels=c.slice(),r=(h=c.slice()).length),e.config.xaxis.labels.show)for(var d=c.length?0:r;c.length?d=0;c.length?d++:d--){var u=l(h[d],d,e),g=e.globals.gridWidth+e.globals.padHorizontal-(o-n+e.config.xaxis.labels.offsetX);if(c.length){var p=this.axesUtils.getLabel(h,c,g,d,this.drawnLabels,this.xaxisFontSize);g=p.x,u=p.text,this.drawnLabels.push(p.text),0===d&&e.globals.skipFirstTimelinelabel&&(u=""),d===h.length-1&&e.globals.skipLastTimelinelabel&&(u="")}var f=i.drawText({x:g,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:u,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});s.add(f),f.tspan(u),this.addTooltip(f,u),o+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.xaxis.axisBorder;if(a.show){var s=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(s-=15);var r=i.drawLine(e.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new Mi(this.ctx);if(void 0!==e.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});a.add(s),t.add(a)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),r=s?s.getBoundingClientRect():{width:0,height:0},n=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),o=n?n.getBoundingClientRect():{width:0,height:0};if(n){var l=this.xPaddingForYAxisTitle(t,r,o,e);n.setAttribute("x",l.xPos-(e?10:0));var h=a.rotateAroundCenter(n);n.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(h.x," ").concat(h.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var s=this.w,r=0,n=10;return void 0===s.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(a?r=e.width+s.config.yaxis[t].title.offsetX+i.width/2+n/2:(r=-1*e.width+s.config.yaxis[t].title.offsetX+n/2+i.width/2,s.globals.isBarHorizontal&&(n=25,r=-1*e.width-s.config.yaxis[t].title.offsetX-n)),{xPos:r,padd:n})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,a=0,s=0,r=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach((function(o,l){var h=i.globals.ignoreYAxisIndexes.includes(l)||!o.show||o.floating||0===t[l].width,c=t[l].width+e[l].width;o.opposite?i.globals.isBarHorizontal?(s=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=s-o.labels.offsetX):(s=i.globals.gridWidth+i.globals.translateX+n,h||(n+=c+20),i.globals.translateYAxisX[l]=s-o.labels.offsetX+20):(a=i.globals.translateX-r,h||(r+=c+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;v.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,i){var a=t.config.yaxis[i];if(a&&!a.floating&&void 0!==a.labels.align){var s=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=v.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"))),n=s.getBoundingClientRect();r.forEach((function(t){t.setAttribute("text-anchor",a.labels.align)})),"left"!==a.labels.align||a.opposite?"center"===a.labels.align?s.setAttribute("transform","translate(".concat(n.width/2*(a.opposite?1:-1),", 0)")):"right"===a.labels.align&&a.opposite&&s.setAttribute("transform","translate(".concat(n.width,", 0)")):s.setAttribute("transform","translate(-".concat(n.width,", 0)"))}}))}}]),t}(),aa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.documentEvent=v.bind(this.documentEvent,this)}return s(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var a=i.globals.events[t].indexOf(e);-1!==a&&i.globals.events[t].splice(a,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var a=i.globals.events[t],s=a.length,r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=v.extend(Hi,i);this.w.globals.locale=a.options}}]),t}(),ra=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawAxis",value:function(t,e){var i,a,s=this,r=this.w.globals,n=this.w.config,o=new Qi(this.ctx,e),l=new ia(this.ctx,e);r.axisCharts&&"radar"!==t&&(r.isBarHorizontal?(a=l.drawYaxisInversed(0),i=o.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(a)):(i=o.drawXaxis(),r.dom.elGraphical.add(i),n.yaxis.map((function(t,e){if(-1===r.ignoreYAxisIndexes.indexOf(e)&&(a=l.drawYaxis(e),r.dom.Paper.add(a),"back"===s.w.config.grid.position)){var i=r.dom.Paper.children()[1];i.remove(),r.dom.Paper.add(i)}}))))}}]),t}(),na=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Li(this.ctx),a=t.config.xaxis.crosshairs.fill.gradient,s=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,n=a.colorFrom,o=a.colorTo,l=a.opacityFrom,h=a.opacityTo,c=a.stops,d=s.enabled,u=s.left,g=s.top,p=s.blur,f=s.color,x=s.opacity,b=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(b=e.drawGradient("vertical",n,o,l,h,null,c,null));var m=e.drawRect();1===t.config.xaxis.crosshairs.width&&(m=e.drawLine());var y=t.globals.gridHeight;(!v.isNumber(y)||y<0)&&(y=0);var w=t.config.xaxis.crosshairs.width;(!v.isNumber(w)||w<0)&&(w=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:w,height:y,fill:b,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),d&&(m=i.dropShadow(m,{left:u,top:g,blur:p,color:f,opacity:x})),t.globals.dom.elGraphical.add(m)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var s=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(s)}var r=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(r)}}]),t}(),oa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,a=i.config;if(0!==a.responsive.length){var s=a.responsive.slice();s.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var r=new Wi({}),n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=s[0].breakpoint,n=window.innerWidth>0?window.innerWidth:screen.width;if(n>a){var o=v.clone(i.globals.initialConfig);o.series=v.clone(i.config.series);var l=Pi.extendArrayProps(r,o,i);t=v.extend(l,t),t=v.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var h=0;h0&&"function"==typeof t[0]?(this.isColorFn=!0,i.config.series.map((function(a,s){var r=t[s]||t[0];return"function"==typeof r?r({value:i.globals.axisCharts?i.globals.series[s][0]||0:i.globals.series[s],seriesIndex:s,dataPointIndex:s,w:e.w}):r}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,i){t&&(e[i]=t)}))}},{key:"getMonochromeColors",value:function(t,e,i){var a=t.color,s=t.shadeIntensity,r=t.shadeTo,n=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,o=1/(n/s),l=0;return Array.from({length:n},(function(){var t="dark"===r?i.shadeColor(-1*l,a):i.shadeColor(l,a);return l+=o,t}))}},{key:"applyColorTypes",value:function(t,e){var i=this,a=this.w;t.forEach((function(t){a.globals[t].colors=void 0===a.config[t].colors?i.isColorFn?a.config.colors:e:a.config[t].colors.slice(),i.pushExtraColors(a.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=e||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),t.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,i=[];e.config.series.forEach((function(s,r){s.data.forEach((function(s,n){var o;o=e.globals.series[r][n],a=e.config.dataLabels.formatter(o,{ctx:t.dCtx.ctx,seriesIndex:r,dataPointIndex:n,w:e}),i.push(a)}))}));var a=v.getLargestStringFromArr(i),s=new Mi(this.dCtx.ctx),r=e.config.dataLabels.style,n=s.getTextRects(a,parseInt(r.fontSize),r.fontFamily);return{width:1.05*n.width,height:n.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var a=e.map((function(t,e){return Array.isArray(t)?t.length:1})),s=Math.max.apply(Math,f(a));i=e[a.indexOf(s)]}return i}}]),t}(),da=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();t={width:a.width,height:a.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var s=e.globals.xLabelFormatter,r=v.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);e.globals.isBarHorizontal&&(n=r=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var o=new Xi(this.dCtx.ctx),l=r;r=o.xLabelFormat(s,r,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),n=o.xLabelFormat(s,n,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(n=r="1");var h=new Mi(this.dCtx.ctx),c=h.getTextRects(r,e.config.xaxis.labels.style.fontSize),d=c;if(r!==n&&(d=h.getTextRects(n,e.config.xaxis.labels.style.fontSize)),(t={width:c.width>=d.width?c.width:d.width,height:c.height>=d.height?c.height:d.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return h.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};c=u(r),r!==n&&(d=u(n)),t.height=(c.height>d.height?c.height:d.height)/1.5,t.width=c.width>d.width?c.width:d.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var i,a=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,s=e.globals.groups.map((function(t){return t.title})),r=v.getLargestStringFromArr(s),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),o=new Mi(this.dCtx.ctx),l=o.getTextRects(r,a),h=l;return r!==n&&(h=o.getTextRects(n,a)),i={width:l.width>=h.width?l.width:h.width,height:l.height>=h.height?l.height:h.height},e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new Mi(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,i=a.height}return{width:e,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(t){return t.value})),a=i.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Mi(this.dCtx.ctx).getTextRects(a,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,a=i.globals,s=i.config,r=s.xaxis.type,n=t.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,o){s.yaxis.length>1&&function(t){return-1!==a.collapsedSeriesIndices.indexOf(t)}(o)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var o=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+n/1.75-e.dCtx.yAxisWidthRight,h=o.position-n/1.75+e.dCtx.yAxisWidthLeft,c="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>a.svgWidth-a.translateX-c&&(a.skipLastTimelinelabel=!0),h<-(t.show&&!t.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===r?e.dCtx.gridPad.right(null===(a=String(c(e,o)))||void 0===a?void 0:a.length)?t:e}),d),g=u=c(u,o);if(void 0!==u&&0!==u.length||(u=l.niceMax),e.globals.isBarHorizontal){a=0;var p=e.globals.labels.slice();u=v.getLargestStringFromArr(p),u=c(u,{seriesIndex:n,dataPointIndex:-1,w:e}),g=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,p)}var f=new Mi(t.dCtx.ctx),x="rotate(".concat(r.labels.rotate," 0 0)"),b=f.getTextRects(u,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1),m=b;u!==g&&(m=f.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1)),i.push({width:(h>m.width||h>b.width?h:m.width>b.width?m.width:b.width)+a,height:m.height>b.height?m.height:b.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,a){if(e.show&&void 0!==e.title.text){var s=new Mi(t.dCtx.ctx),r="rotate(".concat(e.title.rotate," 0 0)"),n=s.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);i.push({width:n.width,height:n.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,a=0,s=t.globals.yAxisScale.length>1?10:0,r=new Ri(this.dCtx.ctx),n=function(n,o){var l=t.config.yaxis[o].floating,h=0;n.width>0&&!l?(h=n.width+s,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(o)&&(h=h-n.width-s)):h=l||r.isYAxisHidden(o)?0:5,t.config.yaxis[o].opposite?a+=h:i+=h,e+=h};return t.globals.yLabelsCoords.map((function(t,e){n(t,e)})),t.globals.yTitleCoords.map((function(t,e){n(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,e}}]),t}(),ga=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w,i=e.config,a=e.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.series.length)return 0;var s=function(t){return["bar","rangeBar","candlestick","boxPlot"].includes(t)},r=i.chart.type,n=0,o=s(r)?i.series.length:1;a.comboBarCount>0&&(o=a.comboBarCount),a.collapsedSeries.forEach((function(t){s(t.type)&&(o-=1)})),i.chart.stacked&&(o=1);var l=s(r)||a.comboBarCount>0,h=Math.abs(a.initialMaxX-a.initialMinX);if(l&&a.isXNumeric&&!a.isBarHorizontal&&o>0&&0!==h){h<=3&&(h=a.dataPoints);var c=h/t,d=a.minXDiff&&a.minXDiff/c>0?a.minXDiff/c:0;d>t/2&&(d/=2),(n=d*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),a.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,a=this.dCtx.isSparkline||!i.axisCharts?0:10;["title","subtitle"].forEach((function(s){void 0!==e.config[s].text?a+=e.config[s].margin:a+=t.dCtx.isSparkline||!i.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||i.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight-=s.height+r.height+a,i.translateY+=s.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,a=new Ri(this.dCtx.ctx);i.config.yaxis.forEach((function(s,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||s.floating||a.isYAxisHidden(r)||(s.opposite&&(i.globals.translateX-=e[r].width+t[r].width+parseInt(s.labels.style.fontSize,10)/1.2+12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),pa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new ca(this),this.dimYAxis=new ua(this),this.dimXAxis=new da(this),this.dimGrid=new ga(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return s(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,i=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var a=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,f(e.config.stroke.width)):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var i=p(e,2),a=i[0],s=i[1];t.gridPad[a]=Math.max(s,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(a/2,this.gridPad.top),this.gridPad.bottom=Math.max(a/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var s=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*s,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:a[i].width,index:i}),e.globals.yTitleCoords.push({width:s[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o,n),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,h=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var c=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,h=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,h=0,c=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(r);var d=function(){i.translateX=l+t.datalabelsCoords.width,i.gridHeight=i.svgHeight-t.lgRect.height-h-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(c=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=c,d();break;case"top":i.translateY=this.lgRect.height+c,d();break;case"left":i.translateY=c,i.translateX=this.lgRect.width+l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":i.translateY=c,i.translateX=l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new ia(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,a=0;t.config.legend.show&&!t.config.legend.floating&&(a=20);var s="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[s].offsetY,n=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating){e.gridHeight=e.svgHeight;var o=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(o,e.gridHeight),e.translateY=r,void(e.translateX=n+(e.svgWidth-e.gridWidth)/2)}switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=r-10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+r+10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-a,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+this.lgRect.width+a;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-a-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,i){var a=this.w,s=a.globals.hasXaxisGroups?2:1,r=i.height+t.height+e.height,n=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,o=a.globals.rotateXLabels?22:10,l=a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0;this.xAxisHeight=r*n+s*o+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeightc&&(this.yAxisWidth=c)}}]),t}(),fa=function(){function t(e){i(this,t),this.w=e.w,this.lgCtx=e}return s(t,[{key:"getLegendStyles",value:function(){var t,e,i,a=document.createElement("style");a.setAttribute("type","text/css");var s=(null===(t=this.lgCtx.ctx)||void 0===t||null===(e=t.opts)||void 0===e||null===(i=e.chart)||void 0===i?void 0:i.nonce)||this.w.config.chart.nonce;s&&a.setAttribute("nonce",s);var r=document.createTextNode("\n .apexcharts-flip-y {\n transform: scaleY(-1) translateY(-100%);\n transform-origin: top;\n transform-box: fill-box;\n }\n .apexcharts-flip-x {\n transform: scaleX(-1);\n transform-origin: center;\n transform-box: fill-box;\n }\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-right: 1px;\n }\n\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }\n\n ");return a.appendChild(r),a}},{key:"getLegendDimensions",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(t,e){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var s=null,r=null;if(a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),r=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),r=parseInt(s.getAttribute("rel"),10)-1),e)[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,r)}));else this.hideSeries({seriesEl:s,realIndex:r})}else{var n=a.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(t+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=a.config.plotOptions.pie.donut.labels;new Mi(this.lgCtx.ctx).pathMouseDown(n,null),this.lgCtx.ctx.pie.printDataLabelsInner(n.node,l)}n.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(t){var e=t.realIndex,i=this.w,a=i.globals,s=v.clone(i.config.series);if(a.axisCharts){var r=i.config.yaxis[a.seriesYAxisReverseMap[e]],n={index:e,data:s[e].data.slice(),type:s[e].type||i.config.chart.type};if(r&&r.show&&r.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(e)<0&&(a.ancillaryCollapsedSeries.push(n),a.ancillaryCollapsedSeriesIndices.push(e));else if(a.collapsedSeriesIndices.indexOf(e)<0){a.collapsedSeries.push(n),a.collapsedSeriesIndices.push(e);var o=a.risingSeries.indexOf(e);a.risingSeries.splice(o,1)}}else a.collapsedSeries.push({index:e,data:s[e]}),a.collapsedSeriesIndices.push(e);return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.config.series.length,this._getSeriesBasedOnCollapsedState(s)}},{key:"hideSeries",value:function(t){for(var e=t.seriesEl,i=t.realIndex,a=this.w,s=this.getSeriesAfterCollapsing({realIndex:i}),r=e.childNodes,n=0;n0){for(var r=0;r1;if(this.legendHelpers.appendToForeignObject(),(a||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,i=t.fillcolor,a=this.w,s=document.createElement("span");s.classList.add("apexcharts-legend-marker");var r=a.config.legend.markers.shape||a.config.markers.shape,n=r;Array.isArray(r)&&(n=r[e]);var o=Array.isArray(a.config.legend.markers.size)?parseFloat(a.config.legend.markers.size[e]):parseFloat(a.config.legend.markers.size),l=Array.isArray(a.config.legend.markers.offsetX)?parseFloat(a.config.legend.markers.offsetX[e]):parseFloat(a.config.legend.markers.offsetX),h=Array.isArray(a.config.legend.markers.offsetY)?parseFloat(a.config.legend.markers.offsetY[e]):parseFloat(a.config.legend.markers.offsetY),c=Array.isArray(a.config.legend.markers.strokeWidth)?parseFloat(a.config.legend.markers.strokeWidth[e]):parseFloat(a.config.legend.markers.strokeWidth),d=s.style;if(d.height=2*(o+c)+"px",d.width=2*(o+c)+"px",d.left=l+"px",d.top=h+"px",a.config.legend.markers.customHTML)d.background="transparent",d.color=i[e],Array.isArray(a.config.legend.markers.customHTML)?a.config.legend.markers.customHTML[e]&&(s.innerHTML=a.config.legend.markers.customHTML[e]()):s.innerHTML=a.config.legend.markers.customHTML();else{var g=new Vi(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(n),seriesIndex:e,strokeWidth:c,size:o}),p=window.SVG().addTo(s).size("100%","100%"),f=new Mi(this.ctx).drawMarker(0,0,u(u({},g),{},{pointFillColor:Array.isArray(i)?i[e]:g.pointFillColor,shape:n}));a.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),p.add(f)}return s}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,a=e.globals.seriesNames,s=e.config.legend.markers.fillColors?e.config.legend.markers.fillColors.slice():e.globals.colors.slice();if("heatmap"===e.config.chart.type){var r=e.config.plotOptions.heatmap.colorScale.ranges;a=r.map((function(t){return t.name?t.name:t.from+" - "+t.to})),s=r.map((function(t){return t.color}))}else this.isBarsDistributed&&(a=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(a=e.config.legend.customLegendItems);for(var n=e.globals.legendFormatter,o=e.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var h,c=n(a[l],{seriesIndex:l,w:e}),d=!1,u=!1;if(e.globals.collapsedSeries.length>0)for(var g=0;g0)for(var p=0;p0?l-10:0)+(h>0?h-10:0)}a.style.position="absolute",r=r+t+i.config.legend.offsetX,n=n+e+i.config.legend.offsetY,a.style.left=r+"px",a.style.top=n+"px","right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px");["width","height"].forEach((function(t){a.style[t]&&(a.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new pa(this.ctx),i=e.dimHelpers.getTitleSubtitleCoords("title"),a=e.dimHelpers.getTitleSubtitleCoords("subtitle"),s=0;"top"===t.config.legend.position&&(s=i.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,s)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new Zi(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new Zi(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,a="true"===t.target.getAttribute("data:collapsed"),s=this.w.config.chart.events.legendClick;"function"==typeof s&&s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;"function"==typeof r&&t.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),t}(),ba=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=a.globals.minX,this.maxX=a.globals.maxX}return s(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=e.config.chart.toolbar.offsetY+"px",a.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s\n \n \n\n'),n("zoomOut",this.elZoomOut,'\n \n \n\n');var o=function(i){t.t[i]&&e.config.chart[i].enabled&&r.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'\n \n \n \n':'\n \n \n',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&e.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,'\n \n \n'),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;lthis.wheelDelay&&(this.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){a-i.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,i=this.w;this.minX=i.globals.isRangeBar?i.globals.minY:i.globals.minX,this.maxX=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;var a=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(a){var s,r,n,o=(t.clientX-a.left)/a.width,l=this.minX,h=this.maxX,c=h-l;if(t.deltaY<0){var d=l+o*c;r=d-(s=.5*c)/2,n=d+s/2}else r=l-(s=1.5*c)/2,n=h+s/2;if(!i.globals.isRangeBar){r=Math.max(r,i.globals.initialMinX),n=Math.min(n,i.globals.initialMaxX);var u=.01*(i.globals.initialMaxX-i.globals.initialMinX);if(n-r0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,i,a,s){return"l"===s||"r"===s?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resizing",this.selectionDragging.bind(this,"resizing")))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(u(u({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,a=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i;t.globals.isRangeBar&&(i=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,a=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var s={x:i,y:0,width:a,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(s),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,a=t.width,s=t.height,r=t.translateX,n=void 0===r?0:r,o=t.translateY,l=void 0===o?0:o,h=this.w,c=this.zoomRect,d=this.selectionRect;if(this.dragged||null!==h.globals.selection){var u={transform:"translate("+n+", "+l+")"};h.globals.zoomEnabled&&this.dragged&&(a<0&&(a=1),c.attr({x:e,y:i,width:a,height:s,fill:h.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":h.config.chart.zoom.zoomedArea.fill.opacity,stroke:h.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":h.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":h.config.chart.zoom.zoomedArea.stroke.opacity}),Mi.setAttrs(c.node,u)),h.globals.selectionEnabled&&(d.attr({x:e,y:i,width:a>0?a:0,height:s>0?s:0,fill:h.config.chart.selection.fill.color,"fill-opacity":h.config.chart.selection.fill.opacity,stroke:h.config.chart.selection.stroke.color,"stroke-width":h.config.chart.selection.stroke.width,"stroke-dasharray":h.config.chart.selection.stroke.dashArray,"stroke-opacity":h.config.chart.selection.stroke.opacity}),Mi.setAttrs(d.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.gridRect.getBoundingClientRect(),n=s.startX-1,o=s.startY,l=!1,h=!1,c=s.clientX-r.left-n,d=s.clientY-r.top-o,g={translateX:a.globals.translateX,translateY:a.globals.translateY};return Math.abs(c+n)>a.globals.gridWidth?c=a.globals.gridWidth-n:s.clientX-r.left<0&&(c=n),n>s.clientX-r.left&&(l=!0,c=Math.abs(c)),o>s.clientY-r.top&&(h=!0,d=Math.abs(d)),g=u(u({},g="x"===i?{x:l?n-c:n,y:0,width:c,height:a.globals.gridHeight}:"y"===i?{x:0,y:h?o-d:o,width:a.globals.gridWidth,height:d}:{x:l?n-c:n,y:h?o-d:o,width:c,height:d}),{},{translateX:a.globals.translateX,translateY:a.globals.translateY}),s.drawSelectionRect(g),s.selectionDragging("resizing"),g}},{key:"selectionDragging",value:function(t,e){var i=this,a=this.w;if(e){e.preventDefault();var s=e.detail,r=s.handler,n=s.box,o=n.x,l=n.y;othis.constraints.x2&&(o=this.constraints.x2-n.w),n.y2>this.constraints.y2&&(l=this.constraints.y2-n.h),r.move(o,l);var h=this.xyRatios,c=this.selectionRect,d=0;"resizing"===t&&(d=30);var u=function(t){return parseFloat(c.node.getAttribute(t))},g={x:u("x"),y:u("y"),width:u("width"),height:u("height")};a.globals.selection=g,"function"==typeof a.config.chart.events.selection&&a.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,s,r,n=i.gridRect.getBoundingClientRect(),o=c.node.getBoundingClientRect();a.globals.isRangeBar?(t=a.globals.yAxisScale[0].niceMin+(o.left-n.left)*h.invertedYRatio,e=a.globals.yAxisScale[0].niceMin+(o.right-n.left)*h.invertedYRatio,s=0,r=1):(t=a.globals.xAxisScale.niceMin+(o.left-n.left)*h.xRatio,e=a.globals.xAxisScale.niceMin+(o.right-n.left)*h.xRatio,s=a.globals.yAxisScale[0].niceMin+(n.bottom-o.bottom)*h.yRatio[0],r=a.globals.yAxisScale[0].niceMax-(o.top-n.top)*h.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:s,max:r}};a.config.chart.events.selection(i.ctx,l),a.config.chart.brush.enabled&&void 0!==a.config.chart.events.brushScrolled&&a.config.chart.events.brushScrolled(i.ctx,l)}),d))}}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.xyRatios,n=this.ctx.toolbar;if(s.startX>s.endX){var o=s.startX;s.startX=s.endX,s.endX=o}if(s.startY>s.endY){var l=s.startY;s.startY=s.endY,s.endY=l}var h=void 0,c=void 0;a.globals.isRangeBar?(h=a.globals.yAxisScale[0].niceMin+s.startX*r.invertedYRatio,c=a.globals.yAxisScale[0].niceMin+s.endX*r.invertedYRatio):(h=a.globals.xAxisScale.niceMin+s.startX*r.xRatio,c=a.globals.xAxisScale.niceMin+s.endX*r.xRatio);var d=[],u=[];if(a.config.yaxis.forEach((function(t,e){var i=a.globals.seriesYAxisMap[e][0];d.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.startY),u.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.endY)})),s.dragged&&(s.dragX>10||s.dragY>10)&&h!==c)if(a.globals.zoomEnabled){var g=v.clone(a.globals.initialConfig.yaxis),p=v.clone(a.globals.initialConfig.xaxis);if(a.globals.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),c=Math.floor(c),h<1&&(h=1,c=a.globals.dataPoints),c-h<2&&(c=h+1)),"xy"!==i&&"x"!==i||(p={min:h,max:c}),"xy"!==i&&"y"!==i||g.forEach((function(t,e){g[e].min=u[e],g[e].max=d[e]})),n){var f=n.getBeforeZoomRange(p,g);f&&(p=f.xaxis?f.xaxis:p,g=f.yaxis?f.yaxis:g)}var x={xaxis:p};a.config.chart.group||(x.yaxis=g),s.ctx.updateHelpers._updateOptions(x,!1,s.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&n.zoomCallback(p,g)}else if(a.globals.selectionEnabled){var b,m=null;b={min:h,max:c},"xy"!==i&&"y"!==i||(m=v.clone(a.config.yaxis)).forEach((function(t,e){m[e].min=u[e],m[e].max=d[e]})),a.globals.selection=s.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(s.ctx,{xaxis:b,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,a=e;if(void 0!==i.globals.lastClientPosition.x){var s=i.globals.lastClientPosition.x-a.clientX,r=i.globals.lastClientPosition.y-a.clientY;Math.abs(s)>Math.abs(r)&&s>0?this.moveDirection="left":Math.abs(s)>Math.abs(r)&&s<0?this.moveDirection="right":Math.abs(r)>Math.abs(s)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(s)&&r<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var n=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||a.panScrolled(n,o)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,a=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+a,i=t.globals.maxX+a):"right"===this.moveDirection&&(e=t.globals.minX-a,i=t.globals.maxX-a),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,a=this.xyRatios,s=v.clone(i.globals.initialConfig.yaxis),r=a.xRatio,n=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(r=a.invertedYRatio,n=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(t=n+i.globals.gridWidth/15*r,e=o+i.globals.gridWidth/15*r):"right"===this.moveDirection&&(t=n-i.globals.gridWidth/15*r,e=o-i.globals.gridWidth/15*r),i.globals.isRangeBar||(ti.globals.initialMaxX)&&(t=n,e=o);var l={xaxis:{min:t,max:e}};i.config.chart.group||(l.yaxis=s),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var a=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),a}(ba),va=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return s(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,a=t.clientX,s=t.clientY,r=this.w,n=i.getBoundingClientRect(),o=n.width,l=n.height,h=o/(r.globals.dataPoints-1),c=l/r.globals.dataPoints,d=this.hasBars();!r.globals.comboCharts&&!d||r.config.xaxis.convertedCatToNumeric||(h=o/r.globals.dataPoints);var u=a-n.left-r.globals.barPadForNumericAxis,g=s-n.top;u<0||g<0||u>o||g>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var p=Math.round(u/h),f=Math.floor(g/c);d&&!r.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(u/h),p-=1);var x=null,b=null,m=r.globals.seriesXvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))})),y=r.globals.seriesYvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))}));if(r.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),k=u*(w.width/o),A=g*(w.height/l);x=(b=this.closestInMultiArray(k,A,m,y)).index,p=b.j,null!==x&&(m=r.globals.seriesXvalues[x],p=(b=this.closestInArray(k,m)).index)}return r.globals.capturedSeriesIndex=null===x?-1:x,(!p||p<1)&&(p=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=f:r.globals.capturedDataPointIndex=p,{capturedSeries:x,j:r.globals.isBarHorizontal?f:p,hoverX:u,hoverY:g}}},{key:"closestInMultiArray",value:function(t,e,i,a){var s=this.w,r=0,n=null,o=-1;s.globals.series.length>1?r=this.getFirstActiveXArray(i):n=0;var l=i[r][0],h=Math.abs(t-l);if(i.forEach((function(e){e.forEach((function(e,i){var a=Math.abs(t-e);a<=h&&(h=a,o=i)}))})),-1!==o){var c=a[r][o],d=Math.abs(e-c);n=r,a.forEach((function(t,i){var a=Math.abs(e-t[o]);a<=d&&(d=a,n=i)}))}return{index:n,j:o}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,i=0,a=t.map((function(t,e){return t.length>0?e:-1})),s=0;s0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=f(t)).sort((function(t,e){var i=Number(t.getAttribute("data:realIndex")),a=Number(e.getAttribute("data:realIndex"));return ai?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var i=Number(t.getAttribute("cx")),a=Number(t.getAttribute("cy")),s=t.getAttribute("shape");return new Mi(this.ctx).getMarkerPath(i,a,s,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s ').concat(i.attrs.name,""),e+="
".concat(i.val,"
")})),m.innerHTML=t+"",v.innerHTML=e+""};n?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?y():(m.innerHTML="",v.innerHTML=""):y()}else m.innerHTML="",v.innerHTML="";null!==p&&(a[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:"");if(n&&f[0]){if(l.config.tooltip.hideEmptySeries){var w=a[e].querySelector(".apexcharts-tooltip-marker"),k=a[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(c)?(w.style.display="none",k.style.display="none"):(w.style.display="block",k.style.display="block")}null==c||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)?f[0].parentNode.style.display="none":f[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)&&(f[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var i=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));a&&(a.classList.add("apexcharts-active"),a.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",n="",o=null,l=null,h={series:a.globals.series,seriesIndex:e,dataPointIndex:i,w:a},c=a.globals.ttZFormatter;null===i?l=a.globals.series[e]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(r=s[e][i],0===s[e].length&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=new $i(this.ctx).isFormatXY()?void 0!==a.config.series[e].data[i]?a.config.series[e].data[i].x:"":void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var d=r;a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?r=new Xi(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(this.ctx).formatDate,w:this.w}):r=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](d,h):a.globals.xLabelFormatter(d,h);return void 0!==a.config.tooltip.x.formatter&&(r=a.globals.ttKeyFormatter(d,h)),a.globals.seriesZ.length>0&&a.globals.seriesZ[e].length>0&&(o=c(a.globals.seriesZ[e][i],a)),n="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(d,h):r,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,a=t.y1,s=t.y2,r=t.w,n=this.ttCtx.getElTooltip(),o=r.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]),n.innerHTML=o({ctx:this.ctx,series:r.globals.series,seriesIndex:e,dataPointIndex:i,y1:a,y2:s,w:r})}}]),t}(),wa=function(){function t(e){i(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return s(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=t-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(null!==e&&(r=a.globals.gridWidth/n*e),null===s||a.globals.isBarHorizontal||(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=r;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Mi.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Mi.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=e.globals.translateX;var s;s=new Mi(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=e.globals.translateY+a,r=i.yaxisTTEls[t].getBoundingClientRect().height,n=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(n-=26),s-=r/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=n+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),n=s.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(t)+o+5,h=parseFloat(e)+o/2;if(l>a.globals.gridWidth/2&&(l=l-n.ttWidth-o-10),l>a.globals.gridWidth-n.ttWidth-10&&(l=a.globals.gridWidth-n.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var c=s.getElGrid().getBoundingClientRect();(l=s.e.clientX-c.left)>a.globals.gridWidth/2&&(l-=s.tooltipRect.ttWidth),(h=s.e.clientY+a.globals.translateY-c.top)>a.globals.gridHeight/2&&(h-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+h>a.globals.gridHeight&&(h=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(l)||(l+=a.globals.translateX,r.style.left=l+"px",r.style.top=h+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),r=0;r0){var g=u.getAttribute("shape"),p=l.getMarkerPath(s,r,g,1.5*c);u.setAttribute("d",p)}this.moveXCrosshairs(s),o.fixedTooltip||this.moveTooltip(s,r,c)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,a=i.w,s=0,r=0,n=a.globals.pointsArray,o=new Zi(this.ctx),l=new Mi(this.ctx);e=o.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var h=i.tooltipUtil.getHoverMarkerSize(e);n[e]&&(s=n[e][t][0],r=n[e][t][1]);var c=i.tooltipUtil.getAllMarkers();if(null!==c)for(var d=0;d0){var b=l.getMarkerPath(s,g,f,h);c[d].setAttribute("d",b)}else c[d].setAttribute("d","")}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,r||a.globals.gridHeight,h)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(r=new Zi(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"']"));n||"number"!=typeof e||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var o=n?parseFloat(n.getAttribute("cx")):0,l=n?parseFloat(n.getAttribute("cy")):0,h=n?parseFloat(n.getAttribute("barWidth")):0,c=a.getElGrid().getBoundingClientRect(),d=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!d&&(o-=s%2!=0?h/2:0),n&&d&&i.globals.comboCharts&&(o-=h/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[t-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[t]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?l-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?l=a.e.clientY-c.top-a.tooltipRect.ttHeight/2:l+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(l=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,l||i.globals.gridHeight)}}]),t}(),ka=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new wa(e)}return s(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Vi(this.ctx),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=f(a),t.config.chart.stacked&&a.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w;"bubble"!==s.config.chart.type&&this.newPointSize(t,e);var r=e.getAttribute("cx"),n=e.getAttribute("cy");if(null!==i&&null!==a&&(r=i,n=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===s.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(r,n,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,a=this.ttCtx,s=t,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=e.config.markers.hover.size,o=0;o0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],i);t[e].setAttribute("d",a)}else t[e].setAttribute("d","M0,0")}}}]),t}(),Aa=function(){function t(e){i(this,t),this.w=e.w;var a=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!a.globals.isBarHorizontal&&"rangeBar"===a.config.chart.type&&a.config.plotOptions.bar.rangeBarGroupRows}return s(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,s=t.y,r=t.type,n=this.ttCtx,o=this.w;if(e.target.classList.contains("apexcharts-".concat(r,"-rect"))){var l=this.getAttr(e,"i"),h=this.getAttr(e,"j"),c=this.getAttr(e,"cx"),d=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),g=this.getAttr(e,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:h,shared:!1,e:e}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=h,a=c+n.tooltipRect.ttWidth/2+u,s=d+n.tooltipRect.ttHeight/2-g/2,n.tooltipPosition.moveXCrosshairs(c+u/2),a>o.globals.gridWidth/2&&(a=c-n.tooltipRect.ttWidth/2+u),n.w.config.tooltip.followCursor){var p=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-p.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),s=o.globals.clientY-p.top-(s>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=t.x,n=t.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var h=parseInt(s.paths.getAttribute("cx"),10),c=parseInt(s.paths.getAttribute("cy"),10),d=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),e=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=v.findAncestor(s.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,e,i),o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=i,r=h,n=c+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var g=l.getElGrid().getBoundingClientRect();n=l.e.clientY+o.globals.translateY-g.top}d<0&&(n=c),l.marker.enlargeCurrentPoint(i,s.paths,r,n)}return{x:r,y:n}}},{key:"handleBarTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=this.ttCtx,o=n.getElTooltip(),l=0,h=0,c=0,d=this.getBarTooltipXY({e:a,opt:s});if(null!==d.j||0!==d.barHeight||0!==d.barWidth){e=d.i;var u=d.j;if(r.globals.capturedSeriesIndex=e,r.globals.capturedDataPointIndex=u,r.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!r.config.tooltip.shared?(h=d.x,c=d.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[e]:r.config.stroke.width,l=h):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(c)&&(c=r.globals.svgHeight-n.tooltipRect.ttHeight),parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),h+n.tooltipRect.ttWidth>r.globals.gridWidth?h-=n.tooltipRect.ttWidth:h<0&&(h=0),n.w.config.tooltip.followCursor){var g=n.getElGrid().getBoundingClientRect();c=n.e.clientY-g.top}null===n.tooltip&&(n.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?n.tooltipPosition.moveXCrosshairs(l+i/2):n.tooltipPosition.moveXCrosshairs(l)),!n.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(c=c+r.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=h+r.globals.translateX+"px",o.style.top=c+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,i=t.e,a=t.opt,s=this.w,r=null,n=this.ttCtx,o=0,l=0,h=0,c=0,d=0,u=i.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){var g=i.target,p=g.getBoundingClientRect(),f=a.elGrid.getBoundingClientRect(),x=p.height;d=p.height;var b=p.width,m=parseInt(g.getAttribute("cx"),10),v=parseInt(g.getAttribute("cy"),10);c=parseFloat(g.getAttribute("barWidth"));var y="touchmove"===i.type?i.touches[0].clientX:i.clientX;r=parseInt(g.getAttribute("j"),10),o=parseInt(g.parentNode.getAttribute("rel"),10)-1;var w=g.getAttribute("data-range-y1"),k=g.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(g.parentNode.getAttribute("data:realIndex"),10));var A=function(t){return s.globals.isXNumeric?m-b/2:e.isVerticalGroupedRangeBar?m+b/2:m-n.dataPointsDividedWidth+b/2},C=function(){return v-n.dataPointsDividedHeight+x/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:r,y1:w?parseInt(w,10):null,y2:k?parseInt(k,10):null,shared:!n.showOnIntersect&&s.config.tooltip.shared,e:i}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(l=y-f.left+15,h=C()):(l=A(),h=i.clientY-f.top-n.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((l=m)0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var a=this.ttCtx,s=this.w,r=s.globals,n=r.seriesYAxisMap[t];if(a.yaxisTooltips[t]&&n.length>0){var o=r.yLabelFormatters[t],l=a.getElGrid().getBoundingClientRect(),h=n[0],c=0;i.yRatio.length>1&&(c=h);var d=(e-l.top)*i.yRatio[c],u=r.maxYArr[h]-r.minYArr[h],g=r.minYArr[h]+(u-d);s.config.yaxis[t].reversed&&(g=r.maxYArr[h]-(u-d)),a.tooltipPosition.moveYCrosshairs(e-l.top),a.yaxisTooltipText[t].innerHTML=o(g),a.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),Sa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.tConfig=a.config.tooltip,this.tooltipUtil=new va(this),this.tooltipLabels=new ya(this),this.tooltipPosition=new wa(this),this.marker=new ka(this),this.intersect=new Aa(this),this.axesTooltip=new Ca(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!a.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return s(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new Qi(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,a=[],s=this.getElTooltip(),r=function(r){var n=document.createElement("div");n.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(r)),n.style.order=i.config.tooltip.inverseOrder?t-r:r+1;var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[r],n.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var a=document.createElement("span");a.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(a),l.appendChild(e)})),n.appendChild(l),s.appendChild(n),a.push(n)},n=0;n0&&this.addPathsEventListeners(g,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(r=r+t.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+t.globals.svgHeight-s-10),e.style.left=r+"px",e.style.top=n+"px",{x:r,y:n,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,a=function(a){var s={paths:t[a],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[a].addEventListener(e,i.onSeriesHover.bind(i,s),{capture:!1,passive:!0})}))},s=0;s=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(t,e)}),20-a))}},{key:"seriesHover",value:function(t,e){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||0===s.globals.dataPoints)||(a.length?a.forEach((function(a){var s=i.getElTooltip(a),r={paths:t.paths,tooltipEl:s,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===i.w.globals.minX&&a.w.globals.maxX===i.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:r,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,a=t.opt,s=t.e,r=e.w,n=this.getElTooltip(e);if(n){if(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=s,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared)if(this.tConfig.onDatasetHover.highlightDataSeries)new Zi(e).toggleSeriesOnHover(s,s.target.parentNode);i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect})}}},{key:"axisChartsTooltips",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=s.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,ln.top+n.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var h=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(h)<0)return void this.handleMouseOut(s)}var c=this.getElTooltip(),d=this.getElXCrosshairs(),u=[];r.config.chart.group&&(u=this.ctx.getSyncedCharts());var g=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;null!==d&&d.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),g&&!this.showOnIntersect||u.length>1)this.handleStickyTooltip(a,o,l,s);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:e,y:i,type:r.config.chart.type});e=f.x,i=f.y,c.style.left=e+"px",c.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:e,y:i});if(this.yaxisTooltips.length)for(var x=0;xl.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(t,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||s.globals.isBarHorizontal){var h=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,h,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,i,a){var s=this.w;if(!this.tConfig.shared&&null===s.globals.series[e][a])return void this.handleMouseOut(i);if(void 0!==s.globals.series[e][a])this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,a,i.ttItems):this.create(t,this,e,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var r=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,r,a,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Mi(this.ctx),i=t.globals.dom.Paper.find(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,A=this.w,C=e;"mouseup"===t.type&&this.markerClick(t,i,a),null===k&&(k=this.tConfig.shared);var S=this.tooltipUtil.hasMarkers(i),L=this.tooltipUtil.getElBars();if(A.config.legend.tooltipHoverFormatter){var M=A.config.legend.tooltipHoverFormatter,P=Array.from(this.legendLabels);P.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var I=0;I0?C.marker.enlargePoints(a):C.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var Y=new Mi(this.ctx),H=A.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var O=0;O0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*k)),w){u=u+d.height/2-b/2-2}var C=e.globals.series[i][a]<0,S=o;switch(this.barCtx.isReversed&&(S=o+(C?c:-c)),f.position){case"center":g=w?C?S-c/2+v:S+c/2-v:C?S-c/2+d.height/2+v:S+c/2+d.height/2-v;break;case"bottom":g=w?C?S-c+v:S+c-v:C?S-c+d.height+b+v:S+c-d.height/2+b-v;break;case"top":g=w?C?S+v:S-v:C?S-d.height/2-v:S+d.height+v}if(this.barCtx.lastActiveBarSerieIndex===s&&x.enabled){var L=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:a}),p.fontSize);r=C?S-L.height/2-v-x.offsetY+18:S+L.height+v+x.offsetY-18;var M=A;n=y+(e.globals.isXNumeric?-h*e.globals.barGroups.length/2:e.globals.barGroups.length*h/2-(e.globals.barGroups.length-1)*h-M)+x.offsetX}return e.config.chart.stacked||(g<0?g=0+b:g+d.height/3>e.globals.gridHeight&&(g=e.globals.gridHeight-b)),{bcx:l,bcy:o,dataLabelsX:u,dataLabelsY:g,totalDataLabelsX:n,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,a=t.i,s=t.j,r=t.realIndex,n=t.bcy,o=t.barHeight,l=t.barWidth,h=t.textRects,c=t.dataLabelsX,d=t.strokeWidth,u=t.dataLabelsConfig,g=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,f=t.offX,x=t.offY,b=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var m,v,y=n-(this.barCtx.isRangeBar?0:b)+o/2+h.height/2+x-3,w="start",k=e.globals.series[a][s]<0,A=i;switch(this.barCtx.isReversed&&(A=i+(k?-l:l),w=k?"start":"end"),g.position){case"center":c=k?A+l/2-f:Math.max(h.width/2,A-l/2)+f;break;case"bottom":c=k?A+l-d-f:A-l+d+f;break;case"top":c=k?A-d-f:A-d+f}if(this.barCtx.lastActiveBarSerieIndex===r&&p.enabled){var C=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:s}),u.fontSize);k?(m=A-d-f-p.offsetX,w="end"):m=A+f+p.offsetX+(this.barCtx.isReversed?-(l+d):d),v=y-h.height/2+C.height/2+p.offsetY+d}return e.config.chart.stacked||("start"===u.textAnchor?c-h.width<0?c=k?h.width+d:d:c+h.width>e.globals.gridWidth&&(c=k?e.globals.gridWidth-d:e.globals.gridWidth-h.width-d):"middle"===u.textAnchor?c-h.width/2<0?c=h.width/2+d:c+h.width/2>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width/2-d):"end"===u.textAnchor&&(c<1?c=h.width+d:c+1>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width-d))),{bcx:i,bcy:n,dataLabelsX:c,dataLabelsY:y,totalDataLabelsX:m,totalDataLabelsY:v,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.i,r=t.j,n=t.textRects,o=t.barHeight,l=t.barWidth,h=t.dataLabelsConfig,c=this.w,d="rotate(0)";"vertical"===c.config.plotOptions.bar.dataLabels.orientation&&(d="rotate(-90, ".concat(e,", ").concat(i,")"));var g=new qi(this.barCtx.ctx),p=new Mi(this.barCtx.ctx),f=h.formatter,x=null,b=c.globals.collapsedSeriesIndices.indexOf(s)>-1;if(h.enabled&&!b){x=p.group({class:"apexcharts-data-labels",transform:d});var m="";void 0!==a&&(m=f(a,u(u({},c),{},{seriesIndex:s,dataPointIndex:r,w:c}))),!a&&c.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(m="");var v=c.globals.series[s][r]<0,y=c.config.plotOptions.bar.dataLabels.position;if("vertical"===c.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(h.textAnchor=v?"end":"start"),"center"===y&&(h.textAnchor="middle"),"bottom"===y&&(h.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels)lMath.abs(l)&&(m=""):n.height/1.6>Math.abs(o)&&(m=""));var w=u({},h);this.barCtx.isHorizontal&&a<0&&("start"===h.textAnchor?w.textAnchor="end":"end"===h.textAnchor&&(w.textAnchor="start")),g.plotDataLabelsText({x:e,y:i,text:m,i:s,j:r,parent:x,dataLabelsConfig:w,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}},{key:"drawTotalDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.realIndex,r=t.textAnchor,n=t.barTotalDataLabelsConfig;this.w;var o,l=new Mi(this.barCtx.ctx);return n.enabled&&void 0!==e&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===s&&(o=l.drawText({x:e,y:i,foreColor:n.style.color,text:a,textAnchor:r,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),o}}]),t}(),Ma=function(){function t(e){i(this,t),this.w=e.w,this.barCtx=e}return s(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[i].length),e.globals.isXNumeric)for(var a=0;ae.globals.minX&&e.globals.seriesX[i][a]0&&(a=l.globals.minXDiff/d),(r=a/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),n=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+(a-r*this.barCtx.seriesLen)/2}return l.globals.barHeight=s,l.globals.barWidth=r,{x:t,y:e,yDivision:i,xDivision:a,barHeight:s,barWidth:r,zeroH:n,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,i,a){var s,r,n,o,l=this.w,h=this.barCtx.ctx.fill,c=null,d=this.barCtx.barOptions.distributed?i:e;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(a){t[e][i]>=a.from&&t[e][i]<=a.to&&(c=a.color)}));return h.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:a,dataPointIndex:i,color:c,value:t[e][i],fillConfig:null===(s=l.config.series[e].data[i])||void 0===s?void 0:s.fill,fillType:null!==(r=l.config.series[e].data[i])&&void 0!==r&&null!==(n=r.fill)&&void 0!==n&&n.type?null===(o=l.config.series[e].data[i])||void 0===o?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[a]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,i){var a=0,s=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"createBorderRadiusArr",value:function(t){var e,i=this.w,a=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,s=t.length,n=0|(null===(e=t[0])||void 0===e?void 0:e.length),o=Array.from({length:s},(function(){return Array(n).fill(a?"top":"none")}));if(a)return o;for(var l=0;l0?(h.push(u),d++):g<0&&(c.push(u),d++)}if(h.length>0&&0===c.length)if(1===h.length)o[h[0]][l]="both";else{var p,f=h[0],x=h[h.length-1],b=r(h);try{for(b.s();!(p=b.n()).done;){var m=p.value;o[m][l]=m===f?"bottom":m===x?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===h.length)if(1===c.length)o[c[0]][l]="both";else{var v,y=Math.max.apply(Math,c),w=Math.min.apply(Math,c),k=r(c);try{for(k.s();!(v=k.n()).done;){var A=v.value;o[A][l]=A===y?"bottom":A===w?"top":"none"}}catch(t){k.e(t)}finally{k.f()}}else if(h.length>0&&c.length>0){var C,S=h[h.length-1],L=r(h);try{for(L.s();!(C=L.n()).done;){var M=C.value;o[M][l]=M===S?"top":"none"}}catch(t){L.e(t)}finally{L.f()}var P,I=Math.max.apply(Math,c),T=r(c);try{for(T.s();!(P=T.n()).done;){var z=P.value;o[z][l]=z===I?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else if(1===d){o[h[0]||c[0]][l]="both"}}return o}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,a=t.x1,s=t.x2,r=t.y1,n=t.y2,o=t.elSeries,l=this.w,h=new Mi(this.barCtx.ctx),c=new Zi(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var d=this.barCtx.barOptions.colors.backgroundBarColors[e],u=h.drawRect(void 0!==a?a:0,void 0!==r?r:0,void 0!==s?s:l.globals.gridWidth,void 0!==n?n:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,i=t.barWidth,a=t.barXPosition,s=t.y1,r=t.y2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.columnWidthOffset&&(x=a-g.config.series[c].data[u].columnWidthOffset/2,f=i+g.config.series[c].data[u].columnWidthOffset);var b=n/2,m=x+b,v=x+f-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001-b*y,r+=.001+b*y;var w=p.move(m,s),k=p.move(m,s),A=p.line(v,s);if(g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1)),w=w+p.line(m,r)+p.line(v,r)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(m,s)+A+A+A+A+A+p.line(m,s)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).yArrj.push(r-b*y),C.yArrjF.push(Math.abs(s-r+n*y)),C.yArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"getBarpaths",value:function(t){var e,i=t.barYPosition,a=t.barHeight,s=t.x1,r=t.x2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.barHeightOffset&&(f=i-g.config.series[c].data[u].barHeightOffset/2,x=a+g.config.series[c].data[u].barHeightOffset);var b=n/2,m=f+b,v=f+x-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001+b*y,r+=.001-b*y;var w=p.move(s,m),k=p.move(s,m);g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1));var A=p.line(s,v);if(w=w+p.line(r,m)+p.line(r,v)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(s,m)+A+A+A+A+A+p.line(s,m)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).xArrj.push(r+b*y),C.xArrjF.push(Math.abs(s-r-n*y)),C.xArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;a2&&void 0!==arguments[2])||arguments[2]?e:null;return null!=t&&(i=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(t,e,i){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?e:null;return null!=t&&(a=e-t/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(t,e,i,a,s,r){var n=this,l=this.w,h=[],c=function(a,s){var l;h.push((o(l={},t,"x"===t?n.getXForValue(a,e,!1):n.getYForValue(a,i,r,!1)),o(l,"attrs",s),l))};if(l.globals.seriesGoals[a]&&l.globals.seriesGoals[a][s]&&Array.isArray(l.globals.seriesGoals[a][s])&&l.globals.seriesGoals[a][s].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,g={strokeHeight:"x"===t?0:l.globals.markers.size[a],strokeWidth:"x"===t?l.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[a])?d[a][0]:d[a]};c(l.globals.seriesRangeStart[a][s],g),c(l.globals.seriesRangeEnd[a][s],u(u({},g),{},{strokeColor:Array.isArray(d[a])?d[a][1]:d[a]}))}return h}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,a=t.goalX,s=t.goalY,r=t.barWidth,n=t.barHeight,o=new Mi(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var h=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach((function(t){if(t.x>=-1&&t.x<=o.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:n/2,a=i+e+n/2;h=o.drawLine(t.x,a-2*e,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(h)}})):Array.isArray(s)&&s.forEach((function(t){if(t.y>=-1&&t.y<=o.w.globals.gridHeight+1){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:r/2,a=e+i+r/2;h=o.drawLine(a-2*i,t.y,a,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(h)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,i=t.currPaths,a=t.color,s=this.w,r=e.x,n=e.x1,o=e.barYPosition,l=i.x,h=i.x1,c=i.barYPosition,d=o+i.barHeight,u=new Mi(this.barCtx.ctx),g=new v,p=u.move(n,d)+u.line(r,d)+u.line(l,c)+u.line(h,c)+u.line(n,d)+("around"===s.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return u.drawPath({d:p,fill:g.shadeColor(.5,v.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,i=t.i,a=t.j,s=this.w,r=0,n=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map((function(t,e){return e})):(null===(e=s.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=s.globals.seriesPercent[t][a];e&&r++,t-1})),a=this.barCtx.columnGroupIndices,s=a.indexOf(i);return s<0&&(a.push(i),s=a.length-1),{groupIndex:i,columnGroupIndex:s}}}]),t}(),Pa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w;var s=this.w;this.barOptions=s.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=s.config.stroke.width,this.isNullValue=!1,this.isRangeBar=s.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!s.globals.isBarHorizontal&&s.globals.seriesRange.length&&s.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=a,null!==this.xyRatios&&(this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.invertedXRatio=a.invertedXRatio,this.invertedYRatio=a.invertedYRatio,this.baseLineY=a.baseLineY,this.baseLineInvertedY=a.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var r=new Zi(this.ctx);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var n=r.getBarSeriesIndices(),o=new Pi(this.ctx);this.stackedSeriesTotals=o.getStackedSeriesTotals(this.w.config.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}))),this.barHelpers=new Ma(this)}return s(t,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=new Pi(this.ctx,i);t=s.getLogSeries(t),this.series=t,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var n=0,o=0;n0&&(this.visibleI=this.visibleI+1);var w=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[b],this.translationsIndex=b);var A=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var C=this.barHelpers.initialPositions();p=C.y,w=C.barHeight,h=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,l=C.xDivision,c=C.zeroH,this.isHorizontal||x.push(g+k/2);var S=a.group({class:"apexcharts-datalabels","data:realIndex":b});i.globals.delayedElements.push({el:S.node}),S.node.classList.add("apexcharts-element-hidden");var L=a.group({class:"apexcharts-bar-goals-markers"}),M=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");for(var P=0;P0){var R=this.barHelpers.drawBarShadow({color:"string"==typeof X&&-1===(null==X?void 0:X.indexOf("url"))?X:v.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});if(M.add(R),i.config.chart.dropShadow.enabled)new Li(this.ctx).dropShadow(R,i.config.chart.dropShadow,b)}this.pathArr.push(T);var E=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:w,barWidth:k});E&&L.add(E),p=T.y,g=T.x,P>0&&x.push(g+k/2),f.push(p),this.renderSeries({realIndex:b,pathFill:X,j:P,i:n,columnGroupIndex:m,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:I,elSeries:y,x:g,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:w),barWidth:Math.abs(T.barWidth?T.barWidth:k),elDataLabelsWrap:S,elGoalsMarkers:L,elBarShadows:M,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[b]=x,i.globals.seriesYvalues[b]=f,r.add(y)}return r}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,a=t.lineFill,s=t.j,r=t.i,n=t.columnGroupIndex,o=t.pathFrom,l=t.pathTo,h=t.strokeWidth,c=t.elSeries,d=t.x,u=t.y,g=t.y1,p=t.y2,f=t.series,x=t.barHeight,b=t.barWidth,m=t.barXPosition,v=t.barYPosition,y=t.elDataLabelsWrap,w=t.elGoalsMarkers,k=t.elBarShadows,A=t.visibleSeries,C=t.type,S=t.classes,L=this.w,M=new Mi(this.ctx);if(!a){var P="function"==typeof L.globals.stroke.colors[e]?function(t){var e,i=L.config.stroke.colors;return Array.isArray(i)&&i.length>0&&((e=i[t])||(e=""),"function"==typeof e)?e({value:L.globals.series[t][s],dataPointIndex:s,w:L}):e}(e):L.globals.stroke.colors[e];a=this.barOptions.distributed?L.globals.stroke.colors[s]:P}L.config.series[r].data[s]&&L.config.series[r].data[s].strokeColor&&(a=L.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var I=s/L.config.chart.animations.animateGradually.delay*(L.config.chart.animations.speed/L.globals.dataPoints)/2.4,T=M.renderPaths({i:r,j:s,realIndex:e,pathFrom:o,pathTo:l,stroke:a,strokeWidth:h,strokeLineCap:L.config.stroke.lineCap,fill:i,animationDelay:I,initialSpeed:L.config.chart.animations.speed,dataChangeSpeed:L.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(C,"-area ").concat(S),chartType:C});T.attr("clip-path","url(#gridRectBarMask".concat(L.globals.cuid,")"));var z=L.config.forecastDataPoints;z.count>0&&s>=L.globals.dataPoints-z.count&&(T.node.setAttribute("stroke-dasharray",z.dashArray),T.node.setAttribute("stroke-width",z.strokeWidth),T.node.setAttribute("fill-opacity",z.fillOpacity)),void 0!==g&&void 0!==p&&(T.attr("data-range-y1",g),T.attr("data-range-y2",p)),new Li(this.ctx).setSelectionFilter(T,e,s),c.add(T);var X=new La(this).handleBarDataLabels({x:d,y:u,y1:g,y2:p,i:r,j:s,series:f,realIndex:e,columnGroupIndex:n,barHeight:x,barWidth:b,barXPosition:m,barYPosition:v,renderedPath:T,visibleSeries:A});return null!==X.dataLabels&&y.add(X.dataLabels),X.totalDataLabels&&y.add(X.totalDataLabels),c.add(y),w&&c.add(w),k&&c.add(k),c}},{key:"drawBarPaths",value:function(t){var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.yDivision,h=t.elSeries,c=this.w,d=i.i,u=i.j;if(c.globals.isXNumeric)e=(o=(c.globals.seriesX[d][u]-c.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var g=0,p=0;c.globals.seriesPercent.forEach((function(t,e){t[u]&&g++,e0&&(a=this.seriesLen*a/g),e=o+a*this.visibleI,e-=a*p}else e=o+a*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[d][u],r)-r)/2),n=this.barHelpers.getXForValue(this.series[d][u],r);var f=this.barHelpers.getBarpaths({barYPosition:e,barHeight:a,x1:r,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:d,j:u,w:c});return c.globals.isXNumeric||(o+=l),this.barHelpers.barBackground({j:u,i:d,y1:e-a*this.visibleI,y2:a*this.seriesLen,elSeries:h}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x1:r,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",r,null,d,u),barYPosition:e,barHeight:a}}},{key:"drawColumnPaths",value:function(t){var e,i=t.indexes,a=t.x,s=t.y,r=t.xDivision,n=t.barWidth,o=t.zeroH,l=t.strokeWidth,h=t.elSeries,c=this.w,d=i.realIndex,u=i.translationsIndex,g=i.i,p=i.j,f=i.bc;if(c.globals.isXNumeric){var x=this.getBarXForNumericXAxis({x:a,j:p,realIndex:d,barWidth:n});a=x.x,e=x.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var b=this.barHelpers.getZeroValueEncounters({i:g,j:p}),m=b.nonZeroColumns,v=b.zeroEncounters;m>0&&(n=this.seriesLen*n/m),e=a+n*this.visibleI,e-=n*v}else e=a+n*this.visibleI;s=this.barHelpers.getYForValue(this.series[g][p],o,u);var y=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:n,y1:o,y2:s,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:d,i:g,j:p,w:c});return c.globals.isXNumeric||(a+=r),this.barHelpers.barBackground({bc:f,j:p,i:g,x1:e-l/2-n*this.visibleI,x2:n*this.seriesLen+l/2,elSeries:h}),{pathTo:y.pathTo,pathFrom:y.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,g,p,u),barXPosition:e,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,i=t.barWidth,a=t.realIndex,s=t.j,r=this.w,n=a;return r.globals.seriesX[a].length||(n=r.globals.maxValsInArrayIndex),v.isNumber(r.globals.seriesX[n][s])&&(e=(r.globals.seriesX[n][s]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:e+i*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var i,a=this.w,s=0;s0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==a.globals.previousPaths[s].paths[e]&&(i=a.globals.previousPaths[s].paths[e].d)}return i}}]),t}(),Ia=function(t){h(a,t);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this,a=this.w;this.graphics=new Mi(this.ctx),this.bar=new Pa(this.ctx,this.xyRatios);var s=new Pi(this.ctx,a);t=s.getLogSeries(t),this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===a.config.chart.stackType&&(t=a.globals.comboCharts?e.map((function(t){return a.globals.seriesPercent[t]})):a.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);for(var r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),n=0,o=0,l=function(s,l){var h=void 0,c=void 0,d=void 0,g=void 0,p=a.globals.comboCharts?e[s]:s,f=i.barHelpers.getGroupIndex(p),x=f.groupIndex,b=f.columnGroupIndex;i.groupCtx=i[a.globals.seriesGroups[x]];var m=[],y=[],w=0;i.yRatio.length>1&&(i.yaxisIndex=a.globals.seriesYAxisReverseMap[p][0],w=p),i.isReversed=a.config.yaxis[i.yaxisIndex]&&a.config.yaxis[i.yaxisIndex].reversed;var k=i.graphics.group({class:"apexcharts-series",seriesName:v.escapeString(a.globals.seriesNames[p]),rel:s+1,"data:realIndex":p});i.ctx.series.addCollapsedClassToSeries(k,p);var A=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),C=i.graphics.group({class:"apexcharts-bar-goals-markers"}),S=0,L=0,M=i.initialPositions(n,o,h,c,d,g,w);o=M.y,S=M.barHeight,c=M.yDivision,g=M.zeroW,n=M.x,L=M.barWidth,h=M.xDivision,d=M.zeroH,a.globals.barHeight=S,a.globals.barWidth=L,i.barHelpers.initializeStackedXYVars(i),1===i.groupCtx.prevY.length&&i.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(i.groupCtx.prevY[0]=i.groupCtx.prevY[0].map((function(){return d})),i.groupCtx.prevYF[0]=i.groupCtx.prevYF[0].map((function(){return 0})));for(var P=0;P0||"top"===i.barHelpers.arrBorderRadius[p][P]&&a.globals.series[p][P]<0)&&(E=Y),k=i.renderSeries({realIndex:p,pathFill:R,j:P,i:s,columnGroupIndex:b,pathFrom:z.pathFrom,pathTo:z.pathTo,strokeWidth:I,elSeries:k,x:n,y:o,series:t,barHeight:S,barWidth:L,elDataLabelsWrap:A,elGoalsMarkers:C,type:"bar",visibleSeries:b,classes:E})}a.globals.seriesXvalues[p]=m,a.globals.seriesYvalues[p]=y,i.groupCtx.prevY.push(i.groupCtx.yArrj),i.groupCtx.prevYF.push(i.groupCtx.yArrjF),i.groupCtx.prevYVal.push(i.groupCtx.yArrjVal),i.groupCtx.prevX.push(i.groupCtx.xArrj),i.groupCtx.prevXF.push(i.groupCtx.xArrjF),i.groupCtx.prevXVal.push(i.groupCtx.xArrjVal),r.add(k)},h=0,c=0;h1?l=(i=h.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(d).indexOf("%")?l=parseInt(d,10):l*=parseInt(d,10)/100,s=this.isReversed?this.baseLineY[n]:h.globals.gridHeight-this.baseLineY[n],t=h.globals.padHorizontal+(i-l)/2}var u=h.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:i,barHeight:o/u,barWidth:l/u,zeroH:s,zeroW:r}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.columnGroupIndex,h=t.seriesGroup,c=t.yDivision,d=t.elSeries,u=this.w,g=o+l*a,p=i.i,f=i.j,x=i.realIndex,b=i.translationsIndex,m=0,v=0;v0){var w=r;this.groupCtx.prevXVal[y-1][f]<0?w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[y-1][f]:this.groupCtx.prevXVal[y-1][f]>=0&&(w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]:this.groupCtx.prevX[y-1][f]-m+2*(this.isReversed?m:0)),e=w}else e=r;n=null===this.series[p][f]?e:e+this.series[p][f]/this.invertedYRatio-2*(this.isReversed?this.series[p][f]/this.invertedYRatio:0);var k=this.barHelpers.getBarpaths({barYPosition:g,barHeight:a,x1:e,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,seriesGroup:h,i:p,j:f,w:u});return this.barHelpers.barBackground({j:f,i:p,y1:g,y2:a,elSeries:d}),o+=c,{pathTo:k.pathTo,pathFrom:k.pathFrom,goalX:this.barHelpers.getGoalValues("x",r,null,p,f,b),barXPosition:e,barYPosition:g,x:n,y:o}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,r=t.barWidth,n=t.zeroH,o=t.columnGroupIndex,l=t.seriesGroup,h=t.elSeries,c=this.w,d=e.i,u=e.j,g=e.bc,p=e.realIndex,f=e.translationsIndex;if(c.globals.isXNumeric){var x=c.globals.seriesX[p][u];x||(x=0),i=(x-c.globals.minX)/this.xRatio-r/2*c.globals.barGroups.length}for(var b,m=i+o*r,v=0,y=0;y0&&!c.globals.isXNumeric||w>0&&c.globals.isXNumeric&&c.globals.seriesX[p-1][u]===c.globals.seriesX[p][u]){var k,A,C,S=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var L=1;L=0?C-v+2*(this.isReversed?v:0):C;break}if((null===(T=this.groupCtx.prevYVal[w-P])||void 0===T?void 0:T[u])>=0){A=this.series[d][u]>=0?C:C+v-2*(this.isReversed?v:0);break}}void 0===A&&(A=c.globals.gridHeight),b=null!==(k=this.groupCtx.prevYF[0])&&void 0!==k&&k.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?n:A}else b=n;a=this.series[d][u]?b-this.series[d][u]/this.yRatio[f]+2*(this.isReversed?this.series[d][u]/this.yRatio[f]:0):b;var z=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:r,y1:b,y2:a,yRatio:this.yRatio[f],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:d,j:u,w:c});return this.barHelpers.barBackground({bc:g,j:u,i:d,x1:m,x2:r,elSeries:h}),{pathTo:z.pathTo,pathFrom:z.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,n,d,u),barXPosition:m,x:c.globals.isXNumeric?i:i+s,y:a}}}]),a}(Pa),Ta=function(t){h(a,t);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e,i){var a=this,s=this.w,r=new Mi(this.ctx),n=s.globals.comboCharts?e:s.config.chart.type,o=new ji(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=s.config.plotOptions.bar.horizontal;var l=new Pi(this.ctx,s);t=l.getLogSeries(t),this.series=t,this.yRatio=l.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var h=r.group({class:"apexcharts-".concat(n,"-series apexcharts-plot-series")}),c=function(e){a.isBoxPlot="boxPlot"===s.config.chart.type||"boxPlot"===s.config.series[e].type;var n,l,c,d,g=void 0,p=void 0,f=[],x=[],b=s.globals.comboCharts?i[e]:e,m=a.barHelpers.getGroupIndex(b).columnGroupIndex,y=r.group({class:"apexcharts-series",seriesName:v.escapeString(s.globals.seriesNames[b]),rel:e+1,"data:realIndex":b});a.ctx.series.addCollapsedClassToSeries(y,b),t[e].length>0&&(a.visibleI=a.visibleI+1);var w,k,A=0;a.yRatio.length>1&&(a.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],A=b);var C=a.barHelpers.initialPositions();p=C.y,w=C.barHeight,l=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,n=C.xDivision,c=C.zeroH,x.push(g+k/2);for(var S=r.group({class:"apexcharts-datalabels","data:realIndex":b}),L=r.group({class:"apexcharts-bar-goals-markers"}),M=function(i){var r=a.barHelpers.getStrokeWidth(e,i,b),h=null,v={indexes:{i:e,j:i,realIndex:b,translationsIndex:A},x:g,y:p,strokeWidth:r,elSeries:y};h=a.isHorizontal?a.drawHorizontalBoxPaths(u(u({},v),{},{yDivision:l,barHeight:w,zeroW:d})):a.drawVerticalBoxPaths(u(u({},v),{},{xDivision:n,barWidth:k,zeroH:c})),p=h.y,g=h.x;var C=a.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:h.barYPosition,goalX:h.goalX,goalY:h.goalY,barHeight:w,barWidth:k});C&&L.add(C),i>0&&x.push(g+k/2),f.push(p),h.pathTo.forEach((function(n,l){var c=!a.isBoxPlot&&a.candlestickOptions.wick.useFillColor?h.color[l]:s.globals.stroke.colors[e],d=o.fillPath({seriesNumber:b,dataPointIndex:i,color:h.color[l],value:t[e][i]});a.renderSeries({realIndex:b,pathFill:d,lineFill:c,j:i,i:e,pathFrom:h.pathFrom,pathTo:n,strokeWidth:r,elSeries:y,x:g,y:p,series:t,columnGroupIndex:m,barHeight:w,barWidth:k,elDataLabelsWrap:S,elGoalsMarkers:L,visibleSeries:a.visibleI,type:s.config.chart.type})}))},P=0;Pb.c&&(d=!1);var y=Math.min(b.o,b.c),w=Math.max(b.o,b.c),k=b.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[x][c]-o.globals.minX)/this.xRatio-s/2);var A=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(y=r,w=r):(y=r-y/f,w=r-w/f,m=r-b.h/f,v=r-b.l/f,k=r-b.m/f);var C=l.move(A,r),S=l.move(A+s/2,y);return o.globals.previousPaths.length>0&&(S=this.getPreviousPath(x,c,!0)),C=this.isBoxPlot?[l.move(A,y)+l.line(A+s/2,y)+l.line(A+s/2,m)+l.line(A+s/4,m)+l.line(A+s-s/4,m)+l.line(A+s/2,m)+l.line(A+s/2,y)+l.line(A+s,y)+l.line(A+s,k)+l.line(A,k)+l.line(A,y+n/2),l.move(A,k)+l.line(A+s,k)+l.line(A+s,w)+l.line(A+s/2,w)+l.line(A+s/2,v)+l.line(A+s-s/4,v)+l.line(A+s/4,v)+l.line(A+s/2,v)+l.line(A+s/2,w)+l.line(A,w)+l.line(A,k)+"z"]:[l.move(A,w)+l.line(A+s/2,w)+l.line(A+s/2,m)+l.line(A+s/2,w)+l.line(A+s,w)+l.line(A+s,y)+l.line(A+s/2,y)+l.line(A+s/2,v)+l.line(A+s/2,y)+l.line(A,y)+l.line(A,w-n/2)],S+=l.move(A,y),o.globals.isXNumeric||(i+=a),{pathTo:C,pathFrom:S,x:i,y:w,goalY:this.barHelpers.getGoalValues("y",null,r,h,c,e.translationsIndex),barXPosition:A,color:this.isBoxPlot?p:d?[u]:[g]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var i=t.y,a=t.yDivision,s=t.barHeight,r=t.zeroW,n=t.strokeWidth,o=this.w,l=new Mi(this.ctx),h=e.i,c=e.j,d=this.boxOptions.colors.lower;this.isBoxPlot&&(d=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,g=e.realIndex,p=this.getOHLCValue(g,c),f=r,x=r,b=Math.min(p.o,p.c),m=Math.max(p.o,p.c),v=p.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[g][c]-o.globals.minX)/this.invertedXRatio-s/2);var y=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(b=r,m=r):(b=r+b/u,m=r+m/u,f=r+p.h/u,x=r+p.l/u,v=r+p.m/u);var w=l.move(r,y),k=l.move(b,y+s/2);return o.globals.previousPaths.length>0&&(k=this.getPreviousPath(g,c,!0)),w=[l.move(b,y)+l.line(b,y+s/2)+l.line(f,y+s/2)+l.line(f,y+s/2-s/4)+l.line(f,y+s/2+s/4)+l.line(f,y+s/2)+l.line(b,y+s/2)+l.line(b,y+s)+l.line(v,y+s)+l.line(v,y)+l.line(b+n/2,y),l.move(v,y)+l.line(v,y+s)+l.line(m,y+s)+l.line(m,y+s/2)+l.line(x,y+s/2)+l.line(x,y+s-s/4)+l.line(x,y+s/4)+l.line(x,y+s/2)+l.line(m,y+s/2)+l.line(m,y)+l.line(v,y)+"z"],k+=l.move(b,y),o.globals.isXNumeric||(i+=a),{pathTo:w,pathFrom:k,x:m,y:i,goalX:this.barHelpers.getGoalValues("x",r,null,h,c),barYPosition:y,color:d}}},{key:"getOHLCValue",value:function(t,e){var i=this.w;return{o:this.isBoxPlot?i.globals.seriesCandleH[t][e]:i.globals.seriesCandleO[t][e],h:this.isBoxPlot?i.globals.seriesCandleO[t][e]:i.globals.seriesCandleH[t][e],m:i.globals.seriesCandleM[t][e],l:this.isBoxPlot?i.globals.seriesCandleC[t][e]:i.globals.seriesCandleL[t][e],c:this.isBoxPlot?i.globals.seriesCandleL[t][e]:i.globals.seriesCandleC[t][e]}}}]),a}(Pa),za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,a){var s=this.w,r=1,n=s.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,i);s.globals.hasNegs||a?r=s.config.plotOptions[t].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):(1-o.percent/100)*(1.25*n):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(r=1-o.percent/100,"treemap"===t&&(r=(1-o.percent/100)*(1.25*n)));var l=o.color,h=new v;if(s.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var c=h.shadeColor(-1*r,o.color);l=v.hexToRgba(v.isColorHex(c)?c:v.rgb2hex(c),s.config.fill.opacity)}else{var d=h.shadeColor(r,o.color);l=v.hexToRgba(v.isColorHex(d)?d:v.rgb2hex(d),s.config.fill.opacity)}return{color:l,colorProps:o}}},{key:"determineColor",value:function(t,e,i){var a=this.w,s=a.globals.series[e][i],r=a.config.plotOptions[t],n=r.colorScale.inverse?i:e;r.distributed&&"treemap"===a.config.chart.type&&(n=i);var o=a.globals.colors[n],l=null,h=Math.min.apply(Math,f(a.globals.series[e])),c=Math.max.apply(Math,f(a.globals.series[e]));r.distributed||"heatmap"!==t||(h=a.globals.minY,c=a.globals.maxY),void 0!==r.colorScale.min&&(h=r.colorScale.mina.globals.maxY?r.colorScale.max:a.globals.maxY);var d=Math.abs(c)+Math.abs(h),u=100*s/(0===d?d-1e-6:d);r.colorScale.ranges.length>0&&r.colorScale.ranges.map((function(t,e){if(s>=t.from&&s<=t.to){o=t.color,l=t.foreColor?t.foreColor:null,h=t.from,c=t.to;var i=Math.abs(c)+Math.abs(h);u=100*s/(0===i?i-1e-6:i)}}));return{color:o,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,a=t.y,s=t.i,r=t.j,n=t.colorProps,o=t.fontSize,l=this.w.config.dataLabels,h=new Mi(this.ctx),c=new qi(this.ctx),d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});var u=l.offsetX,g=l.offsetY,p=i+u,f=a+parseFloat(l.style.fontSize)/3+g;c.plotDataLabelsText({x:p,y:f,text:e,i:s,j:r,color:n.foreColor,parent:d,fontSize:o,dataLabelsConfig:l})}return d}},{key:"addListeners",value:function(t){var e=new Mi(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),Xa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w,this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new za(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return s(t,[{key:"draw",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var s=e.globals.gridWidth/e.globals.dataPoints,r=e.globals.gridHeight/e.globals.series.length,n=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var h=o?0:l.length-1;o?h=0;o?h++:h--){var c=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:v.escapeString(e.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(this.ctx.series.addCollapsedClassToSeries(c,h),e.config.chart.dropShadow.enabled){var d=e.config.chart.dropShadow;new Li(this.ctx).dropShadow(c,d,h)}for(var u=0,g=e.config.plotOptions.heatmap.shadeIntensity,p=0;p-1&&this.pieClicked(d),i.config.dataLabels.enabled){var w=m.x,k=m.y,A=100*g/this.fullAngle+"%";if(0!==g&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(h=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(h)>this.fullAngle&&(h-=this.fullAngle);var c=Math.PI*(h-90)/180,d=i.centerX+r*Math.cos(l),u=i.centerY+r*Math.sin(l),g=i.centerX+r*Math.cos(c),p=i.centerY+r*Math.sin(c),f=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,h),x=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),b=s>180?1:0,m=["M",d,u,"A",r,r,0,b,1,g,p];return e="donut"===i.chartType?[].concat(m,["L",f.x,f.y,"A",i.donutSize,i.donutSize,0,b,0,x.x,x.y,"L",d,u,"z"]).join(" "):"pie"===i.chartType||"polarArea"===i.chartType?[].concat(m,["L",i.centerX,i.centerY,"L",d,u]).join(" "):[].concat(m).join(" "),n.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new ta(this.ctx),a=new Mi(this.ctx),s=new Ra(this.ctx),r=a.group(),n=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),h=o.result.length;this.maxY=o.niceMax;for(var c=e.globals.radialSize,d=c/(h-1),u=0;u1&&t.total.show&&(s=t.total.color);var n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,r),a||"function"!=typeof t.total.formatter||(i=t.total.formatter(r));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,r):"",null!==n&&(n.textContent=e),null!==o&&(o.textContent=i),null!==n&&(n.style.fill=s)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,a=t.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,s,a,t);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,a=new Mi(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(0!==s.strokeWidth){for(var r=[],n=360/i.globals.series.length,o=0;o0&&(f=e.getPreviousPath(n));for(var x=0;x=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?s-=10:t.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,a=0;a0&&parseInt(s.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[a].paths[0]&&(i=e.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var a=[],s=0;s=360&&(u=360-Math.abs(this.startAngle)-.1);var g=i.drawPath({d:"",stroke:c,strokeWidth:n*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){var p=h.dropShadow;s.dropShadow(g,p)}l.add(g),g.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(g,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:d,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return a}},{key:"drawArcs",value:function(t){var e=this.w,i=new Mi(this.ctx),a=new ji(this.ctx),s=new Li(this.ctx),r=i.group(),n=this.getStrokeWidth(t);t.size=t.size-n/2;var o=e.config.plotOptions.radialBar.hollow.background,l=t.size-n*t.series.length-this.margin*t.series.length-n*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(t,r,l,o));var c=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:o||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var d=e.config.plotOptions.radialBar.hollow.dropShadow;s.dropShadow(c,d)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var g=null;if(this.radialDataLabels.show){var p=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");g=this.renderInnerDataLabels(p,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})}"back"===e.config.plotOptions.radialBar.hollow.position&&(r.add(c),g&&r.add(g));var f=!1;e.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var x=f?t.series.length-1:0;f?x>=0:x100?100:t.series[x])/100,A=Math.round(this.totalAngle*k)+this.startAngle,C=void 0;e.globals.dataChanged&&(w=this.startAngle,C=Math.round(this.totalAngle*v.negToZero(e.globals.previousPaths[x])/100)+w),Math.abs(A)+Math.abs(y)>360&&(A-=.01),Math.abs(C)+Math.abs(w)>360&&(C-=.01);var S=A-y,L=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[x]:e.config.stroke.dashArray,M=i.drawPath({d:"",stroke:m,strokeWidth:n,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+x,strokeDashArray:L});if(Mi.setAttrs(M.node,{"data:angle":S,"data:value":t.series[x]}),e.config.chart.dropShadow.enabled){var P=e.config.chart.dropShadow;s.dropShadow(M,P,x)}if(s.setSelectionFilter(M,0,x),this.addListeners(M,this.radialDataLabels),b.add(M),M.attr({index:0,j:x}),this.barLabels.enabled){var I=v.polarToCartesian(t.centerX,t.centerY,t.size,y),T=this.barLabels.formatter(e.globals.seriesNames[x],{seriesIndex:x,w:e}),z=["apexcharts-radialbar-label"];this.barLabels.onClick||z.push("apexcharts-no-click");var X=this.barLabels.useSeriesColors?e.globals.colors[x]:e.config.chart.foreColor;X||(X=e.config.chart.foreColor);var R=I.x+this.barLabels.offsetX,E=I.y+this.barLabels.offsetY,Y=i.drawText({x:R,y:E,text:T,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:X,cssClass:z.join(" ")});Y.on("click",this.onBarLabelClick),Y.attr({rel:x+1}),0!==y&&Y.attr({"transform-origin":"".concat(R," ").concat(E),transform:"rotate(".concat(y," 0 0)")}),b.add(Y)}var H=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(H=e.config.chart.animations.speed),e.globals.dataChanged&&(H=e.config.chart.animations.dynamicAnimation.speed),this.animDur=H/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(M,{centerX:t.centerX,centerY:t.centerY,endAngle:A,startAngle:y,prevEndAngle:C,prevStartAngle:w,size:t.size,i:x,totalItems:2,animBeginArr:this.animBeginArr,dur:H,shouldSetPrevPaths:!0})}return{g:r,elHollow:c,dataLabels:g}}},{key:"drawHollow",value:function(t){var e=new Mi(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,a){var s=this.w,r=new ji(this.ctx),n=v.randomId(),o=s.config.plotOptions.radialBar.hollow.image;if(s.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:o,patternID:"pattern".concat(s.globals.cuid).concat(n)}),a="url(#pattern".concat(s.globals.cuid).concat(n,")");else{var l=s.config.plotOptions.radialBar.hollow.imageWidth,h=s.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===h){var c=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-e.width/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+s.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(c)}else{var d=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-l/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-h/2+s.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,h)}));e.add(d)}}return a}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,i=this.barLabels.onClick,a=this.w;i&&i(a.globals.seriesNames[e],{w:a,seriesIndex:e})}}]),r}(Ea),Oa=function(t){h(a,t);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var s=a.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),r=0;r0&&(this.visibleI=this.visibleI+1);var x=0,b=0,m=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[g][0],m=g);var y=this.barHelpers.initialPositions();d=y.y,h=y.zeroW,c=y.x,b=y.barWidth,x=y.barHeight,n=y.xDivision,o=y.yDivision,l=y.zeroH;for(var w=a.group({class:"apexcharts-datalabels","data:realIndex":g}),k=a.group({class:"apexcharts-rangebar-goals-markers"}),A=0;A0}));return this.isHorizontal?(a=u.config.plotOptions.bar.rangeBarGroupRows?r+h*b:r+o*this.visibleI+h*b,m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(a=(o=d.barHeight/g.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+g.indexOf(p))+h*b)):(b>-1&&!u.globals.timescaleLabels.length&&(s=u.config.plotOptions.bar.rangeBarGroupRows?n+c*b:n+l*this.visibleI+c*b),m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(s=(l=d.barWidth/g.length)*this.visibleI+c*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+g.indexOf(p))+c*b)),{barYPosition:a,barXPosition:s,barHeight:o,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.xDivision,s=t.barWidth,r=t.barXPosition,n=t.zeroH,o=this.w,l=e.i,h=e.j,c=e.realIndex,d=e.translationsIndex,u=this.yRatio[d],g=this.getRangeValue(c,h),p=Math.min(g.start,g.end),f=Math.max(g.start,g.end);void 0===this.series[l][h]||null===this.series[l][h]?p=n:(p=n-p/u,f=n-f/u);var x=Math.abs(f-p),b=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:s,y1:p,y2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:c,i:c,j:h,w:o});if(o.globals.isXNumeric){var m=this.getBarXForNumericXAxis({x:i,j:h,realIndex:c,barWidth:s});i=m.x,r=m.barXPosition}else i+=a;return{pathTo:b.pathTo,pathFrom:b.pathFrom,barHeight:x,x:i,y:g.start<0&&g.end<0?p:f,goalY:this.barHelpers.getGoalValues("y",null,n,l,h,d),barXPosition:r}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,a=t.y1,s=t.y2,r=t.yDivision,n=t.barHeight,o=t.barYPosition,l=t.zeroW,h=this.w,c=e.realIndex,d=e.j,u=this.preventBarOverflow(l+a/this.invertedYRatio),g=this.preventBarOverflow(l+s/this.invertedYRatio),p=this.getRangeValue(c,d),f=Math.abs(g-u),x=this.barHelpers.getBarpaths({barYPosition:o,barHeight:n,x1:u,x2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:c,realIndex:c,j:d,w:h});return h.globals.isXNumeric||(i+=r),{pathTo:x.pathTo,pathFrom:x.pathFrom,barWidth:f,x:p.start<0&&p.end<0?u:g,goalX:this.barHelpers.getGoalValues("x",l,null,c,d),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}}]),a}(Pa),Fa=function(){function t(e){i(this,t),this.w=e.w,this.lineCtx=e}return s(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new Pi(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,a=t.x,s=t.y,r=t.i,n=t.j,o=t.prevY,l=this.w,h=[],c=[];if(0===n){var d=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(d=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),h.push(d),c.push(v.isNumber(e[r][0])?o+l.config.markers.offsetY:null),h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null)}else h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null);return{x:h,y:c}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,a=t.realIndex,s=this.w,r=0;r0&&parseInt(n.realIndex,10)===parseInt(a,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,e=s.globals.previousPaths[r].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[r].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[r].paths[1]&&(e=s.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e,i,a,s=t.i,r=t.realIndex,n=t.series,o=t.prevY,l=t.lineYPosition,h=t.translationsIndex,c=this.w,d=c.config.chart.stacked&&!c.globals.comboCharts||c.config.chart.stacked&&c.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[r])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[r])||void 0===i?void 0:i.type));if(void 0!==(null===(a=n[s])||void 0===a?void 0:a[0]))o=(l=d&&s>0?this.lineCtx.prevSeriesY[s-1][0]:this.lineCtx.zeroY)-n[s][0]/this.lineCtx.yRatio[h]+2*(this.lineCtx.isReversed?n[s][0]/this.lineCtx.yRatio[h]:0);else if(d&&s>0&&void 0===n[s][0])for(var u=s-1;u>=0;u--)if(null!==n[u][0]&&void 0!==n[u][0]){o=l=this.lineCtx.prevSeriesY[u][0];break}return{prevY:o,lineYPosition:l}}}]),t}(),Da=function(t){for(var e,i,a,s,r=function(t){for(var e=[],i=t[0],a=t[1],s=e[0]=Wa(i,a),r=1,n=t.length-1;r9&&(s=3*a/Math.sqrt(s),r[l]=s*e,r[l+1]=s*i);for(var h=0;h<=n;h++)s=(t[Math.min(n,h+1)][0]-t[Math.max(0,h-1)][0])/(6*(1+r[h]*r[h])),o.push([s||0,r[h]*s||0]);return o},_a=function(t){var e=Da(t),i=t[1],a=t[0],s=[],r=e[1],n=e[0];s.push(a,[a[0]+n[0],a[1]+n[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(var o=2,l=e.length;o1&&a[1].length<6){var s=a[0].length;a[1]=[2*a[0][s-2]-a[0][s-4],2*a[0][s-1]-a[0][s-3]].concat(a[1])}a[0]=a[0].slice(-2)}return a};function Wa(t,e){return(e[1]-t[1])/(e[0]-t[0])}var Ba=function(){function t(e,a,s){i(this,t),this.ctx=e,this.w=e.w,this.xyRatios=a,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||s,this.scatter=new Ui(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Fa(this),this.markers=new Vi(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return s(t,[{key:"draw",value:function(t,e,i,a){var s,r=this.w,n=new Mi(this.ctx),o=r.globals.comboCharts?e:r.config.chart.type,l=n.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),h=new Pi(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=h.getLogSeries(t),this.yRatio=h.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var c=[],d=0;d1?g:0;this._initSerieVariables(t,d,g);var f=[],x=[],b=[],m=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,g),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(m=(r.globals.seriesX[g][0]-r.globals.minX)/this.xRatio),b.push(m);var v,y=m,w=void 0,k=y,A=this.zeroY,C=this.zeroY;A=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:t,prevY:A,lineYPosition:0,translationsIndex:p}).prevY,"monotoneCubic"===r.config.stroke.curve&&null===t[d][0]?f.push(null):f.push(A),v=A;"rangeArea"===o&&(w=C=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:a,prevY:C,lineYPosition:0,translationsIndex:p}).prevY,x.push(null!==f[0]?C:null));var S=this._calculatePathsFrom({type:o,series:t,i:d,realIndex:g,translationsIndex:p,prevX:k,prevY:A,prevY2:C}),L=[f[0]],M=[x[0]],P={type:o,series:t,realIndex:g,translationsIndex:p,i:d,x:m,y:1,pX:y,pY:v,pathsFrom:S,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:b,yArrj:f,y2Arrj:x,seriesRangeEnd:a},I=this._iterateOverDataPoints(u(u({},P),{},{iterations:"rangeArea"===o?t[d].length-1:void 0,isRangeStart:!0}));if("rangeArea"===o){for(var T=this._calculatePathsFrom({series:a,i:d,realIndex:g,prevX:k,prevY:C}),z=this._iterateOverDataPoints(u(u({},P),{},{series:a,xArrj:[m],yArrj:L,y2Arrj:M,pY:w,areaPaths:I.areaPaths,pathsFrom:T,iterations:a[d].length-1,isRangeStart:!1})),X=I.linePaths.length/2,R=0;R=0;E--)l.add(c[E]);else for(var Y=0;Y1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[r]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",zIndex:void 0!==a.config.series[i].zIndex?a.config.series[i].zIndex:i,seriesName:v.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i});var n=t[e].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,a,s,r=t.type,n=t.series,o=t.i,l=t.realIndex,h=t.translationsIndex,c=t.prevX,d=t.prevY,u=t.prevY2,g=this.w,p=new Mi(this.ctx);if(null===n[o][0]){for(var f=0;f0){var x=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:l});a=x.pathFromLine,s=x.pathFromArea}return{prevX:c,prevY:d,linePath:e,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(t){var e=t.type,i=t.realIndex,a=t.i,s=t.paths,r=this.w,n=new Mi(this.ctx),o=new ji(this.ctx);this.prevSeriesY.push(s.yArrj),r.globals.seriesXvalues[i]=s.xArrj,r.globals.seriesYvalues[i]=s.yArrj;var l=r.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var h=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-l.count-1],c=n.drawRect(h,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(c.node);var d=n.drawRect(0,0,h,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(d.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var g={i:a,realIndex:i,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var p=o.fillPath({seriesNumber:i}),f=0;f0&&"rangeArea"!==e){var A=n.renderPaths(w);A.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&A.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(A),A.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),k.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,i,a=this,s=t.type,r=t.series,n=t.iterations,o=t.realIndex,l=t.translationsIndex,h=t.i,c=t.x,d=t.y,u=t.pX,g=t.pY,p=t.pathsFrom,f=t.linePaths,x=t.areaPaths,b=t.seriesIndex,m=t.lineYPosition,y=t.xArrj,w=t.yArrj,k=t.y2Arrj,A=t.isRangeStart,C=t.seriesRangeEnd,S=this.w,L=new Mi(this.ctx),M=this.yRatio,P=p.prevY,I=p.linePath,T=p.areaPath,z=p.pathFromLine,X=p.pathFromArea,R=v.isNumber(S.globals.minYArr[o])?S.globals.minYArr[o]:S.globals.minY;n||(n=S.globals.dataPoints>1?S.globals.dataPoints-1:S.globals.dataPoints);var E=function(t,e){return e-t/M[l]+2*(a.isReversed?t/M[l]:0)},Y=d,H=S.config.chart.stacked&&!S.globals.comboCharts||S.config.chart.stacked&&S.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[o])||void 0===i?void 0:i.type)),O=S.config.stroke.curve;Array.isArray(O)&&(O=Array.isArray(b)?O[b[h]]:O[h]);for(var F,D=0,_=0;_0&&S.globals.collapsedSeries.length0;e--){if(!(S.globals.collapsedSeriesIndices.indexOf((null==b?void 0:b[e])||e)>-1))return e;e--}return 0}(h-1)][_+1]}else m=this.zeroY;else m=this.zeroY;N?d=E(R,m):(d=E(r[h][_+1],m),"rangeArea"===s&&(Y=E(C[h][_+1],m))),y.push(c),!N||"smooth"!==S.config.stroke.curve&&"monotoneCubic"!==S.config.stroke.curve?(w.push(d),k.push(Y)):(w.push(null),k.push(null));var B=this.lineHelpers.calculatePoints({series:r,x:c,y:d,realIndex:o,i:h,j:_,prevY:P}),G=this._createPaths({type:s,series:r,i:h,realIndex:o,j:_,x:c,y:d,y2:Y,xArrj:y,yArrj:w,y2Arrj:k,pX:u,pY:g,pathState:D,segmentStartX:F,linePath:I,areaPath:T,linePaths:f,areaPaths:x,curve:O,isRangeStart:A});x=G.areaPaths,f=G.linePaths,u=G.pX,g=G.pY,D=G.pathState,F=G.segmentStartX,T=G.areaPath,I=G.linePath,!this.appendPathFrom||S.globals.hasNullValues||"monotoneCubic"===O&&"rangeArea"===s||(z+=L.line(c,this.areaBottomY),X+=L.line(c,this.areaBottomY)),this.handleNullDataPoints(r,B,h,_,o),this._handleMarkersAndLabels({type:s,pointsPos:B,i:h,j:_,realIndex:o,isRangeStart:A})}return{yArrj:w,xArrj:y,pathFromArea:X,areaPaths:x,pathFromLine:z,linePaths:f,linePath:I,areaPath:T}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,i=t.pointsPos,a=t.isRangeStart,s=t.i,r=t.j,n=t.realIndex,o=this.w,l=new qi(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var h=this.markers.plotChartMarkers(i,n,r+1);null!==h&&this.elPointsMain.add(h)}var c=l.drawDataLabel({type:e,isRangeStart:a,pos:i,i:n,j:r+1});null!==c&&this.elDataLabelsWrap.add(c)}},{key:"_createPaths",value:function(t){var e=t.type,i=t.series,a=t.i;t.realIndex;var s,r=t.j,n=t.x,o=t.y,l=t.xArrj,h=t.yArrj,c=t.y2,d=t.y2Arrj,u=t.pX,g=t.pY,p=t.pathState,f=t.segmentStartX,x=t.linePath,b=t.areaPath,m=t.linePaths,v=t.areaPaths,y=t.curve,w=t.isRangeStart,k=new Mi(this.ctx),A=this.areaBottomY,C="rangeArea"===e,S="rangeArea"===e&&w;switch(y){case"monotoneCubic":var L=w?h:d;switch(p){case 0:if(null===L[r+1])break;p=1;case 1:if(!(C?l.length===i[a].length:r===i[a].length-2))break;case 2:var M=w?l:l.slice().reverse(),P=w?L:L.slice().reverse(),I=(s=P,M.map((function(t,e){return[t,s[e]]})).filter((function(t){return null!==t[1]}))),T=I.length>1?_a(I):I,z=[];C&&(S?v=I:z=v.reverse());var X=0,R=0;if(function(t,e){for(var i=function(t){var e=[],i=0;return t.forEach((function(t){null!==t?i++:i>0&&(e.push(i),i=0)})),i>0&&e.push(i),e}(t),a=[],s=0,r=0;s4?(e+="C".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]),e+=", ".concat(a[4],", ").concat(a[5])):s>2&&(e+="S".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]))}return e}(t),i=R,a=(R+=t.length)-1;S?x=k.move(I[i][0],I[i][1])+e:C?x=k.move(z[i][0],z[i][1])+k.line(I[i][0],I[i][1])+e+k.line(z[a][0],z[a][1]):(x=k.move(I[i][0],I[i][1])+e,b=x+k.line(I[a][0],A)+k.line(I[i][0],A)+"z",v.push(b)),m.push(x)})),C&&X>1&&!S){var E=m.slice(X).reverse();m.splice(X),E.forEach((function(t){return m.push(t)}))}p=0}break;case"smooth":var Y=.35*(n-u);if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.curve(n,o,n,o,n,c)+k.move(n,c)),b+=k.curve(n,o,n,o,n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o;break;default:var F=function(t,e,i){var a=[];switch(t){case"stepline":a=k.line(e,null,"H")+k.line(null,i,"V");break;case"linestep":a=k.line(null,i,"V")+k.line(e,null,"H");break;case"straight":a=k.line(e,i)}return a};if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.line(n,c)),b+=k.line(n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o}return{linePaths:m,areaPaths:v,pX:u,pY:g,pathState:p,segmentStartX:f,linePath:x,areaPath:b}}},{key:"handleNullDataPoints",value:function(t,e,i,a,s){var r=this.w;if(null===t[i][a]&&r.config.markers.showNullDataPoints||1===t[i].length){var n=this.strokeWidth-r.config.markers.strokeWidth/2;n>0||(n=0);var o=this.markers.plotChartMarkers(e,s,a+1,n,!0);null!==o&&this.elPointsMain.add(o)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,a,s){this.xoffset=e,this.yoffset=i,this.height=s,this.width=a,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],a=this.xoffset,s=this.yoffset,n=r(t)/this.height,o=r(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var a=e/this.height,s=this.width-a;i=new t(this.xoffset+a,this.yoffset,s,this.height)}else{var r=e/this.width,n=this.height-r;i=new t(this.xoffset,this.yoffset+r,this.width,n)}return i}}function e(e,a,s,n,o){n=void 0===n?0:n,o=void 0===o?0:o;var l=i(function(t,e){var i,a=[],s=e/r(t);for(i=0;i=n}(e,l=t[0],o)?(e.push(l),i(t.slice(1),e,s,n)):(h=s.cutArea(r(e),n),n.push(s.getCoordinates(e)),i(t,[],h,n)),n;n.push(s.getCoordinates(e))}function a(t,e){var i=Math.min.apply(Math,t),a=Math.max.apply(Math,t),s=r(t);return Math.max(Math.pow(e,2)*a/Math.pow(s,2),Math.pow(s,2)/(Math.pow(e,2)*i))}function s(t){return t&&t.constructor===Array}function r(t){var e,i=0;for(e=0;er-a&&l.width<=n-s){var h=o.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(h.x," ").concat(h.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,i,a,s,r){var n=new Mi(this.ctx),o=n.getTextRects(t,e).width+this.w.config.stroke.width+5>s-i&&r-a>s-i?r-a:s-i,l=n.getTextBasedOnMaxWidth({text:t,maxWidth:o,fontSize:e});return t.length!==l.length&&o/e<5?"":l}},{key:"animateTreemap",value:function(t,e,i,a){var s=new y(this.ctx);s.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,(function(){s.animationCompleted(t)}))}}]),t}(),ja=86400,Va=10/ja,Ua=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return s(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new zi(this.ctx),r=(e-t)/864e5;this.determineInterval(r),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,r5e4&&(a.globals.disableZoomOut=!0);var n=s.getTimeUnitsfromTimestamp(t,e,this.utc),o=a.globals.gridWidth/r,l=o/24,h=l/60,c=h/60,d=Math.floor(24*r),g=Math.floor(1440*r),p=Math.floor(r*ja),f=Math.floor(r),x=Math.floor(r/30),b=Math.floor(r/365),m={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},v={firstVal:m,currentMillisecond:m.minMillisecond,currentSecond:m.minSecond,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:l,minutesWidthOnXAxis:h,secondsWidthOnXAxis:c,numberOfSeconds:p,numberOfMinutes:g,numberOfHours:d,numberOfDays:f,numberOfMonths:x,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var y=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?u(u({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?u(u({},e),{},{value:t.value}):"minute"===t.unit?u(u({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?u(u({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return y.filter((function(t){var e=1,s=Math.ceil(a.globals.gridWidth/120),r=t.value;void 0!==a.config.xaxis.tickAmount&&(s=a.config.xaxis.tickAmount),y.length>s&&(e=Math.floor(y.length/s));var n=!1,o=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(n=!0);break;case"half_year":e=7,"year"===t.unit&&(n=!0);break;case"months":e=1,"year"===t.unit&&(n=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(n=!0),30===r&&(o=!0);break;case"months_days":e=10,"month"===t.unit&&(n=!0),30===r&&(o=!0);break;case"week_days":e=8,"month"===t.unit&&(n=!0);break;case"days":e=1,"month"===t.unit&&(n=!0);break;case"hours":"day"===t.unit&&(n=!0);break;case"minutes_fives":case"seconds_fives":r%5!=0&&(o=!0);break;case"seconds_tens":r%10!=0&&(o=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!o)return!0}else if((r%e==0||n)&&!o)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,a=this.formatDates(t),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new pa(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.daysWidthOnXAxis,r=t.numberOfYears,n=e.minYear,o=0,l=new zi(this.ctx),h="year";if(e.minDate>1||e.minMonth>0){var c=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(l.determineDaysOfYear(e.minYear)-c+1)*s,n=e.minYear+1,this.timeScaleArray.push({position:o,value:n,unit:h,year:n,month:v.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:o,value:n,unit:h,year:a,month:v.monthMod(i+1)});for(var d=n,u=o,g=0;g1){l=(h.determineDaysOfMonths(a+1,e.minYear)-i+1)*r,o=v.monthMod(a+1);var u=s+d,g=v.monthMod(o),p=o;0===o&&(c="year",p=u,g=1,u+=d+=1),this.timeScaleArray.push({position:l,value:p,unit:c,year:u,month:g})}else this.timeScaleArray.push({position:l,value:o,unit:c,year:s,month:v.monthMod(a)});for(var f=o+1,x=l,b=0,m=1;bn.determineDaysOfMonths(e+1,i)?(h=1,o="month",u=e+=1,e):e},d=(24-e.minHour)*s,u=l,g=c(h,i,a);0===e.minHour&&1===e.minDate?(d=0,u=v.monthMod(e.minMonth),o="month",h=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(d=0,l=e.minDate,u=l,g=c(h=l,i,a)),this.timeScaleArray.push({position:d,value:u,unit:o,year:this._getYear(a,g,0),month:v.monthMod(g),day:h});for(var p=d,f=0;fo.determineDaysOfMonths(e+1,s)&&(f=1,e+=1),{month:e,date:f}},c=function(t,e){return t>o.determineDaysOfMonths(e+1,s)?e+=1:e},d=60-(e.minMinute+e.minSecond/60),u=d*r,g=e.minHour+1,p=g;60===d&&(u=0,p=g=e.minHour);var f=i;p>=24&&(p=0,l="day",g=f+=1);var x=h(f,a).month;x=c(f,x),this.timeScaleArray.push({position:u,value:g,unit:l,day:f,hour:p,year:s,month:v.monthMod(x)}),p++;for(var b=u,m=0;m=24)p=0,l="day",x=h(f+=1,x).month,x=c(f,x);var y=this._getYear(s,x,0);b=60*r+b;var w=0===p?f:p;this.timeScaleArray.push({position:b,value:w,unit:l,hour:p,day:f,year:y,month:v.monthMod(x)}),p++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.minutesWidthOnXAxis,h=t.secondsWidthOnXAxis,c=t.numberOfMinutes,d=a+1,u=r,g=n,p=o,f=s,x=(60-i-e/1e3)*h,b=0;b=60&&(d=0,24===(f+=1)&&(f=0)),this.timeScaleArray.push({position:x,value:d,unit:"minute",hour:f,minute:d,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,d++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.secondsWidthOnXAxis,h=t.numberOfSeconds,c=i+1,d=a,u=r,g=n,p=o,f=s,x=(1e3-e)/1e3*l,b=0;b=60&&(c=0,++d>=60&&(d=0,24===++f&&(f=0))),this.timeScaleArray.push({position:x,value:c,unit:"second",hour:f,minute:d,second:c,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,c++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var a=t.value.toString(),s=new zi(e.ctx),r=e.createRawDateString(t,a),n=s.getDate(s.parseDate(r));if(e.utc||(n=s.getDate(s.parseDateWithTimezone(r))),void 0===i.config.xaxis.labels.format){var o="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(o=l.year),"month"===t.unit&&(o=l.month),"day"===t.unit&&(o=l.day),"hour"===t.unit&&(o=l.hour),"minute"===t.unit&&(o=l.minute),"second"===t.unit&&(o=l.second),a=s.formatDate(n,o)}else a=s.formatDate(n,i.config.xaxis.labels.format);return{dateString:r,position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,a=new Mi(this.ctx),s=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(s=!0,e=a.getTextRects(t[0].value).width);var r=0,n=t.map((function(n,o){if(o>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=s?e:a.getTextRects(t[r].value).width,h=t[r].position;return n.position>h+l+10?(r=o,n):null}return n}));return n=n.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),qa=function(){function t(e,a){i(this,t),this.ctx=a,this.w=a.w,this.el=e}return s(t,[{key:"setupElements",value:function(){var t=this.w,e=t.globals,i=t.config,a=i.chart.type;e.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(a),e.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(a),e.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(a)&&i.plotOptions.bar.horizontal,e.chartClass=".apexcharts".concat(e.chartID),e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),Mi.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas ".concat(e.chartClass.substring(1))}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=window.SVG().addTo(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(i.chart.offsetX,", ").concat(i.chart.offsetY,")")}),e.dom.Paper.node.style.background="dark"!==i.theme.mode||i.chart.background?"light"!==i.theme.mode||i.chart.background?i.chart.background:"#fff":"#424242",this.setSVGDimensions(),e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject"),Mi.setAttrs(e.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap),e.dom.Paper.node.appendChild(e.dom.elLegendForeign),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,a=this.ctx,s=i.config,r=i.globals,n={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},o=s.chart.type||"line",l=null,h=0;r.series.forEach((function(e,a){var s=t[a].type||o;n[s]?("rangeArea"===s?(n[s].series.push(r.seriesRangeStart[a]),n[s].seriesRangeEnd.push(r.seriesRangeEnd[a])):n[s].series.push(e),n[s].i.push(a),"column"!==s&&"bar"!==s||(i.globals.columnSeries=n.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(s)?l=s:"bar"===s?(n.column.series.push(e),n.column.i.push(a)):console.warn("You have specified an unrecognized series type (".concat(s,").")),o!==s&&"scatter"!==s&&h++})),h>0&&(l&&console.warn("Chart or series type ".concat(l," cannot appear with other chart or series types.")),n.column.series.length>0&&s.plotOptions.bar.horizontal&&(h-=n.column.series.length,n.column={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||(r.comboCharts=h>0);var c=new Ba(a,e),d=new Ta(a,e);a.pie=new Ea(a);var u=new Ha(a);a.rangeBar=new Oa(a,e);var g=new Ya(a),p=[];if(r.comboCharts){var x,b,m=new Pi(a);if(n.area.series.length>0)(x=p).push.apply(x,f(m.drawSeriesByGroup(n.area,r.areaGroups,"area",c)));if(n.column.series.length>0)if(s.chart.stacked){var v=new Ia(a,e);p.push(v.draw(n.column.series,n.column.i))}else a.bar=new Pa(a,e),p.push(a.bar.draw(n.column.series,n.column.i));if(n.rangeArea.series.length>0&&p.push(c.draw(n.rangeArea.series,"rangeArea",n.rangeArea.i,n.rangeArea.seriesRangeEnd)),n.line.series.length>0)(b=p).push.apply(b,f(m.drawSeriesByGroup(n.line,r.lineGroups,"line",c)));if(n.candlestick.series.length>0&&p.push(d.draw(n.candlestick.series,"candlestick",n.candlestick.i)),n.boxPlot.series.length>0&&p.push(d.draw(n.boxPlot.series,"boxPlot",n.boxPlot.i)),n.rangeBar.series.length>0&&p.push(a.rangeBar.draw(n.rangeBar.series,n.rangeBar.i)),n.scatter.series.length>0){var y=new Ba(a,e,!0);p.push(y.draw(n.scatter.series,"scatter",n.scatter.i))}if(n.bubble.series.length>0){var w=new Ba(a,e,!0);p.push(w.draw(n.bubble.series,"bubble",n.bubble.i))}}else switch(s.chart.type){case"line":p=c.draw(r.series,"line");break;case"area":p=c.draw(r.series,"area");break;case"bar":if(s.chart.stacked)p=new Ia(a,e).draw(r.series);else a.bar=new Pa(a,e),p=a.bar.draw(r.series);break;case"candlestick":p=new Ta(a,e).draw(r.series,"candlestick");break;case"boxPlot":p=new Ta(a,e).draw(r.series,s.chart.type);break;case"rangeBar":p=a.rangeBar.draw(r.series);break;case"rangeArea":p=c.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":p=new Xa(a,e).draw(r.series);break;case"treemap":p=new Ga(a,e).draw(r.series);break;case"pie":case"donut":case"polarArea":p=a.pie.draw(r.series);break;case"radialBar":p=u.draw(r.series);break;case"radar":p=g.draw(r.series);break;default:p=c.draw(r.series)}return p}},{key:"setSVGDimensions",value:function(){var t=this.w,e=t.globals,i=t.config;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto",e.svgWidth=i.chart.width,e.svgHeight=i.chart.height;var a=v.getDimensions(this.el),s=i.chart.width.toString().split(/[0-9]+/g).pop();"%"===s?v.isNumber(a[0])&&(0===a[0].width&&(a=v.getDimensions(this.el.parentNode)),e.svgWidth=a[0]*parseInt(i.chart.width,10)/100):"px"!==s&&""!==s||(e.svgWidth=parseInt(i.chart.width,10));var r=String(i.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===r){var n=v.getDimensions(this.el.parentNode);e.svgHeight=n[1]*parseInt(i.chart.height,10)/100}else e.svgHeight=parseInt(i.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Mi.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==r){var o=i.chart.sparkline.enabled?0:e.axisCharts?i.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(e.svgHeight+o,"px")}e.dom.elWrap.style.width="".concat(e.svgWidth,"px"),e.dom.elWrap.style.height="".concat(e.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i=t.translateX;Mi.setAttrs(t.dom.elGraphical.node,{transform:"translate(".concat(i,", ").concat(e,")")})}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,a=t.config.chart.sparkline.enabled?1:15;a+=t.config.grid.padding.bottom,["top","bottom"].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(i=new xa(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var s=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*t.globals.radialSize;if(s&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var n=v.getBoundingClientRect(s);r=n.bottom;var o=n.bottom-n.top;r=Math.max(2.05*t.globals.radialSize,o)}var l=Math.ceil(r+e.translateY+i+a);e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).includes("%")||(e.dom.elWrap.style.height="".concat(l,"px"),Mi.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(l,"px"))}},{key:"coreCalculations",value:function(){new ea(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(){return[]}))},i=new Bi,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=e(),a.seriesYvalues=e()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var t=this.w,e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new na(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new na(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Ua(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new Pi(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var i=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];i.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){return t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){return t.updateSourceChart(i)})})),e.config.chart.events.selection=function(t,e){i.forEach((function(t){ApexCharts.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:e.xaxis.min,max:e.xaxis.max}},!1,!1,!1,!1)}))}}}}]),t}(),Za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"_updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(n){var o=[e.ctx];s&&(o=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(o=[e.ctx],e.ctx.w.globals.isExecCalled=!1),o.forEach((function(s,l){var h=s.w;if(h.globals.shouldAnimate=a,i||(h.globals.resized=!0,h.globals.dataChanged=!0,a&&s.series.getPreviousPaths()),t&&"object"===b(t)&&(s.config=new Wi(t),t=Pi.extendArrayProps(s.config,t,h),s.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,h.config=v.extend(h.config,t),r&&(h.globals.lastXAxis=t.xaxis?v.clone(t.xaxis):[],h.globals.lastYAxis=t.yaxis?v.clone(t.yaxis):[],h.globals.initialConfig=v.extend({},h.config),h.globals.initialSeries=v.clone(h.config.series),t.series))){for(var c=0;c2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(s){var r,n=i.w;return n.globals.shouldAnimate=e,n.globals.dataChanged=!0,e&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?(0===(r=t.map((function(t,e){return i._extendSeries(t,e)}))).length&&(r=[{data:[]}]),n.config.series=r):n.config.series=t.slice(),a&&(n.globals.initialConfig.series=v.clone(n.config.series),n.globals.initialSeries=v.clone(n.config.series)),i.ctx.update().then((function(){s(i.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var i=this.w,a=i.config.series[e];return u(u({},i.config.series[e]),{},{name:t.name?t.name:null==a?void 0:a.name,color:t.color?t.color:null==a?void 0:a.color,type:t.type?t.type:null==a?void 0:a.type,group:t.group?t.group:null==a?void 0:a.group,hidden:void 0!==t.hidden?t.hidden:null==a?void 0:a.hidden,data:t.data?t.data:null==a?void 0:a.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(e,"'], ").concat(s," circle[j='").concat(e,"'], ").concat(s," rect[j='").concat(e,"']")):void 0===e&&(a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(t,"']")),"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),a?(new Mi(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new Ni(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;t&&t.xaxis&&(a=t.xaxis),t&&t.yaxis&&(s=t.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;var r=function(t){void 0!==s[t]&&(i.config.yaxis[t].min=s[t].min,i.config.yaxis[t].max=s[t].max)};i.config.yaxis.map((function(t,a){i.globals.zoomed||void 0!==s[a]?r(a):void 0!==e.ctx.opts.yaxis[a]&&(t.min=e.ctx.opts.yaxis[a].min,t.max=e.ctx.opts.yaxis[a].max)}))}}]),t}();!function(){function t(){for(var t=arguments.length>0&&arguments[0]!==h?arguments[0]:[],s=arguments.length>1?arguments[1]:h,r=arguments.length>2?arguments[2]:h,n=arguments.length>3?arguments[3]:h,o=arguments.length>4?arguments[4]:h,l=arguments.length>5?arguments[5]:h,h=arguments.length>6?arguments[6]:h,c=t.slice(s,r||h),d=n.slice(o,l||h),u=0,g={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};;){if(c[u]=e.call(g,c[u]),d[u]=e.call(p,d[u]),c[u][0]!=d[u][0]||"M"==c[u][0]||"A"==c[u][0]&&(c[u][4]!=d[u][4]||c[u][5]!=d[u][5])?(Array.prototype.splice.apply(c,[u,1].concat(a.call(g,c[u]))),Array.prototype.splice.apply(d,[u,1].concat(a.call(p,d[u])))):(c[u]=i.call(g,c[u]),d[u]=i.call(p,d[u])),++u==c.length&&u==d.length)break;u==c.length&&c.push(["C",g.pos[0],g.pos[1],g.pos[0],g.pos[1],g.pos[0],g.pos[1]]),u==d.length&&d.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]])}return{start:c,dest:d}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function i(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function a(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var i,a,s,r,n,o,l,h,c,d,u,g,p,f,x,b,m,v,y,w,k,A,C,S,L,M,P=Math.abs(e[1]),I=Math.abs(e[2]),T=e[3]%360,z=e[4],X=e[5],R=e[6],E=e[7],Y=new bt(t),H=new bt(R,E),O=[];if(0===P||0===I||Y.x===H.x&&Y.y===H.y)return[["C",Y.x,Y.y,H.x,H.y,H.x,H.y]];i=new bt((Y.x-H.x)/2,(Y.y-H.y)/2).transform((new vt).rotate(T)),a=i.x*i.x/(P*P)+i.y*i.y/(I*I),a>1&&(P*=a=Math.sqrt(a),I*=a);s=(new vt).rotate(T).scale(1/P,1/I).rotate(-T),Y=Y.transform(s),H=H.transform(s),r=[H.x-Y.x,H.y-Y.y],o=r[0]*r[0]+r[1]*r[1],n=Math.sqrt(o),r[0]/=n,r[1]/=n,l=o<4?Math.sqrt(1-o/4):0,z===X&&(l*=-1);h=new bt((H.x+Y.x)/2+l*-r[1],(H.y+Y.y)/2+l*r[0]),c=new bt(Y.x-h.x,Y.y-h.y),d=new bt(H.x-h.x,H.y-h.y),u=Math.acos(c.x/Math.sqrt(c.x*c.x+c.y*c.y)),c.y<0&&(u*=-1);g=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(g*=-1);X&&u>g&&(g+=2*Math.PI);!X&&u0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(!1===e)return!1;for(var i=e,a=t.length;i(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class Ja{constructor(t){t.remember("_draggable",this),this.el=t,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(t){t?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(t){const e=!t.type.indexOf("mouse");if(e&&1!==t.which&&0!==t.buttons)return;if(this.el.dispatch("beforedrag",{event:t,handler:this}).defaultPrevented)return;t.preventDefault(),t.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point($a(t));const i=(e?"mouseup":"touchend")+".drag";zt(window,(e?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),zt(window,i,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:t,handler:this,box:this.box})}drag(t){const{box:e,lastClick:i}=this,a=this.el.point($a(t)),s=a.x-i.x,r=a.y-i.y;if(!s&&!r)return e;const n=e.x+s,o=e.y+r;this.box=new kt(n,o,e.w,e.h),this.lastClick=a,this.el.dispatch("dragmove",{event:t,handler:this,box:this.box}).defaultPrevented||this.move(n,o)}move(t,e){"svg"===this.el.type?gi.prototype.move.call(this.el,t,e):this.el.move(t,e)}endDrag(t){this.drag(t),this.el.fire("dragend",{event:t,handler:this,box:this.box}),Xt(window,"mousemove.drag"),Xt(window,"touchmove.drag"),Xt(window,"mouseup.drag"),Xt(window,"touchend.drag"),this.init(!0)}} +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).ApexCharts=e()}(this,(function(){"use strict";function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=Array(e);i=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,n=!0,o=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){o=!0,r=t},f:function(){try{n||null==i.return||i.return()}finally{if(o)throw r}}}}function n(t){var i=c();return function(){var a,s=l(t);if(i){var r=l(this).constructor;a=Reflect.construct(s,arguments,r)}else a=s.apply(this,arguments);return function(t,i){if(i&&("object"==typeof i||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return e(t)}(this,a)}}function o(t,e,i){return(e=x(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function d(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function u(t){for(var e=1;e>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-r)*s)+r)+256*(Math.round((a-n)*s)+n)+(Math.round((a-o)*s)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,i){return t.isColorHex(i)?this.shadeHexColor(e,i):this.shadeRGBColor(e,i)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===b(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,i=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var i="",a=t<0?"-":"",s=e[0].replace(".",""),r=Number(e[1])+1;if(r<0){for(i=a+"0.";r++;)i+="0";return i+s.replace(/^-/,"")}for(r-=s.length;r--;)i+="0";return s+i}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),i=t.clientHeight,a=t.clientWidth;return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[a-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),i]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:"x",i=t.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,i){if(i>=t.length)for(var a=i-t.length+1;a--;)t.push(void 0);return t.splice(i,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style.key=e[i])}},{key:"preciseAddition",value:function(t,e){var i=(String(t).split(".")[1]||"").length,a=(String(e).split(".")[1]||"").length,s=Math.pow(10,Math.max(i,a));return(Math.round(t*s)+Math.round(e*s))/s}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*a),e=Math.round(Math.abs(e)*a);e;){var s=e;e=t%e,t=s}return t/a}},{key:"getPrimeFactors",value:function(t){for(var e=[],i=2;t>=2;)t%i==0?(e.push(i),t/=i):i++;return e}},{key:"mod",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*a))%(e=Math.round(Math.abs(e)*a))/a}}]),t}(),y=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"animateLine",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animateMarker",value:function(t,e,i,a){t.attr({opacity:0}).animate(e).attr({opacity:1}).after((function(){a()}))}},{key:"animateRect",value:function(t,e,i,a,s){t.attr(e).animate(a).attr(i).after((function(){return s()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.realIndex,a=t.j,s=t.fill,r=t.pathFrom,n=t.pathTo,o=t.speed,l=t.delay,h=this.w,c=0;h.config.chart.animations.animateGradually.enabled&&(c=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&"bar"!==h.config.chart.type&&(c=0),this.morphSVG(e,i,a,"line"!==h.config.chart.type||h.globals.comboCharts?s:"stroke",r,n,o,l*c)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){var e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,i,a,s,r,n,o){var l=this,h=this.w;s||(s=t.attr("pathFrom")),r||(r=t.attr("pathTo"));var c=function(t){return"radar"===h.config.chart.type&&(n=1),"M 0 ".concat(h.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=c()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=c()),h.globals.shouldAnimate||(n=1),t.plot(s).animate(1,o).plot(s).animate(n,o).plot(r).after((function(){v.isNumber(i)?i===h.globals.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&l.animationCompleted(t):"none"!==a&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&e===h.globals.series.length-1||h.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}]),t}();const w={},k=[];function A(t,e){if(Array.isArray(t))for(const i of t)A(i,e);else if("object"!=typeof t)S(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(const e in t)A(e,t[e])}function C(t){return w[t]||{}}function S(t){k.push(...t)}function L(t,e){let i;const a=t.length,s=[];for(i=0;iz.has(t.nodeName),R=(t,e,i={})=>{const a={...e};for(const t in a)a[t].valueOf()===i[t]&&delete a[t];Object.keys(a).length?t.node.setAttribute("data-svgjs",JSON.stringify(a)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},Y="http://www.w3.org/2000/svg",E="http://www.w3.org/2000/xmlns/",H="http://www.w3.org/1999/xlink",O={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function F(){return O.window}let D=class{};const _={},N="___SYMBOL___ROOT___";function W(t,e=Y){return O.document.createElementNS(e,t)}function B(t,e=!1){if(t instanceof D)return t;if("object"==typeof t)return U(t);if(null==t)return new _[N];if("string"==typeof t&&"<"!==t.charAt(0))return U(O.document.querySelector(t));const i=e?O.document.createElement("div"):W("svg");return i.innerHTML=t,t=U(i.firstChild),i.removeChild(i.firstChild),t}function G(t,e){return e&&(e instanceof O.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:W(t)}function V(t){if(!t)return null;if(t.instance instanceof D)return t.instance;if("#document-fragment"===t.nodeName)return new _.Fragment(t);let e=P(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":_[e]||(e="Dom"),new _[e](t)}let U=V;function q(t,e=t.name,i=!1){return _[e]=t,i&&(_[N]=t),S(Object.getOwnPropertyNames(t.prototype)),t}let Z=1e3;function $(t){return"Svgjs"+P(t)+Z++}function J(t){for(let e=t.children.length-1;e>=0;e--)J(t.children[e]);return t.id?(t.id=$(t.nodeName),t):t}function Q(t,e){let i,a;for(a=(t=Array.isArray(t)?t:[t]).length-1;a>=0;a--)for(i in e)t[a].prototype[i]=e[i]}function K(t){return function(...e){const i=e[e.length-1];return!i||i.constructor!==Object||i instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(i)}}A("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=B(t)).before(this),this},insertAfter:function(t){return(t=B(t)).after(this),this}});const tt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,et=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,it=/rgb\((\d+),(\d+),(\d+)\)/,at=/(#[a-z_][a-z0-9\-_]*)/i,st=/\)\s*,?\s*/,rt=/\s/g,nt=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ot=/^rgb\(/,lt=/^(\s+)?$/,ht=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ct=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,dt=/[\s,]+/,ut=/[MLHVCSQTAZ]/i;function gt(t){const e=Math.round(t),i=Math.max(0,Math.min(255,e)).toString(16);return 1===i.length?"0"+i:i}function pt(t,e){for(let i=e.length;i--;)if(null==t[e[i]])return!1;return!0}function ft(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}A("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(dt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),A("Dom",{css:function(t,e){const i={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);i[e[0]]=e[1]})),i;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;i[e]=this.node.style.getPropertyValue(t)}return i}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||lt.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||lt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),A("Dom",{data:function(t,e,i){if(null==t)return this.data(L(function(t,e){let i;const a=t.length,s=[];for(i=0;i0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const i of t)e[i]=this.data(i);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===i||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),A("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class xt{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof xt||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:i,round:a,sin:s,PI:r}=Math;if("vibrant"===t){const t=24*i()+57,e=38*i()+45,a=360*i();return new xt(t,e,a,"lch")}if("sine"===t){const t=a(80*s(2*r*(e=null==e?i():e)/.5+.01)+150),n=a(50*s(2*r*e/.5+4.6)+200),o=a(100*s(2*r*e/.5+2.3)+150);return new xt(t,n,o)}if("pastel"===t){const t=8*i()+86,e=17*i()+9,a=360*i();return new xt(t,e,a,"lch")}if("dark"===t){const t=10+10*i(),e=50*i()+86,a=360*i();return new xt(t,e,a,"lch")}if("rgb"===t){const t=255*i(),e=255*i(),a=255*i();return new xt(t,e,a)}if("lab"===t){const t=100*i(),e=256*i()-128,a=256*i()-128;return new xt(t,e,a,"lab")}if("grey"===t){const t=255*i();return new xt(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(nt.test(t)||ot.test(t))}cmyk(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.min(1-a,1-s,1-r);if(1===n)return new xt(0,0,0,1,"cmyk");return new xt((1-a-n)/(1-n),(1-s-n)/(1-n),(1-r-n)/(1-n),n,"cmyk")}hsl(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.max(a,s,r),o=Math.min(a,s,r),l=(n+o)/2,h=n===o,c=n-o;return new xt(360*(h?0:n===a?((s-r)/c+(s.5?c/(2-n-o):c/(n+o)),100*l,"hsl")}init(t=0,e=0,i=0,a=0,s="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)s="string"==typeof a?a:s,a="string"==typeof a?0:a,Object.assign(this,{_a:t,_b:e,_c:i,_d:a,space:s});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const i=function(t,e){const i=pt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:pt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:pt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:pt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:pt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:pt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return i.space=e||i.space,i}(t,e);Object.assign(this,i)}else if("string"==typeof t)if(ot.test(t)){const e=t.replace(rt,""),[i,a,s]=it.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}else{if(!nt.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,i,a,s]=et.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}}const{_a:r,_b:n,_c:o,_d:l}=this,h="rgb"===this.space?{r:r,g:n,b:o}:"xyz"===this.space?{x:r,y:n,z:o}:"hsl"===this.space?{h:r,s:n,l:o}:"lab"===this.space?{l:r,a:n,b:o}:"lch"===this.space?{l:r,c:n,h:o}:"cmyk"===this.space?{c:r,m:n,y:o,k:l}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:i}=this.xyz();return new xt(116*e-16,500*(t-e),200*(e-i),"lab")}lch(){const{l:t,a:e,b:i}=this.lab(),a=Math.sqrt(e**2+i**2);let s=180*Math.atan2(i,e)/Math.PI;s<0&&(s*=-1,s=360-s);return new xt(t,a,s,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:a,a:s,b:r}=this;if("lch"===this.space){const{c:t,h:e}=this,i=Math.PI/180;s=t*Math.cos(i*e),r=t*Math.sin(i*e)}const n=(a+16)/116,o=s/500+n,l=n-r/200,h=16/116,c=.008856,d=7.787;t=.95047*(o**3>c?o**3:(o-h)/d),e=1*(n**3>c?n**3:(n-h)/d),i=1.08883*(l**3>c?l**3:(l-h)/d)}const a=3.2406*t+-1.5372*e+-.4986*i,s=-.9689*t+1.8758*e+.0415*i,r=.0557*t+-.204*e+1.057*i,n=Math.pow,o=.0031308,l=a>o?1.055*n(a,1/2.4)-.055:12.92*a,h=s>o?1.055*n(s,1/2.4)-.055:12.92*s,c=r>o?1.055*n(r,1/2.4)-.055:12.92*r;return new xt(255*l,255*h,255*c)}if("hsl"===this.space){let{h:t,s:e,l:i}=this;if(t/=360,e/=100,i/=100,0===e){i*=255;return new xt(i,i,i)}const a=i<.5?i*(1+e):i+e-i*e,s=2*i-a,r=255*ft(s,a,t+1/3),n=255*ft(s,a,t),o=255*ft(s,a,t-1/3);return new xt(r,n,o)}if("cmyk"===this.space){const{c:t,m:e,y:i,k:a}=this,s=255*(1-Math.min(1,t*(1-a)+a)),r=255*(1-Math.min(1,e*(1-a)+a)),n=255*(1-Math.min(1,i*(1-a)+a));return new xt(s,r,n)}return this;var t}toArray(){const{_a:t,_b:e,_c:i,_d:a,space:s}=this;return[t,e,i,a,s]}toHex(){const[t,e,i]=this._clamped().map(gt);return`#${t}${e}${i}`}toRgb(){const[t,e,i]=this._clamped();return`rgb(${t},${e},${i})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,o=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,l=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,h=(.4124*n+.3576*o+.1805*l)/.95047,c=(.2126*n+.7152*o+.0722*l)/1,d=(.0193*n+.1192*o+.9505*l)/1.08883,u=h>.008856?Math.pow(h,1/3):7.787*h+16/116,g=c>.008856?Math.pow(c,1/3):7.787*c+16/116,p=d>.008856?Math.pow(d,1/3):7.787*d+16/116;return new xt(u,g,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:i}=this.rgb(),{max:a,min:s,round:r}=Math;return[t,e,i].map((t=>a(0,s(r(t),255))))}}class bt{constructor(...t){this.init(...t)}clone(){return new bt(this)}init(t,e){const i=0,a=0,s=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==s.x?i:s.x,this.y=null==s.y?a:s.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){vt.isMatrixLike(t)||(t=new vt(t));const{x:e,y:i}=this;return this.x=t.a*e+t.c*i+t.e,this.y=t.b*e+t.d*i+t.f,this}}function mt(t,e,i){return Math.abs(e-t)<(i||1e-6)}class vt{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,i=t.flip&&(e||"x"===t.flip)?-1:1,a=t.flip&&(e||"y"===t.flip)?-1:1,s=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,r=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,n=t.scale&&t.scale.length?t.scale[0]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleX)?t.scaleX*i:i,o=t.scale&&t.scale.length?t.scale[1]*a:isFinite(t.scale)?t.scale*a:isFinite(t.scaleY)?t.scaleY*a:a,l=t.shear||0,h=t.rotate||t.theta||0,c=new bt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),d=c.x,u=c.y,g=new bt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=g.x,f=g.y,x=new bt(t.translate||t.tx||t.translateX,t.ty||t.translateY),b=x.x,m=x.y,v=new bt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:n,scaleY:o,skewX:s,skewY:r,shear:l,theta:h,rx:v.x,ry:v.y,tx:b,ty:m,ox:d,oy:u,px:p,py:f}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,i){const a=t.a*e.a+t.c*e.b,s=t.b*e.a+t.d*e.b,r=t.a*e.c+t.c*e.d,n=t.b*e.c+t.d*e.d,o=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return i.a=a,i.b=s,i.c=r,i.d=n,i.e=o,i.f=l,i}around(t,e,i){return this.clone().aroundO(t,e,i)}aroundO(t,e,i){const a=t||0,s=e||0;return this.translateO(-a,-s).lmultiplyO(i).translateO(a,s)}clone(){return new vt(this)}decompose(t=0,e=0){const i=this.a,a=this.b,s=this.c,r=this.d,n=this.e,o=this.f,l=i*r-a*s,h=l>0?1:-1,c=h*Math.sqrt(i*i+a*a),d=Math.atan2(h*a,h*i),u=180/Math.PI*d,g=Math.cos(d),p=Math.sin(d),f=(i*s+a*r)/l,x=s*c/(f*i-a)||r*c/(f*a+i);return{scaleX:c,scaleY:x,shear:f,rotate:u,translateX:n-t+t*g*c+e*(f*g*c-p*x),translateY:o-e+t*p*c+e*(f*p*c+g*x),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new vt(t);return mt(this.a,e.a)&&mt(this.b,e.b)&&mt(this.c,e.c)&&mt(this.d,e.d)&&mt(this.e,e.e)&&mt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=vt.fromArray([1,0,0,1,0,0]);return t=t instanceof Gt?t.matrixify():"string"==typeof t?vt.fromArray(t.split(dt).map(parseFloat)):Array.isArray(t)?vt.fromArray(t):"object"==typeof t&&vt.isMatrixLike(t)?t:"object"==typeof t?(new vt).transform(t):6===arguments.length?vt.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,i=this.c,a=this.d,s=this.e,r=this.f,n=t*a-e*i;if(!n)throw new Error("Cannot invert "+this);const o=a/n,l=-e/n,h=-i/n,c=t/n,d=-(o*s+h*r),u=-(l*s+c*r);return this.a=o,this.b=l,this.c=h,this.d=c,this.e=d,this.f=u,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(this,e,this)}rotate(t,e,i){return this.clone().rotateO(t,e,i)}rotateO(t,e=0,i=0){t=M(t);const a=Math.cos(t),s=Math.sin(t),{a:r,b:n,c:o,d:l,e:h,f:c}=this;return this.a=r*a-n*s,this.b=n*a+r*s,this.c=o*a-l*s,this.d=l*a+o*s,this.e=h*a-c*s+i*s-e*a+e,this.f=c*a+h*s-e*s-i*a+i,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t);const{a:s,b:r,c:n,d:o,e:l,f:h}=this;return this.a=s*t,this.b=r*e,this.c=n*t,this.d=o*e,this.e=l*t-i*t+i,this.f=h*e-a*e+a,this}shear(t,e,i){return this.clone().shearO(t,e,i)}shearO(t,e=0,i=0){const{a:a,b:s,c:r,d:n,e:o,f:l}=this;return this.a=a+s*t,this.c=r+n*t,this.e=o+l*t-i*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t),t=M(t),e=M(e);const s=Math.tan(t),r=Math.tan(e),{a:n,b:o,c:l,d:h,e:c,f:d}=this;return this.a=n+o*s,this.b=o+n*r,this.c=l+h*s,this.d=h+l*r,this.e=c+d*s-a*s,this.f=d+c*r-i*r,this}skewX(t,e,i){return this.skew(t,0,e,i)}skewY(t,e,i){return this.skew(0,t,e,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(vt.isMatrixLike(t)){return new vt(t).multiplyO(this)}const e=vt.formatTransforms(t),{x:i,y:a}=new bt(e.ox,e.oy).transform(this),s=(new vt).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-i,-a).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(i,a);if(isFinite(e.px)||isFinite(e.py)){const t=new bt(i,a).transform(s),r=isFinite(e.px)?e.px-t.x:0,n=isFinite(e.py)?e.py-t.y:0;s.translateO(r,n)}return s.translateO(e.tx,e.ty),s}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function yt(){if(!yt.nodes){const t=B().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;yt.nodes={svg:t,path:e}}if(!yt.nodes.svg.node.parentNode){const t=O.document.body||O.document.documentElement;yt.nodes.svg.addTo(t)}return yt.nodes}function wt(t){return!(t.width||t.height||t.x||t.y)}q(vt,"Matrix");class kt{constructor(...t){this.init(...t)}addOffset(){return this.x+=O.window.pageXOffset,this.y+=O.window.pageYOffset,new kt(this)}init(t){return t="string"==typeof t?t.split(dt).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return wt(this)}merge(t){const e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),a=Math.max(this.x+this.width,t.x+t.width)-e,s=Math.max(this.y+this.height,t.y+t.height)-i;return new kt(e,i,a,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof vt||(t=new vt(t));let e=1/0,i=-1/0,a=1/0,s=-1/0;return[new bt(this.x,this.y),new bt(this.x2,this.y),new bt(this.x,this.y2),new bt(this.x2,this.y2)].forEach((function(r){r=r.transform(t),e=Math.min(e,r.x),i=Math.max(i,r.x),a=Math.min(a,r.y),s=Math.max(s,r.y)})),new kt(e,a,i-e,s-a)}}function At(t,e,i){let a;try{if(a=e(t.node),wt(a)&&((s=t.node)!==O.document&&!(O.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===O.document}).call(O.document.documentElement,s)))throw new Error("Element not in the dom")}catch(e){a=i(t)}var s;return a}A({viewbox:{viewbox(t,e,i,a){return null==t?new kt(this.attr("viewBox")):this.attr("viewBox",new kt(t,e,i,a))},zoom(t,e){let{width:i,height:a}=this.attr(["width","height"]);if((i||a)&&"string"!=typeof i&&"string"!=typeof a||(i=this.node.clientWidth,a=this.node.clientHeight),!i||!a)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const s=this.viewbox(),r=i/s.width,n=a/s.height,o=Math.min(r,n);if(null==t)return o;let l=o/t;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new bt(i/2/r+s.x,a/2/n+s.y);const h=new kt(s).transform(new vt({scale:l,origin:e}));return this.viewbox(h)}}}),q(kt,"Box");class Ct extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}Q([Ct],{each(t,...e){return"function"==typeof t?this.map(((e,i,a)=>t.call(e,e,i,a))):this.map((i=>i[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const St=["toArray","constructor","each"];function Lt(t,e){return new Ct(L((e||O.document).querySelectorAll(t),(function(t){return V(t)})))}Ct.extend=function(t){t=t.reduce(((t,e)=>(St.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),Q([Ct],t)};let Mt=0;const Pt={};function It(t){let e=t.getEventHolder();return e===O.window&&(e=Pt),e.events||(e.events={}),e.events}function Tt(t){return t.getEventTarget()}function zt(t,e,i,a,s){const r=i.bind(a||t),n=B(t),o=It(n),l=Tt(n);e=Array.isArray(e)?e:e.split(dt),i._svgjsListenerId||(i._svgjsListenerId=++Mt),e.forEach((function(t){const e=t.split(".")[0],a=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][a]=o[e][a]||{},o[e][a][i._svgjsListenerId]=r,l.addEventListener(e,r,s||!1)}))}function Xt(t,e,i,a){const s=B(t),r=It(s),n=Tt(s);("function"!=typeof i||(i=i._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(dt)).forEach((function(t){const e=t&&t.split(".")[0],o=t&&t.split(".")[1];let l,h;if(i)r[e]&&r[e][o||"*"]&&(n.removeEventListener(e,r[e][o||"*"][i],a||!1),delete r[e][o||"*"][i]);else if(e&&o){if(r[e]&&r[e][o]){for(h in r[e][o])Xt(n,[e,o].join("."),h);delete r[e][o]}}else if(o)for(t in r)for(l in r[t])o===l&&Xt(n,[t,o].join("."));else if(e){if(r[e]){for(l in r[e])Xt(n,[e,l].join("."));delete r[e]}}else{for(t in r)Xt(n,t);!function(t){let e=t.getEventHolder();e===O.window&&(e=Pt),e.events&&(e.events={})}(s)}}))}class Rt extends D{addEventListener(){}dispatch(t,e,i){return function(t,e,i,a){const s=Tt(t);return e instanceof O.window.Event||(e=new O.window.CustomEvent(e,{detail:i,cancelable:!0,...a})),s.dispatchEvent(e),e}(this,t,e,i)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const i=e[t.type];for(const e in i)for(const a in i[e])i[e][a](t);return!t.defaultPrevented}fire(t,e,i){return this.dispatch(t,e,i),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,i){return Xt(this,t,e,i),this}on(t,e,i,a){return zt(this,t,e,i,a),this}removeEventListener(){}}function Yt(){}q(Rt,"EventTarget");const Et=400,Ht=">",Ot=0,Ft={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Dt extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(dt).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class _t{constructor(...t){this.init(...t)}convert(t){return new _t(this.value,t)}divide(t){return t=new _t(t),new _t(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(tt))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof _t&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new _t(t),new _t(this-t,this.unit||t.unit)}plus(t){return t=new _t(t),new _t(this+t,this.unit||t.unit)}times(t){return t=new _t(t),new _t(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Nt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Wt=[];class Bt extends Rt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=B(t)).removeNamespace&&this.node instanceof O.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return B(t).put(this,e)}children(){return new Ct(L(this.node.children,(function(t){return V(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let i=this.node.cloneNode(t);return e&&(i=J(i)),new this.constructor(i)}each(t,e){const i=this.children();let a,s;for(a=0,s=i.length;a=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=$(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return V(this.node.lastChild)}matches(t){const e=this.node,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return i&&i.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=V(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=V(e.node.parentNode));return e}put(t,e){return t=B(t),this.add(t,e),t}putIn(t,e){return B(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=B(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const i=10**t,a=this.attr(e);for(const t in a)"number"==typeof a[t]&&(a[t]=Math.round(a[t]*i)/i);return this.attr(a),this}svg(t,e){return this.xml(t,e,Y)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const i=e.index(this);return e.put(t,i).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let i=this;if(null!=t){if(i=V(i.node.cloneNode(!0)),e){const e=t(i);if(i=e||i,!1===e)return""}i.each((function(){const e=t(this),i=e||this;!1===e?this.remove():e&&this!==i&&this.replace(i)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;const a=W("wrapper",i),s=O.document.createDocumentFragment();a.innerHTML=t;for(let t=a.children.length;t--;)s.appendChild(a.firstElementChild);const r=this.parent();return e?this.replace(s)&&r:this.add(s)}}Q(Bt,{attr:function(t,e,i){if(null==t){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=ht.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ft[t]:ht.test(e)?parseFloat(e):e;"number"==typeof(e=Wt.reduce(((e,i)=>i(t,e,this)),e))?e=new _t(e):Nt.has(t)&&xt.isColor(e)?e=new xt(e):e.constructor===Array&&(e=new Dt(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return Lt(t,this.node)},findOne:function(t){return V(this.node.querySelector(t))}}),q(Bt,"Dom");class Gt extends Bt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new _t(t).plus(this.x()))}dy(t=0){return this.y(new _t(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=B(t));const i=new Ct;let a=this;for(;(a=a.parent())&&a.node!==O.document&&"#document-fragment"!==a.nodeName&&(i.push(a),e||a.node!==t.node)&&(!e||!a.matches(t));)if(a.node===this.root().node)return null;return i}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(at);return e?B(e[1]):null}root(){const t=this.parent(function(t){return _[t]}(N));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const i=I(this,t,e);return this.width(new _t(i.width)).height(new _t(i.height))}width(t){return this.attr("width",t)}writeDataToDom(){return R(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}Q(Gt,{bbox:function(){const t=At(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(yt().svg).show(),i=e.node.getBBox();return e.remove(),i}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new kt(t)},rbox:function(t){const e=At(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),i=new kt(e);return t?i.transform(t.screenCTM().inverseO()):i.addOffset()},inside:function(t,e){const i=this.bbox();return t>i.x&&e>i.y&&t=0;i--)null!=e[jt[t][i]]&&this.attr(jt.prefix(t,jt[t][i]),e[jt[t][i]]);return this},A(["Element","Runner"],e)})),A(["Element","Runner"],{matrix:function(t,e,i,a,s,r){return null==t?new vt(this):this.attr("transform",new vt(t,e,i,a,s,r))},rotate:function(t,e,i){return this.transform({rotate:t,ox:e,oy:i},!0)},skew:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:i},!0):this.transform({skew:[t,e],ox:i,oy:a},!0)},shear:function(t,e,i){return this.transform({shear:t,ox:e,oy:i},!0)},scale:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:i},!0):this.transform({scale:[t,e],ox:i,oy:a},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),A("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new _t(t)):this.rx(t).ry(e)}}),A("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new bt(this.node.getPointAtLength(t))}}),A(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});A("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),A("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){const t=(this.attr("transform")||"").split(st).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(dt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(vt.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new vt);return t},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);const i=this.screenCTM(),a=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(a.multiply(i)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new vt(this).decompose();return null==t?e:e[t]}vt.isMatrixLike(t)||(t={...t,origin:T(t,this)});const i=new vt(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});class Vt extends Gt{flatten(){return this.each((function(){if(this instanceof Vt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(i,a){return a[a.length-i-1].toParent(t,e)})),this.remove()}}q(Vt,"Container");class Ut extends Vt{constructor(t,e=t){super(G("defs",t),e)}flatten(){return this}ungroup(){return this}}q(Ut,"Defs");class qt extends Gt{}function Zt(t){return this.attr("rx",t)}function $t(t){return this.attr("ry",t)}function Jt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Qt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Kt(t){return this.attr("cx",t)}function te(t){return this.attr("cy",t)}function ee(t){return null==t?2*this.rx():this.rx(new _t(t).divide(2))}function ie(t){return null==t?2*this.ry():this.ry(new _t(t).divide(2))}q(qt,"Shape");var ae=Object.freeze({__proto__:null,cx:Kt,cy:te,height:ie,rx:Zt,ry:$t,width:ee,x:Jt,y:Qt});class se extends qt{constructor(t,e=t){super(G("ellipse",t),e)}size(t,e){const i=I(this,t,e);return this.rx(new _t(i.width).divide(2)).ry(new _t(i.height).divide(2))}}Q(se,ae),A("Container",{ellipse:K((function(t=0,e=t){return this.put(new se).size(t,e).move(0,0)}))}),q(se,"Ellipse");class re extends Bt{constructor(t=O.document.createDocumentFragment()){super(t)}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){const t=new Bt(W("wrapper",i));return t.add(this.node.cloneNode(!0)),t.xml(!1,i)}return super.xml(t,!1,i)}}function ne(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new _t(t),fy:new _t(e)}):this.attr({x1:new _t(t),y1:new _t(e)})}function oe(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new _t(t),cy:new _t(e)}):this.attr({x2:new _t(t),y2:new _t(e)})}q(re,"Fragment");var le=Object.freeze({__proto__:null,from:ne,to:oe});class he extends Vt{constructor(t,e){super(G(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,i){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}Q(he,le),A({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:K((function(t,e){return this.put(new he(t)).update(e)}))}}),q(he,"Gradient");class ce extends Vt{constructor(t,e=t){super(G("pattern",t),e)}attr(t,e,i){return"transform"===t&&(t="patternTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}A({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:K((function(t,e,i){return this.put(new ce).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),q(ce,"Pattern");let de=class extends qt{constructor(t,e=t){super(G("image",t),e)}load(t,e){if(!t)return this;const i=new O.window.Image;return zt(i,"load",(function(t){const a=this.parent(ce);0===this.width()&&0===this.height()&&this.size(i.width,i.height),a instanceof ce&&0===a.width()&&0===a.height()&&a.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),zt(i,"load error",(function(){Xt(i)})),this.attr("href",i.src=t,H)}};var ue;ue=function(t,e,i){return"fill"!==t&&"stroke"!==t||ct.test(e)&&(e=i.root().defs().image(e)),e instanceof de&&(e=i.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Wt.push(ue),A({Container:{image:K((function(t,e){return this.put(new de).size(0,0).load(t,e)}))}}),q(de,"Image");class ge extends Dt{bbox(){let t=-1/0,e=-1/0,i=1/0,a=1/0;return this.forEach((function(s){t=Math.max(s[0],t),e=Math.max(s[1],e),i=Math.min(s[0],i),a=Math.min(s[1],a)})),new kt(i,a,t-i,e-a)}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let i=this.length-1;i>=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(dt).map(parseFloat)).length%2!=0&&t.pop();for(let i=0,a=t.length;i=0;i--)a.width&&(this[i][0]=(this[i][0]-a.x)*t/a.width+a.x),a.height&&(this[i][1]=(this[i][1]-a.y)*e/a.height+a.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,i=this.length;e":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,i,a){return function(s){return s<0?t>0?e/t*s:i>0?a/i*s:0:s>1?i<1?(1-a)/(1-i)*s+(a-i)/(1-i):t<1?(1-e)/(1-t)*s+(e-t)/(1-t):1:3*s*(1-s)**2*e+3*s**2*(1-s)*a+s**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let i=t;return"none"===e?--i:"both"===e&&++i,(a,s=!1)=>{let r=Math.floor(a*t);const n=a*r%1==0;return"start"!==e&&"both"!==e||++r,s&&n&&--r,a>=0&&r<0&&(r=0),a<=1&&r>i&&(r=i),r/i}}};class ye{done(){return!1}}class we extends ye{constructor(t=Ht){super(),this.ease=ve[t]||t}step(t,e,i){return"number"!=typeof t?i<1?t:e:t+(e-t)*this.ease(i)}}class ke extends ye{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,i,a){return this.stepper(t,e,i,a)}}function Ae(){const t=(this._duration||500)/1e3,e=this._overshoot||0,i=Math.PI,a=Math.log(e/100+1e-10),s=-a/Math.sqrt(i*i+a*a),r=3.9/(s*t);this.d=2*s*r,this.k=r*r}Q(class extends ke{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;i>100&&(i=16),i/=1e3;const s=a.velocity||0,r=-this.d*s-this.k*(t-e),n=t+s*i+r*i*i/2;return a.velocity=s+r*i,a.done=Math.abs(e-n)+Math.abs(s)<.002,a.done?e:n}},{duration:me("_duration",Ae),overshoot:me("_overshoot",Ae)});Q(class extends ke{constructor(t=.1,e=.01,i=0,a=1e3){super(),this.p(t).i(e).d(i).windup(a)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;const s=e-t;let r=(a.integral||0)+s*i;const n=(s-(a.error||0))/i,o=this._windup;return!1!==o&&(r=Math.max(-o,Math.min(r,o))),a.error=s,a.integral=r,a.done=Math.abs(s)<.001,a.done?e:t+(this.P*s+this.I*r+this.D*n)}},{windup:me("_windup"),p:me("P"),i:me("I"),d:me("D")});const Ce={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Se={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Le="mlhvqtcsaz".split("");for(let t=0,e=Le.length;t=0;a--)i=this[a][0],"M"===i||"L"===i||"T"===i?(this[a][1]+=t,this[a][2]+=e):"H"===i?this[a][1]+=t:"V"===i?this[a][1]+=e:"C"===i||"S"===i||"Q"===i?(this[a][1]+=t,this[a][2]+=e,this[a][3]+=t,this[a][4]+=e,"C"===i&&(this[a][5]+=t,this[a][6]+=e)):"A"===i&&(this[a][6]+=t,this[a][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let i=0,a="";const s={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new bt,p:new bt};for(;s.lastToken=a,a=t.charAt(i++);)if(s.inSegment||!Pe(s,a))if("."!==a)if(isNaN(parseInt(a)))if(Re.has(a))s.inNumber&&Ie(s,!1);else if("-"!==a&&"+"!==a)if("E"!==a.toUpperCase()){if(ut.test(a)){if(s.inNumber)Ie(s,!1);else{if(!Me(s))throw new Error("parser Error");Te(s)}--i}}else s.number+=a,s.hasExponent=!0;else{if(s.inNumber&&!Xe(s)){Ie(s,!1),--i;continue}s.number+=a,s.inNumber=!0}else{if("0"===s.number||ze(s)){s.inNumber=!0,s.number=a,Ie(s,!0);continue}s.inNumber=!0,s.number+=a}else{if(s.pointSeen||s.hasExponent){Ie(s,!1),--i;continue}s.inNumber=!0,s.pointSeen=!0,s.number+=a}return s.inNumber&&Ie(s,!1),s.inSegment&&Me(s)&&Te(s),s.segments}(t)}size(t,e){const i=this.bbox();let a,s;for(i.width=0===i.width?1:i.width,i.height=0===i.height?1:i.height,a=this.length-1;a>=0;a--)s=this[a][0],"M"===s||"L"===s||"T"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y):"H"===s?this[a][1]=(this[a][1]-i.x)*t/i.width+i.x:"V"===s?this[a][1]=(this[a][1]-i.y)*e/i.height+i.y:"C"===s||"S"===s||"Q"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y,this[a][3]=(this[a][3]-i.x)*t/i.width+i.x,this[a][4]=(this[a][4]-i.y)*e/i.height+i.y,"C"===s&&(this[a][5]=(this[a][5]-i.x)*t/i.width+i.x,this[a][6]=(this[a][6]-i.y)*e/i.height+i.y)):"A"===s&&(this[a][1]=this[a][1]*t/i.width,this[a][2]=this[a][2]*e/i.height,this[a][6]=(this[a][6]-i.x)*t/i.width+i.x,this[a][7]=(this[a][7]-i.y)*e/i.height+i.y);return this}toString(){return function(t){let e="";for(let i=0,a=t.length;i{const e=typeof t;return"number"===e?_t:"string"===e?xt.isColor(t)?xt:dt.test(t)?ut.test(t)?Ye:Dt:tt.test(t)?_t:Oe:Ne.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Dt:"object"===e?_e:Oe};class He{constructor(t){this._stepper=t||new we("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Ee(t));let e=new this._type(t);return this._type===xt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===_e&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Oe{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Fe{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Fe.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Fe.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const De=(t,e)=>t[0]e[0]?1:0;class _e{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let i=0,a=e.length;it.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const i=e.shift(),a=e.shift(),s=e.shift(),r=e.splice(0,s);t[i]=new a(r)}return t}}const Ne=[Oe,Fe,_e];class We extends qt{constructor(t,e=t){super(G("path",t),e)}array(){return this._array||(this._array=new Ye(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Ye(t))}size(t,e){const i=I(this,t,e);return this.attr("d",this.array().size(i.width,i.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}We.prototype.MorphArray=Ye,A({Container:{path:K((function(t){return this.put(new We).plot(t||new Ye)}))}}),q(We,"Path");var Be=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new ge(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new ge(t))},size:function(t,e){const i=I(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}});class Ge extends qt{constructor(t,e=t){super(G("polygon",t),e)}}A({Container:{polygon:K((function(t){return this.put(new Ge).plot(t||new ge)}))}}),Q(Ge,fe),Q(Ge,Be),q(Ge,"Polygon");class je extends qt{constructor(t,e=t){super(G("polyline",t),e)}}A({Container:{polyline:K((function(t){return this.put(new je).plot(t||new ge)}))}}),Q(je,fe),Q(je,Be),q(je,"Polyline");class Ve extends qt{constructor(t,e=t){super(G("rect",t),e)}}Q(Ve,{rx:Zt,ry:$t}),A({Container:{rect:K((function(t,e){return this.put(new Ve).size(t,e)}))}}),q(Ve,"Rect");class Ue{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const qe={nextDraw:null,frames:new Ue,timeouts:new Ue,immediates:new Ue,timer:()=>O.window.performance||O.window.Date,transforms:[],frame(t){const e=qe.frames.push({run:t});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},timeout(t,e){e=e||0;const i=qe.timer().now()+e,a=qe.timeouts.push({run:t,time:i});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),a},immediate(t){const e=qe.immediates.push(t);return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},cancelFrame(t){null!=t&&qe.frames.remove(t)},clearTimeout(t){null!=t&&qe.timeouts.remove(t)},cancelImmediate(t){null!=t&&qe.immediates.remove(t)},_draw(t){let e=null;const i=qe.timeouts.last();for(;(e=qe.timeouts.shift())&&(t>=e.time?e.run():qe.timeouts.push(e),e!==i););let a=null;const s=qe.frames.last();for(;a!==s&&(a=qe.frames.shift());)a.run(t);let r=null;for(;r=qe.immediates.shift();)r();qe.nextDraw=qe.timeouts.first()||qe.frames.first()?O.window.requestAnimationFrame(qe._draw):null}},Ze=function(t){const e=t.start,i=t.runner.duration();return{start:e,duration:i,end:e+i,runner:t.runner}},$e=function(){const t=O.window;return(t.performance||t.Date).now()};class Je extends Rt{constructor(t=$e){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const i=Math.abs(e);return this.speed(t?-i:i)}schedule(t,e,i){if(null==t)return this._runners.map(Ze);let a=0;const s=this.getEndTime();if(e=e||0,null==i||"last"===i||"after"===i)a=s;else if("absolute"===i||"start"===i)a=e,e=0;else if("now"===i)a=this._time;else if("relative"===i){const i=this.getRunnerInfoById(t.id);i&&(a=i.start+e,e=0)}else{if("with-last"!==i)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();a=t?t.start:this._time}}t.unschedule(),t.timeline(this);const r=t.persist(),n={persist:null===r?this._persist:r,start:a+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(n),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return qe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let i=e-this._lastSourceTime;t&&(i=0);const a=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=a,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],i=e.runner;this._time-e.start<=0&&i.reset()}let s=!1;for(let t=0,e=this._runners.length;t0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}A({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Je,this._timeline):(this._timeline=t,this)}}});class Qe extends Rt{constructor(t){super(),this.id=Qe.id++,t="function"==typeof(t=null==t?Et:t)?new ke(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ke,this._stepper=this._isDeclarative?t:new we,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new vt,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,i){let a=1,s=!1,r=0;return e=e??Ot,i=i||"last","object"!=typeof(t=t??Et)||t instanceof ye||(e=t.delay??e,i=t.when??i,s=t.swing||s,a=t.times??a,r=t.wait??r,t=t.duration??Et),{duration:t,delay:e,swing:s,times:a,wait:r,when:i}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,i){const a=Qe.sanitise(t,e,i),s=new Qe(a.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(a).schedule(a.delay,a.when)}clearTransform(){return this.transforms=new vt,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new we(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,i){return"object"==typeof t&&(e=t.swing,i=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=i||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),i=(this._time-t*e)/this._duration;return Math.min(t+i,this._times)}const i=t%1,a=e*Math.floor(t)+this._duration*i;return this.time(a)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,i=this._duration,a=this._wait,s=this._times,r=this._swing,n=this._reverse;let o;if(null==t){const t=function(t){const e=r*Math.floor(t%(2*(a+i))/(a+i)),s=e&&!n||!e&&n,o=Math.pow(-1,s)*(t%(a+i))/i+s;return Math.max(Math.min(o,1),0)},l=s*(a+i)-a;return o=e<=0?Math.round(t(1e-5)):e=0;this._lastPosition=e;const a=this.duration(),s=this._lastTime<=0&&this._time>0,r=this._lastTime=a;this._lastTime=this._time,s&&this.fire("start",this);const n=this._isDeclarative;this.done=!n&&!r&&this._time>=a,this._reseted=!1;let o=!1;return(i||n)&&(this._initialise(i),this.transforms=new vt,o=this._run(n?t:e),this.fire("step",this)),this.done=this.done||o&&n,r&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,i=this._queue.length;et.lmultiplyO(e),ei=t=>t.transforms;function ii(){const t=this._transformationRunners.runners.map(ei).reduce(ti,new vt);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class ai{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Ke).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const i=this.ids.indexOf(t+1);return this.ids.splice(i,1,t+1),this.runners.splice(i,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;ee.id<=t.id)).map(ei).reduce(ti,new vt)},_addRunner(t){this._transformationRunners.add(t),qe.cancelImmediate(this._frameId),this._frameId=qe.immediate(ii.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new ai).add(new Ke(new vt(this))))}}});Q(Qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,i){if("string"==typeof e)return this.styleAttr(t,{[e]:i});let a=e;if(this._tryRetarget(t,a))return this;let s=new He(this._stepper).to(a),r=Object.keys(a);return this.queue((function(){s=s.from(this.element()[t](r))}),(function(e){return this.element()[t](s.at(e).valueOf()),s.done()}),(function(e){const i=Object.keys(e),n=(o=r,i.filter((t=>!o.includes(t))));var o;if(n.length){const e=this.element()[t](n),i=new _e(s.from()).valueOf();Object.assign(i,e),s.from(i)}const l=new _e(s.to()).valueOf();Object.assign(l,e),s.to(l),r=i,a=e})),this._rememberMorpher(t,s),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let i=new He(this._stepper).to(new _t(t));return this.queue((function(){i=i.from(this.element().zoom())}),(function(t){return this.element().zoom(i.at(t),e),i.done()}),(function(t,a){e=a,i.to(t)})),this._rememberMorpher("zoom",i),this},transform(t,e,i){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const a=vt.isMatrixLike(t);i=null!=t.affine?t.affine:null!=i?i:!a;const s=new He(this._stepper).type(i?Fe:vt);let r,n,o,l,h;return this.queue((function(){n=n||this.element(),r=r||T(t,n),h=new vt(e?void 0:n),n._addRunner(this),e||n._clearTransformRunnersBefore(this)}),(function(c){e||this.clearTransform();const{x:d,y:u}=new bt(r).transform(n._currentTransform(this));let g=new vt({...t,origin:[d,u]}),p=this._isDeclarative&&o?o:h;if(i){g=g.decompose(d,u),p=p.decompose(d,u);const t=g.rotate,e=p.rotate,i=[t-360,t,t+360],a=i.map((t=>Math.abs(t-e))),s=Math.min(...a),r=a.indexOf(s);g.rotate=i[r]}e&&(a||(g.rotate=t.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),s.from(p),s.to(g);const f=s.at(c);return l=f.rotate,o=new vt(f),this.addTransform(o),n._addRunner(this),s.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(r=T(e,n)),t={...e,origin:r}}),!0),this._isDeclarative&&this._rememberMorpher("transform",s),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new _t(e),this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);let a=null;return this.queue((function(){a=this.element()[t](),i.from(a),i.to(a+e)}),(function(e){return this.element()[t](i.at(e)),i.done()}),(function(t){i.to(a+new _t(t))})),this._rememberMorpher(t,i),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);return this.queue((function(){i.from(this.element()[t]())}),(function(e){return this.element()[t](i.at(e)),i.done()})),this._rememberMorpher(t,i),this},_queueNumber(t,e){return this._queueObject(t,new _t(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let i;return t&&e||(i=this._element.bbox()),t||(t=i.width/i.height*e),e||(e=i.height/i.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,i,a){if(4===arguments.length)return this.plot([t,e,i,a]);if(this._tryRetarget("plot",t))return this;const s=new He(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){s.from(this._element.array())}),(function(t){return this._element.plot(s.at(t)),s.done()})),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,i,a){return this._queueObject("viewbox",new kt(t,e,i,a))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Q(Qe,{rx:Zt,ry:$t,from:ne,to:oe}),q(Qe,"Runner");class si extends Vt{constructor(t,e=t){super(G("svg",t),e),this.namespace()}defs(){return this.isRoot()?V(this.node.querySelector("defs"))||this.put(new Ut):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof O.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:Y,version:"1.1"}).attr("xmlns:xlink",H,E):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,E).attr("xmlns:svgjs",null,E)}root(){return this.isRoot()?this:super.root()}}A({Container:{nested:K((function(){return this.put(new si)}))}}),q(si,"Svg",!0);let ri=class extends Vt{constructor(t,e=t){super(G("symbol",t),e)}};A({Container:{symbol:K((function(){return this.put(new ri)}))}}),q(ri,"Symbol");var ni=Object.freeze({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,i=this.bbox()){return this.cx(t,i).cy(e,i)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,i=this.bbox()){return this.x(t,i).y(e,i)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(O.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}});class oi extends qt{constructor(t,e=t){super(G("text",t),e),this.dom.leading=this.dom.leading??new _t(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new _t(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const i=this.dom.leading;this.each((function(a){if(X(this.node))return;const s=O.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=i*new _t(s);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=r:(this.attr("dy",a?r+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new _t(t.leading||1.3),this}writeDataToDom(){return R(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let i=0;t="";for(let a=0,s=e.length;a{let a;try{a=i.node instanceof F().SVGSVGElement?new kt(i.attr(["x","y","width","height"])):i.bbox()}catch(t){return}const s=new vt(i),r=s.translate(t,e).transform(s.inverse()),n=new bt(a.x,a.y).transform(r);i.move(n.x,n.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,i=this.bbox()){const a=t-i.x,s=e-i.y;return this.dmove(a,s)},size:function(t,e,i=this.bbox()){const a=I(this,t,e,i),s=a.width/i.width,r=a.height/i.height;return this.children().forEach((t=>{const e=new bt(i).transform(new vt(t).inverse());t.scale(s,r,e.x,e.y)})),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}});class gi extends Vt{constructor(t,e=t){super(G("g",t),e)}}Q(gi,ui),A({Container:{group:K((function(){return this.put(new gi)}))}}),q(gi,"G");class pi extends Vt{constructor(t,e=t){super(G("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,H)}}Q(pi,ui),A({Container:{link:K((function(t){return this.put(new pi).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const i=e.index(t);return e.add(this,i),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new pi,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),q(pi,"A");class fi extends Vt{constructor(t,e=t){super(G("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Lt("svg [mask*="+this.id()+"]")}}A({Container:{mask:K((function(){return this.defs().put(new fi)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof fi?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),q(fi,"Mask");class xi extends Gt{constructor(t,e=t){super(G("stop",t),e)}update(t){return("number"==typeof t||t instanceof _t)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new _t(t.offset)),this}}A({Gradient:{stop:function(t,e,i){return this.put(new xi).update(t,e,i)}}}),q(xi,"Stop");class bi extends Gt{constructor(t,e=t){super(G("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,i={}){return this.rule("@font-face",{fontFamily:t,src:e,...i})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let i=t+"{";for(const t in e)i+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return i+="}",i}(t,e))}}A("Dom",{style(t,e){return this.put(new bi).rule(t,e)},fontface(t,e,i){return this.put(new bi).font(t,e,i)}}),q(bi,"Style");class mi extends oi{constructor(t,e=t){super(G("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let i=null;return e&&(i=e.plot(t)),null==t?i:this}track(){return this.reference("href")}}A({Container:{textPath:K((function(t,e){return t instanceof oi||(t=this.text(t)),t.path(e)}))},Text:{path:K((function(t,e=!0){const i=new mi;let a;if(t instanceof We||(t=this.defs().path(t)),i.attr("href","#"+t,H),e)for(;a=this.node.firstChild;)i.node.appendChild(a);return this.put(i)})),textPath(){return this.findOne("textPath")}},Path:{text:K((function(t){return t instanceof oi||(t=(new oi).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Lt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),mi.prototype.MorphArray=Ye,q(mi,"TextPath");class vi extends qt{constructor(t,e=t){super(G("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,H)}}A({Container:{use:K((function(t,e){return this.put(new vi).use(t,e)}))}}),q(vi,"Use");const yi=B;Q([si,ri,de,ce,be],C("viewbox")),Q([xe,je,Ge,We],C("marker")),Q(oi,C("Text")),Q(We,C("Path")),Q(Ut,C("Defs")),Q([oi,li],C("Tspan")),Q([Ve,se,he,Qe],C("radius")),Q(Rt,C("EventTarget")),Q(Bt,C("Dom")),Q(Gt,C("Element")),Q(qt,C("Shape")),Q([Vt,re],C("Container")),Q(he,C("Gradient")),Q(Qe,C("Runner")),Ct.extend([...new Set(k)]),function(t=[]){Ne.push(...[].concat(t))}([_t,xt,kt,vt,Dt,ge,Ye,bt]),Q(Ne,{to(t){return(new He).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,i,a,s){return this.fromArray(t.map((function(t,r){return a.step(t,e[r],i,s[r],s)})))}});class wi extends Gt{constructor(t){super(G("filter",t),t),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(t,e){return!(t=super.put(t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return Lt('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class ki extends Gt{constructor(t,e){super(t,e),this.result(this.id())}in(t){if(null==t){const t=this.attr("in");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in",t)}result(t){return this.attr("result",t)}toString(){return this.result()}}const Ai=t=>function(...e){for(let i=t.length;i--;)null!=e[i]&&this.attr(t[i],e[i])},Ci={blend:Ai(["in","in2","mode"]),colorMatrix:Ai(["type","values"]),composite:Ai(["in","in2","operator"]),convolveMatrix:function(t){t=new Dt(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Ai(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Ai(["in","dx","dy","stdDeviation"]),flood:Ai(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,H)},morphology:Ai(["operator","radius"]),offset:Ai(["dx","dy"]),specularLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Ai([]),turbulence:Ai(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((t=>{const e=P(t),i=Ci[t];wi[e+"Effect"]=class extends ki{constructor(t){super(G("fe"+e,t),t)}update(t){return i.apply(this,t),this}},wi.prototype[t]=K((function(t,...i){const a=new wi[e+"Effect"];return null==t?this.put(a):("function"==typeof t?t.call(a,a):i.unshift(t),this.put(a).update(i))}))})),Q(wi,{merge(t){const e=this.put(new wi.MergeEffect);if("function"==typeof t)return t.call(e,e),e;return(t instanceof Array?t:[...arguments]).forEach((t=>{t instanceof wi.MergeNode?e.put(t):e.mergeNode(t)})),e},componentTransfer(t={}){const e=this.put(new wi.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;if(!(t.r||t.g||t.b||t.a)){t={r:t,g:t,b:t,a:t}}for(const i in t)e.add(new(wi["Func"+i.toUpperCase()])(t[i]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((t=>{const e=P(t);wi[e]=class extends ki{constructor(t){super(G("fe"+e,t),t)}}}));["funcR","funcG","funcB","funcA"].forEach((function(t){const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.ComponentTransferEffect.prototype[t]=i}));["distantLight","pointLight","spotLight"].forEach((t=>{const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.DiffuseLightingEffect.prototype[t]=i,wi.SpecularLightingEffect.prototype[t]=i})),Q(wi.MergeEffect,{mergeNode(t){return this.put(new wi.MergeNode).attr("in",t)}}),Q(Ut,{filter:function(t){const e=this.put(new wi);return"function"==typeof t&&t.call(e,e),e}}),Q(Vt,{filter:function(t){return this.defs().filter(t)}}),Q(Gt,{filterWith:function(t){const e=t instanceof wi?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const Si={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,i,a){return this.parent()&&this.parent().diffuseLighting(t,i,a).in(this)},displacementMap:function(t,e,i,a){return this.parent()&&this.parent().displacementMap(this,t,e,i,a)},dropShadow:function(t,e,i){return this.parent()&&this.parent().dropShadow(this,t,e,i).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){return t=t instanceof Array?t:[...t],this.parent()&&this.parent().merge(this,...t)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,i,a,s){return this.parent()&&this.parent().specularLighting(t,i,a,s).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,a,s){return this.parent()&&this.parent().turbulence(t,e,i,a,s).in(this)}};Q(ki,Si),Q(wi.MergeEffect,{in:function(t){return t instanceof wi.MergeNode?this.add(t,0):this.add((new wi.MergeNode).in(t),0),this}}),Q([wi.CompositeEffect,wi.BlendEffect,wi.DisplacementMapEffect],{in2:function(t){if(null==t){const t=this.attr("in2");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in2",t)}}),wi.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var Li=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getDefaultFilter",value:function(t,e){var i=this.w;t.unfilter(!0),(new wi).size("120%","180%","-5%","-40%"),i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"applyFilter",value:function(t,e,i){var a,s=this,r=this.w;if(t.unfilter(!0),"none"!==i){var n,o,l=r.config.chart.dropShadow,h="lighten"===i?2:.3;if(t.filterWith((function(t){t.colorMatrix({type:"matrix",values:"\n ".concat(h," 0 0 0 0\n 0 ").concat(h," 0 0 0\n 0 0 ").concat(h," 0 0\n 0 0 0 1 0\n "),in:"SourceGraphic",result:"brightness"}),l.enabled&&s.addShadow(t,e,l,"brightness")})),!l.noUserSpaceOnUse)null===(n=t.filterer())||void 0===n||null===(o=n.node)||void 0===o||o.setAttribute("filterUnits","userSpaceOnUse");this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node)}else this.getDefaultFilter(t,e)}},{key:"addShadow",value:function(t,e,i,a){var s,r=this.w,n=i.blur,o=i.top,l=i.left,h=i.color,c=i.opacity;if(h=Array.isArray(h)?h[e]:h,(null===(s=r.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:a,dx:l,dy:o,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:n,result:"blur"}),t.flood({"flood-color":h,"flood-opacity":c,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",a])}},{key:"dropShadow",value:function(t,e){var i,a,s,r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.w;if(t.unfilter(!0),v.isMsEdge()&&"radialBar"===o.config.chart.type)return t;if((null===(i=o.config.chart.dropShadow.enabledOnSeries)||void 0===i?void 0:i.length)>0&&-1===(null===(s=o.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.indexOf(n)))return t;return t.filterWith((function(t){r.addShadow(t,n,e,"SourceGraphic")})),e.noUserSpaceOnUse||t.filterer().node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node),t}},{key:"setSelectionFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;"none"!==s&&this.applyFilter(t,e,s.type)}}},{key:"_scaleFilterSize",value:function(t){if(t){!function(e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}}]),t}(),Mi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"roundPathCorners",value:function(t,e){function i(t,e,i){var s=e.x-t.x,r=e.y-t.y,n=Math.sqrt(s*s+r*r);return a(t,e,Math.min(1,i/n))}function a(t,e,i){return{x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}}function s(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function r(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var n=t.split(/[,\s]/).reduce((function(t,e){var i=e.match("([a-zA-Z])(.+)");return i?(t.push(i[1]),t.push(i[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),o=[];if(n.length>1){var l=r(n[0]),h=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(h=["L",l.x,l.y],n[n.length-1]=h),o.push(n[0]);for(var c=1;c2&&"L"==u[0]&&g.length>2&&"L"==g[0]){var p,f,x=r(d),b=r(u),m=r(g);p=i(b,x,e),f=i(b,m,e),s(u,p),u.origPoint=b,o.push(u);var v=a(p,b,.5),y=a(b,f,.5),w=["C",v.x,v.y,y.x,y.y,f.x,f.y];w.origPoint=b,o.push(w)}else o.push(u)}if(h){var k=r(o[o.length-1]);o.push(["Z"]),s(o[0],k)}}else o=n;return o.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":n,"stroke-linecap":o})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,c=this.w.globals.dom.Paper.rect();return c.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":h}),c.node.setAttribute("fill",r),c}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:a,stroke:e,"stroke-width":i})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var i=this.w.globals.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,s=void 0===a?"#a8a8a8":a,r=t.strokeWidth,n=void 0===r?1:r,o=t.fill,l=t.fillOpacity,h=void 0===l?1:l,c=t.strokeOpacity,d=void 0===c?1:c,u=t.classes,g=t.strokeLinecap,p=void 0===g?null:g,f=t.strokeDashArray,x=void 0===f?0:f,b=this.w;return null===p&&(p=b.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(b.globals.gridHeight)),b.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":h,stroke:s,"stroke-opacity":d,"stroke-linecap":p,"stroke-width":n,"stroke-dasharray":x,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){var i=["M",t,e].join(" ");return i}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=[" L",t,e].join(" "):"H"===i?a=[" H",t].join(" "):"V"===i&&(a=[" V",e].join(" ")),a}},{key:"curve",value:function(t,e,i,a,s,r){var n=["C",t,e,i,a,s,r].join(" ");return n}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,s,r,n){var o="A";arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(o="a");var l=[o,t,e,i,a,s,r,n].join(" ");return l}},{key:"renderPaths",value:function(t){var e,i=t.j,a=t.realIndex,s=t.pathFrom,r=t.pathTo,n=t.stroke,o=t.strokeWidth,l=t.strokeLinecap,h=t.fill,c=t.animationDelay,d=t.initialSpeed,g=t.dataChangeSpeed,p=t.className,f=t.chartType,x=t.shouldClipToGrid,b=void 0===x||x,m=t.bindEventsOnPaths,v=void 0===m||m,w=t.drawShadow,k=void 0===w||w,A=this.w,C=new Li(this.ctx),S=new y(this.ctx),L=this.w.config.chart.animations.enabled,M=L&&this.w.config.chart.animations.dynamicAnimation.enabled,P=!!(L&&!A.globals.resized||M&&A.globals.dataChanged&&A.globals.shouldAnimate);P?e=s:(e=r,A.globals.animationEnded=!0);var I=A.config.stroke.dashArray,T=0;T=Array.isArray(I)?I[a]:A.config.stroke.dashArray;var z=this.drawPath({d:e,stroke:n,strokeWidth:o,fill:h,fillOpacity:1,classes:p,strokeLinecap:l,strokeDashArray:T});z.attr("index",a),b&&("bar"===f&&!A.globals.isHorizontal||A.globals.comboCharts?z.attr({"clip-path":"url(#gridRectBarMask".concat(A.globals.cuid,")")}):z.attr({"clip-path":"url(#gridRectMask".concat(A.globals.cuid,")")})),A.config.chart.dropShadow.enabled&&k&&C.dropShadow(z,A.config.chart.dropShadow,a),v&&(z.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,z)),z.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,z)),z.node.addEventListener("mousedown",this.pathMouseDown.bind(this,z))),z.attr({pathTo:r,pathFrom:s});var X={el:z,j:i,realIndex:a,pathFrom:s,pathTo:r,fill:h,strokeWidth:o,delay:c};return!L||A.globals.resized||A.globals.dataChanged?!A.globals.resized&&A.globals.dataChanged||S.showDelayedElements():S.animatePathsGradually(u(u({},X),{},{speed:d})),A.globals.dataChanged&&M&&P&&S.animatePathsGradually(u(u({},X),{},{speed:g})),z}},{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,i,(function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:a,width:s+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:a,width:s}):"squares"===t?r.rect(e,i).fill("none").stroke({color:a,width:s}):"circles"===t&&r.circle(e).fill("none").stroke({color:a,width:s})}))}},{key:"drawGradient",value:function(t,e,i,a,s){var r,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,c=this.w;e.length<9&&0===e.indexOf("#")&&(e=v.hexToRgba(e,a)),i.length<9&&0===i.indexOf("#")&&(i=v.hexToRgba(i,s));var d=0,u=1,g=1,p=null;null!==o&&(d=void 0!==o[0]?o[0]/100:0,u=void 0!==o[1]?o[1]/100:1,g=void 0!==o[2]?o[2]/100:1,p=void 0!==o[3]?o[3]/100:null);var f=!("donut"!==c.config.chart.type&&"pie"!==c.config.chart.type&&"polarArea"!==c.config.chart.type&&"bubble"!==c.config.chart.type);if(r=l&&0!==l.length?c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){(Array.isArray(l[h])?l[h]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){t.stop(d,e,a),t.stop(u,i,s),t.stop(g,i,s),null!==p&&t.stop(p,e,a)})),f){var x=c.globals.gridWidth/2,b=c.globals.gridHeight/2;"bubble"!==c.config.chart.type?r.attr({gradientUnits:"userSpaceOnUse",cx:x,cy:b,r:n}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?r.from(0,0).to(0,1):"diagonal"===t?r.from(0,0).to(1,1):"horizontal"===t?r.from(0,1).to(1,1):"diagonal2"===t&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,i=t.maxWidth,a=t.fontSize,s=t.fontFamily,r=this.getTextRects(e,a,s),n=r.width/e.length,o=Math.floor(i/n);return i-1){var o=i.globals.selectedDataPoints[s].indexOf(r);i.globals.selectedDataPoints[s].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),h=i.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),c=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),a.getDefaultFilter(t,s)}))};c(l),c(h)}t.node.setAttribute("selected","true"),n="true",void 0===i.globals.selectedDataPoints[s]&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(r)}if("true"===n){var d=i.config.states.active.filter;if("none"!==d)a.applyFilter(t,s,d.type);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}}else if("none"!==i.config.states.active.filter.type)if("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice)a.getDefaultFilter(t,s);else{u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,a){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w,n=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),r.globals.dom.Paper.add(n);var o=n.bbox();return s||(o=n.node.getBoundingClientRect()),n.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i/1.1)return void(t.textContent=e.substring(0,a)+"...");t.textContent="."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}(),Pi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getStackedSeriesTotals",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,i=[];if(0===e.globals.series.length)return i;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,i=[];return e.globals.seriesGroups.forEach((function(a){var s=[];e.config.series.forEach((function(t,i){a.indexOf(e.globals.seriesNames[i])>-1&&s.push(i)}));var r=e.globals.series.map((function(t,e){return-1===s.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));i.push(t.getStackedSeriesTotals(r))})),i}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,i=[],a=[],s=[],r=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){s.push(e),a.push(null)})),e.yaxis.forEach((function(t,e){i[e]=[]}));var n=[];e.yaxis.forEach((function(t,a){var o=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,n){if(e.name===t){var l=n;a===n||r?!r||s.indexOf(n)>-1?i[a].push([a,n]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[n].push([n,a]),l=a),o=!0,-1!==(l=s.indexOf(l))&&s.splice(l,1)}}))}))}o||n.push(a)})),i=i.map((function(t,e){var i=[];return t.forEach((function(t){a[t[1]]=t[0],i.push(t[1])})),i}));for(var o=e.yaxis.length-1,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,i){return t===i[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map((function(t,i){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),i}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var i=0;if(Array.isArray(t))for(var a=0;at&&i.globals.seriesX[s][n]0){var g=function(t,e){var i=s.config.yaxis[s.globals.seriesYAxisReverseMap[e]],r=t<0?-1:1;return t=Math.abs(t),i.logarithmic&&(t=a.getBaseLog(i.logBase,t)),-r*t/n[e]};if(r.isMultipleYAxis){l=[];for(var p=0;p0&&e.forEach((function(e){var n=[],o=[];t.i.forEach((function(i,a){s.config.series[i].group===e&&(n.push(t.series[a]),o.push(i))})),n.length>0&&r.push(a.draw(n,i,o))})),r}}],[{key:"checkComboSeries",value:function(t,e){var i=!1,a=0,s=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||a++,void 0!==t.type&&t.type!==e&&s++})),s>0&&(i=!0),{comboBarCount:a,comboCharts:i}}},{key:"extendArrayProps",value:function(t,e,i){var a,s,r,n,o,l;(null!==(a=e)&&void 0!==a&&a.yaxis&&(e=t.extendYAxis(e,i)),null!==(s=e)&&void 0!==s&&s.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(r=e)&&void 0!==r&&null!==(n=r.annotations)&&void 0!==n&&n.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(l=o.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e)));return e}}]),t}(),Ii=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e}return s(t,[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===t.label.orientation){var a=null!==e?e:0,s=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(null!==s){var r=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-r.height+4);var n="top"===t.label.position?r.width:-r.width;s.setAttribute("y",parseFloat(s.getAttribute("y"))+n);var o=this.annoCtx.graphics.rotateAroundCenter(s),l=o.x,h=o.y;s.setAttribute("transform","rotate(-90 ".concat(l," ").concat(h,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=t.getBoundingClientRect(),r=e.label.style.padding,n=r.left,o=r.right,l=r.top,h=r.bottom;if("vertical"===e.label.orientation){var c=[n,o,l,h];l=c[0],h=c[1],n=c[2],o=c[3]}var d=s.left-a.left-n,u=s.top-a.top-l,g=this.annoCtx.graphics.drawRect(d-i.globals.barPadForNumericAxis,u,s.width+n+o,s.height+l+h,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&g.node.classList.add(e.id),g}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,a,s){var r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(a,"']"));if(r){var n=r.parentNode,o=t.addBackgroundToAnno(r,i);o&&(n.insertBefore(o.node,r),i.label.mouseEnter&&o.node.addEventListener("mouseenter",i.label.mouseEnter.bind(t,i)),i.label.mouseLeave&&o.node.addEventListener("mouseleave",i.label.mouseLeave.bind(t,i)),i.label.click&&o.node.addEventListener("click",i.label.click.bind(t,i)))}};e.config.annotations.xaxis.forEach((function(t,e){return i(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return i(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return i(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var i,a=this.w,s="y1"===t?e.y:e.y2,r=!1;if(this.annoCtx.invertAxis){var n=a.config.xaxis.convertedCatToNumeric?a.globals.categoryLabels:a.globals.labels,o=n.indexOf(s),l=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(o+1,")"));i=l?parseFloat(l.getAttribute("y")):(a.globals.gridHeight/n.length-1)*(o+1)-a.globals.barHeight,void 0!==e.seriesIndex&&a.globals.barHeight&&(i-=a.globals.barHeight/2*(a.globals.series.length-1)-a.globals.barHeight*e.seriesIndex)}else{var h,c=a.globals.seriesYAxisMap[e.yAxisIndex][0],d=a.config.yaxis[e.yAxisIndex].logarithmic?new Pi(this.annoCtx.ctx).getLogVal(a.config.yaxis[e.yAxisIndex].logBase,s,c)/a.globals.yLogRatio[c]:(s-a.globals.minYArr[c])/(a.globals.yRange[c]/a.globals.gridHeight);i=a.globals.gridHeight-Math.min(Math.max(d,0),a.globals.gridHeight),r=d>a.globals.gridHeight||d<0,!e.marker||void 0!==e.y&&null!==e.y||(i=0),null!==(h=a.config.yaxis[e.yAxisIndex])&&void 0!==h&&h.reversed&&(i=d)}return"string"==typeof s&&s.includes("px")&&(i=parseFloat(s)),{yP:i,clipped:r}}},{key:"getX1X2",value:function(t,e){var i=this.w,a="x1"===t?e.x:e.x2,s=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,r=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,n=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,o=!1,l=this.annoCtx.inversedReversedAxis?(r-a)/(n/i.globals.gridWidth):(a-s)/(n/i.globals.gridWidth);return"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||i.config.chart.sparkline.enabled||(l=this.getStringX(a)),"string"==typeof a&&a.includes("px")&&(l=parseFloat(a)),null==a&&e.marker&&(l=i.globals.gridWidth),void 0!==e.seriesIndex&&i.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=i.globals.barWidth/2*(i.globals.series.length-1)-i.globals.barWidth*e.seriesIndex),l>i.globals.gridWidth?(l=i.globals.gridWidth,o=!0):l<0&&(l=0,o=!0),{x:l,clipped:o}}},{key:"getStringX",value:function(t){var e=this.w,i=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var a=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),s=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(a+1,")"));return s&&(i=parseFloat(s.getAttribute("x"))),i}}]),t}(),Ti=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addXaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=this.helpers.getX1X2("x1",t),n=r.x,o=r.clipped,l=!0,h=t.label.text,c=t.strokeDashArray;if(v.isNumber(n)){if(null===t.x2||void 0===t.x2){if(!o){var d=this.annoCtx.graphics.drawLine(n+t.offsetX,0+t.offsetY,n+t.offsetX,s.globals.gridHeight+t.offsetY,t.borderColor,c,t.borderWidth);e.appendChild(d.node),t.id&&d.node.classList.add(t.id)}}else{var u=this.helpers.getX1X2("x2",t);if(a=u.x,l=u.clipped,!o||!l){if(a12?u-12:0===u?12:u;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(g))).replace(/(^|[^\\])h/g,"$1"+g);var p=a?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var x=a?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);var b=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var m=u<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));var v=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var y=-t.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){var k=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(k)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var A=(a?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(n[0],"g"),n[A])).replace(new RegExp(o[0],"g"),o[A])).replace(new RegExp(s[0],"g"),s[c])).replace(new RegExp(r[0],"g"),r[c])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var a=this.w;void 0!==a.config.xaxis.min&&(t=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(e=a.config.xaxis.max);var s=this.getDate(t),r=this.getDate(e),n=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=v.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),Xi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return s(t,[{key:"xLabelFormat",value:function(t,e,i,a){var s=this.w;if("datetime"===s.config.xaxis.type&&void 0===s.config.xaxis.labels.formatter&&void 0===s.config.tooltip.x.formatter){var r=new zi(this.ctx);return r.formatDate(r.getDate(e),s.config.tooltip.x.format)}return t(e,i,a)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,i){var a=this.w;if(v.isNumber(t))if(0!==a.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:a.globals.yValueDecimal);else{var s=t.toFixed(0);t=t==s?s:t.toFixed(1)}return t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(v.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(v.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var i=e.globals.maxX-e.globals.minX;return i>0&&i<100?t.toFixed(1):t.toFixed(0)}if(e.globals.isBarHorizontal)if(e.globals.maxY-e.globals.minYArr<4)return t.toFixed(1);return t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,a){void 0!==i.labels.formatter?e.globals.yLabelFormatters[a]=i.labels.formatter:e.globals.yLabelFormatters[a]=function(s){return e.globals.xyCharts?Array.isArray(s)?s.map((function(e){return t.defaultYFormatter(e,i,a)})):t.defaultYFormatter(s,i,a):s}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),Ri=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getLabel",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",n=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,l=void 0===t[a]?"":t[a],h=l,c=o.globals.xLabelFormatter,d=o.config.xaxis.labels.formatter,u=!1,g=new Xi(this.ctx),p=l;n&&(h=g.xLabelFormat(c,l,p,{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o}),void 0!==d&&(h=d(l,t[a],{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o})));var f,x;e.length>0?(f=e[a].unit,x=null,e.forEach((function(t){"month"===t.unit?x="year":"day"===t.unit?x="month":"hour"===t.unit?x="day":"minute"===t.unit&&(x="hour")})),u=x===f,i=e[a].position,h=e[a].value):"datetime"===o.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var b=new Mi(this.ctx),m={};m=o.globals.rotateXLabels&&n?b.getTextRects(h,parseInt(r,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):b.getTextRects(h,parseInt(r,10));var v=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||s.indexOf(h)>=0&&v)&&(h=""),{x:i,text:h,textRect:m,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var a=this.w,s=a.config.xaxis.tickAmount;return"dataPoints"===s&&(s=Math.round(a.globals.gridWidth/120)),s>i||t%Math.round(i/(s+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,a,s){var r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=s[s.length-1];e.xa.length||a.some((function(t){return Array.isArray(t.seriesName)}))?t:i.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,i=e.config.yaxis[t];if(!i.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!i.showForNullSeries){var a=e.globals.seriesYAxisMap[t],s=new Pi(this.ctx);return a.every((function(t){return s.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,i,a,s,r,n){var o=this.w,l=new Mi(this.ctx),h=o.globals.translateY+o.config.yaxis[s].labels.offsetY;if(o.globals.isBarHorizontal?h=0:"heatmap"===o.config.chart.type&&(h+=r/2),a.show&&e>0){!0===o.config.yaxis[s].opposite&&(t+=a.width);for(var c=e;c>=0;c--){var d=l.drawLine(t+i.offsetX-a.width+a.offsetX,h+a.offsetY,t+i.offsetX+a.offsetX,h+a.offsetY,a.color);n.add(d),h+=r}}}}]),t}(),Yi=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx),this.axesUtils=new Ri(this.annoCtx)}return s(t,[{key:"addYaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=t.strokeDashArray,n=this.helpers.getY1Y2("y1",t),o=n.yP,l=n.clipped,h=!0,c=!1,d=t.label.text;if(null===t.y2||void 0===t.y2){if(!l){c=!0;var u=this.annoCtx.graphics.drawLine(0+t.offsetX,o+t.offsetY,this._getYAxisAnnotationWidth(t),o+t.offsetY,t.borderColor,r,t.borderWidth);e.appendChild(u.node),t.id&&u.node.classList.add(t.id)}}else{if(a=(n=this.helpers.getY1Y2("y2",t)).yP,h=n.clipped,a>o){var g=o;o=a,a=g}if(!l||!h){c=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,a+t.offsetY,this._getYAxisAnnotationWidth(t),o-a,0,t.fillColor,t.opacity,1,t.borderColor,r);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(c){var f="right"===t.label.position?s.globals.gridWidth:"center"===t.label.position?s.globals.gridWidth/2:0,x=this.annoCtx.graphics.drawText({x:f+t.label.offsetX,y:(null!=a?a:o)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});x.attr({rel:i}),e.appendChild(x.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;e.globals.gridWidth;return(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,a){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,i.node,a)})),i}}]),t}(),Ei=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addPointAnnotation",value:function(t,e,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",t),s=a.x,r=a.clipped,n=(a=this.helpers.getY1Y2("y1",t)).yP,o=a.clipped;if(v.isNumber(s)&&!o&&!r){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},h=this.annoCtx.graphics.drawMarker(s+t.marker.offsetX,n+t.marker.offsetY,l);e.appendChild(h.node);var c=t.label.text?t.label.text:"",d=this.annoCtx.graphics.drawText({x:s+t.label.offsetX,y:n+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:c,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(d.attr({rel:i}),e.appendChild(d.node),t.customSVG.SVG){var u=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});u.attr({transform:"translate(".concat(s+t.customSVG.offsetX,", ").concat(n+t.customSVG.offsetY,")")}),u.node.innerHTML=t.customSVG.SVG,e.appendChild(u.node)}if(t.image.path){var g=t.image.width?t.image.width:20,p=t.image.height?t.image.height:20;h=this.annoCtx.addImage({x:s+t.image.offsetX-g/2,y:n+t.image.offsetY-p/2,width:g,height:p,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&h.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&h.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&h.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,a){t.addPointAnnotation(e,i.node,a)})),i}}]),t}();var Hi={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},Oi=function(){function t(){i(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return s(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[Hi],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),Fi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.graphics=new Mi(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Ii(this),this.xAxisAnnotations=new Ti(this),this.yAxisAnnotations=new Yi(this),this.pointsAnnotations=new Ei(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return s(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=t.config.chart.animations.enabled,r=[e,i,a],n=[i.node,e.node,a.node],o=0;o<3;o++)t.globals.dom.elGraphical.add(r[o]),!s||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&n[o].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:n[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,a=t.y,s=t.text,r=t.textAnchor,n=t.foreColor,o=t.fontSize,l=t.fontFamily,h=t.fontWeight,c=t.cssClass,d=t.backgroundColor,u=t.borderWidth,g=t.strokeDashArray,p=t.borderRadius,f=t.borderColor,x=t.appendTo,b=void 0===x?".apexcharts-svg":x,m=t.paddingLeft,v=void 0===m?4:m,y=t.paddingRight,w=void 0===y?4:y,k=t.paddingBottom,A=void 0===k?2:k,C=t.paddingTop,S=void 0===C?2:C,L=this.w,M=this.graphics.drawText({x:i,y:a,text:s,textAnchor:r||"start",fontSize:o||"12px",fontWeight:h||"regular",fontFamily:l||L.config.chart.fontFamily,foreColor:n||L.config.chart.foreColor,cssClass:c}),P=L.globals.dom.baseEl.querySelector(b);P&&P.appendChild(M.node);var I=M.bbox();if(s){var T=this.graphics.drawRect(I.x-v,I.y-S,I.width+v+w,I.height+A+S,p,d||"transparent",1,u,f,g);P.insertBefore(T.node,M.node)}}},{key:"addImage",value:function(t,e){var i=this.w,a=t.path,s=t.x,r=void 0===s?0:s,n=t.y,o=void 0===n?0:n,l=t.width,h=void 0===l?20:l,c=t.height,d=void 0===c?20:c,u=t.appendTo,g=void 0===u?".apexcharts-svg":u,p=i.globals.dom.Paper.image(a);p.size(h,d).move(r,o);var f=i.globals.dom.baseEl.querySelector(g);return f&&f.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,a=t.context,s=t.type,r=t.contextMethod,n=a,o=n.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),h=l.childNodes.length+1,c=new Oi,d=Object.assign({},"xaxis"===s?c.xAxisAnnotation:"yaxis"===s?c.yAxisAnnotation:c.pointAnnotation),u=v.extend(d,e);switch(s){case"xaxis":this.addXaxisAnnotation(u,l,h);break;case"yaxis":this.addYaxisAnnotation(u,l,h);break;case"point":this.addPointAnnotation(u,l,h)}var g=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(h,"']")),p=this.helpers.addBackgroundToAnno(g,u);return p&&l.insertBefore(p.node,g),i&&o.globals.memory.methodsToExec.push({context:n,id:u.id?u.id:v.randomId(),method:r,label:"addAnnotation",params:e}),a}},{key:"clearAnnotations",value:function(t){for(var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),a=e.globals.memory.methodsToExec.length-1;a>=0;a--)"addText"!==e.globals.memory.methodsToExec[a].label&&"addAnnotation"!==e.globals.memory.methodsToExec[a].label||e.globals.memory.methodsToExec.splice(a,1);i=v.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(e));a&&(i.globals.memory.methodsToExec.map((function(t,a){t.id===e&&i.globals.memory.methodsToExec.splice(a,1)})),Array.prototype.forEach.call(a,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),Di=function(t){var e,i=t.isTimeline,a=t.ctx,s=t.seriesIndex,r=t.dataPointIndex,n=t.y1,o=t.y2,l=t.w,h=l.globals.seriesRangeStart[s][r],c=l.globals.seriesRangeEnd[s][r],d=l.globals.labels[r],u=l.config.series[s].name?l.config.series[s].name:"",g=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,f={w:l,seriesIndex:s,dataPointIndex:r,start:h,end:c};("function"==typeof p&&(u=p(u,f)),null!==(e=l.config.series[s].data[r])&&void 0!==e&&e.x&&(d=l.config.series[s].data[r].x),i)||"datetime"===l.config.xaxis.type&&(d=new Xi(a).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(a).formatDate,w:l}));"function"==typeof g&&(d=g(d,f)),Number.isFinite(n)&&Number.isFinite(o)&&(h=n,c=o);var x="",b="",m=l.globals.colors[s];if(void 0===l.config.tooltip.x.formatter)if("datetime"===l.config.xaxis.type){var v=new zi(a);x=v.formatDate(v.getDate(h),l.config.tooltip.x.format),b=v.formatDate(v.getDate(c),l.config.tooltip.x.format)}else x=h,b=c;else x=l.config.tooltip.x.formatter(h),b=l.config.tooltip.x.formatter(c);return{start:h,end:c,startVal:x,endVal:b,ylabel:d,color:m,seriesName:u}},_i=function(t){var e=t.color,i=t.seriesName,a=t.ylabel,s=t.start,r=t.end,n=t.seriesIndex,o=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(n);s=l.yLbFormatter(s),r=l.yLbFormatter(r);var h=l.yLbFormatter(t.w.globals.series[n][o]),c='\n '.concat(s,'\n - \n ').concat(r,"\n ");return'
'+(i||"")+'
'+a+": "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[n].type||"rangeBar"===t.w.config.series[n].type?c:"".concat(h,""):c)+"
"},Ni=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){this.hideYAxis();return v.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var i=e.w.config.series[e.seriesIndex].name;return null!==t?i+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),u(u({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,a=e.dataPointIndex,s=e.w,r=function(){var t=s.globals.seriesRangeStart[i][a];return s.globals.seriesRangeEnd[i][a]-t};return s.globals.comboCharts?"rangeBar"===s.config.series[i].type||"rangeArea"===s.config.series[i].type?r():t:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Di(u(u({},t),{},{isTimeline:!0})),i=e.color,a=e.seriesName,s=e.ylabel,r=e.startVal,n=e.endVal;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t):function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,i;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(i=t.plotOptions.bar)&&void 0!==i&&i.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}}}}},{key:"brush",value:function(t){return v.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return u(u({},t),{},{plotOptions:u(u({},t.plotOptions),{},{bar:u(u({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return v.isNumber(t)?Math.floor(t):t};var a=t.xaxis.labels.formatter,s=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(s=i.map((function(t){return Array.isArray(t)?t:String(t)}))),s&&s.length&&(t.xaxis.labels.formatter=function(t){return v.isNumber(t)?a(s[Math.floor(t)-1]):a(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,i,a,s){var r=t.globals.seriesCandleO[e][i],n=t.globals.seriesCandleH[e][i],o=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],h=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==s?'
\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][i],"\n
"):'
')+"
".concat(a[0],': ')+r+"
"+"
".concat(a[1],': ')+n+"
"+(o?"
".concat(a[2],': ')+o+"
":"")+"
".concat(a[3],': ')+l+"
"+"
".concat(a[4],': ')+h+"
"}}]),t}(),Wi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(t){var e=t.responsiveOverride,i=this.opts,a=new Oi,s=new Ni(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),n={};if(i&&"object"===b(i)){var o,l,h,c,d,u,g,p,f,x,m={};m=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?s[i.chart.type]():s.line(),null!==(o=i.plotOptions)&&void 0!==o&&null!==(l=o.bar)&&void 0!==l&&l.isFunnel&&(m=s.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(m=s.stackedBars()),null!==(h=i.chart.brush)&&void 0!==h&&h.enabled&&(m=s.brush(m)),null!==(c=i.plotOptions)&&void 0!==c&&null!==(d=c.line)&&void 0!==d&&d.isSlopeChart&&(m=s.slope()),i.chart.stacked&&"100%"===i.chart.stackType&&(i=s.stacked100(i)),null!==(u=i.plotOptions)&&void 0!==u&&null!==(g=u.bar)&&void 0!==g&&g.isDumbbell&&(i=s.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},e||(i.xaxis.convertedCatToNumeric=!1),(null!==(p=(i=this.checkForCatToNumericXAxis(this.chartType,m,i)).chart.sparkline)&&void 0!==p&&p.enabled||null!==(f=window.Apex.chart)&&void 0!==f&&null!==(x=f.sparkline)&&void 0!==x&&x.enabled)&&(m=s.sparkline(m)),n=v.extend(r,m)}var y=v.extend(n,window.Apex);return r=v.extend(y,i),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var a,s,r=new Ni(i),n=("bar"===t||"boxPlot"===t)&&(null===(a=i.plotOptions)||void 0===a||null===(s=a.bar)||void 0===s?void 0:s.horizontal),o="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,l="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,h=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return n||o||!l||"between"===h||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new Oi;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=v.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[v.extend(i.yAxis,t.yaxis)]:t.yaxis=v.extendArray(t.yaxis,i.yAxis);var a=!1;t.yaxis.forEach((function(t){t.logarithmic&&(a=!0)}));var s=t.series;return e&&!s&&(s=e.config.series),a&&s.length!==t.yaxis.length&&s.length&&(t.yaxis=s.map((function(e,a){if(e.name||(s[a].name="series-".concat(a+1)),t.yaxis[a])return t.yaxis[a].seriesName=s[a].name,t.yaxis[a];var r=v.extend(i.yAxis,t.yaxis[0]);return r.show=!1,r}))),a&&s.length>1&&s.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.yaxis=v.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.xaxis=v.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new Oi;return t.annotations.points=v.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),Bi=function(){function t(){i(this,t)}return s(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:t.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=v.extend({},t),e.initialSeries=v.clone(t.series),e.lastXAxis=v.clone(e.initialConfig.xaxis),e.lastYAxis=v.clone(e.initialConfig.yaxis),e}}]),t}(),Gi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(){var t=new Wi(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new Bi).init(t)}}}]),t}(),ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return s(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,a=parseInt(e.globals.gridWidth,10),s=parseInt(e.globals.gridHeight,10),r=a>s?a:s,n=t.image,o=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=r+1,l=r):(o=t.width,l=t.height);var h=document.createElementNS(e.globals.SVGNS,"pattern");Mi.setAttrs(h,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var c=document.createElementNS(e.globals.SVGNS,"image");h.appendChild(c),c.setAttributeNS(window.SVG.xlink,"href",n),Mi.setAttrs(c,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),c.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(h)}},{key:"getSeriesIndex",value:function(t){var e=this.w,i=e.config.chart.type;return("bar"===i||"rangeBar"===i)&&e.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var i,a=this.w,s=null,n=null,o=r(t);try{for(o.s();!(i=o.n()).done;){var l=i.value;l>=e.threshold?(null===s||l>s)&&(s=l):(null===n||l-1?x=v.getOpacityFromRGBA(c):m=v.hexToRgba(v.rgb2hex(c),x),t.opacity&&(x=t.opacity),"pattern"===p&&(n=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:n,fillColor:c,fillOpacity:x,defaultColor:m})),b){var y=f(l.fill.gradient.colorStops)||[],w=l.fill.gradient.type;h&&(y[this.seriesIndex]=this.computeColorStops(s.globals.series[this.seriesIndex],l.plotOptions.line.colors),w="vertical"),o=this.handleGradientFill({type:w,fillConfig:t.fillConfig,fillColor:c,fillOpacity:x,colorStops:y,i:this.seriesIndex})}if("image"===p){var k=l.fill.image.src,A=t.patternID?t.patternID:"",C="pattern".concat(s.globals.cuid).concat(t.seriesNumber+1).concat(A);-1===this.patternIDs.indexOf(C)&&(this.clippedImgArea({opacity:x,image:Array.isArray(k)?t.seriesNumber-1&&(p=v.getOpacityFromRGBA(g));var f=void 0===o.gradient.opacityTo?a:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[n]:o.gradient.opacityTo;if(void 0===o.gradient.gradientToColors||0===o.gradient.gradientToColors.length)d="dark"===o.gradient.shade?c.shadeColor(-1*parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i):c.shadeColor(parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i);else if(o.gradient.gradientToColors[l.seriesNumber]){var x=o.gradient.gradientToColors[l.seriesNumber];d=x,x.indexOf("rgba")>-1&&(f=v.getOpacityFromRGBA(x))}else d=i;if(o.gradient.gradientFrom&&(g=o.gradient.gradientFrom),o.gradient.gradientTo&&(d=o.gradient.gradientTo),o.gradient.inverseColors){var b=g;g=d,d=b}return g.indexOf("rgb")>-1&&(g=v.rgb2hex(g)),d.indexOf("rgb")>-1&&(d=v.rgb2hex(d)),h.drawGradient(e,g,d,p,f,l.size,o.gradient.stops,r,n)}}]),t}(),Vi=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],r=this.w,n=e,o=t,l=null,h=new Mi(this.ctx),c=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(o.x))for(var d=0;d0:r.config.markers.size>0)||s||c){p||(f+=" w".concat(v.randomId()));var x=this.getMarkerConfig({cssClass:f,seriesIndex:e,dataPointIndex:g});if(r.config.series[n].data[g]&&(r.config.series[n].data[g].fillColor&&(x.pointFillColor=r.config.series[n].data[g].fillColor),r.config.series[n].data[g].strokeColor&&(x.pointStrokeColor=r.config.series[n].data[g].strokeColor)),void 0!==a&&(x.pSize=a),(o.x[d]<-r.globals.markers.largestSize||o.x[d]>r.globals.gridWidth+r.globals.markers.largestSize||o.y[d]<-r.globals.markers.largestSize||o.y[d]>r.globals.gridHeight+r.globals.markers.largestSize)&&(x.pSize=0),!p)(r.globals.markers.size[e]>0||s||c)&&!l&&(l=h.group({class:s||c?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),(u=h.drawMarker(o.x[d],o.y[d],x)).attr("rel",g),u.attr("j",g),u.attr("index",e),u.node.setAttribute("default-marker-size",x.pSize),new Li(this.ctx).setSelectionFilter(u,e,g),this.addEvents(u),l&&l.add(u)}else void 0===r.globals.pointsArray[e]&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([o.x[d],o.y[d]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,i=t.seriesIndex,a=t.dataPointIndex,s=void 0===a?null:a,r=t.radius,n=void 0===r?null:r,o=t.size,l=void 0===o?null:o,h=t.strokeWidth,c=void 0===h?null:h,d=this.w,u=this.getMarkerStyle(i),g=null===l?d.globals.markers.size[i]:l,p=d.config.markers;return null!==s&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===i&&t.dataPointIndex===s&&(u.pointStrokeColor=t.strokeColor,u.pointFillColor=t.fillColor,g=t.size,u.pointShape=t.shape)})),{pSize:null===n?g:n,pRadius:null!==n?n:p.radius,pointStrokeWidth:null!==c?c:Array.isArray(p.strokeWidth)?p.strokeWidth[i]:p.strokeWidth,pointStrokeColor:u.pointStrokeColor,pointFillColor:u.pointFillColor,shape:u.pointShape||(Array.isArray(p.shape)?p.shape[i]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[i]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[i]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[i]:p.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(t){var e=this.w,i=new Mi(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,a=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[t]:a,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),Ui=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return s(t,[{key:"draw",value:function(t,e,i){var a=this.w,s=new Mi(this.ctx),r=i.realIndex,n=i.pointsPos,o=i.zRatio,l=i.elParent,h=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(h.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(n.x))for(var c=0;cp.maxBubbleRadius&&(g=p.maxBubbleRadius)}var f=n.x[c],x=n.y[c];if(g=g||0,null!==x&&void 0!==a.globals.series[r][d]||(u=!1),u){var b=this.drawPoint(f,x,g,r,d,e);h.add(b)}l.add(h)}}},{key:"drawPoint",value:function(t,e,i,a,s,r){var n=this.w,o=a,l=new y(this.ctx),h=new Li(this.ctx),c=new ji(this.ctx),d=new Vi(this.ctx),u=new Mi(this.ctx),g=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:s,radius:"bubble"===n.config.chart.type||n.globals.comboCharts&&n.config.series[a]&&"bubble"===n.config.series[a].type?i:null}),p=c.fillPath({seriesNumber:a,dataPointIndex:s,color:g.pointFillColor,patternUnits:"objectBoundingBox",value:n.globals.series[a][r]}),f=u.drawMarker(t,e,g);if(n.config.series[o].data[s]&&n.config.series[o].data[s].fillColor&&(p=n.config.series[o].data[s].fillColor),f.attr({fill:p}),n.config.chart.dropShadow.enabled){var x=n.config.chart.dropShadow;h.dropShadow(f,x,a)}if(!this.initialAnim||n.globals.dataChanged||n.globals.resized)n.globals.animationEnded=!0;else{var b=n.config.chart.animations.speed;l.animateMarker(f,b,n.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(f)}),100)}))}return f.attr({rel:s,j:s,index:a,"default-marker-size":g.pSize}),h.setSelectionFilter(f,a,s),d.addEvents(f),f.node.classList.add("apexcharts-marker"),f}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}]),t}(),qi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"dataLabelsCorrection",value:function(t,e,i,a,s,r,n){var o=this.w,l=!1,h=new Mi(this.ctx).getTextRects(i,n),c=h.width,d=h.height;e<0&&(e=0),e>o.globals.gridHeight+d&&(e=o.globals.gridHeight+d/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:t,y:e,width:c,height:d});var u=o.globals.dataLabelsRects[a].length-2,g=void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(void 0!==o.globals.dataLabelsRects[a][u]){var p=o.globals.dataLabelsRects[a][g];(t>p.x+p.width||e>p.y+p.height||e+de.globals.gridWidth+b.textRects.width+30)&&(o="");var m=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(m=e.globals.dataLabels.style.colors[n]),"function"==typeof m&&(m=m({series:e.globals.series,seriesIndex:r,dataPointIndex:n,w:e})),u&&(m=u);var v=d.offsetX,y=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(v=0,y=0),e.globals.isSlopeChart&&(0!==n&&(v=-2*d.offsetX+5),0!==n&&n!==e.config.series[r].data.length-1&&(v=0)),b.drawnextLabel){if((x=i.drawText({width:100,height:parseInt(d.style.fontSize,10),x:a+v,y:s+y,foreColor:m,textAnchor:l||d.textAnchor,text:o,fontSize:h||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"})).attr({class:f||"apexcharts-datalabel",cx:a,cy:s}),d.dropShadow.enabled){var w=d.dropShadow;new Li(this.ctx).dropShadow(x,w)}c.add(x),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(n)}return x}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,a=i.config.dataLabels.background,s=a.padding,r=a.padding/2,n=e.width,o=e.height,l=new Mi(this.ctx).drawRect(e.x-s,e.y-r/2,n+2*s,o+r,a.borderRadius,"transparent"!==i.config.chart.background&&i.config.chart.background?i.config.chart.background:"#fff",a.opacity,a.borderWidth,a.borderColor);a.dropShadow.enabled&&new Li(this.ctx).dropShadow(l,a.dropShadow);return l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,s=v.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,t&&(e&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i-1&&(t[i].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,i=this.getSeriesByName(t),a=parseInt(null==i?void 0:i.getAttribute("data:realIndex"),10),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),r=null,n=null,o=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){r=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),n=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']"));var l=e.globals.seriesYAxisReverseMap[a];o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']"));else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var h=0;h=t.from&&(r0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1)for(var s=i.config.series.map((function(t,a){return t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(a)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(i.config.series[a].type)>-1)?a:-1})),r="asc"===t?0:s.length-1;"asc"===t?r=0;"asc"===t?r++:r--)if(-1!==s[r]){a=s[r];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,a){for(var s=e[i].childNodes,r={type:a,paths:[],realIndex:e[i].getAttribute("data:realIndex")},n=0;n0)for(var a=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),a=[],s=function(t){var e=function(e){return i[t].getAttribute(e)},s={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};a.push({rect:s,color:i[t].getAttribute("color")})},r=0;r0?t:[]}));return t}}]),t}(),$i=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,a=this.w.globals,s="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,r=0;r=5?this.twoDSeries.push(v.parseNumber(t[e].data[r][4])):this.twoDSeries.push(v.parseNumber(t[e].data[r][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var n=new Date(t[e].data[r][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(t[e].data[r][0]);for(var o=0;o-1&&(r=this.activeSeriesIndex);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,r=new zi(i),n=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isRangeBar="rangeBar"===a.chart.type&&s.isBarHorizontal,s.hasXaxisGroups="category"===a.xaxis.type&&a.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=a.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?s.seriesNames.push(t.name):s.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var o=[],l=f(new Set(a.series.map((function(t){return t.group}))));a.series.forEach((function(t,e){var i=l.indexOf(t.group);o[i]||(o[i]=[]),o[i].push(s.seriesNames[e])})),s.seriesGroups=o;for(var h=function(){for(var t=0;t0&&(this.twoDSeriesX=n,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var d=t[c].data.map((function(t){return v.parseNumber(t)}));s.series.push(d)}s.seriesZ.push(this.threeDSeries),void 0!==t[c].color?s.seriesColors.push(t[c].color):s.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var a=0;a0)i.labels=e.xaxis.categories;else if(e.labels.length>0)i.labels=e.labels.slice();else if(this.fallbackToCategory){if(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric)new Ni(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t)}else this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,a=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var s=i.series.map((function(t,e){return t.data.filter((function(t,e,i){return i.findIndex((function(e){return e.x===t.x}))===e}))})),r=s.reduce((function(t,e,i,a){return a[t].length>e.length?t:i}),0),n=0;n0&&s==i.length&&e.push(a)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}]),t}(),Ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),a=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",a*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"getSvgString",value:function(){var t=this;return new Promise((function(e){var i=t.w,a=i.config.chart.toolbar.export.width,s=i.config.chart.toolbar.export.scale||a/i.globals.svgWidth;s||(s=1);var r=t.w.globals.dom.Paper.svg(),n=t.w.globals.dom.Paper.node.cloneNode(!0);1!==s&&t.scaleSvgNode(n,s),t.convertImagesToBase64(n).then((function(){r=(new XMLSerializer).serializeToString(n),e(r.replace(/ /g," "))}))}))}},{key:"convertImagesToBase64",value:function(t){var e=this,i=t.getElementsByTagName("image"),a=Array.from(i).map((function(t){var i=t.getAttributeNS("http://www.w3.org/1999/xlink","href");return i&&!i.startsWith("data:")?e.getBase64FromUrl(i).then((function(e){t.setAttributeNS("http://www.w3.org/1999/xlink","href",e)})).catch((function(t){console.error("Error converting image to base64:",t)})):Promise.resolve()}));return Promise.all(a)}},{key:"getBase64FromUrl",value:function(t){return new Promise((function(e,i){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var t=document.createElement("canvas");t.width=a.width,t.height=a.height,t.getContext("2d").drawImage(a,0,0),e(t.toDataURL())},a.onerror=i,a.src=t}))}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var t=this;return new Promise((function(e){t.cleanup(),t.getSvgString().then((function(t){var i=new Blob([t],{type:"image/svg+xml;charset=utf-8"});e(URL.createObjectURL(i))}))}))}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var a=e.w,s=t?t.scale||t.width/a.globals.svgWidth:1;e.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*s,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var n="transparent"!==a.config.chart.background&&a.config.chart.background?a.config.chart.background:"#fff",o=r.getContext("2d");o.fillStyle=n,o.fillRect(0,0,r.width*s,r.height*s),e.getSvgString().then((function(t){var e="data:image/svg+xml,"+encodeURIComponent(t),a=new Image;a.crossOrigin="anonymous",a.onload=function(){if(o.drawImage(a,0,0),r.msToBlob){var t=r.msToBlob();i({blob:t})}else{var e=r.toDataURL("image/png");i({imgURI:e})}},a.src=e}))}))}},{key:"exportToSVG",value:function(){var t=this;this.svgUrl().then((function(e){t.triggerDownload(e,t.w.config.chart.toolbar.export.svg.filename,".svg")}))}},{key:"exportToPng",value:function(){var t=this,e=this.w.config.chart.toolbar.export.scale,i=this.w.config.chart.toolbar.export.width,a=e?{scale:e}:i?{width:i}:void 0;this.dataURI(a).then((function(e){var i=e.imgURI,a=e.blob;a?navigator.msSaveOrOpenBlob(a,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,a=t.fileName,s=t.columnDelimiter,r=void 0===s?",":s,n=t.lineDelimiter,o=void 0===n?"\n":n,l=this.w;i||(i=l.config.series);var h=[],c=[],d="",u=l.globals.series.map((function(t,e){return-1===l.globals.collapsedSeriesIndices.indexOf(e)?t:[]})),g=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.categoryFormatter?l.config.chart.toolbar.export.csv.categoryFormatter(t):"datetime"===l.config.xaxis.type&&String(t).length>=10?new Date(t).toDateString():v.isNumber(t)?t:t.split(r).join("")},p=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},x=Math.max.apply(Math,f(i.map((function(t){return t.data?t.data.length:0})))),b=new $i(this.ctx),m=new Ri(this.ctx),y=function(t){var i="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var a=l.globals.yLabelFormatters[0],s=new Zi(e.ctx).getActiveConfigSeriesIndex();i=a(l.globals.labels[t],{seriesIndex:s,dataPointIndex:t,w:l})}else i=m.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?i=l.config.xaxis.categories[t]:l.config.labels.length&&(i=l.config.labels[t]))}else i=l.config.labels[t];return null===i?"nullvalue":(Array.isArray(i)&&(i=i.join(" ")),v.isNumber(i)?i:i.split(r).join(""))},w=function(t,e){if(h.length&&0===e&&c.push(h.join(r)),t.data){t.data=t.data.length&&t.data||f(Array(x)).map((function(){return""}));for(var a=0;a0&&!s.globals.isBarHorizontal&&(this.xaxisLabels=s.globals.timescaleLabels.slice()),s.config.xaxis.overwriteCategories&&(this.xaxisLabels=s.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===s.config.xaxis.position?this.offY=0:this.offY=s.globals.gridHeight,this.offY=this.offY+s.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.xaxisBorderWidth=s.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=s.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=s.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=s.config.xaxis.axisBorder.height,this.yaxis=s.config.yaxis[0]}return s(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new Mi(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});i.add(a);for(var s=[],r=0;r6&&void 0!==arguments[6]?arguments[6]:{},h=[],c=[],d=this.w,u=l.xaxisFontSize||this.xaxisFontSize,g=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,f=l.fontWeight||d.config.xaxis.labels.style.fontWeight,x=l.cssClass||d.config.xaxis.labels.style.cssClass,b=d.globals.padHorizontal,m=a.length,v="category"===d.config.xaxis.type?d.globals.dataPoints:m;if(0===v&&m>v&&(v=m),s){var y=v>1?v-1:v;n=d.globals.gridWidth/Math.min(y,m-1),b=b+r(0,n)/2+d.config.xaxis.labels.offsetX}else n=d.globals.gridWidth/v,b=b+r(0,n)+d.config.xaxis.labels.offsetX;for(var w=function(s){var l=b-r(s,n)/2+d.config.xaxis.labels.offsetX;0===s&&1===m&&n/2===b&&1===v&&(l=d.globals.gridWidth/2);var y=o.axesUtils.getLabel(a,d.globals.timescaleLabels,l,s,h,u,t),w=28;d.globals.rotateXLabels&&t&&(w=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(w+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(u)+(d.globals.xAxisLabelsHeight-d.globals.xAxisGroupLabelsHeight)+(d.globals.rotateXLabels?10:0)),y=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(s,y,m):o.axesUtils.checkForOverflowingLabels(s,y,m,h,c);if(d.config.xaxis.labels.show){var k=e.drawText({x:y.x,y:o.offY+d.config.xaxis.labels.offsetY+w-("top"===d.config.xaxis.position?d.globals.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:"middle",fontWeight:y.isBold?600:f,fontSize:u,fontFamily:g,foreColor:Array.isArray(p)?t&&d.config.xaxis.convertedCatToNumeric?p[d.globals.minX+s-1]:p[s]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(i.add(k),k.on("click",(function(t){if("function"==typeof d.config.chart.events.xAxisLabelClick){var e=Object.assign({},d,{labelIndex:s});d.config.chart.events.xAxisLabelClick(t,o.ctx,e)}})),t){var A=document.createElementNS(d.globals.SVGNS,"title");A.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,k.node.appendChild(A),""!==y.text&&(h.push(y.text),c.push(y))}}sa.globals.gridWidth)){var r=this.offY+a.config.xaxis.axisTicks.offsetY;if(e=e+r+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(e=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new Mi(this.ctx).drawLine(t+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,s+a.config.xaxis.axisTicks.offsetX,e+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var s=0;s0){var h=s[s.length-1].getBBox(),c=s[0].getBBox();h.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),c.x+c.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var d=0;d0&&(this.xaxisLabels=a.globals.timescaleLabels.slice())}return s(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new Mi(this.ctx);t||(t=i.group({class:"apexcharts-grid"}));var a=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),s=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(s),t.add(a),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new Mi(this.ctx),a=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,f(t.config.stroke.width)):t.config.stroke.width,s=function(t){var i=document.createElementNS(e.SVGNS,"clipPath");return i.setAttribute("id",t),i};e.dom.elGridRectMask=s("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=s("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=s("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=s("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=s("nonForecastMask".concat(e.cuid));var r=0,n=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),n=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=i.drawRect(-a/2-r-2,-a/2-2,e.gridWidth+a+n+r+4,e.gridHeight+a+4,0,"#fff");var o=t.globals.markers.largestSize;e.dom.elGridRectMarker=i.drawRect(-o,-o,e.gridWidth+2*o,e.gridHeight+2*o,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,a=t.y1,s=t.x2,r=t.y2,n=t.xCount,o=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===n-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:i,y1:a,x2:s,y2:r,xCount:n,parent:o});var h=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var c=l.globals.groups;if(c){for(var d=0,u=0;d0&&"datetime"!==t.config.xaxis.type&&(s=e.yAxisScale[a].result.length-1);this._drawXYLines({xCount:s,tickAmount:r})}else s=r,r=e.xTickAmount,this._drawInvertedXYLines({xCount:s,tickAmount:r});return this.drawGridBands(s,r),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/s}}},{key:"drawGridBands",value:function(t,e){var i,a,s=this,r=this.w;if((null===(i=r.config.grid.row.colors)||void 0===i?void 0:i.length)>0&&function(t,i,a,n,o,l){for(var h=0,c=0;h=r.config.grid[t].colors.length&&(c=0),s._drawGridBandRect({c:c,x1:a,y1:n,x2:o,y2:l,type:t}),n+=r.globals.gridHeight/e}("row",e,0,0,r.globals.gridWidth,r.globals.gridHeight/e),(null===(a=r.config.grid.column.colors)||void 0===a?void 0:a.length)>0){var n=r.globals.isBarHorizontal||"on"!==r.config.xaxis.tickPlacement||"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric?t:t-1;r.globals.isXNumeric&&(n=r.globals.xAxisScale.result.length-1);for(var o=r.globals.padHorizontal,l=r.globals.padHorizontal+r.globals.gridWidth/n,h=r.globals.gridHeight,c=0,d=0;c=r.config.grid.column.colors.length&&(d=0),"datetime"===r.config.xaxis.type)o=this.xaxisLabels[c].position,l=((null===(u=this.xaxisLabels[c+1])||void 0===u?void 0:u.position)||r.globals.gridWidth)-this.xaxisLabels[c].position;this._drawGridBandRect({c:d,x1:o,y1:0,x2:l,y2:h,type:"column"}),o+=r.globals.gridWidth/n}}}}]),t}(),ta=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"niceScale",value:function(t,e){var i,a,s,r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=1e-11,l=this.w,h=l.globals;h.isBarHorizontal?(i=l.config.xaxis,a=Math.max((h.svgWidth-100)/25,2)):(i=l.config.yaxis[n],a=Math.max((h.svgHeight-100)/15,2)),v.isNumber(a)||(a=10),s=void 0!==i.min&&null!==i.min,r=void 0!==i.max&&null!==i.min;var c=void 0!==i.stepSize&&null!==i.stepSize,d=void 0!==i.tickAmount&&null!==i.tickAmount,u=d?i.tickAmount:h.niceScaleDefaultTicks[Math.min(Math.round(a/2),h.niceScaleDefaultTicks.length-1)];if(h.isMultipleYAxis&&!d&&h.multiAxisTickAmount>0&&(u=h.multiAxisTickAmount,d=!0),u="dataPoints"===u?h.dataPoints-1:Math.abs(Math.round(u)),(t===Number.MIN_VALUE&&0===e||!v.isNumber(t)&&!v.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=v.isNumber(i.min)?i.min:0,e=v.isNumber(i.max)?i.max:t+u,h.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var g=e;e=t,t=g}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var p=[];u<1&&(u=1);var f=u,x=Math.abs(e-t);!s&&t>0&&t/x<.15&&(t=0,s=!0),!r&&e<0&&-e/x<.15&&(e=0,r=!0);var b=(x=Math.abs(e-t))/f,m=b,y=Math.floor(Math.log10(m)),w=Math.pow(10,y),k=Math.ceil(m/w);if(b=m=(k=h.niceScaleAllowedMagMsd[0===h.yValueDecimal?0:1][k])*w,h.isBarHorizontal&&i.stepSize&&"datetime"!==i.type?(b=i.stepSize,c=!0):c&&(b=i.stepSize),c&&i.forceNiceScale){var A=Math.floor(Math.log10(b));b*=Math.pow(10,y-A)}if(s&&r){var C=x/f;if(d)if(c)if(0!=v.mod(x,b)){var S=v.getGCD(b,C);b=C/S<10?S:C}else 0==v.mod(b,C)?b=C:(C=b,d=!1);else b=C;else if(c)0==v.mod(x,b)?C=b:b=C;else if(0==v.mod(x,b))C=b;else{C=x/(f=Math.ceil(x/b));var L=v.getGCD(x,b);x/La&&(t=e-b*u,t+=b*Math.floor((M-t)/b))}else if(s)if(d)e=t+b*f;else{var P=e;e=b*Math.ceil(e/b),Math.abs(e-t)/v.getGCD(x,b)>a&&(e=t+b*u,e+=b*Math.ceil((P-e)/b))}}else if(h.isMultipleYAxis&&d){var I=b*Math.floor(t/b),T=I+b*f;T0&&t16&&v.getPrimeFactors(f).length<2&&f++,!d&&i.forceNiceScale&&0===h.yValueDecimal&&f>x&&(f=x,b=Math.round(x/f)),f>a&&(!d&&!c||i.forceNiceScale)){var z=v.getPrimeFactors(f),X=z.length-1,R=f;t:for(var Y=0;YN);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,r=Math.abs(e-t),n=[];if(t===e)return{result:n=[t],niceMin:n[0],niceMax:n[n.length-1]};"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,r))&&(i=this.w.globals.dataPoints-1),s||(s=r/i),s=Math.round(10*(s+Number.EPSILON))/10,i===Number.MAX_VALUE&&(i=5,s=1);for(var o=t;i>=0;)n.push(o),o=v.preciseAddition(o,s),i-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,i){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));for(var a=[],s=Math.ceil(Math.log(e)/Math.log(i)+1),r=Math.floor(Math.log(t)/Math.log(i));r5?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase):this.logarithmicScale(e,i,r.logBase)):i!==-Number.MAX_VALUE&&v.isNumber(i)&&e!==Number.MAX_VALUE&&v.isNumber(e)?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.niceScale(e,i,t)):a.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var i=this.w,a=i.globals,s=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&v.isNumber(e)){var r=a.xTickAmount+1;s<10&&s>1&&(r=s),a.xAxisScale=this.linearScale(t,e,r,0,i.config.xaxis.stepSize)}else a.xAxisScale=this.linearScale(0,10,10);return a.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,i=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var a=i.seriesYAxisMap,s=i.minYArr,r=i.maxYArr;i.allSeriesCollapsed=!0,i.barGroups=[],a.forEach((function(a,n){var o=[];a.forEach((function(t){var i=e.series[t].group;o.indexOf(i)<0&&o.push(i)})),a.length>0?function(){var l,h,c=Number.MAX_VALUE,d=-Number.MAX_VALUE,u=c,g=d;if(e.chart.stacked)!function(){var t=new Array(i.dataPoints).fill(0),s=[],r=[],p=[];o.forEach((function(){s.push(t.map((function(){return Number.MIN_VALUE}))),r.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var f=function(t){!l&&e.series[a[t]].type&&(l=e.series[a[t]].type);var c=a[t];h=e.series[c].group?e.series[c].group:"axis-".concat(n),!(i.collapsedSeriesIndices.indexOf(c)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(c)<0)||(i.allSeriesCollapsed=!1,o.forEach((function(t,a){if(e.series[c].group===t)for(var n=0;n=0?r[a][n]+=o:p[a][n]+=o,s[a][n]+=o,u=Math.min(u,o),g=Math.max(g,o)}}))),"bar"!==l&&"column"!==l||i.barGroups.push(h)},x=0;x1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w.config,r=this.w.globals,n=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=t+1);var l=r.series,h=l,c=l;"candlestick"===s.chart.type?(h=r.seriesCandleL,c=r.seriesCandleH):"boxPlot"===s.chart.type?(h=r.seriesCandleO,c=r.seriesCandleC):r.isRangeData&&(h=r.seriesRangeStart,c=r.seriesRangeEnd);var d=!1;if(r.seriesX.length>=a){var u,g=null===(u=r.brushSource)||void 0===u?void 0:u.w.config.chart.brush;(s.chart.zoom.enabled&&s.chart.zoom.autoScaleYaxis||null!=g&&g.enabled&&null!=g&&g.autoScaleYaxis)&&(d=!0)}for(var p=t;px&&r.seriesX[p][b]>s.xaxis.max;b--);}for(var m=x;m<=b&&mh[p][m]&&h[p][m]<0&&(o=h[p][m])}else r.hasNullValues=!0}"bar"!==f&&"column"!==f||(o<0&&n<0&&(n=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,e=Math.min(e,0)))}return"rangeBar"===s.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&(o=e),"bar"===s.chart.type&&(o<0&&n<0&&(n=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:n,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i,a=Number.MAX_VALUE;if(t.isMultipleYAxis){a=Number.MAX_VALUE;for(var s=0;st.dataPoints&&0!==t.dataPoints&&(a=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(a=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var s=t.maxX-t.minX;s<30&&(a=s-1)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var r=[],n=t.minX-1;n0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,a-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var s=e-a[i-1];s>0&&(t.minXDiff=Math.min(s,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var i=e.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map((function(t){return t}))]);var a={},s={};i.forEach((function(i){a[i]=[],s[i]=[],t.w.config.series.map((function(t,a){return i.indexOf(e.seriesNames[a])>-1?a:null})).filter((function(t){return null!==t})).forEach((function(r){for(var n=0;n0?a[i][n]+=parseFloat(e.series[r][n])+1e-4:s[i][n]+=parseFloat(e.series[r][n]))}}))})),Object.entries(a).forEach((function(t){var i=p(t,1)[0];a[i].forEach((function(t,r){e.maxY=Math.max(e.maxY,a[i][r]),e.minY=Math.min(e.minY,s[i][r])}))}))}}}]),t}(),ia=function(){function t(e,a){i(this,t),this.ctx=e,this.elgrid=a,this.w=e.w;var s=this.w;this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.axisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xAxisoffX="bottom"===s.config.xaxis.position?s.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Ri(e)}return s(t,[{key:"drawYaxis",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.yaxis[t].labels.style,s=a.fontSize,r=a.fontFamily,n=a.fontWeight,o=i.group({class:"apexcharts-yaxis",rel:t,transform:"translate(".concat(e.globals.translateYAxisX[t],", 0)")});if(this.axesUtils.isYAxisHidden(t))return o;var l=i.group({class:"apexcharts-yaxis-texts-g"});o.add(l);var h=e.globals.yAxisScale[t].result.length-1,c=e.globals.gridHeight/h,d=e.globals.yLabelFormatters[t],u=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){var g=e.globals.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?g=0:"heatmap"===e.config.chart.type&&(g-=c/2),g+=parseInt(s,10)/3;for(var p=h;p>=0;p--){var f=d(u[p],p,e),x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(x*=-1);var b=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(a.colors,t),y=Array.isArray(m)?m[p]:m,w=v.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),k=i.drawText({x:x,y:g,text:w.includes(f)&&!e.config.yaxis[t].labels.showDuplicates?"":f,textAnchor:b,fontSize:s,fontFamily:r,fontWeight:n,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(a.cssClass)});l.add(k),this.addTooltip(k,f),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(i,k,firstLabel,e.config.yaxis[t].labels.rotate),g+=c}}return this.addYAxisTitle(i,o,t),this.addAxisBorder(i,o,t,h,c),o}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var i=document.createElementNS(this.w.globals.SVGNS,"title");i.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(i)}},{key:"rotateLabel",value:function(t,e,i,a){var s=t.rotateAroundCenter(i.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(a," ").concat(s.x," ").concat(r.y,")"))}},{key:"addYAxisTitle",value:function(t,e,i){var a=this.w;if(void 0!==a.config.yaxis[i].title.text){var s=t.group({class:"apexcharts-yaxis-title"}),r=a.config.yaxis[i].opposite?a.globals.translateYAxisX[i]:0,n=t.drawText({x:r,y:a.globals.gridHeight/2+a.globals.translateY+a.config.yaxis[i].title.offsetY,text:a.config.yaxis[i].title.text,textAnchor:"end",foreColor:a.config.yaxis[i].title.style.color,fontSize:a.config.yaxis[i].title.style.fontSize,fontWeight:a.config.yaxis[i].title.style.fontWeight,fontFamily:a.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(a.config.yaxis[i].title.style.cssClass)});s.add(n),e.add(s)}}},{key:"addAxisBorder",value:function(t,e,i,a,s){var r=this.w,n=r.config.yaxis[i].axisBorder,o=31+n.offsetX;if(r.config.yaxis[i].opposite&&(o=-31-n.offsetX),n.show){var l=t.drawLine(o,r.globals.translateY+n.offsetY-2,o,r.globals.gridHeight+r.globals.translateY+n.offsetY+2,n.color,0,n.width);e.add(l)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,a,n,r.config.yaxis[i].axisTicks,i,s,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});a.add(s);var r=e.globals.yAxisScale[t].result.length-1,n=e.globals.gridWidth/r+.1,o=n+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,h=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),c=e.globals.timescaleLabels;if(c.length>0&&(this.xaxisLabels=c.slice(),r=(h=c.slice()).length),e.config.xaxis.labels.show)for(var d=c.length?0:r;c.length?d=0;c.length?d++:d--){var u=l(h[d],d,e),g=e.globals.gridWidth+e.globals.padHorizontal-(o-n+e.config.xaxis.labels.offsetX);if(c.length){var p=this.axesUtils.getLabel(h,c,g,d,this.drawnLabels,this.xaxisFontSize);g=p.x,u=p.text,this.drawnLabels.push(p.text),0===d&&e.globals.skipFirstTimelinelabel&&(u=""),d===h.length-1&&e.globals.skipLastTimelinelabel&&(u="")}var f=i.drawText({x:g,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:u,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});s.add(f),f.tspan(u),this.addTooltip(f,u),o+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.xaxis.axisBorder;if(a.show){var s=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(s-=15);var r=i.drawLine(e.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new Mi(this.ctx);if(void 0!==e.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});a.add(s),t.add(a)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),r=s?s.getBoundingClientRect():{width:0,height:0},n=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),o=n?n.getBoundingClientRect():{width:0,height:0};if(n){var l=this.xPaddingForYAxisTitle(t,r,o,e);n.setAttribute("x",l.xPos-(e?10:0));var h=a.rotateAroundCenter(n);n.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(h.x," ").concat(h.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var s=this.w,r=0,n=10;return void 0===s.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(a?r=e.width+s.config.yaxis[t].title.offsetX+i.width/2+n/2:(r=-1*e.width+s.config.yaxis[t].title.offsetX+n/2+i.width/2,s.globals.isBarHorizontal&&(n=25,r=-1*e.width-s.config.yaxis[t].title.offsetX-n)),{xPos:r,padd:n})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,a=0,s=0,r=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach((function(o,l){var h=i.globals.ignoreYAxisIndexes.includes(l)||!o.show||o.floating||0===t[l].width,c=t[l].width+e[l].width;o.opposite?i.globals.isBarHorizontal?(s=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=s-o.labels.offsetX):(s=i.globals.gridWidth+i.globals.translateX+n,h||(n+=c+20),i.globals.translateYAxisX[l]=s-o.labels.offsetX+20):(a=i.globals.translateX-r,h||(r+=c+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;v.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,i){var a=t.config.yaxis[i];if(a&&!a.floating&&void 0!==a.labels.align){var s=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=v.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"))),n=s.getBoundingClientRect();r.forEach((function(t){t.setAttribute("text-anchor",a.labels.align)})),"left"!==a.labels.align||a.opposite?"center"===a.labels.align?s.setAttribute("transform","translate(".concat(n.width/2*(a.opposite?1:-1),", 0)")):"right"===a.labels.align&&a.opposite&&s.setAttribute("transform","translate(".concat(n.width,", 0)")):s.setAttribute("transform","translate(-".concat(n.width,", 0)"))}}))}}]),t}(),aa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.documentEvent=v.bind(this.documentEvent,this)}return s(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var a=i.globals.events[t].indexOf(e);-1!==a&&i.globals.events[t].splice(a,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var a=i.globals.events[t],s=a.length,r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=v.extend(Hi,i);this.w.globals.locale=a.options}}]),t}(),ra=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawAxis",value:function(t,e){var i,a,s=this,r=this.w.globals,n=this.w.config,o=new Qi(this.ctx,e),l=new ia(this.ctx,e);r.axisCharts&&"radar"!==t&&(r.isBarHorizontal?(a=l.drawYaxisInversed(0),i=o.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(a)):(i=o.drawXaxis(),r.dom.elGraphical.add(i),n.yaxis.map((function(t,e){if(-1===r.ignoreYAxisIndexes.indexOf(e)&&(a=l.drawYaxis(e),r.dom.Paper.add(a),"back"===s.w.config.grid.position)){var i=r.dom.Paper.children()[1];i.remove(),r.dom.Paper.add(i)}}))))}}]),t}(),na=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Li(this.ctx),a=t.config.xaxis.crosshairs.fill.gradient,s=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,n=a.colorFrom,o=a.colorTo,l=a.opacityFrom,h=a.opacityTo,c=a.stops,d=s.enabled,u=s.left,g=s.top,p=s.blur,f=s.color,x=s.opacity,b=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(b=e.drawGradient("vertical",n,o,l,h,null,c,null));var m=e.drawRect();1===t.config.xaxis.crosshairs.width&&(m=e.drawLine());var y=t.globals.gridHeight;(!v.isNumber(y)||y<0)&&(y=0);var w=t.config.xaxis.crosshairs.width;(!v.isNumber(w)||w<0)&&(w=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:w,height:y,fill:b,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),d&&(m=i.dropShadow(m,{left:u,top:g,blur:p,color:f,opacity:x})),t.globals.dom.elGraphical.add(m)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var s=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(s)}var r=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(r)}}]),t}(),oa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,a=i.config;if(0!==a.responsive.length){var s=a.responsive.slice();s.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var r=new Wi({}),n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=s[0].breakpoint,n=window.innerWidth>0?window.innerWidth:screen.width;if(n>a){var o=v.clone(i.globals.initialConfig);o.series=v.clone(i.config.series);var l=Pi.extendArrayProps(r,o,i);t=v.extend(l,t),t=v.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var h=0;h0&&"function"==typeof t[0]?(this.isColorFn=!0,i.config.series.map((function(a,s){var r=t[s]||t[0];return"function"==typeof r?r({value:i.globals.axisCharts?i.globals.series[s][0]||0:i.globals.series[s],seriesIndex:s,dataPointIndex:s,w:e.w}):r}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,i){t&&(e[i]=t)}))}},{key:"getMonochromeColors",value:function(t,e,i){var a=t.color,s=t.shadeIntensity,r=t.shadeTo,n=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,o=1/(n/s),l=0;return Array.from({length:n},(function(){var t="dark"===r?i.shadeColor(-1*l,a):i.shadeColor(l,a);return l+=o,t}))}},{key:"applyColorTypes",value:function(t,e){var i=this,a=this.w;t.forEach((function(t){a.globals[t].colors=void 0===a.config[t].colors?i.isColorFn?a.config.colors:e:a.config[t].colors.slice(),i.pushExtraColors(a.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=e||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),t.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,i=[];e.config.series.forEach((function(s,r){s.data.forEach((function(s,n){var o;o=e.globals.series[r][n],a=e.config.dataLabels.formatter(o,{ctx:t.dCtx.ctx,seriesIndex:r,dataPointIndex:n,w:e}),i.push(a)}))}));var a=v.getLargestStringFromArr(i),s=new Mi(this.dCtx.ctx),r=e.config.dataLabels.style,n=s.getTextRects(a,parseInt(r.fontSize),r.fontFamily);return{width:1.05*n.width,height:n.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var a=e.map((function(t,e){return Array.isArray(t)?t.length:1})),s=Math.max.apply(Math,f(a));i=e[a.indexOf(s)]}return i}}]),t}(),da=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();t={width:a.width,height:a.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var s=e.globals.xLabelFormatter,r=v.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);e.globals.isBarHorizontal&&(n=r=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var o=new Xi(this.dCtx.ctx),l=r;r=o.xLabelFormat(s,r,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),n=o.xLabelFormat(s,n,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(n=r="1");var h=new Mi(this.dCtx.ctx),c=h.getTextRects(r,e.config.xaxis.labels.style.fontSize),d=c;if(r!==n&&(d=h.getTextRects(n,e.config.xaxis.labels.style.fontSize)),(t={width:c.width>=d.width?c.width:d.width,height:c.height>=d.height?c.height:d.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return h.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};c=u(r),r!==n&&(d=u(n)),t.height=(c.height>d.height?c.height:d.height)/1.5,t.width=c.width>d.width?c.width:d.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var i,a=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,s=e.globals.groups.map((function(t){return t.title})),r=v.getLargestStringFromArr(s),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),o=new Mi(this.dCtx.ctx),l=o.getTextRects(r,a),h=l;return r!==n&&(h=o.getTextRects(n,a)),i={width:l.width>=h.width?l.width:h.width,height:l.height>=h.height?l.height:h.height},e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new Mi(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,i=a.height}return{width:e,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(t){return t.value})),a=i.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Mi(this.dCtx.ctx).getTextRects(a,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,a=i.globals,s=i.config,r=s.xaxis.type,n=t.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,o){s.yaxis.length>1&&function(t){return-1!==a.collapsedSeriesIndices.indexOf(t)}(o)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var o=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+n/1.75-e.dCtx.yAxisWidthRight,h=o.position-n/1.75+e.dCtx.yAxisWidthLeft,c="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>a.svgWidth-a.translateX-c&&(a.skipLastTimelinelabel=!0),h<-(t.show&&!t.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===r?e.dCtx.gridPad.right(null===(a=String(c(e,o)))||void 0===a?void 0:a.length)?t:e}),d),g=u=c(u,o);if(void 0!==u&&0!==u.length||(u=l.niceMax),e.globals.isBarHorizontal){a=0;var p=e.globals.labels.slice();u=v.getLargestStringFromArr(p),u=c(u,{seriesIndex:n,dataPointIndex:-1,w:e}),g=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,p)}var f=new Mi(t.dCtx.ctx),x="rotate(".concat(r.labels.rotate," 0 0)"),b=f.getTextRects(u,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1),m=b;u!==g&&(m=f.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1)),i.push({width:(h>m.width||h>b.width?h:m.width>b.width?m.width:b.width)+a,height:m.height>b.height?m.height:b.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,a){if(e.show&&void 0!==e.title.text){var s=new Mi(t.dCtx.ctx),r="rotate(".concat(e.title.rotate," 0 0)"),n=s.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);i.push({width:n.width,height:n.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,a=0,s=t.globals.yAxisScale.length>1?10:0,r=new Ri(this.dCtx.ctx),n=function(n,o){var l=t.config.yaxis[o].floating,h=0;n.width>0&&!l?(h=n.width+s,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(o)&&(h=h-n.width-s)):h=l||r.isYAxisHidden(o)?0:5,t.config.yaxis[o].opposite?a+=h:i+=h,e+=h};return t.globals.yLabelsCoords.map((function(t,e){n(t,e)})),t.globals.yTitleCoords.map((function(t,e){n(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,e}}]),t}(),ga=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w,i=e.config,a=e.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.series.length)return 0;var s=function(t){return["bar","rangeBar","candlestick","boxPlot"].includes(t)},r=i.chart.type,n=0,o=s(r)?i.series.length:1;a.comboBarCount>0&&(o=a.comboBarCount),a.collapsedSeries.forEach((function(t){s(t.type)&&(o-=1)})),i.chart.stacked&&(o=1);var l=s(r)||a.comboBarCount>0,h=Math.abs(a.initialMaxX-a.initialMinX);if(l&&a.isXNumeric&&!a.isBarHorizontal&&o>0&&0!==h){h<=3&&(h=a.dataPoints);var c=h/t,d=a.minXDiff&&a.minXDiff/c>0?a.minXDiff/c:0;d>t/2&&(d/=2),(n=d*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),a.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,a=this.dCtx.isSparkline||!i.axisCharts?0:10;["title","subtitle"].forEach((function(s){void 0!==e.config[s].text?a+=e.config[s].margin:a+=t.dCtx.isSparkline||!i.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||i.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight-=s.height+r.height+a,i.translateY+=s.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,a=new Ri(this.dCtx.ctx);i.config.yaxis.forEach((function(s,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||s.floating||a.isYAxisHidden(r)||(s.opposite&&(i.globals.translateX-=e[r].width+t[r].width+parseInt(s.labels.style.fontSize,10)/1.2+12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),pa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new ca(this),this.dimYAxis=new ua(this),this.dimXAxis=new da(this),this.dimGrid=new ga(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return s(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,i=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var a=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,f(e.config.stroke.width)):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var i=p(e,2),a=i[0],s=i[1];t.gridPad[a]=Math.max(s,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(a/2,this.gridPad.top),this.gridPad.bottom=Math.max(a/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var s=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*s,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:a[i].width,index:i}),e.globals.yTitleCoords.push({width:s[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o,n),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,h=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var c=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,h=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,h=0,c=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(r);var d=function(){i.translateX=l+t.datalabelsCoords.width,i.gridHeight=i.svgHeight-t.lgRect.height-h-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(c=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=c,d();break;case"top":i.translateY=this.lgRect.height+c,d();break;case"left":i.translateY=c,i.translateX=this.lgRect.width+l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":i.translateY=c,i.translateX=l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new ia(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,a=0;t.config.legend.show&&!t.config.legend.floating&&(a=20);var s="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[s].offsetY,n=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating){e.gridHeight=e.svgHeight;var o=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(o,e.gridHeight),e.translateY=r,void(e.translateX=n+(e.svgWidth-e.gridWidth)/2)}switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=r-10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+r+10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-a,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+this.lgRect.width+a;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-a-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,i){var a=this.w,s=a.globals.hasXaxisGroups?2:1,r=i.height+t.height+e.height,n=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,o=a.globals.rotateXLabels?22:10,l=a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0;this.xAxisHeight=r*n+s*o+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeightc&&(this.yAxisWidth=c)}}]),t}(),fa=function(){function t(e){i(this,t),this.w=e.w,this.lgCtx=e}return s(t,[{key:"getLegendStyles",value:function(){var t,e,i,a=document.createElement("style");a.setAttribute("type","text/css");var s=(null===(t=this.lgCtx.ctx)||void 0===t||null===(e=t.opts)||void 0===e||null===(i=e.chart)||void 0===i?void 0:i.nonce)||this.w.config.chart.nonce;s&&a.setAttribute("nonce",s);var r=document.createTextNode("\n .apexcharts-flip-y {\n transform: scaleY(-1) translateY(-100%);\n transform-origin: top;\n transform-box: fill-box;\n }\n .apexcharts-flip-x {\n transform: scaleX(-1);\n transform-origin: center;\n transform-box: fill-box;\n }\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-right: 1px;\n }\n\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }\n\n ");return a.appendChild(r),a}},{key:"getLegendDimensions",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(t,e){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var s=null,r=null;if(a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),r=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),r=parseInt(s.getAttribute("rel"),10)-1),e)[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,r)}));else this.hideSeries({seriesEl:s,realIndex:r})}else{var n=a.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(t+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=a.config.plotOptions.pie.donut.labels;new Mi(this.lgCtx.ctx).pathMouseDown(n,null),this.lgCtx.ctx.pie.printDataLabelsInner(n.node,l)}n.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(t){var e=t.realIndex,i=this.w,a=i.globals,s=v.clone(i.config.series);if(a.axisCharts){var r=i.config.yaxis[a.seriesYAxisReverseMap[e]],n={index:e,data:s[e].data.slice(),type:s[e].type||i.config.chart.type};if(r&&r.show&&r.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(e)<0&&(a.ancillaryCollapsedSeries.push(n),a.ancillaryCollapsedSeriesIndices.push(e));else if(a.collapsedSeriesIndices.indexOf(e)<0){a.collapsedSeries.push(n),a.collapsedSeriesIndices.push(e);var o=a.risingSeries.indexOf(e);a.risingSeries.splice(o,1)}}else a.collapsedSeries.push({index:e,data:s[e]}),a.collapsedSeriesIndices.push(e);return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.config.series.length,this._getSeriesBasedOnCollapsedState(s)}},{key:"hideSeries",value:function(t){for(var e=t.seriesEl,i=t.realIndex,a=this.w,s=this.getSeriesAfterCollapsing({realIndex:i}),r=e.childNodes,n=0;n0){for(var r=0;r1;if(this.legendHelpers.appendToForeignObject(),(a||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,i=t.fillcolor,a=this.w,s=document.createElement("span");s.classList.add("apexcharts-legend-marker");var r=a.config.legend.markers.shape||a.config.markers.shape,n=r;Array.isArray(r)&&(n=r[e]);var o=Array.isArray(a.config.legend.markers.size)?parseFloat(a.config.legend.markers.size[e]):parseFloat(a.config.legend.markers.size),l=Array.isArray(a.config.legend.markers.offsetX)?parseFloat(a.config.legend.markers.offsetX[e]):parseFloat(a.config.legend.markers.offsetX),h=Array.isArray(a.config.legend.markers.offsetY)?parseFloat(a.config.legend.markers.offsetY[e]):parseFloat(a.config.legend.markers.offsetY),c=Array.isArray(a.config.legend.markers.strokeWidth)?parseFloat(a.config.legend.markers.strokeWidth[e]):parseFloat(a.config.legend.markers.strokeWidth),d=s.style;if(d.height=2*(o+c)+"px",d.width=2*(o+c)+"px",d.left=l+"px",d.top=h+"px",a.config.legend.markers.customHTML)d.background="transparent",d.color=i[e],Array.isArray(a.config.legend.markers.customHTML)?a.config.legend.markers.customHTML[e]&&(s.innerHTML=a.config.legend.markers.customHTML[e]()):s.innerHTML=a.config.legend.markers.customHTML();else{var g=new Vi(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(n),seriesIndex:e,strokeWidth:c,size:o}),p=window.SVG().addTo(s).size("100%","100%"),f=new Mi(this.ctx).drawMarker(0,0,u(u({},g),{},{pointFillColor:Array.isArray(i)?i[e]:g.pointFillColor,shape:n}));a.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),p.add(f)}return s}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,a=e.globals.seriesNames,s=e.config.legend.markers.fillColors?e.config.legend.markers.fillColors.slice():e.globals.colors.slice();if("heatmap"===e.config.chart.type){var r=e.config.plotOptions.heatmap.colorScale.ranges;a=r.map((function(t){return t.name?t.name:t.from+" - "+t.to})),s=r.map((function(t){return t.color}))}else this.isBarsDistributed&&(a=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(a=e.config.legend.customLegendItems);for(var n=e.globals.legendFormatter,o=e.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var h,c=n(a[l],{seriesIndex:l,w:e}),d=!1,u=!1;if(e.globals.collapsedSeries.length>0)for(var g=0;g0)for(var p=0;p0?l-10:0)+(h>0?h-10:0)}a.style.position="absolute",r=r+t+i.config.legend.offsetX,n=n+e+i.config.legend.offsetY,a.style.left=r+"px",a.style.top=n+"px","right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px");["width","height"].forEach((function(t){a.style[t]&&(a.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new pa(this.ctx),i=e.dimHelpers.getTitleSubtitleCoords("title"),a=e.dimHelpers.getTitleSubtitleCoords("subtitle"),s=0;"top"===t.config.legend.position&&(s=i.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,s)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new Zi(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new Zi(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,a="true"===t.target.getAttribute("data:collapsed"),s=this.w.config.chart.events.legendClick;"function"==typeof s&&s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;"function"==typeof r&&t.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),t}(),ba=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=a.globals.minX,this.maxX=a.globals.maxX}return s(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=e.config.chart.toolbar.offsetY+"px",a.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s\n \n \n\n'),n("zoomOut",this.elZoomOut,'\n \n \n\n');var o=function(i){t.t[i]&&e.config.chart[i].enabled&&r.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'\n \n \n \n':'\n \n \n',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&e.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,'\n \n \n'),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;lthis.wheelDelay&&(this.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){a-i.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,i=this.w;this.minX=i.globals.isRangeBar?i.globals.minY:i.globals.minX,this.maxX=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;var a=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(a){var s,r,n,o=(t.clientX-a.left)/a.width,l=this.minX,h=this.maxX,c=h-l;if(t.deltaY<0){var d=l+o*c;r=d-(s=.5*c)/2,n=d+s/2}else r=l-(s=1.5*c)/2,n=h+s/2;if(!i.globals.isRangeBar){r=Math.max(r,i.globals.initialMinX),n=Math.min(n,i.globals.initialMaxX);var u=.01*(i.globals.initialMaxX-i.globals.initialMinX);if(n-r0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,i,a,s){return"l"===s||"r"===s?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resizing",this.selectionDragging.bind(this,"resizing")))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(u(u({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,a=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i;t.globals.isRangeBar&&(i=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,a=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var s={x:i,y:0,width:a,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(s),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,a=t.width,s=t.height,r=t.translateX,n=void 0===r?0:r,o=t.translateY,l=void 0===o?0:o,h=this.w,c=this.zoomRect,d=this.selectionRect;if(this.dragged||null!==h.globals.selection){var u={transform:"translate("+n+", "+l+")"};h.globals.zoomEnabled&&this.dragged&&(a<0&&(a=1),c.attr({x:e,y:i,width:a,height:s,fill:h.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":h.config.chart.zoom.zoomedArea.fill.opacity,stroke:h.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":h.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":h.config.chart.zoom.zoomedArea.stroke.opacity}),Mi.setAttrs(c.node,u)),h.globals.selectionEnabled&&(d.attr({x:e,y:i,width:a>0?a:0,height:s>0?s:0,fill:h.config.chart.selection.fill.color,"fill-opacity":h.config.chart.selection.fill.opacity,stroke:h.config.chart.selection.stroke.color,"stroke-width":h.config.chart.selection.stroke.width,"stroke-dasharray":h.config.chart.selection.stroke.dashArray,"stroke-opacity":h.config.chart.selection.stroke.opacity}),Mi.setAttrs(d.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.gridRect.getBoundingClientRect(),n=s.startX-1,o=s.startY,l=!1,h=!1,c=s.clientX-r.left-n,d=s.clientY-r.top-o,g={translateX:a.globals.translateX,translateY:a.globals.translateY};return Math.abs(c+n)>a.globals.gridWidth?c=a.globals.gridWidth-n:s.clientX-r.left<0&&(c=n),n>s.clientX-r.left&&(l=!0,c=Math.abs(c)),o>s.clientY-r.top&&(h=!0,d=Math.abs(d)),g=u(u({},g="x"===i?{x:l?n-c:n,y:0,width:c,height:a.globals.gridHeight}:"y"===i?{x:0,y:h?o-d:o,width:a.globals.gridWidth,height:d}:{x:l?n-c:n,y:h?o-d:o,width:c,height:d}),{},{translateX:a.globals.translateX,translateY:a.globals.translateY}),s.drawSelectionRect(g),s.selectionDragging("resizing"),g}},{key:"selectionDragging",value:function(t,e){var i=this,a=this.w;if(e){e.preventDefault();var s=e.detail,r=s.handler,n=s.box,o=n.x,l=n.y;othis.constraints.x2&&(o=this.constraints.x2-n.w),n.y2>this.constraints.y2&&(l=this.constraints.y2-n.h),r.move(o,l);var h=this.xyRatios,c=this.selectionRect,d=0;"resizing"===t&&(d=30);var u=function(t){return parseFloat(c.node.getAttribute(t))},g={x:u("x"),y:u("y"),width:u("width"),height:u("height")};a.globals.selection=g,"function"==typeof a.config.chart.events.selection&&a.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,s,r,n=i.gridRect.getBoundingClientRect(),o=c.node.getBoundingClientRect();a.globals.isRangeBar?(t=a.globals.yAxisScale[0].niceMin+(o.left-n.left)*h.invertedYRatio,e=a.globals.yAxisScale[0].niceMin+(o.right-n.left)*h.invertedYRatio,s=0,r=1):(t=a.globals.xAxisScale.niceMin+(o.left-n.left)*h.xRatio,e=a.globals.xAxisScale.niceMin+(o.right-n.left)*h.xRatio,s=a.globals.yAxisScale[0].niceMin+(n.bottom-o.bottom)*h.yRatio[0],r=a.globals.yAxisScale[0].niceMax-(o.top-n.top)*h.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:s,max:r}};a.config.chart.events.selection(i.ctx,l),a.config.chart.brush.enabled&&void 0!==a.config.chart.events.brushScrolled&&a.config.chart.events.brushScrolled(i.ctx,l)}),d))}}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.xyRatios,n=this.ctx.toolbar;if(s.startX>s.endX){var o=s.startX;s.startX=s.endX,s.endX=o}if(s.startY>s.endY){var l=s.startY;s.startY=s.endY,s.endY=l}var h=void 0,c=void 0;a.globals.isRangeBar?(h=a.globals.yAxisScale[0].niceMin+s.startX*r.invertedYRatio,c=a.globals.yAxisScale[0].niceMin+s.endX*r.invertedYRatio):(h=a.globals.xAxisScale.niceMin+s.startX*r.xRatio,c=a.globals.xAxisScale.niceMin+s.endX*r.xRatio);var d=[],u=[];if(a.config.yaxis.forEach((function(t,e){var i=a.globals.seriesYAxisMap[e][0];d.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.startY),u.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.endY)})),s.dragged&&(s.dragX>10||s.dragY>10)&&h!==c)if(a.globals.zoomEnabled){var g=v.clone(a.globals.initialConfig.yaxis),p=v.clone(a.globals.initialConfig.xaxis);if(a.globals.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),c=Math.floor(c),h<1&&(h=1,c=a.globals.dataPoints),c-h<2&&(c=h+1)),"xy"!==i&&"x"!==i||(p={min:h,max:c}),"xy"!==i&&"y"!==i||g.forEach((function(t,e){g[e].min=u[e],g[e].max=d[e]})),n){var f=n.getBeforeZoomRange(p,g);f&&(p=f.xaxis?f.xaxis:p,g=f.yaxis?f.yaxis:g)}var x={xaxis:p};a.config.chart.group||(x.yaxis=g),s.ctx.updateHelpers._updateOptions(x,!1,s.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&n.zoomCallback(p,g)}else if(a.globals.selectionEnabled){var b,m=null;b={min:h,max:c},"xy"!==i&&"y"!==i||(m=v.clone(a.config.yaxis)).forEach((function(t,e){m[e].min=u[e],m[e].max=d[e]})),a.globals.selection=s.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(s.ctx,{xaxis:b,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,a=e;if(void 0!==i.globals.lastClientPosition.x){var s=i.globals.lastClientPosition.x-a.clientX,r=i.globals.lastClientPosition.y-a.clientY;Math.abs(s)>Math.abs(r)&&s>0?this.moveDirection="left":Math.abs(s)>Math.abs(r)&&s<0?this.moveDirection="right":Math.abs(r)>Math.abs(s)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(s)&&r<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var n=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||a.panScrolled(n,o)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,a=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+a,i=t.globals.maxX+a):"right"===this.moveDirection&&(e=t.globals.minX-a,i=t.globals.maxX-a),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,a=this.xyRatios,s=v.clone(i.globals.initialConfig.yaxis),r=a.xRatio,n=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(r=a.invertedYRatio,n=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(t=n+i.globals.gridWidth/15*r,e=o+i.globals.gridWidth/15*r):"right"===this.moveDirection&&(t=n-i.globals.gridWidth/15*r,e=o-i.globals.gridWidth/15*r),i.globals.isRangeBar||(ti.globals.initialMaxX)&&(t=n,e=o);var l={xaxis:{min:t,max:e}};i.config.chart.group||(l.yaxis=s),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var a=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),a}(ba),va=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return s(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,a=t.clientX,s=t.clientY,r=this.w,n=i.getBoundingClientRect(),o=n.width,l=n.height,h=o/(r.globals.dataPoints-1),c=l/r.globals.dataPoints,d=this.hasBars();!r.globals.comboCharts&&!d||r.config.xaxis.convertedCatToNumeric||(h=o/r.globals.dataPoints);var u=a-n.left-r.globals.barPadForNumericAxis,g=s-n.top;u<0||g<0||u>o||g>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var p=Math.round(u/h),f=Math.floor(g/c);d&&!r.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(u/h),p-=1);var x=null,b=null,m=r.globals.seriesXvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))})),y=r.globals.seriesYvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))}));if(r.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),k=u*(w.width/o),A=g*(w.height/l);x=(b=this.closestInMultiArray(k,A,m,y)).index,p=b.j,null!==x&&(m=r.globals.seriesXvalues[x],p=(b=this.closestInArray(k,m)).index)}return r.globals.capturedSeriesIndex=null===x?-1:x,(!p||p<1)&&(p=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=f:r.globals.capturedDataPointIndex=p,{capturedSeries:x,j:r.globals.isBarHorizontal?f:p,hoverX:u,hoverY:g}}},{key:"closestInMultiArray",value:function(t,e,i,a){var s=this.w,r=0,n=null,o=-1;s.globals.series.length>1?r=this.getFirstActiveXArray(i):n=0;var l=i[r][0],h=Math.abs(t-l);if(i.forEach((function(e){e.forEach((function(e,i){var a=Math.abs(t-e);a<=h&&(h=a,o=i)}))})),-1!==o){var c=a[r][o],d=Math.abs(e-c);n=r,a.forEach((function(t,i){var a=Math.abs(e-t[o]);a<=d&&(d=a,n=i)}))}return{index:n,j:o}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,i=0,a=t.map((function(t,e){return t.length>0?e:-1})),s=0;s0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=f(t)).sort((function(t,e){var i=Number(t.getAttribute("data:realIndex")),a=Number(e.getAttribute("data:realIndex"));return ai?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var i=Number(t.getAttribute("cx")),a=Number(t.getAttribute("cy")),s=t.getAttribute("shape");return new Mi(this.ctx).getMarkerPath(i,a,s,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s ').concat(i.attrs.name,""),e+="
".concat(i.val,"
")})),m.innerHTML=t+"",v.innerHTML=e+""};n?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?y():(m.innerHTML="",v.innerHTML=""):y()}else m.innerHTML="",v.innerHTML="";null!==p&&(a[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:"");if(n&&f[0]){if(l.config.tooltip.hideEmptySeries){var w=a[e].querySelector(".apexcharts-tooltip-marker"),k=a[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(c)?(w.style.display="none",k.style.display="none"):(w.style.display="block",k.style.display="block")}null==c||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)?f[0].parentNode.style.display="none":f[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)&&(f[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var i=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));a&&(a.classList.add("apexcharts-active"),a.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",n="",o=null,l=null,h={series:a.globals.series,seriesIndex:e,dataPointIndex:i,w:a},c=a.globals.ttZFormatter;null===i?l=a.globals.series[e]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(r=s[e][i],0===s[e].length&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=new $i(this.ctx).isFormatXY()?void 0!==a.config.series[e].data[i]?a.config.series[e].data[i].x:"":void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var d=r;a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?r=new Xi(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(this.ctx).formatDate,w:this.w}):r=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](d,h):a.globals.xLabelFormatter(d,h);return void 0!==a.config.tooltip.x.formatter&&(r=a.globals.ttKeyFormatter(d,h)),a.globals.seriesZ.length>0&&a.globals.seriesZ[e].length>0&&(o=c(a.globals.seriesZ[e][i],a)),n="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(d,h):r,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,a=t.y1,s=t.y2,r=t.w,n=this.ttCtx.getElTooltip(),o=r.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]),n.innerHTML=o({ctx:this.ctx,series:r.globals.series,seriesIndex:e,dataPointIndex:i,y1:a,y2:s,w:r})}}]),t}(),wa=function(){function t(e){i(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return s(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=t-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(null!==e&&(r=a.globals.gridWidth/n*e),null===s||a.globals.isBarHorizontal||(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=r;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Mi.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Mi.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=e.globals.translateX;var s;s=new Mi(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=e.globals.translateY+a,r=i.yaxisTTEls[t].getBoundingClientRect().height,n=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(n-=26),s-=r/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=n+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),n=s.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(t)+o+5,h=parseFloat(e)+o/2;if(l>a.globals.gridWidth/2&&(l=l-n.ttWidth-o-10),l>a.globals.gridWidth-n.ttWidth-10&&(l=a.globals.gridWidth-n.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var c=s.getElGrid().getBoundingClientRect();(l=s.e.clientX-c.left)>a.globals.gridWidth/2&&(l-=s.tooltipRect.ttWidth),(h=s.e.clientY+a.globals.translateY-c.top)>a.globals.gridHeight/2&&(h-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+h>a.globals.gridHeight&&(h=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(l)||(l+=a.globals.translateX,r.style.left=l+"px",r.style.top=h+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),r=0;r0){var g=u.getAttribute("shape"),p=l.getMarkerPath(s,r,g,1.5*c);u.setAttribute("d",p)}this.moveXCrosshairs(s),o.fixedTooltip||this.moveTooltip(s,r,c)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,a=i.w,s=0,r=0,n=a.globals.pointsArray,o=new Zi(this.ctx),l=new Mi(this.ctx);e=o.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var h=i.tooltipUtil.getHoverMarkerSize(e);n[e]&&(s=n[e][t][0],r=n[e][t][1]);var c=i.tooltipUtil.getAllMarkers();if(null!==c)for(var d=0;d0){var b=l.getMarkerPath(s,g,f,h);c[d].setAttribute("d",b)}else c[d].setAttribute("d","")}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,r||a.globals.gridHeight,h)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(r=new Zi(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"']"));n||"number"!=typeof e||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var o=n?parseFloat(n.getAttribute("cx")):0,l=n?parseFloat(n.getAttribute("cy")):0,h=n?parseFloat(n.getAttribute("barWidth")):0,c=a.getElGrid().getBoundingClientRect(),d=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!d&&(o-=s%2!=0?h/2:0),n&&d&&(o-=h/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[t-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[t]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?l-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?l=a.e.clientY-c.top-a.tooltipRect.ttHeight/2:l+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(l=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,l||i.globals.gridHeight)}}]),t}(),ka=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new wa(e)}return s(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Vi(this.ctx),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=f(a),t.config.chart.stacked&&a.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w;"bubble"!==s.config.chart.type&&this.newPointSize(t,e);var r=e.getAttribute("cx"),n=e.getAttribute("cy");if(null!==i&&null!==a&&(r=i,n=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===s.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(r,n,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,a=this.ttCtx,s=t,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=e.config.markers.hover.size,o=0;o0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],i);t[e].setAttribute("d",a)}else t[e].setAttribute("d","M0,0")}}}]),t}(),Aa=function(){function t(e){i(this,t),this.w=e.w;var a=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!a.globals.isBarHorizontal&&"rangeBar"===a.config.chart.type&&a.config.plotOptions.bar.rangeBarGroupRows}return s(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,s=t.y,r=t.type,n=this.ttCtx,o=this.w;if(e.target.classList.contains("apexcharts-".concat(r,"-rect"))){var l=this.getAttr(e,"i"),h=this.getAttr(e,"j"),c=this.getAttr(e,"cx"),d=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),g=this.getAttr(e,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:h,shared:!1,e:e}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=h,a=c+n.tooltipRect.ttWidth/2+u,s=d+n.tooltipRect.ttHeight/2-g/2,n.tooltipPosition.moveXCrosshairs(c+u/2),a>o.globals.gridWidth/2&&(a=c-n.tooltipRect.ttWidth/2+u),n.w.config.tooltip.followCursor){var p=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-p.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),s=o.globals.clientY-p.top-(s>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=t.x,n=t.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var h=parseInt(s.paths.getAttribute("cx"),10),c=parseInt(s.paths.getAttribute("cy"),10),d=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),e=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=v.findAncestor(s.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,e,i),o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=i,r=h,n=c+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var g=l.getElGrid().getBoundingClientRect();n=l.e.clientY+o.globals.translateY-g.top}d<0&&(n=c),l.marker.enlargeCurrentPoint(i,s.paths,r,n)}return{x:r,y:n}}},{key:"handleBarTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=this.ttCtx,o=n.getElTooltip(),l=0,h=0,c=0,d=this.getBarTooltipXY({e:a,opt:s});if(null!==d.j||0!==d.barHeight||0!==d.barWidth){e=d.i;var u=d.j;if(r.globals.capturedSeriesIndex=e,r.globals.capturedDataPointIndex=u,r.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!r.config.tooltip.shared?(h=d.x,c=d.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[e]:r.config.stroke.width,l=h):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(c)&&(c=r.globals.svgHeight-n.tooltipRect.ttHeight),parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),h+n.tooltipRect.ttWidth>r.globals.gridWidth?h-=n.tooltipRect.ttWidth:h<0&&(h=0),n.w.config.tooltip.followCursor){var g=n.getElGrid().getBoundingClientRect();c=n.e.clientY-g.top}null===n.tooltip&&(n.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?n.tooltipPosition.moveXCrosshairs(l+i/2):n.tooltipPosition.moveXCrosshairs(l)),!n.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(c=c+r.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=h+r.globals.translateX+"px",o.style.top=c+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,i=t.e,a=t.opt,s=this.w,r=null,n=this.ttCtx,o=0,l=0,h=0,c=0,d=0,u=i.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){var g=i.target,p=g.getBoundingClientRect(),f=a.elGrid.getBoundingClientRect(),x=p.height;d=p.height;var b=p.width,m=parseInt(g.getAttribute("cx"),10),v=parseInt(g.getAttribute("cy"),10);c=parseFloat(g.getAttribute("barWidth"));var y="touchmove"===i.type?i.touches[0].clientX:i.clientX;r=parseInt(g.getAttribute("j"),10),o=parseInt(g.parentNode.getAttribute("rel"),10)-1;var w=g.getAttribute("data-range-y1"),k=g.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(g.parentNode.getAttribute("data:realIndex"),10));var A=function(t){return s.globals.isXNumeric?m-b/2:e.isVerticalGroupedRangeBar?m+b/2:m-n.dataPointsDividedWidth+b/2},C=function(){return v-n.dataPointsDividedHeight+x/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:r,y1:w?parseInt(w,10):null,y2:k?parseInt(k,10):null,shared:!n.showOnIntersect&&s.config.tooltip.shared,e:i}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(l=y-f.left+15,h=C()):(l=A(),h=i.clientY-f.top-n.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((l=m)0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var a=this.ttCtx,s=this.w,r=s.globals,n=r.seriesYAxisMap[t];if(a.yaxisTooltips[t]&&n.length>0){var o=r.yLabelFormatters[t],l=a.getElGrid().getBoundingClientRect(),h=n[0],c=0;i.yRatio.length>1&&(c=h);var d=(e-l.top)*i.yRatio[c],u=r.maxYArr[h]-r.minYArr[h],g=r.minYArr[h]+(u-d);s.config.yaxis[t].reversed&&(g=r.maxYArr[h]-(u-d)),a.tooltipPosition.moveYCrosshairs(e-l.top),a.yaxisTooltipText[t].innerHTML=o(g),a.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),Sa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.tConfig=a.config.tooltip,this.tooltipUtil=new va(this),this.tooltipLabels=new ya(this),this.tooltipPosition=new wa(this),this.marker=new ka(this),this.intersect=new Aa(this),this.axesTooltip=new Ca(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!a.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return s(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new Qi(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,a=[],s=this.getElTooltip(),r=function(r){var n=document.createElement("div");n.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(r)),n.style.order=i.config.tooltip.inverseOrder?t-r:r+1;var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[r],n.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var a=document.createElement("span");a.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(a),l.appendChild(e)})),n.appendChild(l),s.appendChild(n),a.push(n)},n=0;n0&&this.addPathsEventListeners(g,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(r=r+t.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+t.globals.svgHeight-s-10),e.style.left=r+"px",e.style.top=n+"px",{x:r,y:n,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,a=function(a){var s={paths:t[a],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[a].addEventListener(e,i.onSeriesHover.bind(i,s),{capture:!1,passive:!0})}))},s=0;s=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(t,e)}),20-a))}},{key:"seriesHover",value:function(t,e){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||0===s.globals.dataPoints)||(a.length?a.forEach((function(a){var s=i.getElTooltip(a),r={paths:t.paths,tooltipEl:s,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===i.w.globals.minX&&a.w.globals.maxX===i.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:r,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,a=t.opt,s=t.e,r=e.w,n=this.getElTooltip(e);if(n){if(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=s,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared)if(this.tConfig.onDatasetHover.highlightDataSeries)new Zi(e).toggleSeriesOnHover(s,s.target.parentNode);i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect})}}},{key:"axisChartsTooltips",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=s.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,ln.top+n.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var h=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(h)<0)return void this.handleMouseOut(s)}var c=this.getElTooltip(),d=this.getElXCrosshairs(),u=[];r.config.chart.group&&(u=this.ctx.getSyncedCharts());var g=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;null!==d&&d.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),g&&!this.showOnIntersect||u.length>1)this.handleStickyTooltip(a,o,l,s);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:e,y:i,type:r.config.chart.type});e=f.x,i=f.y,c.style.left=e+"px",c.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:e,y:i});if(this.yaxisTooltips.length)for(var x=0;xl.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(t,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||s.globals.isBarHorizontal){var h=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,h,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,i,a){var s=this.w;if(!this.tConfig.shared&&null===s.globals.series[e][a])return void this.handleMouseOut(i);if(void 0!==s.globals.series[e][a])this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,a,i.ttItems):this.create(t,this,e,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var r=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,r,a,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Mi(this.ctx),i=t.globals.dom.Paper.find(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,A=this.w,C=e;"mouseup"===t.type&&this.markerClick(t,i,a),null===k&&(k=this.tConfig.shared);var S=this.tooltipUtil.hasMarkers(i),L=this.tooltipUtil.getElBars();if(A.config.legend.tooltipHoverFormatter){var M=A.config.legend.tooltipHoverFormatter,P=Array.from(this.legendLabels);P.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var I=0;I0?C.marker.enlargePoints(a):C.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var E=new Mi(this.ctx),H=A.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var O=0;O0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*k)),w){u=u+d.height/2-b/2-2}var C=e.globals.series[i][a]<0,S=o;switch(this.barCtx.isReversed&&(S=o+(C?c:-c)),f.position){case"center":g=w?C?S-c/2+v:S+c/2-v:C?S-c/2+d.height/2+v:S+c/2+d.height/2-v;break;case"bottom":g=w?C?S-c+v:S+c-v:C?S-c+d.height+b+v:S+c-d.height/2+b-v;break;case"top":g=w?C?S+v:S-v:C?S-d.height/2-v:S+d.height+v}if(this.barCtx.lastActiveBarSerieIndex===s&&x.enabled){var L=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:a}),p.fontSize);r=C?S-L.height/2-v-x.offsetY+18:S+L.height+v+x.offsetY-18;var M=A;n=y+(e.globals.isXNumeric?-h*e.globals.barGroups.length/2:e.globals.barGroups.length*h/2-(e.globals.barGroups.length-1)*h-M)+x.offsetX}return e.config.chart.stacked||(g<0?g=0+b:g+d.height/3>e.globals.gridHeight&&(g=e.globals.gridHeight-b)),{bcx:l,bcy:o,dataLabelsX:u,dataLabelsY:g,totalDataLabelsX:n,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,a=t.i,s=t.j,r=t.realIndex,n=t.bcy,o=t.barHeight,l=t.barWidth,h=t.textRects,c=t.dataLabelsX,d=t.strokeWidth,u=t.dataLabelsConfig,g=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,f=t.offX,x=t.offY,b=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var m,v,y=n-(this.barCtx.isRangeBar?0:b)+o/2+h.height/2+x-3,w="start",k=e.globals.series[a][s]<0,A=i;switch(this.barCtx.isReversed&&(A=i+(k?-l:l),w=k?"start":"end"),g.position){case"center":c=k?A+l/2-f:Math.max(h.width/2,A-l/2)+f;break;case"bottom":c=k?A+l-d-f:A-l+d+f;break;case"top":c=k?A-d-f:A-d+f}if(this.barCtx.lastActiveBarSerieIndex===r&&p.enabled){var C=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:s}),u.fontSize);k?(m=A-d-f-p.offsetX,w="end"):m=A+f+p.offsetX+(this.barCtx.isReversed?-(l+d):d),v=y-h.height/2+C.height/2+p.offsetY+d}return e.config.chart.stacked||("start"===u.textAnchor?c-h.width<0?c=k?h.width+d:d:c+h.width>e.globals.gridWidth&&(c=k?e.globals.gridWidth-d:e.globals.gridWidth-h.width-d):"middle"===u.textAnchor?c-h.width/2<0?c=h.width/2+d:c+h.width/2>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width/2-d):"end"===u.textAnchor&&(c<1?c=h.width+d:c+1>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width-d))),{bcx:i,bcy:n,dataLabelsX:c,dataLabelsY:y,totalDataLabelsX:m,totalDataLabelsY:v,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.i,r=t.j,n=t.textRects,o=t.barHeight,l=t.barWidth,h=t.dataLabelsConfig,c=this.w,d="rotate(0)";"vertical"===c.config.plotOptions.bar.dataLabels.orientation&&(d="rotate(-90, ".concat(e,", ").concat(i,")"));var g=new qi(this.barCtx.ctx),p=new Mi(this.barCtx.ctx),f=h.formatter,x=null,b=c.globals.collapsedSeriesIndices.indexOf(s)>-1;if(h.enabled&&!b){x=p.group({class:"apexcharts-data-labels",transform:d});var m="";void 0!==a&&(m=f(a,u(u({},c),{},{seriesIndex:s,dataPointIndex:r,w:c}))),!a&&c.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(m="");var v=c.globals.series[s][r]<0,y=c.config.plotOptions.bar.dataLabels.position;if("vertical"===c.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(h.textAnchor=v?"end":"start"),"center"===y&&(h.textAnchor="middle"),"bottom"===y&&(h.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels)lMath.abs(l)&&(m=""):n.height/1.6>Math.abs(o)&&(m=""));var w=u({},h);this.barCtx.isHorizontal&&a<0&&("start"===h.textAnchor?w.textAnchor="end":"end"===h.textAnchor&&(w.textAnchor="start")),g.plotDataLabelsText({x:e,y:i,text:m,i:s,j:r,parent:x,dataLabelsConfig:w,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}},{key:"drawTotalDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.realIndex,r=t.textAnchor,n=t.barTotalDataLabelsConfig;this.w;var o,l=new Mi(this.barCtx.ctx);return n.enabled&&void 0!==e&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===s&&(o=l.drawText({x:e,y:i,foreColor:n.style.color,text:a,textAnchor:r,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),o}}]),t}(),Ma=function(){function t(e){i(this,t),this.w=e.w,this.barCtx=e}return s(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[i].length),e.globals.isXNumeric)for(var a=0;ae.globals.minX&&e.globals.seriesX[i][a]0&&(a=l.globals.minXDiff/d),(r=a/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),n=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+(a-r*this.barCtx.seriesLen)/2}return l.globals.barHeight=s,l.globals.barWidth=r,{x:t,y:e,yDivision:i,xDivision:a,barHeight:s,barWidth:r,zeroH:n,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,i,a){var s,r,n,o,l=this.w,h=this.barCtx.ctx.fill,c=null,d=this.barCtx.barOptions.distributed?i:e;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(a){t[e][i]>=a.from&&t[e][i]<=a.to&&(c=a.color)}));return h.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:a,dataPointIndex:i,color:c,value:t[e][i],fillConfig:null===(s=l.config.series[e].data[i])||void 0===s?void 0:s.fill,fillType:null!==(r=l.config.series[e].data[i])&&void 0!==r&&null!==(n=r.fill)&&void 0!==n&&n.type?null===(o=l.config.series[e].data[i])||void 0===o?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[a]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,i){var a=0,s=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"createBorderRadiusArr",value:function(t){var e,i=this.w,a=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,s=t.length,n=0|(null===(e=t[0])||void 0===e?void 0:e.length),o=Array.from({length:s},(function(){return Array(n).fill(a?"top":"none")}));if(a)return o;for(var l=0;l0?(h.push(u),d++):g<0&&(c.push(u),d++)}if(h.length>0&&0===c.length)if(1===h.length)o[h[0]][l]="both";else{var p,f=h[0],x=h[h.length-1],b=r(h);try{for(b.s();!(p=b.n()).done;){var m=p.value;o[m][l]=m===f?"bottom":m===x?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===h.length)if(1===c.length)o[c[0]][l]="both";else{var v,y=Math.max.apply(Math,c),w=Math.min.apply(Math,c),k=r(c);try{for(k.s();!(v=k.n()).done;){var A=v.value;o[A][l]=A===y?"bottom":A===w?"top":"none"}}catch(t){k.e(t)}finally{k.f()}}else if(h.length>0&&c.length>0){var C,S=h[h.length-1],L=r(h);try{for(L.s();!(C=L.n()).done;){var M=C.value;o[M][l]=M===S?"top":"none"}}catch(t){L.e(t)}finally{L.f()}var P,I=Math.max.apply(Math,c),T=r(c);try{for(T.s();!(P=T.n()).done;){var z=P.value;o[z][l]=z===I?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else if(1===d){o[h[0]||c[0]][l]="both"}}return o}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,a=t.x1,s=t.x2,r=t.y1,n=t.y2,o=t.elSeries,l=this.w,h=new Mi(this.barCtx.ctx),c=new Zi(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var d=this.barCtx.barOptions.colors.backgroundBarColors[e],u=h.drawRect(void 0!==a?a:0,void 0!==r?r:0,void 0!==s?s:l.globals.gridWidth,void 0!==n?n:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,i=t.barWidth,a=t.barXPosition,s=t.y1,r=t.y2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.columnWidthOffset&&(x=a-g.config.series[c].data[u].columnWidthOffset/2,f=i+g.config.series[c].data[u].columnWidthOffset);var b=n/2,m=x+b,v=x+f-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001-b*y,r+=.001+b*y;var w=p.move(m,s),k=p.move(m,s),A=p.line(v,s);if(g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1)),w=w+p.line(m,r)+p.line(v,r)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(m,s)+A+A+A+A+A+p.line(m,s)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).yArrj.push(r-b*y),C.yArrjF.push(Math.abs(s-r+n*y)),C.yArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"getBarpaths",value:function(t){var e,i=t.barYPosition,a=t.barHeight,s=t.x1,r=t.x2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.barHeightOffset&&(f=i-g.config.series[c].data[u].barHeightOffset/2,x=a+g.config.series[c].data[u].barHeightOffset);var b=n/2,m=f+b,v=f+x-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001+b*y,r+=.001-b*y;var w=p.move(s,m),k=p.move(s,m);g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1));var A=p.line(s,v);if(w=w+p.line(r,m)+p.line(r,v)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(s,m)+A+A+A+A+A+p.line(s,m)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).xArrj.push(r+b*y),C.xArrjF.push(Math.abs(s-r-n*y)),C.xArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;a2&&void 0!==arguments[2])||arguments[2]?e:null;return null!=t&&(i=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(t,e,i){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?e:null;return null!=t&&(a=e-t/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(t,e,i,a,s,r){var n=this,l=this.w,h=[],c=function(a,s){var l;h.push((o(l={},t,"x"===t?n.getXForValue(a,e,!1):n.getYForValue(a,i,r,!1)),o(l,"attrs",s),l))};if(l.globals.seriesGoals[a]&&l.globals.seriesGoals[a][s]&&Array.isArray(l.globals.seriesGoals[a][s])&&l.globals.seriesGoals[a][s].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,g={strokeHeight:"x"===t?0:l.globals.markers.size[a],strokeWidth:"x"===t?l.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[a])?d[a][0]:d[a]};c(l.globals.seriesRangeStart[a][s],g),c(l.globals.seriesRangeEnd[a][s],u(u({},g),{},{strokeColor:Array.isArray(d[a])?d[a][1]:d[a]}))}return h}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,a=t.goalX,s=t.goalY,r=t.barWidth,n=t.barHeight,o=new Mi(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var h=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach((function(t){if(t.x>=-1&&t.x<=o.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:n/2,a=i+e+n/2;h=o.drawLine(t.x,a-2*e,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(h)}})):Array.isArray(s)&&s.forEach((function(t){if(t.y>=-1&&t.y<=o.w.globals.gridHeight+1){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:r/2,a=e+i+r/2;h=o.drawLine(a-2*i,t.y,a,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(h)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,i=t.currPaths,a=t.color,s=this.w,r=e.x,n=e.x1,o=e.barYPosition,l=i.x,h=i.x1,c=i.barYPosition,d=o+i.barHeight,u=new Mi(this.barCtx.ctx),g=new v,p=u.move(n,d)+u.line(r,d)+u.line(l,c)+u.line(h,c)+u.line(n,d)+("around"===s.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return u.drawPath({d:p,fill:g.shadeColor(.5,v.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,i=t.i,a=t.j,s=this.w,r=0,n=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map((function(t,e){return e})):(null===(e=s.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=s.globals.seriesPercent[t][a];e&&r++,t-1})),a=this.barCtx.columnGroupIndices,s=a.indexOf(i);return s<0&&(a.push(i),s=a.length-1),{groupIndex:i,columnGroupIndex:s}}}]),t}(),Pa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w;var s=this.w;this.barOptions=s.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=s.config.stroke.width,this.isNullValue=!1,this.isRangeBar=s.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!s.globals.isBarHorizontal&&s.globals.seriesRange.length&&s.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=a,null!==this.xyRatios&&(this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.invertedXRatio=a.invertedXRatio,this.invertedYRatio=a.invertedYRatio,this.baseLineY=a.baseLineY,this.baseLineInvertedY=a.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var r=new Zi(this.ctx);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var n=r.getBarSeriesIndices(),o=new Pi(this.ctx);this.stackedSeriesTotals=o.getStackedSeriesTotals(this.w.config.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}))),this.barHelpers=new Ma(this)}return s(t,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=new Pi(this.ctx,i);t=s.getLogSeries(t),this.series=t,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var n=0,o=0;n0&&(this.visibleI=this.visibleI+1);var w=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[b],this.translationsIndex=b);var A=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var C=this.barHelpers.initialPositions();p=C.y,w=C.barHeight,h=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,l=C.xDivision,c=C.zeroH,this.isHorizontal||x.push(g+k/2);var S=a.group({class:"apexcharts-datalabels","data:realIndex":b});i.globals.delayedElements.push({el:S.node}),S.node.classList.add("apexcharts-element-hidden");var L=a.group({class:"apexcharts-bar-goals-markers"}),M=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");for(var P=0;P0){var R=this.barHelpers.drawBarShadow({color:"string"==typeof X&&-1===(null==X?void 0:X.indexOf("url"))?X:v.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});if(M.add(R),i.config.chart.dropShadow.enabled)new Li(this.ctx).dropShadow(R,i.config.chart.dropShadow,b)}this.pathArr.push(T);var Y=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:w,barWidth:k});Y&&L.add(Y),p=T.y,g=T.x,P>0&&x.push(g+k/2),f.push(p),this.renderSeries({realIndex:b,pathFill:X,j:P,i:n,columnGroupIndex:m,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:I,elSeries:y,x:g,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:w),barWidth:Math.abs(T.barWidth?T.barWidth:k),elDataLabelsWrap:S,elGoalsMarkers:L,elBarShadows:M,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[b]=x,i.globals.seriesYvalues[b]=f,r.add(y)}return r}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,a=t.lineFill,s=t.j,r=t.i,n=t.columnGroupIndex,o=t.pathFrom,l=t.pathTo,h=t.strokeWidth,c=t.elSeries,d=t.x,u=t.y,g=t.y1,p=t.y2,f=t.series,x=t.barHeight,b=t.barWidth,m=t.barXPosition,v=t.barYPosition,y=t.elDataLabelsWrap,w=t.elGoalsMarkers,k=t.elBarShadows,A=t.visibleSeries,C=t.type,S=t.classes,L=this.w,M=new Mi(this.ctx);if(!a){var P="function"==typeof L.globals.stroke.colors[e]?function(t){var e,i=L.config.stroke.colors;return Array.isArray(i)&&i.length>0&&((e=i[t])||(e=""),"function"==typeof e)?e({value:L.globals.series[t][s],dataPointIndex:s,w:L}):e}(e):L.globals.stroke.colors[e];a=this.barOptions.distributed?L.globals.stroke.colors[s]:P}L.config.series[r].data[s]&&L.config.series[r].data[s].strokeColor&&(a=L.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var I=s/L.config.chart.animations.animateGradually.delay*(L.config.chart.animations.speed/L.globals.dataPoints)/2.4,T=M.renderPaths({i:r,j:s,realIndex:e,pathFrom:o,pathTo:l,stroke:a,strokeWidth:h,strokeLineCap:L.config.stroke.lineCap,fill:i,animationDelay:I,initialSpeed:L.config.chart.animations.speed,dataChangeSpeed:L.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(C,"-area ").concat(S),chartType:C});T.attr("clip-path","url(#gridRectBarMask".concat(L.globals.cuid,")"));var z=L.config.forecastDataPoints;z.count>0&&s>=L.globals.dataPoints-z.count&&(T.node.setAttribute("stroke-dasharray",z.dashArray),T.node.setAttribute("stroke-width",z.strokeWidth),T.node.setAttribute("fill-opacity",z.fillOpacity)),void 0!==g&&void 0!==p&&(T.attr("data-range-y1",g),T.attr("data-range-y2",p)),new Li(this.ctx).setSelectionFilter(T,e,s),c.add(T);var X=new La(this).handleBarDataLabels({x:d,y:u,y1:g,y2:p,i:r,j:s,series:f,realIndex:e,columnGroupIndex:n,barHeight:x,barWidth:b,barXPosition:m,barYPosition:v,renderedPath:T,visibleSeries:A});return null!==X.dataLabels&&y.add(X.dataLabels),X.totalDataLabels&&y.add(X.totalDataLabels),c.add(y),w&&c.add(w),k&&c.add(k),c}},{key:"drawBarPaths",value:function(t){var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.yDivision,h=t.elSeries,c=this.w,d=i.i,u=i.j;if(c.globals.isXNumeric)e=(o=(c.globals.seriesX[d][u]-c.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var g=0,p=0;c.globals.seriesPercent.forEach((function(t,e){t[u]&&g++,e0&&(a=this.seriesLen*a/g),e=o+a*this.visibleI,e-=a*p}else e=o+a*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[d][u],r)-r)/2),n=this.barHelpers.getXForValue(this.series[d][u],r);var f=this.barHelpers.getBarpaths({barYPosition:e,barHeight:a,x1:r,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:d,j:u,w:c});return c.globals.isXNumeric||(o+=l),this.barHelpers.barBackground({j:u,i:d,y1:e-a*this.visibleI,y2:a*this.seriesLen,elSeries:h}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x1:r,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",r,null,d,u),barYPosition:e,barHeight:a}}},{key:"drawColumnPaths",value:function(t){var e,i=t.indexes,a=t.x,s=t.y,r=t.xDivision,n=t.barWidth,o=t.zeroH,l=t.strokeWidth,h=t.elSeries,c=this.w,d=i.realIndex,u=i.translationsIndex,g=i.i,p=i.j,f=i.bc;if(c.globals.isXNumeric){var x=this.getBarXForNumericXAxis({x:a,j:p,realIndex:d,barWidth:n});a=x.x,e=x.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var b=this.barHelpers.getZeroValueEncounters({i:g,j:p}),m=b.nonZeroColumns,v=b.zeroEncounters;m>0&&(n=this.seriesLen*n/m),e=a+n*this.visibleI,e-=n*v}else e=a+n*this.visibleI;s=this.barHelpers.getYForValue(this.series[g][p],o,u);var y=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:n,y1:o,y2:s,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:d,i:g,j:p,w:c});return c.globals.isXNumeric||(a+=r),this.barHelpers.barBackground({bc:f,j:p,i:g,x1:e-l/2-n*this.visibleI,x2:n*this.seriesLen+l/2,elSeries:h}),{pathTo:y.pathTo,pathFrom:y.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,g,p,u),barXPosition:e,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,i=t.barWidth,a=t.realIndex,s=t.j,r=this.w,n=a;return r.globals.seriesX[a].length||(n=r.globals.maxValsInArrayIndex),v.isNumber(r.globals.seriesX[n][s])&&(e=(r.globals.seriesX[n][s]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:e+i*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var i,a=this.w,s=0;s0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==a.globals.previousPaths[s].paths[e]&&(i=a.globals.previousPaths[s].paths[e].d)}return i}}]),t}(),Ia=function(t){h(a,t);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this,a=this.w;this.graphics=new Mi(this.ctx),this.bar=new Pa(this.ctx,this.xyRatios);var s=new Pi(this.ctx,a);t=s.getLogSeries(t),this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===a.config.chart.stackType&&(t=a.globals.comboCharts?e.map((function(t){return a.globals.seriesPercent[t]})):a.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);for(var r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),n=0,o=0,l=function(s,l){var h=void 0,c=void 0,d=void 0,g=void 0,p=a.globals.comboCharts?e[s]:s,f=i.barHelpers.getGroupIndex(p),x=f.groupIndex,b=f.columnGroupIndex;i.groupCtx=i[a.globals.seriesGroups[x]];var m=[],y=[],w=0;i.yRatio.length>1&&(i.yaxisIndex=a.globals.seriesYAxisReverseMap[p][0],w=p),i.isReversed=a.config.yaxis[i.yaxisIndex]&&a.config.yaxis[i.yaxisIndex].reversed;var k=i.graphics.group({class:"apexcharts-series",seriesName:v.escapeString(a.globals.seriesNames[p]),rel:s+1,"data:realIndex":p});i.ctx.series.addCollapsedClassToSeries(k,p);var A=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),C=i.graphics.group({class:"apexcharts-bar-goals-markers"}),S=0,L=0,M=i.initialPositions(n,o,h,c,d,g,w);o=M.y,S=M.barHeight,c=M.yDivision,g=M.zeroW,n=M.x,L=M.barWidth,h=M.xDivision,d=M.zeroH,a.globals.barHeight=S,a.globals.barWidth=L,i.barHelpers.initializeStackedXYVars(i),1===i.groupCtx.prevY.length&&i.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(i.groupCtx.prevY[0]=i.groupCtx.prevY[0].map((function(){return d})),i.groupCtx.prevYF[0]=i.groupCtx.prevYF[0].map((function(){return 0})));for(var P=0;P0||"top"===i.barHelpers.arrBorderRadius[p][P]&&a.globals.series[p][P]<0)&&(Y=E),k=i.renderSeries({realIndex:p,pathFill:R,j:P,i:s,columnGroupIndex:b,pathFrom:z.pathFrom,pathTo:z.pathTo,strokeWidth:I,elSeries:k,x:n,y:o,series:t,barHeight:S,barWidth:L,elDataLabelsWrap:A,elGoalsMarkers:C,type:"bar",visibleSeries:b,classes:Y})}a.globals.seriesXvalues[p]=m,a.globals.seriesYvalues[p]=y,i.groupCtx.prevY.push(i.groupCtx.yArrj),i.groupCtx.prevYF.push(i.groupCtx.yArrjF),i.groupCtx.prevYVal.push(i.groupCtx.yArrjVal),i.groupCtx.prevX.push(i.groupCtx.xArrj),i.groupCtx.prevXF.push(i.groupCtx.xArrjF),i.groupCtx.prevXVal.push(i.groupCtx.xArrjVal),r.add(k)},h=0,c=0;h1?l=(i=h.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(d).indexOf("%")?l=parseInt(d,10):l*=parseInt(d,10)/100,s=this.isReversed?this.baseLineY[n]:h.globals.gridHeight-this.baseLineY[n],t=h.globals.padHorizontal+(i-l)/2}var u=h.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:i,barHeight:o/u,barWidth:l/u,zeroH:s,zeroW:r}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.columnGroupIndex,h=t.seriesGroup,c=t.yDivision,d=t.elSeries,u=this.w,g=o+l*a,p=i.i,f=i.j,x=i.realIndex,b=i.translationsIndex,m=0,v=0;v0){var w=r;this.groupCtx.prevXVal[y-1][f]<0?w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[y-1][f]:this.groupCtx.prevXVal[y-1][f]>=0&&(w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]:this.groupCtx.prevX[y-1][f]-m+2*(this.isReversed?m:0)),e=w}else e=r;n=null===this.series[p][f]?e:e+this.series[p][f]/this.invertedYRatio-2*(this.isReversed?this.series[p][f]/this.invertedYRatio:0);var k=this.barHelpers.getBarpaths({barYPosition:g,barHeight:a,x1:e,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,seriesGroup:h,i:p,j:f,w:u});return this.barHelpers.barBackground({j:f,i:p,y1:g,y2:a,elSeries:d}),o+=c,{pathTo:k.pathTo,pathFrom:k.pathFrom,goalX:this.barHelpers.getGoalValues("x",r,null,p,f,b),barXPosition:e,barYPosition:g,x:n,y:o}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,r=t.barWidth,n=t.zeroH,o=t.columnGroupIndex,l=t.seriesGroup,h=t.elSeries,c=this.w,d=e.i,u=e.j,g=e.bc,p=e.realIndex,f=e.translationsIndex;if(c.globals.isXNumeric){var x=c.globals.seriesX[p][u];x||(x=0),i=(x-c.globals.minX)/this.xRatio-r/2*c.globals.barGroups.length}for(var b,m=i+o*r,v=0,y=0;y0&&!c.globals.isXNumeric||w>0&&c.globals.isXNumeric&&c.globals.seriesX[p-1][u]===c.globals.seriesX[p][u]){var k,A,C,S=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var L=1;L=0?C-v+2*(this.isReversed?v:0):C;break}if((null===(T=this.groupCtx.prevYVal[w-P])||void 0===T?void 0:T[u])>=0){A=this.series[d][u]>=0?C:C+v-2*(this.isReversed?v:0);break}}void 0===A&&(A=c.globals.gridHeight),b=null!==(k=this.groupCtx.prevYF[0])&&void 0!==k&&k.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?n:A}else b=n;a=this.series[d][u]?b-this.series[d][u]/this.yRatio[f]+2*(this.isReversed?this.series[d][u]/this.yRatio[f]:0):b;var z=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:r,y1:b,y2:a,yRatio:this.yRatio[f],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:d,j:u,w:c});return this.barHelpers.barBackground({bc:g,j:u,i:d,x1:m,x2:r,elSeries:h}),{pathTo:z.pathTo,pathFrom:z.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,n,d,u),barXPosition:m,x:c.globals.isXNumeric?i:i+s,y:a}}}]),a}(Pa),Ta=function(t){h(a,t);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e,i){var a=this,s=this.w,r=new Mi(this.ctx),n=s.globals.comboCharts?e:s.config.chart.type,o=new ji(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=s.config.plotOptions.bar.horizontal;var l=new Pi(this.ctx,s);t=l.getLogSeries(t),this.series=t,this.yRatio=l.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var h=r.group({class:"apexcharts-".concat(n,"-series apexcharts-plot-series")}),c=function(e){a.isBoxPlot="boxPlot"===s.config.chart.type||"boxPlot"===s.config.series[e].type;var n,l,c,d,g=void 0,p=void 0,f=[],x=[],b=s.globals.comboCharts?i[e]:e,m=a.barHelpers.getGroupIndex(b).columnGroupIndex,y=r.group({class:"apexcharts-series",seriesName:v.escapeString(s.globals.seriesNames[b]),rel:e+1,"data:realIndex":b});a.ctx.series.addCollapsedClassToSeries(y,b),t[e].length>0&&(a.visibleI=a.visibleI+1);var w,k,A=0;a.yRatio.length>1&&(a.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],A=b);var C=a.barHelpers.initialPositions();p=C.y,w=C.barHeight,l=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,n=C.xDivision,c=C.zeroH,x.push(g+k/2);for(var S=r.group({class:"apexcharts-datalabels","data:realIndex":b}),L=r.group({class:"apexcharts-bar-goals-markers"}),M=function(i){var r=a.barHelpers.getStrokeWidth(e,i,b),h=null,v={indexes:{i:e,j:i,realIndex:b,translationsIndex:A},x:g,y:p,strokeWidth:r,elSeries:y};h=a.isHorizontal?a.drawHorizontalBoxPaths(u(u({},v),{},{yDivision:l,barHeight:w,zeroW:d})):a.drawVerticalBoxPaths(u(u({},v),{},{xDivision:n,barWidth:k,zeroH:c})),p=h.y,g=h.x;var C=a.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:h.barYPosition,goalX:h.goalX,goalY:h.goalY,barHeight:w,barWidth:k});C&&L.add(C),i>0&&x.push(g+k/2),f.push(p),h.pathTo.forEach((function(n,l){var c=!a.isBoxPlot&&a.candlestickOptions.wick.useFillColor?h.color[l]:s.globals.stroke.colors[e],d=o.fillPath({seriesNumber:b,dataPointIndex:i,color:h.color[l],value:t[e][i]});a.renderSeries({realIndex:b,pathFill:d,lineFill:c,j:i,i:e,pathFrom:h.pathFrom,pathTo:n,strokeWidth:r,elSeries:y,x:g,y:p,series:t,columnGroupIndex:m,barHeight:w,barWidth:k,elDataLabelsWrap:S,elGoalsMarkers:L,visibleSeries:a.visibleI,type:s.config.chart.type})}))},P=0;Pb.c&&(d=!1);var y=Math.min(b.o,b.c),w=Math.max(b.o,b.c),k=b.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[u][c]-o.globals.minX)/this.xRatio-s/2);var A=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(y=r,w=r):(y=r-y/x,w=r-w/x,m=r-b.h/x,v=r-b.l/x,k=r-b.m/x);var C=l.move(A,r),S=l.move(A+s/2,y);return o.globals.previousPaths.length>0&&(S=this.getPreviousPath(u,c,!0)),C=this.isBoxPlot?[l.move(A,y)+l.line(A+s/2,y)+l.line(A+s/2,m)+l.line(A+s/4,m)+l.line(A+s-s/4,m)+l.line(A+s/2,m)+l.line(A+s/2,y)+l.line(A+s,y)+l.line(A+s,k)+l.line(A,k)+l.line(A,y+n/2),l.move(A,k)+l.line(A+s,k)+l.line(A+s,w)+l.line(A+s/2,w)+l.line(A+s/2,v)+l.line(A+s-s/4,v)+l.line(A+s/4,v)+l.line(A+s/2,v)+l.line(A+s/2,w)+l.line(A,w)+l.line(A,k)+"z"]:[l.move(A,w)+l.line(A+s/2,w)+l.line(A+s/2,m)+l.line(A+s/2,w)+l.line(A+s,w)+l.line(A+s,y)+l.line(A+s/2,y)+l.line(A+s/2,v)+l.line(A+s/2,y)+l.line(A,y)+l.line(A,w-n/2)],S+=l.move(A,y),o.globals.isXNumeric||(i+=a),{pathTo:C,pathFrom:S,x:i,y:w,goalY:this.barHelpers.getGoalValues("y",null,r,h,c,e.translationsIndex),barXPosition:A,color:this.isBoxPlot?f:d?[g]:[p]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var i=t.y,a=t.yDivision,s=t.barHeight,r=t.zeroW,n=t.strokeWidth,o=this.w,l=new Mi(this.ctx),h=e.i,c=e.j,d=this.boxOptions.colors.lower;this.isBoxPlot&&(d=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,g=e.realIndex,p=this.getOHLCValue(g,c),f=r,x=r,b=Math.min(p.o,p.c),m=Math.max(p.o,p.c),v=p.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[g][c]-o.globals.minX)/this.invertedXRatio-s/2);var y=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(b=r,m=r):(b=r+b/u,m=r+m/u,f=r+p.h/u,x=r+p.l/u,v=r+p.m/u);var w=l.move(r,y),k=l.move(b,y+s/2);return o.globals.previousPaths.length>0&&(k=this.getPreviousPath(g,c,!0)),w=[l.move(b,y)+l.line(b,y+s/2)+l.line(f,y+s/2)+l.line(f,y+s/2-s/4)+l.line(f,y+s/2+s/4)+l.line(f,y+s/2)+l.line(b,y+s/2)+l.line(b,y+s)+l.line(v,y+s)+l.line(v,y)+l.line(b+n/2,y),l.move(v,y)+l.line(v,y+s)+l.line(m,y+s)+l.line(m,y+s/2)+l.line(x,y+s/2)+l.line(x,y+s-s/4)+l.line(x,y+s/4)+l.line(x,y+s/2)+l.line(m,y+s/2)+l.line(m,y)+l.line(v,y)+"z"],k+=l.move(b,y),o.globals.isXNumeric||(i+=a),{pathTo:w,pathFrom:k,x:m,y:i,goalX:this.barHelpers.getGoalValues("x",r,null,h,c),barYPosition:y,color:d}}},{key:"getOHLCValue",value:function(t,e){var i=this.w,a=new Pi(this.ctx,i),s=a.getLogValAtSeriesIndex(i.globals.seriesCandleH[t][e],t),r=a.getLogValAtSeriesIndex(i.globals.seriesCandleO[t][e],t),n=a.getLogValAtSeriesIndex(i.globals.seriesCandleM[t][e],t),o=a.getLogValAtSeriesIndex(i.globals.seriesCandleC[t][e],t),l=a.getLogValAtSeriesIndex(i.globals.seriesCandleL[t][e],t);return{o:this.isBoxPlot?s:r,h:this.isBoxPlot?r:s,m:n,l:this.isBoxPlot?o:l,c:this.isBoxPlot?l:o}}}]),a}(Pa),za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,a){var s=this.w,r=1,n=s.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,i);s.globals.hasNegs||a?r=s.config.plotOptions[t].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):(1-o.percent/100)*(1.25*n):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(r=1-o.percent/100,"treemap"===t&&(r=(1-o.percent/100)*(1.25*n)));var l=o.color,h=new v;if(s.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var c=h.shadeColor(-1*r,o.color);l=v.hexToRgba(v.isColorHex(c)?c:v.rgb2hex(c),s.config.fill.opacity)}else{var d=h.shadeColor(r,o.color);l=v.hexToRgba(v.isColorHex(d)?d:v.rgb2hex(d),s.config.fill.opacity)}return{color:l,colorProps:o}}},{key:"determineColor",value:function(t,e,i){var a=this.w,s=a.globals.series[e][i],r=a.config.plotOptions[t],n=r.colorScale.inverse?i:e;r.distributed&&"treemap"===a.config.chart.type&&(n=i);var o=a.globals.colors[n],l=null,h=Math.min.apply(Math,f(a.globals.series[e])),c=Math.max.apply(Math,f(a.globals.series[e]));r.distributed||"heatmap"!==t||(h=a.globals.minY,c=a.globals.maxY),void 0!==r.colorScale.min&&(h=r.colorScale.mina.globals.maxY?r.colorScale.max:a.globals.maxY);var d=Math.abs(c)+Math.abs(h),u=100*s/(0===d?d-1e-6:d);r.colorScale.ranges.length>0&&r.colorScale.ranges.map((function(t,e){if(s>=t.from&&s<=t.to){o=t.color,l=t.foreColor?t.foreColor:null,h=t.from,c=t.to;var i=Math.abs(c)+Math.abs(h);u=100*s/(0===i?i-1e-6:i)}}));return{color:o,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,a=t.y,s=t.i,r=t.j,n=t.colorProps,o=t.fontSize,l=this.w.config.dataLabels,h=new Mi(this.ctx),c=new qi(this.ctx),d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});var u=l.offsetX,g=l.offsetY,p=i+u,f=a+parseFloat(l.style.fontSize)/3+g;c.plotDataLabelsText({x:p,y:f,text:e,i:s,j:r,color:n.foreColor,parent:d,fontSize:o,dataLabelsConfig:l})}return d}},{key:"addListeners",value:function(t){var e=new Mi(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),Xa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w,this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new za(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return s(t,[{key:"draw",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var s=e.globals.gridWidth/e.globals.dataPoints,r=e.globals.gridHeight/e.globals.series.length,n=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var h=o?0:l.length-1;o?h=0;o?h++:h--){var c=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:v.escapeString(e.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(this.ctx.series.addCollapsedClassToSeries(c,h),e.config.chart.dropShadow.enabled){var d=e.config.chart.dropShadow;new Li(this.ctx).dropShadow(c,d,h)}for(var u=0,g=e.config.plotOptions.heatmap.shadeIntensity,p=0;p-1&&this.pieClicked(d),i.config.dataLabels.enabled){var w=m.x,k=m.y,A=100*g/this.fullAngle+"%";if(0!==g&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(h=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(h)>this.fullAngle&&(h-=this.fullAngle);var c=Math.PI*(h-90)/180,d=i.centerX+r*Math.cos(l),u=i.centerY+r*Math.sin(l),g=i.centerX+r*Math.cos(c),p=i.centerY+r*Math.sin(c),f=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,h),x=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),b=s>180?1:0,m=["M",d,u,"A",r,r,0,b,1,g,p];return e="donut"===i.chartType?[].concat(m,["L",f.x,f.y,"A",i.donutSize,i.donutSize,0,b,0,x.x,x.y,"L",d,u,"z"]).join(" "):"pie"===i.chartType||"polarArea"===i.chartType?[].concat(m,["L",i.centerX,i.centerY,"L",d,u]).join(" "):[].concat(m).join(" "),n.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new ta(this.ctx),a=new Mi(this.ctx),s=new Ra(this.ctx),r=a.group(),n=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),h=o.result.length;this.maxY=o.niceMax;for(var c=e.globals.radialSize,d=c/(h-1),u=0;u1&&t.total.show&&(s=t.total.color);var n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,r),a||"function"!=typeof t.total.formatter||(i=t.total.formatter(r));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,r):"",null!==n&&(n.textContent=e),null!==o&&(o.textContent=i),null!==n&&(n.style.fill=s)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,a=t.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,s,a,t);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,a=new Mi(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(0!==s.strokeWidth){for(var r=[],n=360/i.globals.series.length,o=0;o0&&(f=e.getPreviousPath(n));for(var x=0;x=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?s-=10:t.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,a=0;a0&&parseInt(s.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[a].paths[0]&&(i=e.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var a=[],s=0;s=360&&(u=360-Math.abs(this.startAngle)-.1);var g=i.drawPath({d:"",stroke:c,strokeWidth:n*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){var p=h.dropShadow;s.dropShadow(g,p)}l.add(g),g.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(g,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:d,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return a}},{key:"drawArcs",value:function(t){var e=this.w,i=new Mi(this.ctx),a=new ji(this.ctx),s=new Li(this.ctx),r=i.group(),n=this.getStrokeWidth(t);t.size=t.size-n/2;var o=e.config.plotOptions.radialBar.hollow.background,l=t.size-n*t.series.length-this.margin*t.series.length-n*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(t,r,l,o));var c=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:o||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var d=e.config.plotOptions.radialBar.hollow.dropShadow;s.dropShadow(c,d)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var g=null;if(this.radialDataLabels.show){var p=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");g=this.renderInnerDataLabels(p,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})}"back"===e.config.plotOptions.radialBar.hollow.position&&(r.add(c),g&&r.add(g));var f=!1;e.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var x=f?t.series.length-1:0;f?x>=0:x100?100:t.series[x])/100,A=Math.round(this.totalAngle*k)+this.startAngle,C=void 0;e.globals.dataChanged&&(w=this.startAngle,C=Math.round(this.totalAngle*v.negToZero(e.globals.previousPaths[x])/100)+w),Math.abs(A)+Math.abs(y)>360&&(A-=.01),Math.abs(C)+Math.abs(w)>360&&(C-=.01);var S=A-y,L=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[x]:e.config.stroke.dashArray,M=i.drawPath({d:"",stroke:m,strokeWidth:n,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+x,strokeDashArray:L});if(Mi.setAttrs(M.node,{"data:angle":S,"data:value":t.series[x]}),e.config.chart.dropShadow.enabled){var P=e.config.chart.dropShadow;s.dropShadow(M,P,x)}if(s.setSelectionFilter(M,0,x),this.addListeners(M,this.radialDataLabels),b.add(M),M.attr({index:0,j:x}),this.barLabels.enabled){var I=v.polarToCartesian(t.centerX,t.centerY,t.size,y),T=this.barLabels.formatter(e.globals.seriesNames[x],{seriesIndex:x,w:e}),z=["apexcharts-radialbar-label"];this.barLabels.onClick||z.push("apexcharts-no-click");var X=this.barLabels.useSeriesColors?e.globals.colors[x]:e.config.chart.foreColor;X||(X=e.config.chart.foreColor);var R=I.x+this.barLabels.offsetX,Y=I.y+this.barLabels.offsetY,E=i.drawText({x:R,y:Y,text:T,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:X,cssClass:z.join(" ")});E.on("click",this.onBarLabelClick),E.attr({rel:x+1}),0!==y&&E.attr({"transform-origin":"".concat(R," ").concat(Y),transform:"rotate(".concat(y," 0 0)")}),b.add(E)}var H=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(H=e.config.chart.animations.speed),e.globals.dataChanged&&(H=e.config.chart.animations.dynamicAnimation.speed),this.animDur=H/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(M,{centerX:t.centerX,centerY:t.centerY,endAngle:A,startAngle:y,prevEndAngle:C,prevStartAngle:w,size:t.size,i:x,totalItems:2,animBeginArr:this.animBeginArr,dur:H,shouldSetPrevPaths:!0})}return{g:r,elHollow:c,dataLabels:g}}},{key:"drawHollow",value:function(t){var e=new Mi(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,a){var s=this.w,r=new ji(this.ctx),n=v.randomId(),o=s.config.plotOptions.radialBar.hollow.image;if(s.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:o,patternID:"pattern".concat(s.globals.cuid).concat(n)}),a="url(#pattern".concat(s.globals.cuid).concat(n,")");else{var l=s.config.plotOptions.radialBar.hollow.imageWidth,h=s.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===h){var c=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-e.width/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+s.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(c)}else{var d=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-l/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-h/2+s.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,h)}));e.add(d)}}return a}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,i=this.barLabels.onClick,a=this.w;i&&i(a.globals.seriesNames[e],{w:a,seriesIndex:e})}}]),r}(Ya),Oa=function(t){h(a,t);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var s=a.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),r=0;r0&&(this.visibleI=this.visibleI+1);var x=0,b=0,m=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[g][0],m=g);var y=this.barHelpers.initialPositions();d=y.y,h=y.zeroW,c=y.x,b=y.barWidth,x=y.barHeight,n=y.xDivision,o=y.yDivision,l=y.zeroH;for(var w=a.group({class:"apexcharts-datalabels","data:realIndex":g}),k=a.group({class:"apexcharts-rangebar-goals-markers"}),A=0;A0}));return this.isHorizontal?(a=u.config.plotOptions.bar.rangeBarGroupRows?r+h*b:r+o*this.visibleI+h*b,m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(a=(o=d.barHeight/g.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+g.indexOf(p))+h*b)):(b>-1&&!u.globals.timescaleLabels.length&&(s=u.config.plotOptions.bar.rangeBarGroupRows?n+c*b:n+l*this.visibleI+c*b),m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(s=(l=d.barWidth/g.length)*this.visibleI+c*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+g.indexOf(p))+c*b)),{barYPosition:a,barXPosition:s,barHeight:o,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.xDivision,s=t.barWidth,r=t.barXPosition,n=t.zeroH,o=this.w,l=e.i,h=e.j,c=e.realIndex,d=e.translationsIndex,u=this.yRatio[d],g=this.getRangeValue(c,h),p=Math.min(g.start,g.end),f=Math.max(g.start,g.end);void 0===this.series[l][h]||null===this.series[l][h]?p=n:(p=n-p/u,f=n-f/u);var x=Math.abs(f-p),b=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:s,y1:p,y2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:c,i:c,j:h,w:o});if(o.globals.isXNumeric){var m=this.getBarXForNumericXAxis({x:i,j:h,realIndex:c,barWidth:s});i=m.x,r=m.barXPosition}else i+=a;return{pathTo:b.pathTo,pathFrom:b.pathFrom,barHeight:x,x:i,y:g.start<0&&g.end<0?p:f,goalY:this.barHelpers.getGoalValues("y",null,n,l,h,d),barXPosition:r}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,a=t.y1,s=t.y2,r=t.yDivision,n=t.barHeight,o=t.barYPosition,l=t.zeroW,h=this.w,c=e.realIndex,d=e.j,u=this.preventBarOverflow(l+a/this.invertedYRatio),g=this.preventBarOverflow(l+s/this.invertedYRatio),p=this.getRangeValue(c,d),f=Math.abs(g-u),x=this.barHelpers.getBarpaths({barYPosition:o,barHeight:n,x1:u,x2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:c,realIndex:c,j:d,w:h});return h.globals.isXNumeric||(i+=r),{pathTo:x.pathTo,pathFrom:x.pathFrom,barWidth:f,x:p.start<0&&p.end<0?u:g,goalX:this.barHelpers.getGoalValues("x",l,null,c,d),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}}]),a}(Pa),Fa=function(){function t(e){i(this,t),this.w=e.w,this.lineCtx=e}return s(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new Pi(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,a=t.x,s=t.y,r=t.i,n=t.j,o=t.prevY,l=this.w,h=[],c=[];if(0===n){var d=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(d=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),h.push(d),c.push(v.isNumber(e[r][0])?o+l.config.markers.offsetY:null),h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null)}else h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null);return{x:h,y:c}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,a=t.realIndex,s=this.w,r=0;r0&&parseInt(n.realIndex,10)===parseInt(a,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,e=s.globals.previousPaths[r].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[r].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[r].paths[1]&&(e=s.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e,i,a,s=t.i,r=t.realIndex,n=t.series,o=t.prevY,l=t.lineYPosition,h=t.translationsIndex,c=this.w,d=c.config.chart.stacked&&!c.globals.comboCharts||c.config.chart.stacked&&c.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[r])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[r])||void 0===i?void 0:i.type));if(void 0!==(null===(a=n[s])||void 0===a?void 0:a[0]))o=(l=d&&s>0?this.lineCtx.prevSeriesY[s-1][0]:this.lineCtx.zeroY)-n[s][0]/this.lineCtx.yRatio[h]+2*(this.lineCtx.isReversed?n[s][0]/this.lineCtx.yRatio[h]:0);else if(d&&s>0&&void 0===n[s][0])for(var u=s-1;u>=0;u--)if(null!==n[u][0]&&void 0!==n[u][0]){o=l=this.lineCtx.prevSeriesY[u][0];break}return{prevY:o,lineYPosition:l}}}]),t}(),Da=function(t){for(var e,i,a,s,r=function(t){for(var e=[],i=t[0],a=t[1],s=e[0]=Wa(i,a),r=1,n=t.length-1;r9&&(s=3*a/Math.sqrt(s),r[l]=s*e,r[l+1]=s*i);for(var h=0;h<=n;h++)s=(t[Math.min(n,h+1)][0]-t[Math.max(0,h-1)][0])/(6*(1+r[h]*r[h])),o.push([s||0,r[h]*s||0]);return o},_a=function(t){var e=Da(t),i=t[1],a=t[0],s=[],r=e[1],n=e[0];s.push(a,[a[0]+n[0],a[1]+n[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(var o=2,l=e.length;o1&&a[1].length<6){var s=a[0].length;a[1]=[2*a[0][s-2]-a[0][s-4],2*a[0][s-1]-a[0][s-3]].concat(a[1])}a[0]=a[0].slice(-2)}return a};function Wa(t,e){return(e[1]-t[1])/(e[0]-t[0])}var Ba=function(){function t(e,a,s){i(this,t),this.ctx=e,this.w=e.w,this.xyRatios=a,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||s,this.scatter=new Ui(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Fa(this),this.markers=new Vi(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return s(t,[{key:"draw",value:function(t,e,i,a){var s,r=this.w,n=new Mi(this.ctx),o=r.globals.comboCharts?e:r.config.chart.type,l=n.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),h=new Pi(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=h.getLogSeries(t),this.yRatio=h.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var c=[],d=0;d1?g:0;this._initSerieVariables(t,d,g);var f=[],x=[],b=[],m=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,g),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(m=(r.globals.seriesX[g][0]-r.globals.minX)/this.xRatio),b.push(m);var v,y=m,w=void 0,k=y,A=this.zeroY,C=this.zeroY;A=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:t,prevY:A,lineYPosition:0,translationsIndex:p}).prevY,"monotoneCubic"===r.config.stroke.curve&&null===t[d][0]?f.push(null):f.push(A),v=A;"rangeArea"===o&&(w=C=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:a,prevY:C,lineYPosition:0,translationsIndex:p}).prevY,x.push(null!==f[0]?C:null));var S=this._calculatePathsFrom({type:o,series:t,i:d,realIndex:g,translationsIndex:p,prevX:k,prevY:A,prevY2:C}),L=[f[0]],M=[x[0]],P={type:o,series:t,realIndex:g,translationsIndex:p,i:d,x:m,y:1,pX:y,pY:v,pathsFrom:S,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:b,yArrj:f,y2Arrj:x,seriesRangeEnd:a},I=this._iterateOverDataPoints(u(u({},P),{},{iterations:"rangeArea"===o?t[d].length-1:void 0,isRangeStart:!0}));if("rangeArea"===o){for(var T=this._calculatePathsFrom({series:a,i:d,realIndex:g,prevX:k,prevY:C}),z=this._iterateOverDataPoints(u(u({},P),{},{series:a,xArrj:[m],yArrj:L,y2Arrj:M,pY:w,areaPaths:I.areaPaths,pathsFrom:T,iterations:a[d].length-1,isRangeStart:!1})),X=I.linePaths.length/2,R=0;R=0;Y--)l.add(c[Y]);else for(var E=0;E1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[r]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",zIndex:void 0!==a.config.series[i].zIndex?a.config.series[i].zIndex:i,seriesName:v.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i});var n=t[e].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,a,s,r=t.type,n=t.series,o=t.i,l=t.realIndex,h=t.translationsIndex,c=t.prevX,d=t.prevY,u=t.prevY2,g=this.w,p=new Mi(this.ctx);if(null===n[o][0]){for(var f=0;f0){var x=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:l});a=x.pathFromLine,s=x.pathFromArea}return{prevX:c,prevY:d,linePath:e,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(t){var e=t.type,i=t.realIndex,a=t.i,s=t.paths,r=this.w,n=new Mi(this.ctx),o=new ji(this.ctx);this.prevSeriesY.push(s.yArrj),r.globals.seriesXvalues[i]=s.xArrj,r.globals.seriesYvalues[i]=s.yArrj;var l=r.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var h=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-l.count-1],c=n.drawRect(h,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(c.node);var d=n.drawRect(0,0,h,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(d.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var g={i:a,realIndex:i,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var p=o.fillPath({seriesNumber:i}),f=0;f0&&"rangeArea"!==e){var A=n.renderPaths(w);A.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&A.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(A),A.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),k.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,i,a=this,s=t.type,r=t.series,n=t.iterations,o=t.realIndex,l=t.translationsIndex,h=t.i,c=t.x,d=t.y,u=t.pX,g=t.pY,p=t.pathsFrom,f=t.linePaths,x=t.areaPaths,b=t.seriesIndex,m=t.lineYPosition,y=t.xArrj,w=t.yArrj,k=t.y2Arrj,A=t.isRangeStart,C=t.seriesRangeEnd,S=this.w,L=new Mi(this.ctx),M=this.yRatio,P=p.prevY,I=p.linePath,T=p.areaPath,z=p.pathFromLine,X=p.pathFromArea,R=v.isNumber(S.globals.minYArr[o])?S.globals.minYArr[o]:S.globals.minY;n||(n=S.globals.dataPoints>1?S.globals.dataPoints-1:S.globals.dataPoints);var Y=function(t,e){return e-t/M[l]+2*(a.isReversed?t/M[l]:0)},E=d,H=S.config.chart.stacked&&!S.globals.comboCharts||S.config.chart.stacked&&S.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[o])||void 0===i?void 0:i.type)),O=S.config.stroke.curve;Array.isArray(O)&&(O=Array.isArray(b)?O[b[h]]:O[h]);for(var F,D=0,_=0;_0&&S.globals.collapsedSeries.length0;e--){if(!(S.globals.collapsedSeriesIndices.indexOf((null==b?void 0:b[e])||e)>-1))return e;e--}return 0}(h-1)][_+1]}else m=this.zeroY;else m=this.zeroY;N?d=Y(R,m):(d=Y(r[h][_+1],m),"rangeArea"===s&&(E=Y(C[h][_+1],m))),y.push(c),!N||"smooth"!==S.config.stroke.curve&&"monotoneCubic"!==S.config.stroke.curve?(w.push(d),k.push(E)):(w.push(null),k.push(null));var B=this.lineHelpers.calculatePoints({series:r,x:c,y:d,realIndex:o,i:h,j:_,prevY:P}),G=this._createPaths({type:s,series:r,i:h,realIndex:o,j:_,x:c,y:d,y2:E,xArrj:y,yArrj:w,y2Arrj:k,pX:u,pY:g,pathState:D,segmentStartX:F,linePath:I,areaPath:T,linePaths:f,areaPaths:x,curve:O,isRangeStart:A});x=G.areaPaths,f=G.linePaths,u=G.pX,g=G.pY,D=G.pathState,F=G.segmentStartX,T=G.areaPath,I=G.linePath,!this.appendPathFrom||S.globals.hasNullValues||"monotoneCubic"===O&&"rangeArea"===s||(z+=L.line(c,this.areaBottomY),X+=L.line(c,this.areaBottomY)),this.handleNullDataPoints(r,B,h,_,o),this._handleMarkersAndLabels({type:s,pointsPos:B,i:h,j:_,realIndex:o,isRangeStart:A})}return{yArrj:w,xArrj:y,pathFromArea:X,areaPaths:x,pathFromLine:z,linePaths:f,linePath:I,areaPath:T}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,i=t.pointsPos,a=t.isRangeStart,s=t.i,r=t.j,n=t.realIndex,o=this.w,l=new qi(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var h=this.markers.plotChartMarkers(i,n,r+1);null!==h&&this.elPointsMain.add(h)}var c=l.drawDataLabel({type:e,isRangeStart:a,pos:i,i:n,j:r+1});null!==c&&this.elDataLabelsWrap.add(c)}},{key:"_createPaths",value:function(t){var e=t.type,i=t.series,a=t.i;t.realIndex;var s,r=t.j,n=t.x,o=t.y,l=t.xArrj,h=t.yArrj,c=t.y2,d=t.y2Arrj,u=t.pX,g=t.pY,p=t.pathState,f=t.segmentStartX,x=t.linePath,b=t.areaPath,m=t.linePaths,v=t.areaPaths,y=t.curve,w=t.isRangeStart,k=new Mi(this.ctx),A=this.areaBottomY,C="rangeArea"===e,S="rangeArea"===e&&w;switch(y){case"monotoneCubic":var L=w?h:d;switch(p){case 0:if(null===L[r+1])break;p=1;case 1:if(!(C?l.length===i[a].length:r===i[a].length-2))break;case 2:var M=w?l:l.slice().reverse(),P=w?L:L.slice().reverse(),I=(s=P,M.map((function(t,e){return[t,s[e]]})).filter((function(t){return null!==t[1]}))),T=I.length>1?_a(I):I,z=[];C&&(S?v=I:z=v.reverse());var X=0,R=0;if(function(t,e){for(var i=function(t){var e=[],i=0;return t.forEach((function(t){null!==t?i++:i>0&&(e.push(i),i=0)})),i>0&&e.push(i),e}(t),a=[],s=0,r=0;s4?(e+="C".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]),e+=", ".concat(a[4],", ").concat(a[5])):s>2&&(e+="S".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]))}return e}(t),i=R,a=(R+=t.length)-1;S?x=k.move(I[i][0],I[i][1])+e:C?x=k.move(z[i][0],z[i][1])+k.line(I[i][0],I[i][1])+e+k.line(z[a][0],z[a][1]):(x=k.move(I[i][0],I[i][1])+e,b=x+k.line(I[a][0],A)+k.line(I[i][0],A)+"z",v.push(b)),m.push(x)})),C&&X>1&&!S){var Y=m.slice(X).reverse();m.splice(X),Y.forEach((function(t){return m.push(t)}))}p=0}break;case"smooth":var E=.35*(n-u);if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.curve(n,o,n,o,n,c)+k.move(n,c)),b+=k.curve(n,o,n,o,n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o;break;default:var F=function(t,e,i){var a=[];switch(t){case"stepline":a=k.line(e,null,"H")+k.line(null,i,"V");break;case"linestep":a=k.line(null,i,"V")+k.line(e,null,"H");break;case"straight":a=k.line(e,i)}return a};if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.line(n,c)),b+=k.line(n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o}return{linePaths:m,areaPaths:v,pX:u,pY:g,pathState:p,segmentStartX:f,linePath:x,areaPath:b}}},{key:"handleNullDataPoints",value:function(t,e,i,a,s){var r=this.w;if(null===t[i][a]&&r.config.markers.showNullDataPoints||1===t[i].length){var n=this.strokeWidth-r.config.markers.strokeWidth/2;n>0||(n=0);var o=this.markers.plotChartMarkers(e,s,a+1,n,!0);null!==o&&this.elPointsMain.add(o)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,a,s){this.xoffset=e,this.yoffset=i,this.height=s,this.width=a,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],a=this.xoffset,s=this.yoffset,n=r(t)/this.height,o=r(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var a=e/this.height,s=this.width-a;i=new t(this.xoffset+a,this.yoffset,s,this.height)}else{var r=e/this.width,n=this.height-r;i=new t(this.xoffset,this.yoffset+r,this.width,n)}return i}}function e(e,a,s,n,o){n=void 0===n?0:n,o=void 0===o?0:o;var l=i(function(t,e){var i,a=[],s=e/r(t);for(i=0;i=n}(e,l=t[0],o)?(e.push(l),i(t.slice(1),e,s,n)):(h=s.cutArea(r(e),n),n.push(s.getCoordinates(e)),i(t,[],h,n)),n;n.push(s.getCoordinates(e))}function a(t,e){var i=Math.min.apply(Math,t),a=Math.max.apply(Math,t),s=r(t);return Math.max(Math.pow(e,2)*a/Math.pow(s,2),Math.pow(s,2)/(Math.pow(e,2)*i))}function s(t){return t&&t.constructor===Array}function r(t){var e,i=0;for(e=0;er-a&&l.width<=n-s){var h=o.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(h.x," ").concat(h.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,i,a,s,r){var n=new Mi(this.ctx),o=n.getTextRects(t,e).width+this.w.config.stroke.width+5>s-i&&r-a>s-i?r-a:s-i,l=n.getTextBasedOnMaxWidth({text:t,maxWidth:o,fontSize:e});return t.length!==l.length&&o/e<5?"":l}},{key:"animateTreemap",value:function(t,e,i,a){var s=new y(this.ctx);s.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,(function(){s.animationCompleted(t)}))}}]),t}(),ja=86400,Va=10/ja,Ua=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return s(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new zi(this.ctx),r=(e-t)/864e5;this.determineInterval(r),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,r5e4&&(a.globals.disableZoomOut=!0);var n=s.getTimeUnitsfromTimestamp(t,e,this.utc),o=a.globals.gridWidth/r,l=o/24,h=l/60,c=h/60,d=Math.floor(24*r),g=Math.floor(1440*r),p=Math.floor(r*ja),f=Math.floor(r),x=Math.floor(r/30),b=Math.floor(r/365),m={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},v={firstVal:m,currentMillisecond:m.minMillisecond,currentSecond:m.minSecond,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:l,minutesWidthOnXAxis:h,secondsWidthOnXAxis:c,numberOfSeconds:p,numberOfMinutes:g,numberOfHours:d,numberOfDays:f,numberOfMonths:x,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var y=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?u(u({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?u(u({},e),{},{value:t.value}):"minute"===t.unit?u(u({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?u(u({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return y.filter((function(t){var e=1,s=Math.ceil(a.globals.gridWidth/120),r=t.value;void 0!==a.config.xaxis.tickAmount&&(s=a.config.xaxis.tickAmount),y.length>s&&(e=Math.floor(y.length/s));var n=!1,o=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(n=!0);break;case"half_year":e=7,"year"===t.unit&&(n=!0);break;case"months":e=1,"year"===t.unit&&(n=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(n=!0),30===r&&(o=!0);break;case"months_days":e=10,"month"===t.unit&&(n=!0),30===r&&(o=!0);break;case"week_days":e=8,"month"===t.unit&&(n=!0);break;case"days":e=1,"month"===t.unit&&(n=!0);break;case"hours":"day"===t.unit&&(n=!0);break;case"minutes_fives":case"seconds_fives":r%5!=0&&(o=!0);break;case"seconds_tens":r%10!=0&&(o=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!o)return!0}else if((r%e==0||n)&&!o)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,a=this.formatDates(t),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new pa(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.daysWidthOnXAxis,r=t.numberOfYears,n=e.minYear,o=0,l=new zi(this.ctx),h="year";if(e.minDate>1||e.minMonth>0){var c=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(l.determineDaysOfYear(e.minYear)-c+1)*s,n=e.minYear+1,this.timeScaleArray.push({position:o,value:n,unit:h,year:n,month:v.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:o,value:n,unit:h,year:a,month:v.monthMod(i+1)});for(var d=n,u=o,g=0;g1){l=(h.determineDaysOfMonths(a+1,e.minYear)-i+1)*r,o=v.monthMod(a+1);var u=s+d,g=v.monthMod(o),p=o;0===o&&(c="year",p=u,g=1,u+=d+=1),this.timeScaleArray.push({position:l,value:p,unit:c,year:u,month:g})}else this.timeScaleArray.push({position:l,value:o,unit:c,year:s,month:v.monthMod(a)});for(var f=o+1,x=l,b=0,m=1;bn.determineDaysOfMonths(e+1,i)?(h=1,o="month",u=e+=1,e):e},d=(24-e.minHour)*s,u=l,g=c(h,i,a);0===e.minHour&&1===e.minDate?(d=0,u=v.monthMod(e.minMonth),o="month",h=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(d=0,l=e.minDate,u=l,g=c(h=l,i,a)),this.timeScaleArray.push({position:d,value:u,unit:o,year:this._getYear(a,g,0),month:v.monthMod(g),day:h});for(var p=d,f=0;fo.determineDaysOfMonths(e+1,s)&&(f=1,e+=1),{month:e,date:f}},c=function(t,e){return t>o.determineDaysOfMonths(e+1,s)?e+=1:e},d=60-(e.minMinute+e.minSecond/60),u=d*r,g=e.minHour+1,p=g;60===d&&(u=0,p=g=e.minHour);var f=i;p>=24&&(p=0,l="day",g=f+=1);var x=h(f,a).month;x=c(f,x),this.timeScaleArray.push({position:u,value:g,unit:l,day:f,hour:p,year:s,month:v.monthMod(x)}),p++;for(var b=u,m=0;m=24)p=0,l="day",x=h(f+=1,x).month,x=c(f,x);var y=this._getYear(s,x,0);b=60*r+b;var w=0===p?f:p;this.timeScaleArray.push({position:b,value:w,unit:l,hour:p,day:f,year:y,month:v.monthMod(x)}),p++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.minutesWidthOnXAxis,h=t.secondsWidthOnXAxis,c=t.numberOfMinutes,d=a+1,u=r,g=n,p=o,f=s,x=(60-i-e/1e3)*h,b=0;b=60&&(d=0,24===(f+=1)&&(f=0)),this.timeScaleArray.push({position:x,value:d,unit:"minute",hour:f,minute:d,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,d++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.secondsWidthOnXAxis,h=t.numberOfSeconds,c=i+1,d=a,u=r,g=n,p=o,f=s,x=(1e3-e)/1e3*l,b=0;b=60&&(c=0,++d>=60&&(d=0,24===++f&&(f=0))),this.timeScaleArray.push({position:x,value:c,unit:"second",hour:f,minute:d,second:c,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,c++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var a=t.value.toString(),s=new zi(e.ctx),r=e.createRawDateString(t,a),n=s.getDate(s.parseDate(r));if(e.utc||(n=s.getDate(s.parseDateWithTimezone(r))),void 0===i.config.xaxis.labels.format){var o="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(o=l.year),"month"===t.unit&&(o=l.month),"day"===t.unit&&(o=l.day),"hour"===t.unit&&(o=l.hour),"minute"===t.unit&&(o=l.minute),"second"===t.unit&&(o=l.second),a=s.formatDate(n,o)}else a=s.formatDate(n,i.config.xaxis.labels.format);return{dateString:r,position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,a=new Mi(this.ctx),s=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(s=!0,e=a.getTextRects(t[0].value).width);var r=0,n=t.map((function(n,o){if(o>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=s?e:a.getTextRects(t[r].value).width,h=t[r].position;return n.position>h+l+10?(r=o,n):null}return n}));return n=n.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),qa=function(){function t(e,a){i(this,t),this.ctx=a,this.w=a.w,this.el=e}return s(t,[{key:"setupElements",value:function(){var t=this.w,e=t.globals,i=t.config,a=i.chart.type;e.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(a),e.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(a),e.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(a)&&i.plotOptions.bar.horizontal,e.chartClass=".apexcharts".concat(e.chartID),e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),Mi.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas ".concat(e.chartClass.substring(1))}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=window.SVG().addTo(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(i.chart.offsetX,", ").concat(i.chart.offsetY,")")}),e.dom.Paper.node.style.background="dark"!==i.theme.mode||i.chart.background?"light"!==i.theme.mode||i.chart.background?i.chart.background:"#fff":"#424242",this.setSVGDimensions(),e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject"),Mi.setAttrs(e.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap),e.dom.Paper.node.appendChild(e.dom.elLegendForeign),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,a=this.ctx,s=i.config,r=i.globals,n={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},o=s.chart.type||"line",l=null,h=0;r.series.forEach((function(e,a){var s=t[a].type||o;n[s]?("rangeArea"===s?(n[s].series.push(r.seriesRangeStart[a]),n[s].seriesRangeEnd.push(r.seriesRangeEnd[a])):n[s].series.push(e),n[s].i.push(a),"column"!==s&&"bar"!==s||(i.globals.columnSeries=n.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(s)?l=s:"bar"===s?(n.column.series.push(e),n.column.i.push(a)):console.warn("You have specified an unrecognized series type (".concat(s,").")),o!==s&&"scatter"!==s&&h++})),h>0&&(l&&console.warn("Chart or series type ".concat(l," cannot appear with other chart or series types.")),n.column.series.length>0&&s.plotOptions.bar.horizontal&&(h-=n.column.series.length,n.column={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||(r.comboCharts=h>0);var c=new Ba(a,e),d=new Ta(a,e);a.pie=new Ya(a);var u=new Ha(a);a.rangeBar=new Oa(a,e);var g=new Ea(a),p=[];if(r.comboCharts){var x,b,m=new Pi(a);if(n.area.series.length>0)(x=p).push.apply(x,f(m.drawSeriesByGroup(n.area,r.areaGroups,"area",c)));if(n.column.series.length>0)if(s.chart.stacked){var v=new Ia(a,e);p.push(v.draw(n.column.series,n.column.i))}else a.bar=new Pa(a,e),p.push(a.bar.draw(n.column.series,n.column.i));if(n.rangeArea.series.length>0&&p.push(c.draw(n.rangeArea.series,"rangeArea",n.rangeArea.i,n.rangeArea.seriesRangeEnd)),n.line.series.length>0)(b=p).push.apply(b,f(m.drawSeriesByGroup(n.line,r.lineGroups,"line",c)));if(n.candlestick.series.length>0&&p.push(d.draw(n.candlestick.series,"candlestick",n.candlestick.i)),n.boxPlot.series.length>0&&p.push(d.draw(n.boxPlot.series,"boxPlot",n.boxPlot.i)),n.rangeBar.series.length>0&&p.push(a.rangeBar.draw(n.rangeBar.series,n.rangeBar.i)),n.scatter.series.length>0){var y=new Ba(a,e,!0);p.push(y.draw(n.scatter.series,"scatter",n.scatter.i))}if(n.bubble.series.length>0){var w=new Ba(a,e,!0);p.push(w.draw(n.bubble.series,"bubble",n.bubble.i))}}else switch(s.chart.type){case"line":p=c.draw(r.series,"line");break;case"area":p=c.draw(r.series,"area");break;case"bar":if(s.chart.stacked)p=new Ia(a,e).draw(r.series);else a.bar=new Pa(a,e),p=a.bar.draw(r.series);break;case"candlestick":p=new Ta(a,e).draw(r.series,"candlestick");break;case"boxPlot":p=new Ta(a,e).draw(r.series,s.chart.type);break;case"rangeBar":p=a.rangeBar.draw(r.series);break;case"rangeArea":p=c.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":p=new Xa(a,e).draw(r.series);break;case"treemap":p=new Ga(a,e).draw(r.series);break;case"pie":case"donut":case"polarArea":p=a.pie.draw(r.series);break;case"radialBar":p=u.draw(r.series);break;case"radar":p=g.draw(r.series);break;default:p=c.draw(r.series)}return p}},{key:"setSVGDimensions",value:function(){var t=this.w,e=t.globals,i=t.config;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto",e.svgWidth=i.chart.width,e.svgHeight=i.chart.height;var a=v.getDimensions(this.el),s=i.chart.width.toString().split(/[0-9]+/g).pop();"%"===s?v.isNumber(a[0])&&(0===a[0].width&&(a=v.getDimensions(this.el.parentNode)),e.svgWidth=a[0]*parseInt(i.chart.width,10)/100):"px"!==s&&""!==s||(e.svgWidth=parseInt(i.chart.width,10));var r=String(i.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===r){var n=v.getDimensions(this.el.parentNode);e.svgHeight=n[1]*parseInt(i.chart.height,10)/100}else e.svgHeight=parseInt(i.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Mi.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==r){var o=i.chart.sparkline.enabled?0:e.axisCharts?i.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(e.svgHeight+o,"px")}e.dom.elWrap.style.width="".concat(e.svgWidth,"px"),e.dom.elWrap.style.height="".concat(e.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i=t.translateX;Mi.setAttrs(t.dom.elGraphical.node,{transform:"translate(".concat(i,", ").concat(e,")")})}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,a=t.config.chart.sparkline.enabled?1:15;a+=t.config.grid.padding.bottom,["top","bottom"].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(i=new xa(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var s=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*t.globals.radialSize;if(s&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var n=v.getBoundingClientRect(s);r=n.bottom;var o=n.bottom-n.top;r=Math.max(2.05*t.globals.radialSize,o)}var l=Math.ceil(r+e.translateY+i+a);e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).includes("%")||(e.dom.elWrap.style.height="".concat(l,"px"),Mi.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(l,"px"))}},{key:"coreCalculations",value:function(){new ea(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(){return[]}))},i=new Bi,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=e(),a.seriesYvalues=e()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var t=this.w,e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new na(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new na(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Ua(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new Pi(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var i=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];i.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){return t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){return t.updateSourceChart(i)})})),e.config.chart.events.selection=function(t,e){i.forEach((function(t){ApexCharts.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:e.xaxis.min,max:e.xaxis.max}},!1,!1,!1,!1)}))}}}}]),t}(),Za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"_updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(n){var o=[e.ctx];s&&(o=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(o=[e.ctx],e.ctx.w.globals.isExecCalled=!1),o.forEach((function(s,l){var h=s.w;if(h.globals.shouldAnimate=a,i||(h.globals.resized=!0,h.globals.dataChanged=!0,a&&s.series.getPreviousPaths()),t&&"object"===b(t)&&(s.config=new Wi(t),t=Pi.extendArrayProps(s.config,t,h),s.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,h.config=v.extend(h.config,t),r&&(h.globals.lastXAxis=t.xaxis?v.clone(t.xaxis):[],h.globals.lastYAxis=t.yaxis?v.clone(t.yaxis):[],h.globals.initialConfig=v.extend({},h.config),h.globals.initialSeries=v.clone(h.config.series),t.series))){for(var c=0;c2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(s){var r,n=i.w;return n.globals.shouldAnimate=e,n.globals.dataChanged=!0,e&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?(0===(r=t.map((function(t,e){return i._extendSeries(t,e)}))).length&&(r=[{data:[]}]),n.config.series=r):n.config.series=t.slice(),a&&(n.globals.initialConfig.series=v.clone(n.config.series),n.globals.initialSeries=v.clone(n.config.series)),i.ctx.update().then((function(){s(i.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var i=this.w,a=i.config.series[e];return u(u({},i.config.series[e]),{},{name:t.name?t.name:null==a?void 0:a.name,color:t.color?t.color:null==a?void 0:a.color,type:t.type?t.type:null==a?void 0:a.type,group:t.group?t.group:null==a?void 0:a.group,hidden:void 0!==t.hidden?t.hidden:null==a?void 0:a.hidden,data:t.data?t.data:null==a?void 0:a.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(e,"'], ").concat(s," circle[j='").concat(e,"'], ").concat(s," rect[j='").concat(e,"']")):void 0===e&&(a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(t,"']")),"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),a?(new Mi(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new Ni(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;t&&t.xaxis&&(a=t.xaxis),t&&t.yaxis&&(s=t.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;var r=function(t){void 0!==s[t]&&(i.config.yaxis[t].min=s[t].min,i.config.yaxis[t].max=s[t].max)};i.config.yaxis.map((function(t,a){i.globals.zoomed||void 0!==s[a]?r(a):void 0!==e.ctx.opts.yaxis[a]&&(t.min=e.ctx.opts.yaxis[a].min,t.max=e.ctx.opts.yaxis[a].max)}))}}]),t}();!function(){function t(){for(var t=arguments.length>0&&arguments[0]!==h?arguments[0]:[],s=arguments.length>1?arguments[1]:h,r=arguments.length>2?arguments[2]:h,n=arguments.length>3?arguments[3]:h,o=arguments.length>4?arguments[4]:h,l=arguments.length>5?arguments[5]:h,h=arguments.length>6?arguments[6]:h,c=t.slice(s,r||h),d=n.slice(o,l||h),u=0,g={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};;){if(c[u]=e.call(g,c[u]),d[u]=e.call(p,d[u]),c[u][0]!=d[u][0]||"M"==c[u][0]||"A"==c[u][0]&&(c[u][4]!=d[u][4]||c[u][5]!=d[u][5])?(Array.prototype.splice.apply(c,[u,1].concat(a.call(g,c[u]))),Array.prototype.splice.apply(d,[u,1].concat(a.call(p,d[u])))):(c[u]=i.call(g,c[u]),d[u]=i.call(p,d[u])),++u==c.length&&u==d.length)break;u==c.length&&c.push(["C",g.pos[0],g.pos[1],g.pos[0],g.pos[1],g.pos[0],g.pos[1]]),u==d.length&&d.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]])}return{start:c,dest:d}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function i(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function a(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var i,a,s,r,n,o,l,h,c,d,u,g,p,f,x,b,m,v,y,w,k,A,C,S,L,M,P=Math.abs(e[1]),I=Math.abs(e[2]),T=e[3]%360,z=e[4],X=e[5],R=e[6],Y=e[7],E=new bt(t),H=new bt(R,Y),O=[];if(0===P||0===I||E.x===H.x&&E.y===H.y)return[["C",E.x,E.y,H.x,H.y,H.x,H.y]];i=new bt((E.x-H.x)/2,(E.y-H.y)/2).transform((new vt).rotate(T)),a=i.x*i.x/(P*P)+i.y*i.y/(I*I),a>1&&(P*=a=Math.sqrt(a),I*=a);s=(new vt).rotate(T).scale(1/P,1/I).rotate(-T),E=E.transform(s),H=H.transform(s),r=[H.x-E.x,H.y-E.y],o=r[0]*r[0]+r[1]*r[1],n=Math.sqrt(o),r[0]/=n,r[1]/=n,l=o<4?Math.sqrt(1-o/4):0,z===X&&(l*=-1);h=new bt((H.x+E.x)/2+l*-r[1],(H.y+E.y)/2+l*r[0]),c=new bt(E.x-h.x,E.y-h.y),d=new bt(H.x-h.x,H.y-h.y),u=Math.acos(c.x/Math.sqrt(c.x*c.x+c.y*c.y)),c.y<0&&(u*=-1);g=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(g*=-1);X&&u>g&&(g+=2*Math.PI);!X&&u0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(!1===e)return!1;for(var i=e,a=t.length;i(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class Ja{constructor(t){t.remember("_draggable",this),this.el=t,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(t){t?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(t){const e=!t.type.indexOf("mouse");if(e&&1!==t.which&&0!==t.buttons)return;if(this.el.dispatch("beforedrag",{event:t,handler:this}).defaultPrevented)return;t.preventDefault(),t.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point($a(t));const i=(e?"mouseup":"touchend")+".drag";zt(window,(e?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),zt(window,i,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:t,handler:this,box:this.box})}drag(t){const{box:e,lastClick:i}=this,a=this.el.point($a(t)),s=a.x-i.x,r=a.y-i.y;if(!s&&!r)return e;const n=e.x+s,o=e.y+r;this.box=new kt(n,o,e.w,e.h),this.lastClick=a,this.el.dispatch("dragmove",{event:t,handler:this,box:this.box}).defaultPrevented||this.move(n,o)}move(t,e){"svg"===this.el.type?gi.prototype.move.call(this.el,t,e):this.el.move(t,e)}endDrag(t){this.drag(t),this.el.fire("dragend",{event:t,handler:this,box:this.box}),Xt(window,"mousemove.drag"),Xt(window,"touchmove.drag"),Xt(window,"mouseup.drag"),Xt(window,"touchend.drag"),this.init(!0)}} /*! * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse * @version 4.0.1 @@ -17,13 +17,13 @@ function Qa(t,e,i,a=null){return function(s){s.preventDefault(),s.stopPropagation();var r=s.pageX||s.touches[0].pageX,n=s.pageY||s.touches[0].pageY;e.fire(t,{x:r,y:n,event:s,index:a,points:i})}}function Ka([t,e],{a:i,b:a,c:s,d:r,e:n,f:o}){return[t*i+e*s+n,t*a+e*r+o]}Q(Gt,{draggable(t=!0){return(this.remember("_draggable")||new Ja(this)).init(t),this}});let ts=class{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",Qa(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",Qa("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>Ka(t,e))),this.rotationPoint=Ka(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}};const es=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ts?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this}; /*! * @svgdotjs/svg.resize.js - An extension for svg.js which allows to resize elements which are selected - * @version 2.0.4 + * @version 2.0.2 * https://github.com/svgdotjs/svg.resize.js * * @copyright [object Object] * @license MIT * - * BUILT: Fri Sep 13 2024 12:43:14 GMT+0200 (Central European Summer Time) + * BUILT: Mon Jul 01 2024 15:05:58 GMT+0200 (Central European Summer Time) */ /*! * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse @@ -35,4 +35,4 @@ function Qa(t,e,i,a=null){return function(s){s.preventDefault(),s.stopPropagatio * * BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time) */ -function is(t,e,i,a=null){return function(s){s.preventDefault(),s.stopPropagation();var r=s.pageX||s.touches[0].pageX,n=s.pageY||s.touches[0].pageY;e.fire(t,{x:r,y:n,event:s,index:a,points:i})}}function as([t,e],{a:i,b:a,c:s,d:r,e:n,f:o}){return[t*i+e*s+n,t*a+e*r+o]}Q(Gt,{select:es(ts)}),Q([Ge,je,xe],{pointSelect:es(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",Qa("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>Ka(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class ss{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",is(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",is("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>as(t,e))),this.rotationPoint=as(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const rs=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ss?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this};Q(Gt,{select:rs(ss)}),Q([Ge,je,xe],{pointSelect:rs(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",is("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>as(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const ns=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),os=t=>{let e=1/0,i=1/0,a=-1/0,s=-1/0;for(let r=0;r{const s=t-e[0],r=(a-e[1])*i;return[s*i+e[0],r+e[1]]}));return os(a)}(this.box,s,r)}this.el.dispatch("resize",{box:new kt(l),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.size(l.width,l.height).move(l.x,l.y)}movePoint(t){this.lastEvent=t;const{x:e,y:i}=this.snapToGrid(this.el.point(ns(t))),a=this.el.array().slice();a[this.index]=[e,i],this.el.dispatch("resize",{box:os(a),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.plot(a)}rotate(t){this.lastEvent=t;const e=this.startPoint,i=this.el.point(ns(t)),{cx:a,cy:s}=this.box,r=e.x-a,n=e.y-s,o=i.x-a,l=i.y-s,h=Math.sqrt(r*r+n*n)*Math.sqrt(o*o+l*l);if(0===h)return;let c=Math.acos((r*o+n*l)/h)/Math.PI*180;if(!c)return;i.xdiv {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}';var h=(null===(l=t.opts.chart)||void 0===l?void 0:l.nonce)||t.w.config.chart.nonce;h&&o.setAttribute("nonce",h),r?s.prepend(o):n.head.appendChild(o)}var c=t.create(t.w.config.series,{});if(!c)return e(t);t.mount(c).then((function(){"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(c)})).catch((function(t){i(t)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var i=this,a=this.w;new hs(this).initModules();var s=this.w.globals;if(s.noData=!1,s.animationEnded=!1,!v.elementExists(this.el))return s.animationEnded=!0,this.destroy(),null;(this.responsive.checkResponsiveConfig(e),a.config.xaxis.convertedCatToNumeric)&&new Ni(a.config).convertCatToNumericXaxis(a.config,this.ctx);if(this.core.setupElements(),"treemap"===a.config.chart.type&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),0===s.svgWidth)return s.animationEnded=!0,null;var r=t;t.forEach((function(t,e){t.hidden&&(r=i.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}))}));var n=Pi.checkComboSeries(r,a.config.chart.type);s.comboCharts=n.comboCharts,s.comboBarCount=n.comboBarCount;var o=r.every((function(t){return t.data&&0===t.data.length}));(0===r.length||o&&s.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(r),this.theme.init(),new Vi(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),s.noData&&s.collapsedSeries.length!==s.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),s.axisCharts&&(this.core.coreCalculations(),"category"!==a.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new Pi(this).getLargestMarkerSize(),this.dimensions.plotCoords();var l=this.core.xySettings();this.grid.createGridMask();var h=this.core.plotChartType(r,l),c=new qi(this);return c.bringForward(),a.config.dataLabels.background.enabled&&c.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:h,xyRatios:l,dimensions:{plot:{left:a.globals.translateX,top:a.globals.translateY,width:a.globals.gridWidth,height:a.globals.gridHeight}}}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise((function(s,r){if(null===i.el)return r(new Error("Not enough data to display or target element not found"));(null===e||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new Ki(i);var n,o,l=i.grid.drawGrid();(i.annotations=new Fi(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position)&&(l&&a.globals.dom.elGraphical.add(l.el),null!=l&&null!==(n=l.elGridBorders)&&void 0!==n&&n.node&&a.globals.dom.elGraphical.add(l.elGridBorders));if(Array.isArray(e.elGraph))for(var h=0;h0&&a.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),s(i)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,e){var i=ds.get(e);i&&(i.disconnect(),ds.delete(e))}(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,i){e.id===v.escapeString(t)&&Apex._chartInstances.splice(i,1)})),new cs(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w;return n.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,i){return e.updateHelpers._extendSeries(t,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,a,s,r)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,e,i)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(t,e,a)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(t,e,a)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(t,e,a)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;e&&(i=e),i.annotations.removeAnnotation(i,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Ji(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ji(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var e=v.escapeString(t);if(Apex._chartInstances){var i=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i2?s-2:0),n=2;n{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",Qa("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>Ka(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class ss{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",is(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",is("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>as(t,e))),this.rotationPoint=as(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const rs=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ss?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this};Q(Gt,{select:rs(ss)}),Q([Ge,je,xe],{pointSelect:rs(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",is("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>as(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const ns=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),os=t=>{let e=1/0,i=1/0,a=-1/0,s=-1/0;for(let r=0;r{const s=t-e[0],r=(a-e[1])*i;return[s*i+e[0],r+e[1]]}));return os(a)}(this.box,s,r)}this.el.dispatch("resize",{box:new kt(l),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.move(l.x,l.y).size(l.width,l.height)}movePoint(t){this.lastEvent=t;const{x:e,y:i}=this.snapToGrid(this.el.point(ns(t))),a=this.el.array().slice();a[this.index]=[e,i],this.el.dispatch("resize",{box:os(a),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.plot(a)}rotate(t){this.lastEvent=t;const e=this.el.point(ns(t)),i=this.box.cx,a=this.box.cy,s=this.startPoint.x-i,r=this.startPoint.y-a,n=e.x-i,o=e.y-a,l=Math.sqrt(s*s+r*r)*Math.sqrt(n*n+o*o);if(0===l)return;let h=Math.acos((s*n+r*o)/l)/Math.PI*180;e.xdiv {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}';var h=(null===(l=t.opts.chart)||void 0===l?void 0:l.nonce)||t.w.config.chart.nonce;h&&o.setAttribute("nonce",h),r?s.prepend(o):n.head.appendChild(o)}var c=t.create(t.w.config.series,{});if(!c)return e(t);t.mount(c).then((function(){"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(c)})).catch((function(t){i(t)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var i=this,a=this.w;new hs(this).initModules();var s=this.w.globals;if(s.noData=!1,s.animationEnded=!1,!v.elementExists(this.el))return s.animationEnded=!0,this.destroy(),null;(this.responsive.checkResponsiveConfig(e),a.config.xaxis.convertedCatToNumeric)&&new Ni(a.config).convertCatToNumericXaxis(a.config,this.ctx);if(this.core.setupElements(),"treemap"===a.config.chart.type&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),0===s.svgWidth)return s.animationEnded=!0,null;var r=t;t.forEach((function(t,e){t.hidden&&(r=i.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}))}));var n=Pi.checkComboSeries(r,a.config.chart.type);s.comboCharts=n.comboCharts,s.comboBarCount=n.comboBarCount;var o=r.every((function(t){return t.data&&0===t.data.length}));(0===r.length||o&&s.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(r),this.theme.init(),new Vi(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),s.noData&&s.collapsedSeries.length!==s.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),s.axisCharts&&(this.core.coreCalculations(),"category"!==a.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new Pi(this).getLargestMarkerSize(),this.dimensions.plotCoords();var l=this.core.xySettings();this.grid.createGridMask();var h=this.core.plotChartType(r,l),c=new qi(this);return c.bringForward(),a.config.dataLabels.background.enabled&&c.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:h,xyRatios:l,dimensions:{plot:{left:a.globals.translateX,top:a.globals.translateY,width:a.globals.gridWidth,height:a.globals.gridHeight}}}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise((function(s,r){if(null===i.el)return r(new Error("Not enough data to display or target element not found"));(null===e||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new Ki(i);var n,o,l=i.grid.drawGrid();(i.annotations=new Fi(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position)&&(l&&a.globals.dom.elGraphical.add(l.el),null!=l&&null!==(n=l.elGridBorders)&&void 0!==n&&n.node&&a.globals.dom.elGraphical.add(l.elGridBorders));if(Array.isArray(e.elGraph))for(var h=0;h0&&a.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),s(i)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,e){var i=ds.get(e);i&&(i.disconnect(),ds.delete(e))}(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,i){e.id===v.escapeString(t)&&Apex._chartInstances.splice(i,1)})),new cs(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w;return n.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,i){return e.updateHelpers._extendSeries(t,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,a,s,r)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,e,i)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(t,e,a)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(t,e,a)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(t,e,a)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;e&&(i=e),i.annotations.removeAnnotation(i,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Ji(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ji(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var e=v.escapeString(t);if(Apex._chartInstances){var i=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i2?s-2:0),n=2;n= 4.21.0": version "4.23.3" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz" integrity sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA== @@ -2301,15 +2318,16 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001646: resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001649.tgz" integrity sha512-fJegqZZ0ZX8HOWr6rcafGr72+xcgJKI9oWfDW5DrD7ExUtgZC7a7R7ZYmZqplh7XDocFdGeIFn7roAxhOeYrPQ== -chalk@3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== +chalk@^2.3.0: + version "2.4.2" + resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" -chalk@^2.3.0, chalk@^2.4.2: +chalk@^2.4.2: version "2.4.2" resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2318,7 +2336,23 @@ chalk@^2.3.0, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^4.1.0: + version "4.1.2" + resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +chalk@^4.1.2: version "4.1.2" resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -2326,12 +2360,20 @@ chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" +chalk@3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + char-regex@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== -chokidar@3.5.2: +chokidar@^3.3.0, chokidar@3.5.2: version "3.5.2" resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz" integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== @@ -2426,16 +2468,16 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - color-name@~1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + colord@^2.9.1: version "2.9.1" resolved "https://registry.npmjs.org/colord/-/colord-2.9.1.tgz" @@ -2458,7 +2500,12 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" -commander@^2.12.1, commander@^2.20.0: +commander@^2.12.1: + version "2.20.3" + resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +commander@^2.20.0: version "2.20.3" resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -2549,7 +2596,7 @@ create-jest@^29.7.0: cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.6" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" @@ -2707,13 +2754,6 @@ data-urls@^3.0.2: whatwg-mimetype "^3.0.0" whatwg-url "^11.0.0" -debug@4, debug@4.3.4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: - version "4.3.4" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - debug@^3.2.7: version "3.2.7" resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" @@ -2721,6 +2761,13 @@ debug@^3.2.7: dependencies: ms "^2.1.1" +debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@4, debug@4.3.4: + version "4.3.4" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + debug@^4.3.5: version "4.3.5" resolved "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz" @@ -2787,7 +2834,7 @@ detect-newline@^3.0.0: resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -devtools-protocol@0.0.1299070: +devtools-protocol@*, devtools-protocol@0.0.1299070: version "0.0.1299070" resolved "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1299070.tgz" integrity sha512-+qtL3eX50qsJ7c+qVyagqi7AWMoQCBGNfoyJZMwm/NSXVqLYbuitrWEEIzxfUmTNy7//Xe8yhMmQ+elj3uAqSg== @@ -2887,7 +2934,7 @@ end-of-stream@^1.1.0: enhanced-resolve@^5.17.1: version "5.17.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" + resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz" integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== dependencies: graceful-fs "^4.2.4" @@ -2962,7 +3009,7 @@ es-abstract@^1.19.0, es-abstract@^1.20.4: es-module-lexer@^1.2.1: version "1.5.4" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.4.tgz#a8efec3a3da991e60efa6b633a7cad6ab8d26b78" + resolved "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz" integrity sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw== es-set-tostringtag@^2.0.1: @@ -3091,14 +3138,6 @@ eslint-plugin-promise@4.2.1: resolved "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz" integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== -eslint-scope@5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - eslint-scope@^7.1.1: version "7.1.1" resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz" @@ -3107,6 +3146,14 @@ eslint-scope@^7.1.1: esrecurse "^4.3.0" estraverse "^5.2.0" +eslint-scope@5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + eslint-visitor-keys@^1.0.0: version "1.3.0" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz" @@ -3128,7 +3175,7 @@ eslint-webpack-plugin@4.0.0: normalize-path "^3.0.0" schema-utils "^4.0.0" -eslint@8.36.0: +"eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8", "eslint@^6.0.0 || ^7.0.0 || >=8.0.0", eslint@^8.0.0, eslint@>=7.0.0, eslint@8.36.0: version "8.36.0" resolved "https://registry.npmjs.org/eslint/-/eslint-8.36.0.tgz" integrity sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw== @@ -3207,12 +3254,22 @@ estraverse@^4.1.1: resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estraverse@^5.1.0, estraverse@^5.2.0: +estraverse@^5.1.0: + version "5.3.0" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" + integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== + +estraverse@^5.2.0: version "5.3.0" resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== -estree-walker@^0.6.0, estree-walker@^0.6.1: +estree-walker@^0.6.0: + version "0.6.1" + resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz" + integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== + +estree-walker@^0.6.1: version "0.6.1" resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz" integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== @@ -3490,15 +3547,6 @@ fs-exists-sync@^0.1.0: resolved "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz" integrity sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg== -fs-extra@8.1.0, fs-extra@^8.1.0: - version "8.1.0" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs-extra@^11.2.0: version "11.2.0" resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz" @@ -3508,16 +3556,20 @@ fs-extra@^11.2.0: jsonfile "^6.0.1" universalify "^2.0.0" +fs-extra@^8.1.0, fs-extra@8.1.0: + version "8.1.0" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= -fsevents@^2.3.2, fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - function-bind@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" @@ -3599,13 +3651,6 @@ get-uri@^6.0.1: debug "^4.3.4" fs-extra "^11.2.0" -glob-parent@6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.1.tgz" - integrity sha512-kEVjS71mQazDBHKcsq4E9u/vUzaLcw1A8EtUeydawvIWQCJM0qQ08G1H7/XTjFUulla6XQiDOG6MXSaG0HDKog== - dependencies: - is-glob "^4.0.1" - glob-parent@^6.0.2: version "6.0.2" resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" @@ -3620,12 +3665,19 @@ glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" +glob-parent@6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.1.tgz" + integrity sha512-kEVjS71mQazDBHKcsq4E9u/vUzaLcw1A8EtUeydawvIWQCJM0qQ08G1H7/XTjFUulla6XQiDOG6MXSaG0HDKog== + dependencies: + is-glob "^4.0.1" + glob-to-regexp@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@7.1.7, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: +glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@7.1.7: version "7.1.7" resolved "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz" integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== @@ -3683,7 +3735,7 @@ gopd@^1.0.1: graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.11" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" + resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== grapheme-splitter@^1.0.4: @@ -3780,7 +3832,15 @@ http-proxy-agent@^5.0.0: agent-base "6" debug "4" -http-proxy-agent@^7.0.0, http-proxy-agent@^7.0.1: +http-proxy-agent@^7.0.0: + version "7.0.2" + resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz" + integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== + dependencies: + agent-base "^7.1.0" + debug "^4.3.4" + +http-proxy-agent@^7.0.1: version "7.0.2" resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz" integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== @@ -3796,7 +3856,15 @@ https-proxy-agent@^5.0.1: agent-base "6" debug "4" -https-proxy-agent@^7.0.3, https-proxy-agent@^7.0.5: +https-proxy-agent@^7.0.3: + version "7.0.5" + resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz" + integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw== + dependencies: + agent-base "^7.0.2" + debug "4" + +https-proxy-agent@^7.0.5: version "7.0.5" resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz" integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw== @@ -4477,7 +4545,7 @@ jest-resolve-dependencies@^29.7.0: jest-regex-util "^29.6.3" jest-snapshot "^29.7.0" -jest-resolve@^29.7.0: +jest-resolve@*, jest-resolve@^29.7.0: version "29.7.0" resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz" integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== @@ -4642,7 +4710,7 @@ jest-worker@^27.3.1: jest-worker@^27.4.5: version "27.5.1" - resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" + resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz" integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== dependencies: "@types/node" "*" @@ -4788,7 +4856,7 @@ jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz" integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= - optionalDependencies: + dependencies: graceful-fs "^4.1.6" jsonfile@^6.0.1: @@ -5024,7 +5092,7 @@ mrmime@^1.0.0: resolved "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz" integrity sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw== -ms@2.1.2, ms@^2.1.1: +ms@^2.1.1, ms@2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== @@ -5225,7 +5293,14 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-limit@^3.0.2, p-limit@^3.1.0: +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-limit@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== @@ -5441,14 +5516,21 @@ pkg-dir@^3.0.0: dependencies: find-up "^3.0.0" -pkg-dir@^4.1.0, pkg-dir@^4.2.0: +pkg-dir@^4.1.0: version "4.2.0" resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== dependencies: find-up "^4.0.0" -pngjs@3.4.0, pngjs@^3.4.0: +pkg-dir@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +pngjs@^3.4.0, pngjs@3.4.0: version "3.4.0" resolved "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz" integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w== @@ -5725,7 +5807,7 @@ postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0, postcss-value-parser@^ resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^8.4.21, postcss@^8.4.33: +postcss@^8.1.0, postcss@^8.4.21, postcss@^8.4.33, postcss@8.x: version "8.4.35" resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz" integrity sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA== @@ -5840,7 +5922,7 @@ puppeteer-core@22.12.1: devtools-protocol "0.0.1299070" ws "^8.17.1" -puppeteer@22.12.1: +puppeteer@>=19, puppeteer@>=22.0.0, puppeteer@22.12.1: version "22.12.1" resolved "https://registry.npmjs.org/puppeteer/-/puppeteer-22.12.1.tgz" integrity sha512-1GxY8dnEnHr1SLzdSDr0FCjM6JQfAh2E2I/EqzeF8a58DbGVk9oVjj4lFdqNoVbpgFSpAbz7VER9St7S1wDpNg== @@ -6024,7 +6106,14 @@ reusify@^1.0.4: resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^3.0.0, rimraf@^3.0.2: +rimraf@^3.0.0: + version "3.0.2" + resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +rimraf@^3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== @@ -6082,9 +6171,9 @@ rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.6.0, rollup-pluginutils@^2.8.1, dependencies: estree-walker "^0.6.1" -rollup@3.29.5: +rollup@^2.0.0||^3.0.0||^4.0.0, rollup@3.29.5: version "3.29.5" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.29.5.tgz#8a2e477a758b520fb78daf04bca4c522c1da8a54" + resolved "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz" integrity sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w== optionalDependencies: fsevents "~2.3.2" @@ -6143,9 +6232,18 @@ schema-utils@^2.0.1, schema-utils@^2.6.1: ajv "^6.12.4" ajv-keywords "^3.5.2" -schema-utils@^3.1.1, schema-utils@^3.2.0: +schema-utils@^3.1.1: version "3.3.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz" + integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + +schema-utils@^3.2.0: + version "3.3.0" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz" integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== dependencies: "@types/json-schema" "^7.0.8" @@ -6162,14 +6260,12 @@ schema-utils@^4.0.0: ajv-formats "^2.1.1" ajv-keywords "^5.0.0" -semver@7.6.0, semver@^7.5.4: - version "7.6.0" - resolved "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz" - integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== - dependencies: - lru-cache "^6.0.0" +semver@^5.3.0: + version "5.7.2" + resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^5.3.0, semver@^5.6.0: +semver@^5.6.0: version "5.7.2" resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== @@ -6184,6 +6280,20 @@ semver@^7.5.3: resolved "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== +semver@^7.5.4: + version "7.6.0" + resolved "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== + dependencies: + lru-cache "^6.0.0" + +semver@7.6.0: + version "7.6.0" + resolved "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== + dependencies: + lru-cache "^6.0.0" + serialize-javascript@^6.0.1: version "6.0.2" resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz" @@ -6290,14 +6400,6 @@ source-map-js@^1.0.2: resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== -source-map-support@0.5.13: - version "0.5.13" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz" - integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" @@ -6306,6 +6408,14 @@ source-map-support@~0.5.20: buffer-from "^1.0.0" source-map "^0.6.0" +source-map-support@0.5.13: + version "0.5.13" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz" + integrity sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" @@ -6501,7 +6611,7 @@ svg-inline-loader@0.8.2: object-assign "^4.0.1" simple-html-tokenizer "^0.1.1" -svgo@2.8.0, svgo@^2.7.0: +svgo@^2.7.0, svgo@2.8.0: version "2.8.0" resolved "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz" integrity sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg== @@ -6546,7 +6656,7 @@ tar-stream@^3.1.5: terser-webpack-plugin@^5.3.10: version "5.3.10" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" + resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz" integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== dependencies: "@jridgewell/trace-mapping" "^0.3.20" @@ -6555,16 +6665,6 @@ terser-webpack-plugin@^5.3.10: serialize-javascript "^6.0.1" terser "^5.26.0" -terser@5.16.6: - version "5.16.6" - resolved "https://registry.npmjs.org/terser/-/terser-5.16.6.tgz" - integrity sha512-IBZ+ZQIA9sMaXmRZCUMDjNH0D5AQQfdn4WUjHL0+1lF4TP1IHRJbrhb6fNaXWikrYQTSkb7SLxkeXAiy1p7mbg== - dependencies: - "@jridgewell/source-map" "^0.3.2" - acorn "^8.5.0" - commander "^2.20.0" - source-map-support "~0.5.20" - terser@^5.17.4: version "5.31.1" resolved "https://registry.npmjs.org/terser/-/terser-5.31.1.tgz" @@ -6577,7 +6677,7 @@ terser@^5.17.4: terser@^5.26.0: version "5.31.6" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.6.tgz#c63858a0f0703988d0266a82fcbf2d7ba76422b1" + resolved "https://registry.npmjs.org/terser/-/terser-5.31.6.tgz" integrity sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg== dependencies: "@jridgewell/source-map" "^0.3.3" @@ -6585,6 +6685,16 @@ terser@^5.26.0: commander "^2.20.0" source-map-support "~0.5.20" +terser@5.16.6: + version "5.16.6" + resolved "https://registry.npmjs.org/terser/-/terser-5.16.6.tgz" + integrity sha512-IBZ+ZQIA9sMaXmRZCUMDjNH0D5AQQfdn4WUjHL0+1lF4TP1IHRJbrhb6fNaXWikrYQTSkb7SLxkeXAiy1p7mbg== + dependencies: + "@jridgewell/source-map" "^0.3.2" + acorn "^8.5.0" + commander "^2.20.0" + source-map-support "~0.5.20" + test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" @@ -6675,7 +6785,12 @@ tslib@^1.13.0, tslib@^1.8.1: resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.1, tslib@^2.1.0: +tslib@^2.0.1: + version "2.6.3" + resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz" + integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== + +tslib@^2.1.0: version "2.6.3" resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz" integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== @@ -6749,7 +6864,7 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@5.0.2: +"typescript@>=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev", typescript@>=4.9.5, typescript@5.0.2: version "5.0.2" resolved "https://registry.npmjs.org/typescript/-/typescript-5.0.2.tgz" integrity sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw== @@ -6894,7 +7009,7 @@ walker@^1.0.7, walker@^1.0.8: watchpack@^2.4.1: version "2.4.2" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.2.tgz#2feeaed67412e7c33184e5a79ca738fbd38564da" + resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz" integrity sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw== dependencies: glob-to-regexp "^0.4.1" @@ -6921,7 +7036,7 @@ webpack-bundle-analyzer@4.8.0: sirv "^1.0.7" ws "^7.3.1" -webpack-cli@5.0.1: +webpack-cli@5.0.1, webpack-cli@5.x.x: version "5.0.1" resolved "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz" integrity sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A== @@ -6953,9 +7068,9 @@ webpack-sources@^3.2.3: resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@5.94.0: +webpack@^5.0.0, webpack@^5.1.0, webpack@5.94.0, webpack@5.x.x: version "5.94.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.94.0.tgz#77a6089c716e7ab90c1c67574a28da518a20970f" + resolved "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz" integrity sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg== dependencies: "@types/estree" "^1.0.5" @@ -7100,7 +7215,12 @@ ws@^7.3.1: resolved "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== -ws@^8.11.0, ws@^8.17.1: +ws@^8.11.0: + version "8.18.0" + resolved "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz" + integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== + +ws@^8.17.1: version "8.18.0" resolved "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz" integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== @@ -7153,19 +7273,6 @@ yargs-parser@^21.1.1: resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== -yargs@17.7.2, yargs@^17.3.1: - version "17.7.2" - resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz" - integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - yargs@^15.0.2: version "15.4.1" resolved "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz" @@ -7183,6 +7290,32 @@ yargs@^15.0.2: y18n "^4.0.0" yargs-parser "^18.1.2" +yargs@^17.3.1: + version "17.7.2" + resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + +yargs@17.7.2: + version "17.7.2" + resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + yauzl@^2.10.0: version "2.10.0" resolved "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz" From 463d1f5ba8819280d2fc4eaa180f265b5f619231 Mon Sep 17 00:00:00 2001 From: Kimtaehyeong Date: Thu, 28 Nov 2024 15:36:50 +0900 Subject: [PATCH 3/3] Revert "build" This reverts commit 8f215bac172c1aac94bf3f88ebef06d6a32e455a. --- dist/apexcharts.amd.js | 2 +- dist/apexcharts.amd.js.LICENSE.txt | 4 +- dist/apexcharts.common.js | 8 +- dist/apexcharts.esm.js | 8 +- dist/apexcharts.js | 73 ++--- dist/apexcharts.min.js | 8 +- yarn.lock | 495 +++++++++++------------------ 7 files changed, 227 insertions(+), 371 deletions(-) diff --git a/dist/apexcharts.amd.js b/dist/apexcharts.amd.js index a92cdaffa..ff24b4e5e 100644 --- a/dist/apexcharts.amd.js +++ b/dist/apexcharts.amd.js @@ -1,2 +1,2 @@ /*! For license information please see apexcharts.amd.js.LICENSE.txt */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ApexCharts=e():t.ApexCharts=e()}(self,(()=>(()=>{var t={532:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",i=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),i&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),i&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,i,n,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),n&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=n):u[4]="".concat(n)),e.push(u))}},e}},547:t=>{"use strict";t.exports=function(t){return t[1]}},521:()=>{window.TreemapSquared={},function(){"use strict";window.TreemapSquared.generate=function(){function t(e,r,i,n){this.xoffset=e,this.yoffset=r,this.height=n,this.width=i,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,r=[],i=this.xoffset,n=this.yoffset,a=o(t)/this.height,s=o(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var i=e/this.height,n=this.width-i;r=new t(this.xoffset+i,this.yoffset,n,this.height)}else{var o=e/this.width,a=this.height-o;r=new t(this.xoffset,this.yoffset+o,this.width,a)}return r}}function e(e,i,n,a,s){a=void 0===a?0:a,s=void 0===s?0:s;var l=r(function(t,e){var r,i=[],n=e/o(t);for(r=0;r=i(n,r))}(e,l=t[0],s)?(e.push(l),r(t.slice(1),e,n,a)):(c=n.cutArea(o(e),a),a.push(n.getCoordinates(e)),r(t,[],c,a)),a;a.push(n.getCoordinates(e))}function i(t,e){var r=Math.min.apply(Math,t),i=Math.max.apply(Math,t),n=o(t);return Math.max(Math.pow(e,2)*i/Math.pow(n,2),Math.pow(n,2)/(Math.pow(e,2)*r))}function n(t){return t&&t.constructor===Array}function o(t){var e,r=0;for(e=0;e{"use strict";r.r(e),r.d(e,{default:()=>s});var i=r(547),n=r.n(i),o=r(532),a=r.n(o)()(n());a.push([t.id,'@keyframes opaque {\n 0% {\n opacity: 0\n }\n\n to {\n opacity: 1\n }\n}\n\n@keyframes resizeanim {\n\n 0%,\n to {\n opacity: 0\n }\n}\n\n.apexcharts-canvas {\n position: relative;\n direction: ltr !important;\n user-select: none\n}\n\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, .5);\n box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)\n}\n\n.apexcharts-inner {\n position: relative\n}\n\n.apexcharts-text tspan {\n font-family: inherit\n}\n\nrect.legend-mouseover-inactive,\n.legend-mouseover-inactive rect,\n.legend-mouseover-inactive path,\n.legend-mouseover-inactive circle,\n.legend-mouseover-inactive line,\n.legend-mouseover-inactive text.apexcharts-yaxis-title-text,\n.legend-mouseover-inactive text.apexcharts-yaxis-label {\n transition: .15s ease all;\n opacity: .2\n}\n\n.apexcharts-legend-text {\n padding-left: 15px;\n margin-left: -15px;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255, 255, 255, .96)\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30, 30, 30, .8)\n}\n\n.apexcharts-tooltip * {\n font-family: inherit\n}\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #eceff1;\n border-bottom: 1px solid #ddd\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0, 0, 0, .7);\n border-bottom: 1px solid #333\n}\n\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-z-value {\n display: inline-block;\n margin-left: 5px;\n font-weight: 600\n}\n\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-z-value:empty,\n.apexcharts-tooltip-title:empty {\n display: none\n}\n\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px\n}\n\n.apexcharts-tooltip-goals-group,\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n display: flex\n}\n\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px\n}\n\n.apexcharts-tooltip-marker {\n width: 12px;\n height: 12px;\n position: relative;\n top: 0;\n margin-right: 10px;\n border-radius: 50%\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,\n.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px\n}\n\n.apexcharts-custom-tooltip,\n.apexcharts-tooltip-box {\n padding: 4px 8px\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}',""]);const s=a},161:(t,e,r)=>{var i=r(72),n=r(2);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.id,n,""]]);var o=(i(t.id,n,{insert:"head",singleton:!1}),n.locals?n.locals:{});t.exports=o},72:(t,e,r)=>{"use strict";var i,n=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),o={};function a(t,e,r){for(var i=0;i{t.exports=''},627:t=>{t.exports=''},606:t=>{t.exports=''},75:t=>{t.exports=''},646:t=>{t.exports=''},802:t=>{t.exports=''},541:t=>{t.exports=''}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var o=e[i]={id:i,exports:{}};return t[i](o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nc=void 0;var i={};return(()=>{"use strict";r.r(i),r.d(i,{default:()=>Fy});var t={};r.r(t),r.d(t,{cx:()=>Yr,cy:()=>Hr,height:()=>Br,rx:()=>Rr,ry:()=>zr,width:()=>Fr,x:()=>Xr,y:()=>Dr});var e={};r.r(e),r.d(e,{from:()=>si,to:()=>li});var n={};r.r(n),r.d(n,{MorphArray:()=>Vi,height:()=>$i,width:()=>Zi,x:()=>Ui,y:()=>qi});var o={};r.r(o),r.d(o,{array:()=>xo,clear:()=>wo,move:()=>So,plot:()=>ko,size:()=>Ao});var a={};r.r(a),r.d(a,{amove:()=>$a,ax:()=>qa,ay:()=>Za,build:()=>Ja,center:()=>Ua,cx:()=>Ga,cy:()=>Va,length:()=>Fa,move:()=>Wa,plain:()=>Ha,x:()=>Ba,y:()=>Na});var s={};function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t,e){for(var r=0;rXs,dx:()=>Ds,dy:()=>Ys,height:()=>Hs,move:()=>Fs,size:()=>Bs,width:()=>Ns,x:()=>Ws,y:()=>Gs});var h=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,i;return e=t,r=[{key:"shadeRGBColor",value:function(t,e){var r=e.split(","),i=t<0?0:255,n=t<0?-1*t:t,o=parseInt(r[0].slice(4),10),a=parseInt(r[1],10),s=parseInt(r[2],10);return"rgb("+(Math.round((i-o)*n)+o)+","+(Math.round((i-a)*n)+a)+","+(Math.round((i-s)*n)+s)+")"}},{key:"shadeHexColor",value:function(t,e){var r=parseInt(e.slice(1),16),i=t<0?0:255,n=t<0?-1*t:t,o=r>>16,a=r>>8&255,s=255&r;return"#"+(16777216+65536*(Math.round((i-o)*n)+o)+256*(Math.round((i-a)*n)+a)+(Math.round((i-s)*n)+s)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,r){return t.isColorHex(r)?this.shadeHexColor(e,r):this.shadeRGBColor(e,r)}}],i=[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===l(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,r=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var r="",i=t<0?"-":"",n=e[0].replace(".",""),o=Number(e[1])+1;if(o<0){for(r=i+"0.";o++;)r+="0";return r+n.replace(/^-/,"")}for(o-=n.length;o--;)r+="0";return n+r}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),r=t.clientHeight,i=t.clientWidth;return r-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[i-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),r]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var r=t.replace("#","");r=r.match(new RegExp("(.{"+r.length/3+"})","g"));for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:"x",r=t.toString().slice();return r.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,r){if(r>=t.length)for(var i=r-t.length+1;i--;)t.push(void 0);return t.splice(r,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t.style.key=e[r])}},{key:"preciseAddition",value:function(t,e){var r=(String(t).split(".")[1]||"").length,i=(String(e).split(".")[1]||"").length,n=Math.pow(10,Math.max(r,i));return(Math.round(t*n)+Math.round(e*n))/n}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,i=Math.pow(10,r-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*i),e=Math.round(Math.abs(e)*i);e;){var n=e;e=t%e,t=n}return t/i}},{key:"getPrimeFactors",value:function(t){for(var e=[],r=2;t>=2;)t%r==0?(e.push(r),t/=r):r++;return e}},{key:"mod",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,i=Math.pow(10,r-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*i))%(e=Math.round(Math.abs(e)*i))/i}}],r&&c(e.prototype,r),i&&c(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const f=h;function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function p(t,e){for(var r=0;r-1||n.indexOf("NaN")>-1)&&(n=u()),(!o.trim()||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=u()),c.globals.shouldAnimate||(a=1),t.plot(n).animate(1,s).plot(n).animate(a,s).plot(o).after((function(){f.isNumber(r)?r===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&l.animationCompleted(t):"none"!==i&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&e===c.globals.series.length-1||c.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}],r&&p(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function y(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||m(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function m(t,e){if(t){if("string"==typeof t)return x(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(t,e):void 0}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return o=t.done,t},e:function(t){a=!0,n=t},f:function(){try{o||null==e.return||e.return()}finally{if(a)throw n}}}}(t);try{for(i.s();!(r=i.n()).done;)k(r.value,e)}catch(t){i.e(t)}finally{i.f()}}else if("object"!==v(t))O(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(var n in t)k(n,t[n])}function A(t){return w[t]||{}}function O(t){S.push.apply(S,y(t))}function P(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function C(t,e,r){return(e=function(t){var e=function(t){if("object"!=T(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==T(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function T(t){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T(t)}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r2&&void 0!==arguments[2]?arguments[2]:{},i=function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:Y;return B.document.createElementNS(e,t)}function Z(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t instanceof W)return t;if("object"===G(t))return Q(t);if(null==t)return new V[U];if("string"==typeof t&&"<"!==t.charAt(0))return Q(B.document.querySelector(t));var r=e?B.document.createElement("div"):q("svg");return r.innerHTML=t,t=Q(r.firstChild),r.removeChild(r.firstChild),t}function $(t,e){return e&&(e instanceof B.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:q(t)}function J(t){if(!t)return null;if(t.instance instanceof W)return t.instance;if("#document-fragment"===t.nodeName)return new V.Fragment(t);var e=I(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":V[e]||(e="Dom"),new V[e](t)}var Q=J;function K(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.name,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return V[e]=t,r&&(V[U]=t),O(Object.getOwnPropertyNames(t.prototype)),t}var tt=1e3;function et(t){return"Svgjs"+I(t)+tt++}function rt(t){for(var e=t.children.length-1;e>=0;e--)rt(t.children[e]);return t.id?(t.id=et(t.nodeName),t):t}function it(t,e){var r,i;for(i=(t=Array.isArray(t)?t:[t]).length-1;i>=0;i--)for(r in e)t[i].prototype[r]=e[r]}function nt(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;it.length)&&(e=t.length);for(var r=0,i=Array(e);rt.length)&&(e=t.length);for(var r=0,i=Array(e);rt.length)&&(e=t.length);for(var r=0,i=Array(e);r1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}k("Dom",{classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(bt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),k("Dom",{css:function(t,e){var r={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){var e=t.split(/\s*:\s*/);r[e[0]]=e[1]})),r;if(arguments.length<2){if(Array.isArray(t)){var i,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return mt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(t);try{for(n.s();!(i=n.n()).done;){var o=i.value,a=o;r[o]=this.node.style.getPropertyValue(a)}}catch(t){n.e(t)}finally{n.f()}return r}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"===vt(t))for(var s in t)this.node.style.setProperty(s,null==t[s]||dt.test(t[s])?"":t[s])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||dt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),k("Dom",{data:function(t,e,r){if(null==t)return this.data(M(function(t){var e,r=t.length,i=[];for(e=0;e=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(i=o.n()).done;){var a=i.value;n[a]=this.data(a)}}catch(t){o.e(t)}finally{o.f()}return n}if("object"===xt(t))for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===r||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),k("Dom",{remember:function(t,e){if("object"===St(arguments[0]))for(var r in t)this.remember(r,t[r]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(var t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});var Mt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.init.apply(this,arguments)}var e,r,i;return e=t,r=[{key:"cmyk",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=Math.min(1-i,1-n,1-o);return 1===a?new t(0,0,0,1,"cmyk"):new t((1-i-a)/(1-a),(1-n-a)/(1-a),(1-o-a)/(1-a),a,"cmyk")}},{key:"hsl",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=Math.max(i,n,o),s=Math.min(i,n,o),l=(a+s)/2,c=a===s,u=a-s;return new t(360*(c?0:a===i?((n-o)/u+(n.5?u/(2-a-s):u/(a+s)),100*l,"hsl")}},{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"rgb";if(t=t||0,this.space)for(var o in this.space)delete this[this.space[o]];if("number"==typeof t)n="string"==typeof i?i:n,i="string"==typeof i?0:i,Object.assign(this,{_a:t,_b:e,_c:r,_d:i,space:n});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){var a=function(t,e){var r=Tt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Tt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Tt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Tt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Tt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Tt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return r.space=e||r.space,r}(t,e);Object.assign(this,a)}else if("string"==typeof t)if(ft.test(t)){var s=t.replace(ut,""),l=At(st.exec(s).slice(1,4).map((function(t){return parseInt(t)})),3),c=l[0],u=l[1],h=l[2];Object.assign(this,{_a:c,_b:u,_c:h,_d:0,space:"rgb"})}else{if(!ht.test(t))throw Error("Unsupported string format, can't construct Color");var f=at.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map((function(t){return parseInt(t,16)})),d=At(f,4),p=d[1],g=d[2],b=d[3];Object.assign(this,{_a:p,_b:g,_c:b,_d:0,space:"rgb"})}var y=this._a,v=this._b,m=this._c,x=this._d,w="rgb"===this.space?{r:y,g:v,b:m}:"xyz"===this.space?{x:y,y:v,z:m}:"hsl"===this.space?{h:y,s:v,l:m}:"lab"===this.space?{l:y,a:v,b:m}:"lch"===this.space?{l:y,c:v,h:m}:"cmyk"===this.space?{c:y,m:v,y:m,k:x}:{};Object.assign(this,w)}},{key:"lab",value:function(){var e=this.xyz(),r=e.x,i=e.y;return new t(116*i-16,500*(r-i),200*(i-e.z),"lab")}},{key:"lch",value:function(){var e=this.lab(),r=e.l,i=e.a,n=e.b,o=Math.sqrt(Math.pow(i,2)+Math.pow(n,2)),a=180*Math.atan2(n,i)/Math.PI;return a<0&&(a=360-(a*=-1)),new t(r,o,a,"lch")}},{key:"rgb",value:function(){if("rgb"===this.space)return this;if("lab"===(E=this.space)||"xyz"===E||"lch"===E){var e=this.x,r=this.y,i=this.z;if("lab"===this.space||"lch"===this.space){var n=this.l,o=this.a,a=this.b;if("lch"===this.space){var s=this.c,l=this.h,c=Math.PI/180;o=s*Math.cos(c*l),a=s*Math.sin(c*l)}var u=(n+16)/116,h=o/500+u,f=u-a/200,d=16/116,p=.008856,g=7.787;e=.95047*(Math.pow(h,3)>p?Math.pow(h,3):(h-d)/g),r=1*(Math.pow(u,3)>p?Math.pow(u,3):(u-d)/g),i=1.08883*(Math.pow(f,3)>p?Math.pow(f,3):(f-d)/g)}var b=3.2406*e+-1.5372*r+-.4986*i,y=-.9689*e+1.8758*r+.0415*i,v=.0557*e+-.204*r+1.057*i,m=Math.pow,x=.0031308;return new t(255*(b>x?1.055*m(b,1/2.4)-.055:12.92*b),255*(y>x?1.055*m(y,1/2.4)-.055:12.92*y),255*(v>x?1.055*m(v,1/2.4)-.055:12.92*v))}if("hsl"===this.space){var w=this.h,S=this.s,k=this.l;if(w/=360,k/=100,0==(S/=100))return new t(k*=255,k,k);var A=k<.5?k*(1+S):k+S-k*S,O=2*k-A;return new t(255*Et(O,A,w+1/3),255*Et(O,A,w),255*Et(O,A,w-1/3))}if("cmyk"===this.space){var P=this.c,C=this.m,j=this.y,T=this.k;return new t(255*(1-Math.min(1,P*(1-T)+T)),255*(1-Math.min(1,C*(1-T)+T)),255*(1-Math.min(1,j*(1-T)+T)))}return this;var E}},{key:"toArray",value:function(){return[this._a,this._b,this._c,this._d,this.space]}},{key:"toHex",value:function(){var t=At(this._clamped().map(jt),3),e=t[0],r=t[1],i=t[2];return"#".concat(e).concat(r).concat(i)}},{key:"toRgb",value:function(){var t=At(this._clamped(),3),e=t[0],r=t[1],i=t[2];return"rgb(".concat(e,",").concat(r,",").concat(i,")")}},{key:"toString",value:function(){return this.toHex()}},{key:"xyz",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,s=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,l=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,c=(.4124*a+.3576*s+.1805*l)/.95047,u=(.2126*a+.7152*s+.0722*l)/1,h=(.0193*a+.1192*s+.9505*l)/1.08883;return new t(c>.008856?Math.pow(c,1/3):7.787*c+16/116,u>.008856?Math.pow(u,1/3):7.787*u+16/116,h>.008856?Math.pow(h,1/3):7.787*h+16/116,"xyz")}},{key:"_clamped",value:function(){var t=this.rgb(),e=t._a,r=t._b,i=t._c,n=Math.max,o=Math.min,a=Math.round;return[e,r,i].map((function(t){return n(0,o(a(t),255))}))}}],i=[{key:"isColor",value:function(e){return e&&(e instanceof t||this.isRgb(e)||this.test(e))}},{key:"isRgb",value:function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}},{key:"random",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"vibrant",r=arguments.length>1?arguments[1]:void 0,i=Math.random,n=Math.round,o=Math.sin,a=Math.PI;if("vibrant"===e)return new t(24*i()+57,38*i()+45,360*i(),"lch");if("sine"===e)return new t(n(80*o(2*a*(r=null==r?i():r)/.5+.01)+150),n(50*o(2*a*r/.5+4.6)+200),n(100*o(2*a*r/.5+2.3)+150));if("pastel"===e)return new t(8*i()+86,17*i()+9,360*i(),"lch");if("dark"===e)return new t(10+10*i(),50*i()+86,360*i(),"lch");if("rgb"===e)return new t(255*i(),255*i(),255*i());if("lab"===e)return new t(100*i(),256*i()-128,256*i()-128,"lab");if("grey"===e){var s=255*i();return new t(s,s,s)}throw new Error("Unsupported random color mode")}},{key:"test",value:function(t){return"string"==typeof t&&(ht.test(t)||ft.test(t))}}],r&&Pt(e.prototype,r),i&&Pt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Lt(t){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lt(t)}function It(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.a,i=this.b,n=this.c,o=this.d,a=this.e,s=this.f,l=r*o-i*n,c=l>0?1:-1,u=c*Math.sqrt(r*r+i*i),h=Math.atan2(c*i,c*r),f=180/Math.PI*h,d=Math.cos(h),p=Math.sin(h),g=(r*n+i*o)/l,b=n*u/(g*r-i)||o*u/(g*i+r);return{scaleX:u,scaleY:b,shear:g,rotate:f,translateX:a-t+t*d*u+e*(g*d*u-p*b),translateY:s-e+t*p*u+e*(g*p*u+d*b),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}},{key:"equals",value:function(e){if(e===this)return!0;var r=new t(e);return Yt(this.a,r.a)&&Yt(this.b,r.b)&&Yt(this.c,r.c)&&Yt(this.d,r.d)&&Yt(this.e,r.e)&&Yt(this.f,r.f)}},{key:"flip",value:function(t,e){return this.clone().flipO(t,e)}},{key:"flipO",value:function(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}},{key:"init",value:function(e){var r=t.fromArray([1,0,0,1,0,0]);return e=e instanceof ar?e.matrixify():"string"==typeof e?t.fromArray(e.split(bt).map(parseFloat)):Array.isArray(e)?t.fromArray(e):"object"===zt(e)&&t.isMatrixLike(e)?e:"object"===zt(e)?(new t).transform(e):6===arguments.length?t.fromArray([].slice.call(arguments)):r,this.a=null!=e.a?e.a:r.a,this.b=null!=e.b?e.b:r.b,this.c=null!=e.c?e.c:r.c,this.d=null!=e.d?e.d:r.d,this.e=null!=e.e?e.e:r.e,this.f=null!=e.f?e.f:r.f,this}},{key:"inverse",value:function(){return this.clone().inverseO()}},{key:"inverseO",value:function(){var t=this.a,e=this.b,r=this.c,i=this.d,n=this.e,o=this.f,a=t*i-e*r;if(!a)throw new Error("Cannot invert "+this);var s=i/a,l=-e/a,c=-r/a,u=t/a,h=-(s*n+c*o),f=-(l*n+u*o);return this.a=s,this.b=l,this.c=c,this.d=u,this.e=h,this.f=f,this}},{key:"lmultiply",value:function(t){return this.clone().lmultiplyO(t)}},{key:"lmultiplyO",value:function(e){var r=e instanceof t?e:new t(e);return t.matrixMultiply(r,this,this)}},{key:"multiply",value:function(t){return this.clone().multiplyO(t)}},{key:"multiplyO",value:function(e){var r=e instanceof t?e:new t(e);return t.matrixMultiply(this,r,this)}},{key:"rotate",value:function(t,e,r){return this.clone().rotateO(t,e,r)}},{key:"rotateO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t=L(t);var i=Math.cos(t),n=Math.sin(t),o=this.a,a=this.b,s=this.c,l=this.d,c=this.e,u=this.f;return this.a=o*i-a*n,this.b=a*i+o*n,this.c=s*i-l*n,this.d=l*i+s*n,this.e=c*i-u*n+r*n-e*i+e,this.f=u*i+c*n-e*n-r*i+r,this}},{key:"scale",value:function(){var t;return(t=this.clone()).scaleO.apply(t,arguments)}},{key:"scaleO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(i=r,r=e,e=t);var n=this.a,o=this.b,a=this.c,s=this.d,l=this.e,c=this.f;return this.a=n*t,this.b=o*e,this.c=a*t,this.d=s*e,this.e=l*t-r*t+r,this.f=c*e-i*e+i,this}},{key:"shear",value:function(t,e,r){return this.clone().shearO(t,e,r)}},{key:"shearO",value:function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.a,i=this.b,n=this.c,o=this.d,a=this.e,s=this.f;return this.a=r+i*t,this.c=n+o*t,this.e=a+s*t-e*t,this}},{key:"skew",value:function(){var t;return(t=this.clone()).skewO.apply(t,arguments)}},{key:"skewO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(i=r,r=e,e=t),t=L(t),e=L(e);var n=Math.tan(t),o=Math.tan(e),a=this.a,s=this.b,l=this.c,c=this.d,u=this.e,h=this.f;return this.a=a+s*n,this.b=s+a*o,this.c=l+c*n,this.d=c+l*o,this.e=u+h*n-i*n,this.f=h+u*o-r*o,this}},{key:"skewX",value:function(t,e,r){return this.skew(t,0,e,r)}},{key:"skewY",value:function(t,e,r){return this.skew(0,t,e,r)}},{key:"toArray",value:function(){return[this.a,this.b,this.c,this.d,this.e,this.f]}},{key:"toString",value:function(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}},{key:"transform",value:function(e){if(t.isMatrixLike(e))return new t(e).multiplyO(this);var r=t.formatTransforms(e),i=new Rt(r.ox,r.oy).transform(this),n=i.x,o=i.y,a=(new t).translateO(r.rx,r.ry).lmultiplyO(this).translateO(-n,-o).scaleO(r.scaleX,r.scaleY).skewO(r.skewX,r.skewY).shearO(r.shear).rotateO(r.theta).translateO(n,o);if(isFinite(r.px)||isFinite(r.py)){var s=new Rt(n,o).transform(a),l=isFinite(r.px)?r.px-s.x:0,c=isFinite(r.py)?r.py-s.y:0;a.translateO(l,c)}return a.translateO(r.tx,r.ty),a}},{key:"translate",value:function(t,e){return this.clone().translateO(t,e)}},{key:"translateO",value:function(t,e){return this.e+=t||0,this.f+=e||0,this}},{key:"valueOf",value:function(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}],i=[{key:"formatTransforms",value:function(t){var e="both"===t.flip||!0===t.flip,r=t.flip&&(e||"x"===t.flip)?-1:1,i=t.flip&&(e||"y"===t.flip)?-1:1,n=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,o=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,a=t.scale&&t.scale.length?t.scale[0]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleX)?t.scaleX*r:r,s=t.scale&&t.scale.length?t.scale[1]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleY)?t.scaleY*i:i,l=t.shear||0,c=t.rotate||t.theta||0,u=new Rt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),h=u.x,f=u.y,d=new Rt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=d.x,g=d.y,b=new Rt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=b.x,v=b.y,m=new Rt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:a,scaleY:s,skewX:n,skewY:o,shear:l,theta:c,rx:m.x,ry:m.y,tx:y,ty:v,ox:h,oy:f,px:p,py:g}}},{key:"fromArray",value:function(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}},{key:"isMatrixLike",value:function(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}},{key:"matrixMultiply",value:function(t,e,r){var i=t.a*e.a+t.c*e.b,n=t.b*e.a+t.d*e.b,o=t.a*e.c+t.c*e.d,a=t.b*e.c+t.d*e.d,s=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return r.a=i,r.b=n,r.c=o,r.d=a,r.e=s,r.f=l,r}}],r&&Xt(e.prototype,r),i&&Xt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ft(){if(!Ft.nodes){var t=Z().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");var e=t.path().node;Ft.nodes={svg:t,path:e}}if(!Ft.nodes.svg.node.parentNode){var r=B.document.body||B.document.documentElement;Ft.nodes.svg.addTo(r)}return Ft.nodes}function Bt(t){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bt(t)}function Nt(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s1?e-1:0),i=1;it.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];return t instanceof Array?t:t.trim().split(bt).map(parseFloat)}},{key:"toArray",value:function(){return Array.prototype.concat.apply([],this)}},{key:"toSet",value:function(){return new Set(this)}},{key:"toString",value:function(){return this.join(" ")}},{key:"valueOf",value:function(){var t=[];return t.push.apply(t,Pe(this)),t}}],r&&je(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Ee(Array));function Re(t){return Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Re(t)}function ze(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.writeDataToDom();var r=this.node.cloneNode(t);return e&&(r=rt(r)),new this.constructor(r)}},{key:"each",value:function(t,e){var r,i,n=this.children();for(r=0,i=n.length;r=0}},{key:"html",value:function(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}},{key:"id",value:function(t){return void 0!==t||this.node.id||(this.node.id=et(this.type)),this.attr("id",t)}},{key:"index",value:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}},{key:"last",value:function(){return J(this.node.lastChild)}},{key:"matches",value:function(t){var e=this.node,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return r&&r.call(e,t)}},{key:"parent",value:function(t){var e=this;if(!e.node.parentNode)return null;if(e=J(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=J(e.node.parentNode));return e}},{key:"put",value:function(t,e){return t=Z(t),this.add(t,e),t}},{key:"putIn",value:function(t,e){return Z(t).add(this,e)}},{key:"remove",value:function(){return this.parent()&&this.parent().removeElement(this),this}},{key:"removeElement",value:function(t){return this.node.removeChild(t.node),this}},{key:"replace",value:function(t){return t=Z(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}},{key:"round",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=Math.pow(10,t),i=this.attr(e);for(var n in i)"number"==typeof i[n]&&(i[n]=Math.round(i[n]*r)/r);return this.attr(i),this}},{key:"svg",value:function(t,e){return this.xml(t,e,Y)}},{key:"toString",value:function(){return this.id()}},{key:"words",value:function(t){return this.node.textContent=t,this}},{key:"wrap",value:function(t){var e=this.parent();if(!e)return this.addTo(t);var r=e.index(this);return e.put(t,r).put(this)}},{key:"writeDataToDom",value:function(){return this.each((function(){this.writeDataToDom()})),this}},{key:"xml",value:function(t,e,r){if("boolean"==typeof t&&(r=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();var i=this;if(null!=t){if(i=J(i.node.cloneNode(!0)),e){var n=t(i);if(i=n||i,!1===n)return""}i.each((function(){var e=t(this),r=e||this;!1===e?this.remove():e&&this!==r&&this.replace(r)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;var o=q("wrapper",r),a=B.document.createDocumentFragment();o.innerHTML=t;for(var s=o.children.length;s--;)a.appendChild(o.firstElementChild);var l=this.parent();return e?this.replace(a)&&l:this.add(a)}}],r&&We(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Se);function Je(t){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Je(t)}function Qe(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(e=this.node.attributes);try{for(o.s();!(n=o.n()).done;){var a=n.value;t[a.nodeName]=pt.test(a.nodeValue)?parseFloat(a.nodeValue):a.nodeValue}}catch(t){o.e(t)}finally{o.f()}return t}if(t instanceof Array)return t.reduce((function(t,e){return t[e]=i.attr(e),t}),{});if("object"===Ye(t)&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ae[t]:pt.test(e)?parseFloat(e):e;"number"==typeof(e=Be.reduce((function(e,r){return r(t,e,i)}),e))?e=new De(e):Fe.has(t)&&Mt.isColor(e)?e=new Mt(e):e.constructor===Array&&(e=new _e(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof r?this.node.setAttributeNS(r,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return oe(t,this.node)},findOne:function(t){return J(this.node.querySelector(t))}}),K($e,"Dom");var ar=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&er(t,e)}(n,t);var e,r,i=rr(n);function n(t,e){var r,o,a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=i.call(this,t,e)).dom={},r.node.instance=ir(r),(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&r.setData(null!==(o=null!==(a=JSON.parse(t.getAttribute("data-svgjs")))&&void 0!==a?a:JSON.parse(t.getAttribute("svgjs:data")))&&void 0!==o?o:{}),r}return e=n,r=[{key:"center",value:function(t,e){return this.cx(t).cy(e)}},{key:"cx",value:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}},{key:"cy",value:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}},{key:"defs",value:function(){var t=this.root();return t&&t.defs()}},{key:"dmove",value:function(t,e){return this.dx(t).dy(e)}},{key:"dx",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.x(new De(t).plus(this.x()))}},{key:"dy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.y(new De(t).plus(this.y()))}},{key:"getEventHolder",value:function(){return this}},{key:"height",value:function(t){return this.attr("height",t)}},{key:"move",value:function(t,e){return this.x(t).y(e)}},{key:"parents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.root(),e="string"==typeof t;e||(t=Z(t));for(var r=new ie,i=this;(i=i.parent())&&i.node!==B.document&&"#document-fragment"!==i.nodeName&&(r.push(i),e||i.node!==t.node)&&(!e||!i.matches(t));)if(i.node===this.root().node)return null;return r}},{key:"reference",value:function(t){if(!(t=this.attr(t)))return null;var e=(t+"").match(lt);return e?Z(e[1]):null}},{key:"root",value:function(){var t=this.parent(V[U]);return t&&t.root()}},{key:"setData",value:function(t){return this.dom=t,this}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.width(new De(r.width)).height(new De(r.height))}},{key:"width",value:function(t){return this.attr("width",t)}},{key:"writeDataToDom",value:function(){return D(this,this.dom),tr(or(n.prototype),"writeDataToDom",this).call(this)}},{key:"x",value:function(t){return this.attr("x",t)}},{key:"y",value:function(t){return this.attr("y",t)}}],r&&Qe(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}($e);function sr(t){return sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sr(t)}it(ar,{bbox:function(){var t=Ut(this,(function(t){return t.getBBox()}),(function(t){try{var e=t.clone().addTo(Ft().svg).show(),r=e.node.getBBox();return e.remove(),r}catch(e){throw new Error('Getting bbox of element "'.concat(t.node.nodeName,'" is not possible: ').concat(e.toString()))}}));return new Vt(t)},rbox:function(t){var e=Ut(this,(function(t){return t.getBoundingClientRect()}),(function(t){throw new Error('Getting rbox of element "'.concat(t.node.nodeName,'" is not possible'))})),r=new Vt(e);return t?r.transform(t.screenCTM().inverseO()):r.addOffset()},inside:function(t,e){var r=this.bbox();return t>r.x&&e>r.y&&t=0;e--)null!=r[lr[t][e]]&&this.attr(lr.prefix(t,lr[t][e]),r[lr[t][e]]);return this},k(["Element","Runner"],r)})),k(["Element","Runner"],{matrix:function(t,e,r,i,n,o){return null==t?new Ht(this):this.attr("transform",new Ht(t,e,r,i,n,o))},rotate:function(t,e,r){return this.transform({rotate:t,ox:e,oy:r},!0)},skew:function(t,e,r,i){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:r},!0):this.transform({skew:[t,e],ox:r,oy:i},!0)},shear:function(t,e,r){return this.transform({shear:t,ox:e,oy:r},!0)},scale:function(t,e,r,i){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:r},!0):this.transform({scale:[t,e],ox:r,oy:i},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"both",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"center";return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),k("radius",{radius:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return"radialGradient"===(this._element||this).type?this.attr("r",new De(t)):this.rx(t).ry(e)}}),k("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Rt(this.node.getPointAtLength(t))}}),k(["Element","Runner"],{font:function(t,e){if("object"===sr(t)){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),k("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),k("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(ct).slice(0,-1).map((function(t){var e=t.trim().split("(");return[e[0],e[1].split(bt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(Ht.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new Ht)},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);var r=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(i.multiply(r)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){var r=new Ht(this).decompose();return null==t?r:r[t]}Ht.isMatrixLike(t)||(t=hr(hr({},t),{},{origin:R(t,this)}));var i=new Ht(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});var xr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&br(t,e)}(n,t);var e,r,i=yr(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.apply(this,arguments)}return e=n,r=[{key:"flatten",value:function(){return this.each((function(){if(this instanceof n)return this.flatten().ungroup()})),this}},{key:"ungroup",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.parent(),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.index(this);return e=-1===e?t.children().length:e,this.each((function(r,i){return i[i.length-r-1].toParent(t,e)})),this.remove()}}],r&&pr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(ar);function wr(t){return wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wr(t)}function Sr(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("defs",t),e)}return e=n,(r=[{key:"flatten",value:function(){return this}},{key:"ungroup",value:function(){return this}}])&&Sr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Tr(t){return Tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tr(t)}function Er(t,e){return Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Er(t,e)}function Mr(t){var e=Lr();return function(){var r,i=Ir(t);if(e){var n=Ir(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Tr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Lr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Lr=function(){return!!t})()}function Ir(t){return Ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ir(t)}K(jr,"Defs");var _r=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Er(t,e)}(r,t);var e=Mr(r);function r(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.apply(this,arguments)}return r}(ar);function Rr(t){return this.attr("rx",t)}function zr(t){return this.attr("ry",t)}function Xr(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Dr(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Yr(t){return this.attr("cx",t)}function Hr(t){return this.attr("cy",t)}function Fr(t){return null==t?2*this.rx():this.rx(new De(t).divide(2))}function Br(t){return null==t?2*this.ry():this.ry(new De(t).divide(2))}function Nr(t){return Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nr(t)}function Wr(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("ellipse",t),e)}return e=n,r=[{key:"size",value:function(t,e){var r=_(this,t,e);return this.rx(new De(r.width).divide(2)).ry(new De(r.height).divide(2))}}],r&&Wr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function Jr(t){return Jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jr(t)}function Qr(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.put(new $r).size(t,e).move(0,0)}))}),K($r,"Ellipse");var oi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ei(t,e)}(n,t);var e,r,i=ri(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B.document.createDocumentFragment();return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,t)}return e=n,(r=[{key:"xml",value:function(t,e,r){if("boolean"==typeof t&&(r=e,e=t,t=null),null==t||"function"==typeof t){var i=new $e(q("wrapper",r));return i.add(this.node.cloneNode(!0)),i.xml(!1,r)}return ti(ni(n.prototype),"xml",this).call(this,t,!1,r)}}])&&Qr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}($e);K(oi,"Fragment");const ai=oi;function si(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new De(t),fy:new De(e)}):this.attr({x1:new De(t),y1:new De(e)})}function li(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new De(t),cy:new De(e)}):this.attr({x2:new De(t),y2:new De(e)})}function ci(t){return ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(t)}function ui(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("pattern",t),e)}return e=n,(r=[{key:"attr",value:function(t,e,r){return"transform"===t&&(t="patternTransform"),wi(Oi(n.prototype),"attr",this).call(this,t,e,r)}},{key:"bbox",value:function(){return new Vt}},{key:"targets",value:function(){return oe("svg [fill*="+this.id()+"]")}},{key:"toString",value:function(){return this.url()}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"url",value:function(){return"url(#"+this.id()+")"}}])&&mi(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Ci(t){return Ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ci(t)}function ji(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("image",t),e)}return e=n,r=[{key:"load",value:function(t,e){if(!t)return this;var r=new B.window.Image;return de(r,"load",(function(t){var i=this.parent(Pi);0===this.width()&&0===this.height()&&this.size(r.width,r.height),i instanceof Pi&&0===i.width()&&0===i.height()&&i.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),de(r,"load error",(function(){pe(r)})),this.attr("href",r.src=t,F)}}],r&&ji(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function zi(t){return zi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zi(t)}function Xi(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Di(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Di(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Di(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}},{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0],e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(bt).map(parseFloat)).length%2!=0&&t.pop();for(var r=0,i=t.length;r=0;r--)i.width&&(this[r][0]=(this[r][0]-i.x)*t/i.width+i.x),i.height&&(this[r][1]=(this[r][1]-i.y)*e/i.height+i.y);return this}},{key:"toLine",value:function(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}},{key:"toString",value:function(){for(var t=[],e=0,r=this.length;e1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("line",t),e)}return e=n,r=[{key:"array",value:function(){return new Gi([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}},{key:"move",value:function(t,e){return this.attr(this.array().move(t,e).toLine())}},{key:"plot",value:function(t,e,r,i){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:r,y2:i}:new Gi(t).toLine(),this.attr(t))}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.attr(this.array().size(r.width,r.height).toLine())}}],r&&Qi(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function an(t){return an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},an(t)}function sn(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("marker",t),e)}return e=n,r=[{key:"height",value:function(t){return this.attr("markerHeight",t)}},{key:"orient",value:function(t){return this.attr("orient",t)}},{key:"ref",value:function(t,e){return this.attr("refX",t).attr("refY",e)}},{key:"toString",value:function(){return"url(#"+this.id()+")"}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"width",value:function(t){return this.attr("markerWidth",t)}}],r&&sn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function pn(t){return pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pn(t)}function gn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bn(t,e)}function bn(t,e){return bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bn(t,e)}function yn(t){var e=vn();return function(){var r,i=mn(t);if(e){var n=mn(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==pn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function vn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(vn=function(){return!!t})()}function mn(t){return mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mn(t)}function xn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wn(t,e){for(var r=0;r":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,r,i){return function(n){return n<0?t>0?e/t*n:r>0?i/r*n:0:n>1?r<1?(1-i)/(1-r)*n+(i-r)/(1-r):t<1?(1-e)/(1-t)*n+(e-t)/(1-t):1:3*n*Math.pow(1-n,2)*e+3*Math.pow(n,2)*(1-n)*i+Math.pow(n,3)}},steps:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"end";e=e.split("-").reverse()[0];var r=t;return"none"===e?--r:"both"===e&&++r,function(i){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=Math.floor(i*t),a=i*o%1==0;return"start"!==e&&"both"!==e||++o,n&&a&&--o,i>=0&&o<0&&(o=0),i<=1&&o>r&&(o=r),o/r}}},Pn=function(){function t(){xn(this,t)}return Sn(t,[{key:"done",value:function(){return!1}}]),t}(),Cn=function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:">";return xn(this,r),(t=e.call(this)).ease=On[i]||i,t}return Sn(r,[{key:"step",value:function(t,e,r){return"number"!=typeof t?r<1?t:e:t+(e-t)*this.ease(r)}}]),r}(Pn),jn=function(t){gn(r,t);var e=yn(r);function r(t){var i;return xn(this,r),(i=e.call(this)).stepper=t,i}return Sn(r,[{key:"done",value:function(t){return t.done}},{key:"step",value:function(t,e,r,i){return this.stepper(t,e,r,i)}}]),r}(Pn);function Tn(){var t=(this._duration||500)/1e3,e=this._overshoot||0,r=Math.PI,i=Math.log(e/100+1e-10),n=-i/Math.sqrt(r*r+i*i),o=3.9/(n*t);this.d=2*n*o,this.k=o*o}it(function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return xn(this,r),(t=e.call(this)).duration(i).overshoot(n),t}return Sn(r,[{key:"step",value:function(t,e,r,i){if("string"==typeof t)return t;if(i.done=r===1/0,r===1/0)return e;if(0===r)return t;r>100&&(r=16),r/=1e3;var n=i.velocity||0,o=-this.d*n-this.k*(t-e),a=t+n*r+o*r*r/2;return i.velocity=n+o*r,i.done=Math.abs(e-a)+Math.abs(n)<.002,i.done?e:a}}]),r}(jn),{duration:An("_duration",Tn),overshoot:An("_overshoot",Tn)});var En=function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.01,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3;return xn(this,r),(t=e.call(this)).p(i).i(n).d(o).windup(a),t}return Sn(r,[{key:"step",value:function(t,e,r,i){if("string"==typeof t)return t;if(i.done=r===1/0,r===1/0)return e;if(0===r)return t;var n=e-t,o=(i.integral||0)+n*r,a=(n-(i.error||0))/r,s=this._windup;return!1!==s&&(o=Math.max(-s,Math.min(o,s))),i.error=n,i.integral=o,i.done=Math.abs(n)<.001,i.done?e:t+(this.P*n+this.I*o+this.D*a)}}]),r}(jn);it(En,{windup:An("_windup"),p:An("P"),i:An("I"),d:An("D")});for(var Mn={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Ln={M:function(t,e,r){return e.x=r.x=t[0],e.y=r.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,r){return e.x=r.x,e.y=r.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},In="mlhvqtcsaz".split(""),_n=0,Rn=In.length;_n=0;n--)"M"===(i=this[n][0])||"L"===i||"T"===i?(this[n][1]+=t,this[n][2]+=e):"H"===i?this[n][1]+=t:"V"===i?this[n][1]+=e:"C"===i||"S"===i||"Q"===i?(this[n][1]+=t,this[n][2]+=e,this[n][3]+=t,this[n][4]+=e,"C"===i&&(this[n][5]+=t,this[n][6]+=e)):"A"===i&&(this[n][6]+=t,this[n][7]+=e);return this}},{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"M0 0";return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t){for(var e=0,r="",i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:!(arguments.length>1&&void 0!==arguments[1])||arguments[1],p0:new Rt,p:new Rt};i.lastToken=r,r=t.charAt(e++);)if(i.inSegment||!Xn(i,r))if("."!==r)if(isNaN(parseInt(r)))if(Bn.has(r))i.inNumber&&Dn(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(yt.test(r)){if(i.inNumber)Dn(i,!1);else{if(!zn(i))throw new Error("parser Error");Yn(i)}--e}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!Fn(i)){Dn(i,!1),--e;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||Hn(i)){i.inNumber=!0,i.number=r,Dn(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){Dn(i,!1),--e;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&Dn(i,!1),i.inSegment&&zn(i)&&Yn(i),i.segments}(t)}},{key:"size",value:function(t,e){var r,i,n=this.bbox();for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)"M"===(i=this[r][0])||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}},{key:"toString",value:function(){return function(t){for(var e="",r=0,i=t.length;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r-1?t.constructor:Array.isArray(t)?_e:"object"===e?co:ao},oo=function(){function t(e){Kn(this,t),this._stepper=e||new Cn("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}return eo(t,[{key:"at",value:function(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}},{key:"done",value:function(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}},{key:"from",value:function(t){return null==t?this._from:(this._from=this._set(t),this)}},{key:"stepper",value:function(t){return null==t?this._stepper:(this._stepper=t,this)}},{key:"to",value:function(t){return null==t?this._to:(this._to=this._set(t),this)}},{key:"type",value:function(t){return null==t?this._type:(this._type=t,this)}},{key:"_set",value:function(t){this._type||this.type(no(t));var e=new this._type(t);return this._type===Mt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===co&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}]),t}(),ao=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"init",value:function(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}},{key:"toArray",value:function(){return[this.value]}},{key:"valueOf",value:function(){return this.value}}]),t}(),so=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"init",value:function(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,t.defaults,e),this}},{key:"toArray",value:function(){var t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}]),t}();so.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};var lo=function(t,e){return t[0]e[0]?1:0},co=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"align",value:function(t){for(var e=this.values,r=0,i=e.length;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("path",t),e)}return e=n,r=[{key:"array",value:function(){return this._array||(this._array=new $n(this.attr("d")))}},{key:"clear",value:function(){return delete this._array,this}},{key:"height",value:function(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}},{key:"move",value:function(t,e){return this.attr("d",this.array().move(t,e))}},{key:"plot",value:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new $n(t))}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.attr("d",this.array().size(r.width,r.height))}},{key:"width",value:function(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}},{key:"x",value:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}},{key:"y",value:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}],r&&fo(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function xo(){return this._array||(this._array=new Gi(this.attr("points")))}function wo(){return delete this._array,this}function So(t,e){return this.attr("points",this.array().move(t,e))}function ko(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Gi(t))}function Ao(t,e){var r=_(this,t,e);return this.attr("points",this.array().size(r.width,r.height))}function Oo(t){return Oo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oo(t)}function Po(t,e){return Po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Po(t,e)}function Co(t){var e=jo();return function(){var r,i=To(t);if(e){var n=To(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Oo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function jo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(jo=function(){return!!t})()}function To(t){return To=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},To(t)}mo.prototype.MorphArray=$n,k({Container:{path:nt((function(t){return this.put(new mo).plot(t||new $n)}))}}),K(mo,"Path");var Eo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Po(t,e)}(r,t);var e=Co(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("polygon",t),i)}return r}(_r);function Mo(t){return Mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mo(t)}function Lo(t,e){return Lo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lo(t,e)}function Io(t){var e=_o();return function(){var r,i=Ro(t);if(e){var n=Ro(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Mo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function _o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_o=function(){return!!t})()}function Ro(t){return Ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ro(t)}k({Container:{polygon:nt((function(t){return this.put(new Eo).plot(t||new Gi)}))}}),it(Eo,n),it(Eo,o),K(Eo,"Polygon");var zo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lo(t,e)}(r,t);var e=Io(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("polyline",t),i)}return r}(_r);function Xo(t){return Xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xo(t)}function Do(t,e){return Do=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Do(t,e)}function Yo(t){var e=Ho();return function(){var r,i=Fo(t);if(e){var n=Fo(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Xo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Ho(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ho=function(){return!!t})()}function Fo(t){return Fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fo(t)}k({Container:{polyline:nt((function(t){return this.put(new zo).plot(t||new Gi)}))}}),it(zo,n),it(zo,o),K(zo,"Polyline");var Bo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Do(t,e)}(r,t);var e=Yo(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("rect",t),i)}return r}(_r);function No(t){return No="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},No(t)}function Wo(t,e){for(var r=0;r=e.time?e.run():Uo.timeouts.push(e),e!==r););for(var i=null,n=Uo.frames.last();i!==n&&(i=Uo.frames.shift());)i.run(t);for(var o=null;o=Uo.immediates.shift();)o();Uo.nextDraw=Uo.timeouts.first()||Uo.frames.first()?B.window.requestAnimationFrame(Uo._draw):null}};const qo=Uo;function Zo(t){return Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zo(t)}function $o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:na;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(t=i.call(this))._timeSource=e,t.terminate(),t}return e=n,r=[{key:"active",value:function(){return!!this._nextFrame}},{key:"finish",value:function(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}},{key:"getEndTime",value:function(){var t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}},{key:"getEndTimeOfTimeline",value:function(){var t=this._runners.map((function(t){return t.start+t.runner.duration()}));return Math.max.apply(Math,[0].concat(function(t){return function(t){if(Array.isArray(t))return $o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return $o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)))}},{key:"getLastRunnerInfo",value:function(){return this.getRunnerInfoById(this._lastRunnerId)}},{key:"getRunnerInfoById",value:function(t){return this._runners[this._runnerIds.indexOf(t)]||null}},{key:"pause",value:function(){return this._paused=!0,this._continue()}},{key:"persist",value:function(t){return null==t?this._persist:(this._persist=t,this)}},{key:"play",value:function(){return this._paused=!1,this.updateTime()._continue()}},{key:"reverse",value:function(t){var e=this.speed();if(null==t)return this.speed(-e);var r=Math.abs(e);return this.speed(t?-r:r)}},{key:"schedule",value:function(t,e,r){if(null==t)return this._runners.map(ia);var i=0,n=this.getEndTime();if(e=e||0,null==r||"last"===r||"after"===r)i=n;else if("absolute"===r||"start"===r)i=e,e=0;else if("now"===r)i=this._time;else if("relative"===r){var o=this.getRunnerInfoById(t.id);o&&(i=o.start+e,e=0)}else{if("with-last"!==r)throw new Error('Invalid value for the "when" parameter');var a=this.getLastRunnerInfo();i=a?a.start:this._time}t.unschedule(),t.timeline(this);var s=t.persist(),l={persist:null===s?this._persist:s,start:i+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(l),this._runners.sort((function(t,e){return t.start-e.start})),this._runnerIds=this._runners.map((function(t){return t.runner.id})),this.updateTime()._continue(),this}},{key:"seek",value:function(t){return this.time(this._time+t)}},{key:"source",value:function(t){return null==t?this._timeSource:(this._timeSource=t,this)}},{key:"speed",value:function(t){return null==t?this._speed:(this._speed=t,this)}},{key:"stop",value:function(){return this.time(0),this.pause()}},{key:"time",value:function(t){return null==t?this._time:(this._time=t,this._continue(!0))}},{key:"unschedule",value:function(t){var e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}},{key:"updateTime",value:function(){return this.active()||(this._lastSourceTime=this._timeSource()),this}},{key:"_continue",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return qo.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qo.frame(this._step)),this)}},{key:"_stepFn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._timeSource(),r=e-this._lastSourceTime;t&&(r=0);var i=this._speed*r+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=i,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(var n=this._runners.length;n--;){var o=this._runners[n],a=o.runner;this._time-o.start<=0&&a.reset()}for(var s=!1,l=0,c=this._runners.length;l0?this._continue():(this.pause(),this.fire("finished")),this}},{key:"terminate",value:function(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}],r&&Jo(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Se);function aa(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=0;this._lastPosition=e;var i=this.duration(),n=this._lastTime<=0&&this._time>0,o=this._lastTime=i;this._lastTime=this._time,n&&this.fire("start",this);var a=this._isDeclarative;this.done=!a&&!o&&this._time>=i,this._reseted=!1;var s=!1;return(r||a)&&(this._initialise(r),this.transforms=new Ht,s=this._run(a?t:e),this.fire("step",this)),this.done=this.done||s&&a,o&&this.fire("finished",this),this}},{key:"time",value:function(t){if(null==t)return this._time;var e=t-this._time;return this.step(e),this}},{key:"timeline",value:function(t){return void 0===t?this._timeline:(this._timeline=t,this)}},{key:"unschedule",value:function(){var t=this.timeline();return t&&t.unschedule(this),this}},{key:"_initialise",value:function(t){if(t||this._isDeclarative)for(var e=0,r=this._queue.length;e0&&void 0!==arguments[0]?arguments[0]:new Ht,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ha(this,t),this.transforms=e,this.id=r,this.done=i}return da(t,[{key:"clearTransformsFromQueue",value:function(){}}]),t}();it([ma,xa],{mergeWith:function(t){return new xa(t.transforms.lmultiply(this.transforms),t.id)}});var wa=function(t,e){return t.lmultiplyO(e)},Sa=function(t){return t.transforms};function ka(){var t=this._transformationRunners.runners.map(Sa).reduce(wa,new Ht);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}var Aa=function(){function t(){ha(this,t),this.runners=[],this.ids=[]}return da(t,[{key:"add",value:function(t){if(!this.runners.includes(t)){var e=t.id+1;return this.runners.push(t),this.ids.push(e),this}}},{key:"clearBefore",value:function(t){var e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new xa).forEach((function(t){return t.clearTransformsFromQueue()})),this}},{key:"edit",value:function(t,e){var r=this.ids.indexOf(t+1);return this.ids.splice(r,1,t+1),this.runners.splice(r,1,e),this}},{key:"getByID",value:function(t){return this.runners[this.ids.indexOf(t+1)]}},{key:"length",value:function(){return this.ids.length}},{key:"merge",value:function(){for(var t=null,e=0;e0&&void 0!==arguments[0]?arguments[0]:0;return this._queueNumberDelta("x",t)},dy:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this._queueNumberDelta("y",t)},dmove:function(t,e){return this.dx(t).dy(e)},_queueNumberDelta:function(t,e){if(e=new De(e),this._tryRetarget(t,e))return this;var r=new oo(this._stepper).to(e),i=null;return this.queue((function(){i=this.element()[t](),r.from(i),r.to(i+e)}),(function(e){return this.element()[t](r.at(e)),r.done()}),(function(t){r.to(i+new De(t))})),this._rememberMorpher(t,r),this},_queueObject:function(t,e){if(this._tryRetarget(t,e))return this;var r=new oo(this._stepper).to(e);return this.queue((function(){r.from(this.element()[t]())}),(function(e){return this.element()[t](r.at(e)),r.done()})),this._rememberMorpher(t,r),this},_queueNumber:function(t,e){return this._queueObject(t,new De(e))},cx:function(t){return this._queueNumber("cx",t)},cy:function(t){return this._queueNumber("cy",t)},move:function(t,e){return this.x(t).y(e)},amove:function(t,e){return this.ax(t).ay(e)},center:function(t,e){return this.cx(t).cy(e)},size:function(t,e){var r;return t&&e||(r=this._element.bbox()),t||(t=r.width/r.height*e),e||(e=r.height/r.width*t),this.width(t).height(e)},width:function(t){return this._queueNumber("width",t)},height:function(t){return this._queueNumber("height",t)},plot:function(t,e,r,i){if(4===arguments.length)return this.plot([t,e,r,i]);if(this._tryRetarget("plot",t))return this;var n=new oo(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){n.from(this._element.array())}),(function(t){return this._element.plot(n.at(t)),n.done()})),this._rememberMorpher("plot",n),this},leading:function(t){return this._queueNumber("leading",t)},viewbox:function(t,e,r,i){return this._queueObject("viewbox",new Vt(t,e,r,i))},update:function(t){return"object"!==ua(t)?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),it(ma,{rx:Rr,ry:zr,from:si,to:li}),K(ma,"Runner");var Ia=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ta(t,e)}(n,t);var e,r,i=Ea(n);function n(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i.call(this,$("svg",t),r)).namespace(),e}return e=n,(r=[{key:"defs",value:function(){return this.isRoot()?J(this.node.querySelector("defs"))||this.put(new jr):this.root().defs()}},{key:"isRoot",value:function(){return!this.node.parentNode||!(this.node.parentNode instanceof B.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}},{key:"namespace",value:function(){return this.isRoot()?this.attr({xmlns:Y,version:"1.1"}).attr("xmlns:xlink",F,H):this.root().namespace()}},{key:"removeNamespace",value:function(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,H).attr("xmlns:svgjs",null,H)}},{key:"root",value:function(){return this.isRoot()?this:ja(La(n.prototype),"root",this).call(this)}}])&&Pa(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function _a(t){return _a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_a(t)}function Ra(t,e){return Ra=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ra(t,e)}function za(t){var e=Xa();return function(){var r,i=Da(t);if(e){var n=Da(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==_a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Xa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xa=function(){return!!t})()}function Da(t){return Da=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Da(t)}k({Container:{nested:nt((function(){return this.put(new Ia)}))}}),K(Ia,"Svg",!0);var Ya=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ra(t,e)}(r,t);var e=za(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("symbol",t),i)}return r}(xr);function Ha(t){return!1===this._build&&this.clear(),this.node.appendChild(B.document.createTextNode(t)),this}function Fa(){return this.node.getComputedTextLength()}function Ba(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Na(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function Wa(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox();return this.x(t,r).y(e,r)}function Ga(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function Va(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function Ua(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox();return this.cx(t,r).cy(e,r)}function qa(t){return this.attr("x",t)}function Za(t){return this.attr("y",t)}function $a(t,e){return this.ax(t).ay(e)}function Ja(t){return this._build=!!t,this}function Qa(t){return Qa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qa(t)}function Ka(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=i.call(this,$("text",t),o)).dom.leading=null!==(e=r.dom.leading)&&void 0!==e?e:new De(1.3),r._rebuild=!0,r._build=!1,r}return e=n,r=[{key:"leading",value:function(t){return null==t?this.dom.leading:(this.dom.leading=new De(t),this.rebuild())}},{key:"rebuild",value:function(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){var e=this,r=0,i=this.dom.leading;this.each((function(t){if(!X(this.node)){var n=B.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=i*new De(n);this.dom.newLined&&(this.attr("x",e.attr("x")),"\n"===this.text()?r+=o:(this.attr("dy",t?o+r:0),r=0))}})),this.fire("rebuild")}return this}},{key:"setData",value:function(t){return this.dom=t,this.dom.leading=new De(t.leading||1.3),this}},{key:"writeDataToDom",value:function(){return D(this,this.dom,{leading:1.3}),this}},{key:"text",value:function(t){if(void 0===t){var e=this.node.childNodes,r=0;t="";for(var i=0,n=e.length;i0&&void 0!==arguments[0]?arguments[0]:"";return this.put(new os).text(t)})),plain:nt((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.put(new os).plain(t)}))}}),K(os,"Text");var ds=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cs(t,e)}(n,t);var e,r,i=us(n);function n(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i.call(this,$("tspan",t),r))._build=!1,e}return e=n,r=[{key:"dx",value:function(t){return this.attr("dx",t)}},{key:"dy",value:function(t){return this.attr("dy",t)}},{key:"newLine",value:function(){this.dom.newLined=!0;var t=this.parent();if(!(t instanceof os))return this;var e=t.index(this),r=B.window.getComputedStyle(this.node).getPropertyValue("font-size"),i=t.dom.leading*new De(r);return this.dy(e?i:0).attr("x",t.x())}},{key:"text",value:function(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}],r&&ss(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function ps(t){return ps="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ps(t)}function gs(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:"",e=new ds;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.tspan(t).newLine()}}}),K(ds,"Tspan");var ws=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ys(t,e)}(n,t);var e,r,i=vs(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("circle",t),e)}return e=n,(r=[{key:"radius",value:function(t){return this.attr("r",t)}},{key:"rx",value:function(t){return this.attr("r",t)}},{key:"ry",value:function(t){return this.rx(t)}},{key:"size",value:function(t){return this.radius(new De(t).divide(2))}}])&&gs(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function Ss(t){return Ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ss(t)}function ks(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0;return this.put(new ws).size(t).move(0,0)}))}}),K(ws,"Circle");var Es=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ps(t,e)}(n,t);var e,r,i=Cs(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("clipPath",t),e)}return e=n,(r=[{key:"remove",value:function(){return this.targets().forEach((function(t){t.unclip()})),Os(Ts(n.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe("svg [clip-path*="+this.id()+"]")}}])&&ks(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Ms(t){return Ms="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ms(t)}function Ls(t,e){return Ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ls(t,e)}function Is(t){var e=_s();return function(){var r,i=Rs(t);if(e){var n=Rs(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Ms(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function _s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_s=function(){return!!t})()}function Rs(t){return Rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rs(t)}k({Container:{clip:nt((function(){return this.defs().put(new Es)}))},Element:{clipper:function(){return this.reference("clip-path")},clipWith:function(t){var e=t instanceof Es?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip:function(){return this.attr("clip-path",null)}}}),K(Es,"ClipPath");var zs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ls(t,e)}(r,t);var e=Is(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("foreignObject",t),i)}return r}(ar);function Xs(t,e){return this.children().forEach((function(r){var i;try{i=r.node instanceof N().SVGSVGElement?new Vt(r.attr(["x","y","width","height"])):r.bbox()}catch(t){return}var n=new Ht(r),o=n.translate(t,e).transform(n.inverse()),a=new Rt(i.x,i.y).transform(o);r.move(a.x,a.y)})),this}function Ds(t){return this.dmove(t,0)}function Ys(t){return this.dmove(0,t)}function Hs(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.height:this.size(e.width,t,e)}function Fs(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox(),i=t-r.x,n=e-r.y;return this.dmove(i,n)}function Bs(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox(),i=_(this,t,e,r),n=i.width/r.width,o=i.height/r.height;return this.children().forEach((function(t){var e=new Rt(r).transform(new Ht(t).inverse());t.scale(n,o,e.x,e.y)})),this}function Ns(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.width:this.size(t,e.height,e)}function Ws(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.x:this.move(t,e.y,e)}function Gs(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.y:this.move(e.x,t,e)}function Vs(t){return Vs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vs(t)}function Us(t,e){return Us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Us(t,e)}function qs(t){var e=Zs();return function(){var r,i=$s(t);if(e){var n=$s(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Vs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Zs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zs=function(){return!!t})()}function $s(t){return $s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$s(t)}k({Container:{foreignObject:nt((function(t,e){return this.put(new zs).size(t,e)}))}}),K(zs,"ForeignObject");var Js=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Us(t,e)}(r,t);var e=qs(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("g",t),i)}return r}(xr);function Qs(t){return Qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qs(t)}function Ks(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("a",t),e)}return e=n,(r=[{key:"target",value:function(t){return this.attr("target",t)}},{key:"to",value:function(t){return this.attr("href",t,F)}}])&&Ks(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function al(t){return al="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},al(t)}function sl(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("mask",t),e)}return e=n,(r=[{key:"remove",value:function(){return this.targets().forEach((function(t){t.unmask()})),cl(dl(n.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe("svg [mask*="+this.id()+"]")}}])&&sl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function gl(t){return gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gl(t)}function bl(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("stop",t),e)}return e=n,r=[{key:"update",value:function(t){return("number"==typeof t||t instanceof De)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new De(t.offset)),this}}],r&&bl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(ar);function kl(t){return kl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kl(t)}function Al(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Ol(t,e,r){return(e=Cl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pl(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("style",t),e)}return e=n,r=[{key:"addText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.node.textContent+=t,this}},{key:"font",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.rule("@font-face",function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("textPath",t),e)}return e=n,(r=[{key:"array",value:function(){var t=this.track();return t?t.array():null}},{key:"plot",value:function(t){var e=this.track(),r=null;return e&&(r=e.plot(t)),null==t?r:this}},{key:"track",value:function(){return this.reference("href")}}])&&_l(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(os);function Fl(t){return Fl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fl(t)}function Bl(t,e){for(var r=0;r1&&void 0!==arguments[1])||arguments[1],i=new Hl;if(t instanceof mo||(t=this.defs().path(t)),i.attr("href","#"+t,F),r)for(;e=this.node.firstChild;)i.node.appendChild(e);return this.put(i)})),textPath:function(){return this.findOne("textPath")}},Path:{text:nt((function(t){return t instanceof os||(t=(new os).addTo(this.parent()).text(t)),t.path(this)})),targets:function(){var t=this;return oe("svg textPath").filter((function(e){return(e.attr("href")||"").includes(t.id())}))}}}),Hl.prototype.MorphArray=$n,K(Hl,"TextPath");var ql=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wl(t,e)}(n,t);var e,r,i=Gl(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("use",t),e)}return e=n,(r=[{key:"use",value:function(t,e){return this.attr("href",(e||"")+"#"+t,F)}}])&&Bl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);k({Container:{use:nt((function(t,e){return this.put(new ql).use(t,e)}))}}),K(ql,"Use");var Zl=Z;function $l(t){return $l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$l(t)}function Jl(t){return function(t){if(Array.isArray(t))return Ql(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ql(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ql(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ql(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];uo.push.apply(uo,Jn([].concat(t)))}([De,Mt,Vt,Ht,_e,Gi,$n,Rt]),it(uo,{to:function(t){return(new oo).type(this.constructor).from(this.toArray()).to(t)},fromArray:function(t){return this.init(t),this},toConsumable:function(){return this.toArray()},morph:function(t,e,r,i,n){return this.fromArray(t.map((function(t,o){return i.step(t,e[o],r,n[o],n)})))}});var cc=function(t){nc(r,t);var e=ac(r);function r(t){var i;return Kl(this,r),(i=e.call(this,$("filter",t),t)).$source="SourceGraphic",i.$sourceAlpha="SourceAlpha",i.$background="BackgroundImage",i.$backgroundAlpha="BackgroundAlpha",i.$fill="FillPaint",i.$stroke="StrokePaint",i.$autoSetIn=!0,i}return ec(r,[{key:"put",value:function(t,e){return!(t=ic(lc(r.prototype),"put",this).call(this,t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}},{key:"remove",value:function(){return this.targets().each("unfilter"),ic(lc(r.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe('svg [filter*="'+this.id()+'"]')}},{key:"toString",value:function(){return"url(#"+this.id()+")"}}]),r}(ar),uc=function(t){nc(r,t);var e=ac(r);function r(t,i){var n;return Kl(this,r),(n=e.call(this,t,i)).result(n.id()),n}return ec(r,[{key:"in",value:function(t){if(null==t){var e=this.attr("in");return this.parent()&&this.parent().find('[result="'.concat(e,'"]'))[0]||e}return this.attr("in",t)}},{key:"result",value:function(t){return this.attr("result",t)}},{key:"toString",value:function(){return this.result()}}]),r}(ar),hc=function(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,F)},morphology:hc(["operator","radius"]),offset:hc(["dx","dy"]),specularLighting:hc(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:hc([]),turbulence:hc(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((function(t){var e=I(t),r=fc[t];cc[e+"Effect"]=function(t){nc(n,t);var i=ac(n);function n(t){return Kl(this,n),i.call(this,$("fe"+e,t),t)}return ec(n,[{key:"update",value:function(t){return r.apply(this,t),this}}]),n}(uc),cc.prototype[t]=nt((function(t){var r=new cc[e+"Effect"];if(null==t)return this.put(r);for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{},e=this.put(new cc.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;for(var r in t.r||t.g||t.b||t.a||(t={r:t,g:t,b:t,a:t}),t)e.add(new(cc["Func"+r.toUpperCase()])(t[r]));return e}}),["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((function(t){var e=I(t);cc[e]=function(t){nc(i,t);var r=ac(i);function i(t){return Kl(this,i),r.call(this,$("fe"+e,t),t)}return i}(uc)})),["funcR","funcG","funcB","funcA"].forEach((function(t){var e=cc[I(t)],r=nt((function(){return this.put(new e)}));cc.ComponentTransferEffect.prototype[t]=r})),["distantLight","pointLight","spotLight"].forEach((function(t){var e=cc[I(t)],r=nt((function(){return this.put(new e)}));cc.DiffuseLightingEffect.prototype[t]=r,cc.SpecularLightingEffect.prototype[t]=r})),it(cc.MergeEffect,{mergeNode:function(t){return this.put(new cc.MergeNode).attr("in",t)}}),it(jr,{filter:function(t){var e=this.put(new cc);return"function"==typeof t&&t.call(e,e),e}}),it(xr,{filter:function(t){return this.defs().filter(t)}}),it(ar,{filterWith:function(t){var e=t instanceof cc?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer:function(){return this.reference("filter")}});var dc={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,r,i){return this.parent()&&this.parent().diffuseLighting(t,r,i).in(this)},displacementMap:function(t,e,r,i){return this.parent()&&this.parent().displacementMap(this,t,e,r,i)},dropShadow:function(t,e,r){return this.parent()&&this.parent().dropShadow(this,t,e,r).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){var e;return t=t instanceof Array?t:Jl(t),this.parent()&&(e=this.parent()).merge.apply(e,[this].concat(Jl(t)))},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,r,i,n){return this.parent()&&this.parent().specularLighting(t,r,i,n).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,r,i,n){return this.parent()&&this.parent().turbulence(t,e,r,i,n).in(this)}};function pc(t){return pc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pc(t)}function gc(t,e){for(var r=0;r0&&-1===o.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:i,dx:l,dy:s,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:a,result:"blur"}),t.flood({"flood-color":c,"flood-opacity":u,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",i])}},{key:"dropShadow",value:function(t,e){var r,i,n,o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=this.w;return t.unfilter(!0),f.isMsEdge()&&"radialBar"===s.config.chart.type||(null===(r=s.config.chart.dropShadow.enabledOnSeries)||void 0===r?void 0:r.length)>0&&-1===(null===(n=s.config.chart.dropShadow.enabledOnSeries)||void 0===n?void 0:n.indexOf(a))||(t.filterWith((function(t){o.addShadow(t,a,e,"SourceGraphic")})),e.noUserSpaceOnUse||t.filterer().node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(i=t.filterer())||void 0===i?void 0:i.node)),t}},{key:"setSelectionFilter",value:function(t,e,r){var i=this.w;if(void 0!==i.globals.selectedDataPoints[e]&&i.globals.selectedDataPoints[e].indexOf(r)>-1){t.node.setAttribute("selected",!0);var n=i.config.states.active.filter;"none"!==n&&this.applyFilter(t,e,n.type)}}},{key:"_scaleFilterSize",value:function(t){t&&function(e){for(var r in e)e.hasOwnProperty(r)&&t.setAttribute(r,e[r])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}],r&&gc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const vc=yc;function mc(t){return mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mc(t)}function xc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function wc(t){for(var e=1;e2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function o(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var a=t.split(/[,\s]/).reduce((function(t,e){var r=e.match("([a-zA-Z])(.+)");return r?(t.push(r[1]),t.push(r[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),s=[];if(a.length>1){var l=o(a[0]),c=null;"Z"==a[a.length-1][0]&&a[0].length>2&&(c=["L",l.x,l.y],a[a.length-1]=c),s.push(a[0]);for(var u=1;u2&&"L"==f[0]&&d.length>2&&"L"==d[0]){var p,g,b=o(h),y=o(f),v=o(d);p=r(y,b,e),g=r(y,v,e),n(f,p),f.origPoint=y,s.push(f);var m=i(p,y,.5),x=i(y,g,.5),w=["C",m.x,m.y,x.x,x.y,g.x,g.y];w.origPoint=y,s.push(w)}else s.push(f)}if(c){var S=o(s[s.length-1]);s.push(["Z"]),n(s[0],S)}}else s=a;return s.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,r,i){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:r,y2:i,stroke:n,"stroke-dasharray":o,"stroke-width":a,"stroke-linecap":s})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,u=this.w.globals.dom.Paper.rect();return u.attr({x:t,y:e,width:r>0?r:0,height:i>0?i:0,rx:n,ry:n,opacity:a,"stroke-width":null!==s?s:0,stroke:null!==l?l:"none","stroke-dasharray":c}),u.node.setAttribute("fill",o),u}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:i,stroke:e,"stroke-width":r})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var r=this.w.globals.dom.Paper.circle(2*t);return null!==e&&r.attr(e),r}},{key:"drawPath",value:function(t){var e=t.d,r=void 0===e?"":e,i=t.stroke,n=void 0===i?"#a8a8a8":i,o=t.strokeWidth,a=void 0===o?1:o,s=t.fill,l=t.fillOpacity,c=void 0===l?1:l,u=t.strokeOpacity,h=void 0===u?1:u,f=t.classes,d=t.strokeLinecap,p=void 0===d?null:d,g=t.strokeDashArray,b=void 0===g?0:g,y=this.w;return null===p&&(p=y.config.stroke.lineCap),(r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r="M 0 ".concat(y.globals.gridHeight)),y.globals.dom.Paper.path(r).attr({fill:s,"fill-opacity":c,stroke:n,"stroke-opacity":h,"stroke-linecap":p,"stroke-width":a,"stroke-dasharray":b,class:f})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){return["M",t,e].join(" ")}},{key:"line",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=null;return null===r?i=[" L",t,e].join(" "):"H"===r?i=[" H",t].join(" "):"V"===r&&(i=[" V",e].join(" ")),i}},{key:"curve",value:function(t,e,r,i,n,o){return["C",t,e,r,i,n,o].join(" ")}},{key:"quadraticCurve",value:function(t,e,r,i){return["Q",t,e,r,i].join(" ")}},{key:"arc",value:function(t,e,r,i,n,o,a){var s="A";return arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(s="a"),[s,t,e,r,i,n,o,a].join(" ")}},{key:"renderPaths",value:function(t){var e,r=t.j,i=t.realIndex,n=t.pathFrom,o=t.pathTo,a=t.stroke,s=t.strokeWidth,l=t.strokeLinecap,c=t.fill,u=t.animationDelay,h=t.initialSpeed,f=t.dataChangeSpeed,d=t.className,p=t.chartType,g=t.shouldClipToGrid,y=void 0===g||g,v=t.bindEventsOnPaths,m=void 0===v||v,x=t.drawShadow,w=void 0===x||x,S=this.w,k=new vc(this.ctx),A=new b(this.ctx),O=this.w.config.chart.animations.enabled,P=O&&this.w.config.chart.animations.dynamicAnimation.enabled,C=!!(O&&!S.globals.resized||P&&S.globals.dataChanged&&S.globals.shouldAnimate);C?e=n:(e=o,S.globals.animationEnded=!0);var j,T=S.config.stroke.dashArray;j=Array.isArray(T)?T[i]:S.config.stroke.dashArray;var E=this.drawPath({d:e,stroke:a,strokeWidth:s,fill:c,fillOpacity:1,classes:d,strokeLinecap:l,strokeDashArray:j});E.attr("index",i),y&&("bar"===p&&!S.globals.isHorizontal||S.globals.comboCharts?E.attr({"clip-path":"url(#gridRectBarMask".concat(S.globals.cuid,")")}):E.attr({"clip-path":"url(#gridRectMask".concat(S.globals.cuid,")")})),S.config.chart.dropShadow.enabled&&w&&k.dropShadow(E,S.config.chart.dropShadow,i),m&&(E.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,E)),E.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,E)),E.node.addEventListener("mousedown",this.pathMouseDown.bind(this,E))),E.attr({pathTo:o,pathFrom:n});var M={el:E,j:r,realIndex:i,pathFrom:n,pathTo:o,fill:c,strokeWidth:s,delay:u};return!O||S.globals.resized||S.globals.dataChanged?!S.globals.resized&&S.globals.dataChanged||A.showDelayedElements():A.animatePathsGradually(wc(wc({},M),{},{speed:h})),S.globals.dataChanged&&P&&C&&A.animatePathsGradually(wc(wc({},M),{},{speed:f})),E}},{key:"drawPattern",value:function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,r,(function(o){"horizontalLines"===t?o.line(0,0,r,0).stroke({color:i,width:n+1}):"verticalLines"===t?o.line(0,0,0,e).stroke({color:i,width:n+1}):"slantedLines"===t?o.line(0,0,e,r).stroke({color:i,width:n}):"squares"===t?o.rect(e,r).fill("none").stroke({color:i,width:n}):"circles"===t&&o.circle(e).fill("none").stroke({color:i,width:n})}))}},{key:"drawGradient",value:function(t,e,r,i,n){var o,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,u=this.w;e.length<9&&0===e.indexOf("#")&&(e=f.hexToRgba(e,i)),r.length<9&&0===r.indexOf("#")&&(r=f.hexToRgba(r,n));var h=0,d=1,p=1,g=null;null!==s&&(h=void 0!==s[0]?s[0]/100:0,d=void 0!==s[1]?s[1]/100:1,p=void 0!==s[2]?s[2]/100:1,g=void 0!==s[3]?s[3]/100:null);var b=!("donut"!==u.config.chart.type&&"pie"!==u.config.chart.type&&"polarArea"!==u.config.chart.type&&"bubble"!==u.config.chart.type);if(o=l&&0!==l.length?u.globals.dom.Paper.gradient(b?"radial":"linear",(function(t){(Array.isArray(l[c])?l[c]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):u.globals.dom.Paper.gradient(b?"radial":"linear",(function(t){t.stop(h,e,i),t.stop(d,r,n),t.stop(p,r,n),null!==g&&t.stop(g,e,i)})),b){var y=u.globals.gridWidth/2,v=u.globals.gridHeight/2;"bubble"!==u.config.chart.type?o.attr({gradientUnits:"userSpaceOnUse",cx:y,cy:v,r:a}):o.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?o.from(0,0).to(0,1):"diagonal"===t?o.from(0,0).to(1,1):"horizontal"===t?o.from(0,1).to(1,1):"diagonal2"===t&&o.from(1,0).to(0,1);return o}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,r=t.maxWidth,i=t.fontSize,n=t.fontFamily,o=this.getTextRects(e,i,n),a=o.width/e.length,s=Math.floor(r/a);return r-1){var s=r.globals.selectedDataPoints[n].indexOf(o);r.globals.selectedDataPoints[n].splice(s,1)}}else{if(!r.config.states.active.allowMultipleDataPointsSelection&&r.globals.selectedDataPoints.length>0){r.globals.selectedDataPoints=[];var l=r.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),c=r.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),u=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),i.getDefaultFilter(t,n)}))};u(l),u(c)}t.node.setAttribute("selected","true"),a="true",void 0===r.globals.selectedDataPoints[n]&&(r.globals.selectedDataPoints[n]=[]),r.globals.selectedDataPoints[n].push(o)}if("true"===a){var h=r.config.states.active.filter;if("none"!==h)i.applyFilter(t,n,h.type);else if("none"!==r.config.states.hover.filter&&!r.globals.isTouchDevice){var f=r.config.states.hover.filter;i.applyFilter(t,n,f.type)}}else"none"!==r.config.states.active.filter.type&&("none"===r.config.states.hover.filter.type||r.globals.isTouchDevice?i.getDefaultFilter(t,n):(f=r.config.states.hover.filter,i.applyFilter(t,n,f.type)));"function"==typeof r.config.chart.events.dataPointSelection&&r.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:r.globals.selectedDataPoints,seriesIndex:n,dataPointIndex:o,w:r}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:r.globals.selectedDataPoints,seriesIndex:n,dataPointIndex:o,w:r}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,r,i){var n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=this.w,a=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:r,foreColor:"#fff",opacity:0});i&&a.attr("transform",i),o.globals.dom.Paper.add(a);var s=a.bbox();return n||(s=a.node.getBoundingClientRect()),a.remove(),{width:s.width,height:s.height}}},{key:"placeTextWithEllipsis",value:function(t,e,r){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=r/1.1)){for(var i=e.length-3;i>0;i-=3)if(t.getSubStringLength(0,i)<=r/1.1)return void(t.textContent=e.substring(0,i)+"...");t.textContent="."}}}],i=[{key:"setAttrs",value:function(t,e){for(var r in e)e.hasOwnProperty(r)&&t.setAttribute(r,e[r])}}],r&&kc(e.prototype,r),i&&kc(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Pc=Oc;function Cc(t){return Cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cc(t)}function jc(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,r=[];if(0===e.globals.series.length)return r;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,r=[];return e.globals.seriesGroups.forEach((function(i){var n=[];e.config.series.forEach((function(t,r){i.indexOf(e.globals.seriesNames[r])>-1&&n.push(r)}));var o=e.globals.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));r.push(t.getStackedSeriesTotals(o))})),r}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,r=[],i=[],n=[],o=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){n.push(e),i.push(null)})),e.yaxis.forEach((function(t,e){r[e]=[]}));var a=[];e.yaxis.forEach((function(t,i){var s=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,a){if(e.name===t){var l=a;i===a||o?!o||n.indexOf(a)>-1?r[i].push([i,a]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(r[a].push([a,i]),l=i),s=!0,-1!==(l=n.indexOf(l))&&n.splice(l,1)}}))}))}s||a.push(i)})),r=r.map((function(t,e){var r=[];return t.forEach((function(t){i[t[1]]=t[0],r.push(t[1])})),r}));for(var s=e.yaxis.length-1,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,r){return t===r[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,r=t.slice();return e.config.xaxis.convertedCatToNumeric&&(r=t.map((function(t,r){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),r}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var r=0;if(Array.isArray(t))for(var i=0;it&&r.globals.seriesX[n][a]0){var d=function(t,e){var r=n.config.yaxis[n.globals.seriesYAxisReverseMap[e]],o=t<0?-1:1;return t=Math.abs(t),r.logarithmic&&(t=i.getBaseLog(r.logBase,t)),-o*t/a[e]};if(o.isMultipleYAxis){l=[];for(var p=0;p0&&e.forEach((function(e){var a=[],s=[];t.i.forEach((function(r,i){n.config.series[r].group===e&&(a.push(t.series[i]),s.push(r))})),a.length>0&&o.push(i.draw(a,r,s))})),o}}],i=[{key:"checkComboSeries",value:function(t,e){var r=!1,i=0,n=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||i++,void 0!==t.type&&t.type!==e&&n++})),n>0&&(r=!0),{comboBarCount:i,comboCharts:r}}},{key:"extendArrayProps",value:function(t,e,r){var i,n,o,a,s,l;return null!==(i=e)&&void 0!==i&&i.yaxis&&(e=t.extendYAxis(e,r)),null!==(n=e)&&void 0!==n&&n.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(a=o.annotations)&&void 0!==a&&a.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(s=e)&&void 0!==s&&null!==(l=s.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e))),e}}],r&&jc(e.prototype,r),i&&jc(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Mc=Ec;function Lc(t){return Lc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lc(t)}function Ic(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null,r=this.w;if("vertical"===t.label.orientation){var i=null!==e?e:0,n=r.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(i,"']"));if(null!==n){var o=n.getBoundingClientRect();n.setAttribute("x",parseFloat(n.getAttribute("x"))-o.height+4);var a="top"===t.label.position?o.width:-o.width;n.setAttribute("y",parseFloat(n.getAttribute("y"))+a);var s=this.annoCtx.graphics.rotateAroundCenter(n),l=s.x,c=s.y;n.setAttribute("transform","rotate(-90 ".concat(l," ").concat(c,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var r=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var i=r.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),n=t.getBoundingClientRect(),o=e.label.style.padding,a=o.left,s=o.right,l=o.top,c=o.bottom;if("vertical"===e.label.orientation){var u=[a,s,l,c];l=u[0],c=u[1],a=u[2],s=u[3]}var h=n.left-i.left-a,f=n.top-i.top-l,d=this.annoCtx.graphics.drawRect(h-r.globals.barPadForNumericAxis,f,n.width+a+s,n.height+l+c,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&d.node.classList.add(e.id),d}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,r=function(r,i,n){var o=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(i,"']"));if(o){var a=o.parentNode,s=t.addBackgroundToAnno(o,r);s&&(a.insertBefore(s.node,o),r.label.mouseEnter&&s.node.addEventListener("mouseenter",r.label.mouseEnter.bind(t,r)),r.label.mouseLeave&&s.node.addEventListener("mouseleave",r.label.mouseLeave.bind(t,r)),r.label.click&&s.node.addEventListener("click",r.label.click.bind(t,r)))}};e.config.annotations.xaxis.forEach((function(t,e){return r(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return r(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return r(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var r,i=this.w,n="y1"===t?e.y:e.y2,o=!1;if(this.annoCtx.invertAxis){var a=i.config.xaxis.convertedCatToNumeric?i.globals.categoryLabels:i.globals.labels,s=a.indexOf(n),l=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(s+1,")"));r=l?parseFloat(l.getAttribute("y")):(i.globals.gridHeight/a.length-1)*(s+1)-i.globals.barHeight,void 0!==e.seriesIndex&&i.globals.barHeight&&(r-=i.globals.barHeight/2*(i.globals.series.length-1)-i.globals.barHeight*e.seriesIndex)}else{var c,u=i.globals.seriesYAxisMap[e.yAxisIndex][0],h=i.config.yaxis[e.yAxisIndex].logarithmic?new Mc(this.annoCtx.ctx).getLogVal(i.config.yaxis[e.yAxisIndex].logBase,n,u)/i.globals.yLogRatio[u]:(n-i.globals.minYArr[u])/(i.globals.yRange[u]/i.globals.gridHeight);r=i.globals.gridHeight-Math.min(Math.max(h,0),i.globals.gridHeight),o=h>i.globals.gridHeight||h<0,!e.marker||void 0!==e.y&&null!==e.y||(r=0),null!==(c=i.config.yaxis[e.yAxisIndex])&&void 0!==c&&c.reversed&&(r=h)}return"string"==typeof n&&n.includes("px")&&(r=parseFloat(n)),{yP:r,clipped:o}}},{key:"getX1X2",value:function(t,e){var r=this.w,i="x1"===t?e.x:e.x2,n=this.annoCtx.invertAxis?r.globals.minY:r.globals.minX,o=this.annoCtx.invertAxis?r.globals.maxY:r.globals.maxX,a=this.annoCtx.invertAxis?r.globals.yRange[0]:r.globals.xRange,s=!1,l=this.annoCtx.inversedReversedAxis?(o-i)/(a/r.globals.gridWidth):(i-n)/(a/r.globals.gridWidth);return"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||r.globals.dataFormatXNumeric||r.config.chart.sparkline.enabled||(l=this.getStringX(i)),"string"==typeof i&&i.includes("px")&&(l=parseFloat(i)),null==i&&e.marker&&(l=r.globals.gridWidth),void 0!==e.seriesIndex&&r.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=r.globals.barWidth/2*(r.globals.series.length-1)-r.globals.barWidth*e.seriesIndex),l>r.globals.gridWidth?(l=r.globals.gridWidth,s=!0):l<0&&(l=0,s=!0),{x:l,clipped:s}}},{key:"getStringX",value:function(t){var e=this.w,r=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var i=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),n=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(i+1,")"));return n&&(r=parseFloat(n.getAttribute("x"))),r}}],r&&Ic(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zc(t){return zc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zc(t)}function Xc(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r12?f-12:0===f?12:f;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(f))).replace(/(^|[^\\])H/g,"$1"+f)).replace(/(^|[^\\])hh+/g,"$1"+l(d))).replace(/(^|[^\\])h/g,"$1"+d);var p=i?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var g=i?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(g))).replace(/(^|[^\\])s/g,"$1"+g);var b=i?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var y=f<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+y)).replace(/(^|[^\\])T/g,"$1"+y.charAt(0));var v=y.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var m=-t.getTimezoneOffset(),x=i||!m?"Z":m>0?"+":"-";if(!i){var w=(m=Math.abs(m))%60;x+=l(Math.floor(m/60))+":"+l(w)}e=e.replace(/(^|[^\\])K/g,"$1"+x);var S=(i?t.getUTCDay():t.getDay())+1;return(e=(e=(e=(e=e.replace(new RegExp(a[0],"g"),a[S])).replace(new RegExp(s[0],"g"),s[S])).replace(new RegExp(n[0],"g"),n[u])).replace(new RegExp(o[0],"g"),o[u])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,r){var i=this.w;void 0!==i.config.xaxis.min&&(t=i.config.xaxis.min),void 0!==i.config.xaxis.max&&(e=i.config.xaxis.max);var n=this.getDate(t),o=this.getDate(e),a=this.formatDate(n,"yyyy MM dd HH mm ss fff").split(" "),s=this.formatDate(o,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(s[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(s[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(s[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(s[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(s[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(s[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(s[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,r){return this.determineDaysOfMonths(t,e)-r}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,r){var i=this.daysCntOfYear[e]+r;return e>1&&this.isLeapYear()&&i++,i}},{key:"determineDaysOfMonths",value:function(t,e){var r=30;switch(t=f.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(r=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:r=31}return r}}],r&&Nc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Vc=Gc;function Uc(t){return Uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uc(t)}function qc(t,e){for(var r=0;r0&&r<100?t.toFixed(1):t.toFixed(0)}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minYArr<4?t.toFixed(1):t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(r,i){void 0!==r.labels.formatter?e.globals.yLabelFormatters[i]=r.labels.formatter:e.globals.yLabelFormatters[i]=function(n){return e.globals.xyCharts?Array.isArray(n)?n.map((function(e){return t.defaultYFormatter(e,r,i)})):t.defaultYFormatter(n,r,i):n}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}],r&&qc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Jc=$c;function Qc(t){return Qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qc(t)}function Kc(t,e){for(var r=0;r4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",l=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],c=this.w,u=void 0===t[i]?"":t[i],h=u,f=c.globals.xLabelFormatter,d=c.config.xaxis.labels.formatter,p=!1,g=new Jc(this.ctx),b=u;l&&(h=g.xLabelFormat(f,u,b,{i,dateFormatter:new Vc(this.ctx).formatDate,w:c}),void 0!==d&&(h=d(u,t[i],{i,dateFormatter:new Vc(this.ctx).formatDate,w:c}))),e.length>0?(n=e[i].unit,o=null,e.forEach((function(t){"month"===t.unit?o="year":"day"===t.unit?o="month":"hour"===t.unit?o="day":"minute"===t.unit&&(o="hour")})),p=o===n,r=e[i].position,h=e[i].value):"datetime"===c.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var y,v=new Pc(this.ctx);y=c.globals.rotateXLabels&&l?v.getTextRects(h,parseInt(s,10),null,"rotate(".concat(c.config.xaxis.labels.rotate," 0 0)"),!1):v.getTextRects(h,parseInt(s,10));var m=!c.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||a.indexOf(h)>=0&&m)&&(h=""),{x:r,text:h,textRect:y,isBold:p}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,r){var i=this.w,n=i.config.xaxis.tickAmount;return"dataPoints"===n&&(n=Math.round(i.globals.gridWidth/120)),n>r||t%Math.round(r/(n+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,r,i,n){var o=this.w;if(0===t&&o.globals.skipFirstTimelinelabel&&(e.text=""),t===r-1&&o.globals.skipLastTimelinelabel&&(e.text=""),o.config.xaxis.labels.hideOverlappingLabels&&i.length>0){var a=n[n.length-1];e.xi.length||i.some((function(t){return Array.isArray(t.seriesName)}))?t:r.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,r=e.config.yaxis[t];if(!r.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!r.showForNullSeries){var i=e.globals.seriesYAxisMap[t],n=new Mc(this.ctx);return i.every((function(t){return n.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var r=this.w;return Array.isArray(t)&&r.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,r.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,r,i,n,o,a){var s=this.w,l=new Pc(this.ctx),c=s.globals.translateY+s.config.yaxis[n].labels.offsetY;if(s.globals.isBarHorizontal?c=0:"heatmap"===s.config.chart.type&&(c+=o/2),i.show&&e>0){!0===s.config.yaxis[n].opposite&&(t+=i.width);for(var u=e;u>=0;u--){var h=l.drawLine(t+r.offsetX-i.width+i.offsetX,c+i.offsetY,t+r.offsetX+i.offsetX,c+i.offsetY,i.color);a.add(h),c+=o}}}}],r&&Kc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ru(t){return ru="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ru(t)}function iu(t,e){for(var r=0;rs){var d=s;s=i,i=d}if(!l||!c){u=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,i+t.offsetY,this._getYAxisAnnotationWidth(t),s-i,0,t.fillColor,t.opacity,1,t.borderColor,o);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(u){var g="right"===t.label.position?n.globals.gridWidth:"center"===t.label.position?n.globals.gridWidth/2:0,b=this.annoCtx.graphics.drawText({x:g+t.label.offsetX,y:(null!=i?i:s)+t.label.offsetY-3,text:h,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});b.attr({rel:r}),e.appendChild(b.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;return e.globals.gridWidth,(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,r=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,i){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,r.node,i)})),r}}])&&iu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function au(t){return au="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},au(t)}function su(t,e){for(var r=0;r-1)){var i=this.helpers.getX1X2("x1",t),n=i.x,o=i.clipped,a=(i=this.helpers.getY1Y2("y1",t)).yP,s=i.clipped;if(f.isNumber(n)&&!s&&!o){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},c=this.annoCtx.graphics.drawMarker(n+t.marker.offsetX,a+t.marker.offsetY,l);e.appendChild(c.node);var u=t.label.text?t.label.text:"",h=this.annoCtx.graphics.drawText({x:n+t.label.offsetX,y:a+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:u,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(h.attr({rel:r}),e.appendChild(h.node),t.customSVG.SVG){var d=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});d.attr({transform:"translate(".concat(n+t.customSVG.offsetX,", ").concat(a+t.customSVG.offsetY,")")}),d.node.innerHTML=t.customSVG.SVG,e.appendChild(d.node)}if(t.image.path){var p=t.image.width?t.image.width:20,g=t.image.height?t.image.height:20;c=this.annoCtx.addImage({x:n+t.image.offsetX-p/2,y:a+t.image.offsetY-g/2,width:p,height:g,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&c.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&c.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&c.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,r=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,i){t.addPointAnnotation(e,r.node,i)})),r}}],r&&su(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const uu=JSON.parse('{"name":"en","options":{"months":["January","February","March","April","May","June","July","August","September","October","November","December"],"shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"days":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"shortDays":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"toolbar":{"exportToSVG":"Download SVG","exportToPNG":"Download PNG","exportToCSV":"Download CSV","menu":"Menu","selection":"Selection","selectionZoom":"Selection Zoom","zoomIn":"Zoom In","zoomOut":"Zoom Out","pan":"Panning","reset":"Reset Zoom"}}}');function hu(t){return hu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hu(t)}function fu(t,e){for(var r=0;r1&&a[s].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:a[s],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,r){t.addImage(e,r)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,r){t.addText(e,r)}))}},{key:"addXaxisAnnotation",value:function(t,e,r){this.xAxisAnnotations.addXaxisAnnotation(t,e,r)}},{key:"addYaxisAnnotation",value:function(t,e,r){this.yAxisAnnotations.addYaxisAnnotation(t,e,r)}},{key:"addPointAnnotation",value:function(t,e,r){this.pointsAnnotations.addPointAnnotation(t,e,r)}},{key:"addText",value:function(t,e){var r=t.x,i=t.y,n=t.text,o=t.textAnchor,a=t.foreColor,s=t.fontSize,l=t.fontFamily,c=t.fontWeight,u=t.cssClass,h=t.backgroundColor,f=t.borderWidth,d=t.strokeDashArray,p=t.borderRadius,g=t.borderColor,b=t.appendTo,y=void 0===b?".apexcharts-svg":b,v=t.paddingLeft,m=void 0===v?4:v,x=t.paddingRight,w=void 0===x?4:x,S=t.paddingBottom,k=void 0===S?2:S,A=t.paddingTop,O=void 0===A?2:A,P=this.w,C=this.graphics.drawText({x:r,y:i,text:n,textAnchor:o||"start",fontSize:s||"12px",fontWeight:c||"regular",fontFamily:l||P.config.chart.fontFamily,foreColor:a||P.config.chart.foreColor,cssClass:u}),j=P.globals.dom.baseEl.querySelector(y);j&&j.appendChild(C.node);var T=C.bbox();if(n){var E=this.graphics.drawRect(T.x-m,T.y-O,T.width+m+w,T.height+k+O,p,h||"transparent",1,f,g,d);j.insertBefore(E.node,C.node)}}},{key:"addImage",value:function(t,e){var r=this.w,i=t.path,n=t.x,o=void 0===n?0:n,a=t.y,s=void 0===a?0:a,l=t.width,c=void 0===l?20:l,u=t.height,h=void 0===u?20:u,f=t.appendTo,d=void 0===f?".apexcharts-svg":f,p=r.globals.dom.Paper.image(i);p.size(c,h).move(o,s);var g=r.globals.dom.baseEl.querySelector(d);return g&&g.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,r){return this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"xaxis",contextMethod:r.addXaxisAnnotation}),r}},{key:"addYaxisAnnotationExternal",value:function(t,e,r){return this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"yaxis",contextMethod:r.addYaxisAnnotation}),r}},{key:"addPointAnnotationExternal",value:function(t,e,r){return void 0===this.invertAxis&&(this.invertAxis=r.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"point",contextMethod:r.addPointAnnotation}),r}},{key:"addAnnotationExternal",value:function(t){var e=t.params,r=t.pushToMemory,i=t.context,n=t.type,o=t.contextMethod,a=i,s=a.w,l=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations")),c=l.childNodes.length+1,u=new pu,h=Object.assign({},"xaxis"===n?u.xAxisAnnotation:"yaxis"===n?u.yAxisAnnotation:u.pointAnnotation),d=f.extend(h,e);switch(n){case"xaxis":this.addXaxisAnnotation(d,l,c);break;case"yaxis":this.addYaxisAnnotation(d,l,c);break;case"point":this.addPointAnnotation(d,l,c)}var p=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(c,"']")),g=this.helpers.addBackgroundToAnno(p,d);return g&&l.insertBefore(g.node,p),r&&s.globals.memory.methodsToExec.push({context:a,id:d.id?d.id:f.randomId(),method:o,label:"addAnnotation",params:e}),i}},{key:"clearAnnotations",value:function(t){for(var e=t.w,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),i=e.globals.memory.methodsToExec.length-1;i>=0;i--)"addText"!==e.globals.memory.methodsToExec[i].label&&"addAnnotation"!==e.globals.memory.methodsToExec[i].label||e.globals.memory.methodsToExec.splice(i,1);r=f.listToArray(r),Array.prototype.forEach.call(r,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var r=t.w,i=r.globals.dom.baseEl.querySelectorAll(".".concat(e));i&&(r.globals.memory.methodsToExec.map((function(t,i){t.id===e&&r.globals.memory.methodsToExec.splice(i,1)})),Array.prototype.forEach.call(i,(function(t){t.parentElement.removeChild(t)})))}}],r&&bu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function mu(t){return mu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mu(t)}function xu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function wu(t){for(var e=1;e\n '.concat(n,'\n - \n ').concat(o,"\n ");return'
'+(r||"")+'
'+i+": "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[a].type||"rangeBar"===t.w.config.series[a].type?u:"".concat(c,""):u)+"
"},Cu=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.opts=e}var e,r;return e=t,(r=[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){return this.hideYAxis(),f.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var r=e.w.config.series[e.seriesIndex].name;return null!==t?r+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),wu(wu({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var r=e.seriesIndex,i=e.dataPointIndex,n=e.w;return t._getBoxTooltip(n,r,i,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var r=e.seriesIndex,i=e.dataPointIndex,n=e.w;return t._getBoxTooltip(n,r,i,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var r=e.seriesIndex,i=e.dataPointIndex,n=e.w,o=function(){var t=n.globals.seriesRangeStart[r][i];return n.globals.seriesRangeEnd[r][i]-t};return n.globals.comboCharts?"rangeBar"===n.config.series[r].type||"rangeArea"===n.config.series[r].type?o():t:o()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Ou(wu(wu({},t),{},{isTimeline:!0})),r=e.color,i=e.seriesName,n=e.ylabel,o=e.startVal,a=e.endVal;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t):function(t){var e=Ou(t),r=e.color,i=e.seriesName,n=e.ylabel,o=e.start,a=e.end;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,r;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(r=t.plotOptions.bar)&&void 0!==r&&r.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Ou(t),r=e.color,i=e.seriesName,n=e.ylabel,o=e.start,a=e.end;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t)}}}}},{key:"brush",value:function(t){return f.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,r){t.yaxis[r].min=0,t.yaxis[r].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return wu(wu({},t),{},{plotOptions:wu(wu({},t.plotOptions),{},{bar:wu(wu({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,r){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return f.isNumber(t)?Math.floor(t):t};var i=t.xaxis.labels.formatter,n=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return r&&r.length&&(n=r.map((function(t){return Array.isArray(t)?t:String(t)}))),n&&n.length&&(t.xaxis.labels.formatter=function(t){return f.isNumber(t)?i(n[Math.floor(t)-1]):i(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,r,i,n){var o=t.globals.seriesCandleO[e][r],a=t.globals.seriesCandleH[e][r],s=t.globals.seriesCandleM[e][r],l=t.globals.seriesCandleL[e][r],c=t.globals.seriesCandleC[e][r];return t.config.series[e].type&&t.config.series[e].type!==n?'
\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][r],"\n
"):'
')+"
".concat(i[0],': ')+o+"
"+"
".concat(i[1],': ')+a+"
"+(s?"
".concat(i[2],': ')+s+"
":"")+"
".concat(i[3],': ')+l+"
"+"
".concat(i[4],': ')+c+"
"}}])&&ku(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ju(t){return ju="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ju(t)}function Tu(t,e){for(var r=0;r1&&n.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new pu;return t.annotations.yaxis=f.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new pu;return t.annotations.xaxis=f.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new pu;return t.annotations.points=f.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}],r&&Tu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Lu(t){return Lu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lu(t)}function Iu(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);rn?i:n,a=t.image,s=0,l=0;void 0===t.width&&void 0===t.height?void 0!==r.fill.image.width&&void 0!==r.fill.image.height?(s=r.fill.image.width+1,l=r.fill.image.height):(s=o+1,l=o):(s=t.width,l=t.height);var c=document.createElementNS(e.globals.SVGNS,"pattern");Pc.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:s+"px",height:l+"px"});var u=document.createElementNS(e.globals.SVGNS,"image");c.appendChild(u),u.setAttributeNS(window.SVG.xlink,"href",a),Pc.setAttrs(u,{x:0,y:0,preserveAspectRatio:"none",width:s+"px",height:l+"px"}),u.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(t){var e=this.w,r=e.config.chart.type;return("bar"===r||"rangeBar"===r)&&e.config.plotOptions.bar.distributed||"heatmap"===r||"treemap"===r?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var r,i=this.w,n=null,o=null,a=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Wu(t))){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return o=t.done,t},e:function(t){a=!0,n=t},f:function(){try{o||null==e.return||e.return()}finally{if(a)throw n}}}}(t);try{for(a.s();!(r=a.n()).done;){var s=r.value;s>=e.threshold?(null===n||s>n)&&(n=s):(null===o||s-1?b=f.getOpacityFromRGBA(u):v=f.hexToRgba(f.rgb2hex(u),b),t.opacity&&(b=t.opacity),"pattern"===g&&(a=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:a,fillColor:u,fillOpacity:b,defaultColor:v})),y){var m=function(t){return function(t){if(Array.isArray(t))return Gu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Wu(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(l.fill.gradient.colorStops)||[],x=l.fill.gradient.type;c&&(m[this.seriesIndex]=this.computeColorStops(n.globals.series[this.seriesIndex],l.plotOptions.line.colors),x="vertical"),s=this.handleGradientFill({type:x,fillConfig:t.fillConfig,fillColor:u,fillOpacity:b,colorStops:m,i:this.seriesIndex})}if("image"===g){var w=l.fill.image.src,S=t.patternID?t.patternID:"",k="pattern".concat(n.globals.cuid).concat(t.seriesNumber+1).concat(S);-1===this.patternIDs.indexOf(k)&&(this.clippedImgArea({opacity:b,image:Array.isArray(w)?t.seriesNumber-1&&(p=f.getOpacityFromRGBA(d));var g=void 0===s.gradient.opacityTo?i:Array.isArray(s.gradient.opacityTo)?s.gradient.opacityTo[a]:s.gradient.opacityTo;if(void 0===s.gradient.gradientToColors||0===s.gradient.gradientToColors.length)h="dark"===s.gradient.shade?u.shadeColor(-1*parseFloat(s.gradient.shadeIntensity),r.indexOf("rgb")>-1?f.rgb2hex(r):r):u.shadeColor(parseFloat(s.gradient.shadeIntensity),r.indexOf("rgb")>-1?f.rgb2hex(r):r);else if(s.gradient.gradientToColors[l.seriesNumber]){var b=s.gradient.gradientToColors[l.seriesNumber];h=b,b.indexOf("rgba")>-1&&(g=f.getOpacityFromRGBA(b))}else h=r;if(s.gradient.gradientFrom&&(d=s.gradient.gradientFrom),s.gradient.gradientTo&&(h=s.gradient.gradientTo),s.gradient.inverseColors){var y=d;d=h,h=y}return d.indexOf("rgb")>-1&&(d=f.rgb2hex(d)),h.indexOf("rgb")>-1&&(h=f.rgb2hex(h)),c.drawGradient(e,d,h,p,g,l.size,s.gradient.stops,o,a)}}],r&&Vu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Zu=qu;function $u(t){return $u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$u(t)}function Ju(t,e){for(var r=0;r0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],o=this.w,a=e,s=t,l=null,c=new Pc(this.ctx),u=o.config.markers.discrete&&o.config.markers.discrete.length;if(Array.isArray(s.x))for(var h=0;h0:o.config.markers.size>0)||n||u){g||(b+=" w".concat(f.randomId()));var y=this.getMarkerConfig({cssClass:b,seriesIndex:e,dataPointIndex:p});o.config.series[a].data[p]&&(o.config.series[a].data[p].fillColor&&(y.pointFillColor=o.config.series[a].data[p].fillColor),o.config.series[a].data[p].strokeColor&&(y.pointStrokeColor=o.config.series[a].data[p].strokeColor)),void 0!==i&&(y.pSize=i),(s.x[h]<-o.globals.markers.largestSize||s.x[h]>o.globals.gridWidth+o.globals.markers.largestSize||s.y[h]<-o.globals.markers.largestSize||s.y[h]>o.globals.gridHeight+o.globals.markers.largestSize)&&(y.pSize=0),g||((o.globals.markers.size[e]>0||n||u)&&!l&&(l=c.group({class:n||u?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(o.globals.cuid,")")),(d=c.drawMarker(s.x[h],s.y[h],y)).attr("rel",p),d.attr("j",p),d.attr("index",e),d.node.setAttribute("default-marker-size",y.pSize),new vc(this.ctx).setSelectionFilter(d,e,p),this.addEvents(d),l&&l.add(d))}else void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e].push([s.x[h],s.y[h]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,r=t.seriesIndex,i=t.dataPointIndex,n=void 0===i?null:i,o=t.radius,a=void 0===o?null:o,s=t.size,l=void 0===s?null:s,c=t.strokeWidth,u=void 0===c?null:c,h=this.w,f=this.getMarkerStyle(r),d=null===l?h.globals.markers.size[r]:l,p=h.config.markers;return null!==n&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===r&&t.dataPointIndex===n&&(f.pointStrokeColor=t.strokeColor,f.pointFillColor=t.fillColor,d=t.size,f.pointShape=t.shape)})),{pSize:null===a?d:a,pRadius:null!==a?a:p.radius,pointStrokeWidth:null!==u?u:Array.isArray(p.strokeWidth)?p.strokeWidth[r]:p.strokeWidth,pointStrokeColor:f.pointStrokeColor,pointFillColor:f.pointFillColor,shape:f.pointShape||(Array.isArray(p.shape)?p.shape[r]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[r]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[r]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[r]:p.fillOpacity,seriesIndex:r}}},{key:"addEvents",value:function(t){var e=this.w,r=new Pc(this.ctx);t.node.addEventListener("mouseenter",r.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",r.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",r.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",r.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,r=e.globals.markers.colors,i=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(i)?i[t]:i,pointFillColor:Array.isArray(r)?r[t]:r}}}],r&&Ju(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function th(t){return th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},th(t)}function eh(t,e){for(var r=0;rp.maxBubbleRadius&&(d=p.maxBubbleRadius)}var g=a.x[u],b=a.y[u];if(d=d||0,null!==b&&void 0!==i.globals.series[o][h]||(f=!1),f){var y=this.drawPoint(g,b,d,o,h,e);c.add(y)}l.add(c)}}},{key:"drawPoint",value:function(t,e,r,i,n,o){var a=this.w,s=i,l=new b(this.ctx),c=new vc(this.ctx),u=new Zu(this.ctx),h=new Ku(this.ctx),f=new Pc(this.ctx),d=h.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:s,dataPointIndex:n,radius:"bubble"===a.config.chart.type||a.globals.comboCharts&&a.config.series[i]&&"bubble"===a.config.series[i].type?r:null}),p=u.fillPath({seriesNumber:i,dataPointIndex:n,color:d.pointFillColor,patternUnits:"objectBoundingBox",value:a.globals.series[i][o]}),g=f.drawMarker(t,e,d);if(a.config.series[s].data[n]&&a.config.series[s].data[n].fillColor&&(p=a.config.series[s].data[n].fillColor),g.attr({fill:p}),a.config.chart.dropShadow.enabled){var y=a.config.chart.dropShadow;c.dropShadow(g,y,i)}if(!this.initialAnim||a.globals.dataChanged||a.globals.resized)a.globals.animationEnded=!0;else{var v=a.config.chart.animations.speed;l.animateMarker(g,v,a.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(g)}),100)}))}return g.attr({rel:n,j:n,index:i,"default-marker-size":d.pSize}),c.setSelectionFilter(g,i,n),h.addEvents(g),g.node.classList.add("apexcharts-marker"),g}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}],r&&eh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function nh(t){return nh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nh(t)}function oh(t,e){for(var r=0;rs.globals.gridHeight+h&&(e=s.globals.gridHeight+h/2),void 0===s.globals.dataLabelsRects[i]&&(s.globals.dataLabelsRects[i]=[]),s.globals.dataLabelsRects[i].push({x:t,y:e,width:u,height:h});var f=s.globals.dataLabelsRects[i].length-2,d=void 0!==s.globals.lastDrawnDataLabelsIndexes[i]?s.globals.lastDrawnDataLabelsIndexes[i][s.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(void 0!==s.globals.dataLabelsRects[i][f]){var p=s.globals.dataLabelsRects[i][d];(t>p.x+p.width||e>p.y+p.height||e+he.globals.gridWidth+y.textRects.width+30)&&(s="");var v=e.globals.dataLabels.style.colors[o];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(v=e.globals.dataLabels.style.colors[a]),"function"==typeof v&&(v=v({series:e.globals.series,seriesIndex:o,dataPointIndex:a,w:e})),f&&(v=f);var m=h.offsetX,x=h.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(m=0,x=0),e.globals.isSlopeChart&&(0!==a&&(m=-2*h.offsetX+5),0!==a&&a!==e.config.series[o].data.length-1&&(m=0)),y.drawnextLabel){if((b=r.drawText({width:100,height:parseInt(h.style.fontSize,10),x:i+m,y:n+x,foreColor:v,textAnchor:l||h.textAnchor,text:s,fontSize:c||h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight||"normal"})).attr({class:g||"apexcharts-datalabel",cx:i,cy:n}),h.dropShadow.enabled){var w=h.dropShadow;new vc(this.ctx).dropShadow(b,w)}u.add(b),void 0===e.globals.lastDrawnDataLabelsIndexes[o]&&(e.globals.lastDrawnDataLabelsIndexes[o]=[]),e.globals.lastDrawnDataLabelsIndexes[o].push(a)}return b}},{key:"addBackgroundToDataLabel",value:function(t,e){var r=this.w,i=r.config.dataLabels.background,n=i.padding,o=i.padding/2,a=e.width,s=e.height,l=new Pc(this.ctx).drawRect(e.x-n,e.y-o/2,a+2*n,s+o,i.borderRadius,"transparent"!==r.config.chart.background&&r.config.chart.background?r.config.chart.background:"#fff",i.opacity,i.borderWidth,i.borderColor);return i.dropShadow.enabled&&new vc(this.ctx).dropShadow(l,i.dropShadow),l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),r=0;r0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.w,n=f.clone(i.globals.initialSeries);i.globals.previousPaths=[],r?(i.globals.collapsedSeries=[],i.globals.ancillaryCollapsedSeries=[],i.globals.collapsedSeriesIndices=[],i.globals.ancillaryCollapsedSeriesIndices=[]):n=this.emptyCollapsedSeries(n),i.config.series=n,t&&(e&&(i.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(n,i.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,r=0;r-1&&(t[r].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,r=this.getSeriesByName(t),i=parseInt(null==r?void 0:r.getAttribute("data:realIndex"),10),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),o=null,a=null,s=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){o=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(i,"']")),a=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(i,"']"));var l=e.globals.seriesYAxisReverseMap[i];s=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else o=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+1,"']"));else o=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+1,"'] path"));for(var c=0;c=t.from&&(o0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this.w,i=0;if(r.config.series.length>1)for(var n=r.config.series.map((function(t,i){return t.data&&t.data.length>0&&-1===r.globals.collapsedSeriesIndices.indexOf(i)&&(!r.globals.comboCharts||0===e.length||e.length&&e.indexOf(r.config.series[i].type)>-1)?i:-1})),o="asc"===t?0:n.length-1;"asc"===t?o=0;"asc"===t?o++:o--)if(-1!==n[o]){i=n[o];break}return i}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,r,i){for(var n=e[r].childNodes,o={type:i,paths:[],realIndex:e[r].getAttribute("data:realIndex")},a=0;a0)for(var i=function(e){for(var r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),i=[],n=function(t){var e=function(e){return r[t].getAttribute(e)},n={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};i.push({rect:n,color:r[t].getAttribute("color")})},o=0;o0?t:[]}))}}],r&&uh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function dh(t){return dh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dh(t)}function ph(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new fh(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var r=this.w.config,i=this.w.globals,n="boxPlot"===r.chart.type||"boxPlot"===r.series[e].type,o=0;o=5?this.twoDSeries.push(f.parseNumber(t[e].data[o][4])):this.twoDSeries.push(f.parseNumber(t[e].data[o][1])),i.dataFormatXNumeric=!0),"datetime"===r.xaxis.type){var a=new Date(t[e].data[o][0]);a=new Date(a).getTime(),this.twoDSeriesX.push(a)}else this.twoDSeriesX.push(t[e].data[o][0]);for(var s=0;s-1&&(o=this.activeSeriesIndex);for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:this.ctx,i=this.w.config,n=this.w.globals,o=new Vc(r),a=i.labels.length>0?i.labels.slice():i.xaxis.categories.slice();n.isRangeBar="rangeBar"===i.chart.type&&n.isBarHorizontal,n.hasXaxisGroups="category"===i.xaxis.type&&i.xaxis.group.groups.length>0,n.hasXaxisGroups&&(n.groups=i.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?n.seriesNames.push(t.name):n.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var s=[],l=function(t){return function(t){if(Array.isArray(t))return ph(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ph(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ph(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(new Set(i.series.map((function(t){return t.group}))));i.series.forEach((function(t,e){var r=l.indexOf(t.group);s[r]||(s[r]=[]),s[r].push(n.seriesNames[e])})),n.seriesGroups=s;for(var c=function(){for(var t=0;t0&&(this.twoDSeriesX=a,n.seriesX.push(this.twoDSeriesX))),n.labels.push(this.twoDSeriesX);var h=t[u].data.map((function(t){return f.parseNumber(t)}));n.series.push(h)}n.seriesZ.push(this.threeDSeries),void 0!==t[u].color?n.seriesColors.push(t[u].color):n.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,r=this.w.config;e.series=t.slice(),e.seriesNames=r.labels.slice();for(var i=0;i0?r.labels=e.xaxis.categories:e.labels.length>0?r.labels=e.labels.slice():this.fallbackToCategory?(r.labels=r.labels[0],r.seriesRange.length&&(r.seriesRange.map((function(t){t.forEach((function(t){r.labels.indexOf(t.x)<0&&t.x&&r.labels.push(t.x)}))})),r.labels=Array.from(new Set(r.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric&&(new Cu(e).convertCatToNumericXaxis(e,this.ctx,r.seriesX[0]),this._generateExternalLabels(t))):this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,r=this.w.config,i=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var n=r.series.map((function(t,e){return t.data.filter((function(t,e,r){return r.findIndex((function(e){return e.x===t.x}))===e}))})),o=n.reduce((function(t,e,r,i){return i[t].length>e.length?t:r}),0),a=0;a0&&n==r.length&&e.push(i)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}],r&&gh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function vh(t){return vh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vh(t)}function mh(t){return function(t){if(Array.isArray(t))return xh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return xh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xh(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=10?new Date(t).toDateString():f.isNumber(t)?t:t.split(o).join("")},y=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},v=Math.max.apply(Math,mh(r.map((function(t){return t.data?t.data.length:0})))),m=new yh(this.ctx),x=new eu(this.ctx),w=function(t){var r="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var i=l.globals.yLabelFormatters[0],n=new fh(e.ctx).getActiveConfigSeriesIndex();r=i(l.globals.labels[t],{seriesIndex:n,dataPointIndex:t,w:l})}else r=x.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?r=l.config.xaxis.categories[t]:l.config.labels.length&&(r=l.config.labels[t]))}else r=l.config.labels[t];return null===r?"nullvalue":(Array.isArray(r)&&(r=r.join(" ")),f.isNumber(r)?r:r.split(o).join(""))};h.push(l.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===l.config.chart.type?(h.push("minimum"),h.push("q1"),h.push("median"),h.push("q3"),h.push("maximum")):"candlestick"===l.config.chart.type?(h.push("open"),h.push("high"),h.push("low"),h.push("close")):"rangeBar"===l.config.chart.type?(h.push("minimum"),h.push("maximum")):r.map((function(t,e){var r=(t.name?t.name:"series-".concat(e))+"";l.globals.axisCharts&&h.push(r.split(o).join("")?r.split(o).join(""):"series-".concat(e))})),l.globals.axisCharts||(h.push(l.config.chart.toolbar.export.csv.headerValue),d.push(h.join(o))),l.globals.allSeriesHasEqualX||!l.globals.axisCharts||l.config.xaxis.categories.length||l.config.labels.length?r.map((function(t,e){l.globals.axisCharts?function(t,e){if(h.length&&0===e&&d.push(h.join(o)),t.data){t.data=t.data.length&&t.data||mh(Array(v)).map((function(){return""}));for(var i=0;i0&&!i.globals.isBarHorizontal&&(this.xaxisLabels=i.globals.timescaleLabels.slice()),i.config.xaxis.overwriteCategories&&(this.xaxisLabels=i.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===i.config.xaxis.position?this.offY=0:this.offY=i.globals.gridHeight,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.xaxisBorderWidth=i.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=i.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=i.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}var e,r;return e=t,r=[{key:"drawXaxis",value:function(){var t=this.w,e=new Pc(this.ctx),r=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),i=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});r.add(i);for(var n=[],o=0;o6&&void 0!==arguments[6]?arguments[6]:{},c=[],u=[],h=this.w,f=l.xaxisFontSize||this.xaxisFontSize,d=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,g=l.fontWeight||h.config.xaxis.labels.style.fontWeight,b=l.cssClass||h.config.xaxis.labels.style.cssClass,y=h.globals.padHorizontal,v=i.length,m="category"===h.config.xaxis.type?h.globals.dataPoints:v;if(0===m&&v>m&&(m=v),n){var x=m>1?m-1:m;a=h.globals.gridWidth/Math.min(x,v-1),y=y+o(0,a)/2+h.config.xaxis.labels.offsetX}else a=h.globals.gridWidth/m,y=y+o(0,a)+h.config.xaxis.labels.offsetX;for(var w=function(n){var l=y-o(n,a)/2+h.config.xaxis.labels.offsetX;0===n&&1===v&&a/2===y&&1===m&&(l=h.globals.gridWidth/2);var x=s.axesUtils.getLabel(i,h.globals.timescaleLabels,l,n,c,f,t),w=28;if(h.globals.rotateXLabels&&t&&(w=22),h.config.xaxis.title.text&&"top"===h.config.xaxis.position&&(w+=parseFloat(h.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(f)+(h.globals.xAxisLabelsHeight-h.globals.xAxisGroupLabelsHeight)+(h.globals.rotateXLabels?10:0)),x=void 0!==h.config.xaxis.tickAmount&&"dataPoints"!==h.config.xaxis.tickAmount&&"datetime"!==h.config.xaxis.type?s.axesUtils.checkLabelBasedOnTickamount(n,x,v):s.axesUtils.checkForOverflowingLabels(n,x,v,c,u),h.config.xaxis.labels.show){var S=e.drawText({x:x.x,y:s.offY+h.config.xaxis.labels.offsetY+w-("top"===h.config.xaxis.position?h.globals.xAxisHeight+h.config.xaxis.axisTicks.height-2:0),text:x.text,textAnchor:"middle",fontWeight:x.isBold?600:g,fontSize:f,fontFamily:d,foreColor:Array.isArray(p)?t&&h.config.xaxis.convertedCatToNumeric?p[h.globals.minX+n-1]:p[n]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+b});if(r.add(S),S.on("click",(function(t){if("function"==typeof h.config.chart.events.xAxisLabelClick){var e=Object.assign({},h,{labelIndex:n});h.config.chart.events.xAxisLabelClick(t,s.ctx,e)}})),t){var k=document.createElementNS(h.globals.SVGNS,"title");k.textContent=Array.isArray(x.text)?x.text.join(" "):x.text,S.node.appendChild(k),""!==x.text&&(c.push(x.text),u.push(x))}}ni.globals.gridWidth)){var o=this.offY+i.config.xaxis.axisTicks.offsetY;if(e=e+o+i.config.xaxis.axisTicks.height,"top"===i.config.xaxis.position&&(e=o-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){var a=new Pc(this.ctx).drawLine(t+i.config.xaxis.axisTicks.offsetX,o+i.config.xaxis.offsetY,n+i.config.xaxis.axisTicks.offsetX,e+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);r.add(a),a.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],r=this.xaxisLabels.length,i=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var n=0;n0){var c=n[n.length-1].getBBox(),u=n[0].getBBox();c.x<-20&&n[n.length-1].parentNode.removeChild(n[n.length-1]),u.x+u.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&n[0].parentNode.removeChild(n[0]);for(var h=0;ht.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&(this.xaxisLabels=r.globals.timescaleLabels.slice())}var e,r;return e=t,r=[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,r=new Pc(this.ctx);t||(t=r.group({class:"apexcharts-grid"}));var i=r.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),n=r.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(n),t.add(i),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,r=new Pc(this.ctx),i=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,function(t){return function(t){if(Array.isArray(t))return Eh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Eh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Eh(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.config.stroke.width)):t.config.stroke.width,n=function(t){var r=document.createElementNS(e.SVGNS,"clipPath");return r.setAttribute("id",t),r};e.dom.elGridRectMask=n("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=n("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=n("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=n("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=n("nonForecastMask".concat(e.cuid));var o=0,a=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(o=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),a=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=r.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=r.drawRect(-i/2-o-2,-i/2-2,e.gridWidth+i+a+o+4,e.gridHeight+i+4,0,"#fff");var s=t.globals.markers.largestSize;e.dom.elGridRectMarker=r.drawRect(-s,-s,e.gridWidth+2*s,e.gridHeight+2*s,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,r=t.x1,i=t.y1,n=t.x2,o=t.y2,a=t.xCount,s=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===a-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:r,y1:i,x2:n,y2:o,xCount:a,parent:s});var c=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var u=l.globals.groups;if(u){for(var h=0,f=0;h0&&"datetime"!==t.config.xaxis.type&&(n=e.yAxisScale[i].result.length-1)),this._drawXYLines({xCount:n,tickAmount:l})):(n=l,l=e.xTickAmount,this._drawInvertedXYLines({xCount:n,tickAmount:l})),this.drawGridBands(n,l),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/n}}},{key:"drawGridBands",value:function(t,e){var r,i,n=this,o=this.w;if((null===(r=o.config.grid.row.colors)||void 0===r?void 0:r.length)>0&&function(t,r,i,a,s,l){for(var c=0,u=0;c=o.config.grid.row.colors.length&&(u=0),n._drawGridBandRect({c:u,x1:0,y1:a,x2:s,y2:l,type:"row"}),a+=o.globals.gridHeight/e}(0,e,0,0,o.globals.gridWidth,o.globals.gridHeight/e),(null===(i=o.config.grid.column.colors)||void 0===i?void 0:i.length)>0){var a=o.globals.isBarHorizontal||"on"!==o.config.xaxis.tickPlacement||"category"!==o.config.xaxis.type&&!o.config.xaxis.convertedCatToNumeric?t:t-1;o.globals.isXNumeric&&(a=o.globals.xAxisScale.result.length-1);for(var s=o.globals.padHorizontal,l=o.globals.padHorizontal+o.globals.gridWidth/a,c=o.globals.gridHeight,u=0,h=0;u=o.config.grid.column.colors.length&&(h=0),"datetime"===o.config.xaxis.type&&(s=this.xaxisLabels[u].position,l=((null===(f=this.xaxisLabels[u+1])||void 0===f?void 0:f.position)||o.globals.gridWidth)-this.xaxisLabels[u].position),this._drawGridBandRect({c:h,x1:s,y1:0,x2:l,y2:c,type:"column"}),s+=o.globals.gridWidth/a}}}}],r&&Mh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const _h=Ih;function Rh(t){return Rh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rh(t)}function zh(t,e){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:0,s=1e-11,l=this.w,c=l.globals;c.isBarHorizontal?(r=l.config.xaxis,i=Math.max((c.svgWidth-100)/25,2)):(r=l.config.yaxis[a],i=Math.max((c.svgHeight-100)/15,2)),f.isNumber(i)||(i=10),n=void 0!==r.min&&null!==r.min,o=void 0!==r.max&&null!==r.min;var u=void 0!==r.stepSize&&null!==r.stepSize,h=void 0!==r.tickAmount&&null!==r.tickAmount,d=h?r.tickAmount:c.niceScaleDefaultTicks[Math.min(Math.round(i/2),c.niceScaleDefaultTicks.length-1)];if(c.isMultipleYAxis&&!h&&c.multiAxisTickAmount>0&&(d=c.multiAxisTickAmount,h=!0),d="dataPoints"===d?c.dataPoints-1:Math.abs(Math.round(d)),(t===Number.MIN_VALUE&&0===e||!f.isNumber(t)&&!f.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=f.isNumber(r.min)?r.min:0,e=f.isNumber(r.max)?r.max:t+d,c.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var p=e;e=t,t=p}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var g=[];d<1&&(d=1);var b=d,y=Math.abs(e-t);!n&&t>0&&t/y<.15&&(t=0,n=!0),!o&&e<0&&-e/y<.15&&(e=0,o=!0);var v=(y=Math.abs(e-t))/b,m=v,x=Math.floor(Math.log10(m)),w=Math.pow(10,x),S=Math.ceil(m/w);if(v=m=(S=c.niceScaleAllowedMagMsd[0===c.yValueDecimal?0:1][S])*w,c.isBarHorizontal&&r.stepSize&&"datetime"!==r.type?(v=r.stepSize,u=!0):u&&(v=r.stepSize),u&&r.forceNiceScale){var k=Math.floor(Math.log10(v));v*=Math.pow(10,x-k)}if(n&&o){var A=y/b;if(h)if(u)if(0!=f.mod(y,v)){var O=f.getGCD(v,A);v=A/O<10?O:A}else 0==f.mod(v,A)?v=A:(A=v,h=!1);else v=A;else if(u)0==f.mod(y,v)?A=v:v=A;else if(0==f.mod(y,v))A=v;else{A=y/(b=Math.ceil(y/v));var P=f.getGCD(y,v);y/Pi&&(t=e-v*d,t+=v*Math.floor((C-t)/v))}else if(n)if(h)e=t+v*b;else{var j=e;e=v*Math.ceil(e/v),Math.abs(e-t)/f.getGCD(y,v)>i&&(e=t+v*d,e+=v*Math.ceil((j-e)/v))}}else if(c.isMultipleYAxis&&h){var T=v*Math.floor(t/v),E=T+v*b;E0&&t16&&f.getPrimeFactors(b).length<2&&b++,!h&&r.forceNiceScale&&0===c.yValueDecimal&&b>y&&(b=y,v=Math.round(y/b)),b>i&&(!h&&!u||r.forceNiceScale)){var M=f.getPrimeFactors(b),L=M.length-1,I=b;t:for(var _=0;_F);return{result:g,niceMin:g[0],niceMax:g[g.length-1]}}},{key:"linearScale",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,o=Math.abs(e-t),a=[];if(t===e)return{result:a=[t],niceMin:a[0],niceMax:a[a.length-1]};"dataPoints"===(r=this._adjustTicksForSmallRange(r,i,o))&&(r=this.w.globals.dataPoints-1),n||(n=o/r),n=Math.round(10*(n+Number.EPSILON))/10,r===Number.MAX_VALUE&&(r=5,n=1);for(var s=t;r>=0;)a.push(s),s=f.preciseAddition(s,n),r-=1;return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,r){e<=0&&(e=Math.max(t,r)),t<=0&&(t=Math.min(e,r));for(var i=[],n=Math.ceil(Math.log(e)/Math.log(r)+1),o=Math.floor(Math.log(t)/Math.log(r));o5?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=o.forceNiceScale?this.logarithmicScaleNice(e,r,o.logBase):this.logarithmicScale(e,r,o.logBase)):r!==-Number.MAX_VALUE&&f.isNumber(r)&&e!==Number.MAX_VALUE&&f.isNumber(e)?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=this.niceScale(e,r,t)):i.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var r=this.w,i=r.globals,n=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&f.isNumber(e)){var o=i.xTickAmount+1;n<10&&n>1&&(o=n),i.xAxisScale=this.linearScale(t,e,o,0,r.config.xaxis.stepSize)}else i.xAxisScale=this.linearScale(0,10,10);return i.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,r=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var i=r.seriesYAxisMap,n=r.minYArr,o=r.maxYArr;r.allSeriesCollapsed=!0,r.barGroups=[],i.forEach((function(i,a){var s=[];i.forEach((function(t){var r=e.series[t].group;s.indexOf(r)<0&&s.push(r)})),i.length>0?function(){var l,c,u=Number.MAX_VALUE,h=-Number.MAX_VALUE,f=u,d=h;if(e.chart.stacked)!function(){var t=new Array(r.dataPoints).fill(0),n=[],o=[],p=[];s.forEach((function(){n.push(t.map((function(){return Number.MIN_VALUE}))),o.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var g=function(t){!l&&e.series[i[t]].type&&(l=e.series[i[t]].type);var u=i[t];c=e.series[u].group?e.series[u].group:"axis-".concat(a),!(r.collapsedSeriesIndices.indexOf(u)<0&&r.ancillaryCollapsedSeriesIndices.indexOf(u)<0)||(r.allSeriesCollapsed=!1,s.forEach((function(t,i){if(e.series[u].group===t)for(var a=0;a=0?o[i][a]+=s:p[i][a]+=s,n[i][a]+=s,f=Math.min(f,s),d=Math.max(d,s)}}))),"bar"!==l&&"column"!==l||r.barGroups.push(c)},b=0;bt.length)&&(e=t.length);for(var r=0,i=Array(e);r1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w.config,o=this.w.globals,a=-Number.MAX_VALUE,s=Number.MIN_VALUE;null===i&&(i=t+1);var l=o.series,c=l,u=l;"candlestick"===n.chart.type?(c=o.seriesCandleL,u=o.seriesCandleH):"boxPlot"===n.chart.type?(c=o.seriesCandleO,u=o.seriesCandleC):o.isRangeData&&(c=o.seriesRangeStart,u=o.seriesRangeEnd);var h=!1;if(o.seriesX.length>=i){var d,p=null===(d=o.brushSource)||void 0===d?void 0:d.w.config.chart.brush;(n.chart.zoom.enabled&&n.chart.zoom.autoScaleYaxis||null!=p&&p.enabled&&null!=p&&p.autoScaleYaxis)&&(h=!0)}for(var g=t;gy&&o.seriesX[g][v]>n.xaxis.max;v--);}for(var m=y;m<=v&&mc[g][m]&&c[g][m]<0&&(s=c[g][m])}else o.hasNullValues=!0}"bar"!==b&&"column"!==b||(s<0&&a<0&&(a=0,r=Math.max(r,0)),s===Number.MIN_VALUE&&(s=0,e=Math.min(e,0)))}return"rangeBar"===n.chart.type&&o.seriesRangeStart.length&&o.isBarHorizontal&&(s=e),"bar"===n.chart.type&&(s<0&&a<0&&(a=0),s===Number.MIN_VALUE&&(s=0)),{minY:s,maxY:a,lowestY:e,highestY:r}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var r,i=Number.MAX_VALUE;if(t.isMultipleYAxis){i=Number.MAX_VALUE;for(var n=0;nt.dataPoints&&0!==t.dataPoints&&(i=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(i=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var n=t.maxX-t.minX;n<30&&(i=n-1)}}else i=e.xaxis.tickAmount;if(t.xTickAmount=i,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var o=[],a=t.minX-1;a0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,i-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());r&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var n=e-i[r-1];n>0&&(t.minXDiff=Math.min(n,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var r=e.seriesGroups;r.length||(r=[this.w.globals.seriesNames.map((function(t){return t}))]);var i={},n={};r.forEach((function(r){i[r]=[],n[r]=[],t.w.config.series.map((function(t,i){return r.indexOf(e.seriesNames[i])>-1?i:null})).filter((function(t){return null!==t})).forEach((function(o){for(var a=0;a0?i[r][a]+=parseFloat(e.series[o][a])+1e-4:n[r][a]+=parseFloat(e.series[o][a]))}}))})),Object.entries(i).forEach((function(t){var r=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Hh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hh(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,1)[0];i[r].forEach((function(t,o){e.maxY=Math.max(e.maxY,i[r][o]),e.minY=Math.min(e.minY,n[r][o])}))}))}}}],r&&Fh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Wh=Nh;function Gh(t){return Gh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gh(t)}function Vh(t,e){for(var r=0;r=0;g--){var b=h(d[g],g,e),y=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(y*=-1);var v=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(i.colors,t),x=Array.isArray(m)?m[g]:m,w=f.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),S=r.drawText({x:y,y:p,text:w.includes(b)&&!e.config.yaxis[t].labels.showDuplicates?"":b,textAnchor:v,fontSize:n,fontFamily:o,fontWeight:a,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:x,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(i.cssClass)});l.add(S),this.addTooltip(S,b),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(r,S,firstLabel,e.config.yaxis[t].labels.rotate),p+=u}}return this.addYAxisTitle(r,s,t),this.addAxisBorder(r,s,t,c,u),s}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var r=document.createElementNS(this.w.globals.SVGNS,"title");r.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(r)}},{key:"rotateLabel",value:function(t,e,r,i){var n=t.rotateAroundCenter(r.node),o=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(i," ").concat(n.x," ").concat(o.y,")"))}},{key:"addYAxisTitle",value:function(t,e,r){var i=this.w;if(void 0!==i.config.yaxis[r].title.text){var n=t.group({class:"apexcharts-yaxis-title"}),o=i.config.yaxis[r].opposite?i.globals.translateYAxisX[r]:0,a=t.drawText({x:o,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[r].title.offsetY,text:i.config.yaxis[r].title.text,textAnchor:"end",foreColor:i.config.yaxis[r].title.style.color,fontSize:i.config.yaxis[r].title.style.fontSize,fontWeight:i.config.yaxis[r].title.style.fontWeight,fontFamily:i.config.yaxis[r].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(i.config.yaxis[r].title.style.cssClass)});n.add(a),e.add(n)}}},{key:"addAxisBorder",value:function(t,e,r,i,n){var o=this.w,a=o.config.yaxis[r].axisBorder,s=31+a.offsetX;if(o.config.yaxis[r].opposite&&(s=-31-a.offsetX),a.show){var l=t.drawLine(s,o.globals.translateY+a.offsetY-2,s,o.globals.gridHeight+o.globals.translateY+a.offsetY+2,a.color,0,a.width);e.add(l)}o.config.yaxis[r].axisTicks.show&&this.axesUtils.drawYAxisTicks(s,i,a,o.config.yaxis[r].axisTicks,r,n,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,r=new Pc(this.ctx),i=r.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),n=r.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});i.add(n);var o=e.globals.yAxisScale[t].result.length-1,a=e.globals.gridWidth/o+.1,s=a+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,c=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),u=e.globals.timescaleLabels;if(u.length>0&&(this.xaxisLabels=u.slice(),o=(c=u.slice()).length),e.config.xaxis.labels.show)for(var h=u.length?0:o;u.length?h=0;u.length?h++:h--){var f=l(c[h],h,e),d=e.globals.gridWidth+e.globals.padHorizontal-(s-a+e.config.xaxis.labels.offsetX);if(u.length){var p=this.axesUtils.getLabel(c,u,d,h,this.drawnLabels,this.xaxisFontSize);d=p.x,f=p.text,this.drawnLabels.push(p.text),0===h&&e.globals.skipFirstTimelinelabel&&(f=""),h===c.length-1&&e.globals.skipLastTimelinelabel&&(f="")}var g=r.drawText({x:d,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});n.add(g),g.tspan(f),this.addTooltip(g,f),s+=a}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,r=new Pc(this.ctx),i=e.config.xaxis.axisBorder;if(i.show){var n=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(n-=15);var o=r.drawLine(e.globals.padHorizontal+n+i.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,i.color,0,i.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(o):t.add(o)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,r=new Pc(this.ctx);if(void 0!==e.config.xaxis.title.text){var i=r.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),n=r.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});i.add(n),t.add(i)}}},{key:"yAxisTitleRotate",value:function(t,e){var r=this.w,i=new Pc(this.ctx),n=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),o=n?n.getBoundingClientRect():{width:0,height:0},a=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),s=a?a.getBoundingClientRect():{width:0,height:0};if(a){var l=this.xPaddingForYAxisTitle(t,o,s,e);a.setAttribute("x",l.xPos-(e?10:0));var c=i.rotateAroundCenter(a);a.setAttribute("transform","rotate(".concat(e?-1*r.config.yaxis[t].title.rotate:r.config.yaxis[t].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,r,i){var n=this.w,o=0,a=10;return void 0===n.config.yaxis[t].title.text||t<0?{xPos:o,padd:0}:(i?o=e.width+n.config.yaxis[t].title.offsetX+r.width/2+a/2:(o=-1*e.width+n.config.yaxis[t].title.offsetX+a/2+r.width/2,n.globals.isBarHorizontal&&(a=25,o=-1*e.width-n.config.yaxis[t].title.offsetX-a)),{xPos:o,padd:a})}},{key:"setYAxisXPosition",value:function(t,e){var r=this.w,i=0,n=0,o=18,a=1;r.config.yaxis.length>1&&(this.multipleYs=!0),r.config.yaxis.forEach((function(s,l){var c=r.globals.ignoreYAxisIndexes.includes(l)||!s.show||s.floating||0===t[l].width,u=t[l].width+e[l].width;s.opposite?r.globals.isBarHorizontal?(n=r.globals.gridWidth+r.globals.translateX-1,r.globals.translateYAxisX[l]=n-s.labels.offsetX):(n=r.globals.gridWidth+r.globals.translateX+a,c||(a+=u+20),r.globals.translateYAxisX[l]=n-s.labels.offsetX+20):(i=r.globals.translateX-o,c||(o+=u+20),r.globals.translateYAxisX[l]=i+s.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;f.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,r){var i=t.config.yaxis[r];if(i&&!i.floating&&void 0!==i.labels.align){var n=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(r,"'] .apexcharts-yaxis-texts-g")),o=f.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(r,"'] .apexcharts-yaxis-label"))),a=n.getBoundingClientRect();o.forEach((function(t){t.setAttribute("text-anchor",i.labels.align)})),"left"!==i.labels.align||i.opposite?"center"===i.labels.align?n.setAttribute("transform","translate(".concat(a.width/2*(i.opposite?1:-1),", 0)")):"right"===i.labels.align&&i.opposite&&n.setAttribute("transform","translate(".concat(a.width,", 0)")):n.setAttribute("transform","translate(-".concat(a.width,", 0)"))}}))}}],r&&Vh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Zh(t){return Zh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zh(t)}function $h(t,e){for(var r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var r=e.filter((function(e){return e.name===t}))[0];if(!r)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var i=f.extend(uu,r);this.w.globals.locale=i.options}}])&&tf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function nf(t){return nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nf(t)}function of(t,e){for(var r=0;re.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var o=new Mu({}),a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n[0].breakpoint,a=window.innerWidth>0?window.innerWidth:screen.width;if(a>i){var s=f.clone(r.globals.initialConfig);s.series=f.clone(r.config.series);var l=Mc.extendArrayProps(o,s,r);t=f.extend(l,t),t=f.extend(r.config,t),e.overrideResponsiveOptions(t)}else for(var c=0;ct.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&"function"==typeof t[0]?(this.isColorFn=!0,r.config.series.map((function(i,n){var o=t[n]||t[0];return"function"==typeof o?o({value:r.globals.axisCharts?r.globals.series[n][0]||0:r.globals.series[n],seriesIndex:n,dataPointIndex:n,w:e.w}):o}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,r){t&&(e[r]=t)}))}},{key:"getMonochromeColors",value:function(t,e,r){var i=t.color,n=t.shadeIntensity,o=t.shadeTo,a=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,s=1/(a/n),l=0;return Array.from({length:a},(function(){var t="dark"===o?r.shadeColor(-1*l,i):r.shadeColor(l,i);return l+=s,t}))}},{key:"applyColorTypes",value:function(t,e){var r=this,i=this.w;t.forEach((function(t){i.globals[t].colors=void 0===i.config[t].colors?r.isColorFn?i.config.colors:e:i.config[t].colors.slice(),r.pushExtraColors(i.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.w,n=e||i.globals.series.length;if(null===r&&(r=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===i.config.chart.type&&i.config.plotOptions.heatmap&&i.config.plotOptions.heatmap.colorScale.inverse),r&&i.globals.series.length&&(n=i.globals.series[i.globals.maxValsInArrayIndex].length*i.globals.series.length),t.lengtht.length)&&(e=t.length);for(var r=0,i=Array(e);rt.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,r=[];e.config.series.forEach((function(n,o){n.data.forEach((function(n,a){var s;s=e.globals.series[o][a],i=e.config.dataLabels.formatter(s,{ctx:t.dCtx.ctx,seriesIndex:o,dataPointIndex:a,w:e}),r.push(i)}))}));var i=f.getLargestStringFromArr(r),n=new Pc(this.dCtx.ctx),o=e.config.dataLabels.style,a=n.getTextRects(i,parseInt(o.fontSize),o.fontFamily);return{width:1.05*a.width,height:a.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var r=t;if(this.w.globals.isMultiLineX){var i=e.map((function(t,e){return Array.isArray(t)?t.length:1})),n=Math.max.apply(Math,function(t){return function(t){if(Array.isArray(t))return Pf(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Pf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pf(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i));r=e[i.indexOf(n)]}return r}}],r&&Cf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ef(t){return Ef="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ef(t)}function Mf(t,e){for(var r=0;r0){var i=this.getxAxisTimeScaleLabelsCoords();t={width:i.width,height:i.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var n=e.globals.xLabelFormatter,o=f.getLargestStringFromArr(r),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,r);e.globals.isBarHorizontal&&(a=o=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var s=new Jc(this.dCtx.ctx),l=o;o=s.xLabelFormat(n,o,l,{i:void 0,dateFormatter:new Vc(this.dCtx.ctx).formatDate,w:e}),a=s.xLabelFormat(n,a,l,{i:void 0,dateFormatter:new Vc(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===o||""===String(o).trim())&&(a=o="1");var c=new Pc(this.dCtx.ctx),u=c.getTextRects(o,e.config.xaxis.labels.style.fontSize),h=u;if(o!==a&&(h=c.getTextRects(a,e.config.xaxis.labels.style.fontSize)),(t={width:u.width>=h.width?u.width:h.width,height:u.height>=h.height?u.height:h.height}).width*r.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var d=function(t){return c.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};u=d(o),o!==a&&(h=d(a)),t.height=(u.height>h.height?u.height:h.height)/1.5,t.width=u.width>h.width?u.width:h.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var r,i=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,n=e.globals.groups.map((function(t){return t.title})),o=f.getLargestStringFromArr(n),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,n),s=new Pc(this.dCtx.ctx),l=s.getTextRects(o,i),c=l;return o!==a&&(c=s.getTextRects(a,i)),r={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},e.config.xaxis.labels.show||(r={width:0,height:0}),{width:r.width,height:r.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,r=0;if(void 0!==t.config.xaxis.title.text){var i=new Pc(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=i.width,r=i.height}return{width:e,height:r}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var r=this.dCtx.timescaleLabels.map((function(t){return t.value})),i=r.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Pc(this.dCtx.ctx).getTextRects(i,e.config.xaxis.labels.style.fontSize)).width*r.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,r=this.w,i=r.globals,n=r.config,o=n.xaxis.type,a=t.width;i.skipLastTimelinelabel=!1,i.skipFirstTimelinelabel=!1;var s=r.config.yaxis[0].opposite&&r.globals.isBarHorizontal;n.yaxis.forEach((function(t,l){s?(e.dCtx.gridPad.left1&&function(t){return-1!==i.collapsedSeriesIndices.indexOf(t)}(s)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var s=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+a/1.75-e.dCtx.yAxisWidthRight,c=s.position-a/1.75+e.dCtx.yAxisWidthLeft,u="right"===r.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>i.svgWidth-i.translateX-u&&(i.skipLastTimelinelabel=!0),c<-(t.show&&!t.floating||"bar"!==n.chart.type&&"candlestick"!==n.chart.type&&"rangeBar"!==n.chart.type&&"boxPlot"!==n.chart.type?10:a/1.75)&&(i.skipFirstTimelinelabel=!0)}else"datetime"===o?e.dCtx.gridPad.right(null===(i=String(u(e,s)))||void 0===i?void 0:i.length)?t:e}),h),p=d=u(d,s);if(void 0!==d&&0!==d.length||(d=l.niceMax),e.globals.isBarHorizontal){i=0;var g=e.globals.labels.slice();d=f.getLargestStringFromArr(g),d=u(d,{seriesIndex:a,dataPointIndex:-1,w:e}),p=t.dCtx.dimHelpers.getLargestStringFromMultiArr(d,g)}var b=new Pc(t.dCtx.ctx),y="rotate(".concat(o.labels.rotate," 0 0)"),v=b.getTextRects(d,o.labels.style.fontSize,o.labels.style.fontFamily,y,!1),m=v;d!==p&&(m=b.getTextRects(p,o.labels.style.fontSize,o.labels.style.fontFamily,y,!1)),r.push({width:(c>m.width||c>v.width?c:m.width>v.width?m.width:v.width)+i,height:m.height>v.height?m.height:v.height})}else r.push({width:0,height:0})})),r}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,r=[];return e.config.yaxis.map((function(e,i){if(e.show&&void 0!==e.title.text){var n=new Pc(t.dCtx.ctx),o="rotate(".concat(e.title.rotate," 0 0)"),a=n.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,o,!1);r.push({width:a.width,height:a.height})}else r.push({width:0,height:0})})),r}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,r=0,i=0,n=t.globals.yAxisScale.length>1?10:0,o=new eu(this.dCtx.ctx),a=function(a,s){var l=t.config.yaxis[s].floating,c=0;a.width>0&&!l?(c=a.width+n,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(s)&&(c=c-a.width-n)):c=l||o.isYAxisHidden(s)?0:5,t.config.yaxis[s].opposite?i+=c:r+=c,e+=c};return t.globals.yLabelsCoords.map((function(t,e){a(t,e)})),t.globals.yTitleCoords.map((function(t,e){a(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=r,this.dCtx.yAxisWidthRight=i,e}}],r&&Rf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Df(t){return Df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Df(t)}function Yf(t,e){for(var r=0;r0&&(s=i.comboBarCount),i.collapsedSeries.forEach((function(t){n(t.type)&&(s-=1)})),r.chart.stacked&&(s=1);var l=n(o)||i.comboBarCount>0,c=Math.abs(i.initialMaxX-i.initialMinX);if(l&&i.isXNumeric&&!i.isBarHorizontal&&s>0&&0!==c){c<=3&&(c=i.dataPoints);var u=c/t,h=i.minXDiff&&i.minXDiff/u>0?i.minXDiff/u:0;h>t/2&&(h/=2),(a=h*parseInt(r.plotOptions.bar.columnWidth,10)/100)<1&&(a=1),i.barPadForNumericAxis=a}return a}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,r=e.globals,i=this.dCtx.isSparkline||!r.axisCharts?0:10;["title","subtitle"].forEach((function(n){void 0!==e.config[n].text?i+=e.config[n].margin:i+=t.dCtx.isSparkline||!r.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||r.axisCharts||(i+=10);var n=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),o=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");r.gridHeight-=n.height+o.height+i,r.translateY+=n.height+o.height+i}},{key:"setGridXPosForDualYAxis",value:function(t,e){var r=this.w,i=new eu(this.dCtx.ctx);r.config.yaxis.forEach((function(n,o){-1!==r.globals.ignoreYAxisIndexes.indexOf(o)||n.floating||i.isYAxisHidden(o)||(n.opposite&&(r.globals.translateX-=e[o].width+t[o].width+parseInt(n.labels.style.fontSize,10)/1.2+12),r.globals.translateX<2&&(r.globals.translateX=2))}))}}],r&&Yf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Bf(t){return Bf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bf(t)}function Nf(t,e){if(t){if("string"==typeof t)return Wf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wf(t,e):void 0}}function Wf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var r=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||Nf(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),i=r[0],n=r[1];t.gridPad[i]=Math.max(n,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(i/2,this.gridPad.top),this.gridPad.bottom=Math.max(i/2,this.gridPad.bottom)),r.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),r.gridHeight=r.gridHeight-this.gridPad.top-this.gridPad.bottom,r.gridWidth=r.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var n=this.dimGrid.gridPadForColumnsInNumericAxis(r.gridWidth);r.gridWidth=r.gridWidth-2*n,r.translateX=r.translateX+this.gridPad.left+this.xPadLeft+(n>0?n:0),r.translateY=r.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,r=e.globals,i=this.dimYAxis.getyAxisLabelsCoords(),n=this.dimYAxis.getyAxisTitleCoords();r.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,r){e.globals.yLabelsCoords.push({width:i[r].width,index:r}),e.globals.yTitleCoords.push({width:n[r].width,index:r})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var o=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),s=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(o,s,a),r.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,r.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(r.rotateXLabels=!1,r.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),r.translateXAxisY=r.translateXAxisY+e.config.xaxis.labels.offsetY,r.translateXAxisX=r.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,c=this.xAxisHeight;r.xAxisLabelsHeight=this.xAxisHeight-s.height,r.xAxisGroupLabelsHeight=r.xAxisLabelsHeight-o.height,r.xAxisLabelsWidth=this.xAxisWidth,r.xAxisHeight=this.xAxisHeight;var u=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,c=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,c=0,u=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(o);var h=function(){r.translateX=l+t.datalabelsCoords.width,r.gridHeight=r.svgHeight-t.lgRect.height-c-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),r.gridWidth=r.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(u=r.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":r.translateY=u,h();break;case"top":r.translateY=this.lgRect.height+u,h();break;case"left":r.translateY=u,r.translateX=this.lgRect.width+l+this.datalabelsCoords.width,r.gridHeight=r.svgHeight-c-12,r.gridWidth=r.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":r.translateY=u,r.translateX=l+this.datalabelsCoords.width,r.gridHeight=r.svgHeight-c-12,r.gridWidth=r.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(n,i),new qh(this.ctx).setYAxisXPosition(i,n)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,r=t.config,i=0;t.config.legend.show&&!t.config.legend.floating&&(i=20);var n="pie"===r.chart.type||"polarArea"===r.chart.type||"donut"===r.chart.type?"pie":"radialBar",o=r.plotOptions[n].offsetY,a=r.plotOptions[n].offsetX;if(!r.legend.show||r.legend.floating){e.gridHeight=e.svgHeight;var s=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(s,e.gridHeight),e.translateY=o,void(e.translateX=a+(e.svgWidth-e.gridWidth)/2)}switch(r.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=o-10,e.translateX=a+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+o+10,e.translateX=a+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-i,e.gridHeight="auto"!==r.chart.height?e.svgHeight:e.gridWidth,e.translateY=o,e.translateX=a+this.lgRect.width+i;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-i-5,e.gridHeight="auto"!==r.chart.height?e.svgHeight:e.gridWidth,e.translateY=o,e.translateX=a+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,r){var i=this.w,n=i.globals.hasXaxisGroups?2:1,o=r.height+t.height+e.height,a=i.globals.isMultiLineX?1.2:i.globals.LINE_HEIGHT_RATIO,s=i.globals.rotateXLabels?22:10,l=i.globals.rotateXLabels&&"bottom"===i.config.legend.position?10:0;this.xAxisHeight=o*a+n*s+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeightu&&(this.yAxisWidth=u)}}],r&&Gf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function qf(t){return qf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qf(t)}function Zf(t,e){for(var r=0;r0){for(var o=0;o1;if(this.legendHelpers.appendToForeignObject(),(i||!e.axisCharts)&&r.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===r.legend.position||"top"===r.legend.position?this.legendAlignHorizontal():"right"!==r.legend.position&&"left"!==r.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,r=t.fillcolor,i=this.w,n=document.createElement("span");n.classList.add("apexcharts-legend-marker");var o=i.config.legend.markers.shape||i.config.markers.shape,a=o;Array.isArray(o)&&(a=o[e]);var s=Array.isArray(i.config.legend.markers.size)?parseFloat(i.config.legend.markers.size[e]):parseFloat(i.config.legend.markers.size),l=Array.isArray(i.config.legend.markers.offsetX)?parseFloat(i.config.legend.markers.offsetX[e]):parseFloat(i.config.legend.markers.offsetX),c=Array.isArray(i.config.legend.markers.offsetY)?parseFloat(i.config.legend.markers.offsetY[e]):parseFloat(i.config.legend.markers.offsetY),u=Array.isArray(i.config.legend.markers.strokeWidth)?parseFloat(i.config.legend.markers.strokeWidth[e]):parseFloat(i.config.legend.markers.strokeWidth),h=n.style;if(h.height=2*(s+u)+"px",h.width=2*(s+u)+"px",h.left=l+"px",h.top=c+"px",i.config.legend.markers.customHTML)h.background="transparent",h.color=r[e],Array.isArray(i.config.legend.markers.customHTML)?i.config.legend.markers.customHTML[e]&&(n.innerHTML=i.config.legend.markers.customHTML[e]()):n.innerHTML=i.config.legend.markers.customHTML();else{var f=new Ku(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(a),seriesIndex:e,strokeWidth:u,size:s}),d=window.SVG().addTo(n).size("100%","100%"),p=new Pc(this.ctx).drawMarker(0,0,td(td({},f),{},{pointFillColor:Array.isArray(r)?r[e]:f.pointFillColor,shape:a}));i.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),d.add(p)}return n}},{key:"drawLegends",value:function(){var t=this,e=this.w,r=e.config.legend.fontFamily,i=e.globals.seriesNames,n=e.config.legend.markers.fillColors?e.config.legend.markers.fillColors.slice():e.globals.colors.slice();if("heatmap"===e.config.chart.type){var o=e.config.plotOptions.heatmap.colorScale.ranges;i=o.map((function(t){return t.name?t.name:t.from+" - "+t.to})),n=o.map((function(t){return t.color}))}else this.isBarsDistributed&&(i=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(i=e.config.legend.customLegendItems);for(var a=e.globals.legendFormatter,s=e.config.legend.inverseOrder,l=s?i.length-1:0;s?l>=0:l<=i.length-1;s?l--:l++){var c,u=a(i[l],{seriesIndex:l,w:e}),h=!1,d=!1;if(e.globals.collapsedSeries.length>0)for(var p=0;p0)for(var g=0;g0?l-10:0)+(c>0?c-10:0)}i.style.position="absolute",o=o+t+r.config.legend.offsetX,a=a+e+r.config.legend.offsetY,i.style.left=o+"px",i.style.top=a+"px","right"===r.config.legend.position&&(i.style.left="auto",i.style.right=25+r.config.legend.offsetX+"px"),["width","height"].forEach((function(t){i.style[t]&&(i.style[t]=parseInt(r.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new Uf(this.ctx),r=e.dimHelpers.getTitleSubtitleCoords("title"),i=e.dimHelpers.getTitleSubtitleCoords("subtitle"),n=0;"top"===t.config.legend.position&&(n=r.height+i.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,n)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),r=0;"left"===t.config.legend.position&&(r=20),"right"===t.config.legend.position&&(r=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(r,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,r=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(r){var i=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,i,this.w]),new fh(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&r&&new fh(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var r=parseInt(t.target.getAttribute("rel"),10)-1,i="true"===t.target.getAttribute("data:collapsed"),n=this.w.config.chart.events.legendClick;"function"==typeof n&&n(this.ctx,r,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,r,this.w]);var o=this.w.config.legend.markers.onClick;"function"==typeof o&&t.target.classList.contains("apexcharts-legend-marker")&&(o(this.ctx,r,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,r,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(r,i)}}}],r&&rd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const od=nd;var ad=r(75),sd=r.n(ad),ld=r(541),cd=r.n(ld),ud=r(955),hd=r.n(ud),fd=r(646),dd=r.n(fd),pd=r(606),gd=r.n(pd),bd=r(802),yd=r.n(bd),vd=r(627),md=r.n(vd);function xd(t){return xd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xd(t)}function wd(t,e){for(var r=0;rthis.wheelDelay&&(this.executeMouseWheelZoom(t),r.globals.lastWheelExecution=i),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){i-r.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),r.globals.lastWheelExecution=i)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,r=this.w;this.minX=r.globals.isRangeBar?r.globals.minY:r.globals.minX,this.maxX=r.globals.isRangeBar?r.globals.maxY:r.globals.maxX;var i=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(i){var n,o,a,s=(t.clientX-i.left)/i.width,l=this.minX,c=this.maxX,u=c-l;if(t.deltaY<0){var h=l+s*u;o=h-(n=.5*u)/2,a=h+n/2}else o=l-(n=1.5*u)/2,a=c+n/2;if(!r.globals.isRangeBar){o=Math.max(o,r.globals.initialMinX),a=Math.min(a,r.globals.initialMaxX);var f=.01*(r.globals.initialMaxX-r.globals.initialMinX);if(a-o0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,r,i,n){return"l"===n||"r"===n?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resizing",this.selectionDragging.bind(this,"resizing")))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(Pd(Pd({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var r=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,i=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-r;t.globals.isRangeBar&&(r=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,i=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var n={x:r,y:0,width:i,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(n),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,r=t.y,i=t.width,n=t.height,o=t.translateX,a=void 0===o?0:o,s=t.translateY,l=void 0===s?0:s,c=this.w,u=this.zoomRect,h=this.selectionRect;if(this.dragged||null!==c.globals.selection){var f={transform:"translate("+a+", "+l+")"};c.globals.zoomEnabled&&this.dragged&&(i<0&&(i=1),u.attr({x:e,y:r,width:i,height:n,fill:c.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":c.config.chart.zoom.zoomedArea.fill.opacity,stroke:c.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":c.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":c.config.chart.zoom.zoomedArea.stroke.opacity}),Pc.setAttrs(u.node,f)),c.globals.selectionEnabled&&(h.attr({x:e,y:r,width:i>0?i:0,height:n>0?n:0,fill:c.config.chart.selection.fill.color,"fill-opacity":c.config.chart.selection.fill.opacity,stroke:c.config.chart.selection.stroke.color,"stroke-width":c.config.chart.selection.stroke.width,"stroke-dasharray":c.config.chart.selection.stroke.dashArray,"stroke-opacity":c.config.chart.selection.stroke.opacity}),Pc.setAttrs(h.node,f))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,r=t.zoomtype,i=this.w,n=e,o=this.gridRect.getBoundingClientRect(),a=n.startX-1,s=n.startY,l=!1,c=!1,u=n.clientX-o.left-a,h=n.clientY-o.top-s,f={translateX:i.globals.translateX,translateY:i.globals.translateY};return Math.abs(u+a)>i.globals.gridWidth?u=i.globals.gridWidth-a:n.clientX-o.left<0&&(u=a),a>n.clientX-o.left&&(l=!0,u=Math.abs(u)),s>n.clientY-o.top&&(c=!0,h=Math.abs(h)),f=Pd(Pd({},f="x"===r?{x:l?a-u:a,y:0,width:u,height:i.globals.gridHeight}:"y"===r?{x:0,y:c?s-h:s,width:i.globals.gridWidth,height:h}:{x:l?a-u:a,y:c?s-h:s,width:u,height:h}),{},{translateX:i.globals.translateX,translateY:i.globals.translateY}),n.drawSelectionRect(f),n.selectionDragging("resizing"),f}},{key:"selectionDragging",value:function(t,e){var r=this,i=this.w;if(e){e.preventDefault();var n=e.detail,o=n.handler,a=n.box,s=a.x,l=a.y;sthis.constraints.x2&&(s=this.constraints.x2-a.w),a.y2>this.constraints.y2&&(l=this.constraints.y2-a.h),o.move(s,l);var c=this.xyRatios,u=this.selectionRect,h=0;"resizing"===t&&(h=30);var f=function(t){return parseFloat(u.node.getAttribute(t))},d={x:f("x"),y:f("y"),width:f("width"),height:f("height")};i.globals.selection=d,"function"==typeof i.config.chart.events.selection&&i.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,n,o,a=r.gridRect.getBoundingClientRect(),s=u.node.getBoundingClientRect();i.globals.isRangeBar?(t=i.globals.yAxisScale[0].niceMin+(s.left-a.left)*c.invertedYRatio,e=i.globals.yAxisScale[0].niceMin+(s.right-a.left)*c.invertedYRatio,n=0,o=1):(t=i.globals.xAxisScale.niceMin+(s.left-a.left)*c.xRatio,e=i.globals.xAxisScale.niceMin+(s.right-a.left)*c.xRatio,n=i.globals.yAxisScale[0].niceMin+(a.bottom-s.bottom)*c.yRatio[0],o=i.globals.yAxisScale[0].niceMax-(s.top-a.top)*c.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:n,max:o}};i.config.chart.events.selection(r.ctx,l),i.config.chart.brush.enabled&&void 0!==i.config.chart.events.brushScrolled&&i.config.chart.events.brushScrolled(r.ctx,l)}),h))}}},{key:"selectionDrawn",value:function(t){var e=t.context,r=t.zoomtype,i=this.w,n=e,o=this.xyRatios,a=this.ctx.toolbar;if(n.startX>n.endX){var s=n.startX;n.startX=n.endX,n.endX=s}if(n.startY>n.endY){var l=n.startY;n.startY=n.endY,n.endY=l}var c=void 0,u=void 0;i.globals.isRangeBar?(c=i.globals.yAxisScale[0].niceMin+n.startX*o.invertedYRatio,u=i.globals.yAxisScale[0].niceMin+n.endX*o.invertedYRatio):(c=i.globals.xAxisScale.niceMin+n.startX*o.xRatio,u=i.globals.xAxisScale.niceMin+n.endX*o.xRatio);var h=[],d=[];if(i.config.yaxis.forEach((function(t,e){var r=i.globals.seriesYAxisMap[e][0];h.push(i.globals.yAxisScale[e].niceMax-o.yRatio[r]*n.startY),d.push(i.globals.yAxisScale[e].niceMax-o.yRatio[r]*n.endY)})),n.dragged&&(n.dragX>10||n.dragY>10)&&c!==u)if(i.globals.zoomEnabled){var p=f.clone(i.globals.initialConfig.yaxis),g=f.clone(i.globals.initialConfig.xaxis);if(i.globals.zoomed=!0,i.config.xaxis.convertedCatToNumeric&&(c=Math.floor(c),u=Math.floor(u),c<1&&(c=1,u=i.globals.dataPoints),u-c<2&&(u=c+1)),"xy"!==r&&"x"!==r||(g={min:c,max:u}),"xy"!==r&&"y"!==r||p.forEach((function(t,e){p[e].min=d[e],p[e].max=h[e]})),a){var b=a.getBeforeZoomRange(g,p);b&&(g=b.xaxis?b.xaxis:g,p=b.yaxis?b.yaxis:p)}var y={xaxis:g};i.config.chart.group||(y.yaxis=p),n.ctx.updateHelpers._updateOptions(y,!1,n.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof i.config.chart.events.zoomed&&a.zoomCallback(g,p)}else if(i.globals.selectionEnabled){var v,m=null;v={min:c,max:u},"xy"!==r&&"y"!==r||(m=f.clone(i.config.yaxis)).forEach((function(t,e){m[e].min=d[e],m[e].max=h[e]})),i.globals.selection=n.selection,"function"==typeof i.config.chart.events.selection&&i.config.chart.events.selection(n.ctx,{xaxis:v,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,r=this.w,i=e;if(void 0!==r.globals.lastClientPosition.x){var n=r.globals.lastClientPosition.x-i.clientX,o=r.globals.lastClientPosition.y-i.clientY;Math.abs(n)>Math.abs(o)&&n>0?this.moveDirection="left":Math.abs(n)>Math.abs(o)&&n<0?this.moveDirection="right":Math.abs(o)>Math.abs(n)&&o>0?this.moveDirection="up":Math.abs(o)>Math.abs(n)&&o<0&&(this.moveDirection="down")}r.globals.lastClientPosition={x:i.clientX,y:i.clientY};var a=r.globals.isRangeBar?r.globals.minY:r.globals.minX,s=r.globals.isRangeBar?r.globals.maxY:r.globals.maxX;r.config.xaxis.convertedCatToNumeric||i.panScrolled(a,s)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,r=t.globals.maxX,i=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+i,r=t.globals.maxX+i):"right"===this.moveDirection&&(e=t.globals.minX-i,r=t.globals.maxX-i),e=Math.floor(e),r=Math.floor(r),this.updateScrolledChart({xaxis:{min:e,max:r}},e,r)}},{key:"panScrolled",value:function(t,e){var r=this.w,i=this.xyRatios,n=f.clone(r.globals.initialConfig.yaxis),o=i.xRatio,a=r.globals.minX,s=r.globals.maxX;r.globals.isRangeBar&&(o=i.invertedYRatio,a=r.globals.minY,s=r.globals.maxY),"left"===this.moveDirection?(t=a+r.globals.gridWidth/15*o,e=s+r.globals.gridWidth/15*o):"right"===this.moveDirection&&(t=a-r.globals.gridWidth/15*o,e=s-r.globals.gridWidth/15*o),r.globals.isRangeBar||(tr.globals.initialMaxX)&&(t=a,e=s);var l={xaxis:{min:t,max:e}};r.config.chart.group||(l.yaxis=n),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,r){var i=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof i.config.chart.events.scrolled&&i.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:r}})}}],r&&jd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(kd);function Rd(t){return Rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rd(t)}function zd(t){return function(t){if(Array.isArray(t))return Xd(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Xd(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xd(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);rs||p>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):o.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):o.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var g=Math.round(d/c),b=Math.floor(p/u);h&&!o.config.xaxis.convertedCatToNumeric&&(g=Math.ceil(d/c),g-=1);var y=null,v=null,m=o.globals.seriesXvalues.map((function(t){return t.filter((function(t){return f.isNumber(t)}))})),x=o.globals.seriesYvalues.map((function(t){return t.filter((function(t){return f.isNumber(t)}))}));if(o.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),S=d*(w.width/s),k=p*(w.height/l);y=(v=this.closestInMultiArray(S,k,m,x)).index,g=v.j,null!==y&&(m=o.globals.seriesXvalues[y],g=(v=this.closestInArray(S,m)).index)}return o.globals.capturedSeriesIndex=null===y?-1:y,(!g||g<1)&&(g=0),o.globals.isBarHorizontal?o.globals.capturedDataPointIndex=b:o.globals.capturedDataPointIndex=g,{capturedSeries:y,j:o.globals.isBarHorizontal?b:g,hoverX:d,hoverY:p}}},{key:"closestInMultiArray",value:function(t,e,r,i){var n=this.w,o=0,a=null,s=-1;n.globals.series.length>1?o=this.getFirstActiveXArray(r):a=0;var l=r[o][0],c=Math.abs(t-l);if(r.forEach((function(e){e.forEach((function(e,r){var i=Math.abs(t-e);i<=c&&(c=i,s=r)}))})),-1!==s){var u=i[o][s],h=Math.abs(e-u);a=o,i.forEach((function(t,r){var i=Math.abs(e-t[s]);i<=h&&(h=i,a=r)}))}return{index:a,j:s}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,r=0,i=t.map((function(t,e){return t.length>0?e:-1})),n=0;n0)for(var i=0;i *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=zd(t)).sort((function(t,e){var r=Number(t.getAttribute("data:realIndex")),i=Number(e.getAttribute("data:realIndex"));return ir?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var r=Number(t.getAttribute("cx")),i=Number(t.getAttribute("cy")),n=t.getAttribute("shape");return new Pc(this.ctx).getMarkerPath(r,i,n,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,r=e.config.markers.hover.size;return void 0===r&&(r=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),r}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,r=this.ttCtx;0===r.allTooltipSeriesGroups.length&&(r.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var i=r.allTooltipSeriesGroups,n=0;n ').concat(r.attrs.name,""),e+="
".concat(r.val,"
")})),v.innerHTML=t+"",m.innerHTML=e+""};a?l.globals.seriesGoals[e][r]&&Array.isArray(l.globals.seriesGoals[e][r])?x():(v.innerHTML="",m.innerHTML=""):x()}else v.innerHTML="",m.innerHTML="";if(null!==p&&(i[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,i[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:""),a&&g[0]){if(l.config.tooltip.hideEmptySeries){var w=i[e].querySelector(".apexcharts-tooltip-marker"),S=i[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(u)?(w.style.display="none",S.style.display="none"):(w.style.display="block",S.style.display="block")}null==u||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&-1===c.tConfig.enabledOnSeries.indexOf(e)?g[0].parentNode.style.display="none":g[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&-1===c.tConfig.enabledOnSeries.indexOf(e)&&(g[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var r=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));i&&(i.classList.add("apexcharts-active"),i.style.display=r.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,r=t.j,i=this.w,n=this.ctx.series.filteredSeriesX(),o="",a="",s=null,l=null,c={series:i.globals.series,seriesIndex:e,dataPointIndex:r,w:i},u=i.globals.ttZFormatter;null===r?l=i.globals.series[e]:i.globals.isXNumeric&&"treemap"!==i.config.chart.type?(o=n[e][r],0===n[e].length&&(o=n[this.tooltipUtil.getFirstActiveXArray(n)][r])):o=new yh(this.ctx).isFormatXY()?void 0!==i.config.series[e].data[r]?i.config.series[e].data[r].x:"":void 0!==i.globals.labels[r]?i.globals.labels[r]:"";var h=o;return o=i.globals.isXNumeric&&"datetime"===i.config.xaxis.type?new Jc(this.ctx).xLabelFormat(i.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new Vc(this.ctx).formatDate,w:this.w}):i.globals.isBarHorizontal?i.globals.yLabelFormatters[0](h,c):i.globals.xLabelFormatter(h,c),void 0!==i.config.tooltip.x.formatter&&(o=i.globals.ttKeyFormatter(h,c)),i.globals.seriesZ.length>0&&i.globals.seriesZ[e].length>0&&(s=u(i.globals.seriesZ[e][r],i)),a="function"==typeof i.config.xaxis.tooltip.formatter?i.globals.xaxisTooltipFormatter(h,c):o,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(o)?o.join(" "):o,xAxisTTVal:Array.isArray(a)?a.join(" "):a,zVal:s}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,r=t.j,i=t.y1,n=t.y2,o=t.w,a=this.ttCtx.getElTooltip(),s=o.config.tooltip.custom;Array.isArray(s)&&s[e]&&(s=s[e]),a.innerHTML=s({ctx:this.ctx,series:o.globals.series,seriesIndex:e,dataPointIndex:r,y1:i,y2:n,w:o})}}],r&&Gd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function qd(t){return qd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qd(t)}function Zd(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null,r=this.ttCtx,i=this.w,n=r.getElXCrosshairs(),o=t-r.xcrosshairsWidth/2,a=i.globals.labels.slice().length;if(null!==e&&(o=i.globals.gridWidth/a*e),null===n||i.globals.isBarHorizontal||(n.setAttribute("x",o),n.setAttribute("x1",o),n.setAttribute("x2",o),n.setAttribute("y2",i.globals.gridHeight),n.classList.add("apexcharts-active")),o<0&&(o=0),o>i.globals.gridWidth&&(o=i.globals.gridWidth),r.isXAxisTooltipEnabled){var s=o;"tickWidth"!==i.config.xaxis.crosshairs.width&&"barWidth"!==i.config.xaxis.crosshairs.width||(s=o+r.xcrosshairsWidth/2),this.moveXAxisTooltip(s)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Pc.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Pc.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,r=this.ttCtx;if(null!==r.xaxisTooltip&&0!==r.xcrosshairsWidth){r.xaxisTooltip.classList.add("apexcharts-active");var i,n=r.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;t-=r.xaxisTooltip.getBoundingClientRect().width/2,isNaN(t)||(t+=e.globals.translateX,i=new Pc(this.ctx).getTextRects(r.xaxisTooltipText.innerHTML),r.xaxisTooltipText.style.minWidth=i.width+"px",r.xaxisTooltip.style.left=t+"px",r.xaxisTooltip.style.top=n+"px")}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,r=this.ttCtx;null===r.yaxisTTEls&&(r.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var i=parseInt(r.ycrosshairsHidden.getAttribute("y1"),10),n=e.globals.translateY+i,o=r.yaxisTTEls[t].getBoundingClientRect().height,a=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(a-=26),n-=o/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(r.yaxisTTEls[t].classList.add("apexcharts-active"),r.yaxisTTEls[t].style.top=n+"px",r.yaxisTTEls[t].style.left=a+e.config.yaxis[t].tooltip.offsetX+"px"):r.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.w,n=this.ttCtx,o=n.getElTooltip(),a=n.tooltipRect,s=null!==r?parseFloat(r):1,l=parseFloat(t)+s+5,c=parseFloat(e)+s/2;if(l>i.globals.gridWidth/2&&(l=l-a.ttWidth-s-10),l>i.globals.gridWidth-a.ttWidth-10&&(l=i.globals.gridWidth-a.ttWidth),l<-20&&(l=-20),i.config.tooltip.followCursor){var u=n.getElGrid().getBoundingClientRect();(l=n.e.clientX-u.left)>i.globals.gridWidth/2&&(l-=n.tooltipRect.ttWidth),(c=n.e.clientY+i.globals.translateY-u.top)>i.globals.gridHeight/2&&(c-=n.tooltipRect.ttHeight)}else i.globals.isBarHorizontal||a.ttHeight/2+c>i.globals.gridHeight&&(c=i.globals.gridHeight-a.ttHeight+i.globals.translateY);isNaN(l)||(l+=i.globals.translateX,o.style.left=l+"px",o.style.top=c+"px")}},{key:"moveMarkers",value:function(t,e){var r=this.w,i=this.ttCtx;if(r.globals.markers.size[t]>0)for(var n=r.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),o=0;o0){var d=f.getAttribute("shape"),p=l.getMarkerPath(n,o,d,1.5*u);f.setAttribute("d",p)}this.moveXCrosshairs(n),s.fixedTooltip||this.moveTooltip(n,o,u)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,r=this.ttCtx,i=r.w,n=0,o=0,a=i.globals.pointsArray,s=new fh(this.ctx),l=new Pc(this.ctx);e=s.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var c=r.tooltipUtil.getHoverMarkerSize(e);a[e]&&(n=a[e][t][0],o=a[e][t][1]);var u=r.tooltipUtil.getAllMarkers();if(null!==u)for(var h=0;h0){var y=l.getMarkerPath(n,d,g,c);u[h].setAttribute("d",y)}else u[h].setAttribute("d","")}}this.moveXCrosshairs(n),r.fixedTooltip||this.moveTooltip(n,o||i.globals.gridHeight,c)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var r=this.w,i=this.ttCtx,n=r.globals.columnSeries?r.globals.columnSeries.length:r.globals.series.length,o=n>=2&&n%2==0?Math.floor(n/2):Math.floor(n/2)+1;r.globals.isBarHorizontal&&(o=new fh(this.ctx).getActiveConfigSeriesIndex("desc")+1);var a=r.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(o,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"']"));a||"number"!=typeof e||(a=r.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var s=a?parseFloat(a.getAttribute("cx")):0,l=a?parseFloat(a.getAttribute("cy")):0,c=a?parseFloat(a.getAttribute("barWidth")):0,u=i.getElGrid().getBoundingClientRect(),h=a&&(a.classList.contains("apexcharts-candlestick-area")||a.classList.contains("apexcharts-boxPlot-area"));r.globals.isXNumeric?(a&&!h&&(s-=n%2!=0?c/2:0),a&&h&&(s-=c/2)):r.globals.isBarHorizontal||(s=i.xAxisTicksPositions[t-1]+i.dataPointsDividedWidth/2,isNaN(s)&&(s=i.xAxisTicksPositions[t]-i.dataPointsDividedWidth/2)),r.globals.isBarHorizontal?l-=i.tooltipRect.ttHeight:r.config.tooltip.followCursor?l=i.e.clientY-u.top-i.tooltipRect.ttHeight/2:l+i.tooltipRect.ttHeight+15>r.globals.gridHeight&&(l=r.globals.gridHeight),r.globals.isBarHorizontal||this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,l||r.globals.gridHeight)}}],r&&Zd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qd(t){return Qd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qd(t)}function Kd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w;"bubble"!==n.config.chart.type&&this.newPointSize(t,e);var o=e.getAttribute("cx"),a=e.getAttribute("cy");if(null!==r&&null!==i&&(o=r,a=i),this.tooltipPosition.moveXCrosshairs(o),!this.fixedTooltip){if("radar"===n.config.chart.type){var s=this.ttCtx.getElGrid().getBoundingClientRect();o=this.ttCtx.e.clientX-s.left}this.tooltipPosition.moveTooltip(o,a,n.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,r=this,i=this.ttCtx,n=t,o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),a=e.config.markers.hover.size,s=0;s0){var i=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],r);t[e].setAttribute("d",i)}else t[e].setAttribute("d","M0,0")}}}],r&&tp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ip(t){return ip="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ip(t)}function np(t,e){for(var r=0;rs.globals.gridWidth/2&&(i=u-a.tooltipRect.ttWidth/2+f),a.w.config.tooltip.followCursor){var p=s.globals.dom.elWrap.getBoundingClientRect();i=s.globals.clientX-p.left-(i>s.globals.gridWidth/2?a.tooltipRect.ttWidth:0),n=s.globals.clientY-p.top-(n>s.globals.gridHeight/2?a.tooltipRect.ttHeight:0)}}return{x:i,y:n}}},{key:"handleMarkerTooltip",value:function(t){var e,r,i=t.e,n=t.opt,o=t.x,a=t.y,s=this.w,l=this.ttCtx;if(i.target.classList.contains("apexcharts-marker")){var c=parseInt(n.paths.getAttribute("cx"),10),u=parseInt(n.paths.getAttribute("cy"),10),h=parseFloat(n.paths.getAttribute("val"));if(r=parseInt(n.paths.getAttribute("rel"),10),e=parseInt(n.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var d=f.findAncestor(n.paths,"apexcharts-series");d&&(e=parseInt(d.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,j:r,shared:!l.showOnIntersect&&s.config.tooltip.shared,e:i}),"mouseup"===i.type&&l.markerClick(i,e,r),s.globals.capturedSeriesIndex=e,s.globals.capturedDataPointIndex=r,o=c,a=u+s.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var p=l.getElGrid().getBoundingClientRect();a=l.e.clientY+s.globals.translateY-p.top}h<0&&(a=u),l.marker.enlargeCurrentPoint(r,n.paths,o,a)}return{x:o,y:a}}},{key:"handleBarTooltip",value:function(t){var e,r,i=t.e,n=t.opt,o=this.w,a=this.ttCtx,s=a.getElTooltip(),l=0,c=0,u=0,h=this.getBarTooltipXY({e:i,opt:n});if(null!==h.j||0!==h.barHeight||0!==h.barWidth){e=h.i;var f=h.j;if(o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=f,o.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||!o.config.tooltip.shared?(c=h.x,u=h.y,r=Array.isArray(o.config.stroke.width)?o.config.stroke.width[e]:o.config.stroke.width,l=c):o.globals.comboCharts||o.config.tooltip.shared||(l/=2),isNaN(u)&&(u=o.globals.svgHeight-a.tooltipRect.ttHeight),parseInt(n.paths.parentNode.getAttribute("data:realIndex"),10),c+a.tooltipRect.ttWidth>o.globals.gridWidth?c-=a.tooltipRect.ttWidth:c<0&&(c=0),a.w.config.tooltip.followCursor){var d=a.getElGrid().getBoundingClientRect();u=a.e.clientY-d.top}null===a.tooltip&&(a.tooltip=o.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),o.config.tooltip.shared||(o.globals.comboBarCount>0?a.tooltipPosition.moveXCrosshairs(l+r/2):a.tooltipPosition.moveXCrosshairs(l)),!a.fixedTooltip&&(!o.config.tooltip.shared||o.globals.isBarHorizontal&&a.tooltipUtil.hasBars())&&(u=u+o.globals.translateY-a.tooltipRect.ttHeight/2,s.style.left=c+o.globals.translateX+"px",s.style.top=u+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,r=t.e,i=t.opt,n=this.w,o=null,a=this.ttCtx,s=0,l=0,c=0,u=0,h=0,f=r.target.classList;if(f.contains("apexcharts-bar-area")||f.contains("apexcharts-candlestick-area")||f.contains("apexcharts-boxPlot-area")||f.contains("apexcharts-rangebar-area")){var d=r.target,p=d.getBoundingClientRect(),g=i.elGrid.getBoundingClientRect(),b=p.height;h=p.height;var y=p.width,v=parseInt(d.getAttribute("cx"),10),m=parseInt(d.getAttribute("cy"),10);u=parseFloat(d.getAttribute("barWidth"));var x="touchmove"===r.type?r.touches[0].clientX:r.clientX;o=parseInt(d.getAttribute("j"),10),s=parseInt(d.parentNode.getAttribute("rel"),10)-1;var w=d.getAttribute("data-range-y1"),S=d.getAttribute("data-range-y2");n.globals.comboCharts&&(s=parseInt(d.parentNode.getAttribute("data:realIndex"),10));var k=function(t){return n.globals.isXNumeric?v-y/2:e.isVerticalGroupedRangeBar?v+y/2:v-a.dataPointsDividedWidth+y/2},A=function(){return m-a.dataPointsDividedHeight+b/2-a.tooltipRect.ttHeight/2};a.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:s,j:o,y1:w?parseInt(w,10):null,y2:S?parseInt(S,10):null,shared:!a.showOnIntersect&&n.config.tooltip.shared,e:r}),n.config.tooltip.followCursor?n.globals.isBarHorizontal?(l=x-g.left+15,c=A()):(l=k(),c=r.clientY-g.top-a.tooltipRect.ttHeight/2-15):n.globals.isBarHorizontal?((l=v)0&&r.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,r){var i=this.ttCtx,n=this.w,o=n.globals,a=o.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&a.length>0){var s=o.yLabelFormatters[t],l=i.getElGrid().getBoundingClientRect(),c=a[0],u=0;r.yRatio.length>1&&(u=c);var h=(e-l.top)*r.yRatio[u],f=o.maxYArr[c]-o.minYArr[c],d=o.minYArr[c]+(f-h);n.config.yaxis[t].reversed&&(d=o.maxYArr[c]-(f-h)),i.tooltipPosition.moveYCrosshairs(e-l.top),i.yaxisTooltipText[t].innerHTML=s(d),i.tooltipPosition.moveYAxisTooltip(t)}}}],r&&cp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const fp=hp;function dp(t){return dp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dp(t)}function pp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function gp(t){for(var e=1;e0&&this.addPathsEventListeners(d,u),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(u)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),r=e.getBoundingClientRect(),i=r.width+10,n=r.height+10,o=this.tConfig.fixed.offsetX,a=this.tConfig.fixed.offsetY,s=this.tConfig.fixed.position.toLowerCase();return s.indexOf("right")>-1&&(o=o+t.globals.svgWidth-i+10),s.indexOf("bottom")>-1&&(a=a+t.globals.svgHeight-n-10),e.style.left=o+"px",e.style.top=a+"px",{x:o,y:a,ttWidth:i,ttHeight:n}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var r=this,i=function(i){var n={paths:t[i],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[i].addEventListener(e,r.onSeriesHover.bind(r,n),{capture:!1,passive:!0})}))},n=0;n=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){r.seriesHover(t,e)}),20-i))}},{key:"seriesHover",value:function(t,e){var r=this;this.lastHoverTime=Date.now();var i=[],n=this.w;n.config.chart.group&&(i=this.ctx.getGroupedCharts()),n.globals.axisCharts&&(n.globals.minX===-1/0&&n.globals.maxX===1/0||0===n.globals.dataPoints)||(i.length?i.forEach((function(i){var n=r.getElTooltip(i),o={paths:t.paths,tooltipEl:n,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:i.w.globals.tooltip.ttItems};i.w.globals.minX===r.w.globals.minX&&i.w.globals.maxX===r.w.globals.maxX&&i.w.globals.tooltip.seriesHoverByContext({chartCtx:i,ttCtx:i.w.globals.tooltip,opt:o,e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,r=t.ttCtx,i=t.opt,n=t.e,o=e.w,a=this.getElTooltip(e);a&&(r.tooltipRect={x:0,y:0,ttWidth:a.getBoundingClientRect().width,ttHeight:a.getBoundingClientRect().height},r.e=n,!r.tooltipUtil.hasBars()||o.globals.comboCharts||r.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new fh(e).toggleSeriesOnHover(n,n.target.parentNode),r.fixedTooltip&&r.drawFixedTooltipRect(),o.globals.axisCharts?r.axisChartsTooltips({e:n,opt:i,tooltipRect:r.tooltipRect}):r.nonAxisChartsTooltips({e:n,opt:i,tooltipRect:r.tooltipRect}))}},{key:"axisChartsTooltips",value:function(t){var e,r,i=t.e,n=t.opt,o=this.w,a=n.elGrid.getBoundingClientRect(),s="touchmove"===i.type?i.touches[0].clientX:i.clientX,l="touchmove"===i.type?i.touches[0].clientY:i.clientY;if(this.clientY=l,this.clientX=s,o.globals.capturedSeriesIndex=-1,o.globals.capturedDataPointIndex=-1,la.top+a.height)this.handleMouseOut(n);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!o.config.tooltip.shared){var c=parseInt(n.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(n)}var u=this.getElTooltip(),h=this.getElXCrosshairs(),f=[];o.config.chart.group&&(f=this.ctx.getSyncedCharts());var d=o.globals.xyCharts||"bar"===o.config.chart.type&&!o.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||o.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===i.type||"touchmove"===i.type||"mouseup"===i.type){if(o.globals.collapsedSeries.length+o.globals.ancillaryCollapsedSeries.length===o.globals.series.length)return;null!==h&&h.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),d&&!this.showOnIntersect||f.length>1)this.handleStickyTooltip(i,s,l,n);else if("heatmap"===o.config.chart.type||"treemap"===o.config.chart.type){var g=this.intersect.handleHeatTreeTooltip({e:i,opt:n,x:e,y:r,type:o.config.chart.type});e=g.x,r=g.y,u.style.left=e+"px",u.style.top=r+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:i,opt:n}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:i,opt:n,x:e,y:r});if(this.yaxisTooltips.length)for(var b=0;bl.width)this.handleMouseOut(i);else if(null!==s)this.handleStickyCapturedSeries(t,s,i,a);else if(this.tooltipUtil.isXoverlap(a)||n.globals.isBarHorizontal){var c=n.globals.series.findIndex((function(t,e){return!n.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,c,a,i.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,r,i){var n=this.w;if(this.tConfig.shared||null!==n.globals.series[e][i]){if(void 0!==n.globals.series[e][i])this.tConfig.shared&&this.tooltipUtil.isXoverlap(i)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,i,r.ttItems):this.create(t,this,e,i,r.ttItems,!1);else if(this.tooltipUtil.isXoverlap(i)){var o=n.globals.series.findIndex((function(t,e){return!n.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,o,i,r.ttItems)}}else this.handleMouseOut(r)}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Pc(this.ctx),r=t.globals.dom.Paper.find(".apexcharts-bar-area"),i=0;i5&&void 0!==arguments[5]?arguments[5]:null,S=this.w,k=e;"mouseup"===t.type&&this.markerClick(t,r,i),null===w&&(w=this.tConfig.shared);var A=this.tooltipUtil.hasMarkers(r),O=this.tooltipUtil.getElBars();if(S.config.legend.tooltipHoverFormatter){var P=S.config.legend.tooltipHoverFormatter,C=Array.from(this.legendLabels);C.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var j=0;j0?k.marker.enlargePoints(i):k.tooltipPosition.moveDynamicPointsOnHover(i);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(O),this.barSeriesHeight>0)){var _=new Pc(this.ctx),R=S.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(i,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(i,r);for(var z=0;z0&&i.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=c*S)),w&&(f=f+h.height/2-y/2-2);var A=i.globals.series[n][o]<0,O=s;switch(this.barCtx.isReversed&&(O=s+(A?u:-u)),g.position){case"center":d=w?A?O-u/2+m:O+u/2-m:A?O-u/2+h.height/2+m:O+u/2+h.height/2-m;break;case"bottom":d=w?A?O-u+m:O+u-m:A?O-u+h.height+y+m:O+u-h.height/2+y-m;break;case"top":d=w?A?O+m:O-m:A?O-h.height/2-m:O+h.height+m}if(this.barCtx.lastActiveBarSerieIndex===a&&b.enabled){var P=new Pc(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:o}),p.fontSize);e=A?O-P.height/2-m-b.offsetY+18:O+P.height+m+b.offsetY-18;var C=k;r=x+(i.globals.isXNumeric?-c*i.globals.barGroups.length/2:i.globals.barGroups.length*c/2-(i.globals.barGroups.length-1)*c-C)+b.offsetX}return i.config.chart.stacked||(d<0?d=0+y:d+h.height/3>i.globals.gridHeight&&(d=i.globals.gridHeight-y)),{bcx:l,bcy:s,dataLabelsX:f,dataLabelsY:d,totalDataLabelsX:r,totalDataLabelsY:e,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,r=t.x,i=t.i,n=t.j,o=t.realIndex,a=t.bcy,s=t.barHeight,l=t.barWidth,c=t.textRects,u=t.dataLabelsX,h=t.strokeWidth,f=t.dataLabelsConfig,d=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,g=t.offX,b=t.offY,y=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var v,m,x=a-(this.barCtx.isRangeBar?0:y)+s/2+c.height/2+b-3,w="start",S=e.globals.series[i][n]<0,k=r;switch(this.barCtx.isReversed&&(k=r+(S?-l:l),w=S?"start":"end"),d.position){case"center":u=S?k+l/2-g:Math.max(c.width/2,k-l/2)+g;break;case"bottom":u=S?k+l-h-g:k-l+h+g;break;case"top":u=S?k-h-g:k-h+g}if(this.barCtx.lastActiveBarSerieIndex===o&&p.enabled){var A=new Pc(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:n}),f.fontSize);S?(v=k-h-g-p.offsetX,w="end"):v=k+g+p.offsetX+(this.barCtx.isReversed?-(l+h):h),m=x-c.height/2+A.height/2+p.offsetY+h}return e.config.chart.stacked||("start"===f.textAnchor?u-c.width<0?u=S?c.width+h:h:u+c.width>e.globals.gridWidth&&(u=S?e.globals.gridWidth-h:e.globals.gridWidth-c.width-h):"middle"===f.textAnchor?u-c.width/2<0?u=c.width/2+h:u+c.width/2>e.globals.gridWidth&&(u=e.globals.gridWidth-c.width/2-h):"end"===f.textAnchor&&(u<1?u=c.width+h:u+1>e.globals.gridWidth&&(u=e.globals.gridWidth-c.width-h))),{bcx:r,bcy:a,dataLabelsX:u,dataLabelsY:x,totalDataLabelsX:v,totalDataLabelsY:m,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,r=t.y,i=t.val,n=t.i,o=t.j,a=t.textRects,s=t.barHeight,l=t.barWidth,c=t.dataLabelsConfig,u=this.w,h="rotate(0)";"vertical"===u.config.plotOptions.bar.dataLabels.orientation&&(h="rotate(-90, ".concat(e,", ").concat(r,")"));var f=new lh(this.barCtx.ctx),d=new Pc(this.barCtx.ctx),p=c.formatter,g=null,b=u.globals.collapsedSeriesIndices.indexOf(n)>-1;if(c.enabled&&!b){g=d.group({class:"apexcharts-data-labels",transform:h});var y="";void 0!==i&&(y=p(i,Sp(Sp({},u),{},{seriesIndex:n,dataPointIndex:o,w:u}))),!i&&u.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(y="");var v=u.globals.series[n][o]<0,m=u.config.plotOptions.bar.dataLabels.position;"vertical"===u.config.plotOptions.bar.dataLabels.orientation&&("top"===m&&(c.textAnchor=v?"end":"start"),"center"===m&&(c.textAnchor="middle"),"bottom"===m&&(c.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&lMath.abs(l)&&(y=""):a.height/1.6>Math.abs(s)&&(y=""));var x=Sp({},c);this.barCtx.isHorizontal&&i<0&&("start"===c.textAnchor?x.textAnchor="end":"end"===c.textAnchor&&(x.textAnchor="start")),f.plotDataLabelsText({x:e,y:r,text:y,i:n,j:o,parent:g,dataLabelsConfig:x,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return g}},{key:"drawTotalDataLabels",value:function(t){var e,r=t.x,i=t.y,n=t.val,o=t.realIndex,a=t.textAnchor,s=t.barTotalDataLabelsConfig,l=(this.w,new Pc(this.barCtx.ctx));return s.enabled&&void 0!==r&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===o&&(e=l.drawText({x:r,y:i,foreColor:s.style.color,text:n,textAnchor:a,fontFamily:s.style.fontFamily,fontSize:s.style.fontSize,fontWeight:s.style.fontWeight})),e}}],r&&Ap(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Cp(t){return Cp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cp(t)}function jp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Tp(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Lp(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[r].length),e.globals.isXNumeric)for(var i=0;ie.globals.minX&&e.globals.seriesX[r][i]0&&(i=l.globals.minXDiff/h),(o=i/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(o=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(o=parseInt(this.barCtx.barOptions.columnWidth,10)),a=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+(i-o*this.barCtx.seriesLen)/2}return l.globals.barHeight=n,l.globals.barWidth=o,{x:t,y:e,yDivision:r,xDivision:i,barHeight:n,barWidth:o,zeroH:a,zeroW:s}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,r,i){var n,o,a,s,l=this.w,c=this.barCtx.ctx.fill,u=null,h=this.barCtx.barOptions.distributed?r:e;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(i){t[e][r]>=i.from&&t[e][r]<=i.to&&(u=i.color)})),c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?h:i,dataPointIndex:r,color:u,value:t[e][r],fillConfig:null===(n=l.config.series[e].data[r])||void 0===n?void 0:n.fill,fillType:null!==(o=l.config.series[e].data[r])&&void 0!==o&&null!==(a=o.fill)&&void 0!==a&&a.type?null===(s=l.config.series[e].data[r])||void 0===s?void 0:s.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[i]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,r){var i=0,n=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,n.config.stroke.show&&(this.barCtx.isNullValue||(i=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[r]:this.barCtx.strokeWidth)),i}},{key:"createBorderRadiusArr",value:function(t){var e,r=this.w,i=!this.w.config.chart.stacked||r.config.plotOptions.bar.borderRadius<=0,n=t.length,o=0|(null===(e=t[0])||void 0===e?void 0:e.length),a=Array.from({length:n},(function(){return Array(o).fill(i?"top":"none")}));if(i)return a;for(var s=0;s0?(l.push(h),u++):f<0&&(c.push(h),u++)}if(l.length>0&&0===c.length)if(1===l.length)a[l[0]][s]="both";else{var d,p=l[0],g=l[l.length-1],b=Mp(l);try{for(b.s();!(d=b.n()).done;){var y=d.value;a[y][s]=y===p?"bottom":y===g?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===l.length)if(1===c.length)a[c[0]][s]="both";else{var v,m=Math.max.apply(Math,c),x=Math.min.apply(Math,c),w=Mp(c);try{for(w.s();!(v=w.n()).done;){var S=v.value;a[S][s]=S===m?"bottom":S===x?"top":"none"}}catch(t){w.e(t)}finally{w.f()}}else if(l.length>0&&c.length>0){var k,A=l[l.length-1],O=Mp(l);try{for(O.s();!(k=O.n()).done;){var P=k.value;a[P][s]=P===A?"top":"none"}}catch(t){O.e(t)}finally{O.f()}var C,j=Math.max.apply(Math,c),T=Mp(c);try{for(T.s();!(C=T.n()).done;){var E=C.value;a[E][s]=E===j?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else 1===u&&(a[l[0]||c[0]][s]="both")}return a}},{key:"barBackground",value:function(t){var e=t.j,r=t.i,i=t.x1,n=t.x2,o=t.y1,a=t.y2,s=t.elSeries,l=this.w,c=new Pc(this.barCtx.ctx),u=new fh(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&u===r){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var h=this.barCtx.barOptions.colors.backgroundBarColors[e],f=c.drawRect(void 0!==i?i:0,void 0!==o?o:0,void 0!==n?n:l.globals.gridWidth,void 0!==a?a:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,h,this.barCtx.barOptions.colors.backgroundBarOpacity);s.add(f),f.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,r=t.barWidth,i=t.barXPosition,n=t.y1,o=t.y2,a=t.strokeWidth,s=t.isReversed,l=t.series,c=t.seriesGroup,u=t.realIndex,h=t.i,f=t.j,d=t.w,p=new Pc(this.barCtx.ctx);(a=Array.isArray(a)?a[u]:a)||(a=0);var g=r,b=i;null!==(e=d.config.series[u].data[f])&&void 0!==e&&e.columnWidthOffset&&(b=i-d.config.series[u].data[f].columnWidthOffset/2,g=r+d.config.series[u].data[f].columnWidthOffset);var y=a/2,v=b+y,m=b+g-y,x=(l[h][f]>=0?1:-1)*(s?-1:1);n+=.001-y*x,o+=.001+y*x;var w=p.move(v,n),S=p.move(v,n),k=p.line(m,n);if(d.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(u,f,!1)),w=w+p.line(v,o)+p.line(m,o)+k+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),S=S+p.line(v,n)+k+k+k+k+k+p.line(v,n)+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),"none"!==this.arrBorderRadius[u][f]&&(w=p.roundPathCorners(w,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[c]).yArrj.push(o-y*x),A.yArrjF.push(Math.abs(n-o+a*x)),A.yArrjVal.push(this.barCtx.series[h][f])}return{pathTo:w,pathFrom:S}}},{key:"getBarpaths",value:function(t){var e,r=t.barYPosition,i=t.barHeight,n=t.x1,o=t.x2,a=t.strokeWidth,s=t.isReversed,l=t.series,c=t.seriesGroup,u=t.realIndex,h=t.i,f=t.j,d=t.w,p=new Pc(this.barCtx.ctx);(a=Array.isArray(a)?a[u]:a)||(a=0);var g=r,b=i;null!==(e=d.config.series[u].data[f])&&void 0!==e&&e.barHeightOffset&&(g=r-d.config.series[u].data[f].barHeightOffset/2,b=i+d.config.series[u].data[f].barHeightOffset);var y=a/2,v=g+y,m=g+b-y,x=(l[h][f]>=0?1:-1)*(s?-1:1);n+=.001+y*x,o+=.001-y*x;var w=p.move(n,v),S=p.move(n,v);d.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(u,f,!1));var k=p.line(n,m);if(w=w+p.line(o,v)+p.line(o,m)+k+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),S=S+p.line(n,v)+k+k+k+k+k+p.line(n,v)+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),"none"!==this.arrBorderRadius[u][f]&&(w=p.roundPathCorners(w,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[c]).xArrj.push(o+y*x),A.xArrjF.push(Math.abs(n-o-a*x)),A.xArrjVal.push(this.barCtx.series[h][f])}return{pathTo:w,pathFrom:S}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,r=this.w,i=0;i2&&void 0!==arguments[2]&&!arguments[2]?null:e;return null!=t&&(r=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),r}},{key:"getYForValue",value:function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?null:e;return null!=t&&(i=e-t/this.barCtx.yRatio[r]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[r]:0)),i}},{key:"getGoalValues",value:function(t,e,r,i,n,o){var a=this,s=this.w,l=[],c=function(i,n){var s;l.push((Ep(s={},t,"x"===t?a.getXForValue(i,e,!1):a.getYForValue(i,r,o,!1)),Ep(s,"attrs",n),s))};if(s.globals.seriesGoals[i]&&s.globals.seriesGoals[i][n]&&Array.isArray(s.globals.seriesGoals[i][n])&&s.globals.seriesGoals[i][n].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&s.globals.seriesRange.length){var u=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:s.globals.colors,h={strokeHeight:"x"===t?0:s.globals.markers.size[i],strokeWidth:"x"===t?s.globals.markers.size[i]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(u[i])?u[i][0]:u[i]};c(s.globals.seriesRangeStart[i][n],h),c(s.globals.seriesRangeEnd[i][n],Tp(Tp({},h),{},{strokeColor:Array.isArray(u[i])?u[i][1]:u[i]}))}return l}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,r=t.barYPosition,i=t.goalX,n=t.goalY,o=t.barWidth,a=t.barHeight,s=new Pc(this.barCtx.ctx),l=s.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var c=null;return this.barCtx.isHorizontal?Array.isArray(i)&&i.forEach((function(t){if(t.x>=-1&&t.x<=s.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:a/2,i=r+e+a/2;c=s.drawLine(t.x,i-2*e,t.x,i,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(c)}})):Array.isArray(n)&&n.forEach((function(t){if(t.y>=-1&&t.y<=s.w.globals.gridHeight+1){var r=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:o/2,i=e+r+o/2;c=s.drawLine(i-2*r,t.y,i,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(c)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,r=t.currPaths,i=t.color,n=this.w,o=e.x,a=e.x1,s=e.barYPosition,l=r.x,c=r.x1,u=r.barYPosition,h=s+r.barHeight,d=new Pc(this.barCtx.ctx),p=new f,g=d.move(a,h)+d.line(o,h)+d.line(l,u)+d.line(c,u)+d.line(a,h)+("around"===n.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return d.drawPath({d:g,fill:p.shadeColor(.5,f.rgb2hex(i)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,r=t.i,i=t.j,n=this.w,o=0,a=0;return(n.config.plotOptions.bar.horizontal?n.globals.series.map((function(t,e){return e})):(null===(e=n.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=n.globals.seriesPercent[t][i];e&&o++,t-1})),i=this.barCtx.columnGroupIndices,n=i.indexOf(r);return n<0&&(i.push(r),n=i.length-1),{groupIndex:r,columnGroupIndex:n}}}],r&&Ip(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zp(t){return zp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zp(t)}function Xp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Dp(t){for(var e=1;ethis.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var a=0,s=0;a0&&(this.visibleI=this.visibleI+1);var x=0,w=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[y],this.translationsIndex=y);var S=this.translationsIndex;this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed;var k=this.barHelpers.initialPositions();p=k.y,x=k.barHeight,c=k.yDivision,h=k.zeroW,d=k.x,w=k.barWidth,l=k.xDivision,u=k.zeroH,this.isHorizontal||b.push(d+w/2);var A=i.group({class:"apexcharts-datalabels","data:realIndex":y});r.globals.delayedElements.push({el:A.node}),A.node.classList.add("apexcharts-element-hidden");var O=i.group({class:"apexcharts-bar-goals-markers"}),P=i.group({class:"apexcharts-bar-shadows"});r.globals.delayedElements.push({el:P.node}),P.node.classList.add("apexcharts-element-hidden");for(var C=0;C0){var L=this.barHelpers.drawBarShadow({color:"string"==typeof M&&-1===(null==M?void 0:M.indexOf("url"))?M:f.hexToRgba(r.globals.colors[a]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});P.add(L),r.config.chart.dropShadow.enabled&&new vc(this.ctx).dropShadow(L,r.config.chart.dropShadow,y)}this.pathArr.push(T);var I=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:x,barWidth:w});I&&O.add(I),p=T.y,d=T.x,C>0&&b.push(d+w/2),g.push(p),this.renderSeries({realIndex:y,pathFill:M,j:C,i:a,columnGroupIndex:v,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:j,elSeries:m,x:d,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:x),barWidth:Math.abs(T.barWidth?T.barWidth:w),elDataLabelsWrap:A,elGoalsMarkers:O,elBarShadows:P,visibleSeries:this.visibleI,type:"bar"})}r.globals.seriesXvalues[y]=b,r.globals.seriesYvalues[y]=g,o.add(m)}return o}},{key:"renderSeries",value:function(t){var e=t.realIndex,r=t.pathFill,i=t.lineFill,n=t.j,o=t.i,a=t.columnGroupIndex,s=t.pathFrom,l=t.pathTo,c=t.strokeWidth,u=t.elSeries,h=t.x,f=t.y,d=t.y1,p=t.y2,g=t.series,b=t.barHeight,y=t.barWidth,v=t.barXPosition,m=t.barYPosition,x=t.elDataLabelsWrap,w=t.elGoalsMarkers,S=t.elBarShadows,k=t.visibleSeries,A=t.type,O=t.classes,P=this.w,C=new Pc(this.ctx);if(!i){var j="function"==typeof P.globals.stroke.colors[e]?function(t){var e,r=P.config.stroke.colors;return Array.isArray(r)&&r.length>0&&((e=r[t])||(e=""),"function"==typeof e)?e({value:P.globals.series[t][n],dataPointIndex:n,w:P}):e}(e):P.globals.stroke.colors[e];i=this.barOptions.distributed?P.globals.stroke.colors[n]:j}P.config.series[o].data[n]&&P.config.series[o].data[n].strokeColor&&(i=P.config.series[o].data[n].strokeColor),this.isNullValue&&(r="none");var T=n/P.config.chart.animations.animateGradually.delay*(P.config.chart.animations.speed/P.globals.dataPoints)/2.4,E=C.renderPaths({i:o,j:n,realIndex:e,pathFrom:s,pathTo:l,stroke:i,strokeWidth:c,strokeLineCap:P.config.stroke.lineCap,fill:r,animationDelay:T,initialSpeed:P.config.chart.animations.speed,dataChangeSpeed:P.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(A,"-area ").concat(O),chartType:A});E.attr("clip-path","url(#gridRectBarMask".concat(P.globals.cuid,")"));var M=P.config.forecastDataPoints;M.count>0&&n>=P.globals.dataPoints-M.count&&(E.node.setAttribute("stroke-dasharray",M.dashArray),E.node.setAttribute("stroke-width",M.strokeWidth),E.node.setAttribute("fill-opacity",M.fillOpacity)),void 0!==d&&void 0!==p&&(E.attr("data-range-y1",d),E.attr("data-range-y2",p)),new vc(this.ctx).setSelectionFilter(E,e,n),u.add(E);var L=new Pp(this).handleBarDataLabels({x:h,y:f,y1:d,y2:p,i:o,j:n,series:g,realIndex:e,columnGroupIndex:a,barHeight:b,barWidth:y,barXPosition:v,barYPosition:m,renderedPath:E,visibleSeries:k});return null!==L.dataLabels&&x.add(L.dataLabels),L.totalDataLabels&&x.add(L.totalDataLabels),u.add(x),w&&u.add(w),S&&u.add(S),u}},{key:"drawBarPaths",value:function(t){var e,r=t.indexes,i=t.barHeight,n=t.strokeWidth,o=t.zeroW,a=t.x,s=t.y,l=t.yDivision,c=t.elSeries,u=this.w,h=r.i,f=r.j;if(u.globals.isXNumeric)e=(s=(u.globals.seriesX[h][f]-u.globals.minX)/this.invertedXRatio-i)+i*this.visibleI;else if(u.config.plotOptions.bar.hideZeroBarsWhenGrouped){var d=0,p=0;u.globals.seriesPercent.forEach((function(t,e){t[f]&&d++,e0&&(i=this.seriesLen*i/d),e=s+i*this.visibleI,e-=i*p}else e=s+i*this.visibleI;this.isFunnel&&(o-=(this.barHelpers.getXForValue(this.series[h][f],o)-o)/2),a=this.barHelpers.getXForValue(this.series[h][f],o);var g=this.barHelpers.getBarpaths({barYPosition:e,barHeight:i,x1:o,x2:a,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:r.realIndex,i:h,j:f,w:u});return u.globals.isXNumeric||(s+=l),this.barHelpers.barBackground({j:f,i:h,y1:e-i*this.visibleI,y2:i*this.seriesLen,elSeries:c}),{pathTo:g.pathTo,pathFrom:g.pathFrom,x1:o,x:a,y:s,goalX:this.barHelpers.getGoalValues("x",o,null,h,f),barYPosition:e,barHeight:i}}},{key:"drawColumnPaths",value:function(t){var e,r=t.indexes,i=t.x,n=t.y,o=t.xDivision,a=t.barWidth,s=t.zeroH,l=t.strokeWidth,c=t.elSeries,u=this.w,h=r.realIndex,f=r.translationsIndex,d=r.i,p=r.j,g=r.bc;if(u.globals.isXNumeric){var b=this.getBarXForNumericXAxis({x:i,j:p,realIndex:h,barWidth:a});i=b.x,e=b.barXPosition}else if(u.config.plotOptions.bar.hideZeroBarsWhenGrouped){var y=this.barHelpers.getZeroValueEncounters({i:d,j:p}),v=y.nonZeroColumns,m=y.zeroEncounters;v>0&&(a=this.seriesLen*a/v),e=i+a*this.visibleI,e-=a*m}else e=i+a*this.visibleI;n=this.barHelpers.getYForValue(this.series[d][p],s,f);var x=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:a,y1:s,y2:n,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:h,i:d,j:p,w:u});return u.globals.isXNumeric||(i+=o),this.barHelpers.barBackground({bc:g,j:p,i:d,x1:e-l/2-a*this.visibleI,x2:a*this.seriesLen+l/2,elSeries:c}),{pathTo:x.pathTo,pathFrom:x.pathFrom,x:i,y:n,goalY:this.barHelpers.getGoalValues("y",null,s,d,p,f),barXPosition:e,barWidth:a}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,r=t.barWidth,i=t.realIndex,n=t.j,o=this.w,a=i;return o.globals.seriesX[i].length||(a=o.globals.maxValsInArrayIndex),f.isNumber(o.globals.seriesX[a][n])&&(e=(o.globals.seriesX[a][n]-o.globals.minX)/this.xRatio-r*this.seriesLen/2),{barXPosition:e+r*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var r,i=this.w,n=0;n0&&parseInt(o.realIndex,10)===parseInt(t,10)&&void 0!==i.globals.previousPaths[n].paths[e]&&(r=i.globals.previousPaths[n].paths[e].d)}return r}}],r&&Hp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Np=Bp;function Wp(t){return Wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wp(t)}function Gp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Vp(t){for(var e=1;e1&&(r.yaxisIndex=i.globals.seriesYAxisReverseMap[p][0],x=p),r.isReversed=i.config.yaxis[r.yaxisIndex]&&i.config.yaxis[r.yaxisIndex].reversed;var w=r.graphics.group({class:"apexcharts-series",seriesName:f.escapeString(i.globals.seriesNames[p]),rel:n+1,"data:realIndex":p});r.ctx.series.addCollapsedClassToSeries(w,p);var S=r.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),k=r.graphics.group({class:"apexcharts-bar-goals-markers"}),A=0,O=0,P=r.initialPositions(a,s,c,u,h,d,x);s=P.y,A=P.barHeight,u=P.yDivision,d=P.zeroW,a=P.x,O=P.barWidth,c=P.xDivision,h=P.zeroH,i.globals.barHeight=A,i.globals.barWidth=O,r.barHelpers.initializeStackedXYVars(r),1===r.groupCtx.prevY.length&&r.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(r.groupCtx.prevY[0]=r.groupCtx.prevY[0].map((function(){return h})),r.groupCtx.prevYF[0]=r.groupCtx.prevYF[0].map((function(){return 0})));for(var C=0;C0||"top"===r.barHelpers.arrBorderRadius[p][C]&&i.globals.series[p][C]<0)&&(I=_),w=r.renderSeries({realIndex:p,pathFill:L,j:C,i:n,columnGroupIndex:y,pathFrom:E.pathFrom,pathTo:E.pathTo,strokeWidth:j,elSeries:w,x:a,y:s,series:t,barHeight:A,barWidth:O,elDataLabelsWrap:S,elGoalsMarkers:k,type:"bar",visibleSeries:y,classes:I})}i.globals.seriesXvalues[p]=v,i.globals.seriesYvalues[p]=m,r.groupCtx.prevY.push(r.groupCtx.yArrj),r.groupCtx.prevYF.push(r.groupCtx.yArrjF),r.groupCtx.prevYVal.push(r.groupCtx.yArrjVal),r.groupCtx.prevX.push(r.groupCtx.xArrj),r.groupCtx.prevXF.push(r.groupCtx.xArrjF),r.groupCtx.prevXVal.push(r.groupCtx.xArrjVal),o.add(w)},c=0,u=0;c1?l=(r=c.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(h).indexOf("%")?l=parseInt(h,10):l*=parseInt(h,10)/100,n=this.isReversed?this.baseLineY[a]:c.globals.gridHeight-this.baseLineY[a],t=c.globals.padHorizontal+(r-l)/2}var f=c.globals.barGroups.length||1;return{x:t,y:e,yDivision:i,xDivision:r,barHeight:s/f,barWidth:l/f,zeroH:n,zeroW:o}}},{key:"drawStackedBarPaths",value:function(t){for(var e,r=t.indexes,i=t.barHeight,n=t.strokeWidth,o=t.zeroW,a=t.x,s=t.y,l=t.columnGroupIndex,c=t.seriesGroup,u=t.yDivision,h=t.elSeries,f=this.w,d=s+l*i,p=r.i,g=r.j,b=r.realIndex,y=r.translationsIndex,v=0,m=0;m0){var w=o;this.groupCtx.prevXVal[x-1][g]<0?w=this.series[p][g]>=0?this.groupCtx.prevX[x-1][g]+v-2*(this.isReversed?v:0):this.groupCtx.prevX[x-1][g]:this.groupCtx.prevXVal[x-1][g]>=0&&(w=this.series[p][g]>=0?this.groupCtx.prevX[x-1][g]:this.groupCtx.prevX[x-1][g]-v+2*(this.isReversed?v:0)),e=w}else e=o;a=null===this.series[p][g]?e:e+this.series[p][g]/this.invertedYRatio-2*(this.isReversed?this.series[p][g]/this.invertedYRatio:0);var S=this.barHelpers.getBarpaths({barYPosition:d,barHeight:i,x1:e,x2:a,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:r.realIndex,seriesGroup:c,i:p,j:g,w:f});return this.barHelpers.barBackground({j:g,i:p,y1:d,y2:i,elSeries:h}),s+=u,{pathTo:S.pathTo,pathFrom:S.pathFrom,goalX:this.barHelpers.getGoalValues("x",o,null,p,g,y),barXPosition:e,barYPosition:d,x:a,y:s}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,r=t.x,i=t.y,n=t.xDivision,o=t.barWidth,a=t.zeroH,s=t.columnGroupIndex,l=t.seriesGroup,c=t.elSeries,u=this.w,h=e.i,f=e.j,d=e.bc,p=e.realIndex,g=e.translationsIndex;if(u.globals.isXNumeric){var b=u.globals.seriesX[p][f];b||(b=0),r=(b-u.globals.minX)/this.xRatio-o/2*u.globals.barGroups.length}for(var y,v=r+s*o,m=0,x=0;x0&&!u.globals.isXNumeric||w>0&&u.globals.isXNumeric&&u.globals.seriesX[p-1][f]===u.globals.seriesX[p][f]){var S,k,A,O=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var P=1;P=0?A-m+2*(this.isReversed?m:0):A;break}if((null===(E=this.groupCtx.prevYVal[w-j])||void 0===E?void 0:E[f])>=0){k=this.series[h][f]>=0?A:A+m-2*(this.isReversed?m:0);break}}void 0===k&&(k=u.globals.gridHeight),y=null!==(S=this.groupCtx.prevYF[0])&&void 0!==S&&S.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?a:k}else y=a;i=this.series[h][f]?y-this.series[h][f]/this.yRatio[g]+2*(this.isReversed?this.series[h][f]/this.yRatio[g]:0):y;var M=this.barHelpers.getColumnPaths({barXPosition:v,barWidth:o,y1:y,y2:i,yRatio:this.yRatio[g],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:h,j:f,w:u});return this.barHelpers.barBackground({bc:d,j:f,i:h,x1:v,x2:o,elSeries:c}),{pathTo:M.pathTo,pathFrom:M.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,a,h,f),barXPosition:v,x:u.globals.isXNumeric?r:r+n,y:i}}}],r&&qp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const eg=tg;function rg(t){return rg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rg(t)}function ig(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function ng(t){for(var e=1;e0&&(i.visibleI=i.visibleI+1);var x,w,S=0;i.yRatio.length>1&&(i.yaxisIndex=n.globals.seriesYAxisReverseMap[y][0],S=y);var k=i.barHelpers.initialPositions();p=k.y,x=k.barHeight,l=k.yDivision,h=k.zeroW,d=k.x,w=k.barWidth,a=k.xDivision,u=k.zeroH,b.push(d+w/2);for(var A=o.group({class:"apexcharts-datalabels","data:realIndex":y}),O=o.group({class:"apexcharts-bar-goals-markers"}),P=function(r){var o=i.barHelpers.getStrokeWidth(e,r,y),c=null,f={indexes:{i:e,j:r,realIndex:y,translationsIndex:S},x:d,y:p,strokeWidth:o,elSeries:m};c=i.isHorizontal?i.drawHorizontalBoxPaths(ng(ng({},f),{},{yDivision:l,barHeight:x,zeroW:h})):i.drawVerticalBoxPaths(ng(ng({},f),{},{xDivision:a,barWidth:w,zeroH:u})),p=c.y,d=c.x;var k=i.barHelpers.drawGoalLine({barXPosition:c.barXPosition,barYPosition:c.barYPosition,goalX:c.goalX,goalY:c.goalY,barHeight:x,barWidth:w});k&&O.add(k),r>0&&b.push(d+w/2),g.push(p),c.pathTo.forEach((function(a,l){var u=!i.isBoxPlot&&i.candlestickOptions.wick.useFillColor?c.color[l]:n.globals.stroke.colors[e],h=s.fillPath({seriesNumber:y,dataPointIndex:r,color:c.color[l],value:t[e][r]});i.renderSeries({realIndex:y,pathFill:h,lineFill:u,j:r,i:e,pathFrom:c.pathFrom,pathTo:a,strokeWidth:o,elSeries:m,x:d,y:p,series:t,columnGroupIndex:v,barHeight:x,barWidth:w,elDataLabelsWrap:A,elGoalsMarkers:O,visibleSeries:i.visibleI,type:n.config.chart.type})}))},C=0;Cy.c&&(h=!1);var x=Math.min(y.o,y.c),w=Math.max(y.o,y.c),S=y.m;s.globals.isXNumeric&&(r=(s.globals.seriesX[f][u]-s.globals.minX)/this.xRatio-n/2);var k=r+n*this.visibleI;void 0===this.series[c][u]||null===this.series[c][u]?(x=o,w=o):(x=o-x/b,w=o-w/b,v=o-y.h/b,m=o-y.l/b,S=o-y.m/b);var A=l.move(k,o),O=l.move(k+n/2,x);return s.globals.previousPaths.length>0&&(O=this.getPreviousPath(f,u,!0)),A=this.isBoxPlot?[l.move(k,x)+l.line(k+n/2,x)+l.line(k+n/2,v)+l.line(k+n/4,v)+l.line(k+n-n/4,v)+l.line(k+n/2,v)+l.line(k+n/2,x)+l.line(k+n,x)+l.line(k+n,S)+l.line(k,S)+l.line(k,x+a/2),l.move(k,S)+l.line(k+n,S)+l.line(k+n,w)+l.line(k+n/2,w)+l.line(k+n/2,m)+l.line(k+n-n/4,m)+l.line(k+n/4,m)+l.line(k+n/2,m)+l.line(k+n/2,w)+l.line(k,w)+l.line(k,S)+"z"]:[l.move(k,w)+l.line(k+n/2,w)+l.line(k+n/2,v)+l.line(k+n/2,w)+l.line(k+n,w)+l.line(k+n,x)+l.line(k+n/2,x)+l.line(k+n/2,m)+l.line(k+n/2,x)+l.line(k,x)+l.line(k,w-a/2)],O+=l.move(k,x),s.globals.isXNumeric||(r+=i),{pathTo:A,pathFrom:O,x:r,y:w,goalY:this.barHelpers.getGoalValues("y",null,o,c,u,e.translationsIndex),barXPosition:k,color:this.isBoxPlot?g:h?[d]:[p]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes,r=(t.x,t.y),i=t.yDivision,n=t.barHeight,o=t.zeroW,a=t.strokeWidth,s=this.w,l=new Pc(this.ctx),c=e.i,u=e.j,h=this.boxOptions.colors.lower;this.isBoxPlot&&(h=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var f=this.invertedYRatio,d=e.realIndex,p=this.getOHLCValue(d,u),g=o,b=o,y=Math.min(p.o,p.c),v=Math.max(p.o,p.c),m=p.m;s.globals.isXNumeric&&(r=(s.globals.seriesX[d][u]-s.globals.minX)/this.invertedXRatio-n/2);var x=r+n*this.visibleI;void 0===this.series[c][u]||null===this.series[c][u]?(y=o,v=o):(y=o+y/f,v=o+v/f,g=o+p.h/f,b=o+p.l/f,m=o+p.m/f);var w=l.move(o,x),S=l.move(y,x+n/2);return s.globals.previousPaths.length>0&&(S=this.getPreviousPath(d,u,!0)),w=[l.move(y,x)+l.line(y,x+n/2)+l.line(g,x+n/2)+l.line(g,x+n/2-n/4)+l.line(g,x+n/2+n/4)+l.line(g,x+n/2)+l.line(y,x+n/2)+l.line(y,x+n)+l.line(m,x+n)+l.line(m,x)+l.line(y+a/2,x),l.move(m,x)+l.line(m,x+n)+l.line(v,x+n)+l.line(v,x+n/2)+l.line(b,x+n/2)+l.line(b,x+n-n/4)+l.line(b,x+n/4)+l.line(b,x+n/2)+l.line(v,x+n/2)+l.line(v,x)+l.line(m,x)+"z"],S+=l.move(y,x),s.globals.isXNumeric||(r+=i),{pathTo:w,pathFrom:S,x:v,y:r,goalX:this.barHelpers.getGoalValues("x",o,null,c,u),barYPosition:x,color:h}}},{key:"getOHLCValue",value:function(t,e){var r=this.w,i=new Mc(this.ctx,r),n=i.getLogValAtSeriesIndex(r.globals.seriesCandleH[t][e],t),o=i.getLogValAtSeriesIndex(r.globals.seriesCandleO[t][e],t),a=i.getLogValAtSeriesIndex(r.globals.seriesCandleM[t][e],t),s=i.getLogValAtSeriesIndex(r.globals.seriesCandleC[t][e],t),l=i.getLogValAtSeriesIndex(r.globals.seriesCandleL[t][e],t);return{o:this.isBoxPlot?n:o,h:this.isBoxPlot?o:n,m:a,l:this.isBoxPlot?s:l,c:this.isBoxPlot?l:s}}}],r&&ag(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const dg=fg;function pg(t){return pg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pg(t)}function gg(t){return function(t){if(Array.isArray(t))return bg(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return bg(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bg(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bg(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&r.colorScale.ranges.map((function(t,r){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,r,i){var n=this.w,o=1,a=n.config.plotOptions[t].shadeIntensity,s=this.determineColor(t,e,r);n.globals.hasNegs||i?o=n.config.plotOptions[t].reverseNegativeShade?s.percent<0?s.percent/100*(1.25*a):(1-s.percent/100)*(1.25*a):s.percent<=0?1-(1+s.percent/100)*a:(1-s.percent/100)*a:(o=1-s.percent/100,"treemap"===t&&(o=(1-s.percent/100)*(1.25*a)));var l=s.color,c=new f;if(n.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var u=c.shadeColor(-1*o,s.color);l=f.hexToRgba(f.isColorHex(u)?u:f.rgb2hex(u),n.config.fill.opacity)}else{var h=c.shadeColor(o,s.color);l=f.hexToRgba(f.isColorHex(h)?h:f.rgb2hex(h),n.config.fill.opacity)}return{color:l,colorProps:s}}},{key:"determineColor",value:function(t,e,r){var i=this.w,n=i.globals.series[e][r],o=i.config.plotOptions[t],a=o.colorScale.inverse?r:e;o.distributed&&"treemap"===i.config.chart.type&&(a=r);var s=i.globals.colors[a],l=null,c=Math.min.apply(Math,gg(i.globals.series[e])),u=Math.max.apply(Math,gg(i.globals.series[e]));o.distributed||"heatmap"!==t||(c=i.globals.minY,u=i.globals.maxY),void 0!==o.colorScale.min&&(c=o.colorScale.mini.globals.maxY?o.colorScale.max:i.globals.maxY);var h=Math.abs(u)+Math.abs(c),f=100*n/(0===h?h-1e-6:h);return o.colorScale.ranges.length>0&&o.colorScale.ranges.map((function(t,e){if(n>=t.from&&n<=t.to){s=t.color,l=t.foreColor?t.foreColor:null,c=t.from,u=t.to;var r=Math.abs(u)+Math.abs(c);f=100*n/(0===r?r-1e-6:r)}})),{color:s,foreColor:l,percent:f}}},{key:"calculateDataLabels",value:function(t){var e=t.text,r=t.x,i=t.y,n=t.i,o=t.j,a=t.colorProps,s=t.fontSize,l=this.w.config.dataLabels,c=new Pc(this.ctx),u=new lh(this.ctx),h=null;if(l.enabled){h=c.group({class:"apexcharts-data-labels"});var f=l.offsetX,d=l.offsetY,p=r+f,g=i+parseFloat(l.style.fontSize)/3+d;u.plotDataLabelsText({x:p,y:g,text:e,i:n,j:o,color:a.foreColor,parent:h,fontSize:s,dataLabelsConfig:l})}return h}},{key:"addListeners",value:function(t){var e=new Pc(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}],r&&yg(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function xg(t){return xg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xg(t)}function wg(t,e){for(var r=0;r=0;s?c++:c--){var u=r.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:f.escapeString(e.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(u,c),e.config.chart.dropShadow.enabled){var h=e.config.chart.dropShadow;new vc(this.ctx).dropShadow(u,h,c)}for(var d=0,p=e.config.plotOptions.heatmap.shadeIntensity,g=0;g-1&&this.pieClicked(h),r.config.dataLabels.enabled){var w=m.x,S=m.y,k=100*p/this.fullAngle+"%";if(0!==p&&r.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(i+a):i+a=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(c=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(c)>this.fullAngle&&(c-=this.fullAngle);var u=Math.PI*(c-90)/180,h=r.centerX+o*Math.cos(l),d=r.centerY+o*Math.sin(l),p=r.centerX+o*Math.cos(u),g=r.centerY+o*Math.sin(u),b=f.polarToCartesian(r.centerX,r.centerY,r.donutSize,c),y=f.polarToCartesian(r.centerX,r.centerY,r.donutSize,s),v=n>180?1:0,m=["M",h,d,"A",o,o,0,v,1,p,g];return e="donut"===r.chartType?[].concat(m,["L",b.x,b.y,"A",r.donutSize,r.donutSize,0,v,0,y.x,y.y,"L",h,d,"z"]).join(" "):"pie"===r.chartType||"polarArea"===r.chartType?[].concat(m,["L",r.centerX,r.centerY,"L",h,d]).join(" "):[].concat(m).join(" "),a.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,r=new Dh(this.ctx),i=new Pc(this.ctx),n=new Cg(this.ctx),o=i.group(),a=i.group(),s=r.niceScale(0,Math.ceil(this.maxY),0),l=s.result.reverse(),c=s.result.length;this.maxY=s.niceMax;for(var u=e.globals.radialSize,h=u/(c-1),f=0;f1&&t.total.show&&(n=t.total.color);var a=o.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),s=o.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");r=(0,t.value.formatter)(r,o),i||"function"!=typeof t.total.formatter||(r=t.total.formatter(o));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,o):"",null!==a&&(a.textContent=e),null!==s&&(s.textContent=r),null!==a&&(a.style.fill=n)}},{key:"printDataLabelsInner",value:function(t,e){var r=this.w,i=t.getAttribute("data:value"),n=r.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];r.globals.series.length>1&&this.printInnerLabels(e,n,i,t);var o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==o&&(o.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,r=this.w,i=new Pc(this.ctx),n=r.config.plotOptions.polarArea.spokes;if(0!==n.strokeWidth){for(var o=[],a=360/r.globals.series.length,s=0;s0&&(g=e.getPreviousPath(a));for(var b=0;b=10?t.x>0?(r="start",i+=10):t.x<0&&(r="end",i-=10):r="middle",Math.abs(t.y)>=e-10&&(t.y<0?n-=10:t.y>0&&(n+=10)),{textAnchor:r,newX:i,newY:n}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,r=null,i=0;i0&&parseInt(n.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[i].paths[0]&&(r=e.globals.previousPaths[i].paths[0].d)}return r}},{key:"getDataPointsPos",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var i=[],n=0;n=360&&(f=360-Math.abs(this.startAngle)-.1);var d=r.drawPath({d:"",stroke:u,strokeWidth:a*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){var p=c.dropShadow;n.dropShadow(d,p)}l.add(d),d.attr("id","apexcharts-radialbarTrack-"+s),this.animatePaths(d,{centerX:t.centerX,centerY:t.centerY,endAngle:f,startAngle:h,size:t.size,i:s,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return i}},{key:"drawArcs",value:function(t){var e=this.w,r=new Pc(this.ctx),i=new Zu(this.ctx),n=new vc(this.ctx),o=r.group(),a=this.getStrokeWidth(t);t.size=t.size-a/2;var s=e.config.plotOptions.radialBar.hollow.background,l=t.size-a*t.series.length-this.margin*t.series.length-a*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,c=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(s=this.drawHollowImage(t,o,l,s));var u=this.drawHollow({size:c,centerX:t.centerX,centerY:t.centerY,fill:s||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var h=e.config.plotOptions.radialBar.hollow.dropShadow;n.dropShadow(u,h)}var d=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(d=0);var p=null;if(this.radialDataLabels.show){var g=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");p=this.renderInnerDataLabels(g,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:d})}"back"===e.config.plotOptions.radialBar.hollow.position&&(o.add(u),p&&o.add(p));var b=!1;e.config.plotOptions.radialBar.inverseOrder&&(b=!0);for(var y=b?t.series.length-1:0;b?y>=0:y100?100:t.series[y])/100,k=Math.round(this.totalAngle*S)+this.startAngle,A=void 0;e.globals.dataChanged&&(w=this.startAngle,A=Math.round(this.totalAngle*f.negToZero(e.globals.previousPaths[y])/100)+w),Math.abs(k)+Math.abs(x)>360&&(k-=.01),Math.abs(A)+Math.abs(w)>360&&(A-=.01);var O=k-x,P=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[y]:e.config.stroke.dashArray,C=r.drawPath({d:"",stroke:m,strokeWidth:a,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+y,strokeDashArray:P});if(Pc.setAttrs(C.node,{"data:angle":O,"data:value":t.series[y]}),e.config.chart.dropShadow.enabled){var j=e.config.chart.dropShadow;n.dropShadow(C,j,y)}if(n.setSelectionFilter(C,0,y),this.addListeners(C,this.radialDataLabels),v.add(C),C.attr({index:0,j:y}),this.barLabels.enabled){var T=f.polarToCartesian(t.centerX,t.centerY,t.size,x),E=this.barLabels.formatter(e.globals.seriesNames[y],{seriesIndex:y,w:e}),M=["apexcharts-radialbar-label"];this.barLabels.onClick||M.push("apexcharts-no-click");var L=this.barLabels.useSeriesColors?e.globals.colors[y]:e.config.chart.foreColor;L||(L=e.config.chart.foreColor);var I=T.x+this.barLabels.offsetX,_=T.y+this.barLabels.offsetY,R=r.drawText({x:I,y:_,text:E,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:L,cssClass:M.join(" ")});R.on("click",this.onBarLabelClick),R.attr({rel:y+1}),0!==x&&R.attr({"transform-origin":"".concat(I," ").concat(_),transform:"rotate(".concat(x," 0 0)")}),v.add(R)}var z=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(z=e.config.chart.animations.speed),e.globals.dataChanged&&(z=e.config.chart.animations.dynamicAnimation.speed),this.animDur=z/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(C,{centerX:t.centerX,centerY:t.centerY,endAngle:k,startAngle:x,prevEndAngle:A,prevStartAngle:w,size:t.size,i:y,totalItems:2,animBeginArr:this.animBeginArr,dur:z,shouldSetPrevPaths:!0})}return{g:o,elHollow:u,dataLabels:p}}},{key:"drawHollow",value:function(t){var e=new Pc(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,r,i){var n=this.w,o=new Zu(this.ctx),a=f.randomId(),s=n.config.plotOptions.radialBar.hollow.image;if(n.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:r,height:r,image:s,patternID:"pattern".concat(n.globals.cuid).concat(a)}),i="url(#pattern".concat(n.globals.cuid).concat(a,")");else{var l=n.config.plotOptions.radialBar.hollow.imageWidth,c=n.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===c){var u=n.globals.dom.Paper.image(s,(function(e){this.move(t.centerX-e.width/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+n.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(u)}else{var h=n.globals.dom.Paper.image(s,(function(e){this.move(t.centerX-l/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-c/2+n.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)}));e.add(h)}}return i}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,r=this.barLabels.onClick,i=this.w;r&&r(i.globals.seriesNames[e],{w:i,seriesIndex:e})}}],r&&Bg(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Lg);const $g=Zg;function Jg(t){return Jg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jg(t)}function Qg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Kg(t){for(var e=1;e0&&(this.visibleI=this.visibleI+1);var b=0,y=0,v=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[d][0],v=d);var m=this.barHelpers.initialPositions();h=m.y,c=m.zeroW,u=m.x,y=m.barWidth,b=m.barHeight,a=m.xDivision,s=m.yDivision,l=m.zeroH;for(var x=i.group({class:"apexcharts-datalabels","data:realIndex":d}),w=i.group({class:"apexcharts-rangebar-goals-markers"}),S=0;S0}));return this.isHorizontal?(i=f.config.plotOptions.bar.rangeBarGroupRows?o+c*y:o+s*this.visibleI+c*y,v>-1&&!f.config.plotOptions.bar.rangeBarOverlap&&(d=f.globals.seriesRange[e][v].overlaps).indexOf(p)>-1&&(i=(s=h.barHeight/d.length)*this.visibleI+c*(100-parseInt(this.barOptions.barHeight,10))/100/2+s*(this.visibleI+d.indexOf(p))+c*y)):(y>-1&&!f.globals.timescaleLabels.length&&(n=f.config.plotOptions.bar.rangeBarGroupRows?a+u*y:a+l*this.visibleI+u*y),v>-1&&!f.config.plotOptions.bar.rangeBarOverlap&&(d=f.globals.seriesRange[e][v].overlaps).indexOf(p)>-1&&(n=(l=h.barWidth/d.length)*this.visibleI+u*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+d.indexOf(p))+u*y)),{barYPosition:i,barXPosition:n,barHeight:s,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,r=t.x,i=t.xDivision,n=t.barWidth,o=t.barXPosition,a=t.zeroH,s=this.w,l=e.i,c=e.j,u=e.realIndex,h=e.translationsIndex,f=this.yRatio[h],d=this.getRangeValue(u,c),p=Math.min(d.start,d.end),g=Math.max(d.start,d.end);void 0===this.series[l][c]||null===this.series[l][c]?p=a:(p=a-p/f,g=a-g/f);var b=Math.abs(g-p),y=this.barHelpers.getColumnPaths({barXPosition:o,barWidth:n,y1:p,y2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:u,i:u,j:c,w:s});if(s.globals.isXNumeric){var v=this.getBarXForNumericXAxis({x:r,j:c,realIndex:u,barWidth:n});r=v.x,o=v.barXPosition}else r+=i;return{pathTo:y.pathTo,pathFrom:y.pathFrom,barHeight:b,x:r,y:d.start<0&&d.end<0?p:g,goalY:this.barHelpers.getGoalValues("y",null,a,l,c,h),barXPosition:o}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,r=t.y,i=t.y1,n=t.y2,o=t.yDivision,a=t.barHeight,s=t.barYPosition,l=t.zeroW,c=this.w,u=e.realIndex,h=e.j,f=this.preventBarOverflow(l+i/this.invertedYRatio),d=this.preventBarOverflow(l+n/this.invertedYRatio),p=this.getRangeValue(u,h),g=Math.abs(d-f),b=this.barHelpers.getBarpaths({barYPosition:s,barHeight:a,x1:f,x2:d,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:u,realIndex:u,j:h,w:c});return c.globals.isXNumeric||(r+=o),{pathTo:b.pathTo,pathFrom:b.pathFrom,barWidth:g,x:p.start<0&&p.end<0?f:d,goalX:this.barHelpers.getGoalValues("x",l,null,u,h),y:r}}},{key:"getRangeValue",value:function(t,e){var r=this.w;return{start:r.globals.seriesRangeStart[t][e],end:r.globals.seriesRangeEnd[t][e]}}}],r&&eb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const lb=sb;function cb(t){return cb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cb(t)}function ub(t,e){for(var r=0;r0&&parseInt(a.realIndex,10)===parseInt(i,10)&&("line"===a.type?(this.lineCtx.appendPathFrom=!1,e=n.globals.previousPaths[o].paths[0].d):"area"===a.type&&(this.lineCtx.appendPathFrom=!1,r=n.globals.previousPaths[o].paths[0].d,n.config.stroke.show&&n.globals.previousPaths[o].paths[1]&&(e=n.globals.previousPaths[o].paths[1].d)))}return{pathFromLine:e,pathFromArea:r}}},{key:"determineFirstPrevY",value:function(t){var e,r,i,n=t.i,o=t.realIndex,a=t.series,s=t.prevY,l=t.lineYPosition,c=t.translationsIndex,u=this.w,h=u.config.chart.stacked&&!u.globals.comboCharts||u.config.chart.stacked&&u.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(r=this.w.config.series[o])||void 0===r?void 0:r.type));if(void 0!==(null===(i=a[n])||void 0===i?void 0:i[0]))s=(l=h&&n>0?this.lineCtx.prevSeriesY[n-1][0]:this.lineCtx.zeroY)-a[n][0]/this.lineCtx.yRatio[c]+2*(this.lineCtx.isReversed?a[n][0]/this.lineCtx.yRatio[c]:0);else if(h&&n>0&&void 0===a[n][0])for(var f=n-1;f>=0;f--)if(null!==a[f][0]&&void 0!==a[f][0]){s=l=this.lineCtx.prevSeriesY[f][0];break}return{prevY:s,lineYPosition:l}}}],r&&ub(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),db=function(t){var e=function(t){for(var e,r,i,n,o=function(t){for(var e=[],r=t[0],i=t[1],n=e[0]=gb(r,i),o=1,a=t.length-1;o9&&(n=3*i/Math.sqrt(n),o[l]=n*e,o[l+1]=n*r);for(var c=0;c<=a;c++)n=(t[Math.min(a,c+1)][0]-t[Math.max(0,c-1)][0])/(6*(1+o[c]*o[c])),s.push([n||0,o[c]*n||0]);return s}(t),r=t[1],i=t[0],n=[],o=e[1],a=e[0];n.push(i,[i[0]+a[0],i[1]+a[1],r[0]-o[0],r[1]-o[1],r[0],r[1]]);for(var s=2,l=e.length;s1&&i[1].length<6){var n=i[0].length;i[1]=[2*i[0][n-2]-i[0][n-4],2*i[0][n-1]-i[0][n-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i};function gb(t,e){return(e[1]-t[1])/(e[0]-t[0])}function bb(t){return bb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bb(t)}function yb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function vb(t){for(var e=1;e1?f:0;this._initSerieVariables(t,h,f);var p=[],g=[],b=[],y=o.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,f),o.globals.isXNumeric&&o.globals.seriesX.length>0&&(y=(o.globals.seriesX[f][0]-o.globals.minX)/this.xRatio),b.push(y);var v,m=y,x=void 0,w=m,S=this.zeroY,k=this.zeroY;S=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:t,prevY:S,lineYPosition:0,translationsIndex:d}).prevY,"monotoneCubic"===o.config.stroke.curve&&null===t[h][0]?p.push(null):p.push(S),v=S,"rangeArea"===s&&(x=k=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:i,prevY:k,lineYPosition:0,translationsIndex:d}).prevY,g.push(null!==p[0]?k:null));var A=this._calculatePathsFrom({type:s,series:t,i:h,realIndex:f,translationsIndex:d,prevX:w,prevY:S,prevY2:k}),O=[p[0]],P=[g[0]],C={type:s,series:t,realIndex:f,translationsIndex:d,i:h,x:y,y:1,pX:m,pY:v,pathsFrom:A,linePaths:[],areaPaths:[],seriesIndex:r,lineYPosition:0,xArrj:b,yArrj:p,y2Arrj:g,seriesRangeEnd:i},j=this._iterateOverDataPoints(vb(vb({},C),{},{iterations:"rangeArea"===s?t[h].length-1:void 0,isRangeStart:!0}));if("rangeArea"===s){for(var T=this._calculatePathsFrom({series:i,i:h,realIndex:f,prevX:w,prevY:k}),E=this._iterateOverDataPoints(vb(vb({},C),{},{series:i,xArrj:[y],yArrj:O,y2Arrj:P,pY:x,areaPaths:j.areaPaths,pathsFrom:T,iterations:i[h].length-1,isRangeStart:!1})),M=j.linePaths.length/2,L=0;L=0;I--)l.add(u[I]);else for(var _=0;_1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[r],o=r),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.globals.gridHeight-this.baseLineY[o]-(this.isReversed?i.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[o]:0),this.areaBottomY=this.zeroY,(this.zeroY>i.globals.gridHeight||"end"===i.config.plotOptions.area.fillTo)&&(this.areaBottomY=i.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=n.group({class:"apexcharts-series",zIndex:void 0!==i.config.series[r].zIndex?i.config.series[r].zIndex:r,seriesName:f.escapeString(i.globals.seriesNames[r])}),this.elPointsMain=n.group({class:"apexcharts-series-markers-wrap","data:realIndex":r}),this.elDataLabelsWrap=n.group({class:"apexcharts-datalabels","data:realIndex":r});var a=t[e].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":a,rel:e+1,"data:realIndex":r}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,r,i,n,o=t.type,a=t.series,s=t.i,l=t.realIndex,c=t.translationsIndex,u=t.prevX,h=t.prevY,f=t.prevY2,d=this.w,p=new Pc(this.ctx);if(null===a[s][0]){for(var g=0;g0){var b=this.lineHelpers.checkPreviousPaths({pathFromLine:i,pathFromArea:n,realIndex:l});i=b.pathFromLine,n=b.pathFromArea}return{prevX:u,prevY:h,linePath:e,areaPath:r,pathFromLine:i,pathFromArea:n}}},{key:"_handlePaths",value:function(t){var e=t.type,r=t.realIndex,i=t.i,n=t.paths,o=this.w,a=new Pc(this.ctx),s=new Zu(this.ctx);this.prevSeriesY.push(n.yArrj),o.globals.seriesXvalues[r]=n.xArrj,o.globals.seriesYvalues[r]=n.yArrj;var l=o.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var c=o.globals.seriesXvalues[r][o.globals.seriesXvalues[r].length-l.count-1],u=a.drawRect(c,0,o.globals.gridWidth,o.globals.gridHeight,0);o.globals.dom.elForecastMask.appendChild(u.node);var h=a.drawRect(0,0,c,o.globals.gridHeight,0);o.globals.dom.elNonForecastMask.appendChild(h.node)}this.pointsChart||o.globals.delayedElements.push({el:this.elPointsMain.node,index:r});var f={i,realIndex:r,animationDelay:i,initialSpeed:o.config.chart.animations.speed,dataChangeSpeed:o.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var d=s.fillPath({seriesNumber:r}),p=0;p0&&"rangeArea"!==e){var S=a.renderPaths(x);S.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&S.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(S),S.attr("clip-path","url(#forecastMask".concat(o.globals.cuid,")")),w.attr("clip-path","url(#nonForecastMask".concat(o.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,r,i=this,n=t.type,o=t.series,a=t.iterations,s=t.realIndex,l=t.translationsIndex,c=t.i,u=t.x,h=t.y,d=t.pX,p=t.pY,g=t.pathsFrom,b=t.linePaths,y=t.areaPaths,v=t.seriesIndex,m=t.lineYPosition,x=t.xArrj,w=t.yArrj,S=t.y2Arrj,k=t.isRangeStart,A=t.seriesRangeEnd,O=this.w,P=new Pc(this.ctx),C=this.yRatio,j=g.prevY,T=g.linePath,E=g.areaPath,M=g.pathFromLine,L=g.pathFromArea,I=f.isNumber(O.globals.minYArr[s])?O.globals.minYArr[s]:O.globals.minY;a||(a=O.globals.dataPoints>1?O.globals.dataPoints-1:O.globals.dataPoints);var _=function(t,e){return e-t/C[l]+2*(i.isReversed?t/C[l]:0)},R=h,z=O.config.chart.stacked&&!O.globals.comboCharts||O.config.chart.stacked&&O.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[s])||void 0===e?void 0:e.type)||"column"===(null===(r=this.w.config.series[s])||void 0===r?void 0:r.type)),X=O.config.stroke.curve;Array.isArray(X)&&(X=Array.isArray(v)?X[v[c]]:X[c]);for(var D,Y=0,H=0;H0&&O.globals.collapsedSeries.length0;e--){if(!(O.globals.collapsedSeriesIndices.indexOf((null==v?void 0:v[e])||e)>-1))return e;e--}return 0}(c-1)][H+1]:this.zeroY,F?h=_(I,m):(h=_(o[c][H+1],m),"rangeArea"===n&&(R=_(A[c][H+1],m))),x.push(u),!F||"smooth"!==O.config.stroke.curve&&"monotoneCubic"!==O.config.stroke.curve?(w.push(h),S.push(R)):(w.push(null),S.push(null));var N=this.lineHelpers.calculatePoints({series:o,x:u,y:h,realIndex:s,i:c,j:H,prevY:j}),W=this._createPaths({type:n,series:o,i:c,realIndex:s,j:H,x:u,y:h,y2:R,xArrj:x,yArrj:w,y2Arrj:S,pX:d,pY:p,pathState:Y,segmentStartX:D,linePath:T,areaPath:E,linePaths:b,areaPaths:y,curve:X,isRangeStart:k});y=W.areaPaths,b=W.linePaths,d=W.pX,p=W.pY,Y=W.pathState,D=W.segmentStartX,E=W.areaPath,T=W.linePath,!this.appendPathFrom||O.globals.hasNullValues||"monotoneCubic"===X&&"rangeArea"===n||(M+=P.line(u,this.areaBottomY),L+=P.line(u,this.areaBottomY)),this.handleNullDataPoints(o,N,c,H,s),this._handleMarkersAndLabels({type:n,pointsPos:N,i:c,j:H,realIndex:s,isRangeStart:k})}return{yArrj:w,xArrj:x,pathFromArea:L,areaPaths:y,pathFromLine:M,linePaths:b,linePath:T,areaPath:E}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,r=t.pointsPos,i=t.isRangeStart,n=t.i,o=t.j,a=t.realIndex,s=this.w,l=new lh(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,o,{realIndex:a,pointsPos:r,zRatio:this.zRatio,elParent:this.elPointsMain});else{s.globals.series[n].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var c=this.markers.plotChartMarkers(r,a,o+1);null!==c&&this.elPointsMain.add(c)}var u=l.drawDataLabel({type:e,isRangeStart:i,pos:r,i:a,j:o+1});null!==u&&this.elDataLabelsWrap.add(u)}},{key:"_createPaths",value:function(t){var e,r=t.type,i=t.series,n=t.i,o=(t.realIndex,t.j),a=t.x,s=t.y,l=t.xArrj,c=t.yArrj,u=t.y2,h=t.y2Arrj,f=t.pX,d=t.pY,p=t.pathState,g=t.segmentStartX,b=t.linePath,y=t.areaPath,v=t.linePaths,m=t.areaPaths,x=t.curve,w=t.isRangeStart,S=new Pc(this.ctx),k=this.areaBottomY,A="rangeArea"===r,O="rangeArea"===r&&w;switch(x){case"monotoneCubic":var P=w?c:h;switch(p){case 0:if(null===P[o+1])break;p=1;case 1:if(!(A?l.length===i[n].length:o===i[n].length-2))break;case 2:var C=w?l:l.slice().reverse(),j=w?P:P.slice().reverse(),T=(e=j,C.map((function(t,r){return[t,e[r]]})).filter((function(t){return null!==t[1]}))),E=T.length>1?db(T):T,M=[];A&&(O?m=T:M=m.reverse());var L=0,I=0;if(function(t,e){for(var r=function(t){var e=[],r=0;return t.forEach((function(t){null!==t?r++:r>0&&(e.push(r),r=0)})),r>0&&e.push(r),e}(t),i=[],n=0,o=0;n4?(e+="C".concat(i[0],", ").concat(i[1]),e+=", ".concat(i[2],", ").concat(i[3]),e+=", ".concat(i[4],", ").concat(i[5])):n>2&&(e+="S".concat(i[0],", ").concat(i[1]),e+=", ".concat(i[2],", ").concat(i[3]))}return e}(t),r=I,i=(I+=t.length)-1;O?b=S.move(T[r][0],T[r][1])+e:A?b=S.move(M[r][0],M[r][1])+S.line(T[r][0],T[r][1])+e+S.line(M[i][0],M[i][1]):(b=S.move(T[r][0],T[r][1])+e,y=b+S.line(T[i][0],k)+S.line(T[r][0],k)+"z",m.push(y)),v.push(b)})),A&&L>1&&!O){var _=v.slice(L).reverse();v.splice(L),_.forEach((function(t){return v.push(t)}))}p=0}break;case"smooth":var R=.35*(a-f);if(null===i[n][o])p=0;else switch(p){case 0:if(g=f,b=O?S.move(f,h[o])+S.line(f,d):S.move(f,d),y=S.move(f,d),null===i[n][o+1]||void 0===i[n][o+1]){v.push(b),m.push(y);break}if(p=1,o=i[n].length-2&&(O&&(b+=S.curve(a,s,a,s,a,u)+S.move(a,u)),y+=S.curve(a,s,a,s,a,k)+S.line(g,k)+"z",v.push(b),m.push(y),p=-1)}}f=a,d=s;break;default:var D=function(t,e,r){var i=[];switch(t){case"stepline":i=S.line(e,null,"H")+S.line(null,r,"V");break;case"linestep":i=S.line(null,r,"V")+S.line(e,null,"H");break;case"straight":i=S.line(e,r)}return i};if(null===i[n][o])p=0;else switch(p){case 0:if(g=f,b=O?S.move(f,h[o])+S.line(f,d):S.move(f,d),y=S.move(f,d),null===i[n][o+1]||void 0===i[n][o+1]){v.push(b),m.push(y);break}if(p=1,o=i[n].length-2&&(O&&(b+=S.line(a,u)),y+=S.line(a,k)+S.line(g,k)+"z",v.push(b),m.push(y),p=-1)}}f=a,d=s}return{linePaths:v,areaPaths:m,pX:f,pY:d,pathState:p,segmentStartX:g,linePath:b,areaPath:y}}},{key:"handleNullDataPoints",value:function(t,e,r,i,n){var o=this.w;if(null===t[r][i]&&o.config.markers.showNullDataPoints||1===t[r].length){var a=this.strokeWidth-o.config.markers.strokeWidth/2;a>0||(a=0);var s=this.markers.plotChartMarkers(e,n,i+1,a,!0);null!==s&&this.elPointsMain.add(s)}}}],r&&xb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const kb=Sb;function Ab(t){return Ab="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ab(t)}function Ob(t,e){for(var r=0;ro-i&&l.width<=a-n){var c=s.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(c.x," ").concat(c.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,r,i,n,o){var a=new Pc(this.ctx),s=a.getTextRects(t,e).width+this.w.config.stroke.width+5>n-r&&o-i>n-r?o-i:n-r,l=a.getTextBasedOnMaxWidth({text:t,maxWidth:s,fontSize:e});return t.length!==l.length&&s/e<5?"":l}},{key:"animateTreemap",value:function(t,e,r,i){var n=new b(this.ctx);n.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:r.x,y:r.y,width:r.width,height:r.height},i,(function(){n.animationCompleted(t)}))}}],r&&Ob(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function jb(t){return jb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jb(t)}function Tb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Eb(t){for(var e=1;e5e4&&(i.globals.disableZoomOut=!0);var a=n.getTimeUnitsfromTimestamp(t,e,this.utc),s=i.globals.gridWidth/o,l=s/24,c=l/60,u=c/60,h=Math.floor(24*o),f=Math.floor(1440*o),d=Math.floor(86400*o),p=Math.floor(o),g=Math.floor(o/30),b=Math.floor(o/365),y={minMillisecond:a.minMillisecond,minSecond:a.minSecond,minMinute:a.minMinute,minHour:a.minHour,minDate:a.minDate,minMonth:a.minMonth,minYear:a.minYear},v={firstVal:y,currentMillisecond:y.minMillisecond,currentSecond:y.minSecond,currentMinute:y.minMinute,currentHour:y.minHour,currentMonthDate:y.minDate,currentDate:y.minDate,currentMonth:y.minMonth,currentYear:y.minYear,daysWidthOnXAxis:s,hoursWidthOnXAxis:l,minutesWidthOnXAxis:c,secondsWidthOnXAxis:u,numberOfSeconds:d,numberOfMinutes:f,numberOfHours:h,numberOfDays:p,numberOfMonths:g,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var m=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?Eb(Eb({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?Eb(Eb({},e),{},{value:t.value}):"minute"===t.unit?Eb(Eb({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?Eb(Eb({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return m.filter((function(t){var e=1,n=Math.ceil(i.globals.gridWidth/120),o=t.value;void 0!==i.config.xaxis.tickAmount&&(n=i.config.xaxis.tickAmount),m.length>n&&(e=Math.floor(m.length/n));var a=!1,s=!1;switch(r.tickInterval){case"years":"year"===t.unit&&(a=!0);break;case"half_year":e=7,"year"===t.unit&&(a=!0);break;case"months":e=1,"year"===t.unit&&(a=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(a=!0),30===o&&(s=!0);break;case"months_days":e=10,"month"===t.unit&&(a=!0),30===o&&(s=!0);break;case"week_days":e=8,"month"===t.unit&&(a=!0);break;case"days":e=1,"month"===t.unit&&(a=!0);break;case"hours":"day"===t.unit&&(a=!0);break;case"minutes_fives":case"seconds_fives":o%5!=0&&(s=!0);break;case"seconds_tens":o%10!=0&&(s=!0)}if("hours"===r.tickInterval||"minutes_fives"===r.tickInterval||"seconds_tens"===r.tickInterval||"seconds_fives"===r.tickInterval){if(!s)return!0}else if((o%e==0||a)&&!s)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var r=this.w,i=this.formatDates(t),n=this.removeOverlappingTS(i);r.globals.timescaleLabels=n.slice(),new Uf(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,r=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case r>15:this.tickInterval="minutes_fives";break;case r>5:this.tickInterval="minutes";break;case r>1:this.tickInterval="seconds_tens";break;case 60*r>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,r=t.currentMonth,i=t.currentYear,n=t.daysWidthOnXAxis,o=t.numberOfYears,a=e.minYear,s=0,l=new Vc(this.ctx),c="year";if(e.minDate>1||e.minMonth>0){var u=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);s=(l.determineDaysOfYear(e.minYear)-u+1)*n,a=e.minYear+1,this.timeScaleArray.push({position:s,value:a,unit:c,year:a,month:f.monthMod(r+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:s,value:a,unit:c,year:i,month:f.monthMod(r+1)});for(var h=a,d=s,p=0;p1){l=(c.determineDaysOfMonths(i+1,e.minYear)-r+1)*o,s=f.monthMod(i+1);var d=n+h,p=f.monthMod(s),g=s;0===s&&(u="year",g=d,p=1,d+=h+=1),this.timeScaleArray.push({position:l,value:g,unit:u,year:d,month:p})}else this.timeScaleArray.push({position:l,value:s,unit:u,year:n,month:f.monthMod(i)});for(var b=s+1,y=l,v=0,m=1;va.determineDaysOfMonths(e+1,r)?(c=1,s="month",d=e+=1,e):e},h=(24-e.minHour)*n,d=l,p=u(c,r,i);0===e.minHour&&1===e.minDate?(h=0,d=f.monthMod(e.minMonth),s="month",c=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(h=0,l=e.minDate,d=l,p=u(c=l,r,i)),this.timeScaleArray.push({position:h,value:d,unit:s,year:this._getYear(i,p,0),month:f.monthMod(p),day:c});for(var g=h,b=0;bs.determineDaysOfMonths(e+1,n)&&(b=1,e+=1),{month:e,date:b}},u=function(t,e){return t>s.determineDaysOfMonths(e+1,n)?e+=1:e},h=60-(e.minMinute+e.minSecond/60),d=h*o,p=e.minHour+1,g=p;60===h&&(d=0,g=p=e.minHour);var b=r;g>=24&&(g=0,l="day",p=b+=1);var y=c(b,i).month;y=u(b,y),this.timeScaleArray.push({position:d,value:p,unit:l,day:b,hour:g,year:n,month:f.monthMod(y)}),g++;for(var v=d,m=0;m=24&&(g=0,l="day",y=c(b+=1,y).month,y=u(b,y));var x=this._getYear(n,y,0);v=60*o+v;var w=0===g?b:g;this.timeScaleArray.push({position:v,value:w,unit:l,hour:g,day:b,year:x,month:f.monthMod(y)}),g++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,r=t.currentSecond,i=t.currentMinute,n=t.currentHour,o=t.currentDate,a=t.currentMonth,s=t.currentYear,l=t.minutesWidthOnXAxis,c=t.secondsWidthOnXAxis,u=t.numberOfMinutes,h=i+1,d=o,p=a,g=s,b=n,y=(60-r-e/1e3)*c,v=0;v=60&&(h=0,24===(b+=1)&&(b=0)),this.timeScaleArray.push({position:y,value:h,unit:"minute",hour:b,minute:h,day:d,year:this._getYear(g,p,0),month:f.monthMod(p)}),y+=l,h++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,r=t.currentSecond,i=t.currentMinute,n=t.currentHour,o=t.currentDate,a=t.currentMonth,s=t.currentYear,l=t.secondsWidthOnXAxis,c=t.numberOfSeconds,u=r+1,h=i,d=o,p=a,g=s,b=n,y=(1e3-e)/1e3*l,v=0;v=60&&(u=0,++h>=60&&(h=0,24==++b&&(b=0))),this.timeScaleArray.push({position:y,value:u,unit:"second",hour:b,minute:h,second:u,day:d,year:this._getYear(g,p,0),month:f.monthMod(p)}),y+=l,u++}},{key:"createRawDateString",value:function(t,e){var r=t.year;return 0===t.month&&(t.month=1),r+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?r+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":r+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?r+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":r+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?r+=":"+("0"+e).slice(-2):r+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?r+=":"+("0"+e).slice(-2):r+=":00",this.utc&&(r+=".000Z"),r}},{key:"formatDates",value:function(t){var e=this,r=this.w;return t.map((function(t){var i=t.value.toString(),n=new Vc(e.ctx),o=e.createRawDateString(t,i),a=n.getDate(n.parseDate(o));if(e.utc||(a=n.getDate(n.parseDateWithTimezone(o))),void 0===r.config.xaxis.labels.format){var s="dd MMM",l=r.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(s=l.year),"month"===t.unit&&(s=l.month),"day"===t.unit&&(s=l.day),"hour"===t.unit&&(s=l.hour),"minute"===t.unit&&(s=l.minute),"second"===t.unit&&(s=l.second),i=n.formatDate(a,s)}else i=n.formatDate(a,r.config.xaxis.labels.format);return{dateString:o,position:t.position,value:i,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,r=this,i=new Pc(this.ctx),n=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(n=!0,e=i.getTextRects(t[0].value).width);var o=0,a=t.map((function(a,s){if(s>0&&r.w.config.xaxis.labels.hideOverlappingLabels){var l=n?e:i.getTextRects(t[o].value).width,c=t[o].position;return a.position>c+l+10?(o=s,a):null}return a}));return a.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,r){return t+Math.floor(e/12)+r}}],r&&Lb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const zb=Rb;function Xb(t){return Xb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xb(t)}function Db(t){return function(t){if(Array.isArray(t))return Yb(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Yb(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Yb(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&(l&&console.warn("Chart or series type ".concat(l," cannot appear with other chart or series types.")),a.column.series.length>0&&n.plotOptions.bar.horizontal&&(c-=a.column.series.length,a.column={series:[],i:[]},r.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),o.comboCharts||(o.comboCharts=c>0);var u=new kb(i,e),h=new dg(i,e);i.pie=new Lg(i);var f=new $g(i);i.rangeBar=new lb(i,e);var d=new Hg(i),p=[];if(o.comboCharts){var g,b,y=new Mc(i);if(a.area.series.length>0&&(g=p).push.apply(g,Db(y.drawSeriesByGroup(a.area,o.areaGroups,"area",u))),a.column.series.length>0)if(n.chart.stacked){var v=new eg(i,e);p.push(v.draw(a.column.series,a.column.i))}else i.bar=new Np(i,e),p.push(i.bar.draw(a.column.series,a.column.i));if(a.rangeArea.series.length>0&&p.push(u.draw(a.rangeArea.series,"rangeArea",a.rangeArea.i,a.rangeArea.seriesRangeEnd)),a.line.series.length>0&&(b=p).push.apply(b,Db(y.drawSeriesByGroup(a.line,o.lineGroups,"line",u))),a.candlestick.series.length>0&&p.push(h.draw(a.candlestick.series,"candlestick",a.candlestick.i)),a.boxPlot.series.length>0&&p.push(h.draw(a.boxPlot.series,"boxPlot",a.boxPlot.i)),a.rangeBar.series.length>0&&p.push(i.rangeBar.draw(a.rangeBar.series,a.rangeBar.i)),a.scatter.series.length>0){var m=new kb(i,e,!0);p.push(m.draw(a.scatter.series,"scatter",a.scatter.i))}if(a.bubble.series.length>0){var x=new kb(i,e,!0);p.push(x.draw(a.bubble.series,"bubble",a.bubble.i))}}else switch(n.chart.type){case"line":p=u.draw(o.series,"line");break;case"area":p=u.draw(o.series,"area");break;case"bar":n.chart.stacked?p=new eg(i,e).draw(o.series):(i.bar=new Np(i,e),p=i.bar.draw(o.series));break;case"candlestick":p=new dg(i,e).draw(o.series,"candlestick");break;case"boxPlot":p=new dg(i,e).draw(o.series,n.chart.type);break;case"rangeBar":p=i.rangeBar.draw(o.series);break;case"rangeArea":p=u.draw(o.seriesRangeStart,"rangeArea",void 0,o.seriesRangeEnd);break;case"heatmap":p=new kg(i,e).draw(o.series);break;case"treemap":p=new Cb(i,e).draw(o.series);break;case"pie":case"donut":case"polarArea":p=i.pie.draw(o.series);break;case"radialBar":p=f.draw(o.series);break;case"radar":p=d.draw(o.series);break;default:p=u.draw(o.series)}return p}},{key:"setSVGDimensions",value:function(){var t=this.w,e=t.globals,r=t.config;r.chart.width=r.chart.width||"100%",r.chart.height=r.chart.height||"auto",e.svgWidth=r.chart.width,e.svgHeight=r.chart.height;var i=f.getDimensions(this.el),n=r.chart.width.toString().split(/[0-9]+/g).pop();"%"===n?f.isNumber(i[0])&&(0===i[0].width&&(i=f.getDimensions(this.el.parentNode)),e.svgWidth=i[0]*parseInt(r.chart.width,10)/100):"px"!==n&&""!==n||(e.svgWidth=parseInt(r.chart.width,10));var o=String(r.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===o){var a=f.getDimensions(this.el.parentNode);e.svgHeight=a[1]*parseInt(r.chart.height,10)/100}else e.svgHeight=parseInt(r.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Pc.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==o){var s=r.chart.sparkline.enabled?0:e.axisCharts?r.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(e.svgHeight+s,"px")}e.dom.elWrap.style.width="".concat(e.svgWidth,"px"),e.dom.elWrap.style.height="".concat(e.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,r=t.translateX;Pc.setAttrs(t.dom.elGraphical.node,{transform:"translate(".concat(r,", ").concat(e,")")})}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,r=0,i=t.config.chart.sparkline.enabled?1:15;i+=t.config.grid.padding.bottom,["top","bottom"].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(r=new od(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var n=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),o=2.05*t.globals.radialSize;if(n&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var a=f.getBoundingClientRect(n);o=a.bottom;var s=a.bottom-a.top;o=Math.max(2.05*t.globals.radialSize,s)}var l=Math.ceil(o+e.translateY+r+i);e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).includes("%")||(e.dom.elWrap.style.height="".concat(l,"px"),Pc.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(l,"px"))}},{key:"coreCalculations",value:function(){new Wh(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(){return[]}))},r=new Ru,i=this.w.globals;r.initGlobalVars(i),i.seriesXvalues=e(),i.seriesYvalues=e()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var t=this.w,e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new hf(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new hf(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new zb(this.ctx);var r=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?r=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(r=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(r)}e=new Mc(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var r=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];r.forEach((function(e){var r=ApexCharts.getChartByID(e);r.w.globals.brushSource=t.ctx,"function"!=typeof r.w.config.chart.events.zoomed&&(r.w.config.chart.events.zoomed=function(){return t.updateSourceChart(r)}),"function"!=typeof r.w.config.chart.events.scrolled&&(r.w.config.chart.events.scrolled=function(){return t.updateSourceChart(r)})})),e.config.chart.events.selection=function(t,e){r.forEach((function(t){ApexCharts.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:e.xaxis.min,max:e.xaxis.max}},!1,!1,!1,!1)}))}}}}],r&&Hb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Nb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Wb(t){for(var e=1;e1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(a){var s=[e.ctx];n&&(s=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(s=[e.ctx],e.ctx.w.globals.isExecCalled=!1),s.forEach((function(n,l){var c=n.w;if(c.globals.shouldAnimate=i,r||(c.globals.resized=!0,c.globals.dataChanged=!0,i&&n.series.getPreviousPaths()),t&&"object"===Vb(t)&&(n.config=new Mu(t),t=Mc.extendArrayProps(n.config,t,c),n.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,c.config=f.extend(c.config,t),o&&(c.globals.lastXAxis=t.xaxis?f.clone(t.xaxis):[],c.globals.lastYAxis=t.yaxis?f.clone(t.yaxis):[],c.globals.initialConfig=f.extend({},c.config),c.globals.initialSeries=f.clone(c.config.series),t.series))){for(var u=0;u2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(n){var o,a=r.w;return a.globals.shouldAnimate=e,a.globals.dataChanged=!0,e&&r.ctx.series.getPreviousPaths(),a.globals.axisCharts?(o=t.map((function(t,e){return r._extendSeries(t,e)})),0===o.length&&(o=[{data:[]}]),a.config.series=o):a.config.series=t.slice(),i&&(a.globals.initialConfig.series=f.clone(a.config.series),a.globals.initialSeries=f.clone(a.config.series)),r.ctx.update().then((function(){n(r.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var r=this.w,i=r.config.series[e];return Wb(Wb({},r.config.series[e]),{},{name:t.name?t.name:null==i?void 0:i.name,color:t.color?t.color:null==i?void 0:i.color,type:t.type?t.type:null==i?void 0:i.type,group:t.group?t.group:null==i?void 0:i.group,hidden:void 0!==t.hidden?t.hidden:null==i?void 0:i.hidden,data:t.data?t.data:null==i?void 0:i.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var r=this.w,i=null,n=".apexcharts-series[data\\:realIndex='".concat(t,"']");return r.globals.axisCharts?i=r.globals.dom.Paper.findOne("".concat(n," path[j='").concat(e,"'], ").concat(n," circle[j='").concat(e,"'], ").concat(n," rect[j='").concat(e,"']")):void 0===e&&(i=r.globals.dom.Paper.findOne("".concat(n," path[j='").concat(t,"']")),"pie"!==r.config.chart.type&&"polarArea"!==r.config.chart.type&&"donut"!==r.config.chart.type||this.ctx.pie.pieClicked(t)),i?(new Pc(this.ctx).pathMouseDown(i,null),i.node?i.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(r){void 0!==t.xaxis[r]&&(e.config.xaxis[r]=t.xaxis[r],e.globals.lastXAxis[r]=t.xaxis[r])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var r=new Cu(t);t=r.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,r){t.yaxis[r].min=0,t.yaxis[r].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,r=this.w,i=r.globals.lastXAxis,n=r.globals.lastYAxis;t&&t.xaxis&&(i=t.xaxis),t&&t.yaxis&&(n=t.yaxis),r.config.xaxis.min=i.min,r.config.xaxis.max=i.max;r.config.yaxis.map((function(t,i){r.globals.zoomed||void 0!==n[i]?function(t){void 0!==n[t]&&(r.config.yaxis[t].min=n[t].min,r.config.yaxis[t].max=n[t].max)}(i):void 0!==e.ctx.opts.yaxis[i]&&(t.min=e.ctx.opts.yaxis[i].min,t.max=e.ctx.opts.yaxis[i].max)}))}}],r&&Ub(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function $b(t){return $b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$b(t)}function Jb(t,e){for(var r=0;r0&&arguments[0]!==c?arguments[0]:[],n=arguments.length>1?arguments[1]:c,o=arguments.length>2?arguments[2]:c,a=arguments.length>3?arguments[3]:c,s=arguments.length>4?arguments[4]:c,l=arguments.length>5?arguments[5]:c,c=arguments.length>6?arguments[6]:c,u=t.slice(n,o||c),h=a.slice(s,l||c),f=0,d={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};u[f]=e.call(d,u[f]),h[f]=e.call(p,h[f]),u[f][0]!=h[f][0]||"M"==u[f][0]||"A"==u[f][0]&&(u[f][4]!=h[f][4]||u[f][5]!=h[f][5])?(Array.prototype.splice.apply(u,[f,1].concat(i.call(d,u[f]))),Array.prototype.splice.apply(h,[f,1].concat(i.call(p,h[f])))):(u[f]=r.call(d,u[f]),h[f]=r.call(p,h[f])),++f!=u.length||f!=h.length;)f==u.length&&u.push(["C",d.pos[0],d.pos[1],d.pos[0],d.pos[1],d.pos[0],d.pos[1]]),f==h.length&&h.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]]);return{start:u,dest:h}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function r(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function i(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var r,i,n,o,a,s,l,c,u,h,f,d,p,g,b,y,v,m,x,w,S,k,A,O,P,C,j=Math.abs(e[1]),T=Math.abs(e[2]),E=e[3]%360,M=e[4],L=e[5],I=e[6],_=e[7],R=new Rt(t),z=new Rt(I,_),X=[];if(0===j||0===T||R.x===z.x&&R.y===z.y)return[["C",R.x,R.y,z.x,z.y,z.x,z.y]];for((i=(r=new Rt((R.x-z.x)/2,(R.y-z.y)/2).transform((new Ht).rotate(E))).x*r.x/(j*j)+r.y*r.y/(T*T))>1&&(j*=i=Math.sqrt(i),T*=i),n=(new Ht).rotate(E).scale(1/j,1/T).rotate(-E),R=R.transform(n),s=(o=[(z=z.transform(n)).x-R.x,z.y-R.y])[0]*o[0]+o[1]*o[1],a=Math.sqrt(s),o[0]/=a,o[1]/=a,l=s<4?Math.sqrt(1-s/4):0,M===L&&(l*=-1),c=new Rt((z.x+R.x)/2+l*-o[1],(z.y+R.y)/2+l*o[0]),u=new Rt(R.x-c.x,R.y-c.y),h=new Rt(z.x-c.x,z.y-c.y),f=Math.acos(u.x/Math.sqrt(u.x*u.x+u.y*u.y)),u.y<0&&(f*=-1),d=Math.acos(h.x/Math.sqrt(h.x*h.x+h.y*h.y)),h.y<0&&(d*=-1),L&&f>d&&(d+=2*Math.PI),!L&&f0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(!1===e)return!1;for(var r=e,i=t.length;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r3&&void 0!==arguments[3]?arguments[3]:null;return function(n){n.preventDefault(),n.stopPropagation();var o=n.pageX||n.touches[0].pageX,a=n.pageY||n.touches[0].pageY;e.fire(t,{x:o,y:a,event:n,index:i,points:r})}}function ly(t,e){var r,i,n=(i=2,function(t){if(Array.isArray(t))return t}(r=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(r,i)||function(t,e){if(t){if("string"==typeof t)return ay(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ay(t,e):void 0}}(r,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],a=n[1],s=e.a,l=e.b,c=e.c,u=e.d;return[o*s+a*c+e.e,o*l+a*u+e.f]}it(ar,{draggable:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return(this.remember("_draggable")||new ty(this)).init(t),this}});var cy=function(){function t(e){ry(this,t),this.el=e,e.remember("_selectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return ny(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.handlePoints)}},{key:"createResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.createHandle.call(t,t.selection,e,r,i,n),t.selection.get(r+1).addClass("svg_select_handle svg_select_handle_"+n).on("mousedown.selection touchstart.selection",sy(n,t.el,t.handlePoints,r))}))}},{key:"createHandleFn",value:function(t){t.polyline()}},{key:"updateHandleFn",value:function(t,e,r,i){var n=i.at(r-1),o=i[(r+1)%i.length],a=e,s=[a[0]-n[0],a[1]-n[1]],l=[a[0]-o[0],a[1]-o[1]],c=Math.sqrt(s[0]*s[0]+s[1]*s[1]),u=Math.sqrt(l[0]*l[0]+l[1]*l[1]),h=[s[0]/c,s[1]/c],f=[l[0]/u,l[1]/u],d=[a[0]-10*h[0],a[1]-10*h[1]],p=[a[0]-10*f[0],a[1]-10*f[1]];t.plot([d,a,p])}},{key:"updateResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.updateHandle.call(t,t.selection.get(r+1),e,r,i,n)}))}},{key:"createRotFn",value:function(t){t.line(),t.circle(5)}},{key:"getPoint",value:function(t){return this.handlePoints[this.order.indexOf(t)]}},{key:"getPointHandle",value:function(t){return this.selection.get(this.order.indexOf(t)+1)}},{key:"updateRotFn",value:function(t,e){var r=this.getPoint("t");t.get(0).plot(r[0],r[1],e[0],e[1]),t.get(1).center(e[0],e[1])}},{key:"createRotationHandle",value:function(){var t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",sy("rot",this.el,this.handlePoints));this.createRot.call(this,t)}},{key:"updateRotationHandle",value:function(){var t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}},{key:"updatePoints",value:function(){var t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((function(t){return ly(t,e)})),this.rotationPoint=ly(this.getRotationPoint(t),e)}},{key:"getHandlePoints",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.x,r=t.x2,i=t.y,n=t.y2,o=t.cx,a=t.cy;return[[e,i],[o,i],[r,i],[r,a],[r,n],[o,n],[e,n],[e,a]]}},{key:"getRotationPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.y;return[t.cx,e-20]}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}]),t}(),uy=function(){function t(e){ry(this,t),this.el=e,e.remember("_pointSelectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return ny(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.points)}},{key:"createPointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.createHandle.call(t,t.selection,e,r,i),t.selection.get(r+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",sy("point",t.el,t.points,r))}))}},{key:"createHandleFn",value:function(t){t.circle(5)}},{key:"updateHandleFn",value:function(t,e){t.center(e[0],e[1])}},{key:"updatePointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.updateHandle.call(t,t.selection.get(r+1),e,r,i)}))}},{key:"updatePoints",value:function(){var t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((function(e){return ly(e,t)}))}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}}]),t}(),hy=function(t){return function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===ey(e)&&(r=e,e=!0);var i=this.remember("_"+t.name);return i||(e.prototype instanceof cy?(i=new e(this),e=!0):i=new t(this),this.remember("_"+t.name,i)),i.active(e,r),this}};function fy(t){return fy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fy(t)}function dy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function py(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r3&&void 0!==arguments[3]?arguments[3]:null;return function(n){n.preventDefault(),n.stopPropagation();var o=n.pageX||n.touches[0].pageX,a=n.pageY||n.touches[0].pageY;e.fire(t,{x:o,y:a,event:n,index:i,points:r})}}function xy(t,e){var r=yy(t,2),i=r[0],n=r[1],o=e.a,a=e.b,s=e.c,l=e.d;return[i*o+n*s+e.e,i*a+n*l+e.f]}it(ar,{select:hy(cy)}),it([Eo,zo,on],{pointSelect:hy(uy)});var wy=function(){function t(e){dy(this,t),this.el=e,e.remember("_selectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return gy(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.handlePoints)}},{key:"createResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.createHandle.call(t,t.selection,e,r,i,n),t.selection.get(r+1).addClass("svg_select_handle svg_select_handle_"+n).on("mousedown.selection touchstart.selection",my(n,t.el,t.handlePoints,r))}))}},{key:"createHandleFn",value:function(t){t.polyline()}},{key:"updateHandleFn",value:function(t,e,r,i){var n=i.at(r-1),o=i[(r+1)%i.length],a=e,s=[a[0]-n[0],a[1]-n[1]],l=[a[0]-o[0],a[1]-o[1]],c=Math.sqrt(s[0]*s[0]+s[1]*s[1]),u=Math.sqrt(l[0]*l[0]+l[1]*l[1]),h=[s[0]/c,s[1]/c],f=[l[0]/u,l[1]/u],d=[a[0]-10*h[0],a[1]-10*h[1]],p=[a[0]-10*f[0],a[1]-10*f[1]];t.plot([d,a,p])}},{key:"updateResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.updateHandle.call(t,t.selection.get(r+1),e,r,i,n)}))}},{key:"createRotFn",value:function(t){t.line(),t.circle(5)}},{key:"getPoint",value:function(t){return this.handlePoints[this.order.indexOf(t)]}},{key:"getPointHandle",value:function(t){return this.selection.get(this.order.indexOf(t)+1)}},{key:"updateRotFn",value:function(t,e){var r=this.getPoint("t");t.get(0).plot(r[0],r[1],e[0],e[1]),t.get(1).center(e[0],e[1])}},{key:"createRotationHandle",value:function(){var t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",my("rot",this.el,this.handlePoints));this.createRot.call(this,t)}},{key:"updateRotationHandle",value:function(){var t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}},{key:"updatePoints",value:function(){var t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((function(t){return xy(t,e)})),this.rotationPoint=xy(this.getRotationPoint(t),e)}},{key:"getHandlePoints",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.x,r=t.x2,i=t.y,n=t.y2,o=t.cx,a=t.cy;return[[e,i],[o,i],[r,i],[r,a],[r,n],[o,n],[e,n],[e,a]]}},{key:"getRotationPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.y;return[t.cx,e-20]}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}]),t}(),Sy=function(){function t(e){dy(this,t),this.el=e,e.remember("_pointSelectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return gy(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.points)}},{key:"createPointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.createHandle.call(t,t.selection,e,r,i),t.selection.get(r+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",my("point",t.el,t.points,r))}))}},{key:"createHandleFn",value:function(t){t.circle(5)}},{key:"updateHandleFn",value:function(t,e){t.center(e[0],e[1])}},{key:"updatePointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.updateHandle.call(t,t.selection.get(r+1),e,r,i)}))}},{key:"updatePoints",value:function(){var t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((function(e){return xy(e,t)}))}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}}]),t}(),ky=function(t){return function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===fy(e)&&(r=e,e=!0);var i=this.remember("_"+t.name);return i||(e.prototype instanceof wy?(i=new e(this),e=!0):i=new t(this),this.remember("_"+t.name,i)),i.active(e,r),this}};it(ar,{select:ky(wy)}),it([Eo,zo,on],{pointSelect:ky(Sy)});var Ay=function(t){return t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}},Oy=function(t){for(var e=1/0,r=1/0,i=-1/0,n=-1/0,o=0;o0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===fy(t)&&(e=t,t=!0);var r=this.remember("_ResizeHandler");return r||(t.prototype instanceof Py?(r=new t(this),t=!0):r=new Py(this),this.remember("_resizeHandler",r)),r.active(t,e),this}}),void 0===window.SVG&&(window.SVG=Zl),void 0===window.Apex&&(window.Apex={});var Ey=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,(r=[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new b(this.ctx),this.ctx.axes=new sf(this.ctx),this.ctx.core=new Bb(this.ctx.el,this.ctx),this.ctx.config=new Mu({}),this.ctx.data=new yh(this.ctx),this.ctx.grid=new _h(this.ctx),this.ctx.graphics=new Pc(this.ctx),this.ctx.coreUtils=new Mc(this.ctx),this.ctx.crosshairs=new hf(this.ctx),this.ctx.events=new Qh(this.ctx),this.ctx.exports=new Ah(this.ctx),this.ctx.fill=new Zu(this.ctx),this.ctx.localization=new rf(this.ctx),this.ctx.options=new pu,this.ctx.responsive=new gf(this.ctx),this.ctx.series=new fh(this.ctx),this.ctx.theme=new xf(this.ctx),this.ctx.formatters=new Jc(this.ctx),this.ctx.titleSubtitle=new Af(this.ctx),this.ctx.legend=new od(this.ctx),this.ctx.toolbar=new kd(this.ctx),this.ctx.tooltip=new mp(this.ctx),this.ctx.dimensions=new Uf(this.ctx),this.ctx.updateHelpers=new Zb(this.ctx),this.ctx.zoomPanSelection=new _d(this.ctx),this.ctx.w.globals.tooltip=new mp(this.ctx)}}])&&jy(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function My(t){return My="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},My(t)}function Ly(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null,r=this,i=r.w;return new Promise((function(n,o){if(null===r.el)return o(new Error("Not enough data to display or target element not found"));(null===e||i.globals.allSeriesCollapsed)&&r.series.handleNoData(),r.grid=new _h(r);var a,s,l=r.grid.drawGrid();if(r.annotations=new vu(r),r.annotations.drawImageAnnos(),r.annotations.drawTextAnnos(),"back"===i.config.grid.position&&(l&&i.globals.dom.elGraphical.add(l.el),null!=l&&null!==(a=l.elGridBorders)&&void 0!==a&&a.node&&i.globals.dom.elGraphical.add(l.elGridBorders)),Array.isArray(e.elGraph))for(var c=0;c0&&i.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),i.globals.axisCharts||i.globals.noData||r.core.resizeNonAxisCharts(),n(r)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,e){var r=Ry.get(e);r&&(r.disconnect(),Ry.delete(e))}(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,r){e.id===f.escapeString(t)&&Apex._chartInstances.splice(r,1)})),new _y(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=this.w;return a.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,r){return e.updateHelpers._extendSeries(t,r)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),a.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,r,i,n,o)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,r)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.w.config.series.slice();return i.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,e,r)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this;r.w.globals.dataChanged=!0,r.series.getPreviousPaths();for(var i=r.w.config.series.slice(),n=0;n0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;r&&(i=r),i.annotations.addXaxisAnnotationExternal(t,e,i)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;r&&(i=r),i.annotations.addYaxisAnnotationExternal(t,e,i)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;r&&(i=r),i.annotations.addPointAnnotationExternal(t,e,i)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=this;e&&(r=e),r.annotations.removeAnnotation(r,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Wh(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Wh(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Ah(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ah(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],i=[{key:"getChartByID",value:function(t){var e=f.escapeString(t);if(Apex._chartInstances){var r=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return r&&r.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),r=0;r2?n-2:0),a=2;a(()=>{var t={532:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r="",i=void 0!==e[5];return e[4]&&(r+="@supports (".concat(e[4],") {")),e[2]&&(r+="@media ".concat(e[2]," {")),i&&(r+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),r+=t(e),i&&(r+="}"),e[2]&&(r+="}"),e[4]&&(r+="}"),r})).join("")},e.i=function(t,r,i,n,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(i)for(var s=0;s0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=o),r&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=r):u[2]=r),n&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=n):u[4]="".concat(n)),e.push(u))}},e}},547:t=>{"use strict";t.exports=function(t){return t[1]}},521:()=>{window.TreemapSquared={},function(){"use strict";window.TreemapSquared.generate=function(){function t(e,r,i,n){this.xoffset=e,this.yoffset=r,this.height=n,this.width=i,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,r=[],i=this.xoffset,n=this.yoffset,a=o(t)/this.height,s=o(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var i=e/this.height,n=this.width-i;r=new t(this.xoffset+i,this.yoffset,n,this.height)}else{var o=e/this.width,a=this.height-o;r=new t(this.xoffset,this.yoffset+o,this.width,a)}return r}}function e(e,i,n,a,s){a=void 0===a?0:a,s=void 0===s?0:s;var l=r(function(t,e){var r,i=[],n=e/o(t);for(r=0;r=i(n,r))}(e,l=t[0],s)?(e.push(l),r(t.slice(1),e,n,a)):(c=n.cutArea(o(e),a),a.push(n.getCoordinates(e)),r(t,[],c,a)),a;a.push(n.getCoordinates(e))}function i(t,e){var r=Math.min.apply(Math,t),i=Math.max.apply(Math,t),n=o(t);return Math.max(Math.pow(e,2)*i/Math.pow(n,2),Math.pow(n,2)/(Math.pow(e,2)*r))}function n(t){return t&&t.constructor===Array}function o(t){var e,r=0;for(e=0;e{"use strict";r.r(e),r.d(e,{default:()=>s});var i=r(547),n=r.n(i),o=r(532),a=r.n(o)()(n());a.push([t.id,'@keyframes opaque {\n 0% {\n opacity: 0\n }\n\n to {\n opacity: 1\n }\n}\n\n@keyframes resizeanim {\n\n 0%,\n to {\n opacity: 0\n }\n}\n\n.apexcharts-canvas {\n position: relative;\n direction: ltr !important;\n user-select: none\n}\n\n.apexcharts-canvas ::-webkit-scrollbar {\n -webkit-appearance: none;\n width: 6px\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n border-radius: 4px;\n background-color: rgba(0, 0, 0, .5);\n box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)\n}\n\n.apexcharts-inner {\n position: relative\n}\n\n.apexcharts-text tspan {\n font-family: inherit\n}\n\nrect.legend-mouseover-inactive,\n.legend-mouseover-inactive rect,\n.legend-mouseover-inactive path,\n.legend-mouseover-inactive circle,\n.legend-mouseover-inactive line,\n.legend-mouseover-inactive text.apexcharts-yaxis-title-text,\n.legend-mouseover-inactive text.apexcharts-yaxis-label {\n transition: .15s ease all;\n opacity: .2\n}\n\n.apexcharts-legend-text {\n padding-left: 15px;\n margin-left: -15px;\n}\n\n.apexcharts-series-collapsed {\n opacity: 0\n}\n\n.apexcharts-tooltip {\n border-radius: 5px;\n box-shadow: 2px 2px 6px -4px #999;\n cursor: default;\n font-size: 14px;\n left: 62px;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n top: 20px;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n white-space: nowrap;\n z-index: 12;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n border: 1px solid #e3e3e3;\n background: rgba(255, 255, 255, .96)\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n color: #fff;\n background: rgba(30, 30, 30, .8)\n}\n\n.apexcharts-tooltip * {\n font-family: inherit\n}\n\n.apexcharts-tooltip-title {\n padding: 6px;\n font-size: 15px;\n margin-bottom: 4px\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n background: #eceff1;\n border-bottom: 1px solid #ddd\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n background: rgba(0, 0, 0, .7);\n border-bottom: 1px solid #333\n}\n\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-z-value {\n display: inline-block;\n margin-left: 5px;\n font-weight: 600\n}\n\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-z-value:empty,\n.apexcharts-tooltip-title:empty {\n display: none\n}\n\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n padding: 6px 0 5px\n}\n\n.apexcharts-tooltip-goals-group,\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n display: flex\n}\n\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n margin-top: -6px\n}\n\n.apexcharts-tooltip-marker {\n width: 12px;\n height: 12px;\n position: relative;\n top: 0;\n margin-right: 10px;\n border-radius: 50%\n}\n\n.apexcharts-tooltip-series-group {\n padding: 0 10px;\n display: none;\n text-align: left;\n justify-content: left;\n align-items: center\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n opacity: 1\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,\n.apexcharts-tooltip-series-group:last-child {\n padding-bottom: 4px\n}\n\n.apexcharts-tooltip-y-group {\n padding: 6px 0 5px\n}\n\n.apexcharts-custom-tooltip,\n.apexcharts-tooltip-box {\n padding: 4px 8px\n}\n\n.apexcharts-tooltip-boxPlot {\n display: flex;\n flex-direction: column-reverse\n}\n\n.apexcharts-tooltip-box>div {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}',""]);const s=a},161:(t,e,r)=>{var i=r(72),n=r(2);"string"==typeof(n=n.__esModule?n.default:n)&&(n=[[t.id,n,""]]);var o=(i(t.id,n,{insert:"head",singleton:!1}),n.locals?n.locals:{});t.exports=o},72:(t,e,r)=>{"use strict";var i,n=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),o={};function a(t,e,r){for(var i=0;i{t.exports=''},627:t=>{t.exports=''},606:t=>{t.exports=''},75:t=>{t.exports=''},646:t=>{t.exports=''},802:t=>{t.exports=''},541:t=>{t.exports=''}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var o=e[i]={id:i,exports:{}};return t[i](o,o.exports,r),o.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.nc=void 0;var i={};return(()=>{"use strict";r.r(i),r.d(i,{default:()=>Fy});var t={};r.r(t),r.d(t,{cx:()=>Yr,cy:()=>Hr,height:()=>Br,rx:()=>Rr,ry:()=>zr,width:()=>Fr,x:()=>Xr,y:()=>Dr});var e={};r.r(e),r.d(e,{from:()=>si,to:()=>li});var n={};r.r(n),r.d(n,{MorphArray:()=>Vi,height:()=>$i,width:()=>Zi,x:()=>Ui,y:()=>qi});var o={};r.r(o),r.d(o,{array:()=>xo,clear:()=>wo,move:()=>So,plot:()=>ko,size:()=>Ao});var a={};r.r(a),r.d(a,{amove:()=>$a,ax:()=>qa,ay:()=>Za,build:()=>Ja,center:()=>Ua,cx:()=>Ga,cy:()=>Va,length:()=>Fa,move:()=>Wa,plain:()=>Ha,x:()=>Ba,y:()=>Na});var s={};function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t,e){for(var r=0;rXs,dx:()=>Ds,dy:()=>Ys,height:()=>Hs,move:()=>Fs,size:()=>Bs,width:()=>Ns,x:()=>Ws,y:()=>Gs});var h=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,r,i;return e=t,r=[{key:"shadeRGBColor",value:function(t,e){var r=e.split(","),i=t<0?0:255,n=t<0?-1*t:t,o=parseInt(r[0].slice(4),10),a=parseInt(r[1],10),s=parseInt(r[2],10);return"rgb("+(Math.round((i-o)*n)+o)+","+(Math.round((i-a)*n)+a)+","+(Math.round((i-s)*n)+s)+")"}},{key:"shadeHexColor",value:function(t,e){var r=parseInt(e.slice(1),16),i=t<0?0:255,n=t<0?-1*t:t,o=r>>16,a=r>>8&255,s=255&r;return"#"+(16777216+65536*(Math.round((i-o)*n)+o)+256*(Math.round((i-a)*n)+a)+(Math.round((i-s)*n)+s)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,r){return t.isColorHex(r)?this.shadeHexColor(e,r):this.shadeRGBColor(e,r)}}],i=[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===l(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,r=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var r="",i=t<0?"-":"",n=e[0].replace(".",""),o=Number(e[1])+1;if(o<0){for(r=i+"0.";o++;)r+="0";return r+n.replace(/^-/,"")}for(o-=n.length;o--;)r+="0";return n+r}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),r=t.clientHeight,i=t.clientWidth;return r-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[i-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),r]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var r=t.replace("#","");r=r.match(new RegExp("(.{"+r.length/3+"})","g"));for(var i=0;i1&&void 0!==arguments[1]?arguments[1]:"x",r=t.toString().slice();return r.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,r){if(r>=t.length)for(var i=r-t.length+1;i--;)t.push(void 0);return t.splice(r,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t.style.key=e[r])}},{key:"preciseAddition",value:function(t,e){var r=(String(t).split(".")[1]||"").length,i=(String(e).split(".")[1]||"").length,n=Math.pow(10,Math.max(r,i));return(Math.round(t*n)+Math.round(e*n))/n}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,i=Math.pow(10,r-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*i),e=Math.round(Math.abs(e)*i);e;){var n=e;e=t%e,t=n}return t/i}},{key:"getPrimeFactors",value:function(t){for(var e=[],r=2;t>=2;)t%r==0?(e.push(r),t/=r):r++;return e}},{key:"mod",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,i=Math.pow(10,r-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*i))%(e=Math.round(Math.abs(e)*i))/i}}],r&&c(e.prototype,r),i&&c(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const f=h;function d(t){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d(t)}function p(t,e){for(var r=0;r-1||n.indexOf("NaN")>-1)&&(n=u()),(!o.trim()||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=u()),c.globals.shouldAnimate||(a=1),t.plot(n).animate(1,s).plot(n).animate(a,s).plot(o).after((function(){f.isNumber(r)?r===c.globals.series[c.globals.maxValsInArrayIndex].length-2&&c.globals.shouldAnimate&&l.animationCompleted(t):"none"!==i&&c.globals.shouldAnimate&&(!c.globals.comboCharts&&e===c.globals.series.length-1||c.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}],r&&p(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function y(t){return function(t){if(Array.isArray(t))return x(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||m(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(t){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v(t)}function m(t,e){if(t){if("string"==typeof t)return x(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(t,e):void 0}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return o=t.done,t},e:function(t){a=!0,n=t},f:function(){try{o||null==e.return||e.return()}finally{if(a)throw n}}}}(t);try{for(i.s();!(r=i.n()).done;)k(r.value,e)}catch(t){i.e(t)}finally{i.f()}}else if("object"!==v(t))O(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(var n in t)k(n,t[n])}function A(t){return w[t]||{}}function O(t){S.push.apply(S,y(t))}function P(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function C(t,e,r){return(e=function(t){var e=function(t){if("object"!=T(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=T(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==T(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function T(t){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},T(t)}function E(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r2&&void 0!==arguments[2]?arguments[2]:{},i=function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:Y;return B.document.createElementNS(e,t)}function Z(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(t instanceof W)return t;if("object"===G(t))return Q(t);if(null==t)return new V[U];if("string"==typeof t&&"<"!==t.charAt(0))return Q(B.document.querySelector(t));var r=e?B.document.createElement("div"):q("svg");return r.innerHTML=t,t=Q(r.firstChild),r.removeChild(r.firstChild),t}function $(t,e){return e&&(e instanceof B.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:q(t)}function J(t){if(!t)return null;if(t.instance instanceof W)return t.instance;if("#document-fragment"===t.nodeName)return new V.Fragment(t);var e=I(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":V[e]||(e="Dom"),new V[e](t)}var Q=J;function K(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.name,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return V[e]=t,r&&(V[U]=t),O(Object.getOwnPropertyNames(t.prototype)),t}var tt=1e3;function et(t){return"Svgjs"+I(t)+tt++}function rt(t){for(var e=t.children.length-1;e>=0;e--)rt(t.children[e]);return t.id?(t.id=et(t.nodeName),t):t}function it(t,e){var r,i;for(i=(t=Array.isArray(t)?t:[t]).length-1;i>=0;i--)for(r in e)t[i].prototype[r]=e[r]}function nt(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;it.length)&&(e=t.length);for(var r=0,i=Array(e);rt.length)&&(e=t.length);for(var r=0,i=Array(e);rt.length)&&(e=t.length);for(var r=0,i=Array(e);r1&&(r-=1),r<1/6?t+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t}k("Dom",{classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(bt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),k("Dom",{css:function(t,e){var r={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){var e=t.split(/\s*:\s*/);r[e[0]]=e[1]})),r;if(arguments.length<2){if(Array.isArray(t)){var i,n=function(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return mt(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?mt(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(t);try{for(n.s();!(i=n.n()).done;){var o=i.value,a=o;r[o]=this.node.style.getPropertyValue(a)}}catch(t){n.e(t)}finally{n.f()}return r}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"===vt(t))for(var s in t)this.node.style.setProperty(s,null==t[s]||dt.test(t[s])?"":t[s])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||dt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),k("Dom",{data:function(t,e,r){if(null==t)return this.data(M(function(t){var e,r=t.length,i=[];for(e=0;e=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(t);try{for(o.s();!(i=o.n()).done;){var a=i.value;n[a]=this.data(a)}}catch(t){o.e(t)}finally{o.f()}return n}if("object"===xt(t))for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===r||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),k("Dom",{remember:function(t,e){if("object"===St(arguments[0]))for(var r in t)this.remember(r,t[r]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(var t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});var Mt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.init.apply(this,arguments)}var e,r,i;return e=t,r=[{key:"cmyk",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=Math.min(1-i,1-n,1-o);return 1===a?new t(0,0,0,1,"cmyk"):new t((1-i-a)/(1-a),(1-n-a)/(1-a),(1-o-a)/(1-a),a,"cmyk")}},{key:"hsl",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=Math.max(i,n,o),s=Math.min(i,n,o),l=(a+s)/2,c=a===s,u=a-s;return new t(360*(c?0:a===i?((n-o)/u+(n.5?u/(2-a-s):u/(a+s)),100*l,"hsl")}},{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"rgb";if(t=t||0,this.space)for(var o in this.space)delete this[this.space[o]];if("number"==typeof t)n="string"==typeof i?i:n,i="string"==typeof i?0:i,Object.assign(this,{_a:t,_b:e,_c:r,_d:i,space:n});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){var a=function(t,e){var r=Tt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Tt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Tt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Tt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Tt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Tt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return r.space=e||r.space,r}(t,e);Object.assign(this,a)}else if("string"==typeof t)if(ft.test(t)){var s=t.replace(ut,""),l=At(st.exec(s).slice(1,4).map((function(t){return parseInt(t)})),3),c=l[0],u=l[1],h=l[2];Object.assign(this,{_a:c,_b:u,_c:h,_d:0,space:"rgb"})}else{if(!ht.test(t))throw Error("Unsupported string format, can't construct Color");var f=at.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map((function(t){return parseInt(t,16)})),d=At(f,4),p=d[1],g=d[2],b=d[3];Object.assign(this,{_a:p,_b:g,_c:b,_d:0,space:"rgb"})}var y=this._a,v=this._b,m=this._c,x=this._d,w="rgb"===this.space?{r:y,g:v,b:m}:"xyz"===this.space?{x:y,y:v,z:m}:"hsl"===this.space?{h:y,s:v,l:m}:"lab"===this.space?{l:y,a:v,b:m}:"lch"===this.space?{l:y,c:v,h:m}:"cmyk"===this.space?{c:y,m:v,y:m,k:x}:{};Object.assign(this,w)}},{key:"lab",value:function(){var e=this.xyz(),r=e.x,i=e.y;return new t(116*i-16,500*(r-i),200*(i-e.z),"lab")}},{key:"lch",value:function(){var e=this.lab(),r=e.l,i=e.a,n=e.b,o=Math.sqrt(Math.pow(i,2)+Math.pow(n,2)),a=180*Math.atan2(n,i)/Math.PI;return a<0&&(a=360-(a*=-1)),new t(r,o,a,"lch")}},{key:"rgb",value:function(){if("rgb"===this.space)return this;if("lab"===(E=this.space)||"xyz"===E||"lch"===E){var e=this.x,r=this.y,i=this.z;if("lab"===this.space||"lch"===this.space){var n=this.l,o=this.a,a=this.b;if("lch"===this.space){var s=this.c,l=this.h,c=Math.PI/180;o=s*Math.cos(c*l),a=s*Math.sin(c*l)}var u=(n+16)/116,h=o/500+u,f=u-a/200,d=16/116,p=.008856,g=7.787;e=.95047*(Math.pow(h,3)>p?Math.pow(h,3):(h-d)/g),r=1*(Math.pow(u,3)>p?Math.pow(u,3):(u-d)/g),i=1.08883*(Math.pow(f,3)>p?Math.pow(f,3):(f-d)/g)}var b=3.2406*e+-1.5372*r+-.4986*i,y=-.9689*e+1.8758*r+.0415*i,v=.0557*e+-.204*r+1.057*i,m=Math.pow,x=.0031308;return new t(255*(b>x?1.055*m(b,1/2.4)-.055:12.92*b),255*(y>x?1.055*m(y,1/2.4)-.055:12.92*y),255*(v>x?1.055*m(v,1/2.4)-.055:12.92*v))}if("hsl"===this.space){var w=this.h,S=this.s,k=this.l;if(w/=360,k/=100,0==(S/=100))return new t(k*=255,k,k);var A=k<.5?k*(1+S):k+S-k*S,O=2*k-A;return new t(255*Et(O,A,w+1/3),255*Et(O,A,w),255*Et(O,A,w-1/3))}if("cmyk"===this.space){var P=this.c,C=this.m,j=this.y,T=this.k;return new t(255*(1-Math.min(1,P*(1-T)+T)),255*(1-Math.min(1,C*(1-T)+T)),255*(1-Math.min(1,j*(1-T)+T)))}return this;var E}},{key:"toArray",value:function(){return[this._a,this._b,this._c,this._d,this.space]}},{key:"toHex",value:function(){var t=At(this._clamped().map(jt),3),e=t[0],r=t[1],i=t[2];return"#".concat(e).concat(r).concat(i)}},{key:"toRgb",value:function(){var t=At(this._clamped(),3),e=t[0],r=t[1],i=t[2];return"rgb(".concat(e,",").concat(r,",").concat(i,")")}},{key:"toString",value:function(){return this.toHex()}},{key:"xyz",value:function(){var e=this.rgb(),r=At([e._a,e._b,e._c].map((function(t){return t/255})),3),i=r[0],n=r[1],o=r[2],a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,s=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92,l=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,c=(.4124*a+.3576*s+.1805*l)/.95047,u=(.2126*a+.7152*s+.0722*l)/1,h=(.0193*a+.1192*s+.9505*l)/1.08883;return new t(c>.008856?Math.pow(c,1/3):7.787*c+16/116,u>.008856?Math.pow(u,1/3):7.787*u+16/116,h>.008856?Math.pow(h,1/3):7.787*h+16/116,"xyz")}},{key:"_clamped",value:function(){var t=this.rgb(),e=t._a,r=t._b,i=t._c,n=Math.max,o=Math.min,a=Math.round;return[e,r,i].map((function(t){return n(0,o(a(t),255))}))}}],i=[{key:"isColor",value:function(e){return e&&(e instanceof t||this.isRgb(e)||this.test(e))}},{key:"isRgb",value:function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}},{key:"random",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"vibrant",r=arguments.length>1?arguments[1]:void 0,i=Math.random,n=Math.round,o=Math.sin,a=Math.PI;if("vibrant"===e)return new t(24*i()+57,38*i()+45,360*i(),"lch");if("sine"===e)return new t(n(80*o(2*a*(r=null==r?i():r)/.5+.01)+150),n(50*o(2*a*r/.5+4.6)+200),n(100*o(2*a*r/.5+2.3)+150));if("pastel"===e)return new t(8*i()+86,17*i()+9,360*i(),"lch");if("dark"===e)return new t(10+10*i(),50*i()+86,360*i(),"lch");if("rgb"===e)return new t(255*i(),255*i(),255*i());if("lab"===e)return new t(100*i(),256*i()-128,256*i()-128,"lab");if("grey"===e){var s=255*i();return new t(s,s,s)}throw new Error("Unsupported random color mode")}},{key:"test",value:function(t){return"string"==typeof t&&(ht.test(t)||ft.test(t))}}],r&&Pt(e.prototype,r),i&&Pt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Lt(t){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lt(t)}function It(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=this.a,i=this.b,n=this.c,o=this.d,a=this.e,s=this.f,l=r*o-i*n,c=l>0?1:-1,u=c*Math.sqrt(r*r+i*i),h=Math.atan2(c*i,c*r),f=180/Math.PI*h,d=Math.cos(h),p=Math.sin(h),g=(r*n+i*o)/l,b=n*u/(g*r-i)||o*u/(g*i+r);return{scaleX:u,scaleY:b,shear:g,rotate:f,translateX:a-t+t*d*u+e*(g*d*u-p*b),translateY:s-e+t*p*u+e*(g*p*u+d*b),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}},{key:"equals",value:function(e){if(e===this)return!0;var r=new t(e);return Yt(this.a,r.a)&&Yt(this.b,r.b)&&Yt(this.c,r.c)&&Yt(this.d,r.d)&&Yt(this.e,r.e)&&Yt(this.f,r.f)}},{key:"flip",value:function(t,e){return this.clone().flipO(t,e)}},{key:"flipO",value:function(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}},{key:"init",value:function(e){var r=t.fromArray([1,0,0,1,0,0]);return e=e instanceof ar?e.matrixify():"string"==typeof e?t.fromArray(e.split(bt).map(parseFloat)):Array.isArray(e)?t.fromArray(e):"object"===zt(e)&&t.isMatrixLike(e)?e:"object"===zt(e)?(new t).transform(e):6===arguments.length?t.fromArray([].slice.call(arguments)):r,this.a=null!=e.a?e.a:r.a,this.b=null!=e.b?e.b:r.b,this.c=null!=e.c?e.c:r.c,this.d=null!=e.d?e.d:r.d,this.e=null!=e.e?e.e:r.e,this.f=null!=e.f?e.f:r.f,this}},{key:"inverse",value:function(){return this.clone().inverseO()}},{key:"inverseO",value:function(){var t=this.a,e=this.b,r=this.c,i=this.d,n=this.e,o=this.f,a=t*i-e*r;if(!a)throw new Error("Cannot invert "+this);var s=i/a,l=-e/a,c=-r/a,u=t/a,h=-(s*n+c*o),f=-(l*n+u*o);return this.a=s,this.b=l,this.c=c,this.d=u,this.e=h,this.f=f,this}},{key:"lmultiply",value:function(t){return this.clone().lmultiplyO(t)}},{key:"lmultiplyO",value:function(e){var r=e instanceof t?e:new t(e);return t.matrixMultiply(r,this,this)}},{key:"multiply",value:function(t){return this.clone().multiplyO(t)}},{key:"multiplyO",value:function(e){var r=e instanceof t?e:new t(e);return t.matrixMultiply(this,r,this)}},{key:"rotate",value:function(t,e,r){return this.clone().rotateO(t,e,r)}},{key:"rotateO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t=L(t);var i=Math.cos(t),n=Math.sin(t),o=this.a,a=this.b,s=this.c,l=this.d,c=this.e,u=this.f;return this.a=o*i-a*n,this.b=a*i+o*n,this.c=s*i-l*n,this.d=l*i+s*n,this.e=c*i-u*n+r*n-e*i+e,this.f=u*i+c*n-e*n-r*i+r,this}},{key:"scale",value:function(){var t;return(t=this.clone()).scaleO.apply(t,arguments)}},{key:"scaleO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(i=r,r=e,e=t);var n=this.a,o=this.b,a=this.c,s=this.d,l=this.e,c=this.f;return this.a=n*t,this.b=o*e,this.c=a*t,this.d=s*e,this.e=l*t-r*t+r,this.f=c*e-i*e+i,this}},{key:"shear",value:function(t,e,r){return this.clone().shearO(t,e,r)}},{key:"shearO",value:function(t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.a,i=this.b,n=this.c,o=this.d,a=this.e,s=this.f;return this.a=r+i*t,this.c=n+o*t,this.e=a+s*t-e*t,this}},{key:"skew",value:function(){var t;return(t=this.clone()).skewO.apply(t,arguments)}},{key:"skewO",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(i=r,r=e,e=t),t=L(t),e=L(e);var n=Math.tan(t),o=Math.tan(e),a=this.a,s=this.b,l=this.c,c=this.d,u=this.e,h=this.f;return this.a=a+s*n,this.b=s+a*o,this.c=l+c*n,this.d=c+l*o,this.e=u+h*n-i*n,this.f=h+u*o-r*o,this}},{key:"skewX",value:function(t,e,r){return this.skew(t,0,e,r)}},{key:"skewY",value:function(t,e,r){return this.skew(0,t,e,r)}},{key:"toArray",value:function(){return[this.a,this.b,this.c,this.d,this.e,this.f]}},{key:"toString",value:function(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}},{key:"transform",value:function(e){if(t.isMatrixLike(e))return new t(e).multiplyO(this);var r=t.formatTransforms(e),i=new Rt(r.ox,r.oy).transform(this),n=i.x,o=i.y,a=(new t).translateO(r.rx,r.ry).lmultiplyO(this).translateO(-n,-o).scaleO(r.scaleX,r.scaleY).skewO(r.skewX,r.skewY).shearO(r.shear).rotateO(r.theta).translateO(n,o);if(isFinite(r.px)||isFinite(r.py)){var s=new Rt(n,o).transform(a),l=isFinite(r.px)?r.px-s.x:0,c=isFinite(r.py)?r.py-s.y:0;a.translateO(l,c)}return a.translateO(r.tx,r.ty),a}},{key:"translate",value:function(t,e){return this.clone().translateO(t,e)}},{key:"translateO",value:function(t,e){return this.e+=t||0,this.f+=e||0,this}},{key:"valueOf",value:function(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}],i=[{key:"formatTransforms",value:function(t){var e="both"===t.flip||!0===t.flip,r=t.flip&&(e||"x"===t.flip)?-1:1,i=t.flip&&(e||"y"===t.flip)?-1:1,n=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,o=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,a=t.scale&&t.scale.length?t.scale[0]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleX)?t.scaleX*r:r,s=t.scale&&t.scale.length?t.scale[1]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleY)?t.scaleY*i:i,l=t.shear||0,c=t.rotate||t.theta||0,u=new Rt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),h=u.x,f=u.y,d=new Rt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=d.x,g=d.y,b=new Rt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=b.x,v=b.y,m=new Rt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:a,scaleY:s,skewX:n,skewY:o,shear:l,theta:c,rx:m.x,ry:m.y,tx:y,ty:v,ox:h,oy:f,px:p,py:g}}},{key:"fromArray",value:function(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}},{key:"isMatrixLike",value:function(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}},{key:"matrixMultiply",value:function(t,e,r){var i=t.a*e.a+t.c*e.b,n=t.b*e.a+t.d*e.b,o=t.a*e.c+t.c*e.d,a=t.b*e.c+t.d*e.d,s=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return r.a=i,r.b=n,r.c=o,r.d=a,r.e=s,r.f=l,r}}],r&&Xt(e.prototype,r),i&&Xt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ft(){if(!Ft.nodes){var t=Z().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");var e=t.path().node;Ft.nodes={svg:t,path:e}}if(!Ft.nodes.svg.node.parentNode){var r=B.document.body||B.document.documentElement;Ft.nodes.svg.addTo(r)}return Ft.nodes}function Bt(t){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bt(t)}function Nt(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n);for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s1?e-1:0),i=1;it.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];return t instanceof Array?t:t.trim().split(bt).map(parseFloat)}},{key:"toArray",value:function(){return Array.prototype.concat.apply([],this)}},{key:"toSet",value:function(){return new Set(this)}},{key:"toString",value:function(){return this.join(" ")}},{key:"valueOf",value:function(){var t=[];return t.push.apply(t,Pe(this)),t}}],r&&je(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Ee(Array));function Re(t){return Re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Re(t)}function ze(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.writeDataToDom();var r=this.node.cloneNode(t);return e&&(r=rt(r)),new this.constructor(r)}},{key:"each",value:function(t,e){var r,i,n=this.children();for(r=0,i=n.length;r=0}},{key:"html",value:function(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}},{key:"id",value:function(t){return void 0!==t||this.node.id||(this.node.id=et(this.type)),this.attr("id",t)}},{key:"index",value:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}},{key:"last",value:function(){return J(this.node.lastChild)}},{key:"matches",value:function(t){var e=this.node,r=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return r&&r.call(e,t)}},{key:"parent",value:function(t){var e=this;if(!e.node.parentNode)return null;if(e=J(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=J(e.node.parentNode));return e}},{key:"put",value:function(t,e){return t=Z(t),this.add(t,e),t}},{key:"putIn",value:function(t,e){return Z(t).add(this,e)}},{key:"remove",value:function(){return this.parent()&&this.parent().removeElement(this),this}},{key:"removeElement",value:function(t){return this.node.removeChild(t.node),this}},{key:"replace",value:function(t){return t=Z(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}},{key:"round",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=Math.pow(10,t),i=this.attr(e);for(var n in i)"number"==typeof i[n]&&(i[n]=Math.round(i[n]*r)/r);return this.attr(i),this}},{key:"svg",value:function(t,e){return this.xml(t,e,Y)}},{key:"toString",value:function(){return this.id()}},{key:"words",value:function(t){return this.node.textContent=t,this}},{key:"wrap",value:function(t){var e=this.parent();if(!e)return this.addTo(t);var r=e.index(this);return e.put(t,r).put(this)}},{key:"writeDataToDom",value:function(){return this.each((function(){this.writeDataToDom()})),this}},{key:"xml",value:function(t,e,r){if("boolean"==typeof t&&(r=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();var i=this;if(null!=t){if(i=J(i.node.cloneNode(!0)),e){var n=t(i);if(i=n||i,!1===n)return""}i.each((function(){var e=t(this),r=e||this;!1===e?this.remove():e&&this!==r&&this.replace(r)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;var o=q("wrapper",r),a=B.document.createDocumentFragment();o.innerHTML=t;for(var s=o.children.length;s--;)a.appendChild(o.firstElementChild);var l=this.parent();return e?this.replace(a)&&l:this.add(a)}}],r&&We(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Se);function Je(t){return Je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Je(t)}function Qe(t,e){for(var r=0;r=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}(e=this.node.attributes);try{for(o.s();!(n=o.n()).done;){var a=n.value;t[a.nodeName]=pt.test(a.nodeValue)?parseFloat(a.nodeValue):a.nodeValue}}catch(t){o.e(t)}finally{o.f()}return t}if(t instanceof Array)return t.reduce((function(t,e){return t[e]=i.attr(e),t}),{});if("object"===Ye(t)&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ae[t]:pt.test(e)?parseFloat(e):e;"number"==typeof(e=Be.reduce((function(e,r){return r(t,e,i)}),e))?e=new De(e):Fe.has(t)&&Mt.isColor(e)?e=new Mt(e):e.constructor===Array&&(e=new _e(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof r?this.node.setAttributeNS(r,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return oe(t,this.node)},findOne:function(t){return J(this.node.querySelector(t))}}),K($e,"Dom");var ar=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&er(t,e)}(n,t);var e,r,i=rr(n);function n(t,e){var r,o,a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=i.call(this,t,e)).dom={},r.node.instance=ir(r),(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&r.setData(null!==(o=null!==(a=JSON.parse(t.getAttribute("data-svgjs")))&&void 0!==a?a:JSON.parse(t.getAttribute("svgjs:data")))&&void 0!==o?o:{}),r}return e=n,r=[{key:"center",value:function(t,e){return this.cx(t).cy(e)}},{key:"cx",value:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}},{key:"cy",value:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}},{key:"defs",value:function(){var t=this.root();return t&&t.defs()}},{key:"dmove",value:function(t,e){return this.dx(t).dy(e)}},{key:"dx",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.x(new De(t).plus(this.x()))}},{key:"dy",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.y(new De(t).plus(this.y()))}},{key:"getEventHolder",value:function(){return this}},{key:"height",value:function(t){return this.attr("height",t)}},{key:"move",value:function(t,e){return this.x(t).y(e)}},{key:"parents",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.root(),e="string"==typeof t;e||(t=Z(t));for(var r=new ie,i=this;(i=i.parent())&&i.node!==B.document&&"#document-fragment"!==i.nodeName&&(r.push(i),e||i.node!==t.node)&&(!e||!i.matches(t));)if(i.node===this.root().node)return null;return r}},{key:"reference",value:function(t){if(!(t=this.attr(t)))return null;var e=(t+"").match(lt);return e?Z(e[1]):null}},{key:"root",value:function(){var t=this.parent(V[U]);return t&&t.root()}},{key:"setData",value:function(t){return this.dom=t,this}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.width(new De(r.width)).height(new De(r.height))}},{key:"width",value:function(t){return this.attr("width",t)}},{key:"writeDataToDom",value:function(){return D(this,this.dom),tr(or(n.prototype),"writeDataToDom",this).call(this)}},{key:"x",value:function(t){return this.attr("x",t)}},{key:"y",value:function(t){return this.attr("y",t)}}],r&&Qe(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}($e);function sr(t){return sr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sr(t)}it(ar,{bbox:function(){var t=Ut(this,(function(t){return t.getBBox()}),(function(t){try{var e=t.clone().addTo(Ft().svg).show(),r=e.node.getBBox();return e.remove(),r}catch(e){throw new Error('Getting bbox of element "'.concat(t.node.nodeName,'" is not possible: ').concat(e.toString()))}}));return new Vt(t)},rbox:function(t){var e=Ut(this,(function(t){return t.getBoundingClientRect()}),(function(t){throw new Error('Getting rbox of element "'.concat(t.node.nodeName,'" is not possible'))})),r=new Vt(e);return t?r.transform(t.screenCTM().inverseO()):r.addOffset()},inside:function(t,e){var r=this.bbox();return t>r.x&&e>r.y&&t=0;e--)null!=r[lr[t][e]]&&this.attr(lr.prefix(t,lr[t][e]),r[lr[t][e]]);return this},k(["Element","Runner"],r)})),k(["Element","Runner"],{matrix:function(t,e,r,i,n,o){return null==t?new Ht(this):this.attr("transform",new Ht(t,e,r,i,n,o))},rotate:function(t,e,r){return this.transform({rotate:t,ox:e,oy:r},!0)},skew:function(t,e,r,i){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:r},!0):this.transform({skew:[t,e],ox:r,oy:i},!0)},shear:function(t,e,r){return this.transform({shear:t,ox:e,oy:r},!0)},scale:function(t,e,r,i){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:r},!0):this.transform({scale:[t,e],ox:r,oy:i},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"both",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"center";return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),k("radius",{radius:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return"radialGradient"===(this._element||this).type?this.attr("r",new De(t)):this.rx(t).ry(e)}}),k("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Rt(this.node.getPointAtLength(t))}}),k(["Element","Runner"],{font:function(t,e){if("object"===sr(t)){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),k("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),k("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(ct).slice(0,-1).map((function(t){var e=t.trim().split("(");return[e[0],e[1].split(bt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(Ht.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new Ht)},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);var r=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(i.multiply(r)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){var r=new Ht(this).decompose();return null==t?r:r[t]}Ht.isMatrixLike(t)||(t=hr(hr({},t),{},{origin:R(t,this)}));var i=new Ht(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});var xr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&br(t,e)}(n,t);var e,r,i=yr(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.apply(this,arguments)}return e=n,r=[{key:"flatten",value:function(){return this.each((function(){if(this instanceof n)return this.flatten().ungroup()})),this}},{key:"ungroup",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.parent(),e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.index(this);return e=-1===e?t.children().length:e,this.each((function(r,i){return i[i.length-r-1].toParent(t,e)})),this.remove()}}],r&&pr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(ar);function wr(t){return wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wr(t)}function Sr(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("defs",t),e)}return e=n,(r=[{key:"flatten",value:function(){return this}},{key:"ungroup",value:function(){return this}}])&&Sr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Tr(t){return Tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tr(t)}function Er(t,e){return Er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Er(t,e)}function Mr(t){var e=Lr();return function(){var r,i=Ir(t);if(e){var n=Ir(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Tr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Lr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Lr=function(){return!!t})()}function Ir(t){return Ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ir(t)}K(jr,"Defs");var _r=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Er(t,e)}(r,t);var e=Mr(r);function r(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.apply(this,arguments)}return r}(ar);function Rr(t){return this.attr("rx",t)}function zr(t){return this.attr("ry",t)}function Xr(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Dr(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Yr(t){return this.attr("cx",t)}function Hr(t){return this.attr("cy",t)}function Fr(t){return null==t?2*this.rx():this.rx(new De(t).divide(2))}function Br(t){return null==t?2*this.ry():this.ry(new De(t).divide(2))}function Nr(t){return Nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nr(t)}function Wr(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("ellipse",t),e)}return e=n,r=[{key:"size",value:function(t,e){var r=_(this,t,e);return this.rx(new De(r.width).divide(2)).ry(new De(r.height).divide(2))}}],r&&Wr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function Jr(t){return Jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jr(t)}function Qr(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.put(new $r).size(t,e).move(0,0)}))}),K($r,"Ellipse");var oi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ei(t,e)}(n,t);var e,r,i=ri(n);function n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:B.document.createDocumentFragment();return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,t)}return e=n,(r=[{key:"xml",value:function(t,e,r){if("boolean"==typeof t&&(r=e,e=t,t=null),null==t||"function"==typeof t){var i=new $e(q("wrapper",r));return i.add(this.node.cloneNode(!0)),i.xml(!1,r)}return ti(ni(n.prototype),"xml",this).call(this,t,!1,r)}}])&&Qr(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}($e);K(oi,"Fragment");const ai=oi;function si(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new De(t),fy:new De(e)}):this.attr({x1:new De(t),y1:new De(e)})}function li(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new De(t),cy:new De(e)}):this.attr({x2:new De(t),y2:new De(e)})}function ci(t){return ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ci(t)}function ui(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("pattern",t),e)}return e=n,(r=[{key:"attr",value:function(t,e,r){return"transform"===t&&(t="patternTransform"),wi(Oi(n.prototype),"attr",this).call(this,t,e,r)}},{key:"bbox",value:function(){return new Vt}},{key:"targets",value:function(){return oe("svg [fill*="+this.id()+"]")}},{key:"toString",value:function(){return this.url()}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"url",value:function(){return"url(#"+this.id()+")"}}])&&mi(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Ci(t){return Ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ci(t)}function ji(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("image",t),e)}return e=n,r=[{key:"load",value:function(t,e){if(!t)return this;var r=new B.window.Image;return de(r,"load",(function(t){var i=this.parent(Pi);0===this.width()&&0===this.height()&&this.size(r.width,r.height),i instanceof Pi&&0===i.width()&&0===i.height()&&i.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),de(r,"load error",(function(){pe(r)})),this.attr("href",r.src=t,F)}}],r&&ji(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function zi(t){return zi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zi(t)}function Xi(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Di(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Di(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Di(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}},{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0],e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(bt).map(parseFloat)).length%2!=0&&t.pop();for(var r=0,i=t.length;r=0;r--)i.width&&(this[r][0]=(this[r][0]-i.x)*t/i.width+i.x),i.height&&(this[r][1]=(this[r][1]-i.y)*e/i.height+i.y);return this}},{key:"toLine",value:function(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}},{key:"toString",value:function(){for(var t=[],e=0,r=this.length;e1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("line",t),e)}return e=n,r=[{key:"array",value:function(){return new Gi([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}},{key:"move",value:function(t,e){return this.attr(this.array().move(t,e).toLine())}},{key:"plot",value:function(t,e,r,i){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:r,y2:i}:new Gi(t).toLine(),this.attr(t))}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.attr(this.array().size(r.width,r.height).toLine())}}],r&&Qi(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function an(t){return an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},an(t)}function sn(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("marker",t),e)}return e=n,r=[{key:"height",value:function(t){return this.attr("markerHeight",t)}},{key:"orient",value:function(t){return this.attr("orient",t)}},{key:"ref",value:function(t,e){return this.attr("refX",t).attr("refY",e)}},{key:"toString",value:function(){return"url(#"+this.id()+")"}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"width",value:function(t){return this.attr("markerWidth",t)}}],r&&sn(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function pn(t){return pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pn(t)}function gn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bn(t,e)}function bn(t,e){return bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bn(t,e)}function yn(t){var e=vn();return function(){var r,i=mn(t);if(e){var n=mn(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==pn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function vn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(vn=function(){return!!t})()}function mn(t){return mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mn(t)}function xn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wn(t,e){for(var r=0;r":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,r,i){return function(n){return n<0?t>0?e/t*n:r>0?i/r*n:0:n>1?r<1?(1-i)/(1-r)*n+(i-r)/(1-r):t<1?(1-e)/(1-t)*n+(e-t)/(1-t):1:3*n*Math.pow(1-n,2)*e+3*Math.pow(n,2)*(1-n)*i+Math.pow(n,3)}},steps:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"end";e=e.split("-").reverse()[0];var r=t;return"none"===e?--r:"both"===e&&++r,function(i){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=Math.floor(i*t),a=i*o%1==0;return"start"!==e&&"both"!==e||++o,n&&a&&--o,i>=0&&o<0&&(o=0),i<=1&&o>r&&(o=r),o/r}}},Pn=function(){function t(){xn(this,t)}return Sn(t,[{key:"done",value:function(){return!1}}]),t}(),Cn=function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:">";return xn(this,r),(t=e.call(this)).ease=On[i]||i,t}return Sn(r,[{key:"step",value:function(t,e,r){return"number"!=typeof t?r<1?t:e:t+(e-t)*this.ease(r)}}]),r}(Pn),jn=function(t){gn(r,t);var e=yn(r);function r(t){var i;return xn(this,r),(i=e.call(this)).stepper=t,i}return Sn(r,[{key:"done",value:function(t){return t.done}},{key:"step",value:function(t,e,r,i){return this.stepper(t,e,r,i)}}]),r}(Pn);function Tn(){var t=(this._duration||500)/1e3,e=this._overshoot||0,r=Math.PI,i=Math.log(e/100+1e-10),n=-i/Math.sqrt(r*r+i*i),o=3.9/(n*t);this.d=2*n*o,this.k=o*o}it(function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return xn(this,r),(t=e.call(this)).duration(i).overshoot(n),t}return Sn(r,[{key:"step",value:function(t,e,r,i){if("string"==typeof t)return t;if(i.done=r===1/0,r===1/0)return e;if(0===r)return t;r>100&&(r=16),r/=1e3;var n=i.velocity||0,o=-this.d*n-this.k*(t-e),a=t+n*r+o*r*r/2;return i.velocity=n+o*r,i.done=Math.abs(e-a)+Math.abs(n)<.002,i.done?e:a}}]),r}(jn),{duration:An("_duration",Tn),overshoot:An("_overshoot",Tn)});var En=function(t){gn(r,t);var e=yn(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.1,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.01,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e3;return xn(this,r),(t=e.call(this)).p(i).i(n).d(o).windup(a),t}return Sn(r,[{key:"step",value:function(t,e,r,i){if("string"==typeof t)return t;if(i.done=r===1/0,r===1/0)return e;if(0===r)return t;var n=e-t,o=(i.integral||0)+n*r,a=(n-(i.error||0))/r,s=this._windup;return!1!==s&&(o=Math.max(-s,Math.min(o,s))),i.error=n,i.integral=o,i.done=Math.abs(n)<.001,i.done?e:t+(this.P*n+this.I*o+this.D*a)}}]),r}(jn);it(En,{windup:An("_windup"),p:An("P"),i:An("I"),d:An("D")});for(var Mn={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Ln={M:function(t,e,r){return e.x=r.x=t[0],e.y=r.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,r){return e.x=r.x,e.y=r.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},In="mlhvqtcsaz".split(""),_n=0,Rn=In.length;_n=0;n--)"M"===(i=this[n][0])||"L"===i||"T"===i?(this[n][1]+=t,this[n][2]+=e):"H"===i?this[n][1]+=t:"V"===i?this[n][1]+=e:"C"===i||"S"===i||"Q"===i?(this[n][1]+=t,this[n][2]+=e,this[n][3]+=t,this[n][4]+=e,"C"===i&&(this[n][5]+=t,this[n][6]+=e)):"A"===i&&(this[n][6]+=t,this[n][7]+=e);return this}},{key:"parse",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"M0 0";return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t){for(var e=0,r="",i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:!(arguments.length>1&&void 0!==arguments[1])||arguments[1],p0:new Rt,p:new Rt};i.lastToken=r,r=t.charAt(e++);)if(i.inSegment||!Xn(i,r))if("."!==r)if(isNaN(parseInt(r)))if(Bn.has(r))i.inNumber&&Dn(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(yt.test(r)){if(i.inNumber)Dn(i,!1);else{if(!zn(i))throw new Error("parser Error");Yn(i)}--e}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!Fn(i)){Dn(i,!1),--e;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||Hn(i)){i.inNumber=!0,i.number=r,Dn(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){Dn(i,!1),--e;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&Dn(i,!1),i.inSegment&&zn(i)&&Yn(i),i.segments}(t)}},{key:"size",value:function(t,e){var r,i,n=this.bbox();for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)"M"===(i=this[r][0])||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}},{key:"toString",value:function(){return function(t){for(var e="",r=0,i=t.length;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r-1?t.constructor:Array.isArray(t)?_e:"object"===e?co:ao},oo=function(){function t(e){Kn(this,t),this._stepper=e||new Cn("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}return eo(t,[{key:"at",value:function(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}},{key:"done",value:function(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}},{key:"from",value:function(t){return null==t?this._from:(this._from=this._set(t),this)}},{key:"stepper",value:function(t){return null==t?this._stepper:(this._stepper=t,this)}},{key:"to",value:function(t){return null==t?this._to:(this._to=this._set(t),this)}},{key:"type",value:function(t){return null==t?this._type:(this._type=t,this)}},{key:"_set",value:function(t){this._type||this.type(no(t));var e=new this._type(t);return this._type===Mt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===co&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}]),t}(),ao=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"init",value:function(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}},{key:"toArray",value:function(){return[this.value]}},{key:"valueOf",value:function(){return this.value}}]),t}(),so=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"init",value:function(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,t.defaults,e),this}},{key:"toArray",value:function(){var t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}]),t}();so.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};var lo=function(t,e){return t[0]e[0]?1:0},co=function(){function t(){Kn(this,t),this.init.apply(this,arguments)}return eo(t,[{key:"align",value:function(t){for(var e=this.values,r=0,i=e.length;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("path",t),e)}return e=n,r=[{key:"array",value:function(){return this._array||(this._array=new $n(this.attr("d")))}},{key:"clear",value:function(){return delete this._array,this}},{key:"height",value:function(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}},{key:"move",value:function(t,e){return this.attr("d",this.array().move(t,e))}},{key:"plot",value:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new $n(t))}},{key:"size",value:function(t,e){var r=_(this,t,e);return this.attr("d",this.array().size(r.width,r.height))}},{key:"width",value:function(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}},{key:"x",value:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}},{key:"y",value:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}],r&&fo(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function xo(){return this._array||(this._array=new Gi(this.attr("points")))}function wo(){return delete this._array,this}function So(t,e){return this.attr("points",this.array().move(t,e))}function ko(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Gi(t))}function Ao(t,e){var r=_(this,t,e);return this.attr("points",this.array().size(r.width,r.height))}function Oo(t){return Oo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oo(t)}function Po(t,e){return Po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Po(t,e)}function Co(t){var e=jo();return function(){var r,i=To(t);if(e){var n=To(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Oo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function jo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(jo=function(){return!!t})()}function To(t){return To=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},To(t)}mo.prototype.MorphArray=$n,k({Container:{path:nt((function(t){return this.put(new mo).plot(t||new $n)}))}}),K(mo,"Path");var Eo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Po(t,e)}(r,t);var e=Co(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("polygon",t),i)}return r}(_r);function Mo(t){return Mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mo(t)}function Lo(t,e){return Lo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lo(t,e)}function Io(t){var e=_o();return function(){var r,i=Ro(t);if(e){var n=Ro(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Mo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function _o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_o=function(){return!!t})()}function Ro(t){return Ro=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ro(t)}k({Container:{polygon:nt((function(t){return this.put(new Eo).plot(t||new Gi)}))}}),it(Eo,n),it(Eo,o),K(Eo,"Polygon");var zo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lo(t,e)}(r,t);var e=Io(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("polyline",t),i)}return r}(_r);function Xo(t){return Xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xo(t)}function Do(t,e){return Do=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Do(t,e)}function Yo(t){var e=Ho();return function(){var r,i=Fo(t);if(e){var n=Fo(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Xo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Ho(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ho=function(){return!!t})()}function Fo(t){return Fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fo(t)}k({Container:{polyline:nt((function(t){return this.put(new zo).plot(t||new Gi)}))}}),it(zo,n),it(zo,o),K(zo,"Polyline");var Bo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Do(t,e)}(r,t);var e=Yo(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("rect",t),i)}return r}(_r);function No(t){return No="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},No(t)}function Wo(t,e){for(var r=0;r=e.time?e.run():Uo.timeouts.push(e),e!==r););for(var i=null,n=Uo.frames.last();i!==n&&(i=Uo.frames.shift());)i.run(t);for(var o=null;o=Uo.immediates.shift();)o();Uo.nextDraw=Uo.timeouts.first()||Uo.frames.first()?B.window.requestAnimationFrame(Uo._draw):null}};const qo=Uo;function Zo(t){return Zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zo(t)}function $o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:na;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(t=i.call(this))._timeSource=e,t.terminate(),t}return e=n,r=[{key:"active",value:function(){return!!this._nextFrame}},{key:"finish",value:function(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}},{key:"getEndTime",value:function(){var t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}},{key:"getEndTimeOfTimeline",value:function(){var t=this._runners.map((function(t){return t.start+t.runner.duration()}));return Math.max.apply(Math,[0].concat(function(t){return function(t){if(Array.isArray(t))return $o(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return $o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$o(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)))}},{key:"getLastRunnerInfo",value:function(){return this.getRunnerInfoById(this._lastRunnerId)}},{key:"getRunnerInfoById",value:function(t){return this._runners[this._runnerIds.indexOf(t)]||null}},{key:"pause",value:function(){return this._paused=!0,this._continue()}},{key:"persist",value:function(t){return null==t?this._persist:(this._persist=t,this)}},{key:"play",value:function(){return this._paused=!1,this.updateTime()._continue()}},{key:"reverse",value:function(t){var e=this.speed();if(null==t)return this.speed(-e);var r=Math.abs(e);return this.speed(t?-r:r)}},{key:"schedule",value:function(t,e,r){if(null==t)return this._runners.map(ia);var i=0,n=this.getEndTime();if(e=e||0,null==r||"last"===r||"after"===r)i=n;else if("absolute"===r||"start"===r)i=e,e=0;else if("now"===r)i=this._time;else if("relative"===r){var o=this.getRunnerInfoById(t.id);o&&(i=o.start+e,e=0)}else{if("with-last"!==r)throw new Error('Invalid value for the "when" parameter');var a=this.getLastRunnerInfo();i=a?a.start:this._time}t.unschedule(),t.timeline(this);var s=t.persist(),l={persist:null===s?this._persist:s,start:i+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(l),this._runners.sort((function(t,e){return t.start-e.start})),this._runnerIds=this._runners.map((function(t){return t.runner.id})),this.updateTime()._continue(),this}},{key:"seek",value:function(t){return this.time(this._time+t)}},{key:"source",value:function(t){return null==t?this._timeSource:(this._timeSource=t,this)}},{key:"speed",value:function(t){return null==t?this._speed:(this._speed=t,this)}},{key:"stop",value:function(){return this.time(0),this.pause()}},{key:"time",value:function(t){return null==t?this._time:(this._time=t,this._continue(!0))}},{key:"unschedule",value:function(t){var e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}},{key:"updateTime",value:function(){return this.active()||(this._lastSourceTime=this._timeSource()),this}},{key:"_continue",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return qo.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qo.frame(this._step)),this)}},{key:"_stepFn",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._timeSource(),r=e-this._lastSourceTime;t&&(r=0);var i=this._speed*r+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=i,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(var n=this._runners.length;n--;){var o=this._runners[n],a=o.runner;this._time-o.start<=0&&a.reset()}for(var s=!1,l=0,c=this._runners.length;l0?this._continue():(this.pause(),this.fire("finished")),this}},{key:"terminate",value:function(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}],r&&Jo(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Se);function aa(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=0;this._lastPosition=e;var i=this.duration(),n=this._lastTime<=0&&this._time>0,o=this._lastTime=i;this._lastTime=this._time,n&&this.fire("start",this);var a=this._isDeclarative;this.done=!a&&!o&&this._time>=i,this._reseted=!1;var s=!1;return(r||a)&&(this._initialise(r),this.transforms=new Ht,s=this._run(a?t:e),this.fire("step",this)),this.done=this.done||s&&a,o&&this.fire("finished",this),this}},{key:"time",value:function(t){if(null==t)return this._time;var e=t-this._time;return this.step(e),this}},{key:"timeline",value:function(t){return void 0===t?this._timeline:(this._timeline=t,this)}},{key:"unschedule",value:function(){var t=this.timeline();return t&&t.unschedule(this),this}},{key:"_initialise",value:function(t){if(t||this._isDeclarative)for(var e=0,r=this._queue.length;e0&&void 0!==arguments[0]?arguments[0]:new Ht,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ha(this,t),this.transforms=e,this.id=r,this.done=i}return da(t,[{key:"clearTransformsFromQueue",value:function(){}}]),t}();it([ma,xa],{mergeWith:function(t){return new xa(t.transforms.lmultiply(this.transforms),t.id)}});var wa=function(t,e){return t.lmultiplyO(e)},Sa=function(t){return t.transforms};function ka(){var t=this._transformationRunners.runners.map(Sa).reduce(wa,new Ht);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}var Aa=function(){function t(){ha(this,t),this.runners=[],this.ids=[]}return da(t,[{key:"add",value:function(t){if(!this.runners.includes(t)){var e=t.id+1;return this.runners.push(t),this.ids.push(e),this}}},{key:"clearBefore",value:function(t){var e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new xa).forEach((function(t){return t.clearTransformsFromQueue()})),this}},{key:"edit",value:function(t,e){var r=this.ids.indexOf(t+1);return this.ids.splice(r,1,t+1),this.runners.splice(r,1,e),this}},{key:"getByID",value:function(t){return this.runners[this.ids.indexOf(t+1)]}},{key:"length",value:function(){return this.ids.length}},{key:"merge",value:function(){for(var t=null,e=0;e0&&void 0!==arguments[0]?arguments[0]:0;return this._queueNumberDelta("x",t)},dy:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this._queueNumberDelta("y",t)},dmove:function(t,e){return this.dx(t).dy(e)},_queueNumberDelta:function(t,e){if(e=new De(e),this._tryRetarget(t,e))return this;var r=new oo(this._stepper).to(e),i=null;return this.queue((function(){i=this.element()[t](),r.from(i),r.to(i+e)}),(function(e){return this.element()[t](r.at(e)),r.done()}),(function(t){r.to(i+new De(t))})),this._rememberMorpher(t,r),this},_queueObject:function(t,e){if(this._tryRetarget(t,e))return this;var r=new oo(this._stepper).to(e);return this.queue((function(){r.from(this.element()[t]())}),(function(e){return this.element()[t](r.at(e)),r.done()})),this._rememberMorpher(t,r),this},_queueNumber:function(t,e){return this._queueObject(t,new De(e))},cx:function(t){return this._queueNumber("cx",t)},cy:function(t){return this._queueNumber("cy",t)},move:function(t,e){return this.x(t).y(e)},amove:function(t,e){return this.ax(t).ay(e)},center:function(t,e){return this.cx(t).cy(e)},size:function(t,e){var r;return t&&e||(r=this._element.bbox()),t||(t=r.width/r.height*e),e||(e=r.height/r.width*t),this.width(t).height(e)},width:function(t){return this._queueNumber("width",t)},height:function(t){return this._queueNumber("height",t)},plot:function(t,e,r,i){if(4===arguments.length)return this.plot([t,e,r,i]);if(this._tryRetarget("plot",t))return this;var n=new oo(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){n.from(this._element.array())}),(function(t){return this._element.plot(n.at(t)),n.done()})),this._rememberMorpher("plot",n),this},leading:function(t){return this._queueNumber("leading",t)},viewbox:function(t,e,r,i){return this._queueObject("viewbox",new Vt(t,e,r,i))},update:function(t){return"object"!==ua(t)?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),it(ma,{rx:Rr,ry:zr,from:si,to:li}),K(ma,"Runner");var Ia=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ta(t,e)}(n,t);var e,r,i=Ea(n);function n(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i.call(this,$("svg",t),r)).namespace(),e}return e=n,(r=[{key:"defs",value:function(){return this.isRoot()?J(this.node.querySelector("defs"))||this.put(new jr):this.root().defs()}},{key:"isRoot",value:function(){return!this.node.parentNode||!(this.node.parentNode instanceof B.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}},{key:"namespace",value:function(){return this.isRoot()?this.attr({xmlns:Y,version:"1.1"}).attr("xmlns:xlink",F,H):this.root().namespace()}},{key:"removeNamespace",value:function(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,H).attr("xmlns:svgjs",null,H)}},{key:"root",value:function(){return this.isRoot()?this:ja(La(n.prototype),"root",this).call(this)}}])&&Pa(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function _a(t){return _a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_a(t)}function Ra(t,e){return Ra=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ra(t,e)}function za(t){var e=Xa();return function(){var r,i=Da(t);if(e){var n=Da(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==_a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Xa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Xa=function(){return!!t})()}function Da(t){return Da=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Da(t)}k({Container:{nested:nt((function(){return this.put(new Ia)}))}}),K(Ia,"Svg",!0);var Ya=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ra(t,e)}(r,t);var e=za(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("symbol",t),i)}return r}(xr);function Ha(t){return!1===this._build&&this.clear(),this.node.appendChild(B.document.createTextNode(t)),this}function Fa(){return this.node.getComputedTextLength()}function Ba(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Na(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function Wa(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox();return this.x(t,r).y(e,r)}function Ga(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function Va(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function Ua(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox();return this.cx(t,r).cy(e,r)}function qa(t){return this.attr("x",t)}function Za(t){return this.attr("y",t)}function $a(t,e){return this.ax(t).ay(e)}function Ja(t){return this._build=!!t,this}function Qa(t){return Qa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qa(t)}function Ka(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(r=i.call(this,$("text",t),o)).dom.leading=null!==(e=r.dom.leading)&&void 0!==e?e:new De(1.3),r._rebuild=!0,r._build=!1,r}return e=n,r=[{key:"leading",value:function(t){return null==t?this.dom.leading:(this.dom.leading=new De(t),this.rebuild())}},{key:"rebuild",value:function(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){var e=this,r=0,i=this.dom.leading;this.each((function(t){if(!X(this.node)){var n=B.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=i*new De(n);this.dom.newLined&&(this.attr("x",e.attr("x")),"\n"===this.text()?r+=o:(this.attr("dy",t?o+r:0),r=0))}})),this.fire("rebuild")}return this}},{key:"setData",value:function(t){return this.dom=t,this.dom.leading=new De(t.leading||1.3),this}},{key:"writeDataToDom",value:function(){return D(this,this.dom,{leading:1.3}),this}},{key:"text",value:function(t){if(void 0===t){var e=this.node.childNodes,r=0;t="";for(var i=0,n=e.length;i0&&void 0!==arguments[0]?arguments[0]:"";return this.put(new os).text(t)})),plain:nt((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.put(new os).plain(t)}))}}),K(os,"Text");var ds=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cs(t,e)}(n,t);var e,r,i=us(n);function n(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),(e=i.call(this,$("tspan",t),r))._build=!1,e}return e=n,r=[{key:"dx",value:function(t){return this.attr("dx",t)}},{key:"dy",value:function(t){return this.attr("dy",t)}},{key:"newLine",value:function(){this.dom.newLined=!0;var t=this.parent();if(!(t instanceof os))return this;var e=t.index(this),r=B.window.getComputedStyle(this.node).getPropertyValue("font-size"),i=t.dom.leading*new De(r);return this.dy(e?i:0).attr("x",t.x())}},{key:"text",value:function(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}],r&&ss(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function ps(t){return ps="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ps(t)}function gs(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:"",e=new ds;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.tspan(t).newLine()}}}),K(ds,"Tspan");var ws=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ys(t,e)}(n,t);var e,r,i=vs(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("circle",t),e)}return e=n,(r=[{key:"radius",value:function(t){return this.attr("r",t)}},{key:"rx",value:function(t){return this.attr("r",t)}},{key:"ry",value:function(t){return this.rx(t)}},{key:"size",value:function(t){return this.radius(new De(t).divide(2))}}])&&gs(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);function Ss(t){return Ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ss(t)}function ks(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:0;return this.put(new ws).size(t).move(0,0)}))}}),K(ws,"Circle");var Es=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ps(t,e)}(n,t);var e,r,i=Cs(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("clipPath",t),e)}return e=n,(r=[{key:"remove",value:function(){return this.targets().forEach((function(t){t.unclip()})),Os(Ts(n.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe("svg [clip-path*="+this.id()+"]")}}])&&ks(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function Ms(t){return Ms="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ms(t)}function Ls(t,e){return Ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ls(t,e)}function Is(t){var e=_s();return function(){var r,i=Rs(t);if(e){var n=Rs(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Ms(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function _s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_s=function(){return!!t})()}function Rs(t){return Rs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rs(t)}k({Container:{clip:nt((function(){return this.defs().put(new Es)}))},Element:{clipper:function(){return this.reference("clip-path")},clipWith:function(t){var e=t instanceof Es?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip:function(){return this.attr("clip-path",null)}}}),K(Es,"ClipPath");var zs=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ls(t,e)}(r,t);var e=Is(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("foreignObject",t),i)}return r}(ar);function Xs(t,e){return this.children().forEach((function(r){var i;try{i=r.node instanceof N().SVGSVGElement?new Vt(r.attr(["x","y","width","height"])):r.bbox()}catch(t){return}var n=new Ht(r),o=n.translate(t,e).transform(n.inverse()),a=new Rt(i.x,i.y).transform(o);r.move(a.x,a.y)})),this}function Ds(t){return this.dmove(t,0)}function Ys(t){return this.dmove(0,t)}function Hs(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.height:this.size(e.width,t,e)}function Fs(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox(),i=t-r.x,n=e-r.y;return this.dmove(i,n)}function Bs(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.bbox(),i=_(this,t,e,r),n=i.width/r.width,o=i.height/r.height;return this.children().forEach((function(t){var e=new Rt(r).transform(new Ht(t).inverse());t.scale(n,o,e.x,e.y)})),this}function Ns(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.width:this.size(t,e.height,e)}function Ws(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.x:this.move(t,e.y,e)}function Gs(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.bbox();return null==t?e.y:this.move(e.x,t,e)}function Vs(t){return Vs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vs(t)}function Us(t,e){return Us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Us(t,e)}function qs(t){var e=Zs();return function(){var r,i=$s(t);if(e){var n=$s(this).constructor;r=Reflect.construct(i,arguments,n)}else r=i.apply(this,arguments);return function(t,e){if(e&&("object"==Vs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,r)}}function Zs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zs=function(){return!!t})()}function $s(t){return $s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$s(t)}k({Container:{foreignObject:nt((function(t,e){return this.put(new zs).size(t,e)}))}}),K(zs,"ForeignObject");var Js=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Us(t,e)}(r,t);var e=qs(r);function r(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,r),e.call(this,$("g",t),i)}return r}(xr);function Qs(t){return Qs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qs(t)}function Ks(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("a",t),e)}return e=n,(r=[{key:"target",value:function(t){return this.attr("target",t)}},{key:"to",value:function(t){return this.attr("href",t,F)}}])&&Ks(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function al(t){return al="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},al(t)}function sl(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("mask",t),e)}return e=n,(r=[{key:"remove",value:function(){return this.targets().forEach((function(t){t.unmask()})),cl(dl(n.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe("svg [mask*="+this.id()+"]")}}])&&sl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(xr);function gl(t){return gl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gl(t)}function bl(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("stop",t),e)}return e=n,r=[{key:"update",value:function(t){return("number"==typeof t||t instanceof De)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new De(t.offset)),this}}],r&&bl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(ar);function kl(t){return kl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kl(t)}function Al(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Ol(t,e,r){return(e=Cl(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pl(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("style",t),e)}return e=n,r=[{key:"addText",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.node.textContent+=t,this}},{key:"font",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.rule("@font-face",function(t){for(var e=1;e1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("textPath",t),e)}return e=n,(r=[{key:"array",value:function(){var t=this.track();return t?t.array():null}},{key:"plot",value:function(t){var e=this.track(),r=null;return e&&(r=e.plot(t)),null==t?r:this}},{key:"track",value:function(){return this.reference("href")}}])&&_l(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(os);function Fl(t){return Fl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fl(t)}function Bl(t,e){for(var r=0;r1&&void 0!==arguments[1])||arguments[1],i=new Hl;if(t instanceof mo||(t=this.defs().path(t)),i.attr("href","#"+t,F),r)for(;e=this.node.firstChild;)i.node.appendChild(e);return this.put(i)})),textPath:function(){return this.findOne("textPath")}},Path:{text:nt((function(t){return t instanceof os||(t=(new os).addTo(this.parent()).text(t)),t.path(this)})),targets:function(){var t=this;return oe("svg textPath").filter((function(e){return(e.attr("href")||"").includes(t.id())}))}}}),Hl.prototype.MorphArray=$n,K(Hl,"TextPath");var ql=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wl(t,e)}(n,t);var e,r,i=Gl(n);function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),i.call(this,$("use",t),e)}return e=n,(r=[{key:"use",value:function(t,e){return this.attr("href",(e||"")+"#"+t,F)}}])&&Bl(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(_r);k({Container:{use:nt((function(t,e){return this.put(new ql).use(t,e)}))}}),K(ql,"Use");var Zl=Z;function $l(t){return $l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$l(t)}function Jl(t){return function(t){if(Array.isArray(t))return Ql(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Ql(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ql(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ql(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&void 0!==arguments[0]?arguments[0]:[];uo.push.apply(uo,Jn([].concat(t)))}([De,Mt,Vt,Ht,_e,Gi,$n,Rt]),it(uo,{to:function(t){return(new oo).type(this.constructor).from(this.toArray()).to(t)},fromArray:function(t){return this.init(t),this},toConsumable:function(){return this.toArray()},morph:function(t,e,r,i,n){return this.fromArray(t.map((function(t,o){return i.step(t,e[o],r,n[o],n)})))}});var cc=function(t){nc(r,t);var e=ac(r);function r(t){var i;return Kl(this,r),(i=e.call(this,$("filter",t),t)).$source="SourceGraphic",i.$sourceAlpha="SourceAlpha",i.$background="BackgroundImage",i.$backgroundAlpha="BackgroundAlpha",i.$fill="FillPaint",i.$stroke="StrokePaint",i.$autoSetIn=!0,i}return ec(r,[{key:"put",value:function(t,e){return!(t=ic(lc(r.prototype),"put",this).call(this,t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}},{key:"remove",value:function(){return this.targets().each("unfilter"),ic(lc(r.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return oe('svg [filter*="'+this.id()+'"]')}},{key:"toString",value:function(){return"url(#"+this.id()+")"}}]),r}(ar),uc=function(t){nc(r,t);var e=ac(r);function r(t,i){var n;return Kl(this,r),(n=e.call(this,t,i)).result(n.id()),n}return ec(r,[{key:"in",value:function(t){if(null==t){var e=this.attr("in");return this.parent()&&this.parent().find('[result="'.concat(e,'"]'))[0]||e}return this.attr("in",t)}},{key:"result",value:function(t){return this.attr("result",t)}},{key:"toString",value:function(){return this.result()}}]),r}(ar),hc=function(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;i0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,F)},morphology:hc(["operator","radius"]),offset:hc(["dx","dy"]),specularLighting:hc(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:hc([]),turbulence:hc(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((function(t){var e=I(t),r=fc[t];cc[e+"Effect"]=function(t){nc(n,t);var i=ac(n);function n(t){return Kl(this,n),i.call(this,$("fe"+e,t),t)}return ec(n,[{key:"update",value:function(t){return r.apply(this,t),this}}]),n}(uc),cc.prototype[t]=nt((function(t){var r=new cc[e+"Effect"];if(null==t)return this.put(r);for(var i=arguments.length,n=new Array(i>1?i-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:{},e=this.put(new cc.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;for(var r in t.r||t.g||t.b||t.a||(t={r:t,g:t,b:t,a:t}),t)e.add(new(cc["Func"+r.toUpperCase()])(t[r]));return e}}),["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((function(t){var e=I(t);cc[e]=function(t){nc(i,t);var r=ac(i);function i(t){return Kl(this,i),r.call(this,$("fe"+e,t),t)}return i}(uc)})),["funcR","funcG","funcB","funcA"].forEach((function(t){var e=cc[I(t)],r=nt((function(){return this.put(new e)}));cc.ComponentTransferEffect.prototype[t]=r})),["distantLight","pointLight","spotLight"].forEach((function(t){var e=cc[I(t)],r=nt((function(){return this.put(new e)}));cc.DiffuseLightingEffect.prototype[t]=r,cc.SpecularLightingEffect.prototype[t]=r})),it(cc.MergeEffect,{mergeNode:function(t){return this.put(new cc.MergeNode).attr("in",t)}}),it(jr,{filter:function(t){var e=this.put(new cc);return"function"==typeof t&&t.call(e,e),e}}),it(xr,{filter:function(t){return this.defs().filter(t)}}),it(ar,{filterWith:function(t){var e=t instanceof cc?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer:function(){return this.reference("filter")}});var dc={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,r,i){return this.parent()&&this.parent().diffuseLighting(t,r,i).in(this)},displacementMap:function(t,e,r,i){return this.parent()&&this.parent().displacementMap(this,t,e,r,i)},dropShadow:function(t,e,r){return this.parent()&&this.parent().dropShadow(this,t,e,r).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){var e;return t=t instanceof Array?t:Jl(t),this.parent()&&(e=this.parent()).merge.apply(e,[this].concat(Jl(t)))},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,r,i,n){return this.parent()&&this.parent().specularLighting(t,r,i,n).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,r,i,n){return this.parent()&&this.parent().turbulence(t,e,r,i,n).in(this)}};function pc(t){return pc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pc(t)}function gc(t,e){for(var r=0;r0&&-1===o.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:i,dx:l,dy:s,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:a,result:"blur"}),t.flood({"flood-color":c,"flood-opacity":u,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",i])}},{key:"dropShadow",value:function(t,e){var r,i,n,o=this,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,s=this.w;return t.unfilter(!0),f.isMsEdge()&&"radialBar"===s.config.chart.type||(null===(r=s.config.chart.dropShadow.enabledOnSeries)||void 0===r?void 0:r.length)>0&&-1===(null===(n=s.config.chart.dropShadow.enabledOnSeries)||void 0===n?void 0:n.indexOf(a))||(t.filterWith((function(t){o.addShadow(t,a,e,"SourceGraphic")})),e.noUserSpaceOnUse||t.filterer().node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(i=t.filterer())||void 0===i?void 0:i.node)),t}},{key:"setSelectionFilter",value:function(t,e,r){var i=this.w;if(void 0!==i.globals.selectedDataPoints[e]&&i.globals.selectedDataPoints[e].indexOf(r)>-1){t.node.setAttribute("selected",!0);var n=i.config.states.active.filter;"none"!==n&&this.applyFilter(t,e,n.type)}}},{key:"_scaleFilterSize",value:function(t){t&&function(e){for(var r in e)e.hasOwnProperty(r)&&t.setAttribute(r,e[r])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}],r&&gc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const vc=yc;function mc(t){return mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mc(t)}function xc(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function wc(t){for(var e=1;e2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function o(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var a=t.split(/[,\s]/).reduce((function(t,e){var r=e.match("([a-zA-Z])(.+)");return r?(t.push(r[1]),t.push(r[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),s=[];if(a.length>1){var l=o(a[0]),c=null;"Z"==a[a.length-1][0]&&a[0].length>2&&(c=["L",l.x,l.y],a[a.length-1]=c),s.push(a[0]);for(var u=1;u2&&"L"==f[0]&&d.length>2&&"L"==d[0]){var p,g,b=o(h),y=o(f),v=o(d);p=r(y,b,e),g=r(y,v,e),n(f,p),f.origPoint=y,s.push(f);var m=i(p,y,.5),x=i(y,g,.5),w=["C",m.x,m.y,x.x,x.y,g.x,g.y];w.origPoint=y,s.push(w)}else s.push(f)}if(c){var S=o(s[s.length-1]);s.push(["Z"]),n(s[0],S)}}else s=a;return s.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,r,i){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:r,y2:i,stroke:n,"stroke-dasharray":o,"stroke-width":a,"stroke-linecap":s})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,c=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,u=this.w.globals.dom.Paper.rect();return u.attr({x:t,y:e,width:r>0?r:0,height:i>0?i:0,rx:n,ry:n,opacity:a,"stroke-width":null!==s?s:0,stroke:null!==l?l:"none","stroke-dasharray":c}),u.node.setAttribute("fill",o),u}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:i,stroke:e,"stroke-width":r})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var r=this.w.globals.dom.Paper.circle(2*t);return null!==e&&r.attr(e),r}},{key:"drawPath",value:function(t){var e=t.d,r=void 0===e?"":e,i=t.stroke,n=void 0===i?"#a8a8a8":i,o=t.strokeWidth,a=void 0===o?1:o,s=t.fill,l=t.fillOpacity,c=void 0===l?1:l,u=t.strokeOpacity,h=void 0===u?1:u,f=t.classes,d=t.strokeLinecap,p=void 0===d?null:d,g=t.strokeDashArray,b=void 0===g?0:g,y=this.w;return null===p&&(p=y.config.stroke.lineCap),(r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r="M 0 ".concat(y.globals.gridHeight)),y.globals.dom.Paper.path(r).attr({fill:s,"fill-opacity":c,stroke:n,"stroke-opacity":h,"stroke-linecap":p,"stroke-width":a,"stroke-dasharray":b,class:f})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){return["M",t,e].join(" ")}},{key:"line",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=null;return null===r?i=[" L",t,e].join(" "):"H"===r?i=[" H",t].join(" "):"V"===r&&(i=[" V",e].join(" ")),i}},{key:"curve",value:function(t,e,r,i,n,o){return["C",t,e,r,i,n,o].join(" ")}},{key:"quadraticCurve",value:function(t,e,r,i){return["Q",t,e,r,i].join(" ")}},{key:"arc",value:function(t,e,r,i,n,o,a){var s="A";return arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(s="a"),[s,t,e,r,i,n,o,a].join(" ")}},{key:"renderPaths",value:function(t){var e,r=t.j,i=t.realIndex,n=t.pathFrom,o=t.pathTo,a=t.stroke,s=t.strokeWidth,l=t.strokeLinecap,c=t.fill,u=t.animationDelay,h=t.initialSpeed,f=t.dataChangeSpeed,d=t.className,p=t.chartType,g=t.shouldClipToGrid,y=void 0===g||g,v=t.bindEventsOnPaths,m=void 0===v||v,x=t.drawShadow,w=void 0===x||x,S=this.w,k=new vc(this.ctx),A=new b(this.ctx),O=this.w.config.chart.animations.enabled,P=O&&this.w.config.chart.animations.dynamicAnimation.enabled,C=!!(O&&!S.globals.resized||P&&S.globals.dataChanged&&S.globals.shouldAnimate);C?e=n:(e=o,S.globals.animationEnded=!0);var j,T=S.config.stroke.dashArray;j=Array.isArray(T)?T[i]:S.config.stroke.dashArray;var E=this.drawPath({d:e,stroke:a,strokeWidth:s,fill:c,fillOpacity:1,classes:d,strokeLinecap:l,strokeDashArray:j});E.attr("index",i),y&&("bar"===p&&!S.globals.isHorizontal||S.globals.comboCharts?E.attr({"clip-path":"url(#gridRectBarMask".concat(S.globals.cuid,")")}):E.attr({"clip-path":"url(#gridRectMask".concat(S.globals.cuid,")")})),S.config.chart.dropShadow.enabled&&w&&k.dropShadow(E,S.config.chart.dropShadow,i),m&&(E.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,E)),E.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,E)),E.node.addEventListener("mousedown",this.pathMouseDown.bind(this,E))),E.attr({pathTo:o,pathFrom:n});var M={el:E,j:r,realIndex:i,pathFrom:n,pathTo:o,fill:c,strokeWidth:s,delay:u};return!O||S.globals.resized||S.globals.dataChanged?!S.globals.resized&&S.globals.dataChanged||A.showDelayedElements():A.animatePathsGradually(wc(wc({},M),{},{speed:h})),S.globals.dataChanged&&P&&C&&A.animatePathsGradually(wc(wc({},M),{},{speed:f})),E}},{key:"drawPattern",value:function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,r,(function(o){"horizontalLines"===t?o.line(0,0,r,0).stroke({color:i,width:n+1}):"verticalLines"===t?o.line(0,0,0,e).stroke({color:i,width:n+1}):"slantedLines"===t?o.line(0,0,e,r).stroke({color:i,width:n}):"squares"===t?o.rect(e,r).fill("none").stroke({color:i,width:n}):"circles"===t&&o.circle(e).fill("none").stroke({color:i,width:n})}))}},{key:"drawGradient",value:function(t,e,r,i,n){var o,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],c=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,u=this.w;e.length<9&&0===e.indexOf("#")&&(e=f.hexToRgba(e,i)),r.length<9&&0===r.indexOf("#")&&(r=f.hexToRgba(r,n));var h=0,d=1,p=1,g=null;null!==s&&(h=void 0!==s[0]?s[0]/100:0,d=void 0!==s[1]?s[1]/100:1,p=void 0!==s[2]?s[2]/100:1,g=void 0!==s[3]?s[3]/100:null);var b=!("donut"!==u.config.chart.type&&"pie"!==u.config.chart.type&&"polarArea"!==u.config.chart.type&&"bubble"!==u.config.chart.type);if(o=l&&0!==l.length?u.globals.dom.Paper.gradient(b?"radial":"linear",(function(t){(Array.isArray(l[c])?l[c]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):u.globals.dom.Paper.gradient(b?"radial":"linear",(function(t){t.stop(h,e,i),t.stop(d,r,n),t.stop(p,r,n),null!==g&&t.stop(g,e,i)})),b){var y=u.globals.gridWidth/2,v=u.globals.gridHeight/2;"bubble"!==u.config.chart.type?o.attr({gradientUnits:"userSpaceOnUse",cx:y,cy:v,r:a}):o.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?o.from(0,0).to(0,1):"diagonal"===t?o.from(0,0).to(1,1):"horizontal"===t?o.from(0,1).to(1,1):"diagonal2"===t&&o.from(1,0).to(0,1);return o}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,r=t.maxWidth,i=t.fontSize,n=t.fontFamily,o=this.getTextRects(e,i,n),a=o.width/e.length,s=Math.floor(r/a);return r-1){var s=r.globals.selectedDataPoints[n].indexOf(o);r.globals.selectedDataPoints[n].splice(s,1)}}else{if(!r.config.states.active.allowMultipleDataPointsSelection&&r.globals.selectedDataPoints.length>0){r.globals.selectedDataPoints=[];var l=r.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),c=r.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),u=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),i.getDefaultFilter(t,n)}))};u(l),u(c)}t.node.setAttribute("selected","true"),a="true",void 0===r.globals.selectedDataPoints[n]&&(r.globals.selectedDataPoints[n]=[]),r.globals.selectedDataPoints[n].push(o)}if("true"===a){var h=r.config.states.active.filter;if("none"!==h)i.applyFilter(t,n,h.type);else if("none"!==r.config.states.hover.filter&&!r.globals.isTouchDevice){var f=r.config.states.hover.filter;i.applyFilter(t,n,f.type)}}else"none"!==r.config.states.active.filter.type&&("none"===r.config.states.hover.filter.type||r.globals.isTouchDevice?i.getDefaultFilter(t,n):(f=r.config.states.hover.filter,i.applyFilter(t,n,f.type)));"function"==typeof r.config.chart.events.dataPointSelection&&r.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:r.globals.selectedDataPoints,seriesIndex:n,dataPointIndex:o,w:r}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:r.globals.selectedDataPoints,seriesIndex:n,dataPointIndex:o,w:r}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,r,i){var n=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=this.w,a=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:r,foreColor:"#fff",opacity:0});i&&a.attr("transform",i),o.globals.dom.Paper.add(a);var s=a.bbox();return n||(s=a.node.getBoundingClientRect()),a.remove(),{width:s.width,height:s.height}}},{key:"placeTextWithEllipsis",value:function(t,e,r){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=r/1.1)){for(var i=e.length-3;i>0;i-=3)if(t.getSubStringLength(0,i)<=r/1.1)return void(t.textContent=e.substring(0,i)+"...");t.textContent="."}}}],i=[{key:"setAttrs",value:function(t,e){for(var r in e)e.hasOwnProperty(r)&&t.setAttribute(r,e[r])}}],r&&kc(e.prototype,r),i&&kc(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Pc=Oc;function Cc(t){return Cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cc(t)}function jc(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,r=[];if(0===e.globals.series.length)return r;for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,r=[];return e.globals.seriesGroups.forEach((function(i){var n=[];e.config.series.forEach((function(t,r){i.indexOf(e.globals.seriesNames[r])>-1&&n.push(r)}));var o=e.globals.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));r.push(t.getStackedSeriesTotals(o))})),r}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,r=[],i=[],n=[],o=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){n.push(e),i.push(null)})),e.yaxis.forEach((function(t,e){r[e]=[]}));var a=[];e.yaxis.forEach((function(t,i){var s=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,a){if(e.name===t){var l=a;i===a||o?!o||n.indexOf(a)>-1?r[i].push([i,a]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(r[a].push([a,i]),l=i),s=!0,-1!==(l=n.indexOf(l))&&n.splice(l,1)}}))}))}s||a.push(i)})),r=r.map((function(t,e){var r=[];return t.forEach((function(t){i[t[1]]=t[0],r.push(t[1])})),r}));for(var s=e.yaxis.length-1,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,r){return t===r[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,r=t.slice();return e.config.xaxis.convertedCatToNumeric&&(r=t.map((function(t,r){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),r}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var r=0;if(Array.isArray(t))for(var i=0;it&&r.globals.seriesX[n][a]0){var d=function(t,e){var r=n.config.yaxis[n.globals.seriesYAxisReverseMap[e]],o=t<0?-1:1;return t=Math.abs(t),r.logarithmic&&(t=i.getBaseLog(r.logBase,t)),-o*t/a[e]};if(o.isMultipleYAxis){l=[];for(var p=0;p0&&e.forEach((function(e){var a=[],s=[];t.i.forEach((function(r,i){n.config.series[r].group===e&&(a.push(t.series[i]),s.push(r))})),a.length>0&&o.push(i.draw(a,r,s))})),o}}],i=[{key:"checkComboSeries",value:function(t,e){var r=!1,i=0,n=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||i++,void 0!==t.type&&t.type!==e&&n++})),n>0&&(r=!0),{comboBarCount:i,comboCharts:r}}},{key:"extendArrayProps",value:function(t,e,r){var i,n,o,a,s,l;return null!==(i=e)&&void 0!==i&&i.yaxis&&(e=t.extendYAxis(e,r)),null!==(n=e)&&void 0!==n&&n.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(a=o.annotations)&&void 0!==a&&a.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(s=e)&&void 0!==s&&null!==(l=s.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e))),e}}],r&&jc(e.prototype,r),i&&jc(e,i),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Mc=Ec;function Lc(t){return Lc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lc(t)}function Ic(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null,r=this.w;if("vertical"===t.label.orientation){var i=null!==e?e:0,n=r.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(i,"']"));if(null!==n){var o=n.getBoundingClientRect();n.setAttribute("x",parseFloat(n.getAttribute("x"))-o.height+4);var a="top"===t.label.position?o.width:-o.width;n.setAttribute("y",parseFloat(n.getAttribute("y"))+a);var s=this.annoCtx.graphics.rotateAroundCenter(n),l=s.x,c=s.y;n.setAttribute("transform","rotate(-90 ".concat(l," ").concat(c,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var r=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var i=r.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),n=t.getBoundingClientRect(),o=e.label.style.padding,a=o.left,s=o.right,l=o.top,c=o.bottom;if("vertical"===e.label.orientation){var u=[a,s,l,c];l=u[0],c=u[1],a=u[2],s=u[3]}var h=n.left-i.left-a,f=n.top-i.top-l,d=this.annoCtx.graphics.drawRect(h-r.globals.barPadForNumericAxis,f,n.width+a+s,n.height+l+c,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&d.node.classList.add(e.id),d}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,r=function(r,i,n){var o=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(i,"']"));if(o){var a=o.parentNode,s=t.addBackgroundToAnno(o,r);s&&(a.insertBefore(s.node,o),r.label.mouseEnter&&s.node.addEventListener("mouseenter",r.label.mouseEnter.bind(t,r)),r.label.mouseLeave&&s.node.addEventListener("mouseleave",r.label.mouseLeave.bind(t,r)),r.label.click&&s.node.addEventListener("click",r.label.click.bind(t,r)))}};e.config.annotations.xaxis.forEach((function(t,e){return r(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return r(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return r(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var r,i=this.w,n="y1"===t?e.y:e.y2,o=!1;if(this.annoCtx.invertAxis){var a=i.config.xaxis.convertedCatToNumeric?i.globals.categoryLabels:i.globals.labels,s=a.indexOf(n),l=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(s+1,")"));r=l?parseFloat(l.getAttribute("y")):(i.globals.gridHeight/a.length-1)*(s+1)-i.globals.barHeight,void 0!==e.seriesIndex&&i.globals.barHeight&&(r-=i.globals.barHeight/2*(i.globals.series.length-1)-i.globals.barHeight*e.seriesIndex)}else{var c,u=i.globals.seriesYAxisMap[e.yAxisIndex][0],h=i.config.yaxis[e.yAxisIndex].logarithmic?new Mc(this.annoCtx.ctx).getLogVal(i.config.yaxis[e.yAxisIndex].logBase,n,u)/i.globals.yLogRatio[u]:(n-i.globals.minYArr[u])/(i.globals.yRange[u]/i.globals.gridHeight);r=i.globals.gridHeight-Math.min(Math.max(h,0),i.globals.gridHeight),o=h>i.globals.gridHeight||h<0,!e.marker||void 0!==e.y&&null!==e.y||(r=0),null!==(c=i.config.yaxis[e.yAxisIndex])&&void 0!==c&&c.reversed&&(r=h)}return"string"==typeof n&&n.includes("px")&&(r=parseFloat(n)),{yP:r,clipped:o}}},{key:"getX1X2",value:function(t,e){var r=this.w,i="x1"===t?e.x:e.x2,n=this.annoCtx.invertAxis?r.globals.minY:r.globals.minX,o=this.annoCtx.invertAxis?r.globals.maxY:r.globals.maxX,a=this.annoCtx.invertAxis?r.globals.yRange[0]:r.globals.xRange,s=!1,l=this.annoCtx.inversedReversedAxis?(o-i)/(a/r.globals.gridWidth):(i-n)/(a/r.globals.gridWidth);return"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||r.globals.dataFormatXNumeric||r.config.chart.sparkline.enabled||(l=this.getStringX(i)),"string"==typeof i&&i.includes("px")&&(l=parseFloat(i)),null==i&&e.marker&&(l=r.globals.gridWidth),void 0!==e.seriesIndex&&r.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=r.globals.barWidth/2*(r.globals.series.length-1)-r.globals.barWidth*e.seriesIndex),l>r.globals.gridWidth?(l=r.globals.gridWidth,s=!0):l<0&&(l=0,s=!0),{x:l,clipped:s}}},{key:"getStringX",value:function(t){var e=this.w,r=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var i=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),n=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(i+1,")"));return n&&(r=parseFloat(n.getAttribute("x"))),r}}],r&&Ic(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zc(t){return zc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zc(t)}function Xc(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r12?f-12:0===f?12:f;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(f))).replace(/(^|[^\\])H/g,"$1"+f)).replace(/(^|[^\\])hh+/g,"$1"+l(d))).replace(/(^|[^\\])h/g,"$1"+d);var p=i?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var g=i?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(g))).replace(/(^|[^\\])s/g,"$1"+g);var b=i?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var y=f<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+y)).replace(/(^|[^\\])T/g,"$1"+y.charAt(0));var v=y.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var m=-t.getTimezoneOffset(),x=i||!m?"Z":m>0?"+":"-";if(!i){var w=(m=Math.abs(m))%60;x+=l(Math.floor(m/60))+":"+l(w)}e=e.replace(/(^|[^\\])K/g,"$1"+x);var S=(i?t.getUTCDay():t.getDay())+1;return(e=(e=(e=(e=e.replace(new RegExp(a[0],"g"),a[S])).replace(new RegExp(s[0],"g"),s[S])).replace(new RegExp(n[0],"g"),n[u])).replace(new RegExp(o[0],"g"),o[u])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,r){var i=this.w;void 0!==i.config.xaxis.min&&(t=i.config.xaxis.min),void 0!==i.config.xaxis.max&&(e=i.config.xaxis.max);var n=this.getDate(t),o=this.getDate(e),a=this.formatDate(n,"yyyy MM dd HH mm ss fff").split(" "),s=this.formatDate(o,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(s[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(s[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(s[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(s[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(s[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(s[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(s[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,r){return this.determineDaysOfMonths(t,e)-r}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,r){var i=this.daysCntOfYear[e]+r;return e>1&&this.isLeapYear()&&i++,i}},{key:"determineDaysOfMonths",value:function(t,e){var r=30;switch(t=f.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(r=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:r=31}return r}}],r&&Nc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Vc=Gc;function Uc(t){return Uc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uc(t)}function qc(t,e){for(var r=0;r0&&r<100?t.toFixed(1):t.toFixed(0)}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minYArr<4?t.toFixed(1):t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(r,i){void 0!==r.labels.formatter?e.globals.yLabelFormatters[i]=r.labels.formatter:e.globals.yLabelFormatters[i]=function(n){return e.globals.xyCharts?Array.isArray(n)?n.map((function(e){return t.defaultYFormatter(e,r,i)})):t.defaultYFormatter(n,r,i):n}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}],r&&qc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Jc=$c;function Qc(t){return Qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qc(t)}function Kc(t,e){for(var r=0;r4&&void 0!==arguments[4]?arguments[4]:[],s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",l=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],c=this.w,u=void 0===t[i]?"":t[i],h=u,f=c.globals.xLabelFormatter,d=c.config.xaxis.labels.formatter,p=!1,g=new Jc(this.ctx),b=u;l&&(h=g.xLabelFormat(f,u,b,{i,dateFormatter:new Vc(this.ctx).formatDate,w:c}),void 0!==d&&(h=d(u,t[i],{i,dateFormatter:new Vc(this.ctx).formatDate,w:c}))),e.length>0?(n=e[i].unit,o=null,e.forEach((function(t){"month"===t.unit?o="year":"day"===t.unit?o="month":"hour"===t.unit?o="day":"minute"===t.unit&&(o="hour")})),p=o===n,r=e[i].position,h=e[i].value):"datetime"===c.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var y,v=new Pc(this.ctx);y=c.globals.rotateXLabels&&l?v.getTextRects(h,parseInt(s,10),null,"rotate(".concat(c.config.xaxis.labels.rotate," 0 0)"),!1):v.getTextRects(h,parseInt(s,10));var m=!c.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||a.indexOf(h)>=0&&m)&&(h=""),{x:r,text:h,textRect:y,isBold:p}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,r){var i=this.w,n=i.config.xaxis.tickAmount;return"dataPoints"===n&&(n=Math.round(i.globals.gridWidth/120)),n>r||t%Math.round(r/(n+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,r,i,n){var o=this.w;if(0===t&&o.globals.skipFirstTimelinelabel&&(e.text=""),t===r-1&&o.globals.skipLastTimelinelabel&&(e.text=""),o.config.xaxis.labels.hideOverlappingLabels&&i.length>0){var a=n[n.length-1];e.xi.length||i.some((function(t){return Array.isArray(t.seriesName)}))?t:r.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,r=e.config.yaxis[t];if(!r.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!r.showForNullSeries){var i=e.globals.seriesYAxisMap[t],n=new Mc(this.ctx);return i.every((function(t){return n.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var r=this.w;return Array.isArray(t)&&r.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,r.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,r,i,n,o,a){var s=this.w,l=new Pc(this.ctx),c=s.globals.translateY+s.config.yaxis[n].labels.offsetY;if(s.globals.isBarHorizontal?c=0:"heatmap"===s.config.chart.type&&(c+=o/2),i.show&&e>0){!0===s.config.yaxis[n].opposite&&(t+=i.width);for(var u=e;u>=0;u--){var h=l.drawLine(t+r.offsetX-i.width+i.offsetX,c+i.offsetY,t+r.offsetX+i.offsetX,c+i.offsetY,i.color);a.add(h),c+=o}}}}],r&&Kc(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ru(t){return ru="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ru(t)}function iu(t,e){for(var r=0;rs){var d=s;s=i,i=d}if(!l||!c){u=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,i+t.offsetY,this._getYAxisAnnotationWidth(t),s-i,0,t.fillColor,t.opacity,1,t.borderColor,o);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(u){var g="right"===t.label.position?n.globals.gridWidth:"center"===t.label.position?n.globals.gridWidth/2:0,b=this.annoCtx.graphics.drawText({x:g+t.label.offsetX,y:(null!=i?i:s)+t.label.offsetY-3,text:h,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});b.attr({rel:r}),e.appendChild(b.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;return e.globals.gridWidth,(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,r=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,i){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,r.node,i)})),r}}])&&iu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function au(t){return au="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},au(t)}function su(t,e){for(var r=0;r-1)){var i=this.helpers.getX1X2("x1",t),n=i.x,o=i.clipped,a=(i=this.helpers.getY1Y2("y1",t)).yP,s=i.clipped;if(f.isNumber(n)&&!s&&!o){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},c=this.annoCtx.graphics.drawMarker(n+t.marker.offsetX,a+t.marker.offsetY,l);e.appendChild(c.node);var u=t.label.text?t.label.text:"",h=this.annoCtx.graphics.drawText({x:n+t.label.offsetX,y:a+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:u,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(h.attr({rel:r}),e.appendChild(h.node),t.customSVG.SVG){var d=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});d.attr({transform:"translate(".concat(n+t.customSVG.offsetX,", ").concat(a+t.customSVG.offsetY,")")}),d.node.innerHTML=t.customSVG.SVG,e.appendChild(d.node)}if(t.image.path){var p=t.image.width?t.image.width:20,g=t.image.height?t.image.height:20;c=this.annoCtx.addImage({x:n+t.image.offsetX-p/2,y:a+t.image.offsetY-g/2,width:p,height:g,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&c.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&c.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&c.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,r=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,i){t.addPointAnnotation(e,r.node,i)})),r}}],r&&su(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const uu=JSON.parse('{"name":"en","options":{"months":["January","February","March","April","May","June","July","August","September","October","November","December"],"shortMonths":["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],"days":["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],"shortDays":["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],"toolbar":{"exportToSVG":"Download SVG","exportToPNG":"Download PNG","exportToCSV":"Download CSV","menu":"Menu","selection":"Selection","selectionZoom":"Selection Zoom","zoomIn":"Zoom In","zoomOut":"Zoom Out","pan":"Panning","reset":"Reset Zoom"}}}');function hu(t){return hu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hu(t)}function fu(t,e){for(var r=0;r1&&a[s].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:a[s],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,r){t.addImage(e,r)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,r){t.addText(e,r)}))}},{key:"addXaxisAnnotation",value:function(t,e,r){this.xAxisAnnotations.addXaxisAnnotation(t,e,r)}},{key:"addYaxisAnnotation",value:function(t,e,r){this.yAxisAnnotations.addYaxisAnnotation(t,e,r)}},{key:"addPointAnnotation",value:function(t,e,r){this.pointsAnnotations.addPointAnnotation(t,e,r)}},{key:"addText",value:function(t,e){var r=t.x,i=t.y,n=t.text,o=t.textAnchor,a=t.foreColor,s=t.fontSize,l=t.fontFamily,c=t.fontWeight,u=t.cssClass,h=t.backgroundColor,f=t.borderWidth,d=t.strokeDashArray,p=t.borderRadius,g=t.borderColor,b=t.appendTo,y=void 0===b?".apexcharts-svg":b,v=t.paddingLeft,m=void 0===v?4:v,x=t.paddingRight,w=void 0===x?4:x,S=t.paddingBottom,k=void 0===S?2:S,A=t.paddingTop,O=void 0===A?2:A,P=this.w,C=this.graphics.drawText({x:r,y:i,text:n,textAnchor:o||"start",fontSize:s||"12px",fontWeight:c||"regular",fontFamily:l||P.config.chart.fontFamily,foreColor:a||P.config.chart.foreColor,cssClass:u}),j=P.globals.dom.baseEl.querySelector(y);j&&j.appendChild(C.node);var T=C.bbox();if(n){var E=this.graphics.drawRect(T.x-m,T.y-O,T.width+m+w,T.height+k+O,p,h||"transparent",1,f,g,d);j.insertBefore(E.node,C.node)}}},{key:"addImage",value:function(t,e){var r=this.w,i=t.path,n=t.x,o=void 0===n?0:n,a=t.y,s=void 0===a?0:a,l=t.width,c=void 0===l?20:l,u=t.height,h=void 0===u?20:u,f=t.appendTo,d=void 0===f?".apexcharts-svg":f,p=r.globals.dom.Paper.image(i);p.size(c,h).move(o,s);var g=r.globals.dom.baseEl.querySelector(d);return g&&g.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,r){return this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"xaxis",contextMethod:r.addXaxisAnnotation}),r}},{key:"addYaxisAnnotationExternal",value:function(t,e,r){return this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"yaxis",contextMethod:r.addYaxisAnnotation}),r}},{key:"addPointAnnotationExternal",value:function(t,e,r){return void 0===this.invertAxis&&(this.invertAxis=r.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:r,type:"point",contextMethod:r.addPointAnnotation}),r}},{key:"addAnnotationExternal",value:function(t){var e=t.params,r=t.pushToMemory,i=t.context,n=t.type,o=t.contextMethod,a=i,s=a.w,l=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations")),c=l.childNodes.length+1,u=new pu,h=Object.assign({},"xaxis"===n?u.xAxisAnnotation:"yaxis"===n?u.yAxisAnnotation:u.pointAnnotation),d=f.extend(h,e);switch(n){case"xaxis":this.addXaxisAnnotation(d,l,c);break;case"yaxis":this.addYaxisAnnotation(d,l,c);break;case"point":this.addPointAnnotation(d,l,c)}var p=s.globals.dom.baseEl.querySelector(".apexcharts-".concat(n,"-annotations .apexcharts-").concat(n,"-annotation-label[rel='").concat(c,"']")),g=this.helpers.addBackgroundToAnno(p,d);return g&&l.insertBefore(g.node,p),r&&s.globals.memory.methodsToExec.push({context:a,id:d.id?d.id:f.randomId(),method:o,label:"addAnnotation",params:e}),i}},{key:"clearAnnotations",value:function(t){for(var e=t.w,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),i=e.globals.memory.methodsToExec.length-1;i>=0;i--)"addText"!==e.globals.memory.methodsToExec[i].label&&"addAnnotation"!==e.globals.memory.methodsToExec[i].label||e.globals.memory.methodsToExec.splice(i,1);r=f.listToArray(r),Array.prototype.forEach.call(r,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var r=t.w,i=r.globals.dom.baseEl.querySelectorAll(".".concat(e));i&&(r.globals.memory.methodsToExec.map((function(t,i){t.id===e&&r.globals.memory.methodsToExec.splice(i,1)})),Array.prototype.forEach.call(i,(function(t){t.parentElement.removeChild(t)})))}}],r&&bu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function mu(t){return mu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mu(t)}function xu(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function wu(t){for(var e=1;e\n '.concat(n,'\n - \n ').concat(o,"\n ");return'
'+(r||"")+'
'+i+": "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[a].type||"rangeBar"===t.w.config.series[a].type?u:"".concat(c,""):u)+"
"},Cu=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.opts=e}var e,r;return e=t,(r=[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){return this.hideYAxis(),f.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var r=e.w.config.series[e.seriesIndex].name;return null!==t?r+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),wu(wu({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var r=e.seriesIndex,i=e.dataPointIndex,n=e.w;return t._getBoxTooltip(n,r,i,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var r=e.seriesIndex,i=e.dataPointIndex,n=e.w;return t._getBoxTooltip(n,r,i,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var r=e.seriesIndex,i=e.dataPointIndex,n=e.w,o=function(){var t=n.globals.seriesRangeStart[r][i];return n.globals.seriesRangeEnd[r][i]-t};return n.globals.comboCharts?"rangeBar"===n.config.series[r].type||"rangeArea"===n.config.series[r].type?o():t:o()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Ou(wu(wu({},t),{},{isTimeline:!0})),r=e.color,i=e.seriesName,n=e.ylabel,o=e.startVal,a=e.endVal;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t):function(t){var e=Ou(t),r=e.color,i=e.seriesName,n=e.ylabel,o=e.start,a=e.end;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,r;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(r=t.plotOptions.bar)&&void 0!==r&&r.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Ou(t),r=e.color,i=e.seriesName,n=e.ylabel,o=e.start,a=e.end;return Pu(wu(wu({},t),{},{color:r,seriesName:i,ylabel:n,start:o,end:a}))}(t)}}}}},{key:"brush",value:function(t){return f.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,r){t.yaxis[r].min=0,t.yaxis[r].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return wu(wu({},t),{},{plotOptions:wu(wu({},t.plotOptions),{},{bar:wu(wu({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,r){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return f.isNumber(t)?Math.floor(t):t};var i=t.xaxis.labels.formatter,n=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return r&&r.length&&(n=r.map((function(t){return Array.isArray(t)?t:String(t)}))),n&&n.length&&(t.xaxis.labels.formatter=function(t){return f.isNumber(t)?i(n[Math.floor(t)-1]):i(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,r,i,n){var o=t.globals.seriesCandleO[e][r],a=t.globals.seriesCandleH[e][r],s=t.globals.seriesCandleM[e][r],l=t.globals.seriesCandleL[e][r],c=t.globals.seriesCandleC[e][r];return t.config.series[e].type&&t.config.series[e].type!==n?'
\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][r],"\n
"):'
')+"
".concat(i[0],': ')+o+"
"+"
".concat(i[1],': ')+a+"
"+(s?"
".concat(i[2],': ')+s+"
":"")+"
".concat(i[3],': ')+l+"
"+"
".concat(i[4],': ')+c+"
"}}])&&ku(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ju(t){return ju="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ju(t)}function Tu(t,e){for(var r=0;r1&&n.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new pu;return t.annotations.yaxis=f.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new pu;return t.annotations.xaxis=f.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new pu;return t.annotations.points=f.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}],r&&Tu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Lu(t){return Lu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lu(t)}function Iu(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);rn?i:n,a=t.image,s=0,l=0;void 0===t.width&&void 0===t.height?void 0!==r.fill.image.width&&void 0!==r.fill.image.height?(s=r.fill.image.width+1,l=r.fill.image.height):(s=o+1,l=o):(s=t.width,l=t.height);var c=document.createElementNS(e.globals.SVGNS,"pattern");Pc.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:s+"px",height:l+"px"});var u=document.createElementNS(e.globals.SVGNS,"image");c.appendChild(u),u.setAttributeNS(window.SVG.xlink,"href",a),Pc.setAttrs(u,{x:0,y:0,preserveAspectRatio:"none",width:s+"px",height:l+"px"}),u.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(t){var e=this.w,r=e.config.chart.type;return("bar"===r||"rangeBar"===r)&&e.config.plotOptions.bar.distributed||"heatmap"===r||"treemap"===r?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var r,i=this.w,n=null,o=null,a=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Wu(t))){e&&(t=e);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,o=!0,a=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return o=t.done,t},e:function(t){a=!0,n=t},f:function(){try{o||null==e.return||e.return()}finally{if(a)throw n}}}}(t);try{for(a.s();!(r=a.n()).done;){var s=r.value;s>=e.threshold?(null===n||s>n)&&(n=s):(null===o||s-1?b=f.getOpacityFromRGBA(u):v=f.hexToRgba(f.rgb2hex(u),b),t.opacity&&(b=t.opacity),"pattern"===g&&(a=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:a,fillColor:u,fillOpacity:b,defaultColor:v})),y){var m=function(t){return function(t){if(Array.isArray(t))return Gu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Wu(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(l.fill.gradient.colorStops)||[],x=l.fill.gradient.type;c&&(m[this.seriesIndex]=this.computeColorStops(n.globals.series[this.seriesIndex],l.plotOptions.line.colors),x="vertical"),s=this.handleGradientFill({type:x,fillConfig:t.fillConfig,fillColor:u,fillOpacity:b,colorStops:m,i:this.seriesIndex})}if("image"===g){var w=l.fill.image.src,S=t.patternID?t.patternID:"",k="pattern".concat(n.globals.cuid).concat(t.seriesNumber+1).concat(S);-1===this.patternIDs.indexOf(k)&&(this.clippedImgArea({opacity:b,image:Array.isArray(w)?t.seriesNumber-1&&(p=f.getOpacityFromRGBA(d));var g=void 0===s.gradient.opacityTo?i:Array.isArray(s.gradient.opacityTo)?s.gradient.opacityTo[a]:s.gradient.opacityTo;if(void 0===s.gradient.gradientToColors||0===s.gradient.gradientToColors.length)h="dark"===s.gradient.shade?u.shadeColor(-1*parseFloat(s.gradient.shadeIntensity),r.indexOf("rgb")>-1?f.rgb2hex(r):r):u.shadeColor(parseFloat(s.gradient.shadeIntensity),r.indexOf("rgb")>-1?f.rgb2hex(r):r);else if(s.gradient.gradientToColors[l.seriesNumber]){var b=s.gradient.gradientToColors[l.seriesNumber];h=b,b.indexOf("rgba")>-1&&(g=f.getOpacityFromRGBA(b))}else h=r;if(s.gradient.gradientFrom&&(d=s.gradient.gradientFrom),s.gradient.gradientTo&&(h=s.gradient.gradientTo),s.gradient.inverseColors){var y=d;d=h,h=y}return d.indexOf("rgb")>-1&&(d=f.rgb2hex(d)),h.indexOf("rgb")>-1&&(h=f.rgb2hex(h)),c.drawGradient(e,d,h,p,g,l.size,s.gradient.stops,o,a)}}],r&&Vu(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Zu=qu;function $u(t){return $u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$u(t)}function Ju(t,e){for(var r=0;r0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],o=this.w,a=e,s=t,l=null,c=new Pc(this.ctx),u=o.config.markers.discrete&&o.config.markers.discrete.length;if(Array.isArray(s.x))for(var h=0;h0:o.config.markers.size>0)||n||u){g||(b+=" w".concat(f.randomId()));var y=this.getMarkerConfig({cssClass:b,seriesIndex:e,dataPointIndex:p});o.config.series[a].data[p]&&(o.config.series[a].data[p].fillColor&&(y.pointFillColor=o.config.series[a].data[p].fillColor),o.config.series[a].data[p].strokeColor&&(y.pointStrokeColor=o.config.series[a].data[p].strokeColor)),void 0!==i&&(y.pSize=i),(s.x[h]<-o.globals.markers.largestSize||s.x[h]>o.globals.gridWidth+o.globals.markers.largestSize||s.y[h]<-o.globals.markers.largestSize||s.y[h]>o.globals.gridHeight+o.globals.markers.largestSize)&&(y.pSize=0),g||((o.globals.markers.size[e]>0||n||u)&&!l&&(l=c.group({class:n||u?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(o.globals.cuid,")")),(d=c.drawMarker(s.x[h],s.y[h],y)).attr("rel",p),d.attr("j",p),d.attr("index",e),d.node.setAttribute("default-marker-size",y.pSize),new vc(this.ctx).setSelectionFilter(d,e,p),this.addEvents(d),l&&l.add(d))}else void 0===o.globals.pointsArray[e]&&(o.globals.pointsArray[e]=[]),o.globals.pointsArray[e].push([s.x[h],s.y[h]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,r=t.seriesIndex,i=t.dataPointIndex,n=void 0===i?null:i,o=t.radius,a=void 0===o?null:o,s=t.size,l=void 0===s?null:s,c=t.strokeWidth,u=void 0===c?null:c,h=this.w,f=this.getMarkerStyle(r),d=null===l?h.globals.markers.size[r]:l,p=h.config.markers;return null!==n&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===r&&t.dataPointIndex===n&&(f.pointStrokeColor=t.strokeColor,f.pointFillColor=t.fillColor,d=t.size,f.pointShape=t.shape)})),{pSize:null===a?d:a,pRadius:null!==a?a:p.radius,pointStrokeWidth:null!==u?u:Array.isArray(p.strokeWidth)?p.strokeWidth[r]:p.strokeWidth,pointStrokeColor:f.pointStrokeColor,pointFillColor:f.pointFillColor,shape:f.pointShape||(Array.isArray(p.shape)?p.shape[r]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[r]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[r]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[r]:p.fillOpacity,seriesIndex:r}}},{key:"addEvents",value:function(t){var e=this.w,r=new Pc(this.ctx);t.node.addEventListener("mouseenter",r.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",r.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",r.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",r.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,r=e.globals.markers.colors,i=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(i)?i[t]:i,pointFillColor:Array.isArray(r)?r[t]:r}}}],r&&Ju(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function th(t){return th="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},th(t)}function eh(t,e){for(var r=0;rp.maxBubbleRadius&&(d=p.maxBubbleRadius)}var g=a.x[u],b=a.y[u];if(d=d||0,null!==b&&void 0!==i.globals.series[o][h]||(f=!1),f){var y=this.drawPoint(g,b,d,o,h,e);c.add(y)}l.add(c)}}},{key:"drawPoint",value:function(t,e,r,i,n,o){var a=this.w,s=i,l=new b(this.ctx),c=new vc(this.ctx),u=new Zu(this.ctx),h=new Ku(this.ctx),f=new Pc(this.ctx),d=h.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:s,dataPointIndex:n,radius:"bubble"===a.config.chart.type||a.globals.comboCharts&&a.config.series[i]&&"bubble"===a.config.series[i].type?r:null}),p=u.fillPath({seriesNumber:i,dataPointIndex:n,color:d.pointFillColor,patternUnits:"objectBoundingBox",value:a.globals.series[i][o]}),g=f.drawMarker(t,e,d);if(a.config.series[s].data[n]&&a.config.series[s].data[n].fillColor&&(p=a.config.series[s].data[n].fillColor),g.attr({fill:p}),a.config.chart.dropShadow.enabled){var y=a.config.chart.dropShadow;c.dropShadow(g,y,i)}if(!this.initialAnim||a.globals.dataChanged||a.globals.resized)a.globals.animationEnded=!0;else{var v=a.config.chart.animations.speed;l.animateMarker(g,v,a.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(g)}),100)}))}return g.attr({rel:n,j:n,index:i,"default-marker-size":d.pSize}),c.setSelectionFilter(g,i,n),h.addEvents(g),g.node.classList.add("apexcharts-marker"),g}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}],r&&eh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function nh(t){return nh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nh(t)}function oh(t,e){for(var r=0;rs.globals.gridHeight+h&&(e=s.globals.gridHeight+h/2),void 0===s.globals.dataLabelsRects[i]&&(s.globals.dataLabelsRects[i]=[]),s.globals.dataLabelsRects[i].push({x:t,y:e,width:u,height:h});var f=s.globals.dataLabelsRects[i].length-2,d=void 0!==s.globals.lastDrawnDataLabelsIndexes[i]?s.globals.lastDrawnDataLabelsIndexes[i][s.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(void 0!==s.globals.dataLabelsRects[i][f]){var p=s.globals.dataLabelsRects[i][d];(t>p.x+p.width||e>p.y+p.height||e+he.globals.gridWidth+y.textRects.width+30)&&(s="");var v=e.globals.dataLabels.style.colors[o];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(v=e.globals.dataLabels.style.colors[a]),"function"==typeof v&&(v=v({series:e.globals.series,seriesIndex:o,dataPointIndex:a,w:e})),f&&(v=f);var m=h.offsetX,x=h.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(m=0,x=0),e.globals.isSlopeChart&&(0!==a&&(m=-2*h.offsetX+5),0!==a&&a!==e.config.series[o].data.length-1&&(m=0)),y.drawnextLabel){if((b=r.drawText({width:100,height:parseInt(h.style.fontSize,10),x:i+m,y:n+x,foreColor:v,textAnchor:l||h.textAnchor,text:s,fontSize:c||h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight||"normal"})).attr({class:g||"apexcharts-datalabel",cx:i,cy:n}),h.dropShadow.enabled){var w=h.dropShadow;new vc(this.ctx).dropShadow(b,w)}u.add(b),void 0===e.globals.lastDrawnDataLabelsIndexes[o]&&(e.globals.lastDrawnDataLabelsIndexes[o]=[]),e.globals.lastDrawnDataLabelsIndexes[o].push(a)}return b}},{key:"addBackgroundToDataLabel",value:function(t,e){var r=this.w,i=r.config.dataLabels.background,n=i.padding,o=i.padding/2,a=e.width,s=e.height,l=new Pc(this.ctx).drawRect(e.x-n,e.y-o/2,a+2*n,s+o,i.borderRadius,"transparent"!==r.config.chart.background&&r.config.chart.background?r.config.chart.background:"#fff",i.opacity,i.borderWidth,i.borderColor);return i.dropShadow.enabled&&new vc(this.ctx).dropShadow(l,i.dropShadow),l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),r=0;r0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.w,n=f.clone(i.globals.initialSeries);i.globals.previousPaths=[],r?(i.globals.collapsedSeries=[],i.globals.ancillaryCollapsedSeries=[],i.globals.collapsedSeriesIndices=[],i.globals.ancillaryCollapsedSeriesIndices=[]):n=this.emptyCollapsedSeries(n),i.config.series=n,t&&(e&&(i.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(n,i.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,r=0;r-1&&(t[r].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,r=this.getSeriesByName(t),i=parseInt(null==r?void 0:r.getAttribute("data:realIndex"),10),n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),o=null,a=null,s=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){o=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(i,"']")),a=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(i,"']"));var l=e.globals.seriesYAxisReverseMap[i];s=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else o=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+1,"']"));else o=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+1,"'] path"));for(var c=0;c=t.from&&(o0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=this.w,i=0;if(r.config.series.length>1)for(var n=r.config.series.map((function(t,i){return t.data&&t.data.length>0&&-1===r.globals.collapsedSeriesIndices.indexOf(i)&&(!r.globals.comboCharts||0===e.length||e.length&&e.indexOf(r.config.series[i].type)>-1)?i:-1})),o="asc"===t?0:n.length-1;"asc"===t?o=0;"asc"===t?o++:o--)if(-1!==n[o]){i=n[o];break}return i}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,r,i){for(var n=e[r].childNodes,o={type:i,paths:[],realIndex:e[r].getAttribute("data:realIndex")},a=0;a0)for(var i=function(e){for(var r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),i=[],n=function(t){var e=function(e){return r[t].getAttribute(e)},n={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};i.push({rect:n,color:r[t].getAttribute("color")})},o=0;o0?t:[]}))}}],r&&uh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function dh(t){return dh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dh(t)}function ph(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new fh(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var r=this.w.config,i=this.w.globals,n="boxPlot"===r.chart.type||"boxPlot"===r.series[e].type,o=0;o=5?this.twoDSeries.push(f.parseNumber(t[e].data[o][4])):this.twoDSeries.push(f.parseNumber(t[e].data[o][1])),i.dataFormatXNumeric=!0),"datetime"===r.xaxis.type){var a=new Date(t[e].data[o][0]);a=new Date(a).getTime(),this.twoDSeriesX.push(a)}else this.twoDSeriesX.push(t[e].data[o][0]);for(var s=0;s-1&&(o=this.activeSeriesIndex);for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:this.ctx,i=this.w.config,n=this.w.globals,o=new Vc(r),a=i.labels.length>0?i.labels.slice():i.xaxis.categories.slice();n.isRangeBar="rangeBar"===i.chart.type&&n.isBarHorizontal,n.hasXaxisGroups="category"===i.xaxis.type&&i.xaxis.group.groups.length>0,n.hasXaxisGroups&&(n.groups=i.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?n.seriesNames.push(t.name):n.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var s=[],l=function(t){return function(t){if(Array.isArray(t))return ph(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ph(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ph(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(new Set(i.series.map((function(t){return t.group}))));i.series.forEach((function(t,e){var r=l.indexOf(t.group);s[r]||(s[r]=[]),s[r].push(n.seriesNames[e])})),n.seriesGroups=s;for(var c=function(){for(var t=0;t0&&(this.twoDSeriesX=a,n.seriesX.push(this.twoDSeriesX))),n.labels.push(this.twoDSeriesX);var h=t[u].data.map((function(t){return f.parseNumber(t)}));n.series.push(h)}n.seriesZ.push(this.threeDSeries),void 0!==t[u].color?n.seriesColors.push(t[u].color):n.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,r=this.w.config;e.series=t.slice(),e.seriesNames=r.labels.slice();for(var i=0;i0?r.labels=e.xaxis.categories:e.labels.length>0?r.labels=e.labels.slice():this.fallbackToCategory?(r.labels=r.labels[0],r.seriesRange.length&&(r.seriesRange.map((function(t){t.forEach((function(t){r.labels.indexOf(t.x)<0&&t.x&&r.labels.push(t.x)}))})),r.labels=Array.from(new Set(r.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric&&(new Cu(e).convertCatToNumericXaxis(e,this.ctx,r.seriesX[0]),this._generateExternalLabels(t))):this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,r=this.w.config,i=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var n=r.series.map((function(t,e){return t.data.filter((function(t,e,r){return r.findIndex((function(e){return e.x===t.x}))===e}))})),o=n.reduce((function(t,e,r,i){return i[t].length>e.length?t:r}),0),a=0;a0&&n==r.length&&e.push(i)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}],r&&gh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function vh(t){return vh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vh(t)}function mh(t){return function(t){if(Array.isArray(t))return xh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return xh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xh(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xh(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r=10?new Date(t).toDateString():f.isNumber(t)?t:t.split(o).join("")},y=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},v=Math.max.apply(Math,mh(r.map((function(t){return t.data?t.data.length:0})))),m=new yh(this.ctx),x=new eu(this.ctx),w=function(t){var r="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var i=l.globals.yLabelFormatters[0],n=new fh(e.ctx).getActiveConfigSeriesIndex();r=i(l.globals.labels[t],{seriesIndex:n,dataPointIndex:t,w:l})}else r=x.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?r=l.config.xaxis.categories[t]:l.config.labels.length&&(r=l.config.labels[t]))}else r=l.config.labels[t];return null===r?"nullvalue":(Array.isArray(r)&&(r=r.join(" ")),f.isNumber(r)?r:r.split(o).join(""))};h.push(l.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===l.config.chart.type?(h.push("minimum"),h.push("q1"),h.push("median"),h.push("q3"),h.push("maximum")):"candlestick"===l.config.chart.type?(h.push("open"),h.push("high"),h.push("low"),h.push("close")):"rangeBar"===l.config.chart.type?(h.push("minimum"),h.push("maximum")):r.map((function(t,e){var r=(t.name?t.name:"series-".concat(e))+"";l.globals.axisCharts&&h.push(r.split(o).join("")?r.split(o).join(""):"series-".concat(e))})),l.globals.axisCharts||(h.push(l.config.chart.toolbar.export.csv.headerValue),d.push(h.join(o))),l.globals.allSeriesHasEqualX||!l.globals.axisCharts||l.config.xaxis.categories.length||l.config.labels.length?r.map((function(t,e){l.globals.axisCharts?function(t,e){if(h.length&&0===e&&d.push(h.join(o)),t.data){t.data=t.data.length&&t.data||mh(Array(v)).map((function(){return""}));for(var i=0;i0&&!i.globals.isBarHorizontal&&(this.xaxisLabels=i.globals.timescaleLabels.slice()),i.config.xaxis.overwriteCategories&&(this.xaxisLabels=i.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===i.config.xaxis.position?this.offY=0:this.offY=i.globals.gridHeight,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===i.config.chart.type&&i.config.plotOptions.bar.horizontal,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.xaxisBorderWidth=i.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=i.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=i.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}var e,r;return e=t,r=[{key:"drawXaxis",value:function(){var t=this.w,e=new Pc(this.ctx),r=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),i=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});r.add(i);for(var n=[],o=0;o6&&void 0!==arguments[6]?arguments[6]:{},c=[],u=[],h=this.w,f=l.xaxisFontSize||this.xaxisFontSize,d=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,g=l.fontWeight||h.config.xaxis.labels.style.fontWeight,b=l.cssClass||h.config.xaxis.labels.style.cssClass,y=h.globals.padHorizontal,v=i.length,m="category"===h.config.xaxis.type?h.globals.dataPoints:v;if(0===m&&v>m&&(m=v),n){var x=m>1?m-1:m;a=h.globals.gridWidth/Math.min(x,v-1),y=y+o(0,a)/2+h.config.xaxis.labels.offsetX}else a=h.globals.gridWidth/m,y=y+o(0,a)+h.config.xaxis.labels.offsetX;for(var w=function(n){var l=y-o(n,a)/2+h.config.xaxis.labels.offsetX;0===n&&1===v&&a/2===y&&1===m&&(l=h.globals.gridWidth/2);var x=s.axesUtils.getLabel(i,h.globals.timescaleLabels,l,n,c,f,t),w=28;if(h.globals.rotateXLabels&&t&&(w=22),h.config.xaxis.title.text&&"top"===h.config.xaxis.position&&(w+=parseFloat(h.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(f)+(h.globals.xAxisLabelsHeight-h.globals.xAxisGroupLabelsHeight)+(h.globals.rotateXLabels?10:0)),x=void 0!==h.config.xaxis.tickAmount&&"dataPoints"!==h.config.xaxis.tickAmount&&"datetime"!==h.config.xaxis.type?s.axesUtils.checkLabelBasedOnTickamount(n,x,v):s.axesUtils.checkForOverflowingLabels(n,x,v,c,u),h.config.xaxis.labels.show){var S=e.drawText({x:x.x,y:s.offY+h.config.xaxis.labels.offsetY+w-("top"===h.config.xaxis.position?h.globals.xAxisHeight+h.config.xaxis.axisTicks.height-2:0),text:x.text,textAnchor:"middle",fontWeight:x.isBold?600:g,fontSize:f,fontFamily:d,foreColor:Array.isArray(p)?t&&h.config.xaxis.convertedCatToNumeric?p[h.globals.minX+n-1]:p[n]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+b});if(r.add(S),S.on("click",(function(t){if("function"==typeof h.config.chart.events.xAxisLabelClick){var e=Object.assign({},h,{labelIndex:n});h.config.chart.events.xAxisLabelClick(t,s.ctx,e)}})),t){var k=document.createElementNS(h.globals.SVGNS,"title");k.textContent=Array.isArray(x.text)?x.text.join(" "):x.text,S.node.appendChild(k),""!==x.text&&(c.push(x.text),u.push(x))}}ni.globals.gridWidth)){var o=this.offY+i.config.xaxis.axisTicks.offsetY;if(e=e+o+i.config.xaxis.axisTicks.height,"top"===i.config.xaxis.position&&(e=o-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){var a=new Pc(this.ctx).drawLine(t+i.config.xaxis.axisTicks.offsetX,o+i.config.xaxis.offsetY,n+i.config.xaxis.axisTicks.offsetX,e+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);r.add(a),a.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],r=this.xaxisLabels.length,i=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var n=0;n0){var c=n[n.length-1].getBBox(),u=n[0].getBBox();c.x<-20&&n[n.length-1].parentNode.removeChild(n[n.length-1]),u.x+u.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&n[0].parentNode.removeChild(n[0]);for(var h=0;ht.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&(this.xaxisLabels=r.globals.timescaleLabels.slice())}var e,r;return e=t,r=[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,r=new Pc(this.ctx);t||(t=r.group({class:"apexcharts-grid"}));var i=r.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),n=r.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(n),t.add(i),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,r=new Pc(this.ctx),i=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,function(t){return function(t){if(Array.isArray(t))return Eh(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Eh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Eh(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t.config.stroke.width)):t.config.stroke.width,n=function(t){var r=document.createElementNS(e.SVGNS,"clipPath");return r.setAttribute("id",t),r};e.dom.elGridRectMask=n("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=n("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=n("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=n("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=n("nonForecastMask".concat(e.cuid));var o=0,a=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(o=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),a=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=r.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=r.drawRect(-i/2-o-2,-i/2-2,e.gridWidth+i+a+o+4,e.gridHeight+i+4,0,"#fff");var s=t.globals.markers.largestSize;e.dom.elGridRectMarker=r.drawRect(-s,-s,e.gridWidth+2*s,e.gridHeight+2*s,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,r=t.x1,i=t.y1,n=t.x2,o=t.y2,a=t.xCount,s=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===a-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:r,y1:i,x2:n,y2:o,xCount:a,parent:s});var c=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var u=l.globals.groups;if(u){for(var h=0,f=0;h0&&"datetime"!==t.config.xaxis.type&&(n=e.yAxisScale[i].result.length-1)),this._drawXYLines({xCount:n,tickAmount:l})):(n=l,l=e.xTickAmount,this._drawInvertedXYLines({xCount:n,tickAmount:l})),this.drawGridBands(n,l),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/n}}},{key:"drawGridBands",value:function(t,e){var r,i,n=this,o=this.w;if((null===(r=o.config.grid.row.colors)||void 0===r?void 0:r.length)>0&&function(t,r,i,a,s,l){for(var c=0,u=0;c=o.config.grid.row.colors.length&&(u=0),n._drawGridBandRect({c:u,x1:0,y1:a,x2:s,y2:l,type:"row"}),a+=o.globals.gridHeight/e}(0,e,0,0,o.globals.gridWidth,o.globals.gridHeight/e),(null===(i=o.config.grid.column.colors)||void 0===i?void 0:i.length)>0){var a=o.globals.isBarHorizontal||"on"!==o.config.xaxis.tickPlacement||"category"!==o.config.xaxis.type&&!o.config.xaxis.convertedCatToNumeric?t:t-1;o.globals.isXNumeric&&(a=o.globals.xAxisScale.result.length-1);for(var s=o.globals.padHorizontal,l=o.globals.padHorizontal+o.globals.gridWidth/a,c=o.globals.gridHeight,u=0,h=0;u=o.config.grid.column.colors.length&&(h=0),"datetime"===o.config.xaxis.type&&(s=this.xaxisLabels[u].position,l=((null===(f=this.xaxisLabels[u+1])||void 0===f?void 0:f.position)||o.globals.gridWidth)-this.xaxisLabels[u].position),this._drawGridBandRect({c:h,x1:s,y1:0,x2:l,y2:c,type:"column"}),s+=o.globals.gridWidth/a}}}}],r&&Mh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const _h=Ih;function Rh(t){return Rh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rh(t)}function zh(t,e){for(var r=0;r2&&void 0!==arguments[2]?arguments[2]:0,s=1e-11,l=this.w,c=l.globals;c.isBarHorizontal?(r=l.config.xaxis,i=Math.max((c.svgWidth-100)/25,2)):(r=l.config.yaxis[a],i=Math.max((c.svgHeight-100)/15,2)),f.isNumber(i)||(i=10),n=void 0!==r.min&&null!==r.min,o=void 0!==r.max&&null!==r.min;var u=void 0!==r.stepSize&&null!==r.stepSize,h=void 0!==r.tickAmount&&null!==r.tickAmount,d=h?r.tickAmount:c.niceScaleDefaultTicks[Math.min(Math.round(i/2),c.niceScaleDefaultTicks.length-1)];if(c.isMultipleYAxis&&!h&&c.multiAxisTickAmount>0&&(d=c.multiAxisTickAmount,h=!0),d="dataPoints"===d?c.dataPoints-1:Math.abs(Math.round(d)),(t===Number.MIN_VALUE&&0===e||!f.isNumber(t)&&!f.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=f.isNumber(r.min)?r.min:0,e=f.isNumber(r.max)?r.max:t+d,c.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var p=e;e=t,t=p}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var g=[];d<1&&(d=1);var b=d,y=Math.abs(e-t);!n&&t>0&&t/y<.15&&(t=0,n=!0),!o&&e<0&&-e/y<.15&&(e=0,o=!0);var v=(y=Math.abs(e-t))/b,m=v,x=Math.floor(Math.log10(m)),w=Math.pow(10,x),S=Math.ceil(m/w);if(v=m=(S=c.niceScaleAllowedMagMsd[0===c.yValueDecimal?0:1][S])*w,c.isBarHorizontal&&r.stepSize&&"datetime"!==r.type?(v=r.stepSize,u=!0):u&&(v=r.stepSize),u&&r.forceNiceScale){var k=Math.floor(Math.log10(v));v*=Math.pow(10,x-k)}if(n&&o){var A=y/b;if(h)if(u)if(0!=f.mod(y,v)){var O=f.getGCD(v,A);v=A/O<10?O:A}else 0==f.mod(v,A)?v=A:(A=v,h=!1);else v=A;else if(u)0==f.mod(y,v)?A=v:v=A;else if(0==f.mod(y,v))A=v;else{A=y/(b=Math.ceil(y/v));var P=f.getGCD(y,v);y/Pi&&(t=e-v*d,t+=v*Math.floor((C-t)/v))}else if(n)if(h)e=t+v*b;else{var j=e;e=v*Math.ceil(e/v),Math.abs(e-t)/f.getGCD(y,v)>i&&(e=t+v*d,e+=v*Math.ceil((j-e)/v))}}else if(c.isMultipleYAxis&&h){var T=v*Math.floor(t/v),E=T+v*b;E0&&t16&&f.getPrimeFactors(b).length<2&&b++,!h&&r.forceNiceScale&&0===c.yValueDecimal&&b>y&&(b=y,v=Math.round(y/b)),b>i&&(!h&&!u||r.forceNiceScale)){var M=f.getPrimeFactors(b),L=M.length-1,I=b;t:for(var _=0;_F);return{result:g,niceMin:g[0],niceMax:g[g.length-1]}}},{key:"linearScale",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,o=Math.abs(e-t),a=[];if(t===e)return{result:a=[t],niceMin:a[0],niceMax:a[a.length-1]};"dataPoints"===(r=this._adjustTicksForSmallRange(r,i,o))&&(r=this.w.globals.dataPoints-1),n||(n=o/r),n=Math.round(10*(n+Number.EPSILON))/10,r===Number.MAX_VALUE&&(r=5,n=1);for(var s=t;r>=0;)a.push(s),s=f.preciseAddition(s,n),r-=1;return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,r){e<=0&&(e=Math.max(t,r)),t<=0&&(t=Math.min(e,r));for(var i=[],n=Math.ceil(Math.log(e)/Math.log(r)+1),o=Math.floor(Math.log(t)/Math.log(r));o5?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=o.forceNiceScale?this.logarithmicScaleNice(e,r,o.logBase):this.logarithmicScale(e,r,o.logBase)):r!==-Number.MAX_VALUE&&f.isNumber(r)&&e!==Number.MAX_VALUE&&f.isNumber(e)?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=this.niceScale(e,r,t)):i.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var r=this.w,i=r.globals,n=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&f.isNumber(e)){var o=i.xTickAmount+1;n<10&&n>1&&(o=n),i.xAxisScale=this.linearScale(t,e,o,0,r.config.xaxis.stepSize)}else i.xAxisScale=this.linearScale(0,10,10);return i.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,r=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var i=r.seriesYAxisMap,n=r.minYArr,o=r.maxYArr;r.allSeriesCollapsed=!0,r.barGroups=[],i.forEach((function(i,a){var s=[];i.forEach((function(t){var r=e.series[t].group;s.indexOf(r)<0&&s.push(r)})),i.length>0?function(){var l,c,u=Number.MAX_VALUE,h=-Number.MAX_VALUE,f=u,d=h;if(e.chart.stacked)!function(){var t=new Array(r.dataPoints).fill(0),n=[],o=[],p=[];s.forEach((function(){n.push(t.map((function(){return Number.MIN_VALUE}))),o.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var g=function(t){!l&&e.series[i[t]].type&&(l=e.series[i[t]].type);var u=i[t];c=e.series[u].group?e.series[u].group:"axis-".concat(a),!(r.collapsedSeriesIndices.indexOf(u)<0&&r.ancillaryCollapsedSeriesIndices.indexOf(u)<0)||(r.allSeriesCollapsed=!1,s.forEach((function(t,i){if(e.series[u].group===t)for(var a=0;a=0?o[i][a]+=s:p[i][a]+=s,n[i][a]+=s,f=Math.min(f,s),d=Math.max(d,s)}}))),"bar"!==l&&"column"!==l||r.barGroups.push(c)},b=0;bt.length)&&(e=t.length);for(var r=0,i=Array(e);r1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w.config,o=this.w.globals,a=-Number.MAX_VALUE,s=Number.MIN_VALUE;null===i&&(i=t+1);var l=o.series,c=l,u=l;"candlestick"===n.chart.type?(c=o.seriesCandleL,u=o.seriesCandleH):"boxPlot"===n.chart.type?(c=o.seriesCandleO,u=o.seriesCandleC):o.isRangeData&&(c=o.seriesRangeStart,u=o.seriesRangeEnd);var h=!1;if(o.seriesX.length>=i){var d,p=null===(d=o.brushSource)||void 0===d?void 0:d.w.config.chart.brush;(n.chart.zoom.enabled&&n.chart.zoom.autoScaleYaxis||null!=p&&p.enabled&&null!=p&&p.autoScaleYaxis)&&(h=!0)}for(var g=t;gy&&o.seriesX[g][v]>n.xaxis.max;v--);}for(var m=y;m<=v&&mc[g][m]&&c[g][m]<0&&(s=c[g][m])}else o.hasNullValues=!0}"bar"!==b&&"column"!==b||(s<0&&a<0&&(a=0,r=Math.max(r,0)),s===Number.MIN_VALUE&&(s=0,e=Math.min(e,0)))}return"rangeBar"===n.chart.type&&o.seriesRangeStart.length&&o.isBarHorizontal&&(s=e),"bar"===n.chart.type&&(s<0&&a<0&&(a=0),s===Number.MIN_VALUE&&(s=0)),{minY:s,maxY:a,lowestY:e,highestY:r}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var r,i=Number.MAX_VALUE;if(t.isMultipleYAxis){i=Number.MAX_VALUE;for(var n=0;nt.dataPoints&&0!==t.dataPoints&&(i=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(i=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var n=t.maxX-t.minX;n<30&&(i=n-1)}}else i=e.xaxis.tickAmount;if(t.xTickAmount=i,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var o=[],a=t.minX-1;a0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,i-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());r&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var n=e-i[r-1];n>0&&(t.minXDiff=Math.min(n,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var r=e.seriesGroups;r.length||(r=[this.w.globals.seriesNames.map((function(t){return t}))]);var i={},n={};r.forEach((function(r){i[r]=[],n[r]=[],t.w.config.series.map((function(t,i){return r.indexOf(e.seriesNames[i])>-1?i:null})).filter((function(t){return null!==t})).forEach((function(o){for(var a=0;a0?i[r][a]+=parseFloat(e.series[o][a])+1e-4:n[r][a]+=parseFloat(e.series[o][a]))}}))})),Object.entries(i).forEach((function(t){var r=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return Hh(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hh(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t,1)[0];i[r].forEach((function(t,o){e.maxY=Math.max(e.maxY,i[r][o]),e.minY=Math.min(e.minY,n[r][o])}))}))}}}],r&&Fh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Wh=Nh;function Gh(t){return Gh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gh(t)}function Vh(t,e){for(var r=0;r=0;g--){var b=h(d[g],g,e),y=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(y*=-1);var v=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(i.colors,t),x=Array.isArray(m)?m[g]:m,w=f.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),S=r.drawText({x:y,y:p,text:w.includes(b)&&!e.config.yaxis[t].labels.showDuplicates?"":b,textAnchor:v,fontSize:n,fontFamily:o,fontWeight:a,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:x,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(i.cssClass)});l.add(S),this.addTooltip(S,b),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(r,S,firstLabel,e.config.yaxis[t].labels.rotate),p+=u}}return this.addYAxisTitle(r,s,t),this.addAxisBorder(r,s,t,c,u),s}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var r=document.createElementNS(this.w.globals.SVGNS,"title");r.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(r)}},{key:"rotateLabel",value:function(t,e,r,i){var n=t.rotateAroundCenter(r.node),o=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(i," ").concat(n.x," ").concat(o.y,")"))}},{key:"addYAxisTitle",value:function(t,e,r){var i=this.w;if(void 0!==i.config.yaxis[r].title.text){var n=t.group({class:"apexcharts-yaxis-title"}),o=i.config.yaxis[r].opposite?i.globals.translateYAxisX[r]:0,a=t.drawText({x:o,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[r].title.offsetY,text:i.config.yaxis[r].title.text,textAnchor:"end",foreColor:i.config.yaxis[r].title.style.color,fontSize:i.config.yaxis[r].title.style.fontSize,fontWeight:i.config.yaxis[r].title.style.fontWeight,fontFamily:i.config.yaxis[r].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(i.config.yaxis[r].title.style.cssClass)});n.add(a),e.add(n)}}},{key:"addAxisBorder",value:function(t,e,r,i,n){var o=this.w,a=o.config.yaxis[r].axisBorder,s=31+a.offsetX;if(o.config.yaxis[r].opposite&&(s=-31-a.offsetX),a.show){var l=t.drawLine(s,o.globals.translateY+a.offsetY-2,s,o.globals.gridHeight+o.globals.translateY+a.offsetY+2,a.color,0,a.width);e.add(l)}o.config.yaxis[r].axisTicks.show&&this.axesUtils.drawYAxisTicks(s,i,a,o.config.yaxis[r].axisTicks,r,n,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,r=new Pc(this.ctx),i=r.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),n=r.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});i.add(n);var o=e.globals.yAxisScale[t].result.length-1,a=e.globals.gridWidth/o+.1,s=a+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,c=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),u=e.globals.timescaleLabels;if(u.length>0&&(this.xaxisLabels=u.slice(),o=(c=u.slice()).length),e.config.xaxis.labels.show)for(var h=u.length?0:o;u.length?h=0;u.length?h++:h--){var f=l(c[h],h,e),d=e.globals.gridWidth+e.globals.padHorizontal-(s-a+e.config.xaxis.labels.offsetX);if(u.length){var p=this.axesUtils.getLabel(c,u,d,h,this.drawnLabels,this.xaxisFontSize);d=p.x,f=p.text,this.drawnLabels.push(p.text),0===h&&e.globals.skipFirstTimelinelabel&&(f=""),h===c.length-1&&e.globals.skipLastTimelinelabel&&(f="")}var g=r.drawText({x:d,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});n.add(g),g.tspan(f),this.addTooltip(g,f),s+=a}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,r=new Pc(this.ctx),i=e.config.xaxis.axisBorder;if(i.show){var n=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(n-=15);var o=r.drawLine(e.globals.padHorizontal+n+i.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,i.color,0,i.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(o):t.add(o)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,r=new Pc(this.ctx);if(void 0!==e.config.xaxis.title.text){var i=r.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),n=r.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});i.add(n),t.add(i)}}},{key:"yAxisTitleRotate",value:function(t,e){var r=this.w,i=new Pc(this.ctx),n=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),o=n?n.getBoundingClientRect():{width:0,height:0},a=r.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),s=a?a.getBoundingClientRect():{width:0,height:0};if(a){var l=this.xPaddingForYAxisTitle(t,o,s,e);a.setAttribute("x",l.xPos-(e?10:0));var c=i.rotateAroundCenter(a);a.setAttribute("transform","rotate(".concat(e?-1*r.config.yaxis[t].title.rotate:r.config.yaxis[t].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,r,i){var n=this.w,o=0,a=10;return void 0===n.config.yaxis[t].title.text||t<0?{xPos:o,padd:0}:(i?o=e.width+n.config.yaxis[t].title.offsetX+r.width/2+a/2:(o=-1*e.width+n.config.yaxis[t].title.offsetX+a/2+r.width/2,n.globals.isBarHorizontal&&(a=25,o=-1*e.width-n.config.yaxis[t].title.offsetX-a)),{xPos:o,padd:a})}},{key:"setYAxisXPosition",value:function(t,e){var r=this.w,i=0,n=0,o=18,a=1;r.config.yaxis.length>1&&(this.multipleYs=!0),r.config.yaxis.forEach((function(s,l){var c=r.globals.ignoreYAxisIndexes.includes(l)||!s.show||s.floating||0===t[l].width,u=t[l].width+e[l].width;s.opposite?r.globals.isBarHorizontal?(n=r.globals.gridWidth+r.globals.translateX-1,r.globals.translateYAxisX[l]=n-s.labels.offsetX):(n=r.globals.gridWidth+r.globals.translateX+a,c||(a+=u+20),r.globals.translateYAxisX[l]=n-s.labels.offsetX+20):(i=r.globals.translateX-o,c||(o+=u+20),r.globals.translateYAxisX[l]=i+s.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;f.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,r){var i=t.config.yaxis[r];if(i&&!i.floating&&void 0!==i.labels.align){var n=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(r,"'] .apexcharts-yaxis-texts-g")),o=f.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(r,"'] .apexcharts-yaxis-label"))),a=n.getBoundingClientRect();o.forEach((function(t){t.setAttribute("text-anchor",i.labels.align)})),"left"!==i.labels.align||i.opposite?"center"===i.labels.align?n.setAttribute("transform","translate(".concat(a.width/2*(i.opposite?1:-1),", 0)")):"right"===i.labels.align&&i.opposite&&n.setAttribute("transform","translate(".concat(a.width,", 0)")):n.setAttribute("transform","translate(-".concat(a.width,", 0)"))}}))}}],r&&Vh(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Zh(t){return Zh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zh(t)}function $h(t,e){for(var r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var r=e.filter((function(e){return e.name===t}))[0];if(!r)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var i=f.extend(uu,r);this.w.globals.locale=i.options}}])&&tf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function nf(t){return nf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nf(t)}function of(t,e){for(var r=0;re.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var o=new Mu({}),a=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n[0].breakpoint,a=window.innerWidth>0?window.innerWidth:screen.width;if(a>i){var s=f.clone(r.globals.initialConfig);s.series=f.clone(r.config.series);var l=Mc.extendArrayProps(o,s,r);t=f.extend(l,t),t=f.extend(r.config,t),e.overrideResponsiveOptions(t)}else for(var c=0;ct.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&"function"==typeof t[0]?(this.isColorFn=!0,r.config.series.map((function(i,n){var o=t[n]||t[0];return"function"==typeof o?o({value:r.globals.axisCharts?r.globals.series[n][0]||0:r.globals.series[n],seriesIndex:n,dataPointIndex:n,w:e.w}):o}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,r){t&&(e[r]=t)}))}},{key:"getMonochromeColors",value:function(t,e,r){var i=t.color,n=t.shadeIntensity,o=t.shadeTo,a=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,s=1/(a/n),l=0;return Array.from({length:a},(function(){var t="dark"===o?r.shadeColor(-1*l,i):r.shadeColor(l,i);return l+=s,t}))}},{key:"applyColorTypes",value:function(t,e){var r=this,i=this.w;t.forEach((function(t){i.globals[t].colors=void 0===i.config[t].colors?r.isColorFn?i.config.colors:e:i.config[t].colors.slice(),r.pushExtraColors(i.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.w,n=e||i.globals.series.length;if(null===r&&(r=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===i.config.chart.type&&i.config.plotOptions.heatmap&&i.config.plotOptions.heatmap.colorScale.inverse),r&&i.globals.series.length&&(n=i.globals.series[i.globals.maxValsInArrayIndex].length*i.globals.series.length),t.lengtht.length)&&(e=t.length);for(var r=0,i=Array(e);rt.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,r=[];e.config.series.forEach((function(n,o){n.data.forEach((function(n,a){var s;s=e.globals.series[o][a],i=e.config.dataLabels.formatter(s,{ctx:t.dCtx.ctx,seriesIndex:o,dataPointIndex:a,w:e}),r.push(i)}))}));var i=f.getLargestStringFromArr(r),n=new Pc(this.dCtx.ctx),o=e.config.dataLabels.style,a=n.getTextRects(i,parseInt(o.fontSize),o.fontFamily);return{width:1.05*a.width,height:a.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var r=t;if(this.w.globals.isMultiLineX){var i=e.map((function(t,e){return Array.isArray(t)?t.length:1})),n=Math.max.apply(Math,function(t){return function(t){if(Array.isArray(t))return Pf(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Pf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pf(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(i));r=e[i.indexOf(n)]}return r}}],r&&Cf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ef(t){return Ef="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ef(t)}function Mf(t,e){for(var r=0;r0){var i=this.getxAxisTimeScaleLabelsCoords();t={width:i.width,height:i.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var n=e.globals.xLabelFormatter,o=f.getLargestStringFromArr(r),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,r);e.globals.isBarHorizontal&&(a=o=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var s=new Jc(this.dCtx.ctx),l=o;o=s.xLabelFormat(n,o,l,{i:void 0,dateFormatter:new Vc(this.dCtx.ctx).formatDate,w:e}),a=s.xLabelFormat(n,a,l,{i:void 0,dateFormatter:new Vc(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===o||""===String(o).trim())&&(a=o="1");var c=new Pc(this.dCtx.ctx),u=c.getTextRects(o,e.config.xaxis.labels.style.fontSize),h=u;if(o!==a&&(h=c.getTextRects(a,e.config.xaxis.labels.style.fontSize)),(t={width:u.width>=h.width?u.width:h.width,height:u.height>=h.height?u.height:h.height}).width*r.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var d=function(t){return c.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};u=d(o),o!==a&&(h=d(a)),t.height=(u.height>h.height?u.height:h.height)/1.5,t.width=u.width>h.width?u.width:h.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var r,i=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,n=e.globals.groups.map((function(t){return t.title})),o=f.getLargestStringFromArr(n),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,n),s=new Pc(this.dCtx.ctx),l=s.getTextRects(o,i),c=l;return o!==a&&(c=s.getTextRects(a,i)),r={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},e.config.xaxis.labels.show||(r={width:0,height:0}),{width:r.width,height:r.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,r=0;if(void 0!==t.config.xaxis.title.text){var i=new Pc(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=i.width,r=i.height}return{width:e,height:r}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var r=this.dCtx.timescaleLabels.map((function(t){return t.value})),i=r.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Pc(this.dCtx.ctx).getTextRects(i,e.config.xaxis.labels.style.fontSize)).width*r.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,r=this.w,i=r.globals,n=r.config,o=n.xaxis.type,a=t.width;i.skipLastTimelinelabel=!1,i.skipFirstTimelinelabel=!1;var s=r.config.yaxis[0].opposite&&r.globals.isBarHorizontal;n.yaxis.forEach((function(t,l){s?(e.dCtx.gridPad.left1&&function(t){return-1!==i.collapsedSeriesIndices.indexOf(t)}(s)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var s=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+a/1.75-e.dCtx.yAxisWidthRight,c=s.position-a/1.75+e.dCtx.yAxisWidthLeft,u="right"===r.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>i.svgWidth-i.translateX-u&&(i.skipLastTimelinelabel=!0),c<-(t.show&&!t.floating||"bar"!==n.chart.type&&"candlestick"!==n.chart.type&&"rangeBar"!==n.chart.type&&"boxPlot"!==n.chart.type?10:a/1.75)&&(i.skipFirstTimelinelabel=!0)}else"datetime"===o?e.dCtx.gridPad.right(null===(i=String(u(e,s)))||void 0===i?void 0:i.length)?t:e}),h),p=d=u(d,s);if(void 0!==d&&0!==d.length||(d=l.niceMax),e.globals.isBarHorizontal){i=0;var g=e.globals.labels.slice();d=f.getLargestStringFromArr(g),d=u(d,{seriesIndex:a,dataPointIndex:-1,w:e}),p=t.dCtx.dimHelpers.getLargestStringFromMultiArr(d,g)}var b=new Pc(t.dCtx.ctx),y="rotate(".concat(o.labels.rotate," 0 0)"),v=b.getTextRects(d,o.labels.style.fontSize,o.labels.style.fontFamily,y,!1),m=v;d!==p&&(m=b.getTextRects(p,o.labels.style.fontSize,o.labels.style.fontFamily,y,!1)),r.push({width:(c>m.width||c>v.width?c:m.width>v.width?m.width:v.width)+i,height:m.height>v.height?m.height:v.height})}else r.push({width:0,height:0})})),r}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,r=[];return e.config.yaxis.map((function(e,i){if(e.show&&void 0!==e.title.text){var n=new Pc(t.dCtx.ctx),o="rotate(".concat(e.title.rotate," 0 0)"),a=n.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,o,!1);r.push({width:a.width,height:a.height})}else r.push({width:0,height:0})})),r}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,r=0,i=0,n=t.globals.yAxisScale.length>1?10:0,o=new eu(this.dCtx.ctx),a=function(a,s){var l=t.config.yaxis[s].floating,c=0;a.width>0&&!l?(c=a.width+n,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(s)&&(c=c-a.width-n)):c=l||o.isYAxisHidden(s)?0:5,t.config.yaxis[s].opposite?i+=c:r+=c,e+=c};return t.globals.yLabelsCoords.map((function(t,e){a(t,e)})),t.globals.yTitleCoords.map((function(t,e){a(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=r,this.dCtx.yAxisWidthRight=i,e}}],r&&Rf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Df(t){return Df="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Df(t)}function Yf(t,e){for(var r=0;r0&&(s=i.comboBarCount),i.collapsedSeries.forEach((function(t){n(t.type)&&(s-=1)})),r.chart.stacked&&(s=1);var l=n(o)||i.comboBarCount>0,c=Math.abs(i.initialMaxX-i.initialMinX);if(l&&i.isXNumeric&&!i.isBarHorizontal&&s>0&&0!==c){c<=3&&(c=i.dataPoints);var u=c/t,h=i.minXDiff&&i.minXDiff/u>0?i.minXDiff/u:0;h>t/2&&(h/=2),(a=h*parseInt(r.plotOptions.bar.columnWidth,10)/100)<1&&(a=1),i.barPadForNumericAxis=a}return a}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,r=e.globals,i=this.dCtx.isSparkline||!r.axisCharts?0:10;["title","subtitle"].forEach((function(n){void 0!==e.config[n].text?i+=e.config[n].margin:i+=t.dCtx.isSparkline||!r.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||r.axisCharts||(i+=10);var n=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),o=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");r.gridHeight-=n.height+o.height+i,r.translateY+=n.height+o.height+i}},{key:"setGridXPosForDualYAxis",value:function(t,e){var r=this.w,i=new eu(this.dCtx.ctx);r.config.yaxis.forEach((function(n,o){-1!==r.globals.ignoreYAxisIndexes.indexOf(o)||n.floating||i.isYAxisHidden(o)||(n.opposite&&(r.globals.translateX-=e[o].width+t[o].width+parseInt(n.labels.style.fontSize,10)/1.2+12),r.globals.translateX<2&&(r.globals.translateX=2))}))}}],r&&Yf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Bf(t){return Bf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bf(t)}function Nf(t,e){if(t){if("string"==typeof t)return Wf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Wf(t,e):void 0}}function Wf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var r=function(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(t,e)||Nf(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),i=r[0],n=r[1];t.gridPad[i]=Math.max(n,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(i/2,this.gridPad.top),this.gridPad.bottom=Math.max(i/2,this.gridPad.bottom)),r.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),r.gridHeight=r.gridHeight-this.gridPad.top-this.gridPad.bottom,r.gridWidth=r.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var n=this.dimGrid.gridPadForColumnsInNumericAxis(r.gridWidth);r.gridWidth=r.gridWidth-2*n,r.translateX=r.translateX+this.gridPad.left+this.xPadLeft+(n>0?n:0),r.translateY=r.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,r=e.globals,i=this.dimYAxis.getyAxisLabelsCoords(),n=this.dimYAxis.getyAxisTitleCoords();r.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,r){e.globals.yLabelsCoords.push({width:i[r].width,index:r}),e.globals.yTitleCoords.push({width:n[r].width,index:r})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var o=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),s=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(o,s,a),r.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,r.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(r.rotateXLabels=!1,r.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),r.translateXAxisY=r.translateXAxisY+e.config.xaxis.labels.offsetY,r.translateXAxisX=r.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,c=this.xAxisHeight;r.xAxisLabelsHeight=this.xAxisHeight-s.height,r.xAxisGroupLabelsHeight=r.xAxisLabelsHeight-o.height,r.xAxisLabelsWidth=this.xAxisWidth,r.xAxisHeight=this.xAxisHeight;var u=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,c=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,c=0,u=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(o);var h=function(){r.translateX=l+t.datalabelsCoords.width,r.gridHeight=r.svgHeight-t.lgRect.height-c-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),r.gridWidth=r.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(u=r.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":r.translateY=u,h();break;case"top":r.translateY=this.lgRect.height+u,h();break;case"left":r.translateY=u,r.translateX=this.lgRect.width+l+this.datalabelsCoords.width,r.gridHeight=r.svgHeight-c-12,r.gridWidth=r.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":r.translateY=u,r.translateX=l+this.datalabelsCoords.width,r.gridHeight=r.svgHeight-c-12,r.gridWidth=r.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(n,i),new qh(this.ctx).setYAxisXPosition(i,n)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,r=t.config,i=0;t.config.legend.show&&!t.config.legend.floating&&(i=20);var n="pie"===r.chart.type||"polarArea"===r.chart.type||"donut"===r.chart.type?"pie":"radialBar",o=r.plotOptions[n].offsetY,a=r.plotOptions[n].offsetX;if(!r.legend.show||r.legend.floating){e.gridHeight=e.svgHeight;var s=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(s,e.gridHeight),e.translateY=o,void(e.translateX=a+(e.svgWidth-e.gridWidth)/2)}switch(r.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=o-10,e.translateX=a+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+o+10,e.translateX=a+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-i,e.gridHeight="auto"!==r.chart.height?e.svgHeight:e.gridWidth,e.translateY=o,e.translateX=a+this.lgRect.width+i;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-i-5,e.gridHeight="auto"!==r.chart.height?e.svgHeight:e.gridWidth,e.translateY=o,e.translateX=a+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,r){var i=this.w,n=i.globals.hasXaxisGroups?2:1,o=r.height+t.height+e.height,a=i.globals.isMultiLineX?1.2:i.globals.LINE_HEIGHT_RATIO,s=i.globals.rotateXLabels?22:10,l=i.globals.rotateXLabels&&"bottom"===i.config.legend.position?10:0;this.xAxisHeight=o*a+n*s+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeightu&&(this.yAxisWidth=u)}}],r&&Gf(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function qf(t){return qf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qf(t)}function Zf(t,e){for(var r=0;r0){for(var o=0;o1;if(this.legendHelpers.appendToForeignObject(),(i||!e.axisCharts)&&r.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===r.legend.position||"top"===r.legend.position?this.legendAlignHorizontal():"right"!==r.legend.position&&"left"!==r.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,r=t.fillcolor,i=this.w,n=document.createElement("span");n.classList.add("apexcharts-legend-marker");var o=i.config.legend.markers.shape||i.config.markers.shape,a=o;Array.isArray(o)&&(a=o[e]);var s=Array.isArray(i.config.legend.markers.size)?parseFloat(i.config.legend.markers.size[e]):parseFloat(i.config.legend.markers.size),l=Array.isArray(i.config.legend.markers.offsetX)?parseFloat(i.config.legend.markers.offsetX[e]):parseFloat(i.config.legend.markers.offsetX),c=Array.isArray(i.config.legend.markers.offsetY)?parseFloat(i.config.legend.markers.offsetY[e]):parseFloat(i.config.legend.markers.offsetY),u=Array.isArray(i.config.legend.markers.strokeWidth)?parseFloat(i.config.legend.markers.strokeWidth[e]):parseFloat(i.config.legend.markers.strokeWidth),h=n.style;if(h.height=2*(s+u)+"px",h.width=2*(s+u)+"px",h.left=l+"px",h.top=c+"px",i.config.legend.markers.customHTML)h.background="transparent",h.color=r[e],Array.isArray(i.config.legend.markers.customHTML)?i.config.legend.markers.customHTML[e]&&(n.innerHTML=i.config.legend.markers.customHTML[e]()):n.innerHTML=i.config.legend.markers.customHTML();else{var f=new Ku(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(a),seriesIndex:e,strokeWidth:u,size:s}),d=window.SVG().addTo(n).size("100%","100%"),p=new Pc(this.ctx).drawMarker(0,0,td(td({},f),{},{pointFillColor:Array.isArray(r)?r[e]:f.pointFillColor,shape:a}));i.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),d.add(p)}return n}},{key:"drawLegends",value:function(){var t=this,e=this.w,r=e.config.legend.fontFamily,i=e.globals.seriesNames,n=e.config.legend.markers.fillColors?e.config.legend.markers.fillColors.slice():e.globals.colors.slice();if("heatmap"===e.config.chart.type){var o=e.config.plotOptions.heatmap.colorScale.ranges;i=o.map((function(t){return t.name?t.name:t.from+" - "+t.to})),n=o.map((function(t){return t.color}))}else this.isBarsDistributed&&(i=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(i=e.config.legend.customLegendItems);for(var a=e.globals.legendFormatter,s=e.config.legend.inverseOrder,l=s?i.length-1:0;s?l>=0:l<=i.length-1;s?l--:l++){var c,u=a(i[l],{seriesIndex:l,w:e}),h=!1,d=!1;if(e.globals.collapsedSeries.length>0)for(var p=0;p0)for(var g=0;g0?l-10:0)+(c>0?c-10:0)}i.style.position="absolute",o=o+t+r.config.legend.offsetX,a=a+e+r.config.legend.offsetY,i.style.left=o+"px",i.style.top=a+"px","right"===r.config.legend.position&&(i.style.left="auto",i.style.right=25+r.config.legend.offsetX+"px"),["width","height"].forEach((function(t){i.style[t]&&(i.style[t]=parseInt(r.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new Uf(this.ctx),r=e.dimHelpers.getTitleSubtitleCoords("title"),i=e.dimHelpers.getTitleSubtitleCoords("subtitle"),n=0;"top"===t.config.legend.position&&(n=r.height+i.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,n)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),r=0;"left"===t.config.legend.position&&(r=20),"right"===t.config.legend.position&&(r=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(r,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,r=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(r){var i=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,i,this.w]),new fh(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&r&&new fh(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var r=parseInt(t.target.getAttribute("rel"),10)-1,i="true"===t.target.getAttribute("data:collapsed"),n=this.w.config.chart.events.legendClick;"function"==typeof n&&n(this.ctx,r,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,r,this.w]);var o=this.w.config.legend.markers.onClick;"function"==typeof o&&t.target.classList.contains("apexcharts-legend-marker")&&(o(this.ctx,r,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,r,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(r,i)}}}],r&&rd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const od=nd;var ad=r(75),sd=r.n(ad),ld=r(541),cd=r.n(ld),ud=r(955),hd=r.n(ud),fd=r(646),dd=r.n(fd),pd=r(606),gd=r.n(pd),bd=r(802),yd=r.n(bd),vd=r(627),md=r.n(vd);function xd(t){return xd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xd(t)}function wd(t,e){for(var r=0;rthis.wheelDelay&&(this.executeMouseWheelZoom(t),r.globals.lastWheelExecution=i),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){i-r.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),r.globals.lastWheelExecution=i)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,r=this.w;this.minX=r.globals.isRangeBar?r.globals.minY:r.globals.minX,this.maxX=r.globals.isRangeBar?r.globals.maxY:r.globals.maxX;var i=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(i){var n,o,a,s=(t.clientX-i.left)/i.width,l=this.minX,c=this.maxX,u=c-l;if(t.deltaY<0){var h=l+s*u;o=h-(n=.5*u)/2,a=h+n/2}else o=l-(n=1.5*u)/2,a=c+n/2;if(!r.globals.isRangeBar){o=Math.max(o,r.globals.initialMinX),a=Math.min(a,r.globals.initialMaxX);var f=.01*(r.globals.initialMaxX-r.globals.initialMinX);if(a-o0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,r,i,n){return"l"===n||"r"===n?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resizing",this.selectionDragging.bind(this,"resizing")))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(Pd(Pd({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var r=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,i=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-r;t.globals.isRangeBar&&(r=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,i=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var n={x:r,y:0,width:i,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(n),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,r=t.y,i=t.width,n=t.height,o=t.translateX,a=void 0===o?0:o,s=t.translateY,l=void 0===s?0:s,c=this.w,u=this.zoomRect,h=this.selectionRect;if(this.dragged||null!==c.globals.selection){var f={transform:"translate("+a+", "+l+")"};c.globals.zoomEnabled&&this.dragged&&(i<0&&(i=1),u.attr({x:e,y:r,width:i,height:n,fill:c.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":c.config.chart.zoom.zoomedArea.fill.opacity,stroke:c.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":c.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":c.config.chart.zoom.zoomedArea.stroke.opacity}),Pc.setAttrs(u.node,f)),c.globals.selectionEnabled&&(h.attr({x:e,y:r,width:i>0?i:0,height:n>0?n:0,fill:c.config.chart.selection.fill.color,"fill-opacity":c.config.chart.selection.fill.opacity,stroke:c.config.chart.selection.stroke.color,"stroke-width":c.config.chart.selection.stroke.width,"stroke-dasharray":c.config.chart.selection.stroke.dashArray,"stroke-opacity":c.config.chart.selection.stroke.opacity}),Pc.setAttrs(h.node,f))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,r=t.zoomtype,i=this.w,n=e,o=this.gridRect.getBoundingClientRect(),a=n.startX-1,s=n.startY,l=!1,c=!1,u=n.clientX-o.left-a,h=n.clientY-o.top-s,f={translateX:i.globals.translateX,translateY:i.globals.translateY};return Math.abs(u+a)>i.globals.gridWidth?u=i.globals.gridWidth-a:n.clientX-o.left<0&&(u=a),a>n.clientX-o.left&&(l=!0,u=Math.abs(u)),s>n.clientY-o.top&&(c=!0,h=Math.abs(h)),f=Pd(Pd({},f="x"===r?{x:l?a-u:a,y:0,width:u,height:i.globals.gridHeight}:"y"===r?{x:0,y:c?s-h:s,width:i.globals.gridWidth,height:h}:{x:l?a-u:a,y:c?s-h:s,width:u,height:h}),{},{translateX:i.globals.translateX,translateY:i.globals.translateY}),n.drawSelectionRect(f),n.selectionDragging("resizing"),f}},{key:"selectionDragging",value:function(t,e){var r=this,i=this.w;if(e){e.preventDefault();var n=e.detail,o=n.handler,a=n.box,s=a.x,l=a.y;sthis.constraints.x2&&(s=this.constraints.x2-a.w),a.y2>this.constraints.y2&&(l=this.constraints.y2-a.h),o.move(s,l);var c=this.xyRatios,u=this.selectionRect,h=0;"resizing"===t&&(h=30);var f=function(t){return parseFloat(u.node.getAttribute(t))},d={x:f("x"),y:f("y"),width:f("width"),height:f("height")};i.globals.selection=d,"function"==typeof i.config.chart.events.selection&&i.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,n,o,a=r.gridRect.getBoundingClientRect(),s=u.node.getBoundingClientRect();i.globals.isRangeBar?(t=i.globals.yAxisScale[0].niceMin+(s.left-a.left)*c.invertedYRatio,e=i.globals.yAxisScale[0].niceMin+(s.right-a.left)*c.invertedYRatio,n=0,o=1):(t=i.globals.xAxisScale.niceMin+(s.left-a.left)*c.xRatio,e=i.globals.xAxisScale.niceMin+(s.right-a.left)*c.xRatio,n=i.globals.yAxisScale[0].niceMin+(a.bottom-s.bottom)*c.yRatio[0],o=i.globals.yAxisScale[0].niceMax-(s.top-a.top)*c.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:n,max:o}};i.config.chart.events.selection(r.ctx,l),i.config.chart.brush.enabled&&void 0!==i.config.chart.events.brushScrolled&&i.config.chart.events.brushScrolled(r.ctx,l)}),h))}}},{key:"selectionDrawn",value:function(t){var e=t.context,r=t.zoomtype,i=this.w,n=e,o=this.xyRatios,a=this.ctx.toolbar;if(n.startX>n.endX){var s=n.startX;n.startX=n.endX,n.endX=s}if(n.startY>n.endY){var l=n.startY;n.startY=n.endY,n.endY=l}var c=void 0,u=void 0;i.globals.isRangeBar?(c=i.globals.yAxisScale[0].niceMin+n.startX*o.invertedYRatio,u=i.globals.yAxisScale[0].niceMin+n.endX*o.invertedYRatio):(c=i.globals.xAxisScale.niceMin+n.startX*o.xRatio,u=i.globals.xAxisScale.niceMin+n.endX*o.xRatio);var h=[],d=[];if(i.config.yaxis.forEach((function(t,e){var r=i.globals.seriesYAxisMap[e][0];h.push(i.globals.yAxisScale[e].niceMax-o.yRatio[r]*n.startY),d.push(i.globals.yAxisScale[e].niceMax-o.yRatio[r]*n.endY)})),n.dragged&&(n.dragX>10||n.dragY>10)&&c!==u)if(i.globals.zoomEnabled){var p=f.clone(i.globals.initialConfig.yaxis),g=f.clone(i.globals.initialConfig.xaxis);if(i.globals.zoomed=!0,i.config.xaxis.convertedCatToNumeric&&(c=Math.floor(c),u=Math.floor(u),c<1&&(c=1,u=i.globals.dataPoints),u-c<2&&(u=c+1)),"xy"!==r&&"x"!==r||(g={min:c,max:u}),"xy"!==r&&"y"!==r||p.forEach((function(t,e){p[e].min=d[e],p[e].max=h[e]})),a){var b=a.getBeforeZoomRange(g,p);b&&(g=b.xaxis?b.xaxis:g,p=b.yaxis?b.yaxis:p)}var y={xaxis:g};i.config.chart.group||(y.yaxis=p),n.ctx.updateHelpers._updateOptions(y,!1,n.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof i.config.chart.events.zoomed&&a.zoomCallback(g,p)}else if(i.globals.selectionEnabled){var v,m=null;v={min:c,max:u},"xy"!==r&&"y"!==r||(m=f.clone(i.config.yaxis)).forEach((function(t,e){m[e].min=d[e],m[e].max=h[e]})),i.globals.selection=n.selection,"function"==typeof i.config.chart.events.selection&&i.config.chart.events.selection(n.ctx,{xaxis:v,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,r=this.w,i=e;if(void 0!==r.globals.lastClientPosition.x){var n=r.globals.lastClientPosition.x-i.clientX,o=r.globals.lastClientPosition.y-i.clientY;Math.abs(n)>Math.abs(o)&&n>0?this.moveDirection="left":Math.abs(n)>Math.abs(o)&&n<0?this.moveDirection="right":Math.abs(o)>Math.abs(n)&&o>0?this.moveDirection="up":Math.abs(o)>Math.abs(n)&&o<0&&(this.moveDirection="down")}r.globals.lastClientPosition={x:i.clientX,y:i.clientY};var a=r.globals.isRangeBar?r.globals.minY:r.globals.minX,s=r.globals.isRangeBar?r.globals.maxY:r.globals.maxX;r.config.xaxis.convertedCatToNumeric||i.panScrolled(a,s)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,r=t.globals.maxX,i=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+i,r=t.globals.maxX+i):"right"===this.moveDirection&&(e=t.globals.minX-i,r=t.globals.maxX-i),e=Math.floor(e),r=Math.floor(r),this.updateScrolledChart({xaxis:{min:e,max:r}},e,r)}},{key:"panScrolled",value:function(t,e){var r=this.w,i=this.xyRatios,n=f.clone(r.globals.initialConfig.yaxis),o=i.xRatio,a=r.globals.minX,s=r.globals.maxX;r.globals.isRangeBar&&(o=i.invertedYRatio,a=r.globals.minY,s=r.globals.maxY),"left"===this.moveDirection?(t=a+r.globals.gridWidth/15*o,e=s+r.globals.gridWidth/15*o):"right"===this.moveDirection&&(t=a-r.globals.gridWidth/15*o,e=s-r.globals.gridWidth/15*o),r.globals.isRangeBar||(tr.globals.initialMaxX)&&(t=a,e=s);var l={xaxis:{min:t,max:e}};r.config.chart.group||(l.yaxis=n),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,r){var i=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof i.config.chart.events.scrolled&&i.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:r}})}}],r&&jd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(kd);function Rd(t){return Rd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rd(t)}function zd(t){return function(t){if(Array.isArray(t))return Xd(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Xd(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xd(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Xd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);rs||p>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):o.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):o.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var g=Math.round(d/c),b=Math.floor(p/u);h&&!o.config.xaxis.convertedCatToNumeric&&(g=Math.ceil(d/c),g-=1);var y=null,v=null,m=o.globals.seriesXvalues.map((function(t){return t.filter((function(t){return f.isNumber(t)}))})),x=o.globals.seriesYvalues.map((function(t){return t.filter((function(t){return f.isNumber(t)}))}));if(o.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),S=d*(w.width/s),k=p*(w.height/l);y=(v=this.closestInMultiArray(S,k,m,x)).index,g=v.j,null!==y&&(m=o.globals.seriesXvalues[y],g=(v=this.closestInArray(S,m)).index)}return o.globals.capturedSeriesIndex=null===y?-1:y,(!g||g<1)&&(g=0),o.globals.isBarHorizontal?o.globals.capturedDataPointIndex=b:o.globals.capturedDataPointIndex=g,{capturedSeries:y,j:o.globals.isBarHorizontal?b:g,hoverX:d,hoverY:p}}},{key:"closestInMultiArray",value:function(t,e,r,i){var n=this.w,o=0,a=null,s=-1;n.globals.series.length>1?o=this.getFirstActiveXArray(r):a=0;var l=r[o][0],c=Math.abs(t-l);if(r.forEach((function(e){e.forEach((function(e,r){var i=Math.abs(t-e);i<=c&&(c=i,s=r)}))})),-1!==s){var u=i[o][s],h=Math.abs(e-u);a=o,i.forEach((function(t,r){var i=Math.abs(e-t[s]);i<=h&&(h=i,a=r)}))}return{index:a,j:s}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,r=0,i=t.map((function(t,e){return t.length>0?e:-1})),n=0;n0)for(var i=0;i *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=zd(t)).sort((function(t,e){var r=Number(t.getAttribute("data:realIndex")),i=Number(e.getAttribute("data:realIndex"));return ir?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var r=Number(t.getAttribute("cx")),i=Number(t.getAttribute("cy")),n=t.getAttribute("shape");return new Pc(this.ctx).getMarkerPath(r,i,n,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,r=e.config.markers.hover.size;return void 0===r&&(r=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),r}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,r=this.ttCtx;0===r.allTooltipSeriesGroups.length&&(r.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var i=r.allTooltipSeriesGroups,n=0;n ').concat(r.attrs.name,""),e+="
".concat(r.val,"
")})),v.innerHTML=t+"",m.innerHTML=e+""};a?l.globals.seriesGoals[e][r]&&Array.isArray(l.globals.seriesGoals[e][r])?x():(v.innerHTML="",m.innerHTML=""):x()}else v.innerHTML="",m.innerHTML="";if(null!==p&&(i[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,i[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:""),a&&g[0]){if(l.config.tooltip.hideEmptySeries){var w=i[e].querySelector(".apexcharts-tooltip-marker"),S=i[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(u)?(w.style.display="none",S.style.display="none"):(w.style.display="block",S.style.display="block")}null==u||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&-1===c.tConfig.enabledOnSeries.indexOf(e)?g[0].parentNode.style.display="none":g[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&-1===c.tConfig.enabledOnSeries.indexOf(e)&&(g[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var r=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));i&&(i.classList.add("apexcharts-active"),i.style.display=r.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,r=t.j,i=this.w,n=this.ctx.series.filteredSeriesX(),o="",a="",s=null,l=null,c={series:i.globals.series,seriesIndex:e,dataPointIndex:r,w:i},u=i.globals.ttZFormatter;null===r?l=i.globals.series[e]:i.globals.isXNumeric&&"treemap"!==i.config.chart.type?(o=n[e][r],0===n[e].length&&(o=n[this.tooltipUtil.getFirstActiveXArray(n)][r])):o=new yh(this.ctx).isFormatXY()?void 0!==i.config.series[e].data[r]?i.config.series[e].data[r].x:"":void 0!==i.globals.labels[r]?i.globals.labels[r]:"";var h=o;return o=i.globals.isXNumeric&&"datetime"===i.config.xaxis.type?new Jc(this.ctx).xLabelFormat(i.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new Vc(this.ctx).formatDate,w:this.w}):i.globals.isBarHorizontal?i.globals.yLabelFormatters[0](h,c):i.globals.xLabelFormatter(h,c),void 0!==i.config.tooltip.x.formatter&&(o=i.globals.ttKeyFormatter(h,c)),i.globals.seriesZ.length>0&&i.globals.seriesZ[e].length>0&&(s=u(i.globals.seriesZ[e][r],i)),a="function"==typeof i.config.xaxis.tooltip.formatter?i.globals.xaxisTooltipFormatter(h,c):o,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(o)?o.join(" "):o,xAxisTTVal:Array.isArray(a)?a.join(" "):a,zVal:s}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,r=t.j,i=t.y1,n=t.y2,o=t.w,a=this.ttCtx.getElTooltip(),s=o.config.tooltip.custom;Array.isArray(s)&&s[e]&&(s=s[e]),a.innerHTML=s({ctx:this.ctx,series:o.globals.series,seriesIndex:e,dataPointIndex:r,y1:i,y2:n,w:o})}}],r&&Gd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function qd(t){return qd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qd(t)}function Zd(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:null,r=this.ttCtx,i=this.w,n=r.getElXCrosshairs(),o=t-r.xcrosshairsWidth/2,a=i.globals.labels.slice().length;if(null!==e&&(o=i.globals.gridWidth/a*e),null===n||i.globals.isBarHorizontal||(n.setAttribute("x",o),n.setAttribute("x1",o),n.setAttribute("x2",o),n.setAttribute("y2",i.globals.gridHeight),n.classList.add("apexcharts-active")),o<0&&(o=0),o>i.globals.gridWidth&&(o=i.globals.gridWidth),r.isXAxisTooltipEnabled){var s=o;"tickWidth"!==i.config.xaxis.crosshairs.width&&"barWidth"!==i.config.xaxis.crosshairs.width||(s=o+r.xcrosshairsWidth/2),this.moveXAxisTooltip(s)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Pc.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Pc.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,r=this.ttCtx;if(null!==r.xaxisTooltip&&0!==r.xcrosshairsWidth){r.xaxisTooltip.classList.add("apexcharts-active");var i,n=r.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;t-=r.xaxisTooltip.getBoundingClientRect().width/2,isNaN(t)||(t+=e.globals.translateX,i=new Pc(this.ctx).getTextRects(r.xaxisTooltipText.innerHTML),r.xaxisTooltipText.style.minWidth=i.width+"px",r.xaxisTooltip.style.left=t+"px",r.xaxisTooltip.style.top=n+"px")}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,r=this.ttCtx;null===r.yaxisTTEls&&(r.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var i=parseInt(r.ycrosshairsHidden.getAttribute("y1"),10),n=e.globals.translateY+i,o=r.yaxisTTEls[t].getBoundingClientRect().height,a=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(a-=26),n-=o/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(r.yaxisTTEls[t].classList.add("apexcharts-active"),r.yaxisTTEls[t].style.top=n+"px",r.yaxisTTEls[t].style.left=a+e.config.yaxis[t].tooltip.offsetX+"px"):r.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=this.w,n=this.ttCtx,o=n.getElTooltip(),a=n.tooltipRect,s=null!==r?parseFloat(r):1,l=parseFloat(t)+s+5,c=parseFloat(e)+s/2;if(l>i.globals.gridWidth/2&&(l=l-a.ttWidth-s-10),l>i.globals.gridWidth-a.ttWidth-10&&(l=i.globals.gridWidth-a.ttWidth),l<-20&&(l=-20),i.config.tooltip.followCursor){var u=n.getElGrid().getBoundingClientRect();(l=n.e.clientX-u.left)>i.globals.gridWidth/2&&(l-=n.tooltipRect.ttWidth),(c=n.e.clientY+i.globals.translateY-u.top)>i.globals.gridHeight/2&&(c-=n.tooltipRect.ttHeight)}else i.globals.isBarHorizontal||a.ttHeight/2+c>i.globals.gridHeight&&(c=i.globals.gridHeight-a.ttHeight+i.globals.translateY);isNaN(l)||(l+=i.globals.translateX,o.style.left=l+"px",o.style.top=c+"px")}},{key:"moveMarkers",value:function(t,e){var r=this.w,i=this.ttCtx;if(r.globals.markers.size[t]>0)for(var n=r.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),o=0;o0){var d=f.getAttribute("shape"),p=l.getMarkerPath(n,o,d,1.5*u);f.setAttribute("d",p)}this.moveXCrosshairs(n),s.fixedTooltip||this.moveTooltip(n,o,u)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,r=this.ttCtx,i=r.w,n=0,o=0,a=i.globals.pointsArray,s=new fh(this.ctx),l=new Pc(this.ctx);e=s.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var c=r.tooltipUtil.getHoverMarkerSize(e);a[e]&&(n=a[e][t][0],o=a[e][t][1]);var u=r.tooltipUtil.getAllMarkers();if(null!==u)for(var h=0;h0){var y=l.getMarkerPath(n,d,g,c);u[h].setAttribute("d",y)}else u[h].setAttribute("d","")}}this.moveXCrosshairs(n),r.fixedTooltip||this.moveTooltip(n,o||i.globals.gridHeight,c)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var r=this.w,i=this.ttCtx,n=r.globals.columnSeries?r.globals.columnSeries.length:r.globals.series.length,o=n>=2&&n%2==0?Math.floor(n/2):Math.floor(n/2)+1;r.globals.isBarHorizontal&&(o=new fh(this.ctx).getActiveConfigSeriesIndex("desc")+1);var a=r.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(o,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(o,"'] path[j='").concat(t,"']"));a||"number"!=typeof e||(a=r.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var s=a?parseFloat(a.getAttribute("cx")):0,l=a?parseFloat(a.getAttribute("cy")):0,c=a?parseFloat(a.getAttribute("barWidth")):0,u=i.getElGrid().getBoundingClientRect(),h=a&&(a.classList.contains("apexcharts-candlestick-area")||a.classList.contains("apexcharts-boxPlot-area"));r.globals.isXNumeric?(a&&!h&&(s-=n%2!=0?c/2:0),a&&h&&r.globals.comboCharts&&(s-=c/2)):r.globals.isBarHorizontal||(s=i.xAxisTicksPositions[t-1]+i.dataPointsDividedWidth/2,isNaN(s)&&(s=i.xAxisTicksPositions[t]-i.dataPointsDividedWidth/2)),r.globals.isBarHorizontal?l-=i.tooltipRect.ttHeight:r.config.tooltip.followCursor?l=i.e.clientY-u.top-i.tooltipRect.ttHeight/2:l+i.tooltipRect.ttHeight+15>r.globals.gridHeight&&(l=r.globals.gridHeight),r.globals.isBarHorizontal||this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,l||r.globals.gridHeight)}}],r&&Zd(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qd(t){return Qd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qd(t)}function Kd(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,n=this.w;"bubble"!==n.config.chart.type&&this.newPointSize(t,e);var o=e.getAttribute("cx"),a=e.getAttribute("cy");if(null!==r&&null!==i&&(o=r,a=i),this.tooltipPosition.moveXCrosshairs(o),!this.fixedTooltip){if("radar"===n.config.chart.type){var s=this.ttCtx.getElGrid().getBoundingClientRect();o=this.ttCtx.e.clientX-s.left}this.tooltipPosition.moveTooltip(o,a,n.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,r=this,i=this.ttCtx,n=t,o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),a=e.config.markers.hover.size,s=0;s0){var i=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],r);t[e].setAttribute("d",i)}else t[e].setAttribute("d","M0,0")}}}],r&&tp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ip(t){return ip="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ip(t)}function np(t,e){for(var r=0;rs.globals.gridWidth/2&&(i=u-a.tooltipRect.ttWidth/2+f),a.w.config.tooltip.followCursor){var p=s.globals.dom.elWrap.getBoundingClientRect();i=s.globals.clientX-p.left-(i>s.globals.gridWidth/2?a.tooltipRect.ttWidth:0),n=s.globals.clientY-p.top-(n>s.globals.gridHeight/2?a.tooltipRect.ttHeight:0)}}return{x:i,y:n}}},{key:"handleMarkerTooltip",value:function(t){var e,r,i=t.e,n=t.opt,o=t.x,a=t.y,s=this.w,l=this.ttCtx;if(i.target.classList.contains("apexcharts-marker")){var c=parseInt(n.paths.getAttribute("cx"),10),u=parseInt(n.paths.getAttribute("cy"),10),h=parseFloat(n.paths.getAttribute("val"));if(r=parseInt(n.paths.getAttribute("rel"),10),e=parseInt(n.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var d=f.findAncestor(n.paths,"apexcharts-series");d&&(e=parseInt(d.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:e,j:r,shared:!l.showOnIntersect&&s.config.tooltip.shared,e:i}),"mouseup"===i.type&&l.markerClick(i,e,r),s.globals.capturedSeriesIndex=e,s.globals.capturedDataPointIndex=r,o=c,a=u+s.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var p=l.getElGrid().getBoundingClientRect();a=l.e.clientY+s.globals.translateY-p.top}h<0&&(a=u),l.marker.enlargeCurrentPoint(r,n.paths,o,a)}return{x:o,y:a}}},{key:"handleBarTooltip",value:function(t){var e,r,i=t.e,n=t.opt,o=this.w,a=this.ttCtx,s=a.getElTooltip(),l=0,c=0,u=0,h=this.getBarTooltipXY({e:i,opt:n});if(null!==h.j||0!==h.barHeight||0!==h.barWidth){e=h.i;var f=h.j;if(o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=f,o.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||!o.config.tooltip.shared?(c=h.x,u=h.y,r=Array.isArray(o.config.stroke.width)?o.config.stroke.width[e]:o.config.stroke.width,l=c):o.globals.comboCharts||o.config.tooltip.shared||(l/=2),isNaN(u)&&(u=o.globals.svgHeight-a.tooltipRect.ttHeight),parseInt(n.paths.parentNode.getAttribute("data:realIndex"),10),c+a.tooltipRect.ttWidth>o.globals.gridWidth?c-=a.tooltipRect.ttWidth:c<0&&(c=0),a.w.config.tooltip.followCursor){var d=a.getElGrid().getBoundingClientRect();u=a.e.clientY-d.top}null===a.tooltip&&(a.tooltip=o.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),o.config.tooltip.shared||(o.globals.comboBarCount>0?a.tooltipPosition.moveXCrosshairs(l+r/2):a.tooltipPosition.moveXCrosshairs(l)),!a.fixedTooltip&&(!o.config.tooltip.shared||o.globals.isBarHorizontal&&a.tooltipUtil.hasBars())&&(u=u+o.globals.translateY-a.tooltipRect.ttHeight/2,s.style.left=c+o.globals.translateX+"px",s.style.top=u+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,r=t.e,i=t.opt,n=this.w,o=null,a=this.ttCtx,s=0,l=0,c=0,u=0,h=0,f=r.target.classList;if(f.contains("apexcharts-bar-area")||f.contains("apexcharts-candlestick-area")||f.contains("apexcharts-boxPlot-area")||f.contains("apexcharts-rangebar-area")){var d=r.target,p=d.getBoundingClientRect(),g=i.elGrid.getBoundingClientRect(),b=p.height;h=p.height;var y=p.width,v=parseInt(d.getAttribute("cx"),10),m=parseInt(d.getAttribute("cy"),10);u=parseFloat(d.getAttribute("barWidth"));var x="touchmove"===r.type?r.touches[0].clientX:r.clientX;o=parseInt(d.getAttribute("j"),10),s=parseInt(d.parentNode.getAttribute("rel"),10)-1;var w=d.getAttribute("data-range-y1"),S=d.getAttribute("data-range-y2");n.globals.comboCharts&&(s=parseInt(d.parentNode.getAttribute("data:realIndex"),10));var k=function(t){return n.globals.isXNumeric?v-y/2:e.isVerticalGroupedRangeBar?v+y/2:v-a.dataPointsDividedWidth+y/2},A=function(){return m-a.dataPointsDividedHeight+b/2-a.tooltipRect.ttHeight/2};a.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:s,j:o,y1:w?parseInt(w,10):null,y2:S?parseInt(S,10):null,shared:!a.showOnIntersect&&n.config.tooltip.shared,e:r}),n.config.tooltip.followCursor?n.globals.isBarHorizontal?(l=x-g.left+15,c=A()):(l=k(),c=r.clientY-g.top-a.tooltipRect.ttHeight/2-15):n.globals.isBarHorizontal?((l=v)0&&r.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,r){var i=this.ttCtx,n=this.w,o=n.globals,a=o.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&a.length>0){var s=o.yLabelFormatters[t],l=i.getElGrid().getBoundingClientRect(),c=a[0],u=0;r.yRatio.length>1&&(u=c);var h=(e-l.top)*r.yRatio[u],f=o.maxYArr[c]-o.minYArr[c],d=o.minYArr[c]+(f-h);n.config.yaxis[t].reversed&&(d=o.maxYArr[c]-(f-h)),i.tooltipPosition.moveYCrosshairs(e-l.top),i.yaxisTooltipText[t].innerHTML=s(d),i.tooltipPosition.moveYAxisTooltip(t)}}}],r&&cp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const fp=hp;function dp(t){return dp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dp(t)}function pp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function gp(t){for(var e=1;e0&&this.addPathsEventListeners(d,u),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(u)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),r=e.getBoundingClientRect(),i=r.width+10,n=r.height+10,o=this.tConfig.fixed.offsetX,a=this.tConfig.fixed.offsetY,s=this.tConfig.fixed.position.toLowerCase();return s.indexOf("right")>-1&&(o=o+t.globals.svgWidth-i+10),s.indexOf("bottom")>-1&&(a=a+t.globals.svgHeight-n-10),e.style.left=o+"px",e.style.top=a+"px",{x:o,y:a,ttWidth:i,ttHeight:n}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var r=this,i=function(i){var n={paths:t[i],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[i].addEventListener(e,r.onSeriesHover.bind(r,n),{capture:!1,passive:!0})}))},n=0;n=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){r.seriesHover(t,e)}),20-i))}},{key:"seriesHover",value:function(t,e){var r=this;this.lastHoverTime=Date.now();var i=[],n=this.w;n.config.chart.group&&(i=this.ctx.getGroupedCharts()),n.globals.axisCharts&&(n.globals.minX===-1/0&&n.globals.maxX===1/0||0===n.globals.dataPoints)||(i.length?i.forEach((function(i){var n=r.getElTooltip(i),o={paths:t.paths,tooltipEl:n,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:i.w.globals.tooltip.ttItems};i.w.globals.minX===r.w.globals.minX&&i.w.globals.maxX===r.w.globals.maxX&&i.w.globals.tooltip.seriesHoverByContext({chartCtx:i,ttCtx:i.w.globals.tooltip,opt:o,e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,r=t.ttCtx,i=t.opt,n=t.e,o=e.w,a=this.getElTooltip(e);a&&(r.tooltipRect={x:0,y:0,ttWidth:a.getBoundingClientRect().width,ttHeight:a.getBoundingClientRect().height},r.e=n,!r.tooltipUtil.hasBars()||o.globals.comboCharts||r.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new fh(e).toggleSeriesOnHover(n,n.target.parentNode),r.fixedTooltip&&r.drawFixedTooltipRect(),o.globals.axisCharts?r.axisChartsTooltips({e:n,opt:i,tooltipRect:r.tooltipRect}):r.nonAxisChartsTooltips({e:n,opt:i,tooltipRect:r.tooltipRect}))}},{key:"axisChartsTooltips",value:function(t){var e,r,i=t.e,n=t.opt,o=this.w,a=n.elGrid.getBoundingClientRect(),s="touchmove"===i.type?i.touches[0].clientX:i.clientX,l="touchmove"===i.type?i.touches[0].clientY:i.clientY;if(this.clientY=l,this.clientX=s,o.globals.capturedSeriesIndex=-1,o.globals.capturedDataPointIndex=-1,la.top+a.height)this.handleMouseOut(n);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!o.config.tooltip.shared){var c=parseInt(n.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(n)}var u=this.getElTooltip(),h=this.getElXCrosshairs(),f=[];o.config.chart.group&&(f=this.ctx.getSyncedCharts());var d=o.globals.xyCharts||"bar"===o.config.chart.type&&!o.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||o.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===i.type||"touchmove"===i.type||"mouseup"===i.type){if(o.globals.collapsedSeries.length+o.globals.ancillaryCollapsedSeries.length===o.globals.series.length)return;null!==h&&h.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),d&&!this.showOnIntersect||f.length>1)this.handleStickyTooltip(i,s,l,n);else if("heatmap"===o.config.chart.type||"treemap"===o.config.chart.type){var g=this.intersect.handleHeatTreeTooltip({e:i,opt:n,x:e,y:r,type:o.config.chart.type});e=g.x,r=g.y,u.style.left=e+"px",u.style.top=r+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:i,opt:n}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:i,opt:n,x:e,y:r});if(this.yaxisTooltips.length)for(var b=0;bl.width)this.handleMouseOut(i);else if(null!==s)this.handleStickyCapturedSeries(t,s,i,a);else if(this.tooltipUtil.isXoverlap(a)||n.globals.isBarHorizontal){var c=n.globals.series.findIndex((function(t,e){return!n.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,c,a,i.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,r,i){var n=this.w;if(this.tConfig.shared||null!==n.globals.series[e][i]){if(void 0!==n.globals.series[e][i])this.tConfig.shared&&this.tooltipUtil.isXoverlap(i)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,i,r.ttItems):this.create(t,this,e,i,r.ttItems,!1);else if(this.tooltipUtil.isXoverlap(i)){var o=n.globals.series.findIndex((function(t,e){return!n.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,o,i,r.ttItems)}}else this.handleMouseOut(r)}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Pc(this.ctx),r=t.globals.dom.Paper.find(".apexcharts-bar-area"),i=0;i5&&void 0!==arguments[5]?arguments[5]:null,S=this.w,k=e;"mouseup"===t.type&&this.markerClick(t,r,i),null===w&&(w=this.tConfig.shared);var A=this.tooltipUtil.hasMarkers(r),O=this.tooltipUtil.getElBars();if(S.config.legend.tooltipHoverFormatter){var P=S.config.legend.tooltipHoverFormatter,C=Array.from(this.legendLabels);C.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var j=0;j0?k.marker.enlargePoints(i):k.tooltipPosition.moveDynamicPointsOnHover(i);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(O),this.barSeriesHeight>0)){var _=new Pc(this.ctx),R=S.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(i,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(i,r);for(var z=0;z0&&i.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=c*S)),w&&(f=f+h.height/2-y/2-2);var A=i.globals.series[n][o]<0,O=s;switch(this.barCtx.isReversed&&(O=s+(A?u:-u)),g.position){case"center":d=w?A?O-u/2+m:O+u/2-m:A?O-u/2+h.height/2+m:O+u/2+h.height/2-m;break;case"bottom":d=w?A?O-u+m:O+u-m:A?O-u+h.height+y+m:O+u-h.height/2+y-m;break;case"top":d=w?A?O+m:O-m:A?O-h.height/2-m:O+h.height+m}if(this.barCtx.lastActiveBarSerieIndex===a&&b.enabled){var P=new Pc(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:o}),p.fontSize);e=A?O-P.height/2-m-b.offsetY+18:O+P.height+m+b.offsetY-18;var C=k;r=x+(i.globals.isXNumeric?-c*i.globals.barGroups.length/2:i.globals.barGroups.length*c/2-(i.globals.barGroups.length-1)*c-C)+b.offsetX}return i.config.chart.stacked||(d<0?d=0+y:d+h.height/3>i.globals.gridHeight&&(d=i.globals.gridHeight-y)),{bcx:l,bcy:s,dataLabelsX:f,dataLabelsY:d,totalDataLabelsX:r,totalDataLabelsY:e,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,r=t.x,i=t.i,n=t.j,o=t.realIndex,a=t.bcy,s=t.barHeight,l=t.barWidth,c=t.textRects,u=t.dataLabelsX,h=t.strokeWidth,f=t.dataLabelsConfig,d=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,g=t.offX,b=t.offY,y=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var v,m,x=a-(this.barCtx.isRangeBar?0:y)+s/2+c.height/2+b-3,w="start",S=e.globals.series[i][n]<0,k=r;switch(this.barCtx.isReversed&&(k=r+(S?-l:l),w=S?"start":"end"),d.position){case"center":u=S?k+l/2-g:Math.max(c.width/2,k-l/2)+g;break;case"bottom":u=S?k+l-h-g:k-l+h+g;break;case"top":u=S?k-h-g:k-h+g}if(this.barCtx.lastActiveBarSerieIndex===o&&p.enabled){var A=new Pc(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:n}),f.fontSize);S?(v=k-h-g-p.offsetX,w="end"):v=k+g+p.offsetX+(this.barCtx.isReversed?-(l+h):h),m=x-c.height/2+A.height/2+p.offsetY+h}return e.config.chart.stacked||("start"===f.textAnchor?u-c.width<0?u=S?c.width+h:h:u+c.width>e.globals.gridWidth&&(u=S?e.globals.gridWidth-h:e.globals.gridWidth-c.width-h):"middle"===f.textAnchor?u-c.width/2<0?u=c.width/2+h:u+c.width/2>e.globals.gridWidth&&(u=e.globals.gridWidth-c.width/2-h):"end"===f.textAnchor&&(u<1?u=c.width+h:u+1>e.globals.gridWidth&&(u=e.globals.gridWidth-c.width-h))),{bcx:r,bcy:a,dataLabelsX:u,dataLabelsY:x,totalDataLabelsX:v,totalDataLabelsY:m,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,r=t.y,i=t.val,n=t.i,o=t.j,a=t.textRects,s=t.barHeight,l=t.barWidth,c=t.dataLabelsConfig,u=this.w,h="rotate(0)";"vertical"===u.config.plotOptions.bar.dataLabels.orientation&&(h="rotate(-90, ".concat(e,", ").concat(r,")"));var f=new lh(this.barCtx.ctx),d=new Pc(this.barCtx.ctx),p=c.formatter,g=null,b=u.globals.collapsedSeriesIndices.indexOf(n)>-1;if(c.enabled&&!b){g=d.group({class:"apexcharts-data-labels",transform:h});var y="";void 0!==i&&(y=p(i,Sp(Sp({},u),{},{seriesIndex:n,dataPointIndex:o,w:u}))),!i&&u.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(y="");var v=u.globals.series[n][o]<0,m=u.config.plotOptions.bar.dataLabels.position;"vertical"===u.config.plotOptions.bar.dataLabels.orientation&&("top"===m&&(c.textAnchor=v?"end":"start"),"center"===m&&(c.textAnchor="middle"),"bottom"===m&&(c.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&lMath.abs(l)&&(y=""):a.height/1.6>Math.abs(s)&&(y=""));var x=Sp({},c);this.barCtx.isHorizontal&&i<0&&("start"===c.textAnchor?x.textAnchor="end":"end"===c.textAnchor&&(x.textAnchor="start")),f.plotDataLabelsText({x:e,y:r,text:y,i:n,j:o,parent:g,dataLabelsConfig:x,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return g}},{key:"drawTotalDataLabels",value:function(t){var e,r=t.x,i=t.y,n=t.val,o=t.realIndex,a=t.textAnchor,s=t.barTotalDataLabelsConfig,l=(this.w,new Pc(this.barCtx.ctx));return s.enabled&&void 0!==r&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===o&&(e=l.drawText({x:r,y:i,foreColor:s.style.color,text:n,textAnchor:a,fontFamily:s.style.fontFamily,fontSize:s.style.fontSize,fontWeight:s.style.fontWeight})),e}}],r&&Ap(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Cp(t){return Cp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cp(t)}function jp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Tp(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function Lp(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[r].length),e.globals.isXNumeric)for(var i=0;ie.globals.minX&&e.globals.seriesX[r][i]0&&(i=l.globals.minXDiff/h),(o=i/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(o=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(o=parseInt(this.barCtx.barOptions.columnWidth,10)),a=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+(i-o*this.barCtx.seriesLen)/2}return l.globals.barHeight=n,l.globals.barWidth=o,{x:t,y:e,yDivision:r,xDivision:i,barHeight:n,barWidth:o,zeroH:a,zeroW:s}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,r,i){var n,o,a,s,l=this.w,c=this.barCtx.ctx.fill,u=null,h=this.barCtx.barOptions.distributed?r:e;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(i){t[e][r]>=i.from&&t[e][r]<=i.to&&(u=i.color)})),c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?h:i,dataPointIndex:r,color:u,value:t[e][r],fillConfig:null===(n=l.config.series[e].data[r])||void 0===n?void 0:n.fill,fillType:null!==(o=l.config.series[e].data[r])&&void 0!==o&&null!==(a=o.fill)&&void 0!==a&&a.type?null===(s=l.config.series[e].data[r])||void 0===s?void 0:s.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[i]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,r){var i=0,n=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,n.config.stroke.show&&(this.barCtx.isNullValue||(i=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[r]:this.barCtx.strokeWidth)),i}},{key:"createBorderRadiusArr",value:function(t){var e,r=this.w,i=!this.w.config.chart.stacked||r.config.plotOptions.bar.borderRadius<=0,n=t.length,o=0|(null===(e=t[0])||void 0===e?void 0:e.length),a=Array.from({length:n},(function(){return Array(o).fill(i?"top":"none")}));if(i)return a;for(var s=0;s0?(l.push(h),u++):f<0&&(c.push(h),u++)}if(l.length>0&&0===c.length)if(1===l.length)a[l[0]][s]="both";else{var d,p=l[0],g=l[l.length-1],b=Mp(l);try{for(b.s();!(d=b.n()).done;){var y=d.value;a[y][s]=y===p?"bottom":y===g?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===l.length)if(1===c.length)a[c[0]][s]="both";else{var v,m=Math.max.apply(Math,c),x=Math.min.apply(Math,c),w=Mp(c);try{for(w.s();!(v=w.n()).done;){var S=v.value;a[S][s]=S===m?"bottom":S===x?"top":"none"}}catch(t){w.e(t)}finally{w.f()}}else if(l.length>0&&c.length>0){var k,A=l[l.length-1],O=Mp(l);try{for(O.s();!(k=O.n()).done;){var P=k.value;a[P][s]=P===A?"top":"none"}}catch(t){O.e(t)}finally{O.f()}var C,j=Math.max.apply(Math,c),T=Mp(c);try{for(T.s();!(C=T.n()).done;){var E=C.value;a[E][s]=E===j?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else 1===u&&(a[l[0]||c[0]][s]="both")}return a}},{key:"barBackground",value:function(t){var e=t.j,r=t.i,i=t.x1,n=t.x2,o=t.y1,a=t.y2,s=t.elSeries,l=this.w,c=new Pc(this.barCtx.ctx),u=new fh(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&u===r){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var h=this.barCtx.barOptions.colors.backgroundBarColors[e],f=c.drawRect(void 0!==i?i:0,void 0!==o?o:0,void 0!==n?n:l.globals.gridWidth,void 0!==a?a:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,h,this.barCtx.barOptions.colors.backgroundBarOpacity);s.add(f),f.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,r=t.barWidth,i=t.barXPosition,n=t.y1,o=t.y2,a=t.strokeWidth,s=t.isReversed,l=t.series,c=t.seriesGroup,u=t.realIndex,h=t.i,f=t.j,d=t.w,p=new Pc(this.barCtx.ctx);(a=Array.isArray(a)?a[u]:a)||(a=0);var g=r,b=i;null!==(e=d.config.series[u].data[f])&&void 0!==e&&e.columnWidthOffset&&(b=i-d.config.series[u].data[f].columnWidthOffset/2,g=r+d.config.series[u].data[f].columnWidthOffset);var y=a/2,v=b+y,m=b+g-y,x=(l[h][f]>=0?1:-1)*(s?-1:1);n+=.001-y*x,o+=.001+y*x;var w=p.move(v,n),S=p.move(v,n),k=p.line(m,n);if(d.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(u,f,!1)),w=w+p.line(v,o)+p.line(m,o)+k+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),S=S+p.line(v,n)+k+k+k+k+k+p.line(v,n)+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),"none"!==this.arrBorderRadius[u][f]&&(w=p.roundPathCorners(w,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[c]).yArrj.push(o-y*x),A.yArrjF.push(Math.abs(n-o+a*x)),A.yArrjVal.push(this.barCtx.series[h][f])}return{pathTo:w,pathFrom:S}}},{key:"getBarpaths",value:function(t){var e,r=t.barYPosition,i=t.barHeight,n=t.x1,o=t.x2,a=t.strokeWidth,s=t.isReversed,l=t.series,c=t.seriesGroup,u=t.realIndex,h=t.i,f=t.j,d=t.w,p=new Pc(this.barCtx.ctx);(a=Array.isArray(a)?a[u]:a)||(a=0);var g=r,b=i;null!==(e=d.config.series[u].data[f])&&void 0!==e&&e.barHeightOffset&&(g=r-d.config.series[u].data[f].barHeightOffset/2,b=i+d.config.series[u].data[f].barHeightOffset);var y=a/2,v=g+y,m=g+b-y,x=(l[h][f]>=0?1:-1)*(s?-1:1);n+=.001+y*x,o+=.001-y*x;var w=p.move(n,v),S=p.move(n,v);d.globals.previousPaths.length>0&&(S=this.barCtx.getPreviousPath(u,f,!1));var k=p.line(n,m);if(w=w+p.line(o,v)+p.line(o,m)+k+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),S=S+p.line(n,v)+k+k+k+k+k+p.line(n,v)+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[u][f]?" Z":" z"),"none"!==this.arrBorderRadius[u][f]&&(w=p.roundPathCorners(w,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){var A=this.barCtx;(A=this.barCtx[c]).xArrj.push(o+y*x),A.xArrjF.push(Math.abs(n-o-a*x)),A.xArrjVal.push(this.barCtx.series[h][f])}return{pathTo:w,pathFrom:S}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,r=this.w,i=0;i2&&void 0!==arguments[2]&&!arguments[2]?null:e;return null!=t&&(r=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),r}},{key:"getYForValue",value:function(t,e,r){var i=arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?null:e;return null!=t&&(i=e-t/this.barCtx.yRatio[r]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[r]:0)),i}},{key:"getGoalValues",value:function(t,e,r,i,n,o){var a=this,s=this.w,l=[],c=function(i,n){var s;l.push((Ep(s={},t,"x"===t?a.getXForValue(i,e,!1):a.getYForValue(i,r,o,!1)),Ep(s,"attrs",n),s))};if(s.globals.seriesGoals[i]&&s.globals.seriesGoals[i][n]&&Array.isArray(s.globals.seriesGoals[i][n])&&s.globals.seriesGoals[i][n].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&s.globals.seriesRange.length){var u=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:s.globals.colors,h={strokeHeight:"x"===t?0:s.globals.markers.size[i],strokeWidth:"x"===t?s.globals.markers.size[i]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(u[i])?u[i][0]:u[i]};c(s.globals.seriesRangeStart[i][n],h),c(s.globals.seriesRangeEnd[i][n],Tp(Tp({},h),{},{strokeColor:Array.isArray(u[i])?u[i][1]:u[i]}))}return l}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,r=t.barYPosition,i=t.goalX,n=t.goalY,o=t.barWidth,a=t.barHeight,s=new Pc(this.barCtx.ctx),l=s.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var c=null;return this.barCtx.isHorizontal?Array.isArray(i)&&i.forEach((function(t){if(t.x>=-1&&t.x<=s.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:a/2,i=r+e+a/2;c=s.drawLine(t.x,i-2*e,t.x,i,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(c)}})):Array.isArray(n)&&n.forEach((function(t){if(t.y>=-1&&t.y<=s.w.globals.gridHeight+1){var r=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:o/2,i=e+r+o/2;c=s.drawLine(i-2*r,t.y,i,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(c)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,r=t.currPaths,i=t.color,n=this.w,o=e.x,a=e.x1,s=e.barYPosition,l=r.x,c=r.x1,u=r.barYPosition,h=s+r.barHeight,d=new Pc(this.barCtx.ctx),p=new f,g=d.move(a,h)+d.line(o,h)+d.line(l,u)+d.line(c,u)+d.line(a,h)+("around"===n.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return d.drawPath({d:g,fill:p.shadeColor(.5,f.rgb2hex(i)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,r=t.i,i=t.j,n=this.w,o=0,a=0;return(n.config.plotOptions.bar.horizontal?n.globals.series.map((function(t,e){return e})):(null===(e=n.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=n.globals.seriesPercent[t][i];e&&o++,t-1})),i=this.barCtx.columnGroupIndices,n=i.indexOf(r);return n<0&&(i.push(r),n=i.length-1),{groupIndex:r,columnGroupIndex:n}}}],r&&Ip(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zp(t){return zp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zp(t)}function Xp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Dp(t){for(var e=1;ethis.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var a=0,s=0;a0&&(this.visibleI=this.visibleI+1);var x=0,w=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[y],this.translationsIndex=y);var S=this.translationsIndex;this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed;var k=this.barHelpers.initialPositions();p=k.y,x=k.barHeight,c=k.yDivision,h=k.zeroW,d=k.x,w=k.barWidth,l=k.xDivision,u=k.zeroH,this.isHorizontal||b.push(d+w/2);var A=i.group({class:"apexcharts-datalabels","data:realIndex":y});r.globals.delayedElements.push({el:A.node}),A.node.classList.add("apexcharts-element-hidden");var O=i.group({class:"apexcharts-bar-goals-markers"}),P=i.group({class:"apexcharts-bar-shadows"});r.globals.delayedElements.push({el:P.node}),P.node.classList.add("apexcharts-element-hidden");for(var C=0;C0){var L=this.barHelpers.drawBarShadow({color:"string"==typeof M&&-1===(null==M?void 0:M.indexOf("url"))?M:f.hexToRgba(r.globals.colors[a]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});P.add(L),r.config.chart.dropShadow.enabled&&new vc(this.ctx).dropShadow(L,r.config.chart.dropShadow,y)}this.pathArr.push(T);var I=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:x,barWidth:w});I&&O.add(I),p=T.y,d=T.x,C>0&&b.push(d+w/2),g.push(p),this.renderSeries({realIndex:y,pathFill:M,j:C,i:a,columnGroupIndex:v,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:j,elSeries:m,x:d,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:x),barWidth:Math.abs(T.barWidth?T.barWidth:w),elDataLabelsWrap:A,elGoalsMarkers:O,elBarShadows:P,visibleSeries:this.visibleI,type:"bar"})}r.globals.seriesXvalues[y]=b,r.globals.seriesYvalues[y]=g,o.add(m)}return o}},{key:"renderSeries",value:function(t){var e=t.realIndex,r=t.pathFill,i=t.lineFill,n=t.j,o=t.i,a=t.columnGroupIndex,s=t.pathFrom,l=t.pathTo,c=t.strokeWidth,u=t.elSeries,h=t.x,f=t.y,d=t.y1,p=t.y2,g=t.series,b=t.barHeight,y=t.barWidth,v=t.barXPosition,m=t.barYPosition,x=t.elDataLabelsWrap,w=t.elGoalsMarkers,S=t.elBarShadows,k=t.visibleSeries,A=t.type,O=t.classes,P=this.w,C=new Pc(this.ctx);if(!i){var j="function"==typeof P.globals.stroke.colors[e]?function(t){var e,r=P.config.stroke.colors;return Array.isArray(r)&&r.length>0&&((e=r[t])||(e=""),"function"==typeof e)?e({value:P.globals.series[t][n],dataPointIndex:n,w:P}):e}(e):P.globals.stroke.colors[e];i=this.barOptions.distributed?P.globals.stroke.colors[n]:j}P.config.series[o].data[n]&&P.config.series[o].data[n].strokeColor&&(i=P.config.series[o].data[n].strokeColor),this.isNullValue&&(r="none");var T=n/P.config.chart.animations.animateGradually.delay*(P.config.chart.animations.speed/P.globals.dataPoints)/2.4,E=C.renderPaths({i:o,j:n,realIndex:e,pathFrom:s,pathTo:l,stroke:i,strokeWidth:c,strokeLineCap:P.config.stroke.lineCap,fill:r,animationDelay:T,initialSpeed:P.config.chart.animations.speed,dataChangeSpeed:P.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(A,"-area ").concat(O),chartType:A});E.attr("clip-path","url(#gridRectBarMask".concat(P.globals.cuid,")"));var M=P.config.forecastDataPoints;M.count>0&&n>=P.globals.dataPoints-M.count&&(E.node.setAttribute("stroke-dasharray",M.dashArray),E.node.setAttribute("stroke-width",M.strokeWidth),E.node.setAttribute("fill-opacity",M.fillOpacity)),void 0!==d&&void 0!==p&&(E.attr("data-range-y1",d),E.attr("data-range-y2",p)),new vc(this.ctx).setSelectionFilter(E,e,n),u.add(E);var L=new Pp(this).handleBarDataLabels({x:h,y:f,y1:d,y2:p,i:o,j:n,series:g,realIndex:e,columnGroupIndex:a,barHeight:b,barWidth:y,barXPosition:v,barYPosition:m,renderedPath:E,visibleSeries:k});return null!==L.dataLabels&&x.add(L.dataLabels),L.totalDataLabels&&x.add(L.totalDataLabels),u.add(x),w&&u.add(w),S&&u.add(S),u}},{key:"drawBarPaths",value:function(t){var e,r=t.indexes,i=t.barHeight,n=t.strokeWidth,o=t.zeroW,a=t.x,s=t.y,l=t.yDivision,c=t.elSeries,u=this.w,h=r.i,f=r.j;if(u.globals.isXNumeric)e=(s=(u.globals.seriesX[h][f]-u.globals.minX)/this.invertedXRatio-i)+i*this.visibleI;else if(u.config.plotOptions.bar.hideZeroBarsWhenGrouped){var d=0,p=0;u.globals.seriesPercent.forEach((function(t,e){t[f]&&d++,e0&&(i=this.seriesLen*i/d),e=s+i*this.visibleI,e-=i*p}else e=s+i*this.visibleI;this.isFunnel&&(o-=(this.barHelpers.getXForValue(this.series[h][f],o)-o)/2),a=this.barHelpers.getXForValue(this.series[h][f],o);var g=this.barHelpers.getBarpaths({barYPosition:e,barHeight:i,x1:o,x2:a,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:r.realIndex,i:h,j:f,w:u});return u.globals.isXNumeric||(s+=l),this.barHelpers.barBackground({j:f,i:h,y1:e-i*this.visibleI,y2:i*this.seriesLen,elSeries:c}),{pathTo:g.pathTo,pathFrom:g.pathFrom,x1:o,x:a,y:s,goalX:this.barHelpers.getGoalValues("x",o,null,h,f),barYPosition:e,barHeight:i}}},{key:"drawColumnPaths",value:function(t){var e,r=t.indexes,i=t.x,n=t.y,o=t.xDivision,a=t.barWidth,s=t.zeroH,l=t.strokeWidth,c=t.elSeries,u=this.w,h=r.realIndex,f=r.translationsIndex,d=r.i,p=r.j,g=r.bc;if(u.globals.isXNumeric){var b=this.getBarXForNumericXAxis({x:i,j:p,realIndex:h,barWidth:a});i=b.x,e=b.barXPosition}else if(u.config.plotOptions.bar.hideZeroBarsWhenGrouped){var y=this.barHelpers.getZeroValueEncounters({i:d,j:p}),v=y.nonZeroColumns,m=y.zeroEncounters;v>0&&(a=this.seriesLen*a/v),e=i+a*this.visibleI,e-=a*m}else e=i+a*this.visibleI;n=this.barHelpers.getYForValue(this.series[d][p],s,f);var x=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:a,y1:s,y2:n,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:h,i:d,j:p,w:u});return u.globals.isXNumeric||(i+=o),this.barHelpers.barBackground({bc:g,j:p,i:d,x1:e-l/2-a*this.visibleI,x2:a*this.seriesLen+l/2,elSeries:c}),{pathTo:x.pathTo,pathFrom:x.pathFrom,x:i,y:n,goalY:this.barHelpers.getGoalValues("y",null,s,d,p,f),barXPosition:e,barWidth:a}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,r=t.barWidth,i=t.realIndex,n=t.j,o=this.w,a=i;return o.globals.seriesX[i].length||(a=o.globals.maxValsInArrayIndex),f.isNumber(o.globals.seriesX[a][n])&&(e=(o.globals.seriesX[a][n]-o.globals.minX)/this.xRatio-r*this.seriesLen/2),{barXPosition:e+r*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var r,i=this.w,n=0;n0&&parseInt(o.realIndex,10)===parseInt(t,10)&&void 0!==i.globals.previousPaths[n].paths[e]&&(r=i.globals.previousPaths[n].paths[e].d)}return r}}],r&&Hp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Np=Bp;function Wp(t){return Wp="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wp(t)}function Gp(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Vp(t){for(var e=1;e1&&(r.yaxisIndex=i.globals.seriesYAxisReverseMap[p][0],x=p),r.isReversed=i.config.yaxis[r.yaxisIndex]&&i.config.yaxis[r.yaxisIndex].reversed;var w=r.graphics.group({class:"apexcharts-series",seriesName:f.escapeString(i.globals.seriesNames[p]),rel:n+1,"data:realIndex":p});r.ctx.series.addCollapsedClassToSeries(w,p);var S=r.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),k=r.graphics.group({class:"apexcharts-bar-goals-markers"}),A=0,O=0,P=r.initialPositions(a,s,c,u,h,d,x);s=P.y,A=P.barHeight,u=P.yDivision,d=P.zeroW,a=P.x,O=P.barWidth,c=P.xDivision,h=P.zeroH,i.globals.barHeight=A,i.globals.barWidth=O,r.barHelpers.initializeStackedXYVars(r),1===r.groupCtx.prevY.length&&r.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(r.groupCtx.prevY[0]=r.groupCtx.prevY[0].map((function(){return h})),r.groupCtx.prevYF[0]=r.groupCtx.prevYF[0].map((function(){return 0})));for(var C=0;C0||"top"===r.barHelpers.arrBorderRadius[p][C]&&i.globals.series[p][C]<0)&&(I=_),w=r.renderSeries({realIndex:p,pathFill:L,j:C,i:n,columnGroupIndex:y,pathFrom:E.pathFrom,pathTo:E.pathTo,strokeWidth:j,elSeries:w,x:a,y:s,series:t,barHeight:A,barWidth:O,elDataLabelsWrap:S,elGoalsMarkers:k,type:"bar",visibleSeries:y,classes:I})}i.globals.seriesXvalues[p]=v,i.globals.seriesYvalues[p]=m,r.groupCtx.prevY.push(r.groupCtx.yArrj),r.groupCtx.prevYF.push(r.groupCtx.yArrjF),r.groupCtx.prevYVal.push(r.groupCtx.yArrjVal),r.groupCtx.prevX.push(r.groupCtx.xArrj),r.groupCtx.prevXF.push(r.groupCtx.xArrjF),r.groupCtx.prevXVal.push(r.groupCtx.xArrjVal),o.add(w)},c=0,u=0;c1?l=(r=c.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(h).indexOf("%")?l=parseInt(h,10):l*=parseInt(h,10)/100,n=this.isReversed?this.baseLineY[a]:c.globals.gridHeight-this.baseLineY[a],t=c.globals.padHorizontal+(r-l)/2}var f=c.globals.barGroups.length||1;return{x:t,y:e,yDivision:i,xDivision:r,barHeight:s/f,barWidth:l/f,zeroH:n,zeroW:o}}},{key:"drawStackedBarPaths",value:function(t){for(var e,r=t.indexes,i=t.barHeight,n=t.strokeWidth,o=t.zeroW,a=t.x,s=t.y,l=t.columnGroupIndex,c=t.seriesGroup,u=t.yDivision,h=t.elSeries,f=this.w,d=s+l*i,p=r.i,g=r.j,b=r.realIndex,y=r.translationsIndex,v=0,m=0;m0){var w=o;this.groupCtx.prevXVal[x-1][g]<0?w=this.series[p][g]>=0?this.groupCtx.prevX[x-1][g]+v-2*(this.isReversed?v:0):this.groupCtx.prevX[x-1][g]:this.groupCtx.prevXVal[x-1][g]>=0&&(w=this.series[p][g]>=0?this.groupCtx.prevX[x-1][g]:this.groupCtx.prevX[x-1][g]-v+2*(this.isReversed?v:0)),e=w}else e=o;a=null===this.series[p][g]?e:e+this.series[p][g]/this.invertedYRatio-2*(this.isReversed?this.series[p][g]/this.invertedYRatio:0);var S=this.barHelpers.getBarpaths({barYPosition:d,barHeight:i,x1:e,x2:a,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:r.realIndex,seriesGroup:c,i:p,j:g,w:f});return this.barHelpers.barBackground({j:g,i:p,y1:d,y2:i,elSeries:h}),s+=u,{pathTo:S.pathTo,pathFrom:S.pathFrom,goalX:this.barHelpers.getGoalValues("x",o,null,p,g,y),barXPosition:e,barYPosition:d,x:a,y:s}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,r=t.x,i=t.y,n=t.xDivision,o=t.barWidth,a=t.zeroH,s=t.columnGroupIndex,l=t.seriesGroup,c=t.elSeries,u=this.w,h=e.i,f=e.j,d=e.bc,p=e.realIndex,g=e.translationsIndex;if(u.globals.isXNumeric){var b=u.globals.seriesX[p][f];b||(b=0),r=(b-u.globals.minX)/this.xRatio-o/2*u.globals.barGroups.length}for(var y,v=r+s*o,m=0,x=0;x0&&!u.globals.isXNumeric||w>0&&u.globals.isXNumeric&&u.globals.seriesX[p-1][f]===u.globals.seriesX[p][f]){var S,k,A,O=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var P=1;P=0?A-m+2*(this.isReversed?m:0):A;break}if((null===(E=this.groupCtx.prevYVal[w-j])||void 0===E?void 0:E[f])>=0){k=this.series[h][f]>=0?A:A+m-2*(this.isReversed?m:0);break}}void 0===k&&(k=u.globals.gridHeight),y=null!==(S=this.groupCtx.prevYF[0])&&void 0!==S&&S.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?a:k}else y=a;i=this.series[h][f]?y-this.series[h][f]/this.yRatio[g]+2*(this.isReversed?this.series[h][f]/this.yRatio[g]:0):y;var M=this.barHelpers.getColumnPaths({barXPosition:v,barWidth:o,y1:y,y2:i,yRatio:this.yRatio[g],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:h,j:f,w:u});return this.barHelpers.barBackground({bc:d,j:f,i:h,x1:v,x2:o,elSeries:c}),{pathTo:M.pathTo,pathFrom:M.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,a,h,f),barXPosition:v,x:u.globals.isXNumeric?r:r+n,y:i}}}],r&&qp(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const eg=tg;function rg(t){return rg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rg(t)}function ig(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function ng(t){for(var e=1;e0&&(i.visibleI=i.visibleI+1);var x,w,S=0;i.yRatio.length>1&&(i.yaxisIndex=n.globals.seriesYAxisReverseMap[y][0],S=y);var k=i.barHelpers.initialPositions();p=k.y,x=k.barHeight,l=k.yDivision,h=k.zeroW,d=k.x,w=k.barWidth,a=k.xDivision,u=k.zeroH,b.push(d+w/2);for(var A=o.group({class:"apexcharts-datalabels","data:realIndex":y}),O=o.group({class:"apexcharts-bar-goals-markers"}),P=function(r){var o=i.barHelpers.getStrokeWidth(e,r,y),c=null,f={indexes:{i:e,j:r,realIndex:y,translationsIndex:S},x:d,y:p,strokeWidth:o,elSeries:m};c=i.isHorizontal?i.drawHorizontalBoxPaths(ng(ng({},f),{},{yDivision:l,barHeight:x,zeroW:h})):i.drawVerticalBoxPaths(ng(ng({},f),{},{xDivision:a,barWidth:w,zeroH:u})),p=c.y,d=c.x;var k=i.barHelpers.drawGoalLine({barXPosition:c.barXPosition,barYPosition:c.barYPosition,goalX:c.goalX,goalY:c.goalY,barHeight:x,barWidth:w});k&&O.add(k),r>0&&b.push(d+w/2),g.push(p),c.pathTo.forEach((function(a,l){var u=!i.isBoxPlot&&i.candlestickOptions.wick.useFillColor?c.color[l]:n.globals.stroke.colors[e],h=s.fillPath({seriesNumber:y,dataPointIndex:r,color:c.color[l],value:t[e][r]});i.renderSeries({realIndex:y,pathFill:h,lineFill:u,j:r,i:e,pathFrom:c.pathFrom,pathTo:a,strokeWidth:o,elSeries:m,x:d,y:p,series:t,columnGroupIndex:v,barHeight:x,barWidth:w,elDataLabelsWrap:A,elGoalsMarkers:O,visibleSeries:i.visibleI,type:n.config.chart.type})}))},C=0;Cy.c&&(h=!1);var x=Math.min(y.o,y.c),w=Math.max(y.o,y.c),S=y.m;s.globals.isXNumeric&&(r=(s.globals.seriesX[b][u]-s.globals.minX)/this.xRatio-n/2);var k=r+n*this.visibleI;void 0===this.series[c][u]||null===this.series[c][u]?(x=o,w=o):(x=o-x/g,w=o-w/g,v=o-y.h/g,m=o-y.l/g,S=o-y.m/g);var A=l.move(k,o),O=l.move(k+n/2,x);return s.globals.previousPaths.length>0&&(O=this.getPreviousPath(b,u,!0)),A=this.isBoxPlot?[l.move(k,x)+l.line(k+n/2,x)+l.line(k+n/2,v)+l.line(k+n/4,v)+l.line(k+n-n/4,v)+l.line(k+n/2,v)+l.line(k+n/2,x)+l.line(k+n,x)+l.line(k+n,S)+l.line(k,S)+l.line(k,x+a/2),l.move(k,S)+l.line(k+n,S)+l.line(k+n,w)+l.line(k+n/2,w)+l.line(k+n/2,m)+l.line(k+n-n/4,m)+l.line(k+n/4,m)+l.line(k+n/2,m)+l.line(k+n/2,w)+l.line(k,w)+l.line(k,S)+"z"]:[l.move(k,w)+l.line(k+n/2,w)+l.line(k+n/2,v)+l.line(k+n/2,w)+l.line(k+n,w)+l.line(k+n,x)+l.line(k+n/2,x)+l.line(k+n/2,m)+l.line(k+n/2,x)+l.line(k,x)+l.line(k,w-a/2)],O+=l.move(k,x),s.globals.isXNumeric||(r+=i),{pathTo:A,pathFrom:O,x:r,y:w,goalY:this.barHelpers.getGoalValues("y",null,o,c,u,e.translationsIndex),barXPosition:k,color:this.isBoxPlot?p:h?[f]:[d]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes,r=(t.x,t.y),i=t.yDivision,n=t.barHeight,o=t.zeroW,a=t.strokeWidth,s=this.w,l=new Pc(this.ctx),c=e.i,u=e.j,h=this.boxOptions.colors.lower;this.isBoxPlot&&(h=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var f=this.invertedYRatio,d=e.realIndex,p=this.getOHLCValue(d,u),g=o,b=o,y=Math.min(p.o,p.c),v=Math.max(p.o,p.c),m=p.m;s.globals.isXNumeric&&(r=(s.globals.seriesX[d][u]-s.globals.minX)/this.invertedXRatio-n/2);var x=r+n*this.visibleI;void 0===this.series[c][u]||null===this.series[c][u]?(y=o,v=o):(y=o+y/f,v=o+v/f,g=o+p.h/f,b=o+p.l/f,m=o+p.m/f);var w=l.move(o,x),S=l.move(y,x+n/2);return s.globals.previousPaths.length>0&&(S=this.getPreviousPath(d,u,!0)),w=[l.move(y,x)+l.line(y,x+n/2)+l.line(g,x+n/2)+l.line(g,x+n/2-n/4)+l.line(g,x+n/2+n/4)+l.line(g,x+n/2)+l.line(y,x+n/2)+l.line(y,x+n)+l.line(m,x+n)+l.line(m,x)+l.line(y+a/2,x),l.move(m,x)+l.line(m,x+n)+l.line(v,x+n)+l.line(v,x+n/2)+l.line(b,x+n/2)+l.line(b,x+n-n/4)+l.line(b,x+n/4)+l.line(b,x+n/2)+l.line(v,x+n/2)+l.line(v,x)+l.line(m,x)+"z"],S+=l.move(y,x),s.globals.isXNumeric||(r+=i),{pathTo:w,pathFrom:S,x:v,y:r,goalX:this.barHelpers.getGoalValues("x",o,null,c,u),barYPosition:x,color:h}}},{key:"getOHLCValue",value:function(t,e){var r=this.w;return{o:this.isBoxPlot?r.globals.seriesCandleH[t][e]:r.globals.seriesCandleO[t][e],h:this.isBoxPlot?r.globals.seriesCandleO[t][e]:r.globals.seriesCandleH[t][e],m:r.globals.seriesCandleM[t][e],l:this.isBoxPlot?r.globals.seriesCandleC[t][e]:r.globals.seriesCandleL[t][e],c:this.isBoxPlot?r.globals.seriesCandleL[t][e]:r.globals.seriesCandleC[t][e]}}}],r&&ag(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const dg=fg;function pg(t){return pg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pg(t)}function gg(t){return function(t){if(Array.isArray(t))return bg(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return bg(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?bg(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function bg(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&r.colorScale.ranges.map((function(t,r){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,r,i){var n=this.w,o=1,a=n.config.plotOptions[t].shadeIntensity,s=this.determineColor(t,e,r);n.globals.hasNegs||i?o=n.config.plotOptions[t].reverseNegativeShade?s.percent<0?s.percent/100*(1.25*a):(1-s.percent/100)*(1.25*a):s.percent<=0?1-(1+s.percent/100)*a:(1-s.percent/100)*a:(o=1-s.percent/100,"treemap"===t&&(o=(1-s.percent/100)*(1.25*a)));var l=s.color,c=new f;if(n.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var u=c.shadeColor(-1*o,s.color);l=f.hexToRgba(f.isColorHex(u)?u:f.rgb2hex(u),n.config.fill.opacity)}else{var h=c.shadeColor(o,s.color);l=f.hexToRgba(f.isColorHex(h)?h:f.rgb2hex(h),n.config.fill.opacity)}return{color:l,colorProps:s}}},{key:"determineColor",value:function(t,e,r){var i=this.w,n=i.globals.series[e][r],o=i.config.plotOptions[t],a=o.colorScale.inverse?r:e;o.distributed&&"treemap"===i.config.chart.type&&(a=r);var s=i.globals.colors[a],l=null,c=Math.min.apply(Math,gg(i.globals.series[e])),u=Math.max.apply(Math,gg(i.globals.series[e]));o.distributed||"heatmap"!==t||(c=i.globals.minY,u=i.globals.maxY),void 0!==o.colorScale.min&&(c=o.colorScale.mini.globals.maxY?o.colorScale.max:i.globals.maxY);var h=Math.abs(u)+Math.abs(c),f=100*n/(0===h?h-1e-6:h);return o.colorScale.ranges.length>0&&o.colorScale.ranges.map((function(t,e){if(n>=t.from&&n<=t.to){s=t.color,l=t.foreColor?t.foreColor:null,c=t.from,u=t.to;var r=Math.abs(u)+Math.abs(c);f=100*n/(0===r?r-1e-6:r)}})),{color:s,foreColor:l,percent:f}}},{key:"calculateDataLabels",value:function(t){var e=t.text,r=t.x,i=t.y,n=t.i,o=t.j,a=t.colorProps,s=t.fontSize,l=this.w.config.dataLabels,c=new Pc(this.ctx),u=new lh(this.ctx),h=null;if(l.enabled){h=c.group({class:"apexcharts-data-labels"});var f=l.offsetX,d=l.offsetY,p=r+f,g=i+parseFloat(l.style.fontSize)/3+d;u.plotDataLabelsText({x:p,y:g,text:e,i:n,j:o,color:a.foreColor,parent:h,fontSize:s,dataLabelsConfig:l})}return h}},{key:"addListeners",value:function(t){var e=new Pc(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}],r&&yg(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function xg(t){return xg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xg(t)}function wg(t,e){for(var r=0;r=0;s?c++:c--){var u=r.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:f.escapeString(e.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(u,c),e.config.chart.dropShadow.enabled){var h=e.config.chart.dropShadow;new vc(this.ctx).dropShadow(u,h,c)}for(var d=0,p=e.config.plotOptions.heatmap.shadeIntensity,g=0;g-1&&this.pieClicked(h),r.config.dataLabels.enabled){var w=m.x,S=m.y,k=100*p/this.fullAngle+"%";if(0!==p&&r.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(i+a):i+a=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(c=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(c)>this.fullAngle&&(c-=this.fullAngle);var u=Math.PI*(c-90)/180,h=r.centerX+o*Math.cos(l),d=r.centerY+o*Math.sin(l),p=r.centerX+o*Math.cos(u),g=r.centerY+o*Math.sin(u),b=f.polarToCartesian(r.centerX,r.centerY,r.donutSize,c),y=f.polarToCartesian(r.centerX,r.centerY,r.donutSize,s),v=n>180?1:0,m=["M",h,d,"A",o,o,0,v,1,p,g];return e="donut"===r.chartType?[].concat(m,["L",b.x,b.y,"A",r.donutSize,r.donutSize,0,v,0,y.x,y.y,"L",h,d,"z"]).join(" "):"pie"===r.chartType||"polarArea"===r.chartType?[].concat(m,["L",r.centerX,r.centerY,"L",h,d]).join(" "):[].concat(m).join(" "),a.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,r=new Dh(this.ctx),i=new Pc(this.ctx),n=new Cg(this.ctx),o=i.group(),a=i.group(),s=r.niceScale(0,Math.ceil(this.maxY),0),l=s.result.reverse(),c=s.result.length;this.maxY=s.niceMax;for(var u=e.globals.radialSize,h=u/(c-1),f=0;f1&&t.total.show&&(n=t.total.color);var a=o.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),s=o.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");r=(0,t.value.formatter)(r,o),i||"function"!=typeof t.total.formatter||(r=t.total.formatter(o));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,o):"",null!==a&&(a.textContent=e),null!==s&&(s.textContent=r),null!==a&&(a.style.fill=n)}},{key:"printDataLabelsInner",value:function(t,e){var r=this.w,i=t.getAttribute("data:value"),n=r.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];r.globals.series.length>1&&this.printInnerLabels(e,n,i,t);var o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==o&&(o.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,r=this.w,i=new Pc(this.ctx),n=r.config.plotOptions.polarArea.spokes;if(0!==n.strokeWidth){for(var o=[],a=360/r.globals.series.length,s=0;s0&&(g=e.getPreviousPath(a));for(var b=0;b=10?t.x>0?(r="start",i+=10):t.x<0&&(r="end",i-=10):r="middle",Math.abs(t.y)>=e-10&&(t.y<0?n-=10:t.y>0&&(n+=10)),{textAnchor:r,newX:i,newY:n}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,r=null,i=0;i0&&parseInt(n.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[i].paths[0]&&(r=e.globals.previousPaths[i].paths[0].d)}return r}},{key:"getDataPointsPos",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var i=[],n=0;n=360&&(f=360-Math.abs(this.startAngle)-.1);var d=r.drawPath({d:"",stroke:u,strokeWidth:a*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){var p=c.dropShadow;n.dropShadow(d,p)}l.add(d),d.attr("id","apexcharts-radialbarTrack-"+s),this.animatePaths(d,{centerX:t.centerX,centerY:t.centerY,endAngle:f,startAngle:h,size:t.size,i:s,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return i}},{key:"drawArcs",value:function(t){var e=this.w,r=new Pc(this.ctx),i=new Zu(this.ctx),n=new vc(this.ctx),o=r.group(),a=this.getStrokeWidth(t);t.size=t.size-a/2;var s=e.config.plotOptions.radialBar.hollow.background,l=t.size-a*t.series.length-this.margin*t.series.length-a*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,c=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(s=this.drawHollowImage(t,o,l,s));var u=this.drawHollow({size:c,centerX:t.centerX,centerY:t.centerY,fill:s||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var h=e.config.plotOptions.radialBar.hollow.dropShadow;n.dropShadow(u,h)}var d=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(d=0);var p=null;if(this.radialDataLabels.show){var g=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");p=this.renderInnerDataLabels(g,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:d})}"back"===e.config.plotOptions.radialBar.hollow.position&&(o.add(u),p&&o.add(p));var b=!1;e.config.plotOptions.radialBar.inverseOrder&&(b=!0);for(var y=b?t.series.length-1:0;b?y>=0:y100?100:t.series[y])/100,k=Math.round(this.totalAngle*S)+this.startAngle,A=void 0;e.globals.dataChanged&&(w=this.startAngle,A=Math.round(this.totalAngle*f.negToZero(e.globals.previousPaths[y])/100)+w),Math.abs(k)+Math.abs(x)>360&&(k-=.01),Math.abs(A)+Math.abs(w)>360&&(A-=.01);var O=k-x,P=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[y]:e.config.stroke.dashArray,C=r.drawPath({d:"",stroke:m,strokeWidth:a,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+y,strokeDashArray:P});if(Pc.setAttrs(C.node,{"data:angle":O,"data:value":t.series[y]}),e.config.chart.dropShadow.enabled){var j=e.config.chart.dropShadow;n.dropShadow(C,j,y)}if(n.setSelectionFilter(C,0,y),this.addListeners(C,this.radialDataLabels),v.add(C),C.attr({index:0,j:y}),this.barLabels.enabled){var T=f.polarToCartesian(t.centerX,t.centerY,t.size,x),E=this.barLabels.formatter(e.globals.seriesNames[y],{seriesIndex:y,w:e}),M=["apexcharts-radialbar-label"];this.barLabels.onClick||M.push("apexcharts-no-click");var L=this.barLabels.useSeriesColors?e.globals.colors[y]:e.config.chart.foreColor;L||(L=e.config.chart.foreColor);var I=T.x+this.barLabels.offsetX,_=T.y+this.barLabels.offsetY,R=r.drawText({x:I,y:_,text:E,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:L,cssClass:M.join(" ")});R.on("click",this.onBarLabelClick),R.attr({rel:y+1}),0!==x&&R.attr({"transform-origin":"".concat(I," ").concat(_),transform:"rotate(".concat(x," 0 0)")}),v.add(R)}var z=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(z=e.config.chart.animations.speed),e.globals.dataChanged&&(z=e.config.chart.animations.dynamicAnimation.speed),this.animDur=z/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(C,{centerX:t.centerX,centerY:t.centerY,endAngle:k,startAngle:x,prevEndAngle:A,prevStartAngle:w,size:t.size,i:y,totalItems:2,animBeginArr:this.animBeginArr,dur:z,shouldSetPrevPaths:!0})}return{g:o,elHollow:u,dataLabels:p}}},{key:"drawHollow",value:function(t){var e=new Pc(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,r,i){var n=this.w,o=new Zu(this.ctx),a=f.randomId(),s=n.config.plotOptions.radialBar.hollow.image;if(n.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:r,height:r,image:s,patternID:"pattern".concat(n.globals.cuid).concat(a)}),i="url(#pattern".concat(n.globals.cuid).concat(a,")");else{var l=n.config.plotOptions.radialBar.hollow.imageWidth,c=n.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===c){var u=n.globals.dom.Paper.image(s,(function(e){this.move(t.centerX-e.width/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+n.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(u)}else{var h=n.globals.dom.Paper.image(s,(function(e){this.move(t.centerX-l/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-c/2+n.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)}));e.add(h)}}return i}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,r=this.barLabels.onClick,i=this.w;r&&r(i.globals.seriesNames[e],{w:i,seriesIndex:e})}}],r&&Bg(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Lg);const $g=Zg;function Jg(t){return Jg="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jg(t)}function Qg(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Kg(t){for(var e=1;e0&&(this.visibleI=this.visibleI+1);var b=0,y=0,v=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[d][0],v=d);var m=this.barHelpers.initialPositions();h=m.y,c=m.zeroW,u=m.x,y=m.barWidth,b=m.barHeight,a=m.xDivision,s=m.yDivision,l=m.zeroH;for(var x=i.group({class:"apexcharts-datalabels","data:realIndex":d}),w=i.group({class:"apexcharts-rangebar-goals-markers"}),S=0;S0}));return this.isHorizontal?(i=f.config.plotOptions.bar.rangeBarGroupRows?o+c*y:o+s*this.visibleI+c*y,v>-1&&!f.config.plotOptions.bar.rangeBarOverlap&&(d=f.globals.seriesRange[e][v].overlaps).indexOf(p)>-1&&(i=(s=h.barHeight/d.length)*this.visibleI+c*(100-parseInt(this.barOptions.barHeight,10))/100/2+s*(this.visibleI+d.indexOf(p))+c*y)):(y>-1&&!f.globals.timescaleLabels.length&&(n=f.config.plotOptions.bar.rangeBarGroupRows?a+u*y:a+l*this.visibleI+u*y),v>-1&&!f.config.plotOptions.bar.rangeBarOverlap&&(d=f.globals.seriesRange[e][v].overlaps).indexOf(p)>-1&&(n=(l=h.barWidth/d.length)*this.visibleI+u*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+d.indexOf(p))+u*y)),{barYPosition:i,barXPosition:n,barHeight:s,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,r=t.x,i=t.xDivision,n=t.barWidth,o=t.barXPosition,a=t.zeroH,s=this.w,l=e.i,c=e.j,u=e.realIndex,h=e.translationsIndex,f=this.yRatio[h],d=this.getRangeValue(u,c),p=Math.min(d.start,d.end),g=Math.max(d.start,d.end);void 0===this.series[l][c]||null===this.series[l][c]?p=a:(p=a-p/f,g=a-g/f);var b=Math.abs(g-p),y=this.barHelpers.getColumnPaths({barXPosition:o,barWidth:n,y1:p,y2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:u,i:u,j:c,w:s});if(s.globals.isXNumeric){var v=this.getBarXForNumericXAxis({x:r,j:c,realIndex:u,barWidth:n});r=v.x,o=v.barXPosition}else r+=i;return{pathTo:y.pathTo,pathFrom:y.pathFrom,barHeight:b,x:r,y:d.start<0&&d.end<0?p:g,goalY:this.barHelpers.getGoalValues("y",null,a,l,c,h),barXPosition:o}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,r=t.y,i=t.y1,n=t.y2,o=t.yDivision,a=t.barHeight,s=t.barYPosition,l=t.zeroW,c=this.w,u=e.realIndex,h=e.j,f=this.preventBarOverflow(l+i/this.invertedYRatio),d=this.preventBarOverflow(l+n/this.invertedYRatio),p=this.getRangeValue(u,h),g=Math.abs(d-f),b=this.barHelpers.getBarpaths({barYPosition:s,barHeight:a,x1:f,x2:d,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:u,realIndex:u,j:h,w:c});return c.globals.isXNumeric||(r+=o),{pathTo:b.pathTo,pathFrom:b.pathFrom,barWidth:g,x:p.start<0&&p.end<0?f:d,goalX:this.barHelpers.getGoalValues("x",l,null,u,h),y:r}}},{key:"getRangeValue",value:function(t,e){var r=this.w;return{start:r.globals.seriesRangeStart[t][e],end:r.globals.seriesRangeEnd[t][e]}}}],r&&eb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),n}(Np);const lb=sb;function cb(t){return cb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cb(t)}function ub(t,e){for(var r=0;r0&&parseInt(a.realIndex,10)===parseInt(i,10)&&("line"===a.type?(this.lineCtx.appendPathFrom=!1,e=n.globals.previousPaths[o].paths[0].d):"area"===a.type&&(this.lineCtx.appendPathFrom=!1,r=n.globals.previousPaths[o].paths[0].d,n.config.stroke.show&&n.globals.previousPaths[o].paths[1]&&(e=n.globals.previousPaths[o].paths[1].d)))}return{pathFromLine:e,pathFromArea:r}}},{key:"determineFirstPrevY",value:function(t){var e,r,i,n=t.i,o=t.realIndex,a=t.series,s=t.prevY,l=t.lineYPosition,c=t.translationsIndex,u=this.w,h=u.config.chart.stacked&&!u.globals.comboCharts||u.config.chart.stacked&&u.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(r=this.w.config.series[o])||void 0===r?void 0:r.type));if(void 0!==(null===(i=a[n])||void 0===i?void 0:i[0]))s=(l=h&&n>0?this.lineCtx.prevSeriesY[n-1][0]:this.lineCtx.zeroY)-a[n][0]/this.lineCtx.yRatio[c]+2*(this.lineCtx.isReversed?a[n][0]/this.lineCtx.yRatio[c]:0);else if(h&&n>0&&void 0===a[n][0])for(var f=n-1;f>=0;f--)if(null!==a[f][0]&&void 0!==a[f][0]){s=l=this.lineCtx.prevSeriesY[f][0];break}return{prevY:s,lineYPosition:l}}}],r&&ub(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),db=function(t){var e=function(t){for(var e,r,i,n,o=function(t){for(var e=[],r=t[0],i=t[1],n=e[0]=gb(r,i),o=1,a=t.length-1;o9&&(n=3*i/Math.sqrt(n),o[l]=n*e,o[l+1]=n*r);for(var c=0;c<=a;c++)n=(t[Math.min(a,c+1)][0]-t[Math.max(0,c-1)][0])/(6*(1+o[c]*o[c])),s.push([n||0,o[c]*n||0]);return s}(t),r=t[1],i=t[0],n=[],o=e[1],a=e[0];n.push(i,[i[0]+a[0],i[1]+a[1],r[0]-o[0],r[1]-o[1],r[0],r[1]]);for(var s=2,l=e.length;s1&&i[1].length<6){var n=i[0].length;i[1]=[2*i[0][n-2]-i[0][n-4],2*i[0][n-1]-i[0][n-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i};function gb(t,e){return(e[1]-t[1])/(e[0]-t[0])}function bb(t){return bb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bb(t)}function yb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function vb(t){for(var e=1;e1?f:0;this._initSerieVariables(t,h,f);var p=[],g=[],b=[],y=o.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,f),o.globals.isXNumeric&&o.globals.seriesX.length>0&&(y=(o.globals.seriesX[f][0]-o.globals.minX)/this.xRatio),b.push(y);var v,m=y,x=void 0,w=m,S=this.zeroY,k=this.zeroY;S=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:t,prevY:S,lineYPosition:0,translationsIndex:d}).prevY,"monotoneCubic"===o.config.stroke.curve&&null===t[h][0]?p.push(null):p.push(S),v=S,"rangeArea"===s&&(x=k=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:i,prevY:k,lineYPosition:0,translationsIndex:d}).prevY,g.push(null!==p[0]?k:null));var A=this._calculatePathsFrom({type:s,series:t,i:h,realIndex:f,translationsIndex:d,prevX:w,prevY:S,prevY2:k}),O=[p[0]],P=[g[0]],C={type:s,series:t,realIndex:f,translationsIndex:d,i:h,x:y,y:1,pX:m,pY:v,pathsFrom:A,linePaths:[],areaPaths:[],seriesIndex:r,lineYPosition:0,xArrj:b,yArrj:p,y2Arrj:g,seriesRangeEnd:i},j=this._iterateOverDataPoints(vb(vb({},C),{},{iterations:"rangeArea"===s?t[h].length-1:void 0,isRangeStart:!0}));if("rangeArea"===s){for(var T=this._calculatePathsFrom({series:i,i:h,realIndex:f,prevX:w,prevY:k}),E=this._iterateOverDataPoints(vb(vb({},C),{},{series:i,xArrj:[y],yArrj:O,y2Arrj:P,pY:x,areaPaths:j.areaPaths,pathsFrom:T,iterations:i[h].length-1,isRangeStart:!1})),M=j.linePaths.length/2,L=0;L=0;I--)l.add(u[I]);else for(var _=0;_1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[r],o=r),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.globals.gridHeight-this.baseLineY[o]-(this.isReversed?i.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[o]:0),this.areaBottomY=this.zeroY,(this.zeroY>i.globals.gridHeight||"end"===i.config.plotOptions.area.fillTo)&&(this.areaBottomY=i.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=n.group({class:"apexcharts-series",zIndex:void 0!==i.config.series[r].zIndex?i.config.series[r].zIndex:r,seriesName:f.escapeString(i.globals.seriesNames[r])}),this.elPointsMain=n.group({class:"apexcharts-series-markers-wrap","data:realIndex":r}),this.elDataLabelsWrap=n.group({class:"apexcharts-datalabels","data:realIndex":r});var a=t[e].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":a,rel:e+1,"data:realIndex":r}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,r,i,n,o=t.type,a=t.series,s=t.i,l=t.realIndex,c=t.translationsIndex,u=t.prevX,h=t.prevY,f=t.prevY2,d=this.w,p=new Pc(this.ctx);if(null===a[s][0]){for(var g=0;g0){var b=this.lineHelpers.checkPreviousPaths({pathFromLine:i,pathFromArea:n,realIndex:l});i=b.pathFromLine,n=b.pathFromArea}return{prevX:u,prevY:h,linePath:e,areaPath:r,pathFromLine:i,pathFromArea:n}}},{key:"_handlePaths",value:function(t){var e=t.type,r=t.realIndex,i=t.i,n=t.paths,o=this.w,a=new Pc(this.ctx),s=new Zu(this.ctx);this.prevSeriesY.push(n.yArrj),o.globals.seriesXvalues[r]=n.xArrj,o.globals.seriesYvalues[r]=n.yArrj;var l=o.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var c=o.globals.seriesXvalues[r][o.globals.seriesXvalues[r].length-l.count-1],u=a.drawRect(c,0,o.globals.gridWidth,o.globals.gridHeight,0);o.globals.dom.elForecastMask.appendChild(u.node);var h=a.drawRect(0,0,c,o.globals.gridHeight,0);o.globals.dom.elNonForecastMask.appendChild(h.node)}this.pointsChart||o.globals.delayedElements.push({el:this.elPointsMain.node,index:r});var f={i,realIndex:r,animationDelay:i,initialSpeed:o.config.chart.animations.speed,dataChangeSpeed:o.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var d=s.fillPath({seriesNumber:r}),p=0;p0&&"rangeArea"!==e){var S=a.renderPaths(x);S.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&S.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(S),S.attr("clip-path","url(#forecastMask".concat(o.globals.cuid,")")),w.attr("clip-path","url(#nonForecastMask".concat(o.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,r,i=this,n=t.type,o=t.series,a=t.iterations,s=t.realIndex,l=t.translationsIndex,c=t.i,u=t.x,h=t.y,d=t.pX,p=t.pY,g=t.pathsFrom,b=t.linePaths,y=t.areaPaths,v=t.seriesIndex,m=t.lineYPosition,x=t.xArrj,w=t.yArrj,S=t.y2Arrj,k=t.isRangeStart,A=t.seriesRangeEnd,O=this.w,P=new Pc(this.ctx),C=this.yRatio,j=g.prevY,T=g.linePath,E=g.areaPath,M=g.pathFromLine,L=g.pathFromArea,I=f.isNumber(O.globals.minYArr[s])?O.globals.minYArr[s]:O.globals.minY;a||(a=O.globals.dataPoints>1?O.globals.dataPoints-1:O.globals.dataPoints);var _=function(t,e){return e-t/C[l]+2*(i.isReversed?t/C[l]:0)},R=h,z=O.config.chart.stacked&&!O.globals.comboCharts||O.config.chart.stacked&&O.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[s])||void 0===e?void 0:e.type)||"column"===(null===(r=this.w.config.series[s])||void 0===r?void 0:r.type)),X=O.config.stroke.curve;Array.isArray(X)&&(X=Array.isArray(v)?X[v[c]]:X[c]);for(var D,Y=0,H=0;H0&&O.globals.collapsedSeries.length0;e--){if(!(O.globals.collapsedSeriesIndices.indexOf((null==v?void 0:v[e])||e)>-1))return e;e--}return 0}(c-1)][H+1]:this.zeroY,F?h=_(I,m):(h=_(o[c][H+1],m),"rangeArea"===n&&(R=_(A[c][H+1],m))),x.push(u),!F||"smooth"!==O.config.stroke.curve&&"monotoneCubic"!==O.config.stroke.curve?(w.push(h),S.push(R)):(w.push(null),S.push(null));var N=this.lineHelpers.calculatePoints({series:o,x:u,y:h,realIndex:s,i:c,j:H,prevY:j}),W=this._createPaths({type:n,series:o,i:c,realIndex:s,j:H,x:u,y:h,y2:R,xArrj:x,yArrj:w,y2Arrj:S,pX:d,pY:p,pathState:Y,segmentStartX:D,linePath:T,areaPath:E,linePaths:b,areaPaths:y,curve:X,isRangeStart:k});y=W.areaPaths,b=W.linePaths,d=W.pX,p=W.pY,Y=W.pathState,D=W.segmentStartX,E=W.areaPath,T=W.linePath,!this.appendPathFrom||O.globals.hasNullValues||"monotoneCubic"===X&&"rangeArea"===n||(M+=P.line(u,this.areaBottomY),L+=P.line(u,this.areaBottomY)),this.handleNullDataPoints(o,N,c,H,s),this._handleMarkersAndLabels({type:n,pointsPos:N,i:c,j:H,realIndex:s,isRangeStart:k})}return{yArrj:w,xArrj:x,pathFromArea:L,areaPaths:y,pathFromLine:M,linePaths:b,linePath:T,areaPath:E}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,r=t.pointsPos,i=t.isRangeStart,n=t.i,o=t.j,a=t.realIndex,s=this.w,l=new lh(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,o,{realIndex:a,pointsPos:r,zRatio:this.zRatio,elParent:this.elPointsMain});else{s.globals.series[n].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var c=this.markers.plotChartMarkers(r,a,o+1);null!==c&&this.elPointsMain.add(c)}var u=l.drawDataLabel({type:e,isRangeStart:i,pos:r,i:a,j:o+1});null!==u&&this.elDataLabelsWrap.add(u)}},{key:"_createPaths",value:function(t){var e,r=t.type,i=t.series,n=t.i,o=(t.realIndex,t.j),a=t.x,s=t.y,l=t.xArrj,c=t.yArrj,u=t.y2,h=t.y2Arrj,f=t.pX,d=t.pY,p=t.pathState,g=t.segmentStartX,b=t.linePath,y=t.areaPath,v=t.linePaths,m=t.areaPaths,x=t.curve,w=t.isRangeStart,S=new Pc(this.ctx),k=this.areaBottomY,A="rangeArea"===r,O="rangeArea"===r&&w;switch(x){case"monotoneCubic":var P=w?c:h;switch(p){case 0:if(null===P[o+1])break;p=1;case 1:if(!(A?l.length===i[n].length:o===i[n].length-2))break;case 2:var C=w?l:l.slice().reverse(),j=w?P:P.slice().reverse(),T=(e=j,C.map((function(t,r){return[t,e[r]]})).filter((function(t){return null!==t[1]}))),E=T.length>1?db(T):T,M=[];A&&(O?m=T:M=m.reverse());var L=0,I=0;if(function(t,e){for(var r=function(t){var e=[],r=0;return t.forEach((function(t){null!==t?r++:r>0&&(e.push(r),r=0)})),r>0&&e.push(r),e}(t),i=[],n=0,o=0;n4?(e+="C".concat(i[0],", ").concat(i[1]),e+=", ".concat(i[2],", ").concat(i[3]),e+=", ".concat(i[4],", ").concat(i[5])):n>2&&(e+="S".concat(i[0],", ").concat(i[1]),e+=", ".concat(i[2],", ").concat(i[3]))}return e}(t),r=I,i=(I+=t.length)-1;O?b=S.move(T[r][0],T[r][1])+e:A?b=S.move(M[r][0],M[r][1])+S.line(T[r][0],T[r][1])+e+S.line(M[i][0],M[i][1]):(b=S.move(T[r][0],T[r][1])+e,y=b+S.line(T[i][0],k)+S.line(T[r][0],k)+"z",m.push(y)),v.push(b)})),A&&L>1&&!O){var _=v.slice(L).reverse();v.splice(L),_.forEach((function(t){return v.push(t)}))}p=0}break;case"smooth":var R=.35*(a-f);if(null===i[n][o])p=0;else switch(p){case 0:if(g=f,b=O?S.move(f,h[o])+S.line(f,d):S.move(f,d),y=S.move(f,d),null===i[n][o+1]||void 0===i[n][o+1]){v.push(b),m.push(y);break}if(p=1,o=i[n].length-2&&(O&&(b+=S.curve(a,s,a,s,a,u)+S.move(a,u)),y+=S.curve(a,s,a,s,a,k)+S.line(g,k)+"z",v.push(b),m.push(y),p=-1)}}f=a,d=s;break;default:var D=function(t,e,r){var i=[];switch(t){case"stepline":i=S.line(e,null,"H")+S.line(null,r,"V");break;case"linestep":i=S.line(null,r,"V")+S.line(e,null,"H");break;case"straight":i=S.line(e,r)}return i};if(null===i[n][o])p=0;else switch(p){case 0:if(g=f,b=O?S.move(f,h[o])+S.line(f,d):S.move(f,d),y=S.move(f,d),null===i[n][o+1]||void 0===i[n][o+1]){v.push(b),m.push(y);break}if(p=1,o=i[n].length-2&&(O&&(b+=S.line(a,u)),y+=S.line(a,k)+S.line(g,k)+"z",v.push(b),m.push(y),p=-1)}}f=a,d=s}return{linePaths:v,areaPaths:m,pX:f,pY:d,pathState:p,segmentStartX:g,linePath:b,areaPath:y}}},{key:"handleNullDataPoints",value:function(t,e,r,i,n){var o=this.w;if(null===t[r][i]&&o.config.markers.showNullDataPoints||1===t[r].length){var a=this.strokeWidth-o.config.markers.strokeWidth/2;a>0||(a=0);var s=this.markers.plotChartMarkers(e,n,i+1,a,!0);null!==s&&this.elPointsMain.add(s)}}}],r&&xb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const kb=Sb;function Ab(t){return Ab="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ab(t)}function Ob(t,e){for(var r=0;ro-i&&l.width<=a-n){var c=s.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(c.x," ").concat(c.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,r,i,n,o){var a=new Pc(this.ctx),s=a.getTextRects(t,e).width+this.w.config.stroke.width+5>n-r&&o-i>n-r?o-i:n-r,l=a.getTextBasedOnMaxWidth({text:t,maxWidth:s,fontSize:e});return t.length!==l.length&&s/e<5?"":l}},{key:"animateTreemap",value:function(t,e,r,i){var n=new b(this.ctx);n.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:r.x,y:r.y,width:r.width,height:r.height},i,(function(){n.animationCompleted(t)}))}}],r&&Ob(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function jb(t){return jb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jb(t)}function Tb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Eb(t){for(var e=1;e5e4&&(i.globals.disableZoomOut=!0);var a=n.getTimeUnitsfromTimestamp(t,e,this.utc),s=i.globals.gridWidth/o,l=s/24,c=l/60,u=c/60,h=Math.floor(24*o),f=Math.floor(1440*o),d=Math.floor(86400*o),p=Math.floor(o),g=Math.floor(o/30),b=Math.floor(o/365),y={minMillisecond:a.minMillisecond,minSecond:a.minSecond,minMinute:a.minMinute,minHour:a.minHour,minDate:a.minDate,minMonth:a.minMonth,minYear:a.minYear},v={firstVal:y,currentMillisecond:y.minMillisecond,currentSecond:y.minSecond,currentMinute:y.minMinute,currentHour:y.minHour,currentMonthDate:y.minDate,currentDate:y.minDate,currentMonth:y.minMonth,currentYear:y.minYear,daysWidthOnXAxis:s,hoursWidthOnXAxis:l,minutesWidthOnXAxis:c,secondsWidthOnXAxis:u,numberOfSeconds:d,numberOfMinutes:f,numberOfHours:h,numberOfDays:p,numberOfMonths:g,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var m=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?Eb(Eb({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?Eb(Eb({},e),{},{value:t.value}):"minute"===t.unit?Eb(Eb({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?Eb(Eb({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return m.filter((function(t){var e=1,n=Math.ceil(i.globals.gridWidth/120),o=t.value;void 0!==i.config.xaxis.tickAmount&&(n=i.config.xaxis.tickAmount),m.length>n&&(e=Math.floor(m.length/n));var a=!1,s=!1;switch(r.tickInterval){case"years":"year"===t.unit&&(a=!0);break;case"half_year":e=7,"year"===t.unit&&(a=!0);break;case"months":e=1,"year"===t.unit&&(a=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(a=!0),30===o&&(s=!0);break;case"months_days":e=10,"month"===t.unit&&(a=!0),30===o&&(s=!0);break;case"week_days":e=8,"month"===t.unit&&(a=!0);break;case"days":e=1,"month"===t.unit&&(a=!0);break;case"hours":"day"===t.unit&&(a=!0);break;case"minutes_fives":case"seconds_fives":o%5!=0&&(s=!0);break;case"seconds_tens":o%10!=0&&(s=!0)}if("hours"===r.tickInterval||"minutes_fives"===r.tickInterval||"seconds_tens"===r.tickInterval||"seconds_fives"===r.tickInterval){if(!s)return!0}else if((o%e==0||a)&&!s)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var r=this.w,i=this.formatDates(t),n=this.removeOverlappingTS(i);r.globals.timescaleLabels=n.slice(),new Uf(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,r=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case r>15:this.tickInterval="minutes_fives";break;case r>5:this.tickInterval="minutes";break;case r>1:this.tickInterval="seconds_tens";break;case 60*r>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,r=t.currentMonth,i=t.currentYear,n=t.daysWidthOnXAxis,o=t.numberOfYears,a=e.minYear,s=0,l=new Vc(this.ctx),c="year";if(e.minDate>1||e.minMonth>0){var u=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);s=(l.determineDaysOfYear(e.minYear)-u+1)*n,a=e.minYear+1,this.timeScaleArray.push({position:s,value:a,unit:c,year:a,month:f.monthMod(r+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:s,value:a,unit:c,year:i,month:f.monthMod(r+1)});for(var h=a,d=s,p=0;p1){l=(c.determineDaysOfMonths(i+1,e.minYear)-r+1)*o,s=f.monthMod(i+1);var d=n+h,p=f.monthMod(s),g=s;0===s&&(u="year",g=d,p=1,d+=h+=1),this.timeScaleArray.push({position:l,value:g,unit:u,year:d,month:p})}else this.timeScaleArray.push({position:l,value:s,unit:u,year:n,month:f.monthMod(i)});for(var b=s+1,y=l,v=0,m=1;va.determineDaysOfMonths(e+1,r)?(c=1,s="month",d=e+=1,e):e},h=(24-e.minHour)*n,d=l,p=u(c,r,i);0===e.minHour&&1===e.minDate?(h=0,d=f.monthMod(e.minMonth),s="month",c=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(h=0,l=e.minDate,d=l,p=u(c=l,r,i)),this.timeScaleArray.push({position:h,value:d,unit:s,year:this._getYear(i,p,0),month:f.monthMod(p),day:c});for(var g=h,b=0;bs.determineDaysOfMonths(e+1,n)&&(b=1,e+=1),{month:e,date:b}},u=function(t,e){return t>s.determineDaysOfMonths(e+1,n)?e+=1:e},h=60-(e.minMinute+e.minSecond/60),d=h*o,p=e.minHour+1,g=p;60===h&&(d=0,g=p=e.minHour);var b=r;g>=24&&(g=0,l="day",p=b+=1);var y=c(b,i).month;y=u(b,y),this.timeScaleArray.push({position:d,value:p,unit:l,day:b,hour:g,year:n,month:f.monthMod(y)}),g++;for(var v=d,m=0;m=24&&(g=0,l="day",y=c(b+=1,y).month,y=u(b,y));var x=this._getYear(n,y,0);v=60*o+v;var w=0===g?b:g;this.timeScaleArray.push({position:v,value:w,unit:l,hour:g,day:b,year:x,month:f.monthMod(y)}),g++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,r=t.currentSecond,i=t.currentMinute,n=t.currentHour,o=t.currentDate,a=t.currentMonth,s=t.currentYear,l=t.minutesWidthOnXAxis,c=t.secondsWidthOnXAxis,u=t.numberOfMinutes,h=i+1,d=o,p=a,g=s,b=n,y=(60-r-e/1e3)*c,v=0;v=60&&(h=0,24===(b+=1)&&(b=0)),this.timeScaleArray.push({position:y,value:h,unit:"minute",hour:b,minute:h,day:d,year:this._getYear(g,p,0),month:f.monthMod(p)}),y+=l,h++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,r=t.currentSecond,i=t.currentMinute,n=t.currentHour,o=t.currentDate,a=t.currentMonth,s=t.currentYear,l=t.secondsWidthOnXAxis,c=t.numberOfSeconds,u=r+1,h=i,d=o,p=a,g=s,b=n,y=(1e3-e)/1e3*l,v=0;v=60&&(u=0,++h>=60&&(h=0,24==++b&&(b=0))),this.timeScaleArray.push({position:y,value:u,unit:"second",hour:b,minute:h,second:u,day:d,year:this._getYear(g,p,0),month:f.monthMod(p)}),y+=l,u++}},{key:"createRawDateString",value:function(t,e){var r=t.year;return 0===t.month&&(t.month=1),r+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?r+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":r+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?r+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":r+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?r+=":"+("0"+e).slice(-2):r+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?r+=":"+("0"+e).slice(-2):r+=":00",this.utc&&(r+=".000Z"),r}},{key:"formatDates",value:function(t){var e=this,r=this.w;return t.map((function(t){var i=t.value.toString(),n=new Vc(e.ctx),o=e.createRawDateString(t,i),a=n.getDate(n.parseDate(o));if(e.utc||(a=n.getDate(n.parseDateWithTimezone(o))),void 0===r.config.xaxis.labels.format){var s="dd MMM",l=r.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(s=l.year),"month"===t.unit&&(s=l.month),"day"===t.unit&&(s=l.day),"hour"===t.unit&&(s=l.hour),"minute"===t.unit&&(s=l.minute),"second"===t.unit&&(s=l.second),i=n.formatDate(a,s)}else i=n.formatDate(a,r.config.xaxis.labels.format);return{dateString:o,position:t.position,value:i,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,r=this,i=new Pc(this.ctx),n=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(n=!0,e=i.getTextRects(t[0].value).width);var o=0,a=t.map((function(a,s){if(s>0&&r.w.config.xaxis.labels.hideOverlappingLabels){var l=n?e:i.getTextRects(t[o].value).width,c=t[o].position;return a.position>c+l+10?(o=s,a):null}return a}));return a.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,r){return t+Math.floor(e/12)+r}}],r&&Lb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();const zb=Rb;function Xb(t){return Xb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xb(t)}function Db(t){return function(t){if(Array.isArray(t))return Yb(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Yb(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Yb(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Yb(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r0&&(l&&console.warn("Chart or series type ".concat(l," cannot appear with other chart or series types.")),a.column.series.length>0&&n.plotOptions.bar.horizontal&&(c-=a.column.series.length,a.column={series:[],i:[]},r.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),o.comboCharts||(o.comboCharts=c>0);var u=new kb(i,e),h=new dg(i,e);i.pie=new Lg(i);var f=new $g(i);i.rangeBar=new lb(i,e);var d=new Hg(i),p=[];if(o.comboCharts){var g,b,y=new Mc(i);if(a.area.series.length>0&&(g=p).push.apply(g,Db(y.drawSeriesByGroup(a.area,o.areaGroups,"area",u))),a.column.series.length>0)if(n.chart.stacked){var v=new eg(i,e);p.push(v.draw(a.column.series,a.column.i))}else i.bar=new Np(i,e),p.push(i.bar.draw(a.column.series,a.column.i));if(a.rangeArea.series.length>0&&p.push(u.draw(a.rangeArea.series,"rangeArea",a.rangeArea.i,a.rangeArea.seriesRangeEnd)),a.line.series.length>0&&(b=p).push.apply(b,Db(y.drawSeriesByGroup(a.line,o.lineGroups,"line",u))),a.candlestick.series.length>0&&p.push(h.draw(a.candlestick.series,"candlestick",a.candlestick.i)),a.boxPlot.series.length>0&&p.push(h.draw(a.boxPlot.series,"boxPlot",a.boxPlot.i)),a.rangeBar.series.length>0&&p.push(i.rangeBar.draw(a.rangeBar.series,a.rangeBar.i)),a.scatter.series.length>0){var m=new kb(i,e,!0);p.push(m.draw(a.scatter.series,"scatter",a.scatter.i))}if(a.bubble.series.length>0){var x=new kb(i,e,!0);p.push(x.draw(a.bubble.series,"bubble",a.bubble.i))}}else switch(n.chart.type){case"line":p=u.draw(o.series,"line");break;case"area":p=u.draw(o.series,"area");break;case"bar":n.chart.stacked?p=new eg(i,e).draw(o.series):(i.bar=new Np(i,e),p=i.bar.draw(o.series));break;case"candlestick":p=new dg(i,e).draw(o.series,"candlestick");break;case"boxPlot":p=new dg(i,e).draw(o.series,n.chart.type);break;case"rangeBar":p=i.rangeBar.draw(o.series);break;case"rangeArea":p=u.draw(o.seriesRangeStart,"rangeArea",void 0,o.seriesRangeEnd);break;case"heatmap":p=new kg(i,e).draw(o.series);break;case"treemap":p=new Cb(i,e).draw(o.series);break;case"pie":case"donut":case"polarArea":p=i.pie.draw(o.series);break;case"radialBar":p=f.draw(o.series);break;case"radar":p=d.draw(o.series);break;default:p=u.draw(o.series)}return p}},{key:"setSVGDimensions",value:function(){var t=this.w,e=t.globals,r=t.config;r.chart.width=r.chart.width||"100%",r.chart.height=r.chart.height||"auto",e.svgWidth=r.chart.width,e.svgHeight=r.chart.height;var i=f.getDimensions(this.el),n=r.chart.width.toString().split(/[0-9]+/g).pop();"%"===n?f.isNumber(i[0])&&(0===i[0].width&&(i=f.getDimensions(this.el.parentNode)),e.svgWidth=i[0]*parseInt(r.chart.width,10)/100):"px"!==n&&""!==n||(e.svgWidth=parseInt(r.chart.width,10));var o=String(r.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===o){var a=f.getDimensions(this.el.parentNode);e.svgHeight=a[1]*parseInt(r.chart.height,10)/100}else e.svgHeight=parseInt(r.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Pc.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==o){var s=r.chart.sparkline.enabled?0:e.axisCharts?r.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(e.svgHeight+s,"px")}e.dom.elWrap.style.width="".concat(e.svgWidth,"px"),e.dom.elWrap.style.height="".concat(e.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,r=t.translateX;Pc.setAttrs(t.dom.elGraphical.node,{transform:"translate(".concat(r,", ").concat(e,")")})}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,r=0,i=t.config.chart.sparkline.enabled?1:15;i+=t.config.grid.padding.bottom,["top","bottom"].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(r=new od(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var n=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),o=2.05*t.globals.radialSize;if(n&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var a=f.getBoundingClientRect(n);o=a.bottom;var s=a.bottom-a.top;o=Math.max(2.05*t.globals.radialSize,s)}var l=Math.ceil(o+e.translateY+r+i);e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).includes("%")||(e.dom.elWrap.style.height="".concat(l,"px"),Pc.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(l,"px"))}},{key:"coreCalculations",value:function(){new Wh(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(){return[]}))},r=new Ru,i=this.w.globals;r.initGlobalVars(i),i.seriesXvalues=e(),i.seriesYvalues=e()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var t=this.w,e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new hf(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new hf(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new zb(this.ctx);var r=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?r=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(r=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(r)}e=new Mc(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var r=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];r.forEach((function(e){var r=ApexCharts.getChartByID(e);r.w.globals.brushSource=t.ctx,"function"!=typeof r.w.config.chart.events.zoomed&&(r.w.config.chart.events.zoomed=function(){return t.updateSourceChart(r)}),"function"!=typeof r.w.config.chart.events.scrolled&&(r.w.config.chart.events.scrolled=function(){return t.updateSourceChart(r)})})),e.config.chart.events.selection=function(t,e){r.forEach((function(t){ApexCharts.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:e.xaxis.min,max:e.xaxis.max}},!1,!1,!1,!1)}))}}}}],r&&Hb(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Nb(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function Wb(t){for(var e=1;e1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(a){var s=[e.ctx];n&&(s=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(s=[e.ctx],e.ctx.w.globals.isExecCalled=!1),s.forEach((function(n,l){var c=n.w;if(c.globals.shouldAnimate=i,r||(c.globals.resized=!0,c.globals.dataChanged=!0,i&&n.series.getPreviousPaths()),t&&"object"===Vb(t)&&(n.config=new Mu(t),t=Mc.extendArrayProps(n.config,t,c),n.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,c.config=f.extend(c.config,t),o&&(c.globals.lastXAxis=t.xaxis?f.clone(t.xaxis):[],c.globals.lastYAxis=t.yaxis?f.clone(t.yaxis):[],c.globals.initialConfig=f.extend({},c.config),c.globals.initialSeries=f.clone(c.config.series),t.series))){for(var u=0;u2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(n){var o,a=r.w;return a.globals.shouldAnimate=e,a.globals.dataChanged=!0,e&&r.ctx.series.getPreviousPaths(),a.globals.axisCharts?(o=t.map((function(t,e){return r._extendSeries(t,e)})),0===o.length&&(o=[{data:[]}]),a.config.series=o):a.config.series=t.slice(),i&&(a.globals.initialConfig.series=f.clone(a.config.series),a.globals.initialSeries=f.clone(a.config.series)),r.ctx.update().then((function(){n(r.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var r=this.w,i=r.config.series[e];return Wb(Wb({},r.config.series[e]),{},{name:t.name?t.name:null==i?void 0:i.name,color:t.color?t.color:null==i?void 0:i.color,type:t.type?t.type:null==i?void 0:i.type,group:t.group?t.group:null==i?void 0:i.group,hidden:void 0!==t.hidden?t.hidden:null==i?void 0:i.hidden,data:t.data?t.data:null==i?void 0:i.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var r=this.w,i=null,n=".apexcharts-series[data\\:realIndex='".concat(t,"']");return r.globals.axisCharts?i=r.globals.dom.Paper.findOne("".concat(n," path[j='").concat(e,"'], ").concat(n," circle[j='").concat(e,"'], ").concat(n," rect[j='").concat(e,"']")):void 0===e&&(i=r.globals.dom.Paper.findOne("".concat(n," path[j='").concat(t,"']")),"pie"!==r.config.chart.type&&"polarArea"!==r.config.chart.type&&"donut"!==r.config.chart.type||this.ctx.pie.pieClicked(t)),i?(new Pc(this.ctx).pathMouseDown(i,null),i.node?i.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(r){void 0!==t.xaxis[r]&&(e.config.xaxis[r]=t.xaxis[r],e.globals.lastXAxis[r]=t.xaxis[r])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var r=new Cu(t);t=r.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,r){t.yaxis[r].min=0,t.yaxis[r].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,r=this.w,i=r.globals.lastXAxis,n=r.globals.lastYAxis;t&&t.xaxis&&(i=t.xaxis),t&&t.yaxis&&(n=t.yaxis),r.config.xaxis.min=i.min,r.config.xaxis.max=i.max;r.config.yaxis.map((function(t,i){r.globals.zoomed||void 0!==n[i]?function(t){void 0!==n[t]&&(r.config.yaxis[t].min=n[t].min,r.config.yaxis[t].max=n[t].max)}(i):void 0!==e.ctx.opts.yaxis[i]&&(t.min=e.ctx.opts.yaxis[i].min,t.max=e.ctx.opts.yaxis[i].max)}))}}],r&&Ub(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function $b(t){return $b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$b(t)}function Jb(t,e){for(var r=0;r0&&arguments[0]!==c?arguments[0]:[],n=arguments.length>1?arguments[1]:c,o=arguments.length>2?arguments[2]:c,a=arguments.length>3?arguments[3]:c,s=arguments.length>4?arguments[4]:c,l=arguments.length>5?arguments[5]:c,c=arguments.length>6?arguments[6]:c,u=t.slice(n,o||c),h=a.slice(s,l||c),f=0,d={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};u[f]=e.call(d,u[f]),h[f]=e.call(p,h[f]),u[f][0]!=h[f][0]||"M"==u[f][0]||"A"==u[f][0]&&(u[f][4]!=h[f][4]||u[f][5]!=h[f][5])?(Array.prototype.splice.apply(u,[f,1].concat(i.call(d,u[f]))),Array.prototype.splice.apply(h,[f,1].concat(i.call(p,h[f])))):(u[f]=r.call(d,u[f]),h[f]=r.call(p,h[f])),++f!=u.length||f!=h.length;)f==u.length&&u.push(["C",d.pos[0],d.pos[1],d.pos[0],d.pos[1],d.pos[0],d.pos[1]]),f==h.length&&h.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]]);return{start:u,dest:h}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function r(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function i(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var r,i,n,o,a,s,l,c,u,h,f,d,p,g,b,y,v,m,x,w,S,k,A,O,P,C,j=Math.abs(e[1]),T=Math.abs(e[2]),E=e[3]%360,M=e[4],L=e[5],I=e[6],_=e[7],R=new Rt(t),z=new Rt(I,_),X=[];if(0===j||0===T||R.x===z.x&&R.y===z.y)return[["C",R.x,R.y,z.x,z.y,z.x,z.y]];for((i=(r=new Rt((R.x-z.x)/2,(R.y-z.y)/2).transform((new Ht).rotate(E))).x*r.x/(j*j)+r.y*r.y/(T*T))>1&&(j*=i=Math.sqrt(i),T*=i),n=(new Ht).rotate(E).scale(1/j,1/T).rotate(-E),R=R.transform(n),s=(o=[(z=z.transform(n)).x-R.x,z.y-R.y])[0]*o[0]+o[1]*o[1],a=Math.sqrt(s),o[0]/=a,o[1]/=a,l=s<4?Math.sqrt(1-s/4):0,M===L&&(l*=-1),c=new Rt((z.x+R.x)/2+l*-o[1],(z.y+R.y)/2+l*o[0]),u=new Rt(R.x-c.x,R.y-c.y),h=new Rt(z.x-c.x,z.y-c.y),f=Math.acos(u.x/Math.sqrt(u.x*u.x+u.y*u.y)),u.y<0&&(f*=-1),d=Math.acos(h.x/Math.sqrt(h.x*h.x+h.y*h.y)),h.y<0&&(d*=-1),L&&f>d&&(d+=2*Math.PI),!L&&f0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(!1===e)return!1;for(var r=e,i=t.length;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r3&&void 0!==arguments[3]?arguments[3]:null;return function(n){n.preventDefault(),n.stopPropagation();var o=n.pageX||n.touches[0].pageX,a=n.pageY||n.touches[0].pageY;e.fire(t,{x:o,y:a,event:n,index:i,points:r})}}function ly(t,e){var r,i,n=(i=2,function(t){if(Array.isArray(t))return t}(r=t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}(r,i)||function(t,e){if(t){if("string"==typeof t)return ay(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ay(t,e):void 0}}(r,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],a=n[1],s=e.a,l=e.b,c=e.c,u=e.d;return[o*s+a*c+e.e,o*l+a*u+e.f]}it(ar,{draggable:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return(this.remember("_draggable")||new ty(this)).init(t),this}});var cy=function(){function t(e){ry(this,t),this.el=e,e.remember("_selectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return ny(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.handlePoints)}},{key:"createResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.createHandle.call(t,t.selection,e,r,i,n),t.selection.get(r+1).addClass("svg_select_handle svg_select_handle_"+n).on("mousedown.selection touchstart.selection",sy(n,t.el,t.handlePoints,r))}))}},{key:"createHandleFn",value:function(t){t.polyline()}},{key:"updateHandleFn",value:function(t,e,r,i){var n=i.at(r-1),o=i[(r+1)%i.length],a=e,s=[a[0]-n[0],a[1]-n[1]],l=[a[0]-o[0],a[1]-o[1]],c=Math.sqrt(s[0]*s[0]+s[1]*s[1]),u=Math.sqrt(l[0]*l[0]+l[1]*l[1]),h=[s[0]/c,s[1]/c],f=[l[0]/u,l[1]/u],d=[a[0]-10*h[0],a[1]-10*h[1]],p=[a[0]-10*f[0],a[1]-10*f[1]];t.plot([d,a,p])}},{key:"updateResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.updateHandle.call(t,t.selection.get(r+1),e,r,i,n)}))}},{key:"createRotFn",value:function(t){t.line(),t.circle(5)}},{key:"getPoint",value:function(t){return this.handlePoints[this.order.indexOf(t)]}},{key:"getPointHandle",value:function(t){return this.selection.get(this.order.indexOf(t)+1)}},{key:"updateRotFn",value:function(t,e){var r=this.getPoint("t");t.get(0).plot(r[0],r[1],e[0],e[1]),t.get(1).center(e[0],e[1])}},{key:"createRotationHandle",value:function(){var t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",sy("rot",this.el,this.handlePoints));this.createRot.call(this,t)}},{key:"updateRotationHandle",value:function(){var t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}},{key:"updatePoints",value:function(){var t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((function(t){return ly(t,e)})),this.rotationPoint=ly(this.getRotationPoint(t),e)}},{key:"getHandlePoints",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.x,r=t.x2,i=t.y,n=t.y2,o=t.cx,a=t.cy;return[[e,i],[o,i],[r,i],[r,a],[r,n],[o,n],[e,n],[e,a]]}},{key:"getRotationPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.y;return[t.cx,e-20]}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}]),t}(),uy=function(){function t(e){ry(this,t),this.el=e,e.remember("_pointSelectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return ny(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.points)}},{key:"createPointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.createHandle.call(t,t.selection,e,r,i),t.selection.get(r+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",sy("point",t.el,t.points,r))}))}},{key:"createHandleFn",value:function(t){t.circle(5)}},{key:"updateHandleFn",value:function(t,e){t.center(e[0],e[1])}},{key:"updatePointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.updateHandle.call(t,t.selection.get(r+1),e,r,i)}))}},{key:"updatePoints",value:function(){var t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((function(e){return ly(e,t)}))}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}}]),t}(),hy=function(t){return function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===ey(e)&&(r=e,e=!0);var i=this.remember("_"+t.name);return i||(e.prototype instanceof cy?(i=new e(this),e=!0):i=new t(this),this.remember("_"+t.name,i)),i.active(e,r),this}};function fy(t){return fy="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fy(t)}function dy(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function py(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,i=Array(e);r3&&void 0!==arguments[3]?arguments[3]:null;return function(n){n.preventDefault(),n.stopPropagation();var o=n.pageX||n.touches[0].pageX,a=n.pageY||n.touches[0].pageY;e.fire(t,{x:o,y:a,event:n,index:i,points:r})}}function xy(t,e){var r=yy(t,2),i=r[0],n=r[1],o=e.a,a=e.b,s=e.c,l=e.d;return[i*o+n*s+e.e,i*a+n*l+e.f]}it(ar,{select:hy(cy)}),it([Eo,zo,on],{pointSelect:hy(uy)});var wy=function(){function t(e){dy(this,t),this.el=e,e.remember("_selectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return gy(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.handlePoints)}},{key:"createResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.createHandle.call(t,t.selection,e,r,i,n),t.selection.get(r+1).addClass("svg_select_handle svg_select_handle_"+n).on("mousedown.selection touchstart.selection",my(n,t.el,t.handlePoints,r))}))}},{key:"createHandleFn",value:function(t){t.polyline()}},{key:"updateHandleFn",value:function(t,e,r,i){var n=i.at(r-1),o=i[(r+1)%i.length],a=e,s=[a[0]-n[0],a[1]-n[1]],l=[a[0]-o[0],a[1]-o[1]],c=Math.sqrt(s[0]*s[0]+s[1]*s[1]),u=Math.sqrt(l[0]*l[0]+l[1]*l[1]),h=[s[0]/c,s[1]/c],f=[l[0]/u,l[1]/u],d=[a[0]-10*h[0],a[1]-10*h[1]],p=[a[0]-10*f[0],a[1]-10*f[1]];t.plot([d,a,p])}},{key:"updateResizeHandles",value:function(){var t=this;this.handlePoints.forEach((function(e,r,i){var n=t.order[r];t.updateHandle.call(t,t.selection.get(r+1),e,r,i,n)}))}},{key:"createRotFn",value:function(t){t.line(),t.circle(5)}},{key:"getPoint",value:function(t){return this.handlePoints[this.order.indexOf(t)]}},{key:"getPointHandle",value:function(t){return this.selection.get(this.order.indexOf(t)+1)}},{key:"updateRotFn",value:function(t,e){var r=this.getPoint("t");t.get(0).plot(r[0],r[1],e[0],e[1]),t.get(1).center(e[0],e[1])}},{key:"createRotationHandle",value:function(){var t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",my("rot",this.el,this.handlePoints));this.createRot.call(this,t)}},{key:"updateRotationHandle",value:function(){var t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}},{key:"updatePoints",value:function(){var t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((function(t){return xy(t,e)})),this.rotationPoint=xy(this.getRotationPoint(t),e)}},{key:"getHandlePoints",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.x,r=t.x2,i=t.y,n=t.y2,o=t.cx,a=t.cy;return[[e,i],[o,i],[r,i],[r,a],[r,n],[o,n],[e,n],[e,a]]}},{key:"getRotationPoint",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.el.bbox(),e=t.y;return[t.cx,e-20]}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}]),t}(),Sy=function(){function t(e){dy(this,t),this.el=e,e.remember("_pointSelectHandler",this),this.selection=new Js,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);var r=N();this.observer=new r.MutationObserver(this.mutationHandler)}return gy(t,[{key:"init",value:function(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}},{key:"active",value:function(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}},{key:"createSelection",value:function(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}},{key:"updateSelection",value:function(){this.selection.get(0).plot(this.points)}},{key:"createPointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.createHandle.call(t,t.selection,e,r,i),t.selection.get(r+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",my("point",t.el,t.points,r))}))}},{key:"createHandleFn",value:function(t){t.circle(5)}},{key:"updateHandleFn",value:function(t,e){t.center(e[0],e[1])}},{key:"updatePointHandles",value:function(){var t=this;this.points.forEach((function(e,r,i){t.updateHandle.call(t,t.selection.get(r+1),e,r,i)}))}},{key:"updatePoints",value:function(){var t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((function(e){return xy(e,t)}))}},{key:"mutationHandler",value:function(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}}]),t}(),ky=function(t){return function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===fy(e)&&(r=e,e=!0);var i=this.remember("_"+t.name);return i||(e.prototype instanceof wy?(i=new e(this),e=!0):i=new t(this),this.remember("_"+t.name,i)),i.active(e,r),this}};it(ar,{select:ky(wy)}),it([Eo,zo,on],{pointSelect:ky(Sy)});var Ay=function(t){return t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}},Oy=function(t){for(var e=1/0,r=1/0,i=-1/0,n=-1/0,o=0;o0&&void 0!==arguments[0])||arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};"object"===fy(t)&&(e=t,t=!0);var r=this.remember("_ResizeHandler");return r||(t.prototype instanceof Py?(r=new t(this),t=!0):r=new Py(this),this.remember("_resizeHandler",r)),r.active(t,e),this}}),void 0===window.SVG&&(window.SVG=Zl),void 0===window.Apex&&(window.Apex={});var Ey=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ctx=e,this.w=e.w}var e,r;return e=t,(r=[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new b(this.ctx),this.ctx.axes=new sf(this.ctx),this.ctx.core=new Bb(this.ctx.el,this.ctx),this.ctx.config=new Mu({}),this.ctx.data=new yh(this.ctx),this.ctx.grid=new _h(this.ctx),this.ctx.graphics=new Pc(this.ctx),this.ctx.coreUtils=new Mc(this.ctx),this.ctx.crosshairs=new hf(this.ctx),this.ctx.events=new Qh(this.ctx),this.ctx.exports=new Ah(this.ctx),this.ctx.fill=new Zu(this.ctx),this.ctx.localization=new rf(this.ctx),this.ctx.options=new pu,this.ctx.responsive=new gf(this.ctx),this.ctx.series=new fh(this.ctx),this.ctx.theme=new xf(this.ctx),this.ctx.formatters=new Jc(this.ctx),this.ctx.titleSubtitle=new Af(this.ctx),this.ctx.legend=new od(this.ctx),this.ctx.toolbar=new kd(this.ctx),this.ctx.tooltip=new mp(this.ctx),this.ctx.dimensions=new Uf(this.ctx),this.ctx.updateHelpers=new Zb(this.ctx),this.ctx.zoomPanSelection=new _d(this.ctx),this.ctx.w.globals.tooltip=new mp(this.ctx)}}])&&jy(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function My(t){return My="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},My(t)}function Ly(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:null,r=this,i=r.w;return new Promise((function(n,o){if(null===r.el)return o(new Error("Not enough data to display or target element not found"));(null===e||i.globals.allSeriesCollapsed)&&r.series.handleNoData(),r.grid=new _h(r);var a,s,l=r.grid.drawGrid();if(r.annotations=new vu(r),r.annotations.drawImageAnnos(),r.annotations.drawTextAnnos(),"back"===i.config.grid.position&&(l&&i.globals.dom.elGraphical.add(l.el),null!=l&&null!==(a=l.elGridBorders)&&void 0!==a&&a.node&&i.globals.dom.elGraphical.add(l.elGridBorders)),Array.isArray(e.elGraph))for(var c=0;c0&&i.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),i.globals.axisCharts||i.globals.noData||r.core.resizeNonAxisCharts(),n(r)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,e){var r=Ry.get(e);r&&(r.disconnect(),Ry.delete(e))}(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,r){e.id===f.escapeString(t)&&Apex._chartInstances.splice(r,1)})),new _y(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],a=this.w;return a.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,r){return e.updateHelpers._extendSeries(t,r)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),a.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,r,i,n,o)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,r)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],i=this.w.config.series.slice();return i.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,e,r)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this;r.w.globals.dataChanged=!0,r.series.getPreviousPaths();for(var i=r.w.config.series.slice(),n=0;n0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;r&&(i=r),i.annotations.addXaxisAnnotationExternal(t,e,i)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;r&&(i=r),i.annotations.addYaxisAnnotationExternal(t,e,i)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,i=this;r&&(i=r),i.annotations.addPointAnnotationExternal(t,e,i)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,r=this;e&&(r=e),r.annotations.removeAnnotation(r,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Wh(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Wh(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Ah(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ah(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],i=[{key:"getChartByID",value:function(t){var e=f.escapeString(t);if(Apex._chartInstances){var r=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return r&&r.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),r=0;r2?n-2:0),a=2;at.length)&&(e=t.length);for(var i=0,a=Array(e);i=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,n=!0,o=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){o=!0,r=t},f:function(){try{n||null==i.return||i.return()}finally{if(o)throw r}}}}function n(t){var i=c();return function(){var a,s=l(t);if(i){var r=l(this).constructor;a=Reflect.construct(s,arguments,r)}else a=s.apply(this,arguments);return function(t,i){if(i&&("object"==typeof i||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return e(t)}(this,a)}}function o(t,e,i){return(e=x(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function d(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function u(t){for(var e=1;e>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-r)*s)+r)+256*(Math.round((a-n)*s)+n)+(Math.round((a-o)*s)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,i){return t.isColorHex(i)?this.shadeHexColor(e,i):this.shadeRGBColor(e,i)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===b(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,i=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var i="",a=t<0?"-":"",s=e[0].replace(".",""),r=Number(e[1])+1;if(r<0){for(i=a+"0.";r++;)i+="0";return i+s.replace(/^-/,"")}for(r-=s.length;r--;)i+="0";return s+i}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),i=t.clientHeight,a=t.clientWidth;return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[a-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),i]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:"x",i=t.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,i){if(i>=t.length)for(var a=i-t.length+1;a--;)t.push(void 0);return t.splice(i,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style.key=e[i])}},{key:"preciseAddition",value:function(t,e){var i=(String(t).split(".")[1]||"").length,a=(String(e).split(".")[1]||"").length,s=Math.pow(10,Math.max(i,a));return(Math.round(t*s)+Math.round(e*s))/s}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*a),e=Math.round(Math.abs(e)*a);e;){var s=e;e=t%e,t=s}return t/a}},{key:"getPrimeFactors",value:function(t){for(var e=[],i=2;t>=2;)t%i==0?(e.push(i),t/=i):i++;return e}},{key:"mod",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*a))%(e=Math.round(Math.abs(e)*a))/a}}]),t}(),y=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"animateLine",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animateMarker",value:function(t,e,i,a){t.attr({opacity:0}).animate(e).attr({opacity:1}).after((function(){a()}))}},{key:"animateRect",value:function(t,e,i,a,s){t.attr(e).animate(a).attr(i).after((function(){return s()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.realIndex,a=t.j,s=t.fill,r=t.pathFrom,n=t.pathTo,o=t.speed,l=t.delay,h=this.w,c=0;h.config.chart.animations.animateGradually.enabled&&(c=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&"bar"!==h.config.chart.type&&(c=0),this.morphSVG(e,i,a,"line"!==h.config.chart.type||h.globals.comboCharts?s:"stroke",r,n,o,l*c)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){var e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,i,a,s,r,n,o){var l=this,h=this.w;s||(s=t.attr("pathFrom")),r||(r=t.attr("pathTo"));var c=function(t){return"radar"===h.config.chart.type&&(n=1),"M 0 ".concat(h.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=c()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=c()),h.globals.shouldAnimate||(n=1),t.plot(s).animate(1,o).plot(s).animate(n,o).plot(r).after((function(){v.isNumber(i)?i===h.globals.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&l.animationCompleted(t):"none"!==a&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&e===h.globals.series.length-1||h.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}]),t}();const w={},k=[];function A(t,e){if(Array.isArray(t))for(const i of t)A(i,e);else if("object"!=typeof t)S(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(const e in t)A(e,t[e])}function C(t){return w[t]||{}}function S(t){k.push(...t)}function L(t,e){let i;const a=t.length,s=[];for(i=0;iz.has(t.nodeName),R=(t,e,i={})=>{const a={...e};for(const t in a)a[t].valueOf()===i[t]&&delete a[t];Object.keys(a).length?t.node.setAttribute("data-svgjs",JSON.stringify(a)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},Y="http://www.w3.org/2000/svg",E="http://www.w3.org/2000/xmlns/",H="http://www.w3.org/1999/xlink",O={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function F(){return O.window}let D=class{};const _={},N="___SYMBOL___ROOT___";function W(t,e=Y){return O.document.createElementNS(e,t)}function B(t,e=!1){if(t instanceof D)return t;if("object"==typeof t)return U(t);if(null==t)return new _[N];if("string"==typeof t&&"<"!==t.charAt(0))return U(O.document.querySelector(t));const i=e?O.document.createElement("div"):W("svg");return i.innerHTML=t,t=U(i.firstChild),i.removeChild(i.firstChild),t}function G(t,e){return e&&(e instanceof O.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:W(t)}function V(t){if(!t)return null;if(t.instance instanceof D)return t.instance;if("#document-fragment"===t.nodeName)return new _.Fragment(t);let e=P(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":_[e]||(e="Dom"),new _[e](t)}let U=V;function q(t,e=t.name,i=!1){return _[e]=t,i&&(_[N]=t),S(Object.getOwnPropertyNames(t.prototype)),t}let Z=1e3;function $(t){return"Svgjs"+P(t)+Z++}function J(t){for(let e=t.children.length-1;e>=0;e--)J(t.children[e]);return t.id?(t.id=$(t.nodeName),t):t}function Q(t,e){let i,a;for(a=(t=Array.isArray(t)?t:[t]).length-1;a>=0;a--)for(i in e)t[a].prototype[i]=e[i]}function K(t){return function(...e){const i=e[e.length-1];return!i||i.constructor!==Object||i instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(i)}}A("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=B(t)).before(this),this},insertAfter:function(t){return(t=B(t)).after(this),this}});const tt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,et=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,it=/rgb\((\d+),(\d+),(\d+)\)/,at=/(#[a-z_][a-z0-9\-_]*)/i,st=/\)\s*,?\s*/,rt=/\s/g,nt=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ot=/^rgb\(/,lt=/^(\s+)?$/,ht=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ct=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,dt=/[\s,]+/,ut=/[MLHVCSQTAZ]/i;function gt(t){const e=Math.round(t),i=Math.max(0,Math.min(255,e)).toString(16);return 1===i.length?"0"+i:i}function pt(t,e){for(let i=e.length;i--;)if(null==t[e[i]])return!1;return!0}function ft(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}A("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(dt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),A("Dom",{css:function(t,e){const i={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);i[e[0]]=e[1]})),i;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;i[e]=this.node.style.getPropertyValue(t)}return i}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||lt.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||lt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),A("Dom",{data:function(t,e,i){if(null==t)return this.data(L(function(t,e){let i;const a=t.length,s=[];for(i=0;i0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const i of t)e[i]=this.data(i);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===i||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),A("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class xt{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof xt||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:i,round:a,sin:s,PI:r}=Math;if("vibrant"===t){const t=24*i()+57,e=38*i()+45,a=360*i();return new xt(t,e,a,"lch")}if("sine"===t){const t=a(80*s(2*r*(e=null==e?i():e)/.5+.01)+150),n=a(50*s(2*r*e/.5+4.6)+200),o=a(100*s(2*r*e/.5+2.3)+150);return new xt(t,n,o)}if("pastel"===t){const t=8*i()+86,e=17*i()+9,a=360*i();return new xt(t,e,a,"lch")}if("dark"===t){const t=10+10*i(),e=50*i()+86,a=360*i();return new xt(t,e,a,"lch")}if("rgb"===t){const t=255*i(),e=255*i(),a=255*i();return new xt(t,e,a)}if("lab"===t){const t=100*i(),e=256*i()-128,a=256*i()-128;return new xt(t,e,a,"lab")}if("grey"===t){const t=255*i();return new xt(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(nt.test(t)||ot.test(t))}cmyk(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.min(1-a,1-s,1-r);if(1===n)return new xt(0,0,0,1,"cmyk");return new xt((1-a-n)/(1-n),(1-s-n)/(1-n),(1-r-n)/(1-n),n,"cmyk")}hsl(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.max(a,s,r),o=Math.min(a,s,r),l=(n+o)/2,h=n===o,c=n-o;return new xt(360*(h?0:n===a?((s-r)/c+(s.5?c/(2-n-o):c/(n+o)),100*l,"hsl")}init(t=0,e=0,i=0,a=0,s="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)s="string"==typeof a?a:s,a="string"==typeof a?0:a,Object.assign(this,{_a:t,_b:e,_c:i,_d:a,space:s});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const i=function(t,e){const i=pt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:pt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:pt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:pt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:pt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:pt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return i.space=e||i.space,i}(t,e);Object.assign(this,i)}else if("string"==typeof t)if(ot.test(t)){const e=t.replace(rt,""),[i,a,s]=it.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}else{if(!nt.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,i,a,s]=et.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}}const{_a:r,_b:n,_c:o,_d:l}=this,h="rgb"===this.space?{r:r,g:n,b:o}:"xyz"===this.space?{x:r,y:n,z:o}:"hsl"===this.space?{h:r,s:n,l:o}:"lab"===this.space?{l:r,a:n,b:o}:"lch"===this.space?{l:r,c:n,h:o}:"cmyk"===this.space?{c:r,m:n,y:o,k:l}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:i}=this.xyz();return new xt(116*e-16,500*(t-e),200*(e-i),"lab")}lch(){const{l:t,a:e,b:i}=this.lab(),a=Math.sqrt(e**2+i**2);let s=180*Math.atan2(i,e)/Math.PI;s<0&&(s*=-1,s=360-s);return new xt(t,a,s,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:a,a:s,b:r}=this;if("lch"===this.space){const{c:t,h:e}=this,i=Math.PI/180;s=t*Math.cos(i*e),r=t*Math.sin(i*e)}const n=(a+16)/116,o=s/500+n,l=n-r/200,h=16/116,c=.008856,d=7.787;t=.95047*(o**3>c?o**3:(o-h)/d),e=1*(n**3>c?n**3:(n-h)/d),i=1.08883*(l**3>c?l**3:(l-h)/d)}const a=3.2406*t+-1.5372*e+-.4986*i,s=-.9689*t+1.8758*e+.0415*i,r=.0557*t+-.204*e+1.057*i,n=Math.pow,o=.0031308,l=a>o?1.055*n(a,1/2.4)-.055:12.92*a,h=s>o?1.055*n(s,1/2.4)-.055:12.92*s,c=r>o?1.055*n(r,1/2.4)-.055:12.92*r;return new xt(255*l,255*h,255*c)}if("hsl"===this.space){let{h:t,s:e,l:i}=this;if(t/=360,e/=100,i/=100,0===e){i*=255;return new xt(i,i,i)}const a=i<.5?i*(1+e):i+e-i*e,s=2*i-a,r=255*ft(s,a,t+1/3),n=255*ft(s,a,t),o=255*ft(s,a,t-1/3);return new xt(r,n,o)}if("cmyk"===this.space){const{c:t,m:e,y:i,k:a}=this,s=255*(1-Math.min(1,t*(1-a)+a)),r=255*(1-Math.min(1,e*(1-a)+a)),n=255*(1-Math.min(1,i*(1-a)+a));return new xt(s,r,n)}return this;var t}toArray(){const{_a:t,_b:e,_c:i,_d:a,space:s}=this;return[t,e,i,a,s]}toHex(){const[t,e,i]=this._clamped().map(gt);return`#${t}${e}${i}`}toRgb(){const[t,e,i]=this._clamped();return`rgb(${t},${e},${i})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,o=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,l=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,h=(.4124*n+.3576*o+.1805*l)/.95047,c=(.2126*n+.7152*o+.0722*l)/1,d=(.0193*n+.1192*o+.9505*l)/1.08883,u=h>.008856?Math.pow(h,1/3):7.787*h+16/116,g=c>.008856?Math.pow(c,1/3):7.787*c+16/116,p=d>.008856?Math.pow(d,1/3):7.787*d+16/116;return new xt(u,g,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:i}=this.rgb(),{max:a,min:s,round:r}=Math;return[t,e,i].map((t=>a(0,s(r(t),255))))}}class bt{constructor(...t){this.init(...t)}clone(){return new bt(this)}init(t,e){const i=0,a=0,s=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==s.x?i:s.x,this.y=null==s.y?a:s.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){vt.isMatrixLike(t)||(t=new vt(t));const{x:e,y:i}=this;return this.x=t.a*e+t.c*i+t.e,this.y=t.b*e+t.d*i+t.f,this}}function mt(t,e,i){return Math.abs(e-t)<(i||1e-6)}class vt{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,i=t.flip&&(e||"x"===t.flip)?-1:1,a=t.flip&&(e||"y"===t.flip)?-1:1,s=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,r=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,n=t.scale&&t.scale.length?t.scale[0]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleX)?t.scaleX*i:i,o=t.scale&&t.scale.length?t.scale[1]*a:isFinite(t.scale)?t.scale*a:isFinite(t.scaleY)?t.scaleY*a:a,l=t.shear||0,h=t.rotate||t.theta||0,c=new bt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),d=c.x,u=c.y,g=new bt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=g.x,f=g.y,x=new bt(t.translate||t.tx||t.translateX,t.ty||t.translateY),b=x.x,m=x.y,v=new bt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:n,scaleY:o,skewX:s,skewY:r,shear:l,theta:h,rx:v.x,ry:v.y,tx:b,ty:m,ox:d,oy:u,px:p,py:f}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,i){const a=t.a*e.a+t.c*e.b,s=t.b*e.a+t.d*e.b,r=t.a*e.c+t.c*e.d,n=t.b*e.c+t.d*e.d,o=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return i.a=a,i.b=s,i.c=r,i.d=n,i.e=o,i.f=l,i}around(t,e,i){return this.clone().aroundO(t,e,i)}aroundO(t,e,i){const a=t||0,s=e||0;return this.translateO(-a,-s).lmultiplyO(i).translateO(a,s)}clone(){return new vt(this)}decompose(t=0,e=0){const i=this.a,a=this.b,s=this.c,r=this.d,n=this.e,o=this.f,l=i*r-a*s,h=l>0?1:-1,c=h*Math.sqrt(i*i+a*a),d=Math.atan2(h*a,h*i),u=180/Math.PI*d,g=Math.cos(d),p=Math.sin(d),f=(i*s+a*r)/l,x=s*c/(f*i-a)||r*c/(f*a+i);return{scaleX:c,scaleY:x,shear:f,rotate:u,translateX:n-t+t*g*c+e*(f*g*c-p*x),translateY:o-e+t*p*c+e*(f*p*c+g*x),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new vt(t);return mt(this.a,e.a)&&mt(this.b,e.b)&&mt(this.c,e.c)&&mt(this.d,e.d)&&mt(this.e,e.e)&&mt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=vt.fromArray([1,0,0,1,0,0]);return t=t instanceof Gt?t.matrixify():"string"==typeof t?vt.fromArray(t.split(dt).map(parseFloat)):Array.isArray(t)?vt.fromArray(t):"object"==typeof t&&vt.isMatrixLike(t)?t:"object"==typeof t?(new vt).transform(t):6===arguments.length?vt.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,i=this.c,a=this.d,s=this.e,r=this.f,n=t*a-e*i;if(!n)throw new Error("Cannot invert "+this);const o=a/n,l=-e/n,h=-i/n,c=t/n,d=-(o*s+h*r),u=-(l*s+c*r);return this.a=o,this.b=l,this.c=h,this.d=c,this.e=d,this.f=u,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(this,e,this)}rotate(t,e,i){return this.clone().rotateO(t,e,i)}rotateO(t,e=0,i=0){t=M(t);const a=Math.cos(t),s=Math.sin(t),{a:r,b:n,c:o,d:l,e:h,f:c}=this;return this.a=r*a-n*s,this.b=n*a+r*s,this.c=o*a-l*s,this.d=l*a+o*s,this.e=h*a-c*s+i*s-e*a+e,this.f=c*a+h*s-e*s-i*a+i,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t);const{a:s,b:r,c:n,d:o,e:l,f:h}=this;return this.a=s*t,this.b=r*e,this.c=n*t,this.d=o*e,this.e=l*t-i*t+i,this.f=h*e-a*e+a,this}shear(t,e,i){return this.clone().shearO(t,e,i)}shearO(t,e=0,i=0){const{a:a,b:s,c:r,d:n,e:o,f:l}=this;return this.a=a+s*t,this.c=r+n*t,this.e=o+l*t-i*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t),t=M(t),e=M(e);const s=Math.tan(t),r=Math.tan(e),{a:n,b:o,c:l,d:h,e:c,f:d}=this;return this.a=n+o*s,this.b=o+n*r,this.c=l+h*s,this.d=h+l*r,this.e=c+d*s-a*s,this.f=d+c*r-i*r,this}skewX(t,e,i){return this.skew(t,0,e,i)}skewY(t,e,i){return this.skew(0,t,e,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(vt.isMatrixLike(t)){return new vt(t).multiplyO(this)}const e=vt.formatTransforms(t),{x:i,y:a}=new bt(e.ox,e.oy).transform(this),s=(new vt).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-i,-a).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(i,a);if(isFinite(e.px)||isFinite(e.py)){const t=new bt(i,a).transform(s),r=isFinite(e.px)?e.px-t.x:0,n=isFinite(e.py)?e.py-t.y:0;s.translateO(r,n)}return s.translateO(e.tx,e.ty),s}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function yt(){if(!yt.nodes){const t=B().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;yt.nodes={svg:t,path:e}}if(!yt.nodes.svg.node.parentNode){const t=O.document.body||O.document.documentElement;yt.nodes.svg.addTo(t)}return yt.nodes}function wt(t){return!(t.width||t.height||t.x||t.y)}q(vt,"Matrix");class kt{constructor(...t){this.init(...t)}addOffset(){return this.x+=O.window.pageXOffset,this.y+=O.window.pageYOffset,new kt(this)}init(t){return t="string"==typeof t?t.split(dt).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return wt(this)}merge(t){const e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),a=Math.max(this.x+this.width,t.x+t.width)-e,s=Math.max(this.y+this.height,t.y+t.height)-i;return new kt(e,i,a,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof vt||(t=new vt(t));let e=1/0,i=-1/0,a=1/0,s=-1/0;return[new bt(this.x,this.y),new bt(this.x2,this.y),new bt(this.x,this.y2),new bt(this.x2,this.y2)].forEach((function(r){r=r.transform(t),e=Math.min(e,r.x),i=Math.max(i,r.x),a=Math.min(a,r.y),s=Math.max(s,r.y)})),new kt(e,a,i-e,s-a)}}function At(t,e,i){let a;try{if(a=e(t.node),wt(a)&&((s=t.node)!==O.document&&!(O.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===O.document}).call(O.document.documentElement,s)))throw new Error("Element not in the dom")}catch(e){a=i(t)}var s;return a}A({viewbox:{viewbox(t,e,i,a){return null==t?new kt(this.attr("viewBox")):this.attr("viewBox",new kt(t,e,i,a))},zoom(t,e){let{width:i,height:a}=this.attr(["width","height"]);if((i||a)&&"string"!=typeof i&&"string"!=typeof a||(i=this.node.clientWidth,a=this.node.clientHeight),!i||!a)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const s=this.viewbox(),r=i/s.width,n=a/s.height,o=Math.min(r,n);if(null==t)return o;let l=o/t;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new bt(i/2/r+s.x,a/2/n+s.y);const h=new kt(s).transform(new vt({scale:l,origin:e}));return this.viewbox(h)}}}),q(kt,"Box");class Ct extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}Q([Ct],{each(t,...e){return"function"==typeof t?this.map(((e,i,a)=>t.call(e,e,i,a))):this.map((i=>i[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const St=["toArray","constructor","each"];function Lt(t,e){return new Ct(L((e||O.document).querySelectorAll(t),(function(t){return V(t)})))}Ct.extend=function(t){t=t.reduce(((t,e)=>(St.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),Q([Ct],t)};let Mt=0;const Pt={};function It(t){let e=t.getEventHolder();return e===O.window&&(e=Pt),e.events||(e.events={}),e.events}function Tt(t){return t.getEventTarget()}function zt(t,e,i,a,s){const r=i.bind(a||t),n=B(t),o=It(n),l=Tt(n);e=Array.isArray(e)?e:e.split(dt),i._svgjsListenerId||(i._svgjsListenerId=++Mt),e.forEach((function(t){const e=t.split(".")[0],a=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][a]=o[e][a]||{},o[e][a][i._svgjsListenerId]=r,l.addEventListener(e,r,s||!1)}))}function Xt(t,e,i,a){const s=B(t),r=It(s),n=Tt(s);("function"!=typeof i||(i=i._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(dt)).forEach((function(t){const e=t&&t.split(".")[0],o=t&&t.split(".")[1];let l,h;if(i)r[e]&&r[e][o||"*"]&&(n.removeEventListener(e,r[e][o||"*"][i],a||!1),delete r[e][o||"*"][i]);else if(e&&o){if(r[e]&&r[e][o]){for(h in r[e][o])Xt(n,[e,o].join("."),h);delete r[e][o]}}else if(o)for(t in r)for(l in r[t])o===l&&Xt(n,[t,o].join("."));else if(e){if(r[e]){for(l in r[e])Xt(n,[e,l].join("."));delete r[e]}}else{for(t in r)Xt(n,t);!function(t){let e=t.getEventHolder();e===O.window&&(e=Pt),e.events&&(e.events={})}(s)}}))}class Rt extends D{addEventListener(){}dispatch(t,e,i){return function(t,e,i,a){const s=Tt(t);return e instanceof O.window.Event||(e=new O.window.CustomEvent(e,{detail:i,cancelable:!0,...a})),s.dispatchEvent(e),e}(this,t,e,i)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const i=e[t.type];for(const e in i)for(const a in i[e])i[e][a](t);return!t.defaultPrevented}fire(t,e,i){return this.dispatch(t,e,i),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,i){return Xt(this,t,e,i),this}on(t,e,i,a){return zt(this,t,e,i,a),this}removeEventListener(){}}function Yt(){}q(Rt,"EventTarget");const Et=400,Ht=">",Ot=0,Ft={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Dt extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(dt).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class _t{constructor(...t){this.init(...t)}convert(t){return new _t(this.value,t)}divide(t){return t=new _t(t),new _t(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(tt))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof _t&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new _t(t),new _t(this-t,this.unit||t.unit)}plus(t){return t=new _t(t),new _t(this+t,this.unit||t.unit)}times(t){return t=new _t(t),new _t(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Nt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Wt=[];class Bt extends Rt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=B(t)).removeNamespace&&this.node instanceof O.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return B(t).put(this,e)}children(){return new Ct(L(this.node.children,(function(t){return V(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let i=this.node.cloneNode(t);return e&&(i=J(i)),new this.constructor(i)}each(t,e){const i=this.children();let a,s;for(a=0,s=i.length;a=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=$(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return V(this.node.lastChild)}matches(t){const e=this.node,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return i&&i.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=V(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=V(e.node.parentNode));return e}put(t,e){return t=B(t),this.add(t,e),t}putIn(t,e){return B(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=B(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const i=10**t,a=this.attr(e);for(const t in a)"number"==typeof a[t]&&(a[t]=Math.round(a[t]*i)/i);return this.attr(a),this}svg(t,e){return this.xml(t,e,Y)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const i=e.index(this);return e.put(t,i).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let i=this;if(null!=t){if(i=V(i.node.cloneNode(!0)),e){const e=t(i);if(i=e||i,!1===e)return""}i.each((function(){const e=t(this),i=e||this;!1===e?this.remove():e&&this!==i&&this.replace(i)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;const a=W("wrapper",i),s=O.document.createDocumentFragment();a.innerHTML=t;for(let t=a.children.length;t--;)s.appendChild(a.firstElementChild);const r=this.parent();return e?this.replace(s)&&r:this.add(s)}}Q(Bt,{attr:function(t,e,i){if(null==t){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=ht.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ft[t]:ht.test(e)?parseFloat(e):e;"number"==typeof(e=Wt.reduce(((e,i)=>i(t,e,this)),e))?e=new _t(e):Nt.has(t)&&xt.isColor(e)?e=new xt(e):e.constructor===Array&&(e=new Dt(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return Lt(t,this.node)},findOne:function(t){return V(this.node.querySelector(t))}}),q(Bt,"Dom");class Gt extends Bt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new _t(t).plus(this.x()))}dy(t=0){return this.y(new _t(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=B(t));const i=new Ct;let a=this;for(;(a=a.parent())&&a.node!==O.document&&"#document-fragment"!==a.nodeName&&(i.push(a),e||a.node!==t.node)&&(!e||!a.matches(t));)if(a.node===this.root().node)return null;return i}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(at);return e?B(e[1]):null}root(){const t=this.parent(function(t){return _[t]}(N));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const i=I(this,t,e);return this.width(new _t(i.width)).height(new _t(i.height))}width(t){return this.attr("width",t)}writeDataToDom(){return R(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}Q(Gt,{bbox:function(){const t=At(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(yt().svg).show(),i=e.node.getBBox();return e.remove(),i}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new kt(t)},rbox:function(t){const e=At(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),i=new kt(e);return t?i.transform(t.screenCTM().inverseO()):i.addOffset()},inside:function(t,e){const i=this.bbox();return t>i.x&&e>i.y&&t=0;i--)null!=e[jt[t][i]]&&this.attr(jt.prefix(t,jt[t][i]),e[jt[t][i]]);return this},A(["Element","Runner"],e)})),A(["Element","Runner"],{matrix:function(t,e,i,a,s,r){return null==t?new vt(this):this.attr("transform",new vt(t,e,i,a,s,r))},rotate:function(t,e,i){return this.transform({rotate:t,ox:e,oy:i},!0)},skew:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:i},!0):this.transform({skew:[t,e],ox:i,oy:a},!0)},shear:function(t,e,i){return this.transform({shear:t,ox:e,oy:i},!0)},scale:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:i},!0):this.transform({scale:[t,e],ox:i,oy:a},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),A("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new _t(t)):this.rx(t).ry(e)}}),A("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new bt(this.node.getPointAtLength(t))}}),A(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});A("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),A("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){const t=(this.attr("transform")||"").split(st).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(dt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(vt.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new vt);return t},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);const i=this.screenCTM(),a=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(a.multiply(i)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new vt(this).decompose();return null==t?e:e[t]}vt.isMatrixLike(t)||(t={...t,origin:T(t,this)});const i=new vt(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});class Vt extends Gt{flatten(){return this.each((function(){if(this instanceof Vt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(i,a){return a[a.length-i-1].toParent(t,e)})),this.remove()}}q(Vt,"Container");class Ut extends Vt{constructor(t,e=t){super(G("defs",t),e)}flatten(){return this}ungroup(){return this}}q(Ut,"Defs");class qt extends Gt{}function Zt(t){return this.attr("rx",t)}function $t(t){return this.attr("ry",t)}function Jt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Qt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Kt(t){return this.attr("cx",t)}function te(t){return this.attr("cy",t)}function ee(t){return null==t?2*this.rx():this.rx(new _t(t).divide(2))}function ie(t){return null==t?2*this.ry():this.ry(new _t(t).divide(2))}q(qt,"Shape");var ae=Object.freeze({__proto__:null,cx:Kt,cy:te,height:ie,rx:Zt,ry:$t,width:ee,x:Jt,y:Qt});class se extends qt{constructor(t,e=t){super(G("ellipse",t),e)}size(t,e){const i=I(this,t,e);return this.rx(new _t(i.width).divide(2)).ry(new _t(i.height).divide(2))}}Q(se,ae),A("Container",{ellipse:K((function(t=0,e=t){return this.put(new se).size(t,e).move(0,0)}))}),q(se,"Ellipse");class re extends Bt{constructor(t=O.document.createDocumentFragment()){super(t)}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){const t=new Bt(W("wrapper",i));return t.add(this.node.cloneNode(!0)),t.xml(!1,i)}return super.xml(t,!1,i)}}function ne(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new _t(t),fy:new _t(e)}):this.attr({x1:new _t(t),y1:new _t(e)})}function oe(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new _t(t),cy:new _t(e)}):this.attr({x2:new _t(t),y2:new _t(e)})}q(re,"Fragment");var le=Object.freeze({__proto__:null,from:ne,to:oe});class he extends Vt{constructor(t,e){super(G(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,i){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}Q(he,le),A({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:K((function(t,e){return this.put(new he(t)).update(e)}))}}),q(he,"Gradient");class ce extends Vt{constructor(t,e=t){super(G("pattern",t),e)}attr(t,e,i){return"transform"===t&&(t="patternTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}A({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:K((function(t,e,i){return this.put(new ce).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),q(ce,"Pattern");let de=class extends qt{constructor(t,e=t){super(G("image",t),e)}load(t,e){if(!t)return this;const i=new O.window.Image;return zt(i,"load",(function(t){const a=this.parent(ce);0===this.width()&&0===this.height()&&this.size(i.width,i.height),a instanceof ce&&0===a.width()&&0===a.height()&&a.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),zt(i,"load error",(function(){Xt(i)})),this.attr("href",i.src=t,H)}};var ue;ue=function(t,e,i){return"fill"!==t&&"stroke"!==t||ct.test(e)&&(e=i.root().defs().image(e)),e instanceof de&&(e=i.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Wt.push(ue),A({Container:{image:K((function(t,e){return this.put(new de).size(0,0).load(t,e)}))}}),q(de,"Image");class ge extends Dt{bbox(){let t=-1/0,e=-1/0,i=1/0,a=1/0;return this.forEach((function(s){t=Math.max(s[0],t),e=Math.max(s[1],e),i=Math.min(s[0],i),a=Math.min(s[1],a)})),new kt(i,a,t-i,e-a)}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let i=this.length-1;i>=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(dt).map(parseFloat)).length%2!=0&&t.pop();for(let i=0,a=t.length;i=0;i--)a.width&&(this[i][0]=(this[i][0]-a.x)*t/a.width+a.x),a.height&&(this[i][1]=(this[i][1]-a.y)*e/a.height+a.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,i=this.length;e":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,i,a){return function(s){return s<0?t>0?e/t*s:i>0?a/i*s:0:s>1?i<1?(1-a)/(1-i)*s+(a-i)/(1-i):t<1?(1-e)/(1-t)*s+(e-t)/(1-t):1:3*s*(1-s)**2*e+3*s**2*(1-s)*a+s**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let i=t;return"none"===e?--i:"both"===e&&++i,(a,s=!1)=>{let r=Math.floor(a*t);const n=a*r%1==0;return"start"!==e&&"both"!==e||++r,s&&n&&--r,a>=0&&r<0&&(r=0),a<=1&&r>i&&(r=i),r/i}}};class ye{done(){return!1}}class we extends ye{constructor(t=Ht){super(),this.ease=ve[t]||t}step(t,e,i){return"number"!=typeof t?i<1?t:e:t+(e-t)*this.ease(i)}}class ke extends ye{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,i,a){return this.stepper(t,e,i,a)}}function Ae(){const t=(this._duration||500)/1e3,e=this._overshoot||0,i=Math.PI,a=Math.log(e/100+1e-10),s=-a/Math.sqrt(i*i+a*a),r=3.9/(s*t);this.d=2*s*r,this.k=r*r}Q(class extends ke{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;i>100&&(i=16),i/=1e3;const s=a.velocity||0,r=-this.d*s-this.k*(t-e),n=t+s*i+r*i*i/2;return a.velocity=s+r*i,a.done=Math.abs(e-n)+Math.abs(s)<.002,a.done?e:n}},{duration:me("_duration",Ae),overshoot:me("_overshoot",Ae)});Q(class extends ke{constructor(t=.1,e=.01,i=0,a=1e3){super(),this.p(t).i(e).d(i).windup(a)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;const s=e-t;let r=(a.integral||0)+s*i;const n=(s-(a.error||0))/i,o=this._windup;return!1!==o&&(r=Math.max(-o,Math.min(r,o))),a.error=s,a.integral=r,a.done=Math.abs(s)<.001,a.done?e:t+(this.P*s+this.I*r+this.D*n)}},{windup:me("_windup"),p:me("P"),i:me("I"),d:me("D")});const Ce={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Se={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Le="mlhvqtcsaz".split("");for(let t=0,e=Le.length;t=0;a--)i=this[a][0],"M"===i||"L"===i||"T"===i?(this[a][1]+=t,this[a][2]+=e):"H"===i?this[a][1]+=t:"V"===i?this[a][1]+=e:"C"===i||"S"===i||"Q"===i?(this[a][1]+=t,this[a][2]+=e,this[a][3]+=t,this[a][4]+=e,"C"===i&&(this[a][5]+=t,this[a][6]+=e)):"A"===i&&(this[a][6]+=t,this[a][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let i=0,a="";const s={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new bt,p:new bt};for(;s.lastToken=a,a=t.charAt(i++);)if(s.inSegment||!Pe(s,a))if("."!==a)if(isNaN(parseInt(a)))if(Re.has(a))s.inNumber&&Ie(s,!1);else if("-"!==a&&"+"!==a)if("E"!==a.toUpperCase()){if(ut.test(a)){if(s.inNumber)Ie(s,!1);else{if(!Me(s))throw new Error("parser Error");Te(s)}--i}}else s.number+=a,s.hasExponent=!0;else{if(s.inNumber&&!Xe(s)){Ie(s,!1),--i;continue}s.number+=a,s.inNumber=!0}else{if("0"===s.number||ze(s)){s.inNumber=!0,s.number=a,Ie(s,!0);continue}s.inNumber=!0,s.number+=a}else{if(s.pointSeen||s.hasExponent){Ie(s,!1),--i;continue}s.inNumber=!0,s.pointSeen=!0,s.number+=a}return s.inNumber&&Ie(s,!1),s.inSegment&&Me(s)&&Te(s),s.segments}(t)}size(t,e){const i=this.bbox();let a,s;for(i.width=0===i.width?1:i.width,i.height=0===i.height?1:i.height,a=this.length-1;a>=0;a--)s=this[a][0],"M"===s||"L"===s||"T"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y):"H"===s?this[a][1]=(this[a][1]-i.x)*t/i.width+i.x:"V"===s?this[a][1]=(this[a][1]-i.y)*e/i.height+i.y:"C"===s||"S"===s||"Q"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y,this[a][3]=(this[a][3]-i.x)*t/i.width+i.x,this[a][4]=(this[a][4]-i.y)*e/i.height+i.y,"C"===s&&(this[a][5]=(this[a][5]-i.x)*t/i.width+i.x,this[a][6]=(this[a][6]-i.y)*e/i.height+i.y)):"A"===s&&(this[a][1]=this[a][1]*t/i.width,this[a][2]=this[a][2]*e/i.height,this[a][6]=(this[a][6]-i.x)*t/i.width+i.x,this[a][7]=(this[a][7]-i.y)*e/i.height+i.y);return this}toString(){return function(t){let e="";for(let i=0,a=t.length;i{const e=typeof t;return"number"===e?_t:"string"===e?xt.isColor(t)?xt:dt.test(t)?ut.test(t)?Ye:Dt:tt.test(t)?_t:Oe:Ne.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Dt:"object"===e?_e:Oe};class He{constructor(t){this._stepper=t||new we("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Ee(t));let e=new this._type(t);return this._type===xt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===_e&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Oe{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Fe{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Fe.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Fe.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const De=(t,e)=>t[0]e[0]?1:0;class _e{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let i=0,a=e.length;it.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const i=e.shift(),a=e.shift(),s=e.shift(),r=e.splice(0,s);t[i]=new a(r)}return t}}const Ne=[Oe,Fe,_e];class We extends qt{constructor(t,e=t){super(G("path",t),e)}array(){return this._array||(this._array=new Ye(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Ye(t))}size(t,e){const i=I(this,t,e);return this.attr("d",this.array().size(i.width,i.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}We.prototype.MorphArray=Ye,A({Container:{path:K((function(t){return this.put(new We).plot(t||new Ye)}))}}),q(We,"Path");var Be=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new ge(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new ge(t))},size:function(t,e){const i=I(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}});class Ge extends qt{constructor(t,e=t){super(G("polygon",t),e)}}A({Container:{polygon:K((function(t){return this.put(new Ge).plot(t||new ge)}))}}),Q(Ge,fe),Q(Ge,Be),q(Ge,"Polygon");class je extends qt{constructor(t,e=t){super(G("polyline",t),e)}}A({Container:{polyline:K((function(t){return this.put(new je).plot(t||new ge)}))}}),Q(je,fe),Q(je,Be),q(je,"Polyline");class Ve extends qt{constructor(t,e=t){super(G("rect",t),e)}}Q(Ve,{rx:Zt,ry:$t}),A({Container:{rect:K((function(t,e){return this.put(new Ve).size(t,e)}))}}),q(Ve,"Rect");class Ue{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const qe={nextDraw:null,frames:new Ue,timeouts:new Ue,immediates:new Ue,timer:()=>O.window.performance||O.window.Date,transforms:[],frame(t){const e=qe.frames.push({run:t});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},timeout(t,e){e=e||0;const i=qe.timer().now()+e,a=qe.timeouts.push({run:t,time:i});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),a},immediate(t){const e=qe.immediates.push(t);return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},cancelFrame(t){null!=t&&qe.frames.remove(t)},clearTimeout(t){null!=t&&qe.timeouts.remove(t)},cancelImmediate(t){null!=t&&qe.immediates.remove(t)},_draw(t){let e=null;const i=qe.timeouts.last();for(;(e=qe.timeouts.shift())&&(t>=e.time?e.run():qe.timeouts.push(e),e!==i););let a=null;const s=qe.frames.last();for(;a!==s&&(a=qe.frames.shift());)a.run(t);let r=null;for(;r=qe.immediates.shift();)r();qe.nextDraw=qe.timeouts.first()||qe.frames.first()?O.window.requestAnimationFrame(qe._draw):null}},Ze=function(t){const e=t.start,i=t.runner.duration();return{start:e,duration:i,end:e+i,runner:t.runner}},$e=function(){const t=O.window;return(t.performance||t.Date).now()};class Je extends Rt{constructor(t=$e){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const i=Math.abs(e);return this.speed(t?-i:i)}schedule(t,e,i){if(null==t)return this._runners.map(Ze);let a=0;const s=this.getEndTime();if(e=e||0,null==i||"last"===i||"after"===i)a=s;else if("absolute"===i||"start"===i)a=e,e=0;else if("now"===i)a=this._time;else if("relative"===i){const i=this.getRunnerInfoById(t.id);i&&(a=i.start+e,e=0)}else{if("with-last"!==i)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();a=t?t.start:this._time}}t.unschedule(),t.timeline(this);const r=t.persist(),n={persist:null===r?this._persist:r,start:a+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(n),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return qe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let i=e-this._lastSourceTime;t&&(i=0);const a=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=a,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],i=e.runner;this._time-e.start<=0&&i.reset()}let s=!1;for(let t=0,e=this._runners.length;t0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}A({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Je,this._timeline):(this._timeline=t,this)}}});class Qe extends Rt{constructor(t){super(),this.id=Qe.id++,t="function"==typeof(t=null==t?Et:t)?new ke(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ke,this._stepper=this._isDeclarative?t:new we,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new vt,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,i){let a=1,s=!1,r=0;return e=e??Ot,i=i||"last","object"!=typeof(t=t??Et)||t instanceof ye||(e=t.delay??e,i=t.when??i,s=t.swing||s,a=t.times??a,r=t.wait??r,t=t.duration??Et),{duration:t,delay:e,swing:s,times:a,wait:r,when:i}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,i){const a=Qe.sanitise(t,e,i),s=new Qe(a.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(a).schedule(a.delay,a.when)}clearTransform(){return this.transforms=new vt,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new we(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,i){return"object"==typeof t&&(e=t.swing,i=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=i||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),i=(this._time-t*e)/this._duration;return Math.min(t+i,this._times)}const i=t%1,a=e*Math.floor(t)+this._duration*i;return this.time(a)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,i=this._duration,a=this._wait,s=this._times,r=this._swing,n=this._reverse;let o;if(null==t){const t=function(t){const e=r*Math.floor(t%(2*(a+i))/(a+i)),s=e&&!n||!e&&n,o=Math.pow(-1,s)*(t%(a+i))/i+s;return Math.max(Math.min(o,1),0)},l=s*(a+i)-a;return o=e<=0?Math.round(t(1e-5)):e=0;this._lastPosition=e;const a=this.duration(),s=this._lastTime<=0&&this._time>0,r=this._lastTime=a;this._lastTime=this._time,s&&this.fire("start",this);const n=this._isDeclarative;this.done=!n&&!r&&this._time>=a,this._reseted=!1;let o=!1;return(i||n)&&(this._initialise(i),this.transforms=new vt,o=this._run(n?t:e),this.fire("step",this)),this.done=this.done||o&&n,r&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,i=this._queue.length;et.lmultiplyO(e),ei=t=>t.transforms;function ii(){const t=this._transformationRunners.runners.map(ei).reduce(ti,new vt);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class ai{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Ke).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const i=this.ids.indexOf(t+1);return this.ids.splice(i,1,t+1),this.runners.splice(i,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;ee.id<=t.id)).map(ei).reduce(ti,new vt)},_addRunner(t){this._transformationRunners.add(t),qe.cancelImmediate(this._frameId),this._frameId=qe.immediate(ii.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new ai).add(new Ke(new vt(this))))}}});Q(Qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,i){if("string"==typeof e)return this.styleAttr(t,{[e]:i});let a=e;if(this._tryRetarget(t,a))return this;let s=new He(this._stepper).to(a),r=Object.keys(a);return this.queue((function(){s=s.from(this.element()[t](r))}),(function(e){return this.element()[t](s.at(e).valueOf()),s.done()}),(function(e){const i=Object.keys(e),n=(o=r,i.filter((t=>!o.includes(t))));var o;if(n.length){const e=this.element()[t](n),i=new _e(s.from()).valueOf();Object.assign(i,e),s.from(i)}const l=new _e(s.to()).valueOf();Object.assign(l,e),s.to(l),r=i,a=e})),this._rememberMorpher(t,s),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let i=new He(this._stepper).to(new _t(t));return this.queue((function(){i=i.from(this.element().zoom())}),(function(t){return this.element().zoom(i.at(t),e),i.done()}),(function(t,a){e=a,i.to(t)})),this._rememberMorpher("zoom",i),this},transform(t,e,i){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const a=vt.isMatrixLike(t);i=null!=t.affine?t.affine:null!=i?i:!a;const s=new He(this._stepper).type(i?Fe:vt);let r,n,o,l,h;return this.queue((function(){n=n||this.element(),r=r||T(t,n),h=new vt(e?void 0:n),n._addRunner(this),e||n._clearTransformRunnersBefore(this)}),(function(c){e||this.clearTransform();const{x:d,y:u}=new bt(r).transform(n._currentTransform(this));let g=new vt({...t,origin:[d,u]}),p=this._isDeclarative&&o?o:h;if(i){g=g.decompose(d,u),p=p.decompose(d,u);const t=g.rotate,e=p.rotate,i=[t-360,t,t+360],a=i.map((t=>Math.abs(t-e))),s=Math.min(...a),r=a.indexOf(s);g.rotate=i[r]}e&&(a||(g.rotate=t.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),s.from(p),s.to(g);const f=s.at(c);return l=f.rotate,o=new vt(f),this.addTransform(o),n._addRunner(this),s.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(r=T(e,n)),t={...e,origin:r}}),!0),this._isDeclarative&&this._rememberMorpher("transform",s),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new _t(e),this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);let a=null;return this.queue((function(){a=this.element()[t](),i.from(a),i.to(a+e)}),(function(e){return this.element()[t](i.at(e)),i.done()}),(function(t){i.to(a+new _t(t))})),this._rememberMorpher(t,i),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);return this.queue((function(){i.from(this.element()[t]())}),(function(e){return this.element()[t](i.at(e)),i.done()})),this._rememberMorpher(t,i),this},_queueNumber(t,e){return this._queueObject(t,new _t(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let i;return t&&e||(i=this._element.bbox()),t||(t=i.width/i.height*e),e||(e=i.height/i.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,i,a){if(4===arguments.length)return this.plot([t,e,i,a]);if(this._tryRetarget("plot",t))return this;const s=new He(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){s.from(this._element.array())}),(function(t){return this._element.plot(s.at(t)),s.done()})),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,i,a){return this._queueObject("viewbox",new kt(t,e,i,a))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Q(Qe,{rx:Zt,ry:$t,from:ne,to:oe}),q(Qe,"Runner");class si extends Vt{constructor(t,e=t){super(G("svg",t),e),this.namespace()}defs(){return this.isRoot()?V(this.node.querySelector("defs"))||this.put(new Ut):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof O.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:Y,version:"1.1"}).attr("xmlns:xlink",H,E):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,E).attr("xmlns:svgjs",null,E)}root(){return this.isRoot()?this:super.root()}}A({Container:{nested:K((function(){return this.put(new si)}))}}),q(si,"Svg",!0);let ri=class extends Vt{constructor(t,e=t){super(G("symbol",t),e)}};A({Container:{symbol:K((function(){return this.put(new ri)}))}}),q(ri,"Symbol");var ni=Object.freeze({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,i=this.bbox()){return this.cx(t,i).cy(e,i)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,i=this.bbox()){return this.x(t,i).y(e,i)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(O.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}});class oi extends qt{constructor(t,e=t){super(G("text",t),e),this.dom.leading=this.dom.leading??new _t(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new _t(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const i=this.dom.leading;this.each((function(a){if(X(this.node))return;const s=O.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=i*new _t(s);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=r:(this.attr("dy",a?r+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new _t(t.leading||1.3),this}writeDataToDom(){return R(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let i=0;t="";for(let a=0,s=e.length;a{let a;try{a=i.node instanceof F().SVGSVGElement?new kt(i.attr(["x","y","width","height"])):i.bbox()}catch(t){return}const s=new vt(i),r=s.translate(t,e).transform(s.inverse()),n=new bt(a.x,a.y).transform(r);i.move(n.x,n.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,i=this.bbox()){const a=t-i.x,s=e-i.y;return this.dmove(a,s)},size:function(t,e,i=this.bbox()){const a=I(this,t,e,i),s=a.width/i.width,r=a.height/i.height;return this.children().forEach((t=>{const e=new bt(i).transform(new vt(t).inverse());t.scale(s,r,e.x,e.y)})),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}});class gi extends Vt{constructor(t,e=t){super(G("g",t),e)}}Q(gi,ui),A({Container:{group:K((function(){return this.put(new gi)}))}}),q(gi,"G");class pi extends Vt{constructor(t,e=t){super(G("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,H)}}Q(pi,ui),A({Container:{link:K((function(t){return this.put(new pi).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const i=e.index(t);return e.add(this,i),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new pi,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),q(pi,"A");class fi extends Vt{constructor(t,e=t){super(G("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Lt("svg [mask*="+this.id()+"]")}}A({Container:{mask:K((function(){return this.defs().put(new fi)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof fi?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),q(fi,"Mask");class xi extends Gt{constructor(t,e=t){super(G("stop",t),e)}update(t){return("number"==typeof t||t instanceof _t)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new _t(t.offset)),this}}A({Gradient:{stop:function(t,e,i){return this.put(new xi).update(t,e,i)}}}),q(xi,"Stop");class bi extends Gt{constructor(t,e=t){super(G("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,i={}){return this.rule("@font-face",{fontFamily:t,src:e,...i})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let i=t+"{";for(const t in e)i+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return i+="}",i}(t,e))}}A("Dom",{style(t,e){return this.put(new bi).rule(t,e)},fontface(t,e,i){return this.put(new bi).font(t,e,i)}}),q(bi,"Style");class mi extends oi{constructor(t,e=t){super(G("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let i=null;return e&&(i=e.plot(t)),null==t?i:this}track(){return this.reference("href")}}A({Container:{textPath:K((function(t,e){return t instanceof oi||(t=this.text(t)),t.path(e)}))},Text:{path:K((function(t,e=!0){const i=new mi;let a;if(t instanceof We||(t=this.defs().path(t)),i.attr("href","#"+t,H),e)for(;a=this.node.firstChild;)i.node.appendChild(a);return this.put(i)})),textPath(){return this.findOne("textPath")}},Path:{text:K((function(t){return t instanceof oi||(t=(new oi).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Lt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),mi.prototype.MorphArray=Ye,q(mi,"TextPath");class vi extends qt{constructor(t,e=t){super(G("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,H)}}A({Container:{use:K((function(t,e){return this.put(new vi).use(t,e)}))}}),q(vi,"Use");const yi=B;Q([si,ri,de,ce,be],C("viewbox")),Q([xe,je,Ge,We],C("marker")),Q(oi,C("Text")),Q(We,C("Path")),Q(Ut,C("Defs")),Q([oi,li],C("Tspan")),Q([Ve,se,he,Qe],C("radius")),Q(Rt,C("EventTarget")),Q(Bt,C("Dom")),Q(Gt,C("Element")),Q(qt,C("Shape")),Q([Vt,re],C("Container")),Q(he,C("Gradient")),Q(Qe,C("Runner")),Ct.extend([...new Set(k)]),function(t=[]){Ne.push(...[].concat(t))}([_t,xt,kt,vt,Dt,ge,Ye,bt]),Q(Ne,{to(t){return(new He).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,i,a,s){return this.fromArray(t.map((function(t,r){return a.step(t,e[r],i,s[r],s)})))}});class wi extends Gt{constructor(t){super(G("filter",t),t),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(t,e){return!(t=super.put(t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return Lt('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class ki extends Gt{constructor(t,e){super(t,e),this.result(this.id())}in(t){if(null==t){const t=this.attr("in");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in",t)}result(t){return this.attr("result",t)}toString(){return this.result()}}const Ai=t=>function(...e){for(let i=t.length;i--;)null!=e[i]&&this.attr(t[i],e[i])},Ci={blend:Ai(["in","in2","mode"]),colorMatrix:Ai(["type","values"]),composite:Ai(["in","in2","operator"]),convolveMatrix:function(t){t=new Dt(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Ai(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Ai(["in","dx","dy","stdDeviation"]),flood:Ai(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,H)},morphology:Ai(["operator","radius"]),offset:Ai(["dx","dy"]),specularLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Ai([]),turbulence:Ai(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((t=>{const e=P(t),i=Ci[t];wi[e+"Effect"]=class extends ki{constructor(t){super(G("fe"+e,t),t)}update(t){return i.apply(this,t),this}},wi.prototype[t]=K((function(t,...i){const a=new wi[e+"Effect"];return null==t?this.put(a):("function"==typeof t?t.call(a,a):i.unshift(t),this.put(a).update(i))}))})),Q(wi,{merge(t){const e=this.put(new wi.MergeEffect);if("function"==typeof t)return t.call(e,e),e;return(t instanceof Array?t:[...arguments]).forEach((t=>{t instanceof wi.MergeNode?e.put(t):e.mergeNode(t)})),e},componentTransfer(t={}){const e=this.put(new wi.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;if(!(t.r||t.g||t.b||t.a)){t={r:t,g:t,b:t,a:t}}for(const i in t)e.add(new(wi["Func"+i.toUpperCase()])(t[i]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((t=>{const e=P(t);wi[e]=class extends ki{constructor(t){super(G("fe"+e,t),t)}}}));["funcR","funcG","funcB","funcA"].forEach((function(t){const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.ComponentTransferEffect.prototype[t]=i}));["distantLight","pointLight","spotLight"].forEach((t=>{const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.DiffuseLightingEffect.prototype[t]=i,wi.SpecularLightingEffect.prototype[t]=i})),Q(wi.MergeEffect,{mergeNode(t){return this.put(new wi.MergeNode).attr("in",t)}}),Q(Ut,{filter:function(t){const e=this.put(new wi);return"function"==typeof t&&t.call(e,e),e}}),Q(Vt,{filter:function(t){return this.defs().filter(t)}}),Q(Gt,{filterWith:function(t){const e=t instanceof wi?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const Si={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,i,a){return this.parent()&&this.parent().diffuseLighting(t,i,a).in(this)},displacementMap:function(t,e,i,a){return this.parent()&&this.parent().displacementMap(this,t,e,i,a)},dropShadow:function(t,e,i){return this.parent()&&this.parent().dropShadow(this,t,e,i).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){return t=t instanceof Array?t:[...t],this.parent()&&this.parent().merge(this,...t)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,i,a,s){return this.parent()&&this.parent().specularLighting(t,i,a,s).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,a,s){return this.parent()&&this.parent().turbulence(t,e,i,a,s).in(this)}};Q(ki,Si),Q(wi.MergeEffect,{in:function(t){return t instanceof wi.MergeNode?this.add(t,0):this.add((new wi.MergeNode).in(t),0),this}}),Q([wi.CompositeEffect,wi.BlendEffect,wi.DisplacementMapEffect],{in2:function(t){if(null==t){const t=this.attr("in2");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in2",t)}}),wi.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var Li=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getDefaultFilter",value:function(t,e){var i=this.w;t.unfilter(!0),(new wi).size("120%","180%","-5%","-40%"),i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"applyFilter",value:function(t,e,i){var a,s=this,r=this.w;if(t.unfilter(!0),"none"!==i){var n,o,l=r.config.chart.dropShadow,h="lighten"===i?2:.3;if(t.filterWith((function(t){t.colorMatrix({type:"matrix",values:"\n ".concat(h," 0 0 0 0\n 0 ").concat(h," 0 0 0\n 0 0 ").concat(h," 0 0\n 0 0 0 1 0\n "),in:"SourceGraphic",result:"brightness"}),l.enabled&&s.addShadow(t,e,l,"brightness")})),!l.noUserSpaceOnUse)null===(n=t.filterer())||void 0===n||null===(o=n.node)||void 0===o||o.setAttribute("filterUnits","userSpaceOnUse");this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node)}else this.getDefaultFilter(t,e)}},{key:"addShadow",value:function(t,e,i,a){var s,r=this.w,n=i.blur,o=i.top,l=i.left,h=i.color,c=i.opacity;if(h=Array.isArray(h)?h[e]:h,(null===(s=r.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:a,dx:l,dy:o,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:n,result:"blur"}),t.flood({"flood-color":h,"flood-opacity":c,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",a])}},{key:"dropShadow",value:function(t,e){var i,a,s,r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.w;if(t.unfilter(!0),v.isMsEdge()&&"radialBar"===o.config.chart.type)return t;if((null===(i=o.config.chart.dropShadow.enabledOnSeries)||void 0===i?void 0:i.length)>0&&-1===(null===(s=o.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.indexOf(n)))return t;return t.filterWith((function(t){r.addShadow(t,n,e,"SourceGraphic")})),e.noUserSpaceOnUse||t.filterer().node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node),t}},{key:"setSelectionFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;"none"!==s&&this.applyFilter(t,e,s.type)}}},{key:"_scaleFilterSize",value:function(t){if(t){!function(e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}}]),t}(),Mi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"roundPathCorners",value:function(t,e){function i(t,e,i){var s=e.x-t.x,r=e.y-t.y,n=Math.sqrt(s*s+r*r);return a(t,e,Math.min(1,i/n))}function a(t,e,i){return{x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}}function s(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function r(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var n=t.split(/[,\s]/).reduce((function(t,e){var i=e.match("([a-zA-Z])(.+)");return i?(t.push(i[1]),t.push(i[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),o=[];if(n.length>1){var l=r(n[0]),h=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(h=["L",l.x,l.y],n[n.length-1]=h),o.push(n[0]);for(var c=1;c2&&"L"==u[0]&&g.length>2&&"L"==g[0]){var p,f,x=r(d),b=r(u),m=r(g);p=i(b,x,e),f=i(b,m,e),s(u,p),u.origPoint=b,o.push(u);var v=a(p,b,.5),y=a(b,f,.5),w=["C",v.x,v.y,y.x,y.y,f.x,f.y];w.origPoint=b,o.push(w)}else o.push(u)}if(h){var k=r(o[o.length-1]);o.push(["Z"]),s(o[0],k)}}else o=n;return o.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":n,"stroke-linecap":o})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,c=this.w.globals.dom.Paper.rect();return c.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":h}),c.node.setAttribute("fill",r),c}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:a,stroke:e,"stroke-width":i})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var i=this.w.globals.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,s=void 0===a?"#a8a8a8":a,r=t.strokeWidth,n=void 0===r?1:r,o=t.fill,l=t.fillOpacity,h=void 0===l?1:l,c=t.strokeOpacity,d=void 0===c?1:c,u=t.classes,g=t.strokeLinecap,p=void 0===g?null:g,f=t.strokeDashArray,x=void 0===f?0:f,b=this.w;return null===p&&(p=b.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(b.globals.gridHeight)),b.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":h,stroke:s,"stroke-opacity":d,"stroke-linecap":p,"stroke-width":n,"stroke-dasharray":x,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){var i=["M",t,e].join(" ");return i}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=[" L",t,e].join(" "):"H"===i?a=[" H",t].join(" "):"V"===i&&(a=[" V",e].join(" ")),a}},{key:"curve",value:function(t,e,i,a,s,r){var n=["C",t,e,i,a,s,r].join(" ");return n}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,s,r,n){var o="A";arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(o="a");var l=[o,t,e,i,a,s,r,n].join(" ");return l}},{key:"renderPaths",value:function(t){var e,i=t.j,a=t.realIndex,s=t.pathFrom,r=t.pathTo,n=t.stroke,o=t.strokeWidth,l=t.strokeLinecap,h=t.fill,c=t.animationDelay,d=t.initialSpeed,g=t.dataChangeSpeed,p=t.className,f=t.chartType,x=t.shouldClipToGrid,b=void 0===x||x,m=t.bindEventsOnPaths,v=void 0===m||m,w=t.drawShadow,k=void 0===w||w,A=this.w,C=new Li(this.ctx),S=new y(this.ctx),L=this.w.config.chart.animations.enabled,M=L&&this.w.config.chart.animations.dynamicAnimation.enabled,P=!!(L&&!A.globals.resized||M&&A.globals.dataChanged&&A.globals.shouldAnimate);P?e=s:(e=r,A.globals.animationEnded=!0);var I=A.config.stroke.dashArray,T=0;T=Array.isArray(I)?I[a]:A.config.stroke.dashArray;var z=this.drawPath({d:e,stroke:n,strokeWidth:o,fill:h,fillOpacity:1,classes:p,strokeLinecap:l,strokeDashArray:T});z.attr("index",a),b&&("bar"===f&&!A.globals.isHorizontal||A.globals.comboCharts?z.attr({"clip-path":"url(#gridRectBarMask".concat(A.globals.cuid,")")}):z.attr({"clip-path":"url(#gridRectMask".concat(A.globals.cuid,")")})),A.config.chart.dropShadow.enabled&&k&&C.dropShadow(z,A.config.chart.dropShadow,a),v&&(z.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,z)),z.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,z)),z.node.addEventListener("mousedown",this.pathMouseDown.bind(this,z))),z.attr({pathTo:r,pathFrom:s});var X={el:z,j:i,realIndex:a,pathFrom:s,pathTo:r,fill:h,strokeWidth:o,delay:c};return!L||A.globals.resized||A.globals.dataChanged?!A.globals.resized&&A.globals.dataChanged||S.showDelayedElements():S.animatePathsGradually(u(u({},X),{},{speed:d})),A.globals.dataChanged&&M&&P&&S.animatePathsGradually(u(u({},X),{},{speed:g})),z}},{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,i,(function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:a,width:s+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:a,width:s}):"squares"===t?r.rect(e,i).fill("none").stroke({color:a,width:s}):"circles"===t&&r.circle(e).fill("none").stroke({color:a,width:s})}))}},{key:"drawGradient",value:function(t,e,i,a,s){var r,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,c=this.w;e.length<9&&0===e.indexOf("#")&&(e=v.hexToRgba(e,a)),i.length<9&&0===i.indexOf("#")&&(i=v.hexToRgba(i,s));var d=0,u=1,g=1,p=null;null!==o&&(d=void 0!==o[0]?o[0]/100:0,u=void 0!==o[1]?o[1]/100:1,g=void 0!==o[2]?o[2]/100:1,p=void 0!==o[3]?o[3]/100:null);var f=!("donut"!==c.config.chart.type&&"pie"!==c.config.chart.type&&"polarArea"!==c.config.chart.type&&"bubble"!==c.config.chart.type);if(r=l&&0!==l.length?c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){(Array.isArray(l[h])?l[h]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){t.stop(d,e,a),t.stop(u,i,s),t.stop(g,i,s),null!==p&&t.stop(p,e,a)})),f){var x=c.globals.gridWidth/2,b=c.globals.gridHeight/2;"bubble"!==c.config.chart.type?r.attr({gradientUnits:"userSpaceOnUse",cx:x,cy:b,r:n}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?r.from(0,0).to(0,1):"diagonal"===t?r.from(0,0).to(1,1):"horizontal"===t?r.from(0,1).to(1,1):"diagonal2"===t&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,i=t.maxWidth,a=t.fontSize,s=t.fontFamily,r=this.getTextRects(e,a,s),n=r.width/e.length,o=Math.floor(i/n);return i-1){var o=i.globals.selectedDataPoints[s].indexOf(r);i.globals.selectedDataPoints[s].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),h=i.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),c=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),a.getDefaultFilter(t,s)}))};c(l),c(h)}t.node.setAttribute("selected","true"),n="true",void 0===i.globals.selectedDataPoints[s]&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(r)}if("true"===n){var d=i.config.states.active.filter;if("none"!==d)a.applyFilter(t,s,d.type);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}}else if("none"!==i.config.states.active.filter.type)if("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice)a.getDefaultFilter(t,s);else{u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,a){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w,n=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),r.globals.dom.Paper.add(n);var o=n.bbox();return s||(o=n.node.getBoundingClientRect()),n.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i/1.1)return void(t.textContent=e.substring(0,a)+"...");t.textContent="."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}(),Pi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getStackedSeriesTotals",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,i=[];if(0===e.globals.series.length)return i;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,i=[];return e.globals.seriesGroups.forEach((function(a){var s=[];e.config.series.forEach((function(t,i){a.indexOf(e.globals.seriesNames[i])>-1&&s.push(i)}));var r=e.globals.series.map((function(t,e){return-1===s.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));i.push(t.getStackedSeriesTotals(r))})),i}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,i=[],a=[],s=[],r=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){s.push(e),a.push(null)})),e.yaxis.forEach((function(t,e){i[e]=[]}));var n=[];e.yaxis.forEach((function(t,a){var o=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,n){if(e.name===t){var l=n;a===n||r?!r||s.indexOf(n)>-1?i[a].push([a,n]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[n].push([n,a]),l=a),o=!0,-1!==(l=s.indexOf(l))&&s.splice(l,1)}}))}))}o||n.push(a)})),i=i.map((function(t,e){var i=[];return t.forEach((function(t){a[t[1]]=t[0],i.push(t[1])})),i}));for(var o=e.yaxis.length-1,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,i){return t===i[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map((function(t,i){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),i}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var i=0;if(Array.isArray(t))for(var a=0;at&&i.globals.seriesX[s][n]0){var g=function(t,e){var i=s.config.yaxis[s.globals.seriesYAxisReverseMap[e]],r=t<0?-1:1;return t=Math.abs(t),i.logarithmic&&(t=a.getBaseLog(i.logBase,t)),-r*t/n[e]};if(r.isMultipleYAxis){l=[];for(var p=0;p0&&e.forEach((function(e){var n=[],o=[];t.i.forEach((function(i,a){s.config.series[i].group===e&&(n.push(t.series[a]),o.push(i))})),n.length>0&&r.push(a.draw(n,i,o))})),r}}],[{key:"checkComboSeries",value:function(t,e){var i=!1,a=0,s=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||a++,void 0!==t.type&&t.type!==e&&s++})),s>0&&(i=!0),{comboBarCount:a,comboCharts:i}}},{key:"extendArrayProps",value:function(t,e,i){var a,s,r,n,o,l;(null!==(a=e)&&void 0!==a&&a.yaxis&&(e=t.extendYAxis(e,i)),null!==(s=e)&&void 0!==s&&s.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(r=e)&&void 0!==r&&null!==(n=r.annotations)&&void 0!==n&&n.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(l=o.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e)));return e}}]),t}(),Ii=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e}return s(t,[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===t.label.orientation){var a=null!==e?e:0,s=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(null!==s){var r=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-r.height+4);var n="top"===t.label.position?r.width:-r.width;s.setAttribute("y",parseFloat(s.getAttribute("y"))+n);var o=this.annoCtx.graphics.rotateAroundCenter(s),l=o.x,h=o.y;s.setAttribute("transform","rotate(-90 ".concat(l," ").concat(h,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=t.getBoundingClientRect(),r=e.label.style.padding,n=r.left,o=r.right,l=r.top,h=r.bottom;if("vertical"===e.label.orientation){var c=[n,o,l,h];l=c[0],h=c[1],n=c[2],o=c[3]}var d=s.left-a.left-n,u=s.top-a.top-l,g=this.annoCtx.graphics.drawRect(d-i.globals.barPadForNumericAxis,u,s.width+n+o,s.height+l+h,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&g.node.classList.add(e.id),g}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,a,s){var r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(a,"']"));if(r){var n=r.parentNode,o=t.addBackgroundToAnno(r,i);o&&(n.insertBefore(o.node,r),i.label.mouseEnter&&o.node.addEventListener("mouseenter",i.label.mouseEnter.bind(t,i)),i.label.mouseLeave&&o.node.addEventListener("mouseleave",i.label.mouseLeave.bind(t,i)),i.label.click&&o.node.addEventListener("click",i.label.click.bind(t,i)))}};e.config.annotations.xaxis.forEach((function(t,e){return i(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return i(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return i(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var i,a=this.w,s="y1"===t?e.y:e.y2,r=!1;if(this.annoCtx.invertAxis){var n=a.config.xaxis.convertedCatToNumeric?a.globals.categoryLabels:a.globals.labels,o=n.indexOf(s),l=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(o+1,")"));i=l?parseFloat(l.getAttribute("y")):(a.globals.gridHeight/n.length-1)*(o+1)-a.globals.barHeight,void 0!==e.seriesIndex&&a.globals.barHeight&&(i-=a.globals.barHeight/2*(a.globals.series.length-1)-a.globals.barHeight*e.seriesIndex)}else{var h,c=a.globals.seriesYAxisMap[e.yAxisIndex][0],d=a.config.yaxis[e.yAxisIndex].logarithmic?new Pi(this.annoCtx.ctx).getLogVal(a.config.yaxis[e.yAxisIndex].logBase,s,c)/a.globals.yLogRatio[c]:(s-a.globals.minYArr[c])/(a.globals.yRange[c]/a.globals.gridHeight);i=a.globals.gridHeight-Math.min(Math.max(d,0),a.globals.gridHeight),r=d>a.globals.gridHeight||d<0,!e.marker||void 0!==e.y&&null!==e.y||(i=0),null!==(h=a.config.yaxis[e.yAxisIndex])&&void 0!==h&&h.reversed&&(i=d)}return"string"==typeof s&&s.includes("px")&&(i=parseFloat(s)),{yP:i,clipped:r}}},{key:"getX1X2",value:function(t,e){var i=this.w,a="x1"===t?e.x:e.x2,s=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,r=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,n=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,o=!1,l=this.annoCtx.inversedReversedAxis?(r-a)/(n/i.globals.gridWidth):(a-s)/(n/i.globals.gridWidth);return"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||i.config.chart.sparkline.enabled||(l=this.getStringX(a)),"string"==typeof a&&a.includes("px")&&(l=parseFloat(a)),null==a&&e.marker&&(l=i.globals.gridWidth),void 0!==e.seriesIndex&&i.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=i.globals.barWidth/2*(i.globals.series.length-1)-i.globals.barWidth*e.seriesIndex),l>i.globals.gridWidth?(l=i.globals.gridWidth,o=!0):l<0&&(l=0,o=!0),{x:l,clipped:o}}},{key:"getStringX",value:function(t){var e=this.w,i=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var a=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),s=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(a+1,")"));return s&&(i=parseFloat(s.getAttribute("x"))),i}}]),t}(),Ti=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addXaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=this.helpers.getX1X2("x1",t),n=r.x,o=r.clipped,l=!0,h=t.label.text,c=t.strokeDashArray;if(v.isNumber(n)){if(null===t.x2||void 0===t.x2){if(!o){var d=this.annoCtx.graphics.drawLine(n+t.offsetX,0+t.offsetY,n+t.offsetX,s.globals.gridHeight+t.offsetY,t.borderColor,c,t.borderWidth);e.appendChild(d.node),t.id&&d.node.classList.add(t.id)}}else{var u=this.helpers.getX1X2("x2",t);if(a=u.x,l=u.clipped,!o||!l){if(a12?u-12:0===u?12:u;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(g))).replace(/(^|[^\\])h/g,"$1"+g);var p=a?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var x=a?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);var b=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var m=u<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));var v=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var y=-t.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){var k=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(k)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var A=(a?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(n[0],"g"),n[A])).replace(new RegExp(o[0],"g"),o[A])).replace(new RegExp(s[0],"g"),s[c])).replace(new RegExp(r[0],"g"),r[c])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var a=this.w;void 0!==a.config.xaxis.min&&(t=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(e=a.config.xaxis.max);var s=this.getDate(t),r=this.getDate(e),n=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=v.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),Xi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return s(t,[{key:"xLabelFormat",value:function(t,e,i,a){var s=this.w;if("datetime"===s.config.xaxis.type&&void 0===s.config.xaxis.labels.formatter&&void 0===s.config.tooltip.x.formatter){var r=new zi(this.ctx);return r.formatDate(r.getDate(e),s.config.tooltip.x.format)}return t(e,i,a)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,i){var a=this.w;if(v.isNumber(t))if(0!==a.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:a.globals.yValueDecimal);else{var s=t.toFixed(0);t=t==s?s:t.toFixed(1)}return t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(v.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(v.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var i=e.globals.maxX-e.globals.minX;return i>0&&i<100?t.toFixed(1):t.toFixed(0)}if(e.globals.isBarHorizontal)if(e.globals.maxY-e.globals.minYArr<4)return t.toFixed(1);return t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,a){void 0!==i.labels.formatter?e.globals.yLabelFormatters[a]=i.labels.formatter:e.globals.yLabelFormatters[a]=function(s){return e.globals.xyCharts?Array.isArray(s)?s.map((function(e){return t.defaultYFormatter(e,i,a)})):t.defaultYFormatter(s,i,a):s}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),Ri=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getLabel",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",n=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,l=void 0===t[a]?"":t[a],h=l,c=o.globals.xLabelFormatter,d=o.config.xaxis.labels.formatter,u=!1,g=new Xi(this.ctx),p=l;n&&(h=g.xLabelFormat(c,l,p,{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o}),void 0!==d&&(h=d(l,t[a],{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o})));var f,x;e.length>0?(f=e[a].unit,x=null,e.forEach((function(t){"month"===t.unit?x="year":"day"===t.unit?x="month":"hour"===t.unit?x="day":"minute"===t.unit&&(x="hour")})),u=x===f,i=e[a].position,h=e[a].value):"datetime"===o.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var b=new Mi(this.ctx),m={};m=o.globals.rotateXLabels&&n?b.getTextRects(h,parseInt(r,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):b.getTextRects(h,parseInt(r,10));var v=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||s.indexOf(h)>=0&&v)&&(h=""),{x:i,text:h,textRect:m,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var a=this.w,s=a.config.xaxis.tickAmount;return"dataPoints"===s&&(s=Math.round(a.globals.gridWidth/120)),s>i||t%Math.round(i/(s+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,a,s){var r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=s[s.length-1];e.xa.length||a.some((function(t){return Array.isArray(t.seriesName)}))?t:i.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,i=e.config.yaxis[t];if(!i.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!i.showForNullSeries){var a=e.globals.seriesYAxisMap[t],s=new Pi(this.ctx);return a.every((function(t){return s.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,i,a,s,r,n){var o=this.w,l=new Mi(this.ctx),h=o.globals.translateY+o.config.yaxis[s].labels.offsetY;if(o.globals.isBarHorizontal?h=0:"heatmap"===o.config.chart.type&&(h+=r/2),a.show&&e>0){!0===o.config.yaxis[s].opposite&&(t+=a.width);for(var c=e;c>=0;c--){var d=l.drawLine(t+i.offsetX-a.width+a.offsetX,h+a.offsetY,t+i.offsetX+a.offsetX,h+a.offsetY,a.color);n.add(d),h+=r}}}}]),t}(),Yi=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx),this.axesUtils=new Ri(this.annoCtx)}return s(t,[{key:"addYaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=t.strokeDashArray,n=this.helpers.getY1Y2("y1",t),o=n.yP,l=n.clipped,h=!0,c=!1,d=t.label.text;if(null===t.y2||void 0===t.y2){if(!l){c=!0;var u=this.annoCtx.graphics.drawLine(0+t.offsetX,o+t.offsetY,this._getYAxisAnnotationWidth(t),o+t.offsetY,t.borderColor,r,t.borderWidth);e.appendChild(u.node),t.id&&u.node.classList.add(t.id)}}else{if(a=(n=this.helpers.getY1Y2("y2",t)).yP,h=n.clipped,a>o){var g=o;o=a,a=g}if(!l||!h){c=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,a+t.offsetY,this._getYAxisAnnotationWidth(t),o-a,0,t.fillColor,t.opacity,1,t.borderColor,r);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(c){var f="right"===t.label.position?s.globals.gridWidth:"center"===t.label.position?s.globals.gridWidth/2:0,x=this.annoCtx.graphics.drawText({x:f+t.label.offsetX,y:(null!=a?a:o)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});x.attr({rel:i}),e.appendChild(x.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;e.globals.gridWidth;return(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,a){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,i.node,a)})),i}}]),t}(),Ei=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addPointAnnotation",value:function(t,e,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",t),s=a.x,r=a.clipped,n=(a=this.helpers.getY1Y2("y1",t)).yP,o=a.clipped;if(v.isNumber(s)&&!o&&!r){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},h=this.annoCtx.graphics.drawMarker(s+t.marker.offsetX,n+t.marker.offsetY,l);e.appendChild(h.node);var c=t.label.text?t.label.text:"",d=this.annoCtx.graphics.drawText({x:s+t.label.offsetX,y:n+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:c,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(d.attr({rel:i}),e.appendChild(d.node),t.customSVG.SVG){var u=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});u.attr({transform:"translate(".concat(s+t.customSVG.offsetX,", ").concat(n+t.customSVG.offsetY,")")}),u.node.innerHTML=t.customSVG.SVG,e.appendChild(u.node)}if(t.image.path){var g=t.image.width?t.image.width:20,p=t.image.height?t.image.height:20;h=this.annoCtx.addImage({x:s+t.image.offsetX-g/2,y:n+t.image.offsetY-p/2,width:g,height:p,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&h.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&h.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&h.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,a){t.addPointAnnotation(e,i.node,a)})),i}}]),t}();var Hi={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},Oi=function(){function t(){i(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return s(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[Hi],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),Fi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.graphics=new Mi(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Ii(this),this.xAxisAnnotations=new Ti(this),this.yAxisAnnotations=new Yi(this),this.pointsAnnotations=new Ei(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return s(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=t.config.chart.animations.enabled,r=[e,i,a],n=[i.node,e.node,a.node],o=0;o<3;o++)t.globals.dom.elGraphical.add(r[o]),!s||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&n[o].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:n[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,a=t.y,s=t.text,r=t.textAnchor,n=t.foreColor,o=t.fontSize,l=t.fontFamily,h=t.fontWeight,c=t.cssClass,d=t.backgroundColor,u=t.borderWidth,g=t.strokeDashArray,p=t.borderRadius,f=t.borderColor,x=t.appendTo,b=void 0===x?".apexcharts-svg":x,m=t.paddingLeft,v=void 0===m?4:m,y=t.paddingRight,w=void 0===y?4:y,k=t.paddingBottom,A=void 0===k?2:k,C=t.paddingTop,S=void 0===C?2:C,L=this.w,M=this.graphics.drawText({x:i,y:a,text:s,textAnchor:r||"start",fontSize:o||"12px",fontWeight:h||"regular",fontFamily:l||L.config.chart.fontFamily,foreColor:n||L.config.chart.foreColor,cssClass:c}),P=L.globals.dom.baseEl.querySelector(b);P&&P.appendChild(M.node);var I=M.bbox();if(s){var T=this.graphics.drawRect(I.x-v,I.y-S,I.width+v+w,I.height+A+S,p,d||"transparent",1,u,f,g);P.insertBefore(T.node,M.node)}}},{key:"addImage",value:function(t,e){var i=this.w,a=t.path,s=t.x,r=void 0===s?0:s,n=t.y,o=void 0===n?0:n,l=t.width,h=void 0===l?20:l,c=t.height,d=void 0===c?20:c,u=t.appendTo,g=void 0===u?".apexcharts-svg":u,p=i.globals.dom.Paper.image(a);p.size(h,d).move(r,o);var f=i.globals.dom.baseEl.querySelector(g);return f&&f.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,a=t.context,s=t.type,r=t.contextMethod,n=a,o=n.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),h=l.childNodes.length+1,c=new Oi,d=Object.assign({},"xaxis"===s?c.xAxisAnnotation:"yaxis"===s?c.yAxisAnnotation:c.pointAnnotation),u=v.extend(d,e);switch(s){case"xaxis":this.addXaxisAnnotation(u,l,h);break;case"yaxis":this.addYaxisAnnotation(u,l,h);break;case"point":this.addPointAnnotation(u,l,h)}var g=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(h,"']")),p=this.helpers.addBackgroundToAnno(g,u);return p&&l.insertBefore(p.node,g),i&&o.globals.memory.methodsToExec.push({context:n,id:u.id?u.id:v.randomId(),method:r,label:"addAnnotation",params:e}),a}},{key:"clearAnnotations",value:function(t){for(var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),a=e.globals.memory.methodsToExec.length-1;a>=0;a--)"addText"!==e.globals.memory.methodsToExec[a].label&&"addAnnotation"!==e.globals.memory.methodsToExec[a].label||e.globals.memory.methodsToExec.splice(a,1);i=v.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(e));a&&(i.globals.memory.methodsToExec.map((function(t,a){t.id===e&&i.globals.memory.methodsToExec.splice(a,1)})),Array.prototype.forEach.call(a,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),Di=function(t){var e,i=t.isTimeline,a=t.ctx,s=t.seriesIndex,r=t.dataPointIndex,n=t.y1,o=t.y2,l=t.w,h=l.globals.seriesRangeStart[s][r],c=l.globals.seriesRangeEnd[s][r],d=l.globals.labels[r],u=l.config.series[s].name?l.config.series[s].name:"",g=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,f={w:l,seriesIndex:s,dataPointIndex:r,start:h,end:c};("function"==typeof p&&(u=p(u,f)),null!==(e=l.config.series[s].data[r])&&void 0!==e&&e.x&&(d=l.config.series[s].data[r].x),i)||"datetime"===l.config.xaxis.type&&(d=new Xi(a).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(a).formatDate,w:l}));"function"==typeof g&&(d=g(d,f)),Number.isFinite(n)&&Number.isFinite(o)&&(h=n,c=o);var x="",b="",m=l.globals.colors[s];if(void 0===l.config.tooltip.x.formatter)if("datetime"===l.config.xaxis.type){var v=new zi(a);x=v.formatDate(v.getDate(h),l.config.tooltip.x.format),b=v.formatDate(v.getDate(c),l.config.tooltip.x.format)}else x=h,b=c;else x=l.config.tooltip.x.formatter(h),b=l.config.tooltip.x.formatter(c);return{start:h,end:c,startVal:x,endVal:b,ylabel:d,color:m,seriesName:u}},_i=function(t){var e=t.color,i=t.seriesName,a=t.ylabel,s=t.start,r=t.end,n=t.seriesIndex,o=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(n);s=l.yLbFormatter(s),r=l.yLbFormatter(r);var h=l.yLbFormatter(t.w.globals.series[n][o]),c='\n '.concat(s,'\n - \n ').concat(r,"\n ");return'
'+(i||"")+'
'+a+": "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[n].type||"rangeBar"===t.w.config.series[n].type?c:"".concat(h,""):c)+"
"},Ni=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){this.hideYAxis();return v.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var i=e.w.config.series[e.seriesIndex].name;return null!==t?i+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),u(u({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,a=e.dataPointIndex,s=e.w,r=function(){var t=s.globals.seriesRangeStart[i][a];return s.globals.seriesRangeEnd[i][a]-t};return s.globals.comboCharts?"rangeBar"===s.config.series[i].type||"rangeArea"===s.config.series[i].type?r():t:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Di(u(u({},t),{},{isTimeline:!0})),i=e.color,a=e.seriesName,s=e.ylabel,r=e.startVal,n=e.endVal;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t):function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,i;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(i=t.plotOptions.bar)&&void 0!==i&&i.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}}}}},{key:"brush",value:function(t){return v.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return u(u({},t),{},{plotOptions:u(u({},t.plotOptions),{},{bar:u(u({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return v.isNumber(t)?Math.floor(t):t};var a=t.xaxis.labels.formatter,s=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(s=i.map((function(t){return Array.isArray(t)?t:String(t)}))),s&&s.length&&(t.xaxis.labels.formatter=function(t){return v.isNumber(t)?a(s[Math.floor(t)-1]):a(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,i,a,s){var r=t.globals.seriesCandleO[e][i],n=t.globals.seriesCandleH[e][i],o=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],h=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==s?'
\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][i],"\n
"):'
')+"
".concat(a[0],': ')+r+"
"+"
".concat(a[1],': ')+n+"
"+(o?"
".concat(a[2],': ')+o+"
":"")+"
".concat(a[3],': ')+l+"
"+"
".concat(a[4],': ')+h+"
"}}]),t}(),Wi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(t){var e=t.responsiveOverride,i=this.opts,a=new Oi,s=new Ni(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),n={};if(i&&"object"===b(i)){var o,l,h,c,d,u,g,p,f,x,m={};m=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?s[i.chart.type]():s.line(),null!==(o=i.plotOptions)&&void 0!==o&&null!==(l=o.bar)&&void 0!==l&&l.isFunnel&&(m=s.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(m=s.stackedBars()),null!==(h=i.chart.brush)&&void 0!==h&&h.enabled&&(m=s.brush(m)),null!==(c=i.plotOptions)&&void 0!==c&&null!==(d=c.line)&&void 0!==d&&d.isSlopeChart&&(m=s.slope()),i.chart.stacked&&"100%"===i.chart.stackType&&(i=s.stacked100(i)),null!==(u=i.plotOptions)&&void 0!==u&&null!==(g=u.bar)&&void 0!==g&&g.isDumbbell&&(i=s.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},e||(i.xaxis.convertedCatToNumeric=!1),(null!==(p=(i=this.checkForCatToNumericXAxis(this.chartType,m,i)).chart.sparkline)&&void 0!==p&&p.enabled||null!==(f=window.Apex.chart)&&void 0!==f&&null!==(x=f.sparkline)&&void 0!==x&&x.enabled)&&(m=s.sparkline(m)),n=v.extend(r,m)}var y=v.extend(n,window.Apex);return r=v.extend(y,i),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var a,s,r=new Ni(i),n=("bar"===t||"boxPlot"===t)&&(null===(a=i.plotOptions)||void 0===a||null===(s=a.bar)||void 0===s?void 0:s.horizontal),o="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,l="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,h=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return n||o||!l||"between"===h||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new Oi;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=v.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[v.extend(i.yAxis,t.yaxis)]:t.yaxis=v.extendArray(t.yaxis,i.yAxis);var a=!1;t.yaxis.forEach((function(t){t.logarithmic&&(a=!0)}));var s=t.series;return e&&!s&&(s=e.config.series),a&&s.length!==t.yaxis.length&&s.length&&(t.yaxis=s.map((function(e,a){if(e.name||(s[a].name="series-".concat(a+1)),t.yaxis[a])return t.yaxis[a].seriesName=s[a].name,t.yaxis[a];var r=v.extend(i.yAxis,t.yaxis[0]);return r.show=!1,r}))),a&&s.length>1&&s.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.yaxis=v.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.xaxis=v.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new Oi;return t.annotations.points=v.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),Bi=function(){function t(){i(this,t)}return s(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:t.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=v.extend({},t),e.initialSeries=v.clone(t.series),e.lastXAxis=v.clone(e.initialConfig.xaxis),e.lastYAxis=v.clone(e.initialConfig.yaxis),e}}]),t}(),Gi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(){var t=new Wi(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new Bi).init(t)}}}]),t}(),ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return s(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,a=parseInt(e.globals.gridWidth,10),s=parseInt(e.globals.gridHeight,10),r=a>s?a:s,n=t.image,o=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=r+1,l=r):(o=t.width,l=t.height);var h=document.createElementNS(e.globals.SVGNS,"pattern");Mi.setAttrs(h,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var c=document.createElementNS(e.globals.SVGNS,"image");h.appendChild(c),c.setAttributeNS(window.SVG.xlink,"href",n),Mi.setAttrs(c,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),c.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(h)}},{key:"getSeriesIndex",value:function(t){var e=this.w,i=e.config.chart.type;return("bar"===i||"rangeBar"===i)&&e.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var i,a=this.w,s=null,n=null,o=r(t);try{for(o.s();!(i=o.n()).done;){var l=i.value;l>=e.threshold?(null===s||l>s)&&(s=l):(null===n||l-1?x=v.getOpacityFromRGBA(c):m=v.hexToRgba(v.rgb2hex(c),x),t.opacity&&(x=t.opacity),"pattern"===p&&(n=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:n,fillColor:c,fillOpacity:x,defaultColor:m})),b){var y=f(l.fill.gradient.colorStops)||[],w=l.fill.gradient.type;h&&(y[this.seriesIndex]=this.computeColorStops(s.globals.series[this.seriesIndex],l.plotOptions.line.colors),w="vertical"),o=this.handleGradientFill({type:w,fillConfig:t.fillConfig,fillColor:c,fillOpacity:x,colorStops:y,i:this.seriesIndex})}if("image"===p){var k=l.fill.image.src,A=t.patternID?t.patternID:"",C="pattern".concat(s.globals.cuid).concat(t.seriesNumber+1).concat(A);-1===this.patternIDs.indexOf(C)&&(this.clippedImgArea({opacity:x,image:Array.isArray(k)?t.seriesNumber-1&&(p=v.getOpacityFromRGBA(g));var f=void 0===o.gradient.opacityTo?a:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[n]:o.gradient.opacityTo;if(void 0===o.gradient.gradientToColors||0===o.gradient.gradientToColors.length)d="dark"===o.gradient.shade?c.shadeColor(-1*parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i):c.shadeColor(parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i);else if(o.gradient.gradientToColors[l.seriesNumber]){var x=o.gradient.gradientToColors[l.seriesNumber];d=x,x.indexOf("rgba")>-1&&(f=v.getOpacityFromRGBA(x))}else d=i;if(o.gradient.gradientFrom&&(g=o.gradient.gradientFrom),o.gradient.gradientTo&&(d=o.gradient.gradientTo),o.gradient.inverseColors){var b=g;g=d,d=b}return g.indexOf("rgb")>-1&&(g=v.rgb2hex(g)),d.indexOf("rgb")>-1&&(d=v.rgb2hex(d)),h.drawGradient(e,g,d,p,f,l.size,o.gradient.stops,r,n)}}]),t}(),Vi=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],r=this.w,n=e,o=t,l=null,h=new Mi(this.ctx),c=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(o.x))for(var d=0;d0:r.config.markers.size>0)||s||c){p||(f+=" w".concat(v.randomId()));var x=this.getMarkerConfig({cssClass:f,seriesIndex:e,dataPointIndex:g});if(r.config.series[n].data[g]&&(r.config.series[n].data[g].fillColor&&(x.pointFillColor=r.config.series[n].data[g].fillColor),r.config.series[n].data[g].strokeColor&&(x.pointStrokeColor=r.config.series[n].data[g].strokeColor)),void 0!==a&&(x.pSize=a),(o.x[d]<-r.globals.markers.largestSize||o.x[d]>r.globals.gridWidth+r.globals.markers.largestSize||o.y[d]<-r.globals.markers.largestSize||o.y[d]>r.globals.gridHeight+r.globals.markers.largestSize)&&(x.pSize=0),!p)(r.globals.markers.size[e]>0||s||c)&&!l&&(l=h.group({class:s||c?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),(u=h.drawMarker(o.x[d],o.y[d],x)).attr("rel",g),u.attr("j",g),u.attr("index",e),u.node.setAttribute("default-marker-size",x.pSize),new Li(this.ctx).setSelectionFilter(u,e,g),this.addEvents(u),l&&l.add(u)}else void 0===r.globals.pointsArray[e]&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([o.x[d],o.y[d]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,i=t.seriesIndex,a=t.dataPointIndex,s=void 0===a?null:a,r=t.radius,n=void 0===r?null:r,o=t.size,l=void 0===o?null:o,h=t.strokeWidth,c=void 0===h?null:h,d=this.w,u=this.getMarkerStyle(i),g=null===l?d.globals.markers.size[i]:l,p=d.config.markers;return null!==s&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===i&&t.dataPointIndex===s&&(u.pointStrokeColor=t.strokeColor,u.pointFillColor=t.fillColor,g=t.size,u.pointShape=t.shape)})),{pSize:null===n?g:n,pRadius:null!==n?n:p.radius,pointStrokeWidth:null!==c?c:Array.isArray(p.strokeWidth)?p.strokeWidth[i]:p.strokeWidth,pointStrokeColor:u.pointStrokeColor,pointFillColor:u.pointFillColor,shape:u.pointShape||(Array.isArray(p.shape)?p.shape[i]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[i]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[i]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[i]:p.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(t){var e=this.w,i=new Mi(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,a=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[t]:a,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),Ui=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return s(t,[{key:"draw",value:function(t,e,i){var a=this.w,s=new Mi(this.ctx),r=i.realIndex,n=i.pointsPos,o=i.zRatio,l=i.elParent,h=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(h.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(n.x))for(var c=0;cp.maxBubbleRadius&&(g=p.maxBubbleRadius)}var f=n.x[c],x=n.y[c];if(g=g||0,null!==x&&void 0!==a.globals.series[r][d]||(u=!1),u){var b=this.drawPoint(f,x,g,r,d,e);h.add(b)}l.add(h)}}},{key:"drawPoint",value:function(t,e,i,a,s,r){var n=this.w,o=a,l=new y(this.ctx),h=new Li(this.ctx),c=new ji(this.ctx),d=new Vi(this.ctx),u=new Mi(this.ctx),g=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:s,radius:"bubble"===n.config.chart.type||n.globals.comboCharts&&n.config.series[a]&&"bubble"===n.config.series[a].type?i:null}),p=c.fillPath({seriesNumber:a,dataPointIndex:s,color:g.pointFillColor,patternUnits:"objectBoundingBox",value:n.globals.series[a][r]}),f=u.drawMarker(t,e,g);if(n.config.series[o].data[s]&&n.config.series[o].data[s].fillColor&&(p=n.config.series[o].data[s].fillColor),f.attr({fill:p}),n.config.chart.dropShadow.enabled){var x=n.config.chart.dropShadow;h.dropShadow(f,x,a)}if(!this.initialAnim||n.globals.dataChanged||n.globals.resized)n.globals.animationEnded=!0;else{var b=n.config.chart.animations.speed;l.animateMarker(f,b,n.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(f)}),100)}))}return f.attr({rel:s,j:s,index:a,"default-marker-size":g.pSize}),h.setSelectionFilter(f,a,s),d.addEvents(f),f.node.classList.add("apexcharts-marker"),f}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}]),t}(),qi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"dataLabelsCorrection",value:function(t,e,i,a,s,r,n){var o=this.w,l=!1,h=new Mi(this.ctx).getTextRects(i,n),c=h.width,d=h.height;e<0&&(e=0),e>o.globals.gridHeight+d&&(e=o.globals.gridHeight+d/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:t,y:e,width:c,height:d});var u=o.globals.dataLabelsRects[a].length-2,g=void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(void 0!==o.globals.dataLabelsRects[a][u]){var p=o.globals.dataLabelsRects[a][g];(t>p.x+p.width||e>p.y+p.height||e+de.globals.gridWidth+b.textRects.width+30)&&(o="");var m=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(m=e.globals.dataLabels.style.colors[n]),"function"==typeof m&&(m=m({series:e.globals.series,seriesIndex:r,dataPointIndex:n,w:e})),u&&(m=u);var v=d.offsetX,y=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(v=0,y=0),e.globals.isSlopeChart&&(0!==n&&(v=-2*d.offsetX+5),0!==n&&n!==e.config.series[r].data.length-1&&(v=0)),b.drawnextLabel){if((x=i.drawText({width:100,height:parseInt(d.style.fontSize,10),x:a+v,y:s+y,foreColor:m,textAnchor:l||d.textAnchor,text:o,fontSize:h||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"})).attr({class:f||"apexcharts-datalabel",cx:a,cy:s}),d.dropShadow.enabled){var w=d.dropShadow;new Li(this.ctx).dropShadow(x,w)}c.add(x),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(n)}return x}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,a=i.config.dataLabels.background,s=a.padding,r=a.padding/2,n=e.width,o=e.height,l=new Mi(this.ctx).drawRect(e.x-s,e.y-r/2,n+2*s,o+r,a.borderRadius,"transparent"!==i.config.chart.background&&i.config.chart.background?i.config.chart.background:"#fff",a.opacity,a.borderWidth,a.borderColor);a.dropShadow.enabled&&new Li(this.ctx).dropShadow(l,a.dropShadow);return l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,s=v.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,t&&(e&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i-1&&(t[i].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,i=this.getSeriesByName(t),a=parseInt(null==i?void 0:i.getAttribute("data:realIndex"),10),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),r=null,n=null,o=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){r=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),n=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']"));var l=e.globals.seriesYAxisReverseMap[a];o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']"));else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var h=0;h=t.from&&(r0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1)for(var s=i.config.series.map((function(t,a){return t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(a)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(i.config.series[a].type)>-1)?a:-1})),r="asc"===t?0:s.length-1;"asc"===t?r=0;"asc"===t?r++:r--)if(-1!==s[r]){a=s[r];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,a){for(var s=e[i].childNodes,r={type:a,paths:[],realIndex:e[i].getAttribute("data:realIndex")},n=0;n0)for(var a=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),a=[],s=function(t){var e=function(e){return i[t].getAttribute(e)},s={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};a.push({rect:s,color:i[t].getAttribute("color")})},r=0;r0?t:[]}));return t}}]),t}(),$i=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,a=this.w.globals,s="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,r=0;r=5?this.twoDSeries.push(v.parseNumber(t[e].data[r][4])):this.twoDSeries.push(v.parseNumber(t[e].data[r][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var n=new Date(t[e].data[r][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(t[e].data[r][0]);for(var o=0;o-1&&(r=this.activeSeriesIndex);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,r=new zi(i),n=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isRangeBar="rangeBar"===a.chart.type&&s.isBarHorizontal,s.hasXaxisGroups="category"===a.xaxis.type&&a.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=a.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?s.seriesNames.push(t.name):s.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var o=[],l=f(new Set(a.series.map((function(t){return t.group}))));a.series.forEach((function(t,e){var i=l.indexOf(t.group);o[i]||(o[i]=[]),o[i].push(s.seriesNames[e])})),s.seriesGroups=o;for(var h=function(){for(var t=0;t0&&(this.twoDSeriesX=n,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var d=t[c].data.map((function(t){return v.parseNumber(t)}));s.series.push(d)}s.seriesZ.push(this.threeDSeries),void 0!==t[c].color?s.seriesColors.push(t[c].color):s.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var a=0;a0)i.labels=e.xaxis.categories;else if(e.labels.length>0)i.labels=e.labels.slice();else if(this.fallbackToCategory){if(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric)new Ni(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t)}else this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,a=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var s=i.series.map((function(t,e){return t.data.filter((function(t,e,i){return i.findIndex((function(e){return e.x===t.x}))===e}))})),r=s.reduce((function(t,e,i,a){return a[t].length>e.length?t:i}),0),n=0;n0&&s==i.length&&e.push(a)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}]),t}(),Ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),a=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",a*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"getSvgString",value:function(){var t=this;return new Promise((function(e){var i=t.w,a=i.config.chart.toolbar.export.width,s=i.config.chart.toolbar.export.scale||a/i.globals.svgWidth;s||(s=1);var r=t.w.globals.dom.Paper.svg(),n=t.w.globals.dom.Paper.node.cloneNode(!0);1!==s&&t.scaleSvgNode(n,s),t.convertImagesToBase64(n).then((function(){r=(new XMLSerializer).serializeToString(n),e(r.replace(/ /g," "))}))}))}},{key:"convertImagesToBase64",value:function(t){var e=this,i=t.getElementsByTagName("image"),a=Array.from(i).map((function(t){var i=t.getAttributeNS("http://www.w3.org/1999/xlink","href");return i&&!i.startsWith("data:")?e.getBase64FromUrl(i).then((function(e){t.setAttributeNS("http://www.w3.org/1999/xlink","href",e)})).catch((function(t){console.error("Error converting image to base64:",t)})):Promise.resolve()}));return Promise.all(a)}},{key:"getBase64FromUrl",value:function(t){return new Promise((function(e,i){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var t=document.createElement("canvas");t.width=a.width,t.height=a.height,t.getContext("2d").drawImage(a,0,0),e(t.toDataURL())},a.onerror=i,a.src=t}))}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var t=this;return new Promise((function(e){t.cleanup(),t.getSvgString().then((function(t){var i=new Blob([t],{type:"image/svg+xml;charset=utf-8"});e(URL.createObjectURL(i))}))}))}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var a=e.w,s=t?t.scale||t.width/a.globals.svgWidth:1;e.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*s,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var n="transparent"!==a.config.chart.background&&a.config.chart.background?a.config.chart.background:"#fff",o=r.getContext("2d");o.fillStyle=n,o.fillRect(0,0,r.width*s,r.height*s),e.getSvgString().then((function(t){var e="data:image/svg+xml,"+encodeURIComponent(t),a=new Image;a.crossOrigin="anonymous",a.onload=function(){if(o.drawImage(a,0,0),r.msToBlob){var t=r.msToBlob();i({blob:t})}else{var e=r.toDataURL("image/png");i({imgURI:e})}},a.src=e}))}))}},{key:"exportToSVG",value:function(){var t=this;this.svgUrl().then((function(e){t.triggerDownload(e,t.w.config.chart.toolbar.export.svg.filename,".svg")}))}},{key:"exportToPng",value:function(){var t=this,e=this.w.config.chart.toolbar.export.scale,i=this.w.config.chart.toolbar.export.width,a=e?{scale:e}:i?{width:i}:void 0;this.dataURI(a).then((function(e){var i=e.imgURI,a=e.blob;a?navigator.msSaveOrOpenBlob(a,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,a=t.fileName,s=t.columnDelimiter,r=void 0===s?",":s,n=t.lineDelimiter,o=void 0===n?"\n":n,l=this.w;i||(i=l.config.series);var h=[],c=[],d="",u=l.globals.series.map((function(t,e){return-1===l.globals.collapsedSeriesIndices.indexOf(e)?t:[]})),g=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.categoryFormatter?l.config.chart.toolbar.export.csv.categoryFormatter(t):"datetime"===l.config.xaxis.type&&String(t).length>=10?new Date(t).toDateString():v.isNumber(t)?t:t.split(r).join("")},p=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},x=Math.max.apply(Math,f(i.map((function(t){return t.data?t.data.length:0})))),b=new $i(this.ctx),m=new Ri(this.ctx),y=function(t){var i="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var a=l.globals.yLabelFormatters[0],s=new Zi(e.ctx).getActiveConfigSeriesIndex();i=a(l.globals.labels[t],{seriesIndex:s,dataPointIndex:t,w:l})}else i=m.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?i=l.config.xaxis.categories[t]:l.config.labels.length&&(i=l.config.labels[t]))}else i=l.config.labels[t];return null===i?"nullvalue":(Array.isArray(i)&&(i=i.join(" ")),v.isNumber(i)?i:i.split(r).join(""))},w=function(t,e){if(h.length&&0===e&&c.push(h.join(r)),t.data){t.data=t.data.length&&t.data||f(Array(x)).map((function(){return""}));for(var a=0;a0&&!s.globals.isBarHorizontal&&(this.xaxisLabels=s.globals.timescaleLabels.slice()),s.config.xaxis.overwriteCategories&&(this.xaxisLabels=s.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===s.config.xaxis.position?this.offY=0:this.offY=s.globals.gridHeight,this.offY=this.offY+s.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.xaxisBorderWidth=s.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=s.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=s.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=s.config.xaxis.axisBorder.height,this.yaxis=s.config.yaxis[0]}return s(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new Mi(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});i.add(a);for(var s=[],r=0;r6&&void 0!==arguments[6]?arguments[6]:{},h=[],c=[],d=this.w,u=l.xaxisFontSize||this.xaxisFontSize,g=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,f=l.fontWeight||d.config.xaxis.labels.style.fontWeight,x=l.cssClass||d.config.xaxis.labels.style.cssClass,b=d.globals.padHorizontal,m=a.length,v="category"===d.config.xaxis.type?d.globals.dataPoints:m;if(0===v&&m>v&&(v=m),s){var y=v>1?v-1:v;n=d.globals.gridWidth/Math.min(y,m-1),b=b+r(0,n)/2+d.config.xaxis.labels.offsetX}else n=d.globals.gridWidth/v,b=b+r(0,n)+d.config.xaxis.labels.offsetX;for(var w=function(s){var l=b-r(s,n)/2+d.config.xaxis.labels.offsetX;0===s&&1===m&&n/2===b&&1===v&&(l=d.globals.gridWidth/2);var y=o.axesUtils.getLabel(a,d.globals.timescaleLabels,l,s,h,u,t),w=28;d.globals.rotateXLabels&&t&&(w=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(w+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(u)+(d.globals.xAxisLabelsHeight-d.globals.xAxisGroupLabelsHeight)+(d.globals.rotateXLabels?10:0)),y=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(s,y,m):o.axesUtils.checkForOverflowingLabels(s,y,m,h,c);if(d.config.xaxis.labels.show){var k=e.drawText({x:y.x,y:o.offY+d.config.xaxis.labels.offsetY+w-("top"===d.config.xaxis.position?d.globals.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:"middle",fontWeight:y.isBold?600:f,fontSize:u,fontFamily:g,foreColor:Array.isArray(p)?t&&d.config.xaxis.convertedCatToNumeric?p[d.globals.minX+s-1]:p[s]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(i.add(k),k.on("click",(function(t){if("function"==typeof d.config.chart.events.xAxisLabelClick){var e=Object.assign({},d,{labelIndex:s});d.config.chart.events.xAxisLabelClick(t,o.ctx,e)}})),t){var A=document.createElementNS(d.globals.SVGNS,"title");A.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,k.node.appendChild(A),""!==y.text&&(h.push(y.text),c.push(y))}}sa.globals.gridWidth)){var r=this.offY+a.config.xaxis.axisTicks.offsetY;if(e=e+r+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(e=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new Mi(this.ctx).drawLine(t+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,s+a.config.xaxis.axisTicks.offsetX,e+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var s=0;s0){var h=s[s.length-1].getBBox(),c=s[0].getBBox();h.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),c.x+c.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var d=0;d0&&(this.xaxisLabels=a.globals.timescaleLabels.slice())}return s(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new Mi(this.ctx);t||(t=i.group({class:"apexcharts-grid"}));var a=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),s=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(s),t.add(a),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new Mi(this.ctx),a=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,f(t.config.stroke.width)):t.config.stroke.width,s=function(t){var i=document.createElementNS(e.SVGNS,"clipPath");return i.setAttribute("id",t),i};e.dom.elGridRectMask=s("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=s("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=s("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=s("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=s("nonForecastMask".concat(e.cuid));var r=0,n=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),n=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=i.drawRect(-a/2-r-2,-a/2-2,e.gridWidth+a+n+r+4,e.gridHeight+a+4,0,"#fff");var o=t.globals.markers.largestSize;e.dom.elGridRectMarker=i.drawRect(-o,-o,e.gridWidth+2*o,e.gridHeight+2*o,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,a=t.y1,s=t.x2,r=t.y2,n=t.xCount,o=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===n-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:i,y1:a,x2:s,y2:r,xCount:n,parent:o});var h=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var c=l.globals.groups;if(c){for(var d=0,u=0;d0&&"datetime"!==t.config.xaxis.type&&(s=e.yAxisScale[a].result.length-1);this._drawXYLines({xCount:s,tickAmount:r})}else s=r,r=e.xTickAmount,this._drawInvertedXYLines({xCount:s,tickAmount:r});return this.drawGridBands(s,r),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/s}}},{key:"drawGridBands",value:function(t,e){var i,a,s=this,r=this.w;if((null===(i=r.config.grid.row.colors)||void 0===i?void 0:i.length)>0&&function(t,i,a,n,o,l){for(var h=0,c=0;h=r.config.grid[t].colors.length&&(c=0),s._drawGridBandRect({c:c,x1:a,y1:n,x2:o,y2:l,type:t}),n+=r.globals.gridHeight/e}("row",e,0,0,r.globals.gridWidth,r.globals.gridHeight/e),(null===(a=r.config.grid.column.colors)||void 0===a?void 0:a.length)>0){var n=r.globals.isBarHorizontal||"on"!==r.config.xaxis.tickPlacement||"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric?t:t-1;r.globals.isXNumeric&&(n=r.globals.xAxisScale.result.length-1);for(var o=r.globals.padHorizontal,l=r.globals.padHorizontal+r.globals.gridWidth/n,h=r.globals.gridHeight,c=0,d=0;c=r.config.grid.column.colors.length&&(d=0),"datetime"===r.config.xaxis.type)o=this.xaxisLabels[c].position,l=((null===(u=this.xaxisLabels[c+1])||void 0===u?void 0:u.position)||r.globals.gridWidth)-this.xaxisLabels[c].position;this._drawGridBandRect({c:d,x1:o,y1:0,x2:l,y2:h,type:"column"}),o+=r.globals.gridWidth/n}}}}]),t}(),ta=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"niceScale",value:function(t,e){var i,a,s,r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=1e-11,l=this.w,h=l.globals;h.isBarHorizontal?(i=l.config.xaxis,a=Math.max((h.svgWidth-100)/25,2)):(i=l.config.yaxis[n],a=Math.max((h.svgHeight-100)/15,2)),v.isNumber(a)||(a=10),s=void 0!==i.min&&null!==i.min,r=void 0!==i.max&&null!==i.min;var c=void 0!==i.stepSize&&null!==i.stepSize,d=void 0!==i.tickAmount&&null!==i.tickAmount,u=d?i.tickAmount:h.niceScaleDefaultTicks[Math.min(Math.round(a/2),h.niceScaleDefaultTicks.length-1)];if(h.isMultipleYAxis&&!d&&h.multiAxisTickAmount>0&&(u=h.multiAxisTickAmount,d=!0),u="dataPoints"===u?h.dataPoints-1:Math.abs(Math.round(u)),(t===Number.MIN_VALUE&&0===e||!v.isNumber(t)&&!v.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=v.isNumber(i.min)?i.min:0,e=v.isNumber(i.max)?i.max:t+u,h.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var g=e;e=t,t=g}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var p=[];u<1&&(u=1);var f=u,x=Math.abs(e-t);!s&&t>0&&t/x<.15&&(t=0,s=!0),!r&&e<0&&-e/x<.15&&(e=0,r=!0);var b=(x=Math.abs(e-t))/f,m=b,y=Math.floor(Math.log10(m)),w=Math.pow(10,y),k=Math.ceil(m/w);if(b=m=(k=h.niceScaleAllowedMagMsd[0===h.yValueDecimal?0:1][k])*w,h.isBarHorizontal&&i.stepSize&&"datetime"!==i.type?(b=i.stepSize,c=!0):c&&(b=i.stepSize),c&&i.forceNiceScale){var A=Math.floor(Math.log10(b));b*=Math.pow(10,y-A)}if(s&&r){var C=x/f;if(d)if(c)if(0!=v.mod(x,b)){var S=v.getGCD(b,C);b=C/S<10?S:C}else 0==v.mod(b,C)?b=C:(C=b,d=!1);else b=C;else if(c)0==v.mod(x,b)?C=b:b=C;else if(0==v.mod(x,b))C=b;else{C=x/(f=Math.ceil(x/b));var L=v.getGCD(x,b);x/La&&(t=e-b*u,t+=b*Math.floor((M-t)/b))}else if(s)if(d)e=t+b*f;else{var P=e;e=b*Math.ceil(e/b),Math.abs(e-t)/v.getGCD(x,b)>a&&(e=t+b*u,e+=b*Math.ceil((P-e)/b))}}else if(h.isMultipleYAxis&&d){var I=b*Math.floor(t/b),T=I+b*f;T0&&t16&&v.getPrimeFactors(f).length<2&&f++,!d&&i.forceNiceScale&&0===h.yValueDecimal&&f>x&&(f=x,b=Math.round(x/f)),f>a&&(!d&&!c||i.forceNiceScale)){var z=v.getPrimeFactors(f),X=z.length-1,R=f;t:for(var Y=0;YN);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,r=Math.abs(e-t),n=[];if(t===e)return{result:n=[t],niceMin:n[0],niceMax:n[n.length-1]};"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,r))&&(i=this.w.globals.dataPoints-1),s||(s=r/i),s=Math.round(10*(s+Number.EPSILON))/10,i===Number.MAX_VALUE&&(i=5,s=1);for(var o=t;i>=0;)n.push(o),o=v.preciseAddition(o,s),i-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,i){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));for(var a=[],s=Math.ceil(Math.log(e)/Math.log(i)+1),r=Math.floor(Math.log(t)/Math.log(i));r5?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase):this.logarithmicScale(e,i,r.logBase)):i!==-Number.MAX_VALUE&&v.isNumber(i)&&e!==Number.MAX_VALUE&&v.isNumber(e)?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.niceScale(e,i,t)):a.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var i=this.w,a=i.globals,s=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&v.isNumber(e)){var r=a.xTickAmount+1;s<10&&s>1&&(r=s),a.xAxisScale=this.linearScale(t,e,r,0,i.config.xaxis.stepSize)}else a.xAxisScale=this.linearScale(0,10,10);return a.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,i=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var a=i.seriesYAxisMap,s=i.minYArr,r=i.maxYArr;i.allSeriesCollapsed=!0,i.barGroups=[],a.forEach((function(a,n){var o=[];a.forEach((function(t){var i=e.series[t].group;o.indexOf(i)<0&&o.push(i)})),a.length>0?function(){var l,h,c=Number.MAX_VALUE,d=-Number.MAX_VALUE,u=c,g=d;if(e.chart.stacked)!function(){var t=new Array(i.dataPoints).fill(0),s=[],r=[],p=[];o.forEach((function(){s.push(t.map((function(){return Number.MIN_VALUE}))),r.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var f=function(t){!l&&e.series[a[t]].type&&(l=e.series[a[t]].type);var c=a[t];h=e.series[c].group?e.series[c].group:"axis-".concat(n),!(i.collapsedSeriesIndices.indexOf(c)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(c)<0)||(i.allSeriesCollapsed=!1,o.forEach((function(t,a){if(e.series[c].group===t)for(var n=0;n=0?r[a][n]+=o:p[a][n]+=o,s[a][n]+=o,u=Math.min(u,o),g=Math.max(g,o)}}))),"bar"!==l&&"column"!==l||i.barGroups.push(h)},x=0;x1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w.config,r=this.w.globals,n=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=t+1);var l=r.series,h=l,c=l;"candlestick"===s.chart.type?(h=r.seriesCandleL,c=r.seriesCandleH):"boxPlot"===s.chart.type?(h=r.seriesCandleO,c=r.seriesCandleC):r.isRangeData&&(h=r.seriesRangeStart,c=r.seriesRangeEnd);var d=!1;if(r.seriesX.length>=a){var u,g=null===(u=r.brushSource)||void 0===u?void 0:u.w.config.chart.brush;(s.chart.zoom.enabled&&s.chart.zoom.autoScaleYaxis||null!=g&&g.enabled&&null!=g&&g.autoScaleYaxis)&&(d=!0)}for(var p=t;px&&r.seriesX[p][b]>s.xaxis.max;b--);}for(var m=x;m<=b&&mh[p][m]&&h[p][m]<0&&(o=h[p][m])}else r.hasNullValues=!0}"bar"!==f&&"column"!==f||(o<0&&n<0&&(n=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,e=Math.min(e,0)))}return"rangeBar"===s.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&(o=e),"bar"===s.chart.type&&(o<0&&n<0&&(n=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:n,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i,a=Number.MAX_VALUE;if(t.isMultipleYAxis){a=Number.MAX_VALUE;for(var s=0;st.dataPoints&&0!==t.dataPoints&&(a=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(a=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var s=t.maxX-t.minX;s<30&&(a=s-1)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var r=[],n=t.minX-1;n0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,a-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var s=e-a[i-1];s>0&&(t.minXDiff=Math.min(s,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var i=e.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map((function(t){return t}))]);var a={},s={};i.forEach((function(i){a[i]=[],s[i]=[],t.w.config.series.map((function(t,a){return i.indexOf(e.seriesNames[a])>-1?a:null})).filter((function(t){return null!==t})).forEach((function(r){for(var n=0;n0?a[i][n]+=parseFloat(e.series[r][n])+1e-4:s[i][n]+=parseFloat(e.series[r][n]))}}))})),Object.entries(a).forEach((function(t){var i=p(t,1)[0];a[i].forEach((function(t,r){e.maxY=Math.max(e.maxY,a[i][r]),e.minY=Math.min(e.minY,s[i][r])}))}))}}}]),t}(),ia=function(){function t(e,a){i(this,t),this.ctx=e,this.elgrid=a,this.w=e.w;var s=this.w;this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.axisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xAxisoffX="bottom"===s.config.xaxis.position?s.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Ri(e)}return s(t,[{key:"drawYaxis",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.yaxis[t].labels.style,s=a.fontSize,r=a.fontFamily,n=a.fontWeight,o=i.group({class:"apexcharts-yaxis",rel:t,transform:"translate(".concat(e.globals.translateYAxisX[t],", 0)")});if(this.axesUtils.isYAxisHidden(t))return o;var l=i.group({class:"apexcharts-yaxis-texts-g"});o.add(l);var h=e.globals.yAxisScale[t].result.length-1,c=e.globals.gridHeight/h,d=e.globals.yLabelFormatters[t],u=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){var g=e.globals.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?g=0:"heatmap"===e.config.chart.type&&(g-=c/2),g+=parseInt(s,10)/3;for(var p=h;p>=0;p--){var f=d(u[p],p,e),x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(x*=-1);var b=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(a.colors,t),y=Array.isArray(m)?m[p]:m,w=v.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),k=i.drawText({x:x,y:g,text:w.includes(f)&&!e.config.yaxis[t].labels.showDuplicates?"":f,textAnchor:b,fontSize:s,fontFamily:r,fontWeight:n,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(a.cssClass)});l.add(k),this.addTooltip(k,f),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(i,k,firstLabel,e.config.yaxis[t].labels.rotate),g+=c}}return this.addYAxisTitle(i,o,t),this.addAxisBorder(i,o,t,h,c),o}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var i=document.createElementNS(this.w.globals.SVGNS,"title");i.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(i)}},{key:"rotateLabel",value:function(t,e,i,a){var s=t.rotateAroundCenter(i.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(a," ").concat(s.x," ").concat(r.y,")"))}},{key:"addYAxisTitle",value:function(t,e,i){var a=this.w;if(void 0!==a.config.yaxis[i].title.text){var s=t.group({class:"apexcharts-yaxis-title"}),r=a.config.yaxis[i].opposite?a.globals.translateYAxisX[i]:0,n=t.drawText({x:r,y:a.globals.gridHeight/2+a.globals.translateY+a.config.yaxis[i].title.offsetY,text:a.config.yaxis[i].title.text,textAnchor:"end",foreColor:a.config.yaxis[i].title.style.color,fontSize:a.config.yaxis[i].title.style.fontSize,fontWeight:a.config.yaxis[i].title.style.fontWeight,fontFamily:a.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(a.config.yaxis[i].title.style.cssClass)});s.add(n),e.add(s)}}},{key:"addAxisBorder",value:function(t,e,i,a,s){var r=this.w,n=r.config.yaxis[i].axisBorder,o=31+n.offsetX;if(r.config.yaxis[i].opposite&&(o=-31-n.offsetX),n.show){var l=t.drawLine(o,r.globals.translateY+n.offsetY-2,o,r.globals.gridHeight+r.globals.translateY+n.offsetY+2,n.color,0,n.width);e.add(l)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,a,n,r.config.yaxis[i].axisTicks,i,s,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});a.add(s);var r=e.globals.yAxisScale[t].result.length-1,n=e.globals.gridWidth/r+.1,o=n+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,h=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),c=e.globals.timescaleLabels;if(c.length>0&&(this.xaxisLabels=c.slice(),r=(h=c.slice()).length),e.config.xaxis.labels.show)for(var d=c.length?0:r;c.length?d=0;c.length?d++:d--){var u=l(h[d],d,e),g=e.globals.gridWidth+e.globals.padHorizontal-(o-n+e.config.xaxis.labels.offsetX);if(c.length){var p=this.axesUtils.getLabel(h,c,g,d,this.drawnLabels,this.xaxisFontSize);g=p.x,u=p.text,this.drawnLabels.push(p.text),0===d&&e.globals.skipFirstTimelinelabel&&(u=""),d===h.length-1&&e.globals.skipLastTimelinelabel&&(u="")}var f=i.drawText({x:g,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:u,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});s.add(f),f.tspan(u),this.addTooltip(f,u),o+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.xaxis.axisBorder;if(a.show){var s=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(s-=15);var r=i.drawLine(e.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new Mi(this.ctx);if(void 0!==e.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});a.add(s),t.add(a)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),r=s?s.getBoundingClientRect():{width:0,height:0},n=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),o=n?n.getBoundingClientRect():{width:0,height:0};if(n){var l=this.xPaddingForYAxisTitle(t,r,o,e);n.setAttribute("x",l.xPos-(e?10:0));var h=a.rotateAroundCenter(n);n.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(h.x," ").concat(h.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var s=this.w,r=0,n=10;return void 0===s.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(a?r=e.width+s.config.yaxis[t].title.offsetX+i.width/2+n/2:(r=-1*e.width+s.config.yaxis[t].title.offsetX+n/2+i.width/2,s.globals.isBarHorizontal&&(n=25,r=-1*e.width-s.config.yaxis[t].title.offsetX-n)),{xPos:r,padd:n})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,a=0,s=0,r=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach((function(o,l){var h=i.globals.ignoreYAxisIndexes.includes(l)||!o.show||o.floating||0===t[l].width,c=t[l].width+e[l].width;o.opposite?i.globals.isBarHorizontal?(s=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=s-o.labels.offsetX):(s=i.globals.gridWidth+i.globals.translateX+n,h||(n+=c+20),i.globals.translateYAxisX[l]=s-o.labels.offsetX+20):(a=i.globals.translateX-r,h||(r+=c+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;v.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,i){var a=t.config.yaxis[i];if(a&&!a.floating&&void 0!==a.labels.align){var s=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=v.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"))),n=s.getBoundingClientRect();r.forEach((function(t){t.setAttribute("text-anchor",a.labels.align)})),"left"!==a.labels.align||a.opposite?"center"===a.labels.align?s.setAttribute("transform","translate(".concat(n.width/2*(a.opposite?1:-1),", 0)")):"right"===a.labels.align&&a.opposite&&s.setAttribute("transform","translate(".concat(n.width,", 0)")):s.setAttribute("transform","translate(-".concat(n.width,", 0)"))}}))}}]),t}(),aa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.documentEvent=v.bind(this.documentEvent,this)}return s(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var a=i.globals.events[t].indexOf(e);-1!==a&&i.globals.events[t].splice(a,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var a=i.globals.events[t],s=a.length,r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=v.extend(Hi,i);this.w.globals.locale=a.options}}]),t}(),ra=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawAxis",value:function(t,e){var i,a,s=this,r=this.w.globals,n=this.w.config,o=new Qi(this.ctx,e),l=new ia(this.ctx,e);r.axisCharts&&"radar"!==t&&(r.isBarHorizontal?(a=l.drawYaxisInversed(0),i=o.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(a)):(i=o.drawXaxis(),r.dom.elGraphical.add(i),n.yaxis.map((function(t,e){if(-1===r.ignoreYAxisIndexes.indexOf(e)&&(a=l.drawYaxis(e),r.dom.Paper.add(a),"back"===s.w.config.grid.position)){var i=r.dom.Paper.children()[1];i.remove(),r.dom.Paper.add(i)}}))))}}]),t}(),na=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Li(this.ctx),a=t.config.xaxis.crosshairs.fill.gradient,s=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,n=a.colorFrom,o=a.colorTo,l=a.opacityFrom,h=a.opacityTo,c=a.stops,d=s.enabled,u=s.left,g=s.top,p=s.blur,f=s.color,x=s.opacity,b=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(b=e.drawGradient("vertical",n,o,l,h,null,c,null));var m=e.drawRect();1===t.config.xaxis.crosshairs.width&&(m=e.drawLine());var y=t.globals.gridHeight;(!v.isNumber(y)||y<0)&&(y=0);var w=t.config.xaxis.crosshairs.width;(!v.isNumber(w)||w<0)&&(w=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:w,height:y,fill:b,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),d&&(m=i.dropShadow(m,{left:u,top:g,blur:p,color:f,opacity:x})),t.globals.dom.elGraphical.add(m)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var s=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(s)}var r=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(r)}}]),t}(),oa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,a=i.config;if(0!==a.responsive.length){var s=a.responsive.slice();s.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var r=new Wi({}),n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=s[0].breakpoint,n=window.innerWidth>0?window.innerWidth:screen.width;if(n>a){var o=v.clone(i.globals.initialConfig);o.series=v.clone(i.config.series);var l=Pi.extendArrayProps(r,o,i);t=v.extend(l,t),t=v.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var h=0;h0&&"function"==typeof t[0]?(this.isColorFn=!0,i.config.series.map((function(a,s){var r=t[s]||t[0];return"function"==typeof r?r({value:i.globals.axisCharts?i.globals.series[s][0]||0:i.globals.series[s],seriesIndex:s,dataPointIndex:s,w:e.w}):r}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,i){t&&(e[i]=t)}))}},{key:"getMonochromeColors",value:function(t,e,i){var a=t.color,s=t.shadeIntensity,r=t.shadeTo,n=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,o=1/(n/s),l=0;return Array.from({length:n},(function(){var t="dark"===r?i.shadeColor(-1*l,a):i.shadeColor(l,a);return l+=o,t}))}},{key:"applyColorTypes",value:function(t,e){var i=this,a=this.w;t.forEach((function(t){a.globals[t].colors=void 0===a.config[t].colors?i.isColorFn?a.config.colors:e:a.config[t].colors.slice(),i.pushExtraColors(a.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=e||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),t.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,i=[];e.config.series.forEach((function(s,r){s.data.forEach((function(s,n){var o;o=e.globals.series[r][n],a=e.config.dataLabels.formatter(o,{ctx:t.dCtx.ctx,seriesIndex:r,dataPointIndex:n,w:e}),i.push(a)}))}));var a=v.getLargestStringFromArr(i),s=new Mi(this.dCtx.ctx),r=e.config.dataLabels.style,n=s.getTextRects(a,parseInt(r.fontSize),r.fontFamily);return{width:1.05*n.width,height:n.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var a=e.map((function(t,e){return Array.isArray(t)?t.length:1})),s=Math.max.apply(Math,f(a));i=e[a.indexOf(s)]}return i}}]),t}(),da=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();t={width:a.width,height:a.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var s=e.globals.xLabelFormatter,r=v.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);e.globals.isBarHorizontal&&(n=r=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var o=new Xi(this.dCtx.ctx),l=r;r=o.xLabelFormat(s,r,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),n=o.xLabelFormat(s,n,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(n=r="1");var h=new Mi(this.dCtx.ctx),c=h.getTextRects(r,e.config.xaxis.labels.style.fontSize),d=c;if(r!==n&&(d=h.getTextRects(n,e.config.xaxis.labels.style.fontSize)),(t={width:c.width>=d.width?c.width:d.width,height:c.height>=d.height?c.height:d.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return h.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};c=u(r),r!==n&&(d=u(n)),t.height=(c.height>d.height?c.height:d.height)/1.5,t.width=c.width>d.width?c.width:d.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var i,a=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,s=e.globals.groups.map((function(t){return t.title})),r=v.getLargestStringFromArr(s),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),o=new Mi(this.dCtx.ctx),l=o.getTextRects(r,a),h=l;return r!==n&&(h=o.getTextRects(n,a)),i={width:l.width>=h.width?l.width:h.width,height:l.height>=h.height?l.height:h.height},e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new Mi(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,i=a.height}return{width:e,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(t){return t.value})),a=i.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Mi(this.dCtx.ctx).getTextRects(a,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,a=i.globals,s=i.config,r=s.xaxis.type,n=t.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,o){s.yaxis.length>1&&function(t){return-1!==a.collapsedSeriesIndices.indexOf(t)}(o)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var o=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+n/1.75-e.dCtx.yAxisWidthRight,h=o.position-n/1.75+e.dCtx.yAxisWidthLeft,c="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>a.svgWidth-a.translateX-c&&(a.skipLastTimelinelabel=!0),h<-(t.show&&!t.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===r?e.dCtx.gridPad.right(null===(a=String(c(e,o)))||void 0===a?void 0:a.length)?t:e}),d),g=u=c(u,o);if(void 0!==u&&0!==u.length||(u=l.niceMax),e.globals.isBarHorizontal){a=0;var p=e.globals.labels.slice();u=v.getLargestStringFromArr(p),u=c(u,{seriesIndex:n,dataPointIndex:-1,w:e}),g=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,p)}var f=new Mi(t.dCtx.ctx),x="rotate(".concat(r.labels.rotate," 0 0)"),b=f.getTextRects(u,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1),m=b;u!==g&&(m=f.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1)),i.push({width:(h>m.width||h>b.width?h:m.width>b.width?m.width:b.width)+a,height:m.height>b.height?m.height:b.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,a){if(e.show&&void 0!==e.title.text){var s=new Mi(t.dCtx.ctx),r="rotate(".concat(e.title.rotate," 0 0)"),n=s.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);i.push({width:n.width,height:n.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,a=0,s=t.globals.yAxisScale.length>1?10:0,r=new Ri(this.dCtx.ctx),n=function(n,o){var l=t.config.yaxis[o].floating,h=0;n.width>0&&!l?(h=n.width+s,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(o)&&(h=h-n.width-s)):h=l||r.isYAxisHidden(o)?0:5,t.config.yaxis[o].opposite?a+=h:i+=h,e+=h};return t.globals.yLabelsCoords.map((function(t,e){n(t,e)})),t.globals.yTitleCoords.map((function(t,e){n(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,e}}]),t}(),ga=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w,i=e.config,a=e.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.series.length)return 0;var s=function(t){return["bar","rangeBar","candlestick","boxPlot"].includes(t)},r=i.chart.type,n=0,o=s(r)?i.series.length:1;a.comboBarCount>0&&(o=a.comboBarCount),a.collapsedSeries.forEach((function(t){s(t.type)&&(o-=1)})),i.chart.stacked&&(o=1);var l=s(r)||a.comboBarCount>0,h=Math.abs(a.initialMaxX-a.initialMinX);if(l&&a.isXNumeric&&!a.isBarHorizontal&&o>0&&0!==h){h<=3&&(h=a.dataPoints);var c=h/t,d=a.minXDiff&&a.minXDiff/c>0?a.minXDiff/c:0;d>t/2&&(d/=2),(n=d*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),a.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,a=this.dCtx.isSparkline||!i.axisCharts?0:10;["title","subtitle"].forEach((function(s){void 0!==e.config[s].text?a+=e.config[s].margin:a+=t.dCtx.isSparkline||!i.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||i.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight-=s.height+r.height+a,i.translateY+=s.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,a=new Ri(this.dCtx.ctx);i.config.yaxis.forEach((function(s,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||s.floating||a.isYAxisHidden(r)||(s.opposite&&(i.globals.translateX-=e[r].width+t[r].width+parseInt(s.labels.style.fontSize,10)/1.2+12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),pa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new ca(this),this.dimYAxis=new ua(this),this.dimXAxis=new da(this),this.dimGrid=new ga(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return s(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,i=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var a=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,f(e.config.stroke.width)):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var i=p(e,2),a=i[0],s=i[1];t.gridPad[a]=Math.max(s,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(a/2,this.gridPad.top),this.gridPad.bottom=Math.max(a/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var s=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*s,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:a[i].width,index:i}),e.globals.yTitleCoords.push({width:s[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o,n),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,h=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var c=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,h=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,h=0,c=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(r);var d=function(){i.translateX=l+t.datalabelsCoords.width,i.gridHeight=i.svgHeight-t.lgRect.height-h-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(c=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=c,d();break;case"top":i.translateY=this.lgRect.height+c,d();break;case"left":i.translateY=c,i.translateX=this.lgRect.width+l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":i.translateY=c,i.translateX=l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new ia(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,a=0;t.config.legend.show&&!t.config.legend.floating&&(a=20);var s="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[s].offsetY,n=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating){e.gridHeight=e.svgHeight;var o=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(o,e.gridHeight),e.translateY=r,void(e.translateX=n+(e.svgWidth-e.gridWidth)/2)}switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=r-10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+r+10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-a,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+this.lgRect.width+a;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-a-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,i){var a=this.w,s=a.globals.hasXaxisGroups?2:1,r=i.height+t.height+e.height,n=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,o=a.globals.rotateXLabels?22:10,l=a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0;this.xAxisHeight=r*n+s*o+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeightc&&(this.yAxisWidth=c)}}]),t}(),fa=function(){function t(e){i(this,t),this.w=e.w,this.lgCtx=e}return s(t,[{key:"getLegendStyles",value:function(){var t,e,i,a=document.createElement("style");a.setAttribute("type","text/css");var s=(null===(t=this.lgCtx.ctx)||void 0===t||null===(e=t.opts)||void 0===e||null===(i=e.chart)||void 0===i?void 0:i.nonce)||this.w.config.chart.nonce;s&&a.setAttribute("nonce",s);var r=document.createTextNode("\n .apexcharts-flip-y {\n transform: scaleY(-1) translateY(-100%);\n transform-origin: top;\n transform-box: fill-box;\n }\n .apexcharts-flip-x {\n transform: scaleX(-1);\n transform-origin: center;\n transform-box: fill-box;\n }\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-right: 1px;\n }\n\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }\n\n ");return a.appendChild(r),a}},{key:"getLegendDimensions",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(t,e){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var s=null,r=null;if(a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),r=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),r=parseInt(s.getAttribute("rel"),10)-1),e)[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,r)}));else this.hideSeries({seriesEl:s,realIndex:r})}else{var n=a.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(t+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=a.config.plotOptions.pie.donut.labels;new Mi(this.lgCtx.ctx).pathMouseDown(n,null),this.lgCtx.ctx.pie.printDataLabelsInner(n.node,l)}n.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(t){var e=t.realIndex,i=this.w,a=i.globals,s=v.clone(i.config.series);if(a.axisCharts){var r=i.config.yaxis[a.seriesYAxisReverseMap[e]],n={index:e,data:s[e].data.slice(),type:s[e].type||i.config.chart.type};if(r&&r.show&&r.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(e)<0&&(a.ancillaryCollapsedSeries.push(n),a.ancillaryCollapsedSeriesIndices.push(e));else if(a.collapsedSeriesIndices.indexOf(e)<0){a.collapsedSeries.push(n),a.collapsedSeriesIndices.push(e);var o=a.risingSeries.indexOf(e);a.risingSeries.splice(o,1)}}else a.collapsedSeries.push({index:e,data:s[e]}),a.collapsedSeriesIndices.push(e);return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.config.series.length,this._getSeriesBasedOnCollapsedState(s)}},{key:"hideSeries",value:function(t){for(var e=t.seriesEl,i=t.realIndex,a=this.w,s=this.getSeriesAfterCollapsing({realIndex:i}),r=e.childNodes,n=0;n0){for(var r=0;r1;if(this.legendHelpers.appendToForeignObject(),(a||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,i=t.fillcolor,a=this.w,s=document.createElement("span");s.classList.add("apexcharts-legend-marker");var r=a.config.legend.markers.shape||a.config.markers.shape,n=r;Array.isArray(r)&&(n=r[e]);var o=Array.isArray(a.config.legend.markers.size)?parseFloat(a.config.legend.markers.size[e]):parseFloat(a.config.legend.markers.size),l=Array.isArray(a.config.legend.markers.offsetX)?parseFloat(a.config.legend.markers.offsetX[e]):parseFloat(a.config.legend.markers.offsetX),h=Array.isArray(a.config.legend.markers.offsetY)?parseFloat(a.config.legend.markers.offsetY[e]):parseFloat(a.config.legend.markers.offsetY),c=Array.isArray(a.config.legend.markers.strokeWidth)?parseFloat(a.config.legend.markers.strokeWidth[e]):parseFloat(a.config.legend.markers.strokeWidth),d=s.style;if(d.height=2*(o+c)+"px",d.width=2*(o+c)+"px",d.left=l+"px",d.top=h+"px",a.config.legend.markers.customHTML)d.background="transparent",d.color=i[e],Array.isArray(a.config.legend.markers.customHTML)?a.config.legend.markers.customHTML[e]&&(s.innerHTML=a.config.legend.markers.customHTML[e]()):s.innerHTML=a.config.legend.markers.customHTML();else{var g=new Vi(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(n),seriesIndex:e,strokeWidth:c,size:o}),p=window.SVG().addTo(s).size("100%","100%"),f=new Mi(this.ctx).drawMarker(0,0,u(u({},g),{},{pointFillColor:Array.isArray(i)?i[e]:g.pointFillColor,shape:n}));a.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),p.add(f)}return s}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,a=e.globals.seriesNames,s=e.config.legend.markers.fillColors?e.config.legend.markers.fillColors.slice():e.globals.colors.slice();if("heatmap"===e.config.chart.type){var r=e.config.plotOptions.heatmap.colorScale.ranges;a=r.map((function(t){return t.name?t.name:t.from+" - "+t.to})),s=r.map((function(t){return t.color}))}else this.isBarsDistributed&&(a=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(a=e.config.legend.customLegendItems);for(var n=e.globals.legendFormatter,o=e.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var h,c=n(a[l],{seriesIndex:l,w:e}),d=!1,u=!1;if(e.globals.collapsedSeries.length>0)for(var g=0;g0)for(var p=0;p0?l-10:0)+(h>0?h-10:0)}a.style.position="absolute",r=r+t+i.config.legend.offsetX,n=n+e+i.config.legend.offsetY,a.style.left=r+"px",a.style.top=n+"px","right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px");["width","height"].forEach((function(t){a.style[t]&&(a.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new pa(this.ctx),i=e.dimHelpers.getTitleSubtitleCoords("title"),a=e.dimHelpers.getTitleSubtitleCoords("subtitle"),s=0;"top"===t.config.legend.position&&(s=i.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,s)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new Zi(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new Zi(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,a="true"===t.target.getAttribute("data:collapsed"),s=this.w.config.chart.events.legendClick;"function"==typeof s&&s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;"function"==typeof r&&t.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),t}(),ba=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=a.globals.minX,this.maxX=a.globals.maxX}return s(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=e.config.chart.toolbar.offsetY+"px",a.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s\n \n \n\n'),n("zoomOut",this.elZoomOut,'\n \n \n\n');var o=function(i){t.t[i]&&e.config.chart[i].enabled&&r.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'\n \n \n \n':'\n \n \n',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&e.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,'\n \n \n'),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;lthis.wheelDelay&&(this.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){a-i.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,i=this.w;this.minX=i.globals.isRangeBar?i.globals.minY:i.globals.minX,this.maxX=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;var a=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(a){var s,r,n,o=(t.clientX-a.left)/a.width,l=this.minX,h=this.maxX,c=h-l;if(t.deltaY<0){var d=l+o*c;r=d-(s=.5*c)/2,n=d+s/2}else r=l-(s=1.5*c)/2,n=h+s/2;if(!i.globals.isRangeBar){r=Math.max(r,i.globals.initialMinX),n=Math.min(n,i.globals.initialMaxX);var u=.01*(i.globals.initialMaxX-i.globals.initialMinX);if(n-r0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,i,a,s){return"l"===s||"r"===s?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resizing",this.selectionDragging.bind(this,"resizing")))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(u(u({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,a=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i;t.globals.isRangeBar&&(i=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,a=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var s={x:i,y:0,width:a,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(s),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,a=t.width,s=t.height,r=t.translateX,n=void 0===r?0:r,o=t.translateY,l=void 0===o?0:o,h=this.w,c=this.zoomRect,d=this.selectionRect;if(this.dragged||null!==h.globals.selection){var u={transform:"translate("+n+", "+l+")"};h.globals.zoomEnabled&&this.dragged&&(a<0&&(a=1),c.attr({x:e,y:i,width:a,height:s,fill:h.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":h.config.chart.zoom.zoomedArea.fill.opacity,stroke:h.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":h.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":h.config.chart.zoom.zoomedArea.stroke.opacity}),Mi.setAttrs(c.node,u)),h.globals.selectionEnabled&&(d.attr({x:e,y:i,width:a>0?a:0,height:s>0?s:0,fill:h.config.chart.selection.fill.color,"fill-opacity":h.config.chart.selection.fill.opacity,stroke:h.config.chart.selection.stroke.color,"stroke-width":h.config.chart.selection.stroke.width,"stroke-dasharray":h.config.chart.selection.stroke.dashArray,"stroke-opacity":h.config.chart.selection.stroke.opacity}),Mi.setAttrs(d.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.gridRect.getBoundingClientRect(),n=s.startX-1,o=s.startY,l=!1,h=!1,c=s.clientX-r.left-n,d=s.clientY-r.top-o,g={translateX:a.globals.translateX,translateY:a.globals.translateY};return Math.abs(c+n)>a.globals.gridWidth?c=a.globals.gridWidth-n:s.clientX-r.left<0&&(c=n),n>s.clientX-r.left&&(l=!0,c=Math.abs(c)),o>s.clientY-r.top&&(h=!0,d=Math.abs(d)),g=u(u({},g="x"===i?{x:l?n-c:n,y:0,width:c,height:a.globals.gridHeight}:"y"===i?{x:0,y:h?o-d:o,width:a.globals.gridWidth,height:d}:{x:l?n-c:n,y:h?o-d:o,width:c,height:d}),{},{translateX:a.globals.translateX,translateY:a.globals.translateY}),s.drawSelectionRect(g),s.selectionDragging("resizing"),g}},{key:"selectionDragging",value:function(t,e){var i=this,a=this.w;if(e){e.preventDefault();var s=e.detail,r=s.handler,n=s.box,o=n.x,l=n.y;othis.constraints.x2&&(o=this.constraints.x2-n.w),n.y2>this.constraints.y2&&(l=this.constraints.y2-n.h),r.move(o,l);var h=this.xyRatios,c=this.selectionRect,d=0;"resizing"===t&&(d=30);var u=function(t){return parseFloat(c.node.getAttribute(t))},g={x:u("x"),y:u("y"),width:u("width"),height:u("height")};a.globals.selection=g,"function"==typeof a.config.chart.events.selection&&a.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,s,r,n=i.gridRect.getBoundingClientRect(),o=c.node.getBoundingClientRect();a.globals.isRangeBar?(t=a.globals.yAxisScale[0].niceMin+(o.left-n.left)*h.invertedYRatio,e=a.globals.yAxisScale[0].niceMin+(o.right-n.left)*h.invertedYRatio,s=0,r=1):(t=a.globals.xAxisScale.niceMin+(o.left-n.left)*h.xRatio,e=a.globals.xAxisScale.niceMin+(o.right-n.left)*h.xRatio,s=a.globals.yAxisScale[0].niceMin+(n.bottom-o.bottom)*h.yRatio[0],r=a.globals.yAxisScale[0].niceMax-(o.top-n.top)*h.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:s,max:r}};a.config.chart.events.selection(i.ctx,l),a.config.chart.brush.enabled&&void 0!==a.config.chart.events.brushScrolled&&a.config.chart.events.brushScrolled(i.ctx,l)}),d))}}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.xyRatios,n=this.ctx.toolbar;if(s.startX>s.endX){var o=s.startX;s.startX=s.endX,s.endX=o}if(s.startY>s.endY){var l=s.startY;s.startY=s.endY,s.endY=l}var h=void 0,c=void 0;a.globals.isRangeBar?(h=a.globals.yAxisScale[0].niceMin+s.startX*r.invertedYRatio,c=a.globals.yAxisScale[0].niceMin+s.endX*r.invertedYRatio):(h=a.globals.xAxisScale.niceMin+s.startX*r.xRatio,c=a.globals.xAxisScale.niceMin+s.endX*r.xRatio);var d=[],u=[];if(a.config.yaxis.forEach((function(t,e){var i=a.globals.seriesYAxisMap[e][0];d.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.startY),u.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.endY)})),s.dragged&&(s.dragX>10||s.dragY>10)&&h!==c)if(a.globals.zoomEnabled){var g=v.clone(a.globals.initialConfig.yaxis),p=v.clone(a.globals.initialConfig.xaxis);if(a.globals.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),c=Math.floor(c),h<1&&(h=1,c=a.globals.dataPoints),c-h<2&&(c=h+1)),"xy"!==i&&"x"!==i||(p={min:h,max:c}),"xy"!==i&&"y"!==i||g.forEach((function(t,e){g[e].min=u[e],g[e].max=d[e]})),n){var f=n.getBeforeZoomRange(p,g);f&&(p=f.xaxis?f.xaxis:p,g=f.yaxis?f.yaxis:g)}var x={xaxis:p};a.config.chart.group||(x.yaxis=g),s.ctx.updateHelpers._updateOptions(x,!1,s.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&n.zoomCallback(p,g)}else if(a.globals.selectionEnabled){var b,m=null;b={min:h,max:c},"xy"!==i&&"y"!==i||(m=v.clone(a.config.yaxis)).forEach((function(t,e){m[e].min=u[e],m[e].max=d[e]})),a.globals.selection=s.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(s.ctx,{xaxis:b,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,a=e;if(void 0!==i.globals.lastClientPosition.x){var s=i.globals.lastClientPosition.x-a.clientX,r=i.globals.lastClientPosition.y-a.clientY;Math.abs(s)>Math.abs(r)&&s>0?this.moveDirection="left":Math.abs(s)>Math.abs(r)&&s<0?this.moveDirection="right":Math.abs(r)>Math.abs(s)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(s)&&r<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var n=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||a.panScrolled(n,o)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,a=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+a,i=t.globals.maxX+a):"right"===this.moveDirection&&(e=t.globals.minX-a,i=t.globals.maxX-a),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,a=this.xyRatios,s=v.clone(i.globals.initialConfig.yaxis),r=a.xRatio,n=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(r=a.invertedYRatio,n=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(t=n+i.globals.gridWidth/15*r,e=o+i.globals.gridWidth/15*r):"right"===this.moveDirection&&(t=n-i.globals.gridWidth/15*r,e=o-i.globals.gridWidth/15*r),i.globals.isRangeBar||(ti.globals.initialMaxX)&&(t=n,e=o);var l={xaxis:{min:t,max:e}};i.config.chart.group||(l.yaxis=s),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var a=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),a}(),va=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return s(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,a=t.clientX,s=t.clientY,r=this.w,n=i.getBoundingClientRect(),o=n.width,l=n.height,h=o/(r.globals.dataPoints-1),c=l/r.globals.dataPoints,d=this.hasBars();!r.globals.comboCharts&&!d||r.config.xaxis.convertedCatToNumeric||(h=o/r.globals.dataPoints);var u=a-n.left-r.globals.barPadForNumericAxis,g=s-n.top;u<0||g<0||u>o||g>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var p=Math.round(u/h),f=Math.floor(g/c);d&&!r.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(u/h),p-=1);var x=null,b=null,m=r.globals.seriesXvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))})),y=r.globals.seriesYvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))}));if(r.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),k=u*(w.width/o),A=g*(w.height/l);x=(b=this.closestInMultiArray(k,A,m,y)).index,p=b.j,null!==x&&(m=r.globals.seriesXvalues[x],p=(b=this.closestInArray(k,m)).index)}return r.globals.capturedSeriesIndex=null===x?-1:x,(!p||p<1)&&(p=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=f:r.globals.capturedDataPointIndex=p,{capturedSeries:x,j:r.globals.isBarHorizontal?f:p,hoverX:u,hoverY:g}}},{key:"closestInMultiArray",value:function(t,e,i,a){var s=this.w,r=0,n=null,o=-1;s.globals.series.length>1?r=this.getFirstActiveXArray(i):n=0;var l=i[r][0],h=Math.abs(t-l);if(i.forEach((function(e){e.forEach((function(e,i){var a=Math.abs(t-e);a<=h&&(h=a,o=i)}))})),-1!==o){var c=a[r][o],d=Math.abs(e-c);n=r,a.forEach((function(t,i){var a=Math.abs(e-t[o]);a<=d&&(d=a,n=i)}))}return{index:n,j:o}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,i=0,a=t.map((function(t,e){return t.length>0?e:-1})),s=0;s0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=f(t)).sort((function(t,e){var i=Number(t.getAttribute("data:realIndex")),a=Number(e.getAttribute("data:realIndex"));return ai?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var i=Number(t.getAttribute("cx")),a=Number(t.getAttribute("cy")),s=t.getAttribute("shape");return new Mi(this.ctx).getMarkerPath(i,a,s,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s ').concat(i.attrs.name,""),e+="
".concat(i.val,"
")})),m.innerHTML=t+"",v.innerHTML=e+""};n?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?y():(m.innerHTML="",v.innerHTML=""):y()}else m.innerHTML="",v.innerHTML="";null!==p&&(a[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:"");if(n&&f[0]){if(l.config.tooltip.hideEmptySeries){var w=a[e].querySelector(".apexcharts-tooltip-marker"),k=a[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(c)?(w.style.display="none",k.style.display="none"):(w.style.display="block",k.style.display="block")}null==c||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)?f[0].parentNode.style.display="none":f[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)&&(f[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var i=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));a&&(a.classList.add("apexcharts-active"),a.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",n="",o=null,l=null,h={series:a.globals.series,seriesIndex:e,dataPointIndex:i,w:a},c=a.globals.ttZFormatter;null===i?l=a.globals.series[e]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(r=s[e][i],0===s[e].length&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=new $i(this.ctx).isFormatXY()?void 0!==a.config.series[e].data[i]?a.config.series[e].data[i].x:"":void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var d=r;a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?r=new Xi(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(this.ctx).formatDate,w:this.w}):r=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](d,h):a.globals.xLabelFormatter(d,h);return void 0!==a.config.tooltip.x.formatter&&(r=a.globals.ttKeyFormatter(d,h)),a.globals.seriesZ.length>0&&a.globals.seriesZ[e].length>0&&(o=c(a.globals.seriesZ[e][i],a)),n="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(d,h):r,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,a=t.y1,s=t.y2,r=t.w,n=this.ttCtx.getElTooltip(),o=r.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]),n.innerHTML=o({ctx:this.ctx,series:r.globals.series,seriesIndex:e,dataPointIndex:i,y1:a,y2:s,w:r})}}]),t}(),wa=function(){function t(e){i(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return s(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=t-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(null!==e&&(r=a.globals.gridWidth/n*e),null===s||a.globals.isBarHorizontal||(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=r;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Mi.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Mi.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=e.globals.translateX;var s;s=new Mi(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=e.globals.translateY+a,r=i.yaxisTTEls[t].getBoundingClientRect().height,n=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(n-=26),s-=r/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=n+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),n=s.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(t)+o+5,h=parseFloat(e)+o/2;if(l>a.globals.gridWidth/2&&(l=l-n.ttWidth-o-10),l>a.globals.gridWidth-n.ttWidth-10&&(l=a.globals.gridWidth-n.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var c=s.getElGrid().getBoundingClientRect();(l=s.e.clientX-c.left)>a.globals.gridWidth/2&&(l-=s.tooltipRect.ttWidth),(h=s.e.clientY+a.globals.translateY-c.top)>a.globals.gridHeight/2&&(h-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+h>a.globals.gridHeight&&(h=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(l)||(l+=a.globals.translateX,r.style.left=l+"px",r.style.top=h+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),r=0;r0){var g=u.getAttribute("shape"),p=l.getMarkerPath(s,r,g,1.5*c);u.setAttribute("d",p)}this.moveXCrosshairs(s),o.fixedTooltip||this.moveTooltip(s,r,c)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,a=i.w,s=0,r=0,n=a.globals.pointsArray,o=new Zi(this.ctx),l=new Mi(this.ctx);e=o.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var h=i.tooltipUtil.getHoverMarkerSize(e);n[e]&&(s=n[e][t][0],r=n[e][t][1]);var c=i.tooltipUtil.getAllMarkers();if(null!==c)for(var d=0;d0){var b=l.getMarkerPath(s,g,f,h);c[d].setAttribute("d",b)}else c[d].setAttribute("d","")}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,r||a.globals.gridHeight,h)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(r=new Zi(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"']"));n||"number"!=typeof e||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var o=n?parseFloat(n.getAttribute("cx")):0,l=n?parseFloat(n.getAttribute("cy")):0,h=n?parseFloat(n.getAttribute("barWidth")):0,c=a.getElGrid().getBoundingClientRect(),d=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!d&&(o-=s%2!=0?h/2:0),n&&d&&(o-=h/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[t-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[t]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?l-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?l=a.e.clientY-c.top-a.tooltipRect.ttHeight/2:l+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(l=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,l||i.globals.gridHeight)}}]),t}(),ka=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new wa(e)}return s(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Vi(this.ctx),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=f(a),t.config.chart.stacked&&a.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w;"bubble"!==s.config.chart.type&&this.newPointSize(t,e);var r=e.getAttribute("cx"),n=e.getAttribute("cy");if(null!==i&&null!==a&&(r=i,n=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===s.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(r,n,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,a=this.ttCtx,s=t,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=e.config.markers.hover.size,o=0;o0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],i);t[e].setAttribute("d",a)}else t[e].setAttribute("d","M0,0")}}}]),t}(),Aa=function(){function t(e){i(this,t),this.w=e.w;var a=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!a.globals.isBarHorizontal&&"rangeBar"===a.config.chart.type&&a.config.plotOptions.bar.rangeBarGroupRows}return s(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,s=t.y,r=t.type,n=this.ttCtx,o=this.w;if(e.target.classList.contains("apexcharts-".concat(r,"-rect"))){var l=this.getAttr(e,"i"),h=this.getAttr(e,"j"),c=this.getAttr(e,"cx"),d=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),g=this.getAttr(e,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:h,shared:!1,e:e}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=h,a=c+n.tooltipRect.ttWidth/2+u,s=d+n.tooltipRect.ttHeight/2-g/2,n.tooltipPosition.moveXCrosshairs(c+u/2),a>o.globals.gridWidth/2&&(a=c-n.tooltipRect.ttWidth/2+u),n.w.config.tooltip.followCursor){var p=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-p.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),s=o.globals.clientY-p.top-(s>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=t.x,n=t.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var h=parseInt(s.paths.getAttribute("cx"),10),c=parseInt(s.paths.getAttribute("cy"),10),d=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),e=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=v.findAncestor(s.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,e,i),o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=i,r=h,n=c+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var g=l.getElGrid().getBoundingClientRect();n=l.e.clientY+o.globals.translateY-g.top}d<0&&(n=c),l.marker.enlargeCurrentPoint(i,s.paths,r,n)}return{x:r,y:n}}},{key:"handleBarTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=this.ttCtx,o=n.getElTooltip(),l=0,h=0,c=0,d=this.getBarTooltipXY({e:a,opt:s});if(null!==d.j||0!==d.barHeight||0!==d.barWidth){e=d.i;var u=d.j;if(r.globals.capturedSeriesIndex=e,r.globals.capturedDataPointIndex=u,r.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!r.config.tooltip.shared?(h=d.x,c=d.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[e]:r.config.stroke.width,l=h):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(c)&&(c=r.globals.svgHeight-n.tooltipRect.ttHeight),parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),h+n.tooltipRect.ttWidth>r.globals.gridWidth?h-=n.tooltipRect.ttWidth:h<0&&(h=0),n.w.config.tooltip.followCursor){var g=n.getElGrid().getBoundingClientRect();c=n.e.clientY-g.top}null===n.tooltip&&(n.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?n.tooltipPosition.moveXCrosshairs(l+i/2):n.tooltipPosition.moveXCrosshairs(l)),!n.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(c=c+r.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=h+r.globals.translateX+"px",o.style.top=c+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,i=t.e,a=t.opt,s=this.w,r=null,n=this.ttCtx,o=0,l=0,h=0,c=0,d=0,u=i.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){var g=i.target,p=g.getBoundingClientRect(),f=a.elGrid.getBoundingClientRect(),x=p.height;d=p.height;var b=p.width,m=parseInt(g.getAttribute("cx"),10),v=parseInt(g.getAttribute("cy"),10);c=parseFloat(g.getAttribute("barWidth"));var y="touchmove"===i.type?i.touches[0].clientX:i.clientX;r=parseInt(g.getAttribute("j"),10),o=parseInt(g.parentNode.getAttribute("rel"),10)-1;var w=g.getAttribute("data-range-y1"),k=g.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(g.parentNode.getAttribute("data:realIndex"),10));var A=function(t){return s.globals.isXNumeric?m-b/2:e.isVerticalGroupedRangeBar?m+b/2:m-n.dataPointsDividedWidth+b/2},C=function(){return v-n.dataPointsDividedHeight+x/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:r,y1:w?parseInt(w,10):null,y2:k?parseInt(k,10):null,shared:!n.showOnIntersect&&s.config.tooltip.shared,e:i}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(l=y-f.left+15,h=C()):(l=A(),h=i.clientY-f.top-n.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((l=m)0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var a=this.ttCtx,s=this.w,r=s.globals,n=r.seriesYAxisMap[t];if(a.yaxisTooltips[t]&&n.length>0){var o=r.yLabelFormatters[t],l=a.getElGrid().getBoundingClientRect(),h=n[0],c=0;i.yRatio.length>1&&(c=h);var d=(e-l.top)*i.yRatio[c],u=r.maxYArr[h]-r.minYArr[h],g=r.minYArr[h]+(u-d);s.config.yaxis[t].reversed&&(g=r.maxYArr[h]-(u-d)),a.tooltipPosition.moveYCrosshairs(e-l.top),a.yaxisTooltipText[t].innerHTML=o(g),a.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),Sa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.tConfig=a.config.tooltip,this.tooltipUtil=new va(this),this.tooltipLabels=new ya(this),this.tooltipPosition=new wa(this),this.marker=new ka(this),this.intersect=new Aa(this),this.axesTooltip=new Ca(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!a.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return s(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new Qi(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,a=[],s=this.getElTooltip(),r=function(r){var n=document.createElement("div");n.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(r)),n.style.order=i.config.tooltip.inverseOrder?t-r:r+1;var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[r],n.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var a=document.createElement("span");a.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(a),l.appendChild(e)})),n.appendChild(l),s.appendChild(n),a.push(n)},n=0;n0&&this.addPathsEventListeners(g,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(r=r+t.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+t.globals.svgHeight-s-10),e.style.left=r+"px",e.style.top=n+"px",{x:r,y:n,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,a=function(a){var s={paths:t[a],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[a].addEventListener(e,i.onSeriesHover.bind(i,s),{capture:!1,passive:!0})}))},s=0;s=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(t,e)}),20-a))}},{key:"seriesHover",value:function(t,e){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||0===s.globals.dataPoints)||(a.length?a.forEach((function(a){var s=i.getElTooltip(a),r={paths:t.paths,tooltipEl:s,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===i.w.globals.minX&&a.w.globals.maxX===i.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:r,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,a=t.opt,s=t.e,r=e.w,n=this.getElTooltip(e);if(n){if(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=s,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared)if(this.tConfig.onDatasetHover.highlightDataSeries)new Zi(e).toggleSeriesOnHover(s,s.target.parentNode);i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect})}}},{key:"axisChartsTooltips",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=s.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,ln.top+n.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var h=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(h)<0)return void this.handleMouseOut(s)}var c=this.getElTooltip(),d=this.getElXCrosshairs(),u=[];r.config.chart.group&&(u=this.ctx.getSyncedCharts());var g=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;null!==d&&d.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),g&&!this.showOnIntersect||u.length>1)this.handleStickyTooltip(a,o,l,s);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:e,y:i,type:r.config.chart.type});e=f.x,i=f.y,c.style.left=e+"px",c.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:e,y:i});if(this.yaxisTooltips.length)for(var x=0;xl.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(t,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||s.globals.isBarHorizontal){var h=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,h,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,i,a){var s=this.w;if(!this.tConfig.shared&&null===s.globals.series[e][a])return void this.handleMouseOut(i);if(void 0!==s.globals.series[e][a])this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,a,i.ttItems):this.create(t,this,e,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var r=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,r,a,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Mi(this.ctx),i=t.globals.dom.Paper.find(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,A=this.w,C=e;"mouseup"===t.type&&this.markerClick(t,i,a),null===k&&(k=this.tConfig.shared);var S=this.tooltipUtil.hasMarkers(i),L=this.tooltipUtil.getElBars();if(A.config.legend.tooltipHoverFormatter){var M=A.config.legend.tooltipHoverFormatter,P=Array.from(this.legendLabels);P.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var I=0;I0?C.marker.enlargePoints(a):C.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var E=new Mi(this.ctx),H=A.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var O=0;O0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*k)),w){u=u+d.height/2-b/2-2}var C=e.globals.series[i][a]<0,S=o;switch(this.barCtx.isReversed&&(S=o+(C?c:-c)),f.position){case"center":g=w?C?S-c/2+v:S+c/2-v:C?S-c/2+d.height/2+v:S+c/2+d.height/2-v;break;case"bottom":g=w?C?S-c+v:S+c-v:C?S-c+d.height+b+v:S+c-d.height/2+b-v;break;case"top":g=w?C?S+v:S-v:C?S-d.height/2-v:S+d.height+v}if(this.barCtx.lastActiveBarSerieIndex===s&&x.enabled){var L=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:a}),p.fontSize);r=C?S-L.height/2-v-x.offsetY+18:S+L.height+v+x.offsetY-18;var M=A;n=y+(e.globals.isXNumeric?-h*e.globals.barGroups.length/2:e.globals.barGroups.length*h/2-(e.globals.barGroups.length-1)*h-M)+x.offsetX}return e.config.chart.stacked||(g<0?g=0+b:g+d.height/3>e.globals.gridHeight&&(g=e.globals.gridHeight-b)),{bcx:l,bcy:o,dataLabelsX:u,dataLabelsY:g,totalDataLabelsX:n,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,a=t.i,s=t.j,r=t.realIndex,n=t.bcy,o=t.barHeight,l=t.barWidth,h=t.textRects,c=t.dataLabelsX,d=t.strokeWidth,u=t.dataLabelsConfig,g=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,f=t.offX,x=t.offY,b=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var m,v,y=n-(this.barCtx.isRangeBar?0:b)+o/2+h.height/2+x-3,w="start",k=e.globals.series[a][s]<0,A=i;switch(this.barCtx.isReversed&&(A=i+(k?-l:l),w=k?"start":"end"),g.position){case"center":c=k?A+l/2-f:Math.max(h.width/2,A-l/2)+f;break;case"bottom":c=k?A+l-d-f:A-l+d+f;break;case"top":c=k?A-d-f:A-d+f}if(this.barCtx.lastActiveBarSerieIndex===r&&p.enabled){var C=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:s}),u.fontSize);k?(m=A-d-f-p.offsetX,w="end"):m=A+f+p.offsetX+(this.barCtx.isReversed?-(l+d):d),v=y-h.height/2+C.height/2+p.offsetY+d}return e.config.chart.stacked||("start"===u.textAnchor?c-h.width<0?c=k?h.width+d:d:c+h.width>e.globals.gridWidth&&(c=k?e.globals.gridWidth-d:e.globals.gridWidth-h.width-d):"middle"===u.textAnchor?c-h.width/2<0?c=h.width/2+d:c+h.width/2>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width/2-d):"end"===u.textAnchor&&(c<1?c=h.width+d:c+1>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width-d))),{bcx:i,bcy:n,dataLabelsX:c,dataLabelsY:y,totalDataLabelsX:m,totalDataLabelsY:v,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.i,r=t.j,n=t.textRects,o=t.barHeight,l=t.barWidth,h=t.dataLabelsConfig,c=this.w,d="rotate(0)";"vertical"===c.config.plotOptions.bar.dataLabels.orientation&&(d="rotate(-90, ".concat(e,", ").concat(i,")"));var g=new qi(this.barCtx.ctx),p=new Mi(this.barCtx.ctx),f=h.formatter,x=null,b=c.globals.collapsedSeriesIndices.indexOf(s)>-1;if(h.enabled&&!b){x=p.group({class:"apexcharts-data-labels",transform:d});var m="";void 0!==a&&(m=f(a,u(u({},c),{},{seriesIndex:s,dataPointIndex:r,w:c}))),!a&&c.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(m="");var v=c.globals.series[s][r]<0,y=c.config.plotOptions.bar.dataLabels.position;if("vertical"===c.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(h.textAnchor=v?"end":"start"),"center"===y&&(h.textAnchor="middle"),"bottom"===y&&(h.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels)lMath.abs(l)&&(m=""):n.height/1.6>Math.abs(o)&&(m=""));var w=u({},h);this.barCtx.isHorizontal&&a<0&&("start"===h.textAnchor?w.textAnchor="end":"end"===h.textAnchor&&(w.textAnchor="start")),g.plotDataLabelsText({x:e,y:i,text:m,i:s,j:r,parent:x,dataLabelsConfig:w,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}},{key:"drawTotalDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.realIndex,r=t.textAnchor,n=t.barTotalDataLabelsConfig;this.w;var o,l=new Mi(this.barCtx.ctx);return n.enabled&&void 0!==e&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===s&&(o=l.drawText({x:e,y:i,foreColor:n.style.color,text:a,textAnchor:r,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),o}}]),t}(),Ma=function(){function t(e){i(this,t),this.w=e.w,this.barCtx=e}return s(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[i].length),e.globals.isXNumeric)for(var a=0;ae.globals.minX&&e.globals.seriesX[i][a]0&&(a=l.globals.minXDiff/d),(r=a/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),n=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+(a-r*this.barCtx.seriesLen)/2}return l.globals.barHeight=s,l.globals.barWidth=r,{x:t,y:e,yDivision:i,xDivision:a,barHeight:s,barWidth:r,zeroH:n,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,i,a){var s,r,n,o,l=this.w,h=this.barCtx.ctx.fill,c=null,d=this.barCtx.barOptions.distributed?i:e;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(a){t[e][i]>=a.from&&t[e][i]<=a.to&&(c=a.color)}));return h.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:a,dataPointIndex:i,color:c,value:t[e][i],fillConfig:null===(s=l.config.series[e].data[i])||void 0===s?void 0:s.fill,fillType:null!==(r=l.config.series[e].data[i])&&void 0!==r&&null!==(n=r.fill)&&void 0!==n&&n.type?null===(o=l.config.series[e].data[i])||void 0===o?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[a]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,i){var a=0,s=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"createBorderRadiusArr",value:function(t){var e,i=this.w,a=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,s=t.length,n=0|(null===(e=t[0])||void 0===e?void 0:e.length),o=Array.from({length:s},(function(){return Array(n).fill(a?"top":"none")}));if(a)return o;for(var l=0;l0?(h.push(u),d++):g<0&&(c.push(u),d++)}if(h.length>0&&0===c.length)if(1===h.length)o[h[0]][l]="both";else{var p,f=h[0],x=h[h.length-1],b=r(h);try{for(b.s();!(p=b.n()).done;){var m=p.value;o[m][l]=m===f?"bottom":m===x?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===h.length)if(1===c.length)o[c[0]][l]="both";else{var v,y=Math.max.apply(Math,c),w=Math.min.apply(Math,c),k=r(c);try{for(k.s();!(v=k.n()).done;){var A=v.value;o[A][l]=A===y?"bottom":A===w?"top":"none"}}catch(t){k.e(t)}finally{k.f()}}else if(h.length>0&&c.length>0){var C,S=h[h.length-1],L=r(h);try{for(L.s();!(C=L.n()).done;){var M=C.value;o[M][l]=M===S?"top":"none"}}catch(t){L.e(t)}finally{L.f()}var P,I=Math.max.apply(Math,c),T=r(c);try{for(T.s();!(P=T.n()).done;){var z=P.value;o[z][l]=z===I?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else if(1===d){o[h[0]||c[0]][l]="both"}}return o}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,a=t.x1,s=t.x2,r=t.y1,n=t.y2,o=t.elSeries,l=this.w,h=new Mi(this.barCtx.ctx),c=new Zi(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var d=this.barCtx.barOptions.colors.backgroundBarColors[e],u=h.drawRect(void 0!==a?a:0,void 0!==r?r:0,void 0!==s?s:l.globals.gridWidth,void 0!==n?n:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,i=t.barWidth,a=t.barXPosition,s=t.y1,r=t.y2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.columnWidthOffset&&(x=a-g.config.series[c].data[u].columnWidthOffset/2,f=i+g.config.series[c].data[u].columnWidthOffset);var b=n/2,m=x+b,v=x+f-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001-b*y,r+=.001+b*y;var w=p.move(m,s),k=p.move(m,s),A=p.line(v,s);if(g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1)),w=w+p.line(m,r)+p.line(v,r)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(m,s)+A+A+A+A+A+p.line(m,s)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).yArrj.push(r-b*y),C.yArrjF.push(Math.abs(s-r+n*y)),C.yArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"getBarpaths",value:function(t){var e,i=t.barYPosition,a=t.barHeight,s=t.x1,r=t.x2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.barHeightOffset&&(f=i-g.config.series[c].data[u].barHeightOffset/2,x=a+g.config.series[c].data[u].barHeightOffset);var b=n/2,m=f+b,v=f+x-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001+b*y,r+=.001-b*y;var w=p.move(s,m),k=p.move(s,m);g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1));var A=p.line(s,v);if(w=w+p.line(r,m)+p.line(r,v)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(s,m)+A+A+A+A+A+p.line(s,m)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).xArrj.push(r+b*y),C.xArrjF.push(Math.abs(s-r-n*y)),C.xArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;a2&&void 0!==arguments[2])||arguments[2]?e:null;return null!=t&&(i=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(t,e,i){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?e:null;return null!=t&&(a=e-t/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(t,e,i,a,s,r){var n=this,l=this.w,h=[],c=function(a,s){var l;h.push((o(l={},t,"x"===t?n.getXForValue(a,e,!1):n.getYForValue(a,i,r,!1)),o(l,"attrs",s),l))};if(l.globals.seriesGoals[a]&&l.globals.seriesGoals[a][s]&&Array.isArray(l.globals.seriesGoals[a][s])&&l.globals.seriesGoals[a][s].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,g={strokeHeight:"x"===t?0:l.globals.markers.size[a],strokeWidth:"x"===t?l.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[a])?d[a][0]:d[a]};c(l.globals.seriesRangeStart[a][s],g),c(l.globals.seriesRangeEnd[a][s],u(u({},g),{},{strokeColor:Array.isArray(d[a])?d[a][1]:d[a]}))}return h}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,a=t.goalX,s=t.goalY,r=t.barWidth,n=t.barHeight,o=new Mi(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var h=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach((function(t){if(t.x>=-1&&t.x<=o.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:n/2,a=i+e+n/2;h=o.drawLine(t.x,a-2*e,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(h)}})):Array.isArray(s)&&s.forEach((function(t){if(t.y>=-1&&t.y<=o.w.globals.gridHeight+1){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:r/2,a=e+i+r/2;h=o.drawLine(a-2*i,t.y,a,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(h)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,i=t.currPaths,a=t.color,s=this.w,r=e.x,n=e.x1,o=e.barYPosition,l=i.x,h=i.x1,c=i.barYPosition,d=o+i.barHeight,u=new Mi(this.barCtx.ctx),g=new v,p=u.move(n,d)+u.line(r,d)+u.line(l,c)+u.line(h,c)+u.line(n,d)+("around"===s.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return u.drawPath({d:p,fill:g.shadeColor(.5,v.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,i=t.i,a=t.j,s=this.w,r=0,n=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map((function(t,e){return e})):(null===(e=s.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=s.globals.seriesPercent[t][a];e&&r++,t-1})),a=this.barCtx.columnGroupIndices,s=a.indexOf(i);return s<0&&(a.push(i),s=a.length-1),{groupIndex:i,columnGroupIndex:s}}}]),t}(),Pa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w;var s=this.w;this.barOptions=s.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=s.config.stroke.width,this.isNullValue=!1,this.isRangeBar=s.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!s.globals.isBarHorizontal&&s.globals.seriesRange.length&&s.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=a,null!==this.xyRatios&&(this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.invertedXRatio=a.invertedXRatio,this.invertedYRatio=a.invertedYRatio,this.baseLineY=a.baseLineY,this.baseLineInvertedY=a.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var r=new Zi(this.ctx);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var n=r.getBarSeriesIndices(),o=new Pi(this.ctx);this.stackedSeriesTotals=o.getStackedSeriesTotals(this.w.config.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}))),this.barHelpers=new Ma(this)}return s(t,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=new Pi(this.ctx,i);t=s.getLogSeries(t),this.series=t,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var n=0,o=0;n0&&(this.visibleI=this.visibleI+1);var w=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[b],this.translationsIndex=b);var A=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var C=this.barHelpers.initialPositions();p=C.y,w=C.barHeight,h=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,l=C.xDivision,c=C.zeroH,this.isHorizontal||x.push(g+k/2);var S=a.group({class:"apexcharts-datalabels","data:realIndex":b});i.globals.delayedElements.push({el:S.node}),S.node.classList.add("apexcharts-element-hidden");var L=a.group({class:"apexcharts-bar-goals-markers"}),M=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");for(var P=0;P0){var R=this.barHelpers.drawBarShadow({color:"string"==typeof X&&-1===(null==X?void 0:X.indexOf("url"))?X:v.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});if(M.add(R),i.config.chart.dropShadow.enabled)new Li(this.ctx).dropShadow(R,i.config.chart.dropShadow,b)}this.pathArr.push(T);var Y=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:w,barWidth:k});Y&&L.add(Y),p=T.y,g=T.x,P>0&&x.push(g+k/2),f.push(p),this.renderSeries({realIndex:b,pathFill:X,j:P,i:n,columnGroupIndex:m,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:I,elSeries:y,x:g,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:w),barWidth:Math.abs(T.barWidth?T.barWidth:k),elDataLabelsWrap:S,elGoalsMarkers:L,elBarShadows:M,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[b]=x,i.globals.seriesYvalues[b]=f,r.add(y)}return r}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,a=t.lineFill,s=t.j,r=t.i,n=t.columnGroupIndex,o=t.pathFrom,l=t.pathTo,h=t.strokeWidth,c=t.elSeries,d=t.x,u=t.y,g=t.y1,p=t.y2,f=t.series,x=t.barHeight,b=t.barWidth,m=t.barXPosition,v=t.barYPosition,y=t.elDataLabelsWrap,w=t.elGoalsMarkers,k=t.elBarShadows,A=t.visibleSeries,C=t.type,S=t.classes,L=this.w,M=new Mi(this.ctx);if(!a){var P="function"==typeof L.globals.stroke.colors[e]?function(t){var e,i=L.config.stroke.colors;return Array.isArray(i)&&i.length>0&&((e=i[t])||(e=""),"function"==typeof e)?e({value:L.globals.series[t][s],dataPointIndex:s,w:L}):e}(e):L.globals.stroke.colors[e];a=this.barOptions.distributed?L.globals.stroke.colors[s]:P}L.config.series[r].data[s]&&L.config.series[r].data[s].strokeColor&&(a=L.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var I=s/L.config.chart.animations.animateGradually.delay*(L.config.chart.animations.speed/L.globals.dataPoints)/2.4,T=M.renderPaths({i:r,j:s,realIndex:e,pathFrom:o,pathTo:l,stroke:a,strokeWidth:h,strokeLineCap:L.config.stroke.lineCap,fill:i,animationDelay:I,initialSpeed:L.config.chart.animations.speed,dataChangeSpeed:L.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(C,"-area ").concat(S),chartType:C});T.attr("clip-path","url(#gridRectBarMask".concat(L.globals.cuid,")"));var z=L.config.forecastDataPoints;z.count>0&&s>=L.globals.dataPoints-z.count&&(T.node.setAttribute("stroke-dasharray",z.dashArray),T.node.setAttribute("stroke-width",z.strokeWidth),T.node.setAttribute("fill-opacity",z.fillOpacity)),void 0!==g&&void 0!==p&&(T.attr("data-range-y1",g),T.attr("data-range-y2",p)),new Li(this.ctx).setSelectionFilter(T,e,s),c.add(T);var X=new La(this).handleBarDataLabels({x:d,y:u,y1:g,y2:p,i:r,j:s,series:f,realIndex:e,columnGroupIndex:n,barHeight:x,barWidth:b,barXPosition:m,barYPosition:v,renderedPath:T,visibleSeries:A});return null!==X.dataLabels&&y.add(X.dataLabels),X.totalDataLabels&&y.add(X.totalDataLabels),c.add(y),w&&c.add(w),k&&c.add(k),c}},{key:"drawBarPaths",value:function(t){var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.yDivision,h=t.elSeries,c=this.w,d=i.i,u=i.j;if(c.globals.isXNumeric)e=(o=(c.globals.seriesX[d][u]-c.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var g=0,p=0;c.globals.seriesPercent.forEach((function(t,e){t[u]&&g++,e0&&(a=this.seriesLen*a/g),e=o+a*this.visibleI,e-=a*p}else e=o+a*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[d][u],r)-r)/2),n=this.barHelpers.getXForValue(this.series[d][u],r);var f=this.barHelpers.getBarpaths({barYPosition:e,barHeight:a,x1:r,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:d,j:u,w:c});return c.globals.isXNumeric||(o+=l),this.barHelpers.barBackground({j:u,i:d,y1:e-a*this.visibleI,y2:a*this.seriesLen,elSeries:h}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x1:r,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",r,null,d,u),barYPosition:e,barHeight:a}}},{key:"drawColumnPaths",value:function(t){var e,i=t.indexes,a=t.x,s=t.y,r=t.xDivision,n=t.barWidth,o=t.zeroH,l=t.strokeWidth,h=t.elSeries,c=this.w,d=i.realIndex,u=i.translationsIndex,g=i.i,p=i.j,f=i.bc;if(c.globals.isXNumeric){var x=this.getBarXForNumericXAxis({x:a,j:p,realIndex:d,barWidth:n});a=x.x,e=x.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var b=this.barHelpers.getZeroValueEncounters({i:g,j:p}),m=b.nonZeroColumns,v=b.zeroEncounters;m>0&&(n=this.seriesLen*n/m),e=a+n*this.visibleI,e-=n*v}else e=a+n*this.visibleI;s=this.barHelpers.getYForValue(this.series[g][p],o,u);var y=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:n,y1:o,y2:s,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:d,i:g,j:p,w:c});return c.globals.isXNumeric||(a+=r),this.barHelpers.barBackground({bc:f,j:p,i:g,x1:e-l/2-n*this.visibleI,x2:n*this.seriesLen+l/2,elSeries:h}),{pathTo:y.pathTo,pathFrom:y.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,g,p,u),barXPosition:e,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,i=t.barWidth,a=t.realIndex,s=t.j,r=this.w,n=a;return r.globals.seriesX[a].length||(n=r.globals.maxValsInArrayIndex),v.isNumber(r.globals.seriesX[n][s])&&(e=(r.globals.seriesX[n][s]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:e+i*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var i,a=this.w,s=0;s0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==a.globals.previousPaths[s].paths[e]&&(i=a.globals.previousPaths[s].paths[e].d)}return i}}]),t}(),Ia=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this,a=this.w;this.graphics=new Mi(this.ctx),this.bar=new Pa(this.ctx,this.xyRatios);var s=new Pi(this.ctx,a);t=s.getLogSeries(t),this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===a.config.chart.stackType&&(t=a.globals.comboCharts?e.map((function(t){return a.globals.seriesPercent[t]})):a.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);for(var r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),n=0,o=0,l=function(s,l){var h=void 0,c=void 0,d=void 0,g=void 0,p=a.globals.comboCharts?e[s]:s,f=i.barHelpers.getGroupIndex(p),x=f.groupIndex,b=f.columnGroupIndex;i.groupCtx=i[a.globals.seriesGroups[x]];var m=[],y=[],w=0;i.yRatio.length>1&&(i.yaxisIndex=a.globals.seriesYAxisReverseMap[p][0],w=p),i.isReversed=a.config.yaxis[i.yaxisIndex]&&a.config.yaxis[i.yaxisIndex].reversed;var k=i.graphics.group({class:"apexcharts-series",seriesName:v.escapeString(a.globals.seriesNames[p]),rel:s+1,"data:realIndex":p});i.ctx.series.addCollapsedClassToSeries(k,p);var A=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),C=i.graphics.group({class:"apexcharts-bar-goals-markers"}),S=0,L=0,M=i.initialPositions(n,o,h,c,d,g,w);o=M.y,S=M.barHeight,c=M.yDivision,g=M.zeroW,n=M.x,L=M.barWidth,h=M.xDivision,d=M.zeroH,a.globals.barHeight=S,a.globals.barWidth=L,i.barHelpers.initializeStackedXYVars(i),1===i.groupCtx.prevY.length&&i.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(i.groupCtx.prevY[0]=i.groupCtx.prevY[0].map((function(){return d})),i.groupCtx.prevYF[0]=i.groupCtx.prevYF[0].map((function(){return 0})));for(var P=0;P0||"top"===i.barHelpers.arrBorderRadius[p][P]&&a.globals.series[p][P]<0)&&(Y=E),k=i.renderSeries({realIndex:p,pathFill:R,j:P,i:s,columnGroupIndex:b,pathFrom:z.pathFrom,pathTo:z.pathTo,strokeWidth:I,elSeries:k,x:n,y:o,series:t,barHeight:S,barWidth:L,elDataLabelsWrap:A,elGoalsMarkers:C,type:"bar",visibleSeries:b,classes:Y})}a.globals.seriesXvalues[p]=m,a.globals.seriesYvalues[p]=y,i.groupCtx.prevY.push(i.groupCtx.yArrj),i.groupCtx.prevYF.push(i.groupCtx.yArrjF),i.groupCtx.prevYVal.push(i.groupCtx.yArrjVal),i.groupCtx.prevX.push(i.groupCtx.xArrj),i.groupCtx.prevXF.push(i.groupCtx.xArrjF),i.groupCtx.prevXVal.push(i.groupCtx.xArrjVal),r.add(k)},h=0,c=0;h1?l=(i=h.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(d).indexOf("%")?l=parseInt(d,10):l*=parseInt(d,10)/100,s=this.isReversed?this.baseLineY[n]:h.globals.gridHeight-this.baseLineY[n],t=h.globals.padHorizontal+(i-l)/2}var u=h.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:i,barHeight:o/u,barWidth:l/u,zeroH:s,zeroW:r}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.columnGroupIndex,h=t.seriesGroup,c=t.yDivision,d=t.elSeries,u=this.w,g=o+l*a,p=i.i,f=i.j,x=i.realIndex,b=i.translationsIndex,m=0,v=0;v0){var w=r;this.groupCtx.prevXVal[y-1][f]<0?w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[y-1][f]:this.groupCtx.prevXVal[y-1][f]>=0&&(w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]:this.groupCtx.prevX[y-1][f]-m+2*(this.isReversed?m:0)),e=w}else e=r;n=null===this.series[p][f]?e:e+this.series[p][f]/this.invertedYRatio-2*(this.isReversed?this.series[p][f]/this.invertedYRatio:0);var k=this.barHelpers.getBarpaths({barYPosition:g,barHeight:a,x1:e,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,seriesGroup:h,i:p,j:f,w:u});return this.barHelpers.barBackground({j:f,i:p,y1:g,y2:a,elSeries:d}),o+=c,{pathTo:k.pathTo,pathFrom:k.pathFrom,goalX:this.barHelpers.getGoalValues("x",r,null,p,f,b),barXPosition:e,barYPosition:g,x:n,y:o}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,r=t.barWidth,n=t.zeroH,o=t.columnGroupIndex,l=t.seriesGroup,h=t.elSeries,c=this.w,d=e.i,u=e.j,g=e.bc,p=e.realIndex,f=e.translationsIndex;if(c.globals.isXNumeric){var x=c.globals.seriesX[p][u];x||(x=0),i=(x-c.globals.minX)/this.xRatio-r/2*c.globals.barGroups.length}for(var b,m=i+o*r,v=0,y=0;y0&&!c.globals.isXNumeric||w>0&&c.globals.isXNumeric&&c.globals.seriesX[p-1][u]===c.globals.seriesX[p][u]){var k,A,C,S=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var L=1;L=0?C-v+2*(this.isReversed?v:0):C;break}if((null===(T=this.groupCtx.prevYVal[w-P])||void 0===T?void 0:T[u])>=0){A=this.series[d][u]>=0?C:C+v-2*(this.isReversed?v:0);break}}void 0===A&&(A=c.globals.gridHeight),b=null!==(k=this.groupCtx.prevYF[0])&&void 0!==k&&k.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?n:A}else b=n;a=this.series[d][u]?b-this.series[d][u]/this.yRatio[f]+2*(this.isReversed?this.series[d][u]/this.yRatio[f]:0):b;var z=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:r,y1:b,y2:a,yRatio:this.yRatio[f],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:d,j:u,w:c});return this.barHelpers.barBackground({bc:g,j:u,i:d,x1:m,x2:r,elSeries:h}),{pathTo:z.pathTo,pathFrom:z.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,n,d,u),barXPosition:m,x:c.globals.isXNumeric?i:i+s,y:a}}}]),a}(),Ta=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e,i){var a=this,s=this.w,r=new Mi(this.ctx),n=s.globals.comboCharts?e:s.config.chart.type,o=new ji(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=s.config.plotOptions.bar.horizontal;var l=new Pi(this.ctx,s);t=l.getLogSeries(t),this.series=t,this.yRatio=l.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var h=r.group({class:"apexcharts-".concat(n,"-series apexcharts-plot-series")}),c=function(e){a.isBoxPlot="boxPlot"===s.config.chart.type||"boxPlot"===s.config.series[e].type;var n,l,c,d,g=void 0,p=void 0,f=[],x=[],b=s.globals.comboCharts?i[e]:e,m=a.barHelpers.getGroupIndex(b).columnGroupIndex,y=r.group({class:"apexcharts-series",seriesName:v.escapeString(s.globals.seriesNames[b]),rel:e+1,"data:realIndex":b});a.ctx.series.addCollapsedClassToSeries(y,b),t[e].length>0&&(a.visibleI=a.visibleI+1);var w,k,A=0;a.yRatio.length>1&&(a.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],A=b);var C=a.barHelpers.initialPositions();p=C.y,w=C.barHeight,l=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,n=C.xDivision,c=C.zeroH,x.push(g+k/2);for(var S=r.group({class:"apexcharts-datalabels","data:realIndex":b}),L=r.group({class:"apexcharts-bar-goals-markers"}),M=function(i){var r=a.barHelpers.getStrokeWidth(e,i,b),h=null,v={indexes:{i:e,j:i,realIndex:b,translationsIndex:A},x:g,y:p,strokeWidth:r,elSeries:y};h=a.isHorizontal?a.drawHorizontalBoxPaths(u(u({},v),{},{yDivision:l,barHeight:w,zeroW:d})):a.drawVerticalBoxPaths(u(u({},v),{},{xDivision:n,barWidth:k,zeroH:c})),p=h.y,g=h.x;var C=a.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:h.barYPosition,goalX:h.goalX,goalY:h.goalY,barHeight:w,barWidth:k});C&&L.add(C),i>0&&x.push(g+k/2),f.push(p),h.pathTo.forEach((function(n,l){var c=!a.isBoxPlot&&a.candlestickOptions.wick.useFillColor?h.color[l]:s.globals.stroke.colors[e],d=o.fillPath({seriesNumber:b,dataPointIndex:i,color:h.color[l],value:t[e][i]});a.renderSeries({realIndex:b,pathFill:d,lineFill:c,j:i,i:e,pathFrom:h.pathFrom,pathTo:n,strokeWidth:r,elSeries:y,x:g,y:p,series:t,columnGroupIndex:m,barHeight:w,barWidth:k,elDataLabelsWrap:S,elGoalsMarkers:L,visibleSeries:a.visibleI,type:s.config.chart.type})}))},P=0;Pb.c&&(d=!1);var y=Math.min(b.o,b.c),w=Math.max(b.o,b.c),k=b.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[u][c]-o.globals.minX)/this.xRatio-s/2);var A=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(y=r,w=r):(y=r-y/x,w=r-w/x,m=r-b.h/x,v=r-b.l/x,k=r-b.m/x);var C=l.move(A,r),S=l.move(A+s/2,y);return o.globals.previousPaths.length>0&&(S=this.getPreviousPath(u,c,!0)),C=this.isBoxPlot?[l.move(A,y)+l.line(A+s/2,y)+l.line(A+s/2,m)+l.line(A+s/4,m)+l.line(A+s-s/4,m)+l.line(A+s/2,m)+l.line(A+s/2,y)+l.line(A+s,y)+l.line(A+s,k)+l.line(A,k)+l.line(A,y+n/2),l.move(A,k)+l.line(A+s,k)+l.line(A+s,w)+l.line(A+s/2,w)+l.line(A+s/2,v)+l.line(A+s-s/4,v)+l.line(A+s/4,v)+l.line(A+s/2,v)+l.line(A+s/2,w)+l.line(A,w)+l.line(A,k)+"z"]:[l.move(A,w)+l.line(A+s/2,w)+l.line(A+s/2,m)+l.line(A+s/2,w)+l.line(A+s,w)+l.line(A+s,y)+l.line(A+s/2,y)+l.line(A+s/2,v)+l.line(A+s/2,y)+l.line(A,y)+l.line(A,w-n/2)],S+=l.move(A,y),o.globals.isXNumeric||(i+=a),{pathTo:C,pathFrom:S,x:i,y:w,goalY:this.barHelpers.getGoalValues("y",null,r,h,c,e.translationsIndex),barXPosition:A,color:this.isBoxPlot?f:d?[g]:[p]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var i=t.y,a=t.yDivision,s=t.barHeight,r=t.zeroW,n=t.strokeWidth,o=this.w,l=new Mi(this.ctx),h=e.i,c=e.j,d=this.boxOptions.colors.lower;this.isBoxPlot&&(d=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,g=e.realIndex,p=this.getOHLCValue(g,c),f=r,x=r,b=Math.min(p.o,p.c),m=Math.max(p.o,p.c),v=p.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[g][c]-o.globals.minX)/this.invertedXRatio-s/2);var y=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(b=r,m=r):(b=r+b/u,m=r+m/u,f=r+p.h/u,x=r+p.l/u,v=r+p.m/u);var w=l.move(r,y),k=l.move(b,y+s/2);return o.globals.previousPaths.length>0&&(k=this.getPreviousPath(g,c,!0)),w=[l.move(b,y)+l.line(b,y+s/2)+l.line(f,y+s/2)+l.line(f,y+s/2-s/4)+l.line(f,y+s/2+s/4)+l.line(f,y+s/2)+l.line(b,y+s/2)+l.line(b,y+s)+l.line(v,y+s)+l.line(v,y)+l.line(b+n/2,y),l.move(v,y)+l.line(v,y+s)+l.line(m,y+s)+l.line(m,y+s/2)+l.line(x,y+s/2)+l.line(x,y+s-s/4)+l.line(x,y+s/4)+l.line(x,y+s/2)+l.line(m,y+s/2)+l.line(m,y)+l.line(v,y)+"z"],k+=l.move(b,y),o.globals.isXNumeric||(i+=a),{pathTo:w,pathFrom:k,x:m,y:i,goalX:this.barHelpers.getGoalValues("x",r,null,h,c),barYPosition:y,color:d}}},{key:"getOHLCValue",value:function(t,e){var i=this.w,a=new Pi(this.ctx,i),s=a.getLogValAtSeriesIndex(i.globals.seriesCandleH[t][e],t),r=a.getLogValAtSeriesIndex(i.globals.seriesCandleO[t][e],t),n=a.getLogValAtSeriesIndex(i.globals.seriesCandleM[t][e],t),o=a.getLogValAtSeriesIndex(i.globals.seriesCandleC[t][e],t),l=a.getLogValAtSeriesIndex(i.globals.seriesCandleL[t][e],t);return{o:this.isBoxPlot?s:r,h:this.isBoxPlot?r:s,m:n,l:this.isBoxPlot?o:l,c:this.isBoxPlot?l:o}}}]),a}(),za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,a){var s=this.w,r=1,n=s.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,i);s.globals.hasNegs||a?r=s.config.plotOptions[t].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):(1-o.percent/100)*(1.25*n):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(r=1-o.percent/100,"treemap"===t&&(r=(1-o.percent/100)*(1.25*n)));var l=o.color,h=new v;if(s.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var c=h.shadeColor(-1*r,o.color);l=v.hexToRgba(v.isColorHex(c)?c:v.rgb2hex(c),s.config.fill.opacity)}else{var d=h.shadeColor(r,o.color);l=v.hexToRgba(v.isColorHex(d)?d:v.rgb2hex(d),s.config.fill.opacity)}return{color:l,colorProps:o}}},{key:"determineColor",value:function(t,e,i){var a=this.w,s=a.globals.series[e][i],r=a.config.plotOptions[t],n=r.colorScale.inverse?i:e;r.distributed&&"treemap"===a.config.chart.type&&(n=i);var o=a.globals.colors[n],l=null,h=Math.min.apply(Math,f(a.globals.series[e])),c=Math.max.apply(Math,f(a.globals.series[e]));r.distributed||"heatmap"!==t||(h=a.globals.minY,c=a.globals.maxY),void 0!==r.colorScale.min&&(h=r.colorScale.mina.globals.maxY?r.colorScale.max:a.globals.maxY);var d=Math.abs(c)+Math.abs(h),u=100*s/(0===d?d-1e-6:d);r.colorScale.ranges.length>0&&r.colorScale.ranges.map((function(t,e){if(s>=t.from&&s<=t.to){o=t.color,l=t.foreColor?t.foreColor:null,h=t.from,c=t.to;var i=Math.abs(c)+Math.abs(h);u=100*s/(0===i?i-1e-6:i)}}));return{color:o,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,a=t.y,s=t.i,r=t.j,n=t.colorProps,o=t.fontSize,l=this.w.config.dataLabels,h=new Mi(this.ctx),c=new qi(this.ctx),d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});var u=l.offsetX,g=l.offsetY,p=i+u,f=a+parseFloat(l.style.fontSize)/3+g;c.plotDataLabelsText({x:p,y:f,text:e,i:s,j:r,color:n.foreColor,parent:d,fontSize:o,dataLabelsConfig:l})}return d}},{key:"addListeners",value:function(t){var e=new Mi(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),Xa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w,this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new za(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return s(t,[{key:"draw",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var s=e.globals.gridWidth/e.globals.dataPoints,r=e.globals.gridHeight/e.globals.series.length,n=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var h=o?0:l.length-1;o?h=0;o?h++:h--){var c=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:v.escapeString(e.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(this.ctx.series.addCollapsedClassToSeries(c,h),e.config.chart.dropShadow.enabled){var d=e.config.chart.dropShadow;new Li(this.ctx).dropShadow(c,d,h)}for(var u=0,g=e.config.plotOptions.heatmap.shadeIntensity,p=0;p-1&&this.pieClicked(d),i.config.dataLabels.enabled){var w=m.x,k=m.y,A=100*g/this.fullAngle+"%";if(0!==g&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(h=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(h)>this.fullAngle&&(h-=this.fullAngle);var c=Math.PI*(h-90)/180,d=i.centerX+r*Math.cos(l),u=i.centerY+r*Math.sin(l),g=i.centerX+r*Math.cos(c),p=i.centerY+r*Math.sin(c),f=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,h),x=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),b=s>180?1:0,m=["M",d,u,"A",r,r,0,b,1,g,p];return e="donut"===i.chartType?[].concat(m,["L",f.x,f.y,"A",i.donutSize,i.donutSize,0,b,0,x.x,x.y,"L",d,u,"z"]).join(" "):"pie"===i.chartType||"polarArea"===i.chartType?[].concat(m,["L",i.centerX,i.centerY,"L",d,u]).join(" "):[].concat(m).join(" "),n.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new ta(this.ctx),a=new Mi(this.ctx),s=new Ra(this.ctx),r=a.group(),n=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),h=o.result.length;this.maxY=o.niceMax;for(var c=e.globals.radialSize,d=c/(h-1),u=0;u1&&t.total.show&&(s=t.total.color);var n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,r),a||"function"!=typeof t.total.formatter||(i=t.total.formatter(r));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,r):"",null!==n&&(n.textContent=e),null!==o&&(o.textContent=i),null!==n&&(n.style.fill=s)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,a=t.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,s,a,t);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,a=new Mi(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(0!==s.strokeWidth){for(var r=[],n=360/i.globals.series.length,o=0;o0&&(f=e.getPreviousPath(n));for(var x=0;x=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?s-=10:t.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,a=0;a0&&parseInt(s.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[a].paths[0]&&(i=e.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var a=[],s=0;s=360&&(u=360-Math.abs(this.startAngle)-.1);var g=i.drawPath({d:"",stroke:c,strokeWidth:n*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){var p=h.dropShadow;s.dropShadow(g,p)}l.add(g),g.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(g,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:d,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return a}},{key:"drawArcs",value:function(t){var e=this.w,i=new Mi(this.ctx),a=new ji(this.ctx),s=new Li(this.ctx),r=i.group(),n=this.getStrokeWidth(t);t.size=t.size-n/2;var o=e.config.plotOptions.radialBar.hollow.background,l=t.size-n*t.series.length-this.margin*t.series.length-n*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(t,r,l,o));var c=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:o||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var d=e.config.plotOptions.radialBar.hollow.dropShadow;s.dropShadow(c,d)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var g=null;if(this.radialDataLabels.show){var p=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");g=this.renderInnerDataLabels(p,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})}"back"===e.config.plotOptions.radialBar.hollow.position&&(r.add(c),g&&r.add(g));var f=!1;e.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var x=f?t.series.length-1:0;f?x>=0:x100?100:t.series[x])/100,A=Math.round(this.totalAngle*k)+this.startAngle,C=void 0;e.globals.dataChanged&&(w=this.startAngle,C=Math.round(this.totalAngle*v.negToZero(e.globals.previousPaths[x])/100)+w),Math.abs(A)+Math.abs(y)>360&&(A-=.01),Math.abs(C)+Math.abs(w)>360&&(C-=.01);var S=A-y,L=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[x]:e.config.stroke.dashArray,M=i.drawPath({d:"",stroke:m,strokeWidth:n,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+x,strokeDashArray:L});if(Mi.setAttrs(M.node,{"data:angle":S,"data:value":t.series[x]}),e.config.chart.dropShadow.enabled){var P=e.config.chart.dropShadow;s.dropShadow(M,P,x)}if(s.setSelectionFilter(M,0,x),this.addListeners(M,this.radialDataLabels),b.add(M),M.attr({index:0,j:x}),this.barLabels.enabled){var I=v.polarToCartesian(t.centerX,t.centerY,t.size,y),T=this.barLabels.formatter(e.globals.seriesNames[x],{seriesIndex:x,w:e}),z=["apexcharts-radialbar-label"];this.barLabels.onClick||z.push("apexcharts-no-click");var X=this.barLabels.useSeriesColors?e.globals.colors[x]:e.config.chart.foreColor;X||(X=e.config.chart.foreColor);var R=I.x+this.barLabels.offsetX,Y=I.y+this.barLabels.offsetY,E=i.drawText({x:R,y:Y,text:T,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:X,cssClass:z.join(" ")});E.on("click",this.onBarLabelClick),E.attr({rel:x+1}),0!==y&&E.attr({"transform-origin":"".concat(R," ").concat(Y),transform:"rotate(".concat(y," 0 0)")}),b.add(E)}var H=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(H=e.config.chart.animations.speed),e.globals.dataChanged&&(H=e.config.chart.animations.dynamicAnimation.speed),this.animDur=H/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(M,{centerX:t.centerX,centerY:t.centerY,endAngle:A,startAngle:y,prevEndAngle:C,prevStartAngle:w,size:t.size,i:x,totalItems:2,animBeginArr:this.animBeginArr,dur:H,shouldSetPrevPaths:!0})}return{g:r,elHollow:c,dataLabels:g}}},{key:"drawHollow",value:function(t){var e=new Mi(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,a){var s=this.w,r=new ji(this.ctx),n=v.randomId(),o=s.config.plotOptions.radialBar.hollow.image;if(s.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:o,patternID:"pattern".concat(s.globals.cuid).concat(n)}),a="url(#pattern".concat(s.globals.cuid).concat(n,")");else{var l=s.config.plotOptions.radialBar.hollow.imageWidth,h=s.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===h){var c=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-e.width/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+s.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(c)}else{var d=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-l/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-h/2+s.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,h)}));e.add(d)}}return a}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,i=this.barLabels.onClick,a=this.w;i&&i(a.globals.seriesNames[e],{w:a,seriesIndex:e})}}]),r}(),Oa=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var s=a.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),r=0;r0&&(this.visibleI=this.visibleI+1);var x=0,b=0,m=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[g][0],m=g);var y=this.barHelpers.initialPositions();d=y.y,h=y.zeroW,c=y.x,b=y.barWidth,x=y.barHeight,n=y.xDivision,o=y.yDivision,l=y.zeroH;for(var w=a.group({class:"apexcharts-datalabels","data:realIndex":g}),k=a.group({class:"apexcharts-rangebar-goals-markers"}),A=0;A0}));return this.isHorizontal?(a=u.config.plotOptions.bar.rangeBarGroupRows?r+h*b:r+o*this.visibleI+h*b,m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(a=(o=d.barHeight/g.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+g.indexOf(p))+h*b)):(b>-1&&!u.globals.timescaleLabels.length&&(s=u.config.plotOptions.bar.rangeBarGroupRows?n+c*b:n+l*this.visibleI+c*b),m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(s=(l=d.barWidth/g.length)*this.visibleI+c*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+g.indexOf(p))+c*b)),{barYPosition:a,barXPosition:s,barHeight:o,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.xDivision,s=t.barWidth,r=t.barXPosition,n=t.zeroH,o=this.w,l=e.i,h=e.j,c=e.realIndex,d=e.translationsIndex,u=this.yRatio[d],g=this.getRangeValue(c,h),p=Math.min(g.start,g.end),f=Math.max(g.start,g.end);void 0===this.series[l][h]||null===this.series[l][h]?p=n:(p=n-p/u,f=n-f/u);var x=Math.abs(f-p),b=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:s,y1:p,y2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:c,i:c,j:h,w:o});if(o.globals.isXNumeric){var m=this.getBarXForNumericXAxis({x:i,j:h,realIndex:c,barWidth:s});i=m.x,r=m.barXPosition}else i+=a;return{pathTo:b.pathTo,pathFrom:b.pathFrom,barHeight:x,x:i,y:g.start<0&&g.end<0?p:f,goalY:this.barHelpers.getGoalValues("y",null,n,l,h,d),barXPosition:r}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,a=t.y1,s=t.y2,r=t.yDivision,n=t.barHeight,o=t.barYPosition,l=t.zeroW,h=this.w,c=e.realIndex,d=e.j,u=this.preventBarOverflow(l+a/this.invertedYRatio),g=this.preventBarOverflow(l+s/this.invertedYRatio),p=this.getRangeValue(c,d),f=Math.abs(g-u),x=this.barHelpers.getBarpaths({barYPosition:o,barHeight:n,x1:u,x2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:c,realIndex:c,j:d,w:h});return h.globals.isXNumeric||(i+=r),{pathTo:x.pathTo,pathFrom:x.pathFrom,barWidth:f,x:p.start<0&&p.end<0?u:g,goalX:this.barHelpers.getGoalValues("x",l,null,c,d),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}}]),a}(),Fa=function(){function t(e){i(this,t),this.w=e.w,this.lineCtx=e}return s(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new Pi(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,a=t.x,s=t.y,r=t.i,n=t.j,o=t.prevY,l=this.w,h=[],c=[];if(0===n){var d=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(d=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),h.push(d),c.push(v.isNumber(e[r][0])?o+l.config.markers.offsetY:null),h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null)}else h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null);return{x:h,y:c}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,a=t.realIndex,s=this.w,r=0;r0&&parseInt(n.realIndex,10)===parseInt(a,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,e=s.globals.previousPaths[r].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[r].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[r].paths[1]&&(e=s.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e,i,a,s=t.i,r=t.realIndex,n=t.series,o=t.prevY,l=t.lineYPosition,h=t.translationsIndex,c=this.w,d=c.config.chart.stacked&&!c.globals.comboCharts||c.config.chart.stacked&&c.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[r])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[r])||void 0===i?void 0:i.type));if(void 0!==(null===(a=n[s])||void 0===a?void 0:a[0]))o=(l=d&&s>0?this.lineCtx.prevSeriesY[s-1][0]:this.lineCtx.zeroY)-n[s][0]/this.lineCtx.yRatio[h]+2*(this.lineCtx.isReversed?n[s][0]/this.lineCtx.yRatio[h]:0);else if(d&&s>0&&void 0===n[s][0])for(var u=s-1;u>=0;u--)if(null!==n[u][0]&&void 0!==n[u][0]){o=l=this.lineCtx.prevSeriesY[u][0];break}return{prevY:o,lineYPosition:l}}}]),t}(),Da=function(t){for(var e,i,a,s,r=function(t){for(var e=[],i=t[0],a=t[1],s=e[0]=Wa(i,a),r=1,n=t.length-1;r9&&(s=3*a/Math.sqrt(s),r[l]=s*e,r[l+1]=s*i);for(var h=0;h<=n;h++)s=(t[Math.min(n,h+1)][0]-t[Math.max(0,h-1)][0])/(6*(1+r[h]*r[h])),o.push([s||0,r[h]*s||0]);return o},_a=function(t){var e=Da(t),i=t[1],a=t[0],s=[],r=e[1],n=e[0];s.push(a,[a[0]+n[0],a[1]+n[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(var o=2,l=e.length;o1&&a[1].length<6){var s=a[0].length;a[1]=[2*a[0][s-2]-a[0][s-4],2*a[0][s-1]-a[0][s-3]].concat(a[1])}a[0]=a[0].slice(-2)}return a};function Wa(t,e){return(e[1]-t[1])/(e[0]-t[0])}var Ba=function(){function t(e,a,s){i(this,t),this.ctx=e,this.w=e.w,this.xyRatios=a,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||s,this.scatter=new Ui(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Fa(this),this.markers=new Vi(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return s(t,[{key:"draw",value:function(t,e,i,a){var s,r=this.w,n=new Mi(this.ctx),o=r.globals.comboCharts?e:r.config.chart.type,l=n.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),h=new Pi(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=h.getLogSeries(t),this.yRatio=h.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var c=[],d=0;d1?g:0;this._initSerieVariables(t,d,g);var f=[],x=[],b=[],m=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,g),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(m=(r.globals.seriesX[g][0]-r.globals.minX)/this.xRatio),b.push(m);var v,y=m,w=void 0,k=y,A=this.zeroY,C=this.zeroY;A=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:t,prevY:A,lineYPosition:0,translationsIndex:p}).prevY,"monotoneCubic"===r.config.stroke.curve&&null===t[d][0]?f.push(null):f.push(A),v=A;"rangeArea"===o&&(w=C=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:a,prevY:C,lineYPosition:0,translationsIndex:p}).prevY,x.push(null!==f[0]?C:null));var S=this._calculatePathsFrom({type:o,series:t,i:d,realIndex:g,translationsIndex:p,prevX:k,prevY:A,prevY2:C}),L=[f[0]],M=[x[0]],P={type:o,series:t,realIndex:g,translationsIndex:p,i:d,x:m,y:1,pX:y,pY:v,pathsFrom:S,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:b,yArrj:f,y2Arrj:x,seriesRangeEnd:a},I=this._iterateOverDataPoints(u(u({},P),{},{iterations:"rangeArea"===o?t[d].length-1:void 0,isRangeStart:!0}));if("rangeArea"===o){for(var T=this._calculatePathsFrom({series:a,i:d,realIndex:g,prevX:k,prevY:C}),z=this._iterateOverDataPoints(u(u({},P),{},{series:a,xArrj:[m],yArrj:L,y2Arrj:M,pY:w,areaPaths:I.areaPaths,pathsFrom:T,iterations:a[d].length-1,isRangeStart:!1})),X=I.linePaths.length/2,R=0;R=0;Y--)l.add(c[Y]);else for(var E=0;E1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[r]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",zIndex:void 0!==a.config.series[i].zIndex?a.config.series[i].zIndex:i,seriesName:v.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i});var n=t[e].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,a,s,r=t.type,n=t.series,o=t.i,l=t.realIndex,h=t.translationsIndex,c=t.prevX,d=t.prevY,u=t.prevY2,g=this.w,p=new Mi(this.ctx);if(null===n[o][0]){for(var f=0;f0){var x=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:l});a=x.pathFromLine,s=x.pathFromArea}return{prevX:c,prevY:d,linePath:e,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(t){var e=t.type,i=t.realIndex,a=t.i,s=t.paths,r=this.w,n=new Mi(this.ctx),o=new ji(this.ctx);this.prevSeriesY.push(s.yArrj),r.globals.seriesXvalues[i]=s.xArrj,r.globals.seriesYvalues[i]=s.yArrj;var l=r.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var h=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-l.count-1],c=n.drawRect(h,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(c.node);var d=n.drawRect(0,0,h,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(d.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var g={i:a,realIndex:i,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var p=o.fillPath({seriesNumber:i}),f=0;f0&&"rangeArea"!==e){var A=n.renderPaths(w);A.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&A.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(A),A.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),k.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,i,a=this,s=t.type,r=t.series,n=t.iterations,o=t.realIndex,l=t.translationsIndex,h=t.i,c=t.x,d=t.y,u=t.pX,g=t.pY,p=t.pathsFrom,f=t.linePaths,x=t.areaPaths,b=t.seriesIndex,m=t.lineYPosition,y=t.xArrj,w=t.yArrj,k=t.y2Arrj,A=t.isRangeStart,C=t.seriesRangeEnd,S=this.w,L=new Mi(this.ctx),M=this.yRatio,P=p.prevY,I=p.linePath,T=p.areaPath,z=p.pathFromLine,X=p.pathFromArea,R=v.isNumber(S.globals.minYArr[o])?S.globals.minYArr[o]:S.globals.minY;n||(n=S.globals.dataPoints>1?S.globals.dataPoints-1:S.globals.dataPoints);var Y=function(t,e){return e-t/M[l]+2*(a.isReversed?t/M[l]:0)},E=d,H=S.config.chart.stacked&&!S.globals.comboCharts||S.config.chart.stacked&&S.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[o])||void 0===i?void 0:i.type)),O=S.config.stroke.curve;Array.isArray(O)&&(O=Array.isArray(b)?O[b[h]]:O[h]);for(var F,D=0,_=0;_0&&S.globals.collapsedSeries.length0;e--){if(!(S.globals.collapsedSeriesIndices.indexOf((null==b?void 0:b[e])||e)>-1))return e;e--}return 0}(h-1)][_+1]}else m=this.zeroY;else m=this.zeroY;N?d=Y(R,m):(d=Y(r[h][_+1],m),"rangeArea"===s&&(E=Y(C[h][_+1],m))),y.push(c),!N||"smooth"!==S.config.stroke.curve&&"monotoneCubic"!==S.config.stroke.curve?(w.push(d),k.push(E)):(w.push(null),k.push(null));var B=this.lineHelpers.calculatePoints({series:r,x:c,y:d,realIndex:o,i:h,j:_,prevY:P}),G=this._createPaths({type:s,series:r,i:h,realIndex:o,j:_,x:c,y:d,y2:E,xArrj:y,yArrj:w,y2Arrj:k,pX:u,pY:g,pathState:D,segmentStartX:F,linePath:I,areaPath:T,linePaths:f,areaPaths:x,curve:O,isRangeStart:A});x=G.areaPaths,f=G.linePaths,u=G.pX,g=G.pY,D=G.pathState,F=G.segmentStartX,T=G.areaPath,I=G.linePath,!this.appendPathFrom||S.globals.hasNullValues||"monotoneCubic"===O&&"rangeArea"===s||(z+=L.line(c,this.areaBottomY),X+=L.line(c,this.areaBottomY)),this.handleNullDataPoints(r,B,h,_,o),this._handleMarkersAndLabels({type:s,pointsPos:B,i:h,j:_,realIndex:o,isRangeStart:A})}return{yArrj:w,xArrj:y,pathFromArea:X,areaPaths:x,pathFromLine:z,linePaths:f,linePath:I,areaPath:T}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,i=t.pointsPos,a=t.isRangeStart,s=t.i,r=t.j,n=t.realIndex,o=this.w,l=new qi(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var h=this.markers.plotChartMarkers(i,n,r+1);null!==h&&this.elPointsMain.add(h)}var c=l.drawDataLabel({type:e,isRangeStart:a,pos:i,i:n,j:r+1});null!==c&&this.elDataLabelsWrap.add(c)}},{key:"_createPaths",value:function(t){var e=t.type,i=t.series,a=t.i;t.realIndex;var s,r=t.j,n=t.x,o=t.y,l=t.xArrj,h=t.yArrj,c=t.y2,d=t.y2Arrj,u=t.pX,g=t.pY,p=t.pathState,f=t.segmentStartX,x=t.linePath,b=t.areaPath,m=t.linePaths,v=t.areaPaths,y=t.curve,w=t.isRangeStart,k=new Mi(this.ctx),A=this.areaBottomY,C="rangeArea"===e,S="rangeArea"===e&&w;switch(y){case"monotoneCubic":var L=w?h:d;switch(p){case 0:if(null===L[r+1])break;p=1;case 1:if(!(C?l.length===i[a].length:r===i[a].length-2))break;case 2:var M=w?l:l.slice().reverse(),P=w?L:L.slice().reverse(),I=(s=P,M.map((function(t,e){return[t,s[e]]})).filter((function(t){return null!==t[1]}))),T=I.length>1?_a(I):I,z=[];C&&(S?v=I:z=v.reverse());var X=0,R=0;if(function(t,e){for(var i=function(t){var e=[],i=0;return t.forEach((function(t){null!==t?i++:i>0&&(e.push(i),i=0)})),i>0&&e.push(i),e}(t),a=[],s=0,r=0;s4?(e+="C".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]),e+=", ".concat(a[4],", ").concat(a[5])):s>2&&(e+="S".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]))}return e}(t),i=R,a=(R+=t.length)-1;S?x=k.move(I[i][0],I[i][1])+e:C?x=k.move(z[i][0],z[i][1])+k.line(I[i][0],I[i][1])+e+k.line(z[a][0],z[a][1]):(x=k.move(I[i][0],I[i][1])+e,b=x+k.line(I[a][0],A)+k.line(I[i][0],A)+"z",v.push(b)),m.push(x)})),C&&X>1&&!S){var Y=m.slice(X).reverse();m.splice(X),Y.forEach((function(t){return m.push(t)}))}p=0}break;case"smooth":var E=.35*(n-u);if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.curve(n,o,n,o,n,c)+k.move(n,c)),b+=k.curve(n,o,n,o,n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o;break;default:var F=function(t,e,i){var a=[];switch(t){case"stepline":a=k.line(e,null,"H")+k.line(null,i,"V");break;case"linestep":a=k.line(null,i,"V")+k.line(e,null,"H");break;case"straight":a=k.line(e,i)}return a};if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.line(n,c)),b+=k.line(n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o}return{linePaths:m,areaPaths:v,pX:u,pY:g,pathState:p,segmentStartX:f,linePath:x,areaPath:b}}},{key:"handleNullDataPoints",value:function(t,e,i,a,s){var r=this.w;if(null===t[i][a]&&r.config.markers.showNullDataPoints||1===t[i].length){var n=this.strokeWidth-r.config.markers.strokeWidth/2;n>0||(n=0);var o=this.markers.plotChartMarkers(e,s,a+1,n,!0);null!==o&&this.elPointsMain.add(o)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,a,s){this.xoffset=e,this.yoffset=i,this.height=s,this.width=a,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],a=this.xoffset,s=this.yoffset,n=r(t)/this.height,o=r(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var a=e/this.height,s=this.width-a;i=new t(this.xoffset+a,this.yoffset,s,this.height)}else{var r=e/this.width,n=this.height-r;i=new t(this.xoffset,this.yoffset+r,this.width,n)}return i}}function e(e,a,s,n,o){n=void 0===n?0:n,o=void 0===o?0:o;var l=i(function(t,e){var i,a=[],s=e/r(t);for(i=0;i=n}(e,l=t[0],o)?(e.push(l),i(t.slice(1),e,s,n)):(h=s.cutArea(r(e),n),n.push(s.getCoordinates(e)),i(t,[],h,n)),n;n.push(s.getCoordinates(e))}function a(t,e){var i=Math.min.apply(Math,t),a=Math.max.apply(Math,t),s=r(t);return Math.max(Math.pow(e,2)*a/Math.pow(s,2),Math.pow(s,2)/(Math.pow(e,2)*i))}function s(t){return t&&t.constructor===Array}function r(t){var e,i=0;for(e=0;er-a&&l.width<=n-s){var h=o.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(h.x," ").concat(h.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,i,a,s,r){var n=new Mi(this.ctx),o=n.getTextRects(t,e).width+this.w.config.stroke.width+5>s-i&&r-a>s-i?r-a:s-i,l=n.getTextBasedOnMaxWidth({text:t,maxWidth:o,fontSize:e});return t.length!==l.length&&o/e<5?"":l}},{key:"animateTreemap",value:function(t,e,i,a){var s=new y(this.ctx);s.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,(function(){s.animationCompleted(t)}))}}]),t}(),ja=86400,Va=10/ja,Ua=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return s(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new zi(this.ctx),r=(e-t)/864e5;this.determineInterval(r),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,r5e4&&(a.globals.disableZoomOut=!0);var n=s.getTimeUnitsfromTimestamp(t,e,this.utc),o=a.globals.gridWidth/r,l=o/24,h=l/60,c=h/60,d=Math.floor(24*r),g=Math.floor(1440*r),p=Math.floor(r*ja),f=Math.floor(r),x=Math.floor(r/30),b=Math.floor(r/365),m={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},v={firstVal:m,currentMillisecond:m.minMillisecond,currentSecond:m.minSecond,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:l,minutesWidthOnXAxis:h,secondsWidthOnXAxis:c,numberOfSeconds:p,numberOfMinutes:g,numberOfHours:d,numberOfDays:f,numberOfMonths:x,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var y=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?u(u({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?u(u({},e),{},{value:t.value}):"minute"===t.unit?u(u({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?u(u({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return y.filter((function(t){var e=1,s=Math.ceil(a.globals.gridWidth/120),r=t.value;void 0!==a.config.xaxis.tickAmount&&(s=a.config.xaxis.tickAmount),y.length>s&&(e=Math.floor(y.length/s));var n=!1,o=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(n=!0);break;case"half_year":e=7,"year"===t.unit&&(n=!0);break;case"months":e=1,"year"===t.unit&&(n=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(n=!0),30===r&&(o=!0);break;case"months_days":e=10,"month"===t.unit&&(n=!0),30===r&&(o=!0);break;case"week_days":e=8,"month"===t.unit&&(n=!0);break;case"days":e=1,"month"===t.unit&&(n=!0);break;case"hours":"day"===t.unit&&(n=!0);break;case"minutes_fives":case"seconds_fives":r%5!=0&&(o=!0);break;case"seconds_tens":r%10!=0&&(o=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!o)return!0}else if((r%e==0||n)&&!o)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,a=this.formatDates(t),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new pa(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.daysWidthOnXAxis,r=t.numberOfYears,n=e.minYear,o=0,l=new zi(this.ctx),h="year";if(e.minDate>1||e.minMonth>0){var c=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(l.determineDaysOfYear(e.minYear)-c+1)*s,n=e.minYear+1,this.timeScaleArray.push({position:o,value:n,unit:h,year:n,month:v.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:o,value:n,unit:h,year:a,month:v.monthMod(i+1)});for(var d=n,u=o,g=0;g1){l=(h.determineDaysOfMonths(a+1,e.minYear)-i+1)*r,o=v.monthMod(a+1);var u=s+d,g=v.monthMod(o),p=o;0===o&&(c="year",p=u,g=1,u+=d+=1),this.timeScaleArray.push({position:l,value:p,unit:c,year:u,month:g})}else this.timeScaleArray.push({position:l,value:o,unit:c,year:s,month:v.monthMod(a)});for(var f=o+1,x=l,b=0,m=1;bn.determineDaysOfMonths(e+1,i)?(h=1,o="month",u=e+=1,e):e},d=(24-e.minHour)*s,u=l,g=c(h,i,a);0===e.minHour&&1===e.minDate?(d=0,u=v.monthMod(e.minMonth),o="month",h=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(d=0,l=e.minDate,u=l,g=c(h=l,i,a)),this.timeScaleArray.push({position:d,value:u,unit:o,year:this._getYear(a,g,0),month:v.monthMod(g),day:h});for(var p=d,f=0;fo.determineDaysOfMonths(e+1,s)&&(f=1,e+=1),{month:e,date:f}},c=function(t,e){return t>o.determineDaysOfMonths(e+1,s)?e+=1:e},d=60-(e.minMinute+e.minSecond/60),u=d*r,g=e.minHour+1,p=g;60===d&&(u=0,p=g=e.minHour);var f=i;p>=24&&(p=0,l="day",g=f+=1);var x=h(f,a).month;x=c(f,x),this.timeScaleArray.push({position:u,value:g,unit:l,day:f,hour:p,year:s,month:v.monthMod(x)}),p++;for(var b=u,m=0;m=24)p=0,l="day",x=h(f+=1,x).month,x=c(f,x);var y=this._getYear(s,x,0);b=60*r+b;var w=0===p?f:p;this.timeScaleArray.push({position:b,value:w,unit:l,hour:p,day:f,year:y,month:v.monthMod(x)}),p++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.minutesWidthOnXAxis,h=t.secondsWidthOnXAxis,c=t.numberOfMinutes,d=a+1,u=r,g=n,p=o,f=s,x=(60-i-e/1e3)*h,b=0;b=60&&(d=0,24===(f+=1)&&(f=0)),this.timeScaleArray.push({position:x,value:d,unit:"minute",hour:f,minute:d,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,d++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.secondsWidthOnXAxis,h=t.numberOfSeconds,c=i+1,d=a,u=r,g=n,p=o,f=s,x=(1e3-e)/1e3*l,b=0;b=60&&(c=0,++d>=60&&(d=0,24===++f&&(f=0))),this.timeScaleArray.push({position:x,value:c,unit:"second",hour:f,minute:d,second:c,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,c++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var a=t.value.toString(),s=new zi(e.ctx),r=e.createRawDateString(t,a),n=s.getDate(s.parseDate(r));if(e.utc||(n=s.getDate(s.parseDateWithTimezone(r))),void 0===i.config.xaxis.labels.format){var o="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(o=l.year),"month"===t.unit&&(o=l.month),"day"===t.unit&&(o=l.day),"hour"===t.unit&&(o=l.hour),"minute"===t.unit&&(o=l.minute),"second"===t.unit&&(o=l.second),a=s.formatDate(n,o)}else a=s.formatDate(n,i.config.xaxis.labels.format);return{dateString:r,position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,a=new Mi(this.ctx),s=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(s=!0,e=a.getTextRects(t[0].value).width);var r=0,n=t.map((function(n,o){if(o>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=s?e:a.getTextRects(t[r].value).width,h=t[r].position;return n.position>h+l+10?(r=o,n):null}return n}));return n=n.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),qa=function(){function t(e,a){i(this,t),this.ctx=a,this.w=a.w,this.el=e}return s(t,[{key:"setupElements",value:function(){var t=this.w,e=t.globals,i=t.config,a=i.chart.type;e.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(a),e.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(a),e.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(a)&&i.plotOptions.bar.horizontal,e.chartClass=".apexcharts".concat(e.chartID),e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),Mi.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas ".concat(e.chartClass.substring(1))}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=window.SVG().addTo(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(i.chart.offsetX,", ").concat(i.chart.offsetY,")")}),e.dom.Paper.node.style.background="dark"!==i.theme.mode||i.chart.background?"light"!==i.theme.mode||i.chart.background?i.chart.background:"#fff":"#424242",this.setSVGDimensions(),e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject"),Mi.setAttrs(e.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap),e.dom.Paper.node.appendChild(e.dom.elLegendForeign),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,a=this.ctx,s=i.config,r=i.globals,n={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},o=s.chart.type||"line",l=null,h=0;r.series.forEach((function(e,a){var s=t[a].type||o;n[s]?("rangeArea"===s?(n[s].series.push(r.seriesRangeStart[a]),n[s].seriesRangeEnd.push(r.seriesRangeEnd[a])):n[s].series.push(e),n[s].i.push(a),"column"!==s&&"bar"!==s||(i.globals.columnSeries=n.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(s)?l=s:"bar"===s?(n.column.series.push(e),n.column.i.push(a)):console.warn("You have specified an unrecognized series type (".concat(s,").")),o!==s&&"scatter"!==s&&h++})),h>0&&(l&&console.warn("Chart or series type ".concat(l," cannot appear with other chart or series types.")),n.column.series.length>0&&s.plotOptions.bar.horizontal&&(h-=n.column.series.length,n.column={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||(r.comboCharts=h>0);var c=new Ba(a,e),d=new Ta(a,e);a.pie=new Ya(a);var u=new Ha(a);a.rangeBar=new Oa(a,e);var g=new Ea(a),p=[];if(r.comboCharts){var x,b,m=new Pi(a);if(n.area.series.length>0)(x=p).push.apply(x,f(m.drawSeriesByGroup(n.area,r.areaGroups,"area",c)));if(n.column.series.length>0)if(s.chart.stacked){var v=new Ia(a,e);p.push(v.draw(n.column.series,n.column.i))}else a.bar=new Pa(a,e),p.push(a.bar.draw(n.column.series,n.column.i));if(n.rangeArea.series.length>0&&p.push(c.draw(n.rangeArea.series,"rangeArea",n.rangeArea.i,n.rangeArea.seriesRangeEnd)),n.line.series.length>0)(b=p).push.apply(b,f(m.drawSeriesByGroup(n.line,r.lineGroups,"line",c)));if(n.candlestick.series.length>0&&p.push(d.draw(n.candlestick.series,"candlestick",n.candlestick.i)),n.boxPlot.series.length>0&&p.push(d.draw(n.boxPlot.series,"boxPlot",n.boxPlot.i)),n.rangeBar.series.length>0&&p.push(a.rangeBar.draw(n.rangeBar.series,n.rangeBar.i)),n.scatter.series.length>0){var y=new Ba(a,e,!0);p.push(y.draw(n.scatter.series,"scatter",n.scatter.i))}if(n.bubble.series.length>0){var w=new Ba(a,e,!0);p.push(w.draw(n.bubble.series,"bubble",n.bubble.i))}}else switch(s.chart.type){case"line":p=c.draw(r.series,"line");break;case"area":p=c.draw(r.series,"area");break;case"bar":if(s.chart.stacked)p=new Ia(a,e).draw(r.series);else a.bar=new Pa(a,e),p=a.bar.draw(r.series);break;case"candlestick":p=new Ta(a,e).draw(r.series,"candlestick");break;case"boxPlot":p=new Ta(a,e).draw(r.series,s.chart.type);break;case"rangeBar":p=a.rangeBar.draw(r.series);break;case"rangeArea":p=c.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":p=new Xa(a,e).draw(r.series);break;case"treemap":p=new Ga(a,e).draw(r.series);break;case"pie":case"donut":case"polarArea":p=a.pie.draw(r.series);break;case"radialBar":p=u.draw(r.series);break;case"radar":p=g.draw(r.series);break;default:p=c.draw(r.series)}return p}},{key:"setSVGDimensions",value:function(){var t=this.w,e=t.globals,i=t.config;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto",e.svgWidth=i.chart.width,e.svgHeight=i.chart.height;var a=v.getDimensions(this.el),s=i.chart.width.toString().split(/[0-9]+/g).pop();"%"===s?v.isNumber(a[0])&&(0===a[0].width&&(a=v.getDimensions(this.el.parentNode)),e.svgWidth=a[0]*parseInt(i.chart.width,10)/100):"px"!==s&&""!==s||(e.svgWidth=parseInt(i.chart.width,10));var r=String(i.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===r){var n=v.getDimensions(this.el.parentNode);e.svgHeight=n[1]*parseInt(i.chart.height,10)/100}else e.svgHeight=parseInt(i.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Mi.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==r){var o=i.chart.sparkline.enabled?0:e.axisCharts?i.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(e.svgHeight+o,"px")}e.dom.elWrap.style.width="".concat(e.svgWidth,"px"),e.dom.elWrap.style.height="".concat(e.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i=t.translateX;Mi.setAttrs(t.dom.elGraphical.node,{transform:"translate(".concat(i,", ").concat(e,")")})}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,a=t.config.chart.sparkline.enabled?1:15;a+=t.config.grid.padding.bottom,["top","bottom"].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(i=new xa(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var s=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*t.globals.radialSize;if(s&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var n=v.getBoundingClientRect(s);r=n.bottom;var o=n.bottom-n.top;r=Math.max(2.05*t.globals.radialSize,o)}var l=Math.ceil(r+e.translateY+i+a);e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).includes("%")||(e.dom.elWrap.style.height="".concat(l,"px"),Mi.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(l,"px"))}},{key:"coreCalculations",value:function(){new ea(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(){return[]}))},i=new Bi,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=e(),a.seriesYvalues=e()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var t=this.w,e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new na(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new na(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Ua(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new Pi(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var i=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];i.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){return t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){return t.updateSourceChart(i)})})),e.config.chart.events.selection=function(t,e){i.forEach((function(t){ApexCharts.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:e.xaxis.min,max:e.xaxis.max}},!1,!1,!1,!1)}))}}}}]),t}(),Za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"_updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(n){var o=[e.ctx];s&&(o=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(o=[e.ctx],e.ctx.w.globals.isExecCalled=!1),o.forEach((function(s,l){var h=s.w;if(h.globals.shouldAnimate=a,i||(h.globals.resized=!0,h.globals.dataChanged=!0,a&&s.series.getPreviousPaths()),t&&"object"===b(t)&&(s.config=new Wi(t),t=Pi.extendArrayProps(s.config,t,h),s.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,h.config=v.extend(h.config,t),r&&(h.globals.lastXAxis=t.xaxis?v.clone(t.xaxis):[],h.globals.lastYAxis=t.yaxis?v.clone(t.yaxis):[],h.globals.initialConfig=v.extend({},h.config),h.globals.initialSeries=v.clone(h.config.series),t.series))){for(var c=0;c2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(s){var r,n=i.w;return n.globals.shouldAnimate=e,n.globals.dataChanged=!0,e&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?(0===(r=t.map((function(t,e){return i._extendSeries(t,e)}))).length&&(r=[{data:[]}]),n.config.series=r):n.config.series=t.slice(),a&&(n.globals.initialConfig.series=v.clone(n.config.series),n.globals.initialSeries=v.clone(n.config.series)),i.ctx.update().then((function(){s(i.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var i=this.w,a=i.config.series[e];return u(u({},i.config.series[e]),{},{name:t.name?t.name:null==a?void 0:a.name,color:t.color?t.color:null==a?void 0:a.color,type:t.type?t.type:null==a?void 0:a.type,group:t.group?t.group:null==a?void 0:a.group,hidden:void 0!==t.hidden?t.hidden:null==a?void 0:a.hidden,data:t.data?t.data:null==a?void 0:a.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(e,"'], ").concat(s," circle[j='").concat(e,"'], ").concat(s," rect[j='").concat(e,"']")):void 0===e&&(a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(t,"']")),"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),a?(new Mi(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new Ni(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;t&&t.xaxis&&(a=t.xaxis),t&&t.yaxis&&(s=t.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;var r=function(t){void 0!==s[t]&&(i.config.yaxis[t].min=s[t].min,i.config.yaxis[t].max=s[t].max)};i.config.yaxis.map((function(t,a){i.globals.zoomed||void 0!==s[a]?r(a):void 0!==e.ctx.opts.yaxis[a]&&(t.min=e.ctx.opts.yaxis[a].min,t.max=e.ctx.opts.yaxis[a].max)}))}}]),t}();!function(){function t(){for(var t=arguments.length>0&&arguments[0]!==h?arguments[0]:[],s=arguments.length>1?arguments[1]:h,r=arguments.length>2?arguments[2]:h,n=arguments.length>3?arguments[3]:h,o=arguments.length>4?arguments[4]:h,l=arguments.length>5?arguments[5]:h,h=arguments.length>6?arguments[6]:h,c=t.slice(s,r||h),d=n.slice(o,l||h),u=0,g={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};;){if(c[u]=e.call(g,c[u]),d[u]=e.call(p,d[u]),c[u][0]!=d[u][0]||"M"==c[u][0]||"A"==c[u][0]&&(c[u][4]!=d[u][4]||c[u][5]!=d[u][5])?(Array.prototype.splice.apply(c,[u,1].concat(a.call(g,c[u]))),Array.prototype.splice.apply(d,[u,1].concat(a.call(p,d[u])))):(c[u]=i.call(g,c[u]),d[u]=i.call(p,d[u])),++u==c.length&&u==d.length)break;u==c.length&&c.push(["C",g.pos[0],g.pos[1],g.pos[0],g.pos[1],g.pos[0],g.pos[1]]),u==d.length&&d.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]])}return{start:c,dest:d}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function i(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function a(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var i,a,s,r,n,o,l,h,c,d,u,g,p,f,x,b,m,v,y,w,k,A,C,S,L,M,P=Math.abs(e[1]),I=Math.abs(e[2]),T=e[3]%360,z=e[4],X=e[5],R=e[6],Y=e[7],E=new bt(t),H=new bt(R,Y),O=[];if(0===P||0===I||E.x===H.x&&E.y===H.y)return[["C",E.x,E.y,H.x,H.y,H.x,H.y]];i=new bt((E.x-H.x)/2,(E.y-H.y)/2).transform((new vt).rotate(T)),a=i.x*i.x/(P*P)+i.y*i.y/(I*I),a>1&&(P*=a=Math.sqrt(a),I*=a);s=(new vt).rotate(T).scale(1/P,1/I).rotate(-T),E=E.transform(s),H=H.transform(s),r=[H.x-E.x,H.y-E.y],o=r[0]*r[0]+r[1]*r[1],n=Math.sqrt(o),r[0]/=n,r[1]/=n,l=o<4?Math.sqrt(1-o/4):0,z===X&&(l*=-1);h=new bt((H.x+E.x)/2+l*-r[1],(H.y+E.y)/2+l*r[0]),c=new bt(E.x-h.x,E.y-h.y),d=new bt(H.x-h.x,H.y-h.y),u=Math.acos(c.x/Math.sqrt(c.x*c.x+c.y*c.y)),c.y<0&&(u*=-1);g=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(g*=-1);X&&u>g&&(g+=2*Math.PI);!X&&u0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(!1===e)return!1;for(var i=e,a=t.length;i(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class Ja{constructor(t){t.remember("_draggable",this),this.el=t,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(t){t?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(t){const e=!t.type.indexOf("mouse");if(e&&1!==t.which&&0!==t.buttons)return;if(this.el.dispatch("beforedrag",{event:t,handler:this}).defaultPrevented)return;t.preventDefault(),t.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point($a(t));const i=(e?"mouseup":"touchend")+".drag";zt(window,(e?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),zt(window,i,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:t,handler:this,box:this.box})}drag(t){const{box:e,lastClick:i}=this,a=this.el.point($a(t)),s=a.x-i.x,r=a.y-i.y;if(!s&&!r)return e;const n=e.x+s,o=e.y+r;this.box=new kt(n,o,e.w,e.h),this.lastClick=a,this.el.dispatch("dragmove",{event:t,handler:this,box:this.box}).defaultPrevented||this.move(n,o)}move(t,e){"svg"===this.el.type?gi.prototype.move.call(this.el,t,e):this.el.move(t,e)}endDrag(t){this.drag(t),this.el.fire("dragend",{event:t,handler:this,box:this.box}),Xt(window,"mousemove.drag"),Xt(window,"touchmove.drag"),Xt(window,"mouseup.drag"),Xt(window,"touchend.drag"),this.init(!0)}} +"use strict";function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=Array(e);i=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,n=!0,o=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){o=!0,r=t},f:function(){try{n||null==i.return||i.return()}finally{if(o)throw r}}}}function n(t){var i=c();return function(){var a,s=l(t);if(i){var r=l(this).constructor;a=Reflect.construct(s,arguments,r)}else a=s.apply(this,arguments);return function(t,i){if(i&&("object"==typeof i||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return e(t)}(this,a)}}function o(t,e,i){return(e=x(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function d(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function u(t){for(var e=1;e>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-r)*s)+r)+256*(Math.round((a-n)*s)+n)+(Math.round((a-o)*s)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,i){return t.isColorHex(i)?this.shadeHexColor(e,i):this.shadeRGBColor(e,i)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===b(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,i=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var i="",a=t<0?"-":"",s=e[0].replace(".",""),r=Number(e[1])+1;if(r<0){for(i=a+"0.";r++;)i+="0";return i+s.replace(/^-/,"")}for(r-=s.length;r--;)i+="0";return s+i}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),i=t.clientHeight,a=t.clientWidth;return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[a-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),i]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:"x",i=t.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,i){if(i>=t.length)for(var a=i-t.length+1;a--;)t.push(void 0);return t.splice(i,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style.key=e[i])}},{key:"preciseAddition",value:function(t,e){var i=(String(t).split(".")[1]||"").length,a=(String(e).split(".")[1]||"").length,s=Math.pow(10,Math.max(i,a));return(Math.round(t*s)+Math.round(e*s))/s}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*a),e=Math.round(Math.abs(e)*a);e;){var s=e;e=t%e,t=s}return t/a}},{key:"getPrimeFactors",value:function(t){for(var e=[],i=2;t>=2;)t%i==0?(e.push(i),t/=i):i++;return e}},{key:"mod",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*a))%(e=Math.round(Math.abs(e)*a))/a}}]),t}(),y=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"animateLine",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animateMarker",value:function(t,e,i,a){t.attr({opacity:0}).animate(e).attr({opacity:1}).after((function(){a()}))}},{key:"animateRect",value:function(t,e,i,a,s){t.attr(e).animate(a).attr(i).after((function(){return s()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.realIndex,a=t.j,s=t.fill,r=t.pathFrom,n=t.pathTo,o=t.speed,l=t.delay,h=this.w,c=0;h.config.chart.animations.animateGradually.enabled&&(c=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&"bar"!==h.config.chart.type&&(c=0),this.morphSVG(e,i,a,"line"!==h.config.chart.type||h.globals.comboCharts?s:"stroke",r,n,o,l*c)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){var e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,i,a,s,r,n,o){var l=this,h=this.w;s||(s=t.attr("pathFrom")),r||(r=t.attr("pathTo"));var c=function(t){return"radar"===h.config.chart.type&&(n=1),"M 0 ".concat(h.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=c()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=c()),h.globals.shouldAnimate||(n=1),t.plot(s).animate(1,o).plot(s).animate(n,o).plot(r).after((function(){v.isNumber(i)?i===h.globals.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&l.animationCompleted(t):"none"!==a&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&e===h.globals.series.length-1||h.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}]),t}();const w={},k=[];function A(t,e){if(Array.isArray(t))for(const i of t)A(i,e);else if("object"!=typeof t)S(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(const e in t)A(e,t[e])}function C(t){return w[t]||{}}function S(t){k.push(...t)}function L(t,e){let i;const a=t.length,s=[];for(i=0;iz.has(t.nodeName),R=(t,e,i={})=>{const a={...e};for(const t in a)a[t].valueOf()===i[t]&&delete a[t];Object.keys(a).length?t.node.setAttribute("data-svgjs",JSON.stringify(a)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},E="http://www.w3.org/2000/svg",Y="http://www.w3.org/2000/xmlns/",H="http://www.w3.org/1999/xlink",O={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function F(){return O.window}let D=class{};const _={},N="___SYMBOL___ROOT___";function W(t,e=E){return O.document.createElementNS(e,t)}function B(t,e=!1){if(t instanceof D)return t;if("object"==typeof t)return U(t);if(null==t)return new _[N];if("string"==typeof t&&"<"!==t.charAt(0))return U(O.document.querySelector(t));const i=e?O.document.createElement("div"):W("svg");return i.innerHTML=t,t=U(i.firstChild),i.removeChild(i.firstChild),t}function G(t,e){return e&&(e instanceof O.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:W(t)}function V(t){if(!t)return null;if(t.instance instanceof D)return t.instance;if("#document-fragment"===t.nodeName)return new _.Fragment(t);let e=P(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":_[e]||(e="Dom"),new _[e](t)}let U=V;function q(t,e=t.name,i=!1){return _[e]=t,i&&(_[N]=t),S(Object.getOwnPropertyNames(t.prototype)),t}let Z=1e3;function $(t){return"Svgjs"+P(t)+Z++}function J(t){for(let e=t.children.length-1;e>=0;e--)J(t.children[e]);return t.id?(t.id=$(t.nodeName),t):t}function Q(t,e){let i,a;for(a=(t=Array.isArray(t)?t:[t]).length-1;a>=0;a--)for(i in e)t[a].prototype[i]=e[i]}function K(t){return function(...e){const i=e[e.length-1];return!i||i.constructor!==Object||i instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(i)}}A("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=B(t)).before(this),this},insertAfter:function(t){return(t=B(t)).after(this),this}});const tt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,et=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,it=/rgb\((\d+),(\d+),(\d+)\)/,at=/(#[a-z_][a-z0-9\-_]*)/i,st=/\)\s*,?\s*/,rt=/\s/g,nt=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ot=/^rgb\(/,lt=/^(\s+)?$/,ht=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ct=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,dt=/[\s,]+/,ut=/[MLHVCSQTAZ]/i;function gt(t){const e=Math.round(t),i=Math.max(0,Math.min(255,e)).toString(16);return 1===i.length?"0"+i:i}function pt(t,e){for(let i=e.length;i--;)if(null==t[e[i]])return!1;return!0}function ft(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}A("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(dt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),A("Dom",{css:function(t,e){const i={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);i[e[0]]=e[1]})),i;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;i[e]=this.node.style.getPropertyValue(t)}return i}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||lt.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||lt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),A("Dom",{data:function(t,e,i){if(null==t)return this.data(L(function(t,e){let i;const a=t.length,s=[];for(i=0;i0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const i of t)e[i]=this.data(i);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===i||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),A("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class xt{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof xt||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:i,round:a,sin:s,PI:r}=Math;if("vibrant"===t){const t=24*i()+57,e=38*i()+45,a=360*i();return new xt(t,e,a,"lch")}if("sine"===t){const t=a(80*s(2*r*(e=null==e?i():e)/.5+.01)+150),n=a(50*s(2*r*e/.5+4.6)+200),o=a(100*s(2*r*e/.5+2.3)+150);return new xt(t,n,o)}if("pastel"===t){const t=8*i()+86,e=17*i()+9,a=360*i();return new xt(t,e,a,"lch")}if("dark"===t){const t=10+10*i(),e=50*i()+86,a=360*i();return new xt(t,e,a,"lch")}if("rgb"===t){const t=255*i(),e=255*i(),a=255*i();return new xt(t,e,a)}if("lab"===t){const t=100*i(),e=256*i()-128,a=256*i()-128;return new xt(t,e,a,"lab")}if("grey"===t){const t=255*i();return new xt(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(nt.test(t)||ot.test(t))}cmyk(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.min(1-a,1-s,1-r);if(1===n)return new xt(0,0,0,1,"cmyk");return new xt((1-a-n)/(1-n),(1-s-n)/(1-n),(1-r-n)/(1-n),n,"cmyk")}hsl(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.max(a,s,r),o=Math.min(a,s,r),l=(n+o)/2,h=n===o,c=n-o;return new xt(360*(h?0:n===a?((s-r)/c+(s.5?c/(2-n-o):c/(n+o)),100*l,"hsl")}init(t=0,e=0,i=0,a=0,s="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)s="string"==typeof a?a:s,a="string"==typeof a?0:a,Object.assign(this,{_a:t,_b:e,_c:i,_d:a,space:s});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const i=function(t,e){const i=pt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:pt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:pt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:pt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:pt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:pt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return i.space=e||i.space,i}(t,e);Object.assign(this,i)}else if("string"==typeof t)if(ot.test(t)){const e=t.replace(rt,""),[i,a,s]=it.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}else{if(!nt.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,i,a,s]=et.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}}const{_a:r,_b:n,_c:o,_d:l}=this,h="rgb"===this.space?{r:r,g:n,b:o}:"xyz"===this.space?{x:r,y:n,z:o}:"hsl"===this.space?{h:r,s:n,l:o}:"lab"===this.space?{l:r,a:n,b:o}:"lch"===this.space?{l:r,c:n,h:o}:"cmyk"===this.space?{c:r,m:n,y:o,k:l}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:i}=this.xyz();return new xt(116*e-16,500*(t-e),200*(e-i),"lab")}lch(){const{l:t,a:e,b:i}=this.lab(),a=Math.sqrt(e**2+i**2);let s=180*Math.atan2(i,e)/Math.PI;s<0&&(s*=-1,s=360-s);return new xt(t,a,s,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:a,a:s,b:r}=this;if("lch"===this.space){const{c:t,h:e}=this,i=Math.PI/180;s=t*Math.cos(i*e),r=t*Math.sin(i*e)}const n=(a+16)/116,o=s/500+n,l=n-r/200,h=16/116,c=.008856,d=7.787;t=.95047*(o**3>c?o**3:(o-h)/d),e=1*(n**3>c?n**3:(n-h)/d),i=1.08883*(l**3>c?l**3:(l-h)/d)}const a=3.2406*t+-1.5372*e+-.4986*i,s=-.9689*t+1.8758*e+.0415*i,r=.0557*t+-.204*e+1.057*i,n=Math.pow,o=.0031308,l=a>o?1.055*n(a,1/2.4)-.055:12.92*a,h=s>o?1.055*n(s,1/2.4)-.055:12.92*s,c=r>o?1.055*n(r,1/2.4)-.055:12.92*r;return new xt(255*l,255*h,255*c)}if("hsl"===this.space){let{h:t,s:e,l:i}=this;if(t/=360,e/=100,i/=100,0===e){i*=255;return new xt(i,i,i)}const a=i<.5?i*(1+e):i+e-i*e,s=2*i-a,r=255*ft(s,a,t+1/3),n=255*ft(s,a,t),o=255*ft(s,a,t-1/3);return new xt(r,n,o)}if("cmyk"===this.space){const{c:t,m:e,y:i,k:a}=this,s=255*(1-Math.min(1,t*(1-a)+a)),r=255*(1-Math.min(1,e*(1-a)+a)),n=255*(1-Math.min(1,i*(1-a)+a));return new xt(s,r,n)}return this;var t}toArray(){const{_a:t,_b:e,_c:i,_d:a,space:s}=this;return[t,e,i,a,s]}toHex(){const[t,e,i]=this._clamped().map(gt);return`#${t}${e}${i}`}toRgb(){const[t,e,i]=this._clamped();return`rgb(${t},${e},${i})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,o=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,l=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,h=(.4124*n+.3576*o+.1805*l)/.95047,c=(.2126*n+.7152*o+.0722*l)/1,d=(.0193*n+.1192*o+.9505*l)/1.08883,u=h>.008856?Math.pow(h,1/3):7.787*h+16/116,g=c>.008856?Math.pow(c,1/3):7.787*c+16/116,p=d>.008856?Math.pow(d,1/3):7.787*d+16/116;return new xt(u,g,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:i}=this.rgb(),{max:a,min:s,round:r}=Math;return[t,e,i].map((t=>a(0,s(r(t),255))))}}class bt{constructor(...t){this.init(...t)}clone(){return new bt(this)}init(t,e){const i=0,a=0,s=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==s.x?i:s.x,this.y=null==s.y?a:s.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){vt.isMatrixLike(t)||(t=new vt(t));const{x:e,y:i}=this;return this.x=t.a*e+t.c*i+t.e,this.y=t.b*e+t.d*i+t.f,this}}function mt(t,e,i){return Math.abs(e-t)<(i||1e-6)}class vt{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,i=t.flip&&(e||"x"===t.flip)?-1:1,a=t.flip&&(e||"y"===t.flip)?-1:1,s=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,r=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,n=t.scale&&t.scale.length?t.scale[0]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleX)?t.scaleX*i:i,o=t.scale&&t.scale.length?t.scale[1]*a:isFinite(t.scale)?t.scale*a:isFinite(t.scaleY)?t.scaleY*a:a,l=t.shear||0,h=t.rotate||t.theta||0,c=new bt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),d=c.x,u=c.y,g=new bt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=g.x,f=g.y,x=new bt(t.translate||t.tx||t.translateX,t.ty||t.translateY),b=x.x,m=x.y,v=new bt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:n,scaleY:o,skewX:s,skewY:r,shear:l,theta:h,rx:v.x,ry:v.y,tx:b,ty:m,ox:d,oy:u,px:p,py:f}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,i){const a=t.a*e.a+t.c*e.b,s=t.b*e.a+t.d*e.b,r=t.a*e.c+t.c*e.d,n=t.b*e.c+t.d*e.d,o=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return i.a=a,i.b=s,i.c=r,i.d=n,i.e=o,i.f=l,i}around(t,e,i){return this.clone().aroundO(t,e,i)}aroundO(t,e,i){const a=t||0,s=e||0;return this.translateO(-a,-s).lmultiplyO(i).translateO(a,s)}clone(){return new vt(this)}decompose(t=0,e=0){const i=this.a,a=this.b,s=this.c,r=this.d,n=this.e,o=this.f,l=i*r-a*s,h=l>0?1:-1,c=h*Math.sqrt(i*i+a*a),d=Math.atan2(h*a,h*i),u=180/Math.PI*d,g=Math.cos(d),p=Math.sin(d),f=(i*s+a*r)/l,x=s*c/(f*i-a)||r*c/(f*a+i);return{scaleX:c,scaleY:x,shear:f,rotate:u,translateX:n-t+t*g*c+e*(f*g*c-p*x),translateY:o-e+t*p*c+e*(f*p*c+g*x),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new vt(t);return mt(this.a,e.a)&&mt(this.b,e.b)&&mt(this.c,e.c)&&mt(this.d,e.d)&&mt(this.e,e.e)&&mt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=vt.fromArray([1,0,0,1,0,0]);return t=t instanceof Gt?t.matrixify():"string"==typeof t?vt.fromArray(t.split(dt).map(parseFloat)):Array.isArray(t)?vt.fromArray(t):"object"==typeof t&&vt.isMatrixLike(t)?t:"object"==typeof t?(new vt).transform(t):6===arguments.length?vt.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,i=this.c,a=this.d,s=this.e,r=this.f,n=t*a-e*i;if(!n)throw new Error("Cannot invert "+this);const o=a/n,l=-e/n,h=-i/n,c=t/n,d=-(o*s+h*r),u=-(l*s+c*r);return this.a=o,this.b=l,this.c=h,this.d=c,this.e=d,this.f=u,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(this,e,this)}rotate(t,e,i){return this.clone().rotateO(t,e,i)}rotateO(t,e=0,i=0){t=M(t);const a=Math.cos(t),s=Math.sin(t),{a:r,b:n,c:o,d:l,e:h,f:c}=this;return this.a=r*a-n*s,this.b=n*a+r*s,this.c=o*a-l*s,this.d=l*a+o*s,this.e=h*a-c*s+i*s-e*a+e,this.f=c*a+h*s-e*s-i*a+i,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t);const{a:s,b:r,c:n,d:o,e:l,f:h}=this;return this.a=s*t,this.b=r*e,this.c=n*t,this.d=o*e,this.e=l*t-i*t+i,this.f=h*e-a*e+a,this}shear(t,e,i){return this.clone().shearO(t,e,i)}shearO(t,e=0,i=0){const{a:a,b:s,c:r,d:n,e:o,f:l}=this;return this.a=a+s*t,this.c=r+n*t,this.e=o+l*t-i*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t),t=M(t),e=M(e);const s=Math.tan(t),r=Math.tan(e),{a:n,b:o,c:l,d:h,e:c,f:d}=this;return this.a=n+o*s,this.b=o+n*r,this.c=l+h*s,this.d=h+l*r,this.e=c+d*s-a*s,this.f=d+c*r-i*r,this}skewX(t,e,i){return this.skew(t,0,e,i)}skewY(t,e,i){return this.skew(0,t,e,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(vt.isMatrixLike(t)){return new vt(t).multiplyO(this)}const e=vt.formatTransforms(t),{x:i,y:a}=new bt(e.ox,e.oy).transform(this),s=(new vt).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-i,-a).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(i,a);if(isFinite(e.px)||isFinite(e.py)){const t=new bt(i,a).transform(s),r=isFinite(e.px)?e.px-t.x:0,n=isFinite(e.py)?e.py-t.y:0;s.translateO(r,n)}return s.translateO(e.tx,e.ty),s}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function yt(){if(!yt.nodes){const t=B().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;yt.nodes={svg:t,path:e}}if(!yt.nodes.svg.node.parentNode){const t=O.document.body||O.document.documentElement;yt.nodes.svg.addTo(t)}return yt.nodes}function wt(t){return!(t.width||t.height||t.x||t.y)}q(vt,"Matrix");class kt{constructor(...t){this.init(...t)}addOffset(){return this.x+=O.window.pageXOffset,this.y+=O.window.pageYOffset,new kt(this)}init(t){return t="string"==typeof t?t.split(dt).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return wt(this)}merge(t){const e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),a=Math.max(this.x+this.width,t.x+t.width)-e,s=Math.max(this.y+this.height,t.y+t.height)-i;return new kt(e,i,a,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof vt||(t=new vt(t));let e=1/0,i=-1/0,a=1/0,s=-1/0;return[new bt(this.x,this.y),new bt(this.x2,this.y),new bt(this.x,this.y2),new bt(this.x2,this.y2)].forEach((function(r){r=r.transform(t),e=Math.min(e,r.x),i=Math.max(i,r.x),a=Math.min(a,r.y),s=Math.max(s,r.y)})),new kt(e,a,i-e,s-a)}}function At(t,e,i){let a;try{if(a=e(t.node),wt(a)&&((s=t.node)!==O.document&&!(O.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===O.document}).call(O.document.documentElement,s)))throw new Error("Element not in the dom")}catch(e){a=i(t)}var s;return a}A({viewbox:{viewbox(t,e,i,a){return null==t?new kt(this.attr("viewBox")):this.attr("viewBox",new kt(t,e,i,a))},zoom(t,e){let{width:i,height:a}=this.attr(["width","height"]);if((i||a)&&"string"!=typeof i&&"string"!=typeof a||(i=this.node.clientWidth,a=this.node.clientHeight),!i||!a)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const s=this.viewbox(),r=i/s.width,n=a/s.height,o=Math.min(r,n);if(null==t)return o;let l=o/t;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new bt(i/2/r+s.x,a/2/n+s.y);const h=new kt(s).transform(new vt({scale:l,origin:e}));return this.viewbox(h)}}}),q(kt,"Box");class Ct extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}Q([Ct],{each(t,...e){return"function"==typeof t?this.map(((e,i,a)=>t.call(e,e,i,a))):this.map((i=>i[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const St=["toArray","constructor","each"];function Lt(t,e){return new Ct(L((e||O.document).querySelectorAll(t),(function(t){return V(t)})))}Ct.extend=function(t){t=t.reduce(((t,e)=>(St.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),Q([Ct],t)};let Mt=0;const Pt={};function It(t){let e=t.getEventHolder();return e===O.window&&(e=Pt),e.events||(e.events={}),e.events}function Tt(t){return t.getEventTarget()}function zt(t,e,i,a,s){const r=i.bind(a||t),n=B(t),o=It(n),l=Tt(n);e=Array.isArray(e)?e:e.split(dt),i._svgjsListenerId||(i._svgjsListenerId=++Mt),e.forEach((function(t){const e=t.split(".")[0],a=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][a]=o[e][a]||{},o[e][a][i._svgjsListenerId]=r,l.addEventListener(e,r,s||!1)}))}function Xt(t,e,i,a){const s=B(t),r=It(s),n=Tt(s);("function"!=typeof i||(i=i._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(dt)).forEach((function(t){const e=t&&t.split(".")[0],o=t&&t.split(".")[1];let l,h;if(i)r[e]&&r[e][o||"*"]&&(n.removeEventListener(e,r[e][o||"*"][i],a||!1),delete r[e][o||"*"][i]);else if(e&&o){if(r[e]&&r[e][o]){for(h in r[e][o])Xt(n,[e,o].join("."),h);delete r[e][o]}}else if(o)for(t in r)for(l in r[t])o===l&&Xt(n,[t,o].join("."));else if(e){if(r[e]){for(l in r[e])Xt(n,[e,l].join("."));delete r[e]}}else{for(t in r)Xt(n,t);!function(t){let e=t.getEventHolder();e===O.window&&(e=Pt),e.events&&(e.events={})}(s)}}))}class Rt extends D{addEventListener(){}dispatch(t,e,i){return function(t,e,i,a){const s=Tt(t);return e instanceof O.window.Event||(e=new O.window.CustomEvent(e,{detail:i,cancelable:!0,...a})),s.dispatchEvent(e),e}(this,t,e,i)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const i=e[t.type];for(const e in i)for(const a in i[e])i[e][a](t);return!t.defaultPrevented}fire(t,e,i){return this.dispatch(t,e,i),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,i){return Xt(this,t,e,i),this}on(t,e,i,a){return zt(this,t,e,i,a),this}removeEventListener(){}}function Et(){}q(Rt,"EventTarget");const Yt=400,Ht=">",Ot=0,Ft={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Dt extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(dt).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class _t{constructor(...t){this.init(...t)}convert(t){return new _t(this.value,t)}divide(t){return t=new _t(t),new _t(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(tt))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof _t&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new _t(t),new _t(this-t,this.unit||t.unit)}plus(t){return t=new _t(t),new _t(this+t,this.unit||t.unit)}times(t){return t=new _t(t),new _t(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Nt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Wt=[];class Bt extends Rt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=B(t)).removeNamespace&&this.node instanceof O.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return B(t).put(this,e)}children(){return new Ct(L(this.node.children,(function(t){return V(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let i=this.node.cloneNode(t);return e&&(i=J(i)),new this.constructor(i)}each(t,e){const i=this.children();let a,s;for(a=0,s=i.length;a=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=$(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return V(this.node.lastChild)}matches(t){const e=this.node,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return i&&i.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=V(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=V(e.node.parentNode));return e}put(t,e){return t=B(t),this.add(t,e),t}putIn(t,e){return B(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=B(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const i=10**t,a=this.attr(e);for(const t in a)"number"==typeof a[t]&&(a[t]=Math.round(a[t]*i)/i);return this.attr(a),this}svg(t,e){return this.xml(t,e,E)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const i=e.index(this);return e.put(t,i).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let i=this;if(null!=t){if(i=V(i.node.cloneNode(!0)),e){const e=t(i);if(i=e||i,!1===e)return""}i.each((function(){const e=t(this),i=e||this;!1===e?this.remove():e&&this!==i&&this.replace(i)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;const a=W("wrapper",i),s=O.document.createDocumentFragment();a.innerHTML=t;for(let t=a.children.length;t--;)s.appendChild(a.firstElementChild);const r=this.parent();return e?this.replace(s)&&r:this.add(s)}}Q(Bt,{attr:function(t,e,i){if(null==t){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=ht.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ft[t]:ht.test(e)?parseFloat(e):e;"number"==typeof(e=Wt.reduce(((e,i)=>i(t,e,this)),e))?e=new _t(e):Nt.has(t)&&xt.isColor(e)?e=new xt(e):e.constructor===Array&&(e=new Dt(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return Lt(t,this.node)},findOne:function(t){return V(this.node.querySelector(t))}}),q(Bt,"Dom");class Gt extends Bt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new _t(t).plus(this.x()))}dy(t=0){return this.y(new _t(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=B(t));const i=new Ct;let a=this;for(;(a=a.parent())&&a.node!==O.document&&"#document-fragment"!==a.nodeName&&(i.push(a),e||a.node!==t.node)&&(!e||!a.matches(t));)if(a.node===this.root().node)return null;return i}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(at);return e?B(e[1]):null}root(){const t=this.parent(function(t){return _[t]}(N));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const i=I(this,t,e);return this.width(new _t(i.width)).height(new _t(i.height))}width(t){return this.attr("width",t)}writeDataToDom(){return R(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}Q(Gt,{bbox:function(){const t=At(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(yt().svg).show(),i=e.node.getBBox();return e.remove(),i}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new kt(t)},rbox:function(t){const e=At(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),i=new kt(e);return t?i.transform(t.screenCTM().inverseO()):i.addOffset()},inside:function(t,e){const i=this.bbox();return t>i.x&&e>i.y&&t=0;i--)null!=e[jt[t][i]]&&this.attr(jt.prefix(t,jt[t][i]),e[jt[t][i]]);return this},A(["Element","Runner"],e)})),A(["Element","Runner"],{matrix:function(t,e,i,a,s,r){return null==t?new vt(this):this.attr("transform",new vt(t,e,i,a,s,r))},rotate:function(t,e,i){return this.transform({rotate:t,ox:e,oy:i},!0)},skew:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:i},!0):this.transform({skew:[t,e],ox:i,oy:a},!0)},shear:function(t,e,i){return this.transform({shear:t,ox:e,oy:i},!0)},scale:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:i},!0):this.transform({scale:[t,e],ox:i,oy:a},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),A("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new _t(t)):this.rx(t).ry(e)}}),A("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new bt(this.node.getPointAtLength(t))}}),A(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});A("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),A("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){const t=(this.attr("transform")||"").split(st).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(dt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(vt.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new vt);return t},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);const i=this.screenCTM(),a=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(a.multiply(i)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new vt(this).decompose();return null==t?e:e[t]}vt.isMatrixLike(t)||(t={...t,origin:T(t,this)});const i=new vt(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});class Vt extends Gt{flatten(){return this.each((function(){if(this instanceof Vt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(i,a){return a[a.length-i-1].toParent(t,e)})),this.remove()}}q(Vt,"Container");class Ut extends Vt{constructor(t,e=t){super(G("defs",t),e)}flatten(){return this}ungroup(){return this}}q(Ut,"Defs");class qt extends Gt{}function Zt(t){return this.attr("rx",t)}function $t(t){return this.attr("ry",t)}function Jt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Qt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Kt(t){return this.attr("cx",t)}function te(t){return this.attr("cy",t)}function ee(t){return null==t?2*this.rx():this.rx(new _t(t).divide(2))}function ie(t){return null==t?2*this.ry():this.ry(new _t(t).divide(2))}q(qt,"Shape");var ae=Object.freeze({__proto__:null,cx:Kt,cy:te,height:ie,rx:Zt,ry:$t,width:ee,x:Jt,y:Qt});class se extends qt{constructor(t,e=t){super(G("ellipse",t),e)}size(t,e){const i=I(this,t,e);return this.rx(new _t(i.width).divide(2)).ry(new _t(i.height).divide(2))}}Q(se,ae),A("Container",{ellipse:K((function(t=0,e=t){return this.put(new se).size(t,e).move(0,0)}))}),q(se,"Ellipse");class re extends Bt{constructor(t=O.document.createDocumentFragment()){super(t)}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){const t=new Bt(W("wrapper",i));return t.add(this.node.cloneNode(!0)),t.xml(!1,i)}return super.xml(t,!1,i)}}function ne(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new _t(t),fy:new _t(e)}):this.attr({x1:new _t(t),y1:new _t(e)})}function oe(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new _t(t),cy:new _t(e)}):this.attr({x2:new _t(t),y2:new _t(e)})}q(re,"Fragment");var le=Object.freeze({__proto__:null,from:ne,to:oe});class he extends Vt{constructor(t,e){super(G(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,i){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}Q(he,le),A({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:K((function(t,e){return this.put(new he(t)).update(e)}))}}),q(he,"Gradient");class ce extends Vt{constructor(t,e=t){super(G("pattern",t),e)}attr(t,e,i){return"transform"===t&&(t="patternTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}A({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:K((function(t,e,i){return this.put(new ce).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),q(ce,"Pattern");let de=class extends qt{constructor(t,e=t){super(G("image",t),e)}load(t,e){if(!t)return this;const i=new O.window.Image;return zt(i,"load",(function(t){const a=this.parent(ce);0===this.width()&&0===this.height()&&this.size(i.width,i.height),a instanceof ce&&0===a.width()&&0===a.height()&&a.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),zt(i,"load error",(function(){Xt(i)})),this.attr("href",i.src=t,H)}};var ue;ue=function(t,e,i){return"fill"!==t&&"stroke"!==t||ct.test(e)&&(e=i.root().defs().image(e)),e instanceof de&&(e=i.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Wt.push(ue),A({Container:{image:K((function(t,e){return this.put(new de).size(0,0).load(t,e)}))}}),q(de,"Image");class ge extends Dt{bbox(){let t=-1/0,e=-1/0,i=1/0,a=1/0;return this.forEach((function(s){t=Math.max(s[0],t),e=Math.max(s[1],e),i=Math.min(s[0],i),a=Math.min(s[1],a)})),new kt(i,a,t-i,e-a)}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let i=this.length-1;i>=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(dt).map(parseFloat)).length%2!=0&&t.pop();for(let i=0,a=t.length;i=0;i--)a.width&&(this[i][0]=(this[i][0]-a.x)*t/a.width+a.x),a.height&&(this[i][1]=(this[i][1]-a.y)*e/a.height+a.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,i=this.length;e":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,i,a){return function(s){return s<0?t>0?e/t*s:i>0?a/i*s:0:s>1?i<1?(1-a)/(1-i)*s+(a-i)/(1-i):t<1?(1-e)/(1-t)*s+(e-t)/(1-t):1:3*s*(1-s)**2*e+3*s**2*(1-s)*a+s**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let i=t;return"none"===e?--i:"both"===e&&++i,(a,s=!1)=>{let r=Math.floor(a*t);const n=a*r%1==0;return"start"!==e&&"both"!==e||++r,s&&n&&--r,a>=0&&r<0&&(r=0),a<=1&&r>i&&(r=i),r/i}}};class ye{done(){return!1}}class we extends ye{constructor(t=Ht){super(),this.ease=ve[t]||t}step(t,e,i){return"number"!=typeof t?i<1?t:e:t+(e-t)*this.ease(i)}}class ke extends ye{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,i,a){return this.stepper(t,e,i,a)}}function Ae(){const t=(this._duration||500)/1e3,e=this._overshoot||0,i=Math.PI,a=Math.log(e/100+1e-10),s=-a/Math.sqrt(i*i+a*a),r=3.9/(s*t);this.d=2*s*r,this.k=r*r}Q(class extends ke{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;i>100&&(i=16),i/=1e3;const s=a.velocity||0,r=-this.d*s-this.k*(t-e),n=t+s*i+r*i*i/2;return a.velocity=s+r*i,a.done=Math.abs(e-n)+Math.abs(s)<.002,a.done?e:n}},{duration:me("_duration",Ae),overshoot:me("_overshoot",Ae)});Q(class extends ke{constructor(t=.1,e=.01,i=0,a=1e3){super(),this.p(t).i(e).d(i).windup(a)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;const s=e-t;let r=(a.integral||0)+s*i;const n=(s-(a.error||0))/i,o=this._windup;return!1!==o&&(r=Math.max(-o,Math.min(r,o))),a.error=s,a.integral=r,a.done=Math.abs(s)<.001,a.done?e:t+(this.P*s+this.I*r+this.D*n)}},{windup:me("_windup"),p:me("P"),i:me("I"),d:me("D")});const Ce={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Se={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Le="mlhvqtcsaz".split("");for(let t=0,e=Le.length;t=0;a--)i=this[a][0],"M"===i||"L"===i||"T"===i?(this[a][1]+=t,this[a][2]+=e):"H"===i?this[a][1]+=t:"V"===i?this[a][1]+=e:"C"===i||"S"===i||"Q"===i?(this[a][1]+=t,this[a][2]+=e,this[a][3]+=t,this[a][4]+=e,"C"===i&&(this[a][5]+=t,this[a][6]+=e)):"A"===i&&(this[a][6]+=t,this[a][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let i=0,a="";const s={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new bt,p:new bt};for(;s.lastToken=a,a=t.charAt(i++);)if(s.inSegment||!Pe(s,a))if("."!==a)if(isNaN(parseInt(a)))if(Re.has(a))s.inNumber&&Ie(s,!1);else if("-"!==a&&"+"!==a)if("E"!==a.toUpperCase()){if(ut.test(a)){if(s.inNumber)Ie(s,!1);else{if(!Me(s))throw new Error("parser Error");Te(s)}--i}}else s.number+=a,s.hasExponent=!0;else{if(s.inNumber&&!Xe(s)){Ie(s,!1),--i;continue}s.number+=a,s.inNumber=!0}else{if("0"===s.number||ze(s)){s.inNumber=!0,s.number=a,Ie(s,!0);continue}s.inNumber=!0,s.number+=a}else{if(s.pointSeen||s.hasExponent){Ie(s,!1),--i;continue}s.inNumber=!0,s.pointSeen=!0,s.number+=a}return s.inNumber&&Ie(s,!1),s.inSegment&&Me(s)&&Te(s),s.segments}(t)}size(t,e){const i=this.bbox();let a,s;for(i.width=0===i.width?1:i.width,i.height=0===i.height?1:i.height,a=this.length-1;a>=0;a--)s=this[a][0],"M"===s||"L"===s||"T"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y):"H"===s?this[a][1]=(this[a][1]-i.x)*t/i.width+i.x:"V"===s?this[a][1]=(this[a][1]-i.y)*e/i.height+i.y:"C"===s||"S"===s||"Q"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y,this[a][3]=(this[a][3]-i.x)*t/i.width+i.x,this[a][4]=(this[a][4]-i.y)*e/i.height+i.y,"C"===s&&(this[a][5]=(this[a][5]-i.x)*t/i.width+i.x,this[a][6]=(this[a][6]-i.y)*e/i.height+i.y)):"A"===s&&(this[a][1]=this[a][1]*t/i.width,this[a][2]=this[a][2]*e/i.height,this[a][6]=(this[a][6]-i.x)*t/i.width+i.x,this[a][7]=(this[a][7]-i.y)*e/i.height+i.y);return this}toString(){return function(t){let e="";for(let i=0,a=t.length;i{const e=typeof t;return"number"===e?_t:"string"===e?xt.isColor(t)?xt:dt.test(t)?ut.test(t)?Ee:Dt:tt.test(t)?_t:Oe:Ne.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Dt:"object"===e?_e:Oe};class He{constructor(t){this._stepper=t||new we("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Ye(t));let e=new this._type(t);return this._type===xt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===_e&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Oe{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Fe{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Fe.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Fe.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const De=(t,e)=>t[0]e[0]?1:0;class _e{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let i=0,a=e.length;it.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const i=e.shift(),a=e.shift(),s=e.shift(),r=e.splice(0,s);t[i]=new a(r)}return t}}const Ne=[Oe,Fe,_e];class We extends qt{constructor(t,e=t){super(G("path",t),e)}array(){return this._array||(this._array=new Ee(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Ee(t))}size(t,e){const i=I(this,t,e);return this.attr("d",this.array().size(i.width,i.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}We.prototype.MorphArray=Ee,A({Container:{path:K((function(t){return this.put(new We).plot(t||new Ee)}))}}),q(We,"Path");var Be=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new ge(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new ge(t))},size:function(t,e){const i=I(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}});class Ge extends qt{constructor(t,e=t){super(G("polygon",t),e)}}A({Container:{polygon:K((function(t){return this.put(new Ge).plot(t||new ge)}))}}),Q(Ge,fe),Q(Ge,Be),q(Ge,"Polygon");class je extends qt{constructor(t,e=t){super(G("polyline",t),e)}}A({Container:{polyline:K((function(t){return this.put(new je).plot(t||new ge)}))}}),Q(je,fe),Q(je,Be),q(je,"Polyline");class Ve extends qt{constructor(t,e=t){super(G("rect",t),e)}}Q(Ve,{rx:Zt,ry:$t}),A({Container:{rect:K((function(t,e){return this.put(new Ve).size(t,e)}))}}),q(Ve,"Rect");class Ue{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const qe={nextDraw:null,frames:new Ue,timeouts:new Ue,immediates:new Ue,timer:()=>O.window.performance||O.window.Date,transforms:[],frame(t){const e=qe.frames.push({run:t});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},timeout(t,e){e=e||0;const i=qe.timer().now()+e,a=qe.timeouts.push({run:t,time:i});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),a},immediate(t){const e=qe.immediates.push(t);return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},cancelFrame(t){null!=t&&qe.frames.remove(t)},clearTimeout(t){null!=t&&qe.timeouts.remove(t)},cancelImmediate(t){null!=t&&qe.immediates.remove(t)},_draw(t){let e=null;const i=qe.timeouts.last();for(;(e=qe.timeouts.shift())&&(t>=e.time?e.run():qe.timeouts.push(e),e!==i););let a=null;const s=qe.frames.last();for(;a!==s&&(a=qe.frames.shift());)a.run(t);let r=null;for(;r=qe.immediates.shift();)r();qe.nextDraw=qe.timeouts.first()||qe.frames.first()?O.window.requestAnimationFrame(qe._draw):null}},Ze=function(t){const e=t.start,i=t.runner.duration();return{start:e,duration:i,end:e+i,runner:t.runner}},$e=function(){const t=O.window;return(t.performance||t.Date).now()};class Je extends Rt{constructor(t=$e){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const i=Math.abs(e);return this.speed(t?-i:i)}schedule(t,e,i){if(null==t)return this._runners.map(Ze);let a=0;const s=this.getEndTime();if(e=e||0,null==i||"last"===i||"after"===i)a=s;else if("absolute"===i||"start"===i)a=e,e=0;else if("now"===i)a=this._time;else if("relative"===i){const i=this.getRunnerInfoById(t.id);i&&(a=i.start+e,e=0)}else{if("with-last"!==i)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();a=t?t.start:this._time}}t.unschedule(),t.timeline(this);const r=t.persist(),n={persist:null===r?this._persist:r,start:a+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(n),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return qe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let i=e-this._lastSourceTime;t&&(i=0);const a=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=a,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],i=e.runner;this._time-e.start<=0&&i.reset()}let s=!1;for(let t=0,e=this._runners.length;t0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}A({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Je,this._timeline):(this._timeline=t,this)}}});class Qe extends Rt{constructor(t){super(),this.id=Qe.id++,t="function"==typeof(t=null==t?Yt:t)?new ke(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ke,this._stepper=this._isDeclarative?t:new we,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new vt,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,i){let a=1,s=!1,r=0;return e=e??Ot,i=i||"last","object"!=typeof(t=t??Yt)||t instanceof ye||(e=t.delay??e,i=t.when??i,s=t.swing||s,a=t.times??a,r=t.wait??r,t=t.duration??Yt),{duration:t,delay:e,swing:s,times:a,wait:r,when:i}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,i){const a=Qe.sanitise(t,e,i),s=new Qe(a.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(a).schedule(a.delay,a.when)}clearTransform(){return this.transforms=new vt,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new we(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,i){return"object"==typeof t&&(e=t.swing,i=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=i||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),i=(this._time-t*e)/this._duration;return Math.min(t+i,this._times)}const i=t%1,a=e*Math.floor(t)+this._duration*i;return this.time(a)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,i=this._duration,a=this._wait,s=this._times,r=this._swing,n=this._reverse;let o;if(null==t){const t=function(t){const e=r*Math.floor(t%(2*(a+i))/(a+i)),s=e&&!n||!e&&n,o=Math.pow(-1,s)*(t%(a+i))/i+s;return Math.max(Math.min(o,1),0)},l=s*(a+i)-a;return o=e<=0?Math.round(t(1e-5)):e=0;this._lastPosition=e;const a=this.duration(),s=this._lastTime<=0&&this._time>0,r=this._lastTime=a;this._lastTime=this._time,s&&this.fire("start",this);const n=this._isDeclarative;this.done=!n&&!r&&this._time>=a,this._reseted=!1;let o=!1;return(i||n)&&(this._initialise(i),this.transforms=new vt,o=this._run(n?t:e),this.fire("step",this)),this.done=this.done||o&&n,r&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,i=this._queue.length;et.lmultiplyO(e),ei=t=>t.transforms;function ii(){const t=this._transformationRunners.runners.map(ei).reduce(ti,new vt);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class ai{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Ke).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const i=this.ids.indexOf(t+1);return this.ids.splice(i,1,t+1),this.runners.splice(i,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;ee.id<=t.id)).map(ei).reduce(ti,new vt)},_addRunner(t){this._transformationRunners.add(t),qe.cancelImmediate(this._frameId),this._frameId=qe.immediate(ii.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new ai).add(new Ke(new vt(this))))}}});Q(Qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,i){if("string"==typeof e)return this.styleAttr(t,{[e]:i});let a=e;if(this._tryRetarget(t,a))return this;let s=new He(this._stepper).to(a),r=Object.keys(a);return this.queue((function(){s=s.from(this.element()[t](r))}),(function(e){return this.element()[t](s.at(e).valueOf()),s.done()}),(function(e){const i=Object.keys(e),n=(o=r,i.filter((t=>!o.includes(t))));var o;if(n.length){const e=this.element()[t](n),i=new _e(s.from()).valueOf();Object.assign(i,e),s.from(i)}const l=new _e(s.to()).valueOf();Object.assign(l,e),s.to(l),r=i,a=e})),this._rememberMorpher(t,s),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let i=new He(this._stepper).to(new _t(t));return this.queue((function(){i=i.from(this.element().zoom())}),(function(t){return this.element().zoom(i.at(t),e),i.done()}),(function(t,a){e=a,i.to(t)})),this._rememberMorpher("zoom",i),this},transform(t,e,i){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const a=vt.isMatrixLike(t);i=null!=t.affine?t.affine:null!=i?i:!a;const s=new He(this._stepper).type(i?Fe:vt);let r,n,o,l,h;return this.queue((function(){n=n||this.element(),r=r||T(t,n),h=new vt(e?void 0:n),n._addRunner(this),e||n._clearTransformRunnersBefore(this)}),(function(c){e||this.clearTransform();const{x:d,y:u}=new bt(r).transform(n._currentTransform(this));let g=new vt({...t,origin:[d,u]}),p=this._isDeclarative&&o?o:h;if(i){g=g.decompose(d,u),p=p.decompose(d,u);const t=g.rotate,e=p.rotate,i=[t-360,t,t+360],a=i.map((t=>Math.abs(t-e))),s=Math.min(...a),r=a.indexOf(s);g.rotate=i[r]}e&&(a||(g.rotate=t.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),s.from(p),s.to(g);const f=s.at(c);return l=f.rotate,o=new vt(f),this.addTransform(o),n._addRunner(this),s.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(r=T(e,n)),t={...e,origin:r}}),!0),this._isDeclarative&&this._rememberMorpher("transform",s),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new _t(e),this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);let a=null;return this.queue((function(){a=this.element()[t](),i.from(a),i.to(a+e)}),(function(e){return this.element()[t](i.at(e)),i.done()}),(function(t){i.to(a+new _t(t))})),this._rememberMorpher(t,i),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);return this.queue((function(){i.from(this.element()[t]())}),(function(e){return this.element()[t](i.at(e)),i.done()})),this._rememberMorpher(t,i),this},_queueNumber(t,e){return this._queueObject(t,new _t(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let i;return t&&e||(i=this._element.bbox()),t||(t=i.width/i.height*e),e||(e=i.height/i.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,i,a){if(4===arguments.length)return this.plot([t,e,i,a]);if(this._tryRetarget("plot",t))return this;const s=new He(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){s.from(this._element.array())}),(function(t){return this._element.plot(s.at(t)),s.done()})),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,i,a){return this._queueObject("viewbox",new kt(t,e,i,a))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Q(Qe,{rx:Zt,ry:$t,from:ne,to:oe}),q(Qe,"Runner");class si extends Vt{constructor(t,e=t){super(G("svg",t),e),this.namespace()}defs(){return this.isRoot()?V(this.node.querySelector("defs"))||this.put(new Ut):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof O.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:E,version:"1.1"}).attr("xmlns:xlink",H,Y):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Y).attr("xmlns:svgjs",null,Y)}root(){return this.isRoot()?this:super.root()}}A({Container:{nested:K((function(){return this.put(new si)}))}}),q(si,"Svg",!0);let ri=class extends Vt{constructor(t,e=t){super(G("symbol",t),e)}};A({Container:{symbol:K((function(){return this.put(new ri)}))}}),q(ri,"Symbol");var ni=Object.freeze({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,i=this.bbox()){return this.cx(t,i).cy(e,i)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,i=this.bbox()){return this.x(t,i).y(e,i)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(O.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}});class oi extends qt{constructor(t,e=t){super(G("text",t),e),this.dom.leading=this.dom.leading??new _t(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new _t(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const i=this.dom.leading;this.each((function(a){if(X(this.node))return;const s=O.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=i*new _t(s);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=r:(this.attr("dy",a?r+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new _t(t.leading||1.3),this}writeDataToDom(){return R(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let i=0;t="";for(let a=0,s=e.length;a{let a;try{a=i.node instanceof F().SVGSVGElement?new kt(i.attr(["x","y","width","height"])):i.bbox()}catch(t){return}const s=new vt(i),r=s.translate(t,e).transform(s.inverse()),n=new bt(a.x,a.y).transform(r);i.move(n.x,n.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,i=this.bbox()){const a=t-i.x,s=e-i.y;return this.dmove(a,s)},size:function(t,e,i=this.bbox()){const a=I(this,t,e,i),s=a.width/i.width,r=a.height/i.height;return this.children().forEach((t=>{const e=new bt(i).transform(new vt(t).inverse());t.scale(s,r,e.x,e.y)})),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}});class gi extends Vt{constructor(t,e=t){super(G("g",t),e)}}Q(gi,ui),A({Container:{group:K((function(){return this.put(new gi)}))}}),q(gi,"G");class pi extends Vt{constructor(t,e=t){super(G("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,H)}}Q(pi,ui),A({Container:{link:K((function(t){return this.put(new pi).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const i=e.index(t);return e.add(this,i),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new pi,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),q(pi,"A");class fi extends Vt{constructor(t,e=t){super(G("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Lt("svg [mask*="+this.id()+"]")}}A({Container:{mask:K((function(){return this.defs().put(new fi)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof fi?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),q(fi,"Mask");class xi extends Gt{constructor(t,e=t){super(G("stop",t),e)}update(t){return("number"==typeof t||t instanceof _t)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new _t(t.offset)),this}}A({Gradient:{stop:function(t,e,i){return this.put(new xi).update(t,e,i)}}}),q(xi,"Stop");class bi extends Gt{constructor(t,e=t){super(G("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,i={}){return this.rule("@font-face",{fontFamily:t,src:e,...i})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let i=t+"{";for(const t in e)i+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return i+="}",i}(t,e))}}A("Dom",{style(t,e){return this.put(new bi).rule(t,e)},fontface(t,e,i){return this.put(new bi).font(t,e,i)}}),q(bi,"Style");class mi extends oi{constructor(t,e=t){super(G("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let i=null;return e&&(i=e.plot(t)),null==t?i:this}track(){return this.reference("href")}}A({Container:{textPath:K((function(t,e){return t instanceof oi||(t=this.text(t)),t.path(e)}))},Text:{path:K((function(t,e=!0){const i=new mi;let a;if(t instanceof We||(t=this.defs().path(t)),i.attr("href","#"+t,H),e)for(;a=this.node.firstChild;)i.node.appendChild(a);return this.put(i)})),textPath(){return this.findOne("textPath")}},Path:{text:K((function(t){return t instanceof oi||(t=(new oi).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Lt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),mi.prototype.MorphArray=Ee,q(mi,"TextPath");class vi extends qt{constructor(t,e=t){super(G("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,H)}}A({Container:{use:K((function(t,e){return this.put(new vi).use(t,e)}))}}),q(vi,"Use");const yi=B;Q([si,ri,de,ce,be],C("viewbox")),Q([xe,je,Ge,We],C("marker")),Q(oi,C("Text")),Q(We,C("Path")),Q(Ut,C("Defs")),Q([oi,li],C("Tspan")),Q([Ve,se,he,Qe],C("radius")),Q(Rt,C("EventTarget")),Q(Bt,C("Dom")),Q(Gt,C("Element")),Q(qt,C("Shape")),Q([Vt,re],C("Container")),Q(he,C("Gradient")),Q(Qe,C("Runner")),Ct.extend([...new Set(k)]),function(t=[]){Ne.push(...[].concat(t))}([_t,xt,kt,vt,Dt,ge,Ee,bt]),Q(Ne,{to(t){return(new He).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,i,a,s){return this.fromArray(t.map((function(t,r){return a.step(t,e[r],i,s[r],s)})))}});class wi extends Gt{constructor(t){super(G("filter",t),t),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(t,e){return!(t=super.put(t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return Lt('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class ki extends Gt{constructor(t,e){super(t,e),this.result(this.id())}in(t){if(null==t){const t=this.attr("in");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in",t)}result(t){return this.attr("result",t)}toString(){return this.result()}}const Ai=t=>function(...e){for(let i=t.length;i--;)null!=e[i]&&this.attr(t[i],e[i])},Ci={blend:Ai(["in","in2","mode"]),colorMatrix:Ai(["type","values"]),composite:Ai(["in","in2","operator"]),convolveMatrix:function(t){t=new Dt(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Ai(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Ai(["in","dx","dy","stdDeviation"]),flood:Ai(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,H)},morphology:Ai(["operator","radius"]),offset:Ai(["dx","dy"]),specularLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Ai([]),turbulence:Ai(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((t=>{const e=P(t),i=Ci[t];wi[e+"Effect"]=class extends ki{constructor(t){super(G("fe"+e,t),t)}update(t){return i.apply(this,t),this}},wi.prototype[t]=K((function(t,...i){const a=new wi[e+"Effect"];return null==t?this.put(a):("function"==typeof t?t.call(a,a):i.unshift(t),this.put(a).update(i))}))})),Q(wi,{merge(t){const e=this.put(new wi.MergeEffect);if("function"==typeof t)return t.call(e,e),e;return(t instanceof Array?t:[...arguments]).forEach((t=>{t instanceof wi.MergeNode?e.put(t):e.mergeNode(t)})),e},componentTransfer(t={}){const e=this.put(new wi.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;if(!(t.r||t.g||t.b||t.a)){t={r:t,g:t,b:t,a:t}}for(const i in t)e.add(new(wi["Func"+i.toUpperCase()])(t[i]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((t=>{const e=P(t);wi[e]=class extends ki{constructor(t){super(G("fe"+e,t),t)}}}));["funcR","funcG","funcB","funcA"].forEach((function(t){const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.ComponentTransferEffect.prototype[t]=i}));["distantLight","pointLight","spotLight"].forEach((t=>{const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.DiffuseLightingEffect.prototype[t]=i,wi.SpecularLightingEffect.prototype[t]=i})),Q(wi.MergeEffect,{mergeNode(t){return this.put(new wi.MergeNode).attr("in",t)}}),Q(Ut,{filter:function(t){const e=this.put(new wi);return"function"==typeof t&&t.call(e,e),e}}),Q(Vt,{filter:function(t){return this.defs().filter(t)}}),Q(Gt,{filterWith:function(t){const e=t instanceof wi?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const Si={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,i,a){return this.parent()&&this.parent().diffuseLighting(t,i,a).in(this)},displacementMap:function(t,e,i,a){return this.parent()&&this.parent().displacementMap(this,t,e,i,a)},dropShadow:function(t,e,i){return this.parent()&&this.parent().dropShadow(this,t,e,i).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){return t=t instanceof Array?t:[...t],this.parent()&&this.parent().merge(this,...t)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,i,a,s){return this.parent()&&this.parent().specularLighting(t,i,a,s).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,a,s){return this.parent()&&this.parent().turbulence(t,e,i,a,s).in(this)}};Q(ki,Si),Q(wi.MergeEffect,{in:function(t){return t instanceof wi.MergeNode?this.add(t,0):this.add((new wi.MergeNode).in(t),0),this}}),Q([wi.CompositeEffect,wi.BlendEffect,wi.DisplacementMapEffect],{in2:function(t){if(null==t){const t=this.attr("in2");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in2",t)}}),wi.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var Li=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getDefaultFilter",value:function(t,e){var i=this.w;t.unfilter(!0),(new wi).size("120%","180%","-5%","-40%"),i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"applyFilter",value:function(t,e,i){var a,s=this,r=this.w;if(t.unfilter(!0),"none"!==i){var n,o,l=r.config.chart.dropShadow,h="lighten"===i?2:.3;if(t.filterWith((function(t){t.colorMatrix({type:"matrix",values:"\n ".concat(h," 0 0 0 0\n 0 ").concat(h," 0 0 0\n 0 0 ").concat(h," 0 0\n 0 0 0 1 0\n "),in:"SourceGraphic",result:"brightness"}),l.enabled&&s.addShadow(t,e,l,"brightness")})),!l.noUserSpaceOnUse)null===(n=t.filterer())||void 0===n||null===(o=n.node)||void 0===o||o.setAttribute("filterUnits","userSpaceOnUse");this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node)}else this.getDefaultFilter(t,e)}},{key:"addShadow",value:function(t,e,i,a){var s,r=this.w,n=i.blur,o=i.top,l=i.left,h=i.color,c=i.opacity;if(h=Array.isArray(h)?h[e]:h,(null===(s=r.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:a,dx:l,dy:o,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:n,result:"blur"}),t.flood({"flood-color":h,"flood-opacity":c,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",a])}},{key:"dropShadow",value:function(t,e){var i,a,s,r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.w;if(t.unfilter(!0),v.isMsEdge()&&"radialBar"===o.config.chart.type)return t;if((null===(i=o.config.chart.dropShadow.enabledOnSeries)||void 0===i?void 0:i.length)>0&&-1===(null===(s=o.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.indexOf(n)))return t;return t.filterWith((function(t){r.addShadow(t,n,e,"SourceGraphic")})),e.noUserSpaceOnUse||t.filterer().node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node),t}},{key:"setSelectionFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;"none"!==s&&this.applyFilter(t,e,s.type)}}},{key:"_scaleFilterSize",value:function(t){if(t){!function(e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}}]),t}(),Mi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"roundPathCorners",value:function(t,e){function i(t,e,i){var s=e.x-t.x,r=e.y-t.y,n=Math.sqrt(s*s+r*r);return a(t,e,Math.min(1,i/n))}function a(t,e,i){return{x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}}function s(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function r(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var n=t.split(/[,\s]/).reduce((function(t,e){var i=e.match("([a-zA-Z])(.+)");return i?(t.push(i[1]),t.push(i[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),o=[];if(n.length>1){var l=r(n[0]),h=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(h=["L",l.x,l.y],n[n.length-1]=h),o.push(n[0]);for(var c=1;c2&&"L"==u[0]&&g.length>2&&"L"==g[0]){var p,f,x=r(d),b=r(u),m=r(g);p=i(b,x,e),f=i(b,m,e),s(u,p),u.origPoint=b,o.push(u);var v=a(p,b,.5),y=a(b,f,.5),w=["C",v.x,v.y,y.x,y.y,f.x,f.y];w.origPoint=b,o.push(w)}else o.push(u)}if(h){var k=r(o[o.length-1]);o.push(["Z"]),s(o[0],k)}}else o=n;return o.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":n,"stroke-linecap":o})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,c=this.w.globals.dom.Paper.rect();return c.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":h}),c.node.setAttribute("fill",r),c}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:a,stroke:e,"stroke-width":i})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var i=this.w.globals.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,s=void 0===a?"#a8a8a8":a,r=t.strokeWidth,n=void 0===r?1:r,o=t.fill,l=t.fillOpacity,h=void 0===l?1:l,c=t.strokeOpacity,d=void 0===c?1:c,u=t.classes,g=t.strokeLinecap,p=void 0===g?null:g,f=t.strokeDashArray,x=void 0===f?0:f,b=this.w;return null===p&&(p=b.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(b.globals.gridHeight)),b.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":h,stroke:s,"stroke-opacity":d,"stroke-linecap":p,"stroke-width":n,"stroke-dasharray":x,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){var i=["M",t,e].join(" ");return i}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=[" L",t,e].join(" "):"H"===i?a=[" H",t].join(" "):"V"===i&&(a=[" V",e].join(" ")),a}},{key:"curve",value:function(t,e,i,a,s,r){var n=["C",t,e,i,a,s,r].join(" ");return n}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,s,r,n){var o="A";arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(o="a");var l=[o,t,e,i,a,s,r,n].join(" ");return l}},{key:"renderPaths",value:function(t){var e,i=t.j,a=t.realIndex,s=t.pathFrom,r=t.pathTo,n=t.stroke,o=t.strokeWidth,l=t.strokeLinecap,h=t.fill,c=t.animationDelay,d=t.initialSpeed,g=t.dataChangeSpeed,p=t.className,f=t.chartType,x=t.shouldClipToGrid,b=void 0===x||x,m=t.bindEventsOnPaths,v=void 0===m||m,w=t.drawShadow,k=void 0===w||w,A=this.w,C=new Li(this.ctx),S=new y(this.ctx),L=this.w.config.chart.animations.enabled,M=L&&this.w.config.chart.animations.dynamicAnimation.enabled,P=!!(L&&!A.globals.resized||M&&A.globals.dataChanged&&A.globals.shouldAnimate);P?e=s:(e=r,A.globals.animationEnded=!0);var I=A.config.stroke.dashArray,T=0;T=Array.isArray(I)?I[a]:A.config.stroke.dashArray;var z=this.drawPath({d:e,stroke:n,strokeWidth:o,fill:h,fillOpacity:1,classes:p,strokeLinecap:l,strokeDashArray:T});z.attr("index",a),b&&("bar"===f&&!A.globals.isHorizontal||A.globals.comboCharts?z.attr({"clip-path":"url(#gridRectBarMask".concat(A.globals.cuid,")")}):z.attr({"clip-path":"url(#gridRectMask".concat(A.globals.cuid,")")})),A.config.chart.dropShadow.enabled&&k&&C.dropShadow(z,A.config.chart.dropShadow,a),v&&(z.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,z)),z.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,z)),z.node.addEventListener("mousedown",this.pathMouseDown.bind(this,z))),z.attr({pathTo:r,pathFrom:s});var X={el:z,j:i,realIndex:a,pathFrom:s,pathTo:r,fill:h,strokeWidth:o,delay:c};return!L||A.globals.resized||A.globals.dataChanged?!A.globals.resized&&A.globals.dataChanged||S.showDelayedElements():S.animatePathsGradually(u(u({},X),{},{speed:d})),A.globals.dataChanged&&M&&P&&S.animatePathsGradually(u(u({},X),{},{speed:g})),z}},{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,i,(function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:a,width:s+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:a,width:s}):"squares"===t?r.rect(e,i).fill("none").stroke({color:a,width:s}):"circles"===t&&r.circle(e).fill("none").stroke({color:a,width:s})}))}},{key:"drawGradient",value:function(t,e,i,a,s){var r,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,c=this.w;e.length<9&&0===e.indexOf("#")&&(e=v.hexToRgba(e,a)),i.length<9&&0===i.indexOf("#")&&(i=v.hexToRgba(i,s));var d=0,u=1,g=1,p=null;null!==o&&(d=void 0!==o[0]?o[0]/100:0,u=void 0!==o[1]?o[1]/100:1,g=void 0!==o[2]?o[2]/100:1,p=void 0!==o[3]?o[3]/100:null);var f=!("donut"!==c.config.chart.type&&"pie"!==c.config.chart.type&&"polarArea"!==c.config.chart.type&&"bubble"!==c.config.chart.type);if(r=l&&0!==l.length?c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){(Array.isArray(l[h])?l[h]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){t.stop(d,e,a),t.stop(u,i,s),t.stop(g,i,s),null!==p&&t.stop(p,e,a)})),f){var x=c.globals.gridWidth/2,b=c.globals.gridHeight/2;"bubble"!==c.config.chart.type?r.attr({gradientUnits:"userSpaceOnUse",cx:x,cy:b,r:n}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?r.from(0,0).to(0,1):"diagonal"===t?r.from(0,0).to(1,1):"horizontal"===t?r.from(0,1).to(1,1):"diagonal2"===t&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,i=t.maxWidth,a=t.fontSize,s=t.fontFamily,r=this.getTextRects(e,a,s),n=r.width/e.length,o=Math.floor(i/n);return i-1){var o=i.globals.selectedDataPoints[s].indexOf(r);i.globals.selectedDataPoints[s].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),h=i.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),c=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),a.getDefaultFilter(t,s)}))};c(l),c(h)}t.node.setAttribute("selected","true"),n="true",void 0===i.globals.selectedDataPoints[s]&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(r)}if("true"===n){var d=i.config.states.active.filter;if("none"!==d)a.applyFilter(t,s,d.type);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}}else if("none"!==i.config.states.active.filter.type)if("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice)a.getDefaultFilter(t,s);else{u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,a){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w,n=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),r.globals.dom.Paper.add(n);var o=n.bbox();return s||(o=n.node.getBoundingClientRect()),n.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i/1.1)return void(t.textContent=e.substring(0,a)+"...");t.textContent="."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}(),Pi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getStackedSeriesTotals",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,i=[];if(0===e.globals.series.length)return i;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,i=[];return e.globals.seriesGroups.forEach((function(a){var s=[];e.config.series.forEach((function(t,i){a.indexOf(e.globals.seriesNames[i])>-1&&s.push(i)}));var r=e.globals.series.map((function(t,e){return-1===s.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));i.push(t.getStackedSeriesTotals(r))})),i}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,i=[],a=[],s=[],r=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){s.push(e),a.push(null)})),e.yaxis.forEach((function(t,e){i[e]=[]}));var n=[];e.yaxis.forEach((function(t,a){var o=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,n){if(e.name===t){var l=n;a===n||r?!r||s.indexOf(n)>-1?i[a].push([a,n]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[n].push([n,a]),l=a),o=!0,-1!==(l=s.indexOf(l))&&s.splice(l,1)}}))}))}o||n.push(a)})),i=i.map((function(t,e){var i=[];return t.forEach((function(t){a[t[1]]=t[0],i.push(t[1])})),i}));for(var o=e.yaxis.length-1,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,i){return t===i[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map((function(t,i){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),i}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var i=0;if(Array.isArray(t))for(var a=0;at&&i.globals.seriesX[s][n]0){var g=function(t,e){var i=s.config.yaxis[s.globals.seriesYAxisReverseMap[e]],r=t<0?-1:1;return t=Math.abs(t),i.logarithmic&&(t=a.getBaseLog(i.logBase,t)),-r*t/n[e]};if(r.isMultipleYAxis){l=[];for(var p=0;p0&&e.forEach((function(e){var n=[],o=[];t.i.forEach((function(i,a){s.config.series[i].group===e&&(n.push(t.series[a]),o.push(i))})),n.length>0&&r.push(a.draw(n,i,o))})),r}}],[{key:"checkComboSeries",value:function(t,e){var i=!1,a=0,s=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||a++,void 0!==t.type&&t.type!==e&&s++})),s>0&&(i=!0),{comboBarCount:a,comboCharts:i}}},{key:"extendArrayProps",value:function(t,e,i){var a,s,r,n,o,l;(null!==(a=e)&&void 0!==a&&a.yaxis&&(e=t.extendYAxis(e,i)),null!==(s=e)&&void 0!==s&&s.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(r=e)&&void 0!==r&&null!==(n=r.annotations)&&void 0!==n&&n.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(l=o.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e)));return e}}]),t}(),Ii=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e}return s(t,[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===t.label.orientation){var a=null!==e?e:0,s=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(null!==s){var r=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-r.height+4);var n="top"===t.label.position?r.width:-r.width;s.setAttribute("y",parseFloat(s.getAttribute("y"))+n);var o=this.annoCtx.graphics.rotateAroundCenter(s),l=o.x,h=o.y;s.setAttribute("transform","rotate(-90 ".concat(l," ").concat(h,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=t.getBoundingClientRect(),r=e.label.style.padding,n=r.left,o=r.right,l=r.top,h=r.bottom;if("vertical"===e.label.orientation){var c=[n,o,l,h];l=c[0],h=c[1],n=c[2],o=c[3]}var d=s.left-a.left-n,u=s.top-a.top-l,g=this.annoCtx.graphics.drawRect(d-i.globals.barPadForNumericAxis,u,s.width+n+o,s.height+l+h,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&g.node.classList.add(e.id),g}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,a,s){var r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(a,"']"));if(r){var n=r.parentNode,o=t.addBackgroundToAnno(r,i);o&&(n.insertBefore(o.node,r),i.label.mouseEnter&&o.node.addEventListener("mouseenter",i.label.mouseEnter.bind(t,i)),i.label.mouseLeave&&o.node.addEventListener("mouseleave",i.label.mouseLeave.bind(t,i)),i.label.click&&o.node.addEventListener("click",i.label.click.bind(t,i)))}};e.config.annotations.xaxis.forEach((function(t,e){return i(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return i(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return i(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var i,a=this.w,s="y1"===t?e.y:e.y2,r=!1;if(this.annoCtx.invertAxis){var n=a.config.xaxis.convertedCatToNumeric?a.globals.categoryLabels:a.globals.labels,o=n.indexOf(s),l=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(o+1,")"));i=l?parseFloat(l.getAttribute("y")):(a.globals.gridHeight/n.length-1)*(o+1)-a.globals.barHeight,void 0!==e.seriesIndex&&a.globals.barHeight&&(i-=a.globals.barHeight/2*(a.globals.series.length-1)-a.globals.barHeight*e.seriesIndex)}else{var h,c=a.globals.seriesYAxisMap[e.yAxisIndex][0],d=a.config.yaxis[e.yAxisIndex].logarithmic?new Pi(this.annoCtx.ctx).getLogVal(a.config.yaxis[e.yAxisIndex].logBase,s,c)/a.globals.yLogRatio[c]:(s-a.globals.minYArr[c])/(a.globals.yRange[c]/a.globals.gridHeight);i=a.globals.gridHeight-Math.min(Math.max(d,0),a.globals.gridHeight),r=d>a.globals.gridHeight||d<0,!e.marker||void 0!==e.y&&null!==e.y||(i=0),null!==(h=a.config.yaxis[e.yAxisIndex])&&void 0!==h&&h.reversed&&(i=d)}return"string"==typeof s&&s.includes("px")&&(i=parseFloat(s)),{yP:i,clipped:r}}},{key:"getX1X2",value:function(t,e){var i=this.w,a="x1"===t?e.x:e.x2,s=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,r=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,n=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,o=!1,l=this.annoCtx.inversedReversedAxis?(r-a)/(n/i.globals.gridWidth):(a-s)/(n/i.globals.gridWidth);return"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||i.config.chart.sparkline.enabled||(l=this.getStringX(a)),"string"==typeof a&&a.includes("px")&&(l=parseFloat(a)),null==a&&e.marker&&(l=i.globals.gridWidth),void 0!==e.seriesIndex&&i.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=i.globals.barWidth/2*(i.globals.series.length-1)-i.globals.barWidth*e.seriesIndex),l>i.globals.gridWidth?(l=i.globals.gridWidth,o=!0):l<0&&(l=0,o=!0),{x:l,clipped:o}}},{key:"getStringX",value:function(t){var e=this.w,i=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var a=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),s=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(a+1,")"));return s&&(i=parseFloat(s.getAttribute("x"))),i}}]),t}(),Ti=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addXaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=this.helpers.getX1X2("x1",t),n=r.x,o=r.clipped,l=!0,h=t.label.text,c=t.strokeDashArray;if(v.isNumber(n)){if(null===t.x2||void 0===t.x2){if(!o){var d=this.annoCtx.graphics.drawLine(n+t.offsetX,0+t.offsetY,n+t.offsetX,s.globals.gridHeight+t.offsetY,t.borderColor,c,t.borderWidth);e.appendChild(d.node),t.id&&d.node.classList.add(t.id)}}else{var u=this.helpers.getX1X2("x2",t);if(a=u.x,l=u.clipped,!o||!l){if(a12?u-12:0===u?12:u;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(g))).replace(/(^|[^\\])h/g,"$1"+g);var p=a?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var x=a?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);var b=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var m=u<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));var v=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var y=-t.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){var k=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(k)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var A=(a?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(n[0],"g"),n[A])).replace(new RegExp(o[0],"g"),o[A])).replace(new RegExp(s[0],"g"),s[c])).replace(new RegExp(r[0],"g"),r[c])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var a=this.w;void 0!==a.config.xaxis.min&&(t=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(e=a.config.xaxis.max);var s=this.getDate(t),r=this.getDate(e),n=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=v.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),Xi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return s(t,[{key:"xLabelFormat",value:function(t,e,i,a){var s=this.w;if("datetime"===s.config.xaxis.type&&void 0===s.config.xaxis.labels.formatter&&void 0===s.config.tooltip.x.formatter){var r=new zi(this.ctx);return r.formatDate(r.getDate(e),s.config.tooltip.x.format)}return t(e,i,a)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,i){var a=this.w;if(v.isNumber(t))if(0!==a.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:a.globals.yValueDecimal);else{var s=t.toFixed(0);t=t==s?s:t.toFixed(1)}return t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(v.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(v.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var i=e.globals.maxX-e.globals.minX;return i>0&&i<100?t.toFixed(1):t.toFixed(0)}if(e.globals.isBarHorizontal)if(e.globals.maxY-e.globals.minYArr<4)return t.toFixed(1);return t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,a){void 0!==i.labels.formatter?e.globals.yLabelFormatters[a]=i.labels.formatter:e.globals.yLabelFormatters[a]=function(s){return e.globals.xyCharts?Array.isArray(s)?s.map((function(e){return t.defaultYFormatter(e,i,a)})):t.defaultYFormatter(s,i,a):s}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),Ri=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getLabel",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",n=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,l=void 0===t[a]?"":t[a],h=l,c=o.globals.xLabelFormatter,d=o.config.xaxis.labels.formatter,u=!1,g=new Xi(this.ctx),p=l;n&&(h=g.xLabelFormat(c,l,p,{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o}),void 0!==d&&(h=d(l,t[a],{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o})));var f,x;e.length>0?(f=e[a].unit,x=null,e.forEach((function(t){"month"===t.unit?x="year":"day"===t.unit?x="month":"hour"===t.unit?x="day":"minute"===t.unit&&(x="hour")})),u=x===f,i=e[a].position,h=e[a].value):"datetime"===o.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var b=new Mi(this.ctx),m={};m=o.globals.rotateXLabels&&n?b.getTextRects(h,parseInt(r,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):b.getTextRects(h,parseInt(r,10));var v=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||s.indexOf(h)>=0&&v)&&(h=""),{x:i,text:h,textRect:m,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var a=this.w,s=a.config.xaxis.tickAmount;return"dataPoints"===s&&(s=Math.round(a.globals.gridWidth/120)),s>i||t%Math.round(i/(s+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,a,s){var r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=s[s.length-1];e.xa.length||a.some((function(t){return Array.isArray(t.seriesName)}))?t:i.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,i=e.config.yaxis[t];if(!i.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!i.showForNullSeries){var a=e.globals.seriesYAxisMap[t],s=new Pi(this.ctx);return a.every((function(t){return s.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,i,a,s,r,n){var o=this.w,l=new Mi(this.ctx),h=o.globals.translateY+o.config.yaxis[s].labels.offsetY;if(o.globals.isBarHorizontal?h=0:"heatmap"===o.config.chart.type&&(h+=r/2),a.show&&e>0){!0===o.config.yaxis[s].opposite&&(t+=a.width);for(var c=e;c>=0;c--){var d=l.drawLine(t+i.offsetX-a.width+a.offsetX,h+a.offsetY,t+i.offsetX+a.offsetX,h+a.offsetY,a.color);n.add(d),h+=r}}}}]),t}(),Ei=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx),this.axesUtils=new Ri(this.annoCtx)}return s(t,[{key:"addYaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=t.strokeDashArray,n=this.helpers.getY1Y2("y1",t),o=n.yP,l=n.clipped,h=!0,c=!1,d=t.label.text;if(null===t.y2||void 0===t.y2){if(!l){c=!0;var u=this.annoCtx.graphics.drawLine(0+t.offsetX,o+t.offsetY,this._getYAxisAnnotationWidth(t),o+t.offsetY,t.borderColor,r,t.borderWidth);e.appendChild(u.node),t.id&&u.node.classList.add(t.id)}}else{if(a=(n=this.helpers.getY1Y2("y2",t)).yP,h=n.clipped,a>o){var g=o;o=a,a=g}if(!l||!h){c=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,a+t.offsetY,this._getYAxisAnnotationWidth(t),o-a,0,t.fillColor,t.opacity,1,t.borderColor,r);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(c){var f="right"===t.label.position?s.globals.gridWidth:"center"===t.label.position?s.globals.gridWidth/2:0,x=this.annoCtx.graphics.drawText({x:f+t.label.offsetX,y:(null!=a?a:o)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});x.attr({rel:i}),e.appendChild(x.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;e.globals.gridWidth;return(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,a){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,i.node,a)})),i}}]),t}(),Yi=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addPointAnnotation",value:function(t,e,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",t),s=a.x,r=a.clipped,n=(a=this.helpers.getY1Y2("y1",t)).yP,o=a.clipped;if(v.isNumber(s)&&!o&&!r){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},h=this.annoCtx.graphics.drawMarker(s+t.marker.offsetX,n+t.marker.offsetY,l);e.appendChild(h.node);var c=t.label.text?t.label.text:"",d=this.annoCtx.graphics.drawText({x:s+t.label.offsetX,y:n+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:c,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(d.attr({rel:i}),e.appendChild(d.node),t.customSVG.SVG){var u=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});u.attr({transform:"translate(".concat(s+t.customSVG.offsetX,", ").concat(n+t.customSVG.offsetY,")")}),u.node.innerHTML=t.customSVG.SVG,e.appendChild(u.node)}if(t.image.path){var g=t.image.width?t.image.width:20,p=t.image.height?t.image.height:20;h=this.annoCtx.addImage({x:s+t.image.offsetX-g/2,y:n+t.image.offsetY-p/2,width:g,height:p,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&h.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&h.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&h.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,a){t.addPointAnnotation(e,i.node,a)})),i}}]),t}();var Hi={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},Oi=function(){function t(){i(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return s(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[Hi],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),Fi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.graphics=new Mi(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Ii(this),this.xAxisAnnotations=new Ti(this),this.yAxisAnnotations=new Ei(this),this.pointsAnnotations=new Yi(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return s(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=t.config.chart.animations.enabled,r=[e,i,a],n=[i.node,e.node,a.node],o=0;o<3;o++)t.globals.dom.elGraphical.add(r[o]),!s||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&n[o].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:n[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,a=t.y,s=t.text,r=t.textAnchor,n=t.foreColor,o=t.fontSize,l=t.fontFamily,h=t.fontWeight,c=t.cssClass,d=t.backgroundColor,u=t.borderWidth,g=t.strokeDashArray,p=t.borderRadius,f=t.borderColor,x=t.appendTo,b=void 0===x?".apexcharts-svg":x,m=t.paddingLeft,v=void 0===m?4:m,y=t.paddingRight,w=void 0===y?4:y,k=t.paddingBottom,A=void 0===k?2:k,C=t.paddingTop,S=void 0===C?2:C,L=this.w,M=this.graphics.drawText({x:i,y:a,text:s,textAnchor:r||"start",fontSize:o||"12px",fontWeight:h||"regular",fontFamily:l||L.config.chart.fontFamily,foreColor:n||L.config.chart.foreColor,cssClass:c}),P=L.globals.dom.baseEl.querySelector(b);P&&P.appendChild(M.node);var I=M.bbox();if(s){var T=this.graphics.drawRect(I.x-v,I.y-S,I.width+v+w,I.height+A+S,p,d||"transparent",1,u,f,g);P.insertBefore(T.node,M.node)}}},{key:"addImage",value:function(t,e){var i=this.w,a=t.path,s=t.x,r=void 0===s?0:s,n=t.y,o=void 0===n?0:n,l=t.width,h=void 0===l?20:l,c=t.height,d=void 0===c?20:c,u=t.appendTo,g=void 0===u?".apexcharts-svg":u,p=i.globals.dom.Paper.image(a);p.size(h,d).move(r,o);var f=i.globals.dom.baseEl.querySelector(g);return f&&f.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,a=t.context,s=t.type,r=t.contextMethod,n=a,o=n.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),h=l.childNodes.length+1,c=new Oi,d=Object.assign({},"xaxis"===s?c.xAxisAnnotation:"yaxis"===s?c.yAxisAnnotation:c.pointAnnotation),u=v.extend(d,e);switch(s){case"xaxis":this.addXaxisAnnotation(u,l,h);break;case"yaxis":this.addYaxisAnnotation(u,l,h);break;case"point":this.addPointAnnotation(u,l,h)}var g=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(h,"']")),p=this.helpers.addBackgroundToAnno(g,u);return p&&l.insertBefore(p.node,g),i&&o.globals.memory.methodsToExec.push({context:n,id:u.id?u.id:v.randomId(),method:r,label:"addAnnotation",params:e}),a}},{key:"clearAnnotations",value:function(t){for(var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),a=e.globals.memory.methodsToExec.length-1;a>=0;a--)"addText"!==e.globals.memory.methodsToExec[a].label&&"addAnnotation"!==e.globals.memory.methodsToExec[a].label||e.globals.memory.methodsToExec.splice(a,1);i=v.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(e));a&&(i.globals.memory.methodsToExec.map((function(t,a){t.id===e&&i.globals.memory.methodsToExec.splice(a,1)})),Array.prototype.forEach.call(a,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),Di=function(t){var e,i=t.isTimeline,a=t.ctx,s=t.seriesIndex,r=t.dataPointIndex,n=t.y1,o=t.y2,l=t.w,h=l.globals.seriesRangeStart[s][r],c=l.globals.seriesRangeEnd[s][r],d=l.globals.labels[r],u=l.config.series[s].name?l.config.series[s].name:"",g=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,f={w:l,seriesIndex:s,dataPointIndex:r,start:h,end:c};("function"==typeof p&&(u=p(u,f)),null!==(e=l.config.series[s].data[r])&&void 0!==e&&e.x&&(d=l.config.series[s].data[r].x),i)||"datetime"===l.config.xaxis.type&&(d=new Xi(a).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(a).formatDate,w:l}));"function"==typeof g&&(d=g(d,f)),Number.isFinite(n)&&Number.isFinite(o)&&(h=n,c=o);var x="",b="",m=l.globals.colors[s];if(void 0===l.config.tooltip.x.formatter)if("datetime"===l.config.xaxis.type){var v=new zi(a);x=v.formatDate(v.getDate(h),l.config.tooltip.x.format),b=v.formatDate(v.getDate(c),l.config.tooltip.x.format)}else x=h,b=c;else x=l.config.tooltip.x.formatter(h),b=l.config.tooltip.x.formatter(c);return{start:h,end:c,startVal:x,endVal:b,ylabel:d,color:m,seriesName:u}},_i=function(t){var e=t.color,i=t.seriesName,a=t.ylabel,s=t.start,r=t.end,n=t.seriesIndex,o=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(n);s=l.yLbFormatter(s),r=l.yLbFormatter(r);var h=l.yLbFormatter(t.w.globals.series[n][o]),c='\n '.concat(s,'\n - \n ').concat(r,"\n ");return'
'+(i||"")+'
'+a+": "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[n].type||"rangeBar"===t.w.config.series[n].type?c:"".concat(h,""):c)+"
"},Ni=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){this.hideYAxis();return v.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var i=e.w.config.series[e.seriesIndex].name;return null!==t?i+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),u(u({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,a=e.dataPointIndex,s=e.w,r=function(){var t=s.globals.seriesRangeStart[i][a];return s.globals.seriesRangeEnd[i][a]-t};return s.globals.comboCharts?"rangeBar"===s.config.series[i].type||"rangeArea"===s.config.series[i].type?r():t:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Di(u(u({},t),{},{isTimeline:!0})),i=e.color,a=e.seriesName,s=e.ylabel,r=e.startVal,n=e.endVal;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t):function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,i;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(i=t.plotOptions.bar)&&void 0!==i&&i.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}}}}},{key:"brush",value:function(t){return v.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return u(u({},t),{},{plotOptions:u(u({},t.plotOptions),{},{bar:u(u({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return v.isNumber(t)?Math.floor(t):t};var a=t.xaxis.labels.formatter,s=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(s=i.map((function(t){return Array.isArray(t)?t:String(t)}))),s&&s.length&&(t.xaxis.labels.formatter=function(t){return v.isNumber(t)?a(s[Math.floor(t)-1]):a(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,i,a,s){var r=t.globals.seriesCandleO[e][i],n=t.globals.seriesCandleH[e][i],o=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],h=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==s?'
\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][i],"\n
"):'
')+"
".concat(a[0],': ')+r+"
"+"
".concat(a[1],': ')+n+"
"+(o?"
".concat(a[2],': ')+o+"
":"")+"
".concat(a[3],': ')+l+"
"+"
".concat(a[4],': ')+h+"
"}}]),t}(),Wi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(t){var e=t.responsiveOverride,i=this.opts,a=new Oi,s=new Ni(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),n={};if(i&&"object"===b(i)){var o,l,h,c,d,u,g,p,f,x,m={};m=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?s[i.chart.type]():s.line(),null!==(o=i.plotOptions)&&void 0!==o&&null!==(l=o.bar)&&void 0!==l&&l.isFunnel&&(m=s.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(m=s.stackedBars()),null!==(h=i.chart.brush)&&void 0!==h&&h.enabled&&(m=s.brush(m)),null!==(c=i.plotOptions)&&void 0!==c&&null!==(d=c.line)&&void 0!==d&&d.isSlopeChart&&(m=s.slope()),i.chart.stacked&&"100%"===i.chart.stackType&&(i=s.stacked100(i)),null!==(u=i.plotOptions)&&void 0!==u&&null!==(g=u.bar)&&void 0!==g&&g.isDumbbell&&(i=s.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},e||(i.xaxis.convertedCatToNumeric=!1),(null!==(p=(i=this.checkForCatToNumericXAxis(this.chartType,m,i)).chart.sparkline)&&void 0!==p&&p.enabled||null!==(f=window.Apex.chart)&&void 0!==f&&null!==(x=f.sparkline)&&void 0!==x&&x.enabled)&&(m=s.sparkline(m)),n=v.extend(r,m)}var y=v.extend(n,window.Apex);return r=v.extend(y,i),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var a,s,r=new Ni(i),n=("bar"===t||"boxPlot"===t)&&(null===(a=i.plotOptions)||void 0===a||null===(s=a.bar)||void 0===s?void 0:s.horizontal),o="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,l="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,h=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return n||o||!l||"between"===h||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new Oi;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=v.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[v.extend(i.yAxis,t.yaxis)]:t.yaxis=v.extendArray(t.yaxis,i.yAxis);var a=!1;t.yaxis.forEach((function(t){t.logarithmic&&(a=!0)}));var s=t.series;return e&&!s&&(s=e.config.series),a&&s.length!==t.yaxis.length&&s.length&&(t.yaxis=s.map((function(e,a){if(e.name||(s[a].name="series-".concat(a+1)),t.yaxis[a])return t.yaxis[a].seriesName=s[a].name,t.yaxis[a];var r=v.extend(i.yAxis,t.yaxis[0]);return r.show=!1,r}))),a&&s.length>1&&s.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.yaxis=v.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.xaxis=v.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new Oi;return t.annotations.points=v.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),Bi=function(){function t(){i(this,t)}return s(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:t.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=v.extend({},t),e.initialSeries=v.clone(t.series),e.lastXAxis=v.clone(e.initialConfig.xaxis),e.lastYAxis=v.clone(e.initialConfig.yaxis),e}}]),t}(),Gi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(){var t=new Wi(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new Bi).init(t)}}}]),t}(),ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return s(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,a=parseInt(e.globals.gridWidth,10),s=parseInt(e.globals.gridHeight,10),r=a>s?a:s,n=t.image,o=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=r+1,l=r):(o=t.width,l=t.height);var h=document.createElementNS(e.globals.SVGNS,"pattern");Mi.setAttrs(h,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var c=document.createElementNS(e.globals.SVGNS,"image");h.appendChild(c),c.setAttributeNS(window.SVG.xlink,"href",n),Mi.setAttrs(c,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),c.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(h)}},{key:"getSeriesIndex",value:function(t){var e=this.w,i=e.config.chart.type;return("bar"===i||"rangeBar"===i)&&e.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var i,a=this.w,s=null,n=null,o=r(t);try{for(o.s();!(i=o.n()).done;){var l=i.value;l>=e.threshold?(null===s||l>s)&&(s=l):(null===n||l-1?x=v.getOpacityFromRGBA(c):m=v.hexToRgba(v.rgb2hex(c),x),t.opacity&&(x=t.opacity),"pattern"===p&&(n=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:n,fillColor:c,fillOpacity:x,defaultColor:m})),b){var y=f(l.fill.gradient.colorStops)||[],w=l.fill.gradient.type;h&&(y[this.seriesIndex]=this.computeColorStops(s.globals.series[this.seriesIndex],l.plotOptions.line.colors),w="vertical"),o=this.handleGradientFill({type:w,fillConfig:t.fillConfig,fillColor:c,fillOpacity:x,colorStops:y,i:this.seriesIndex})}if("image"===p){var k=l.fill.image.src,A=t.patternID?t.patternID:"",C="pattern".concat(s.globals.cuid).concat(t.seriesNumber+1).concat(A);-1===this.patternIDs.indexOf(C)&&(this.clippedImgArea({opacity:x,image:Array.isArray(k)?t.seriesNumber-1&&(p=v.getOpacityFromRGBA(g));var f=void 0===o.gradient.opacityTo?a:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[n]:o.gradient.opacityTo;if(void 0===o.gradient.gradientToColors||0===o.gradient.gradientToColors.length)d="dark"===o.gradient.shade?c.shadeColor(-1*parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i):c.shadeColor(parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i);else if(o.gradient.gradientToColors[l.seriesNumber]){var x=o.gradient.gradientToColors[l.seriesNumber];d=x,x.indexOf("rgba")>-1&&(f=v.getOpacityFromRGBA(x))}else d=i;if(o.gradient.gradientFrom&&(g=o.gradient.gradientFrom),o.gradient.gradientTo&&(d=o.gradient.gradientTo),o.gradient.inverseColors){var b=g;g=d,d=b}return g.indexOf("rgb")>-1&&(g=v.rgb2hex(g)),d.indexOf("rgb")>-1&&(d=v.rgb2hex(d)),h.drawGradient(e,g,d,p,f,l.size,o.gradient.stops,r,n)}}]),t}(),Vi=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],r=this.w,n=e,o=t,l=null,h=new Mi(this.ctx),c=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(o.x))for(var d=0;d0:r.config.markers.size>0)||s||c){p||(f+=" w".concat(v.randomId()));var x=this.getMarkerConfig({cssClass:f,seriesIndex:e,dataPointIndex:g});if(r.config.series[n].data[g]&&(r.config.series[n].data[g].fillColor&&(x.pointFillColor=r.config.series[n].data[g].fillColor),r.config.series[n].data[g].strokeColor&&(x.pointStrokeColor=r.config.series[n].data[g].strokeColor)),void 0!==a&&(x.pSize=a),(o.x[d]<-r.globals.markers.largestSize||o.x[d]>r.globals.gridWidth+r.globals.markers.largestSize||o.y[d]<-r.globals.markers.largestSize||o.y[d]>r.globals.gridHeight+r.globals.markers.largestSize)&&(x.pSize=0),!p)(r.globals.markers.size[e]>0||s||c)&&!l&&(l=h.group({class:s||c?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),(u=h.drawMarker(o.x[d],o.y[d],x)).attr("rel",g),u.attr("j",g),u.attr("index",e),u.node.setAttribute("default-marker-size",x.pSize),new Li(this.ctx).setSelectionFilter(u,e,g),this.addEvents(u),l&&l.add(u)}else void 0===r.globals.pointsArray[e]&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([o.x[d],o.y[d]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,i=t.seriesIndex,a=t.dataPointIndex,s=void 0===a?null:a,r=t.radius,n=void 0===r?null:r,o=t.size,l=void 0===o?null:o,h=t.strokeWidth,c=void 0===h?null:h,d=this.w,u=this.getMarkerStyle(i),g=null===l?d.globals.markers.size[i]:l,p=d.config.markers;return null!==s&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===i&&t.dataPointIndex===s&&(u.pointStrokeColor=t.strokeColor,u.pointFillColor=t.fillColor,g=t.size,u.pointShape=t.shape)})),{pSize:null===n?g:n,pRadius:null!==n?n:p.radius,pointStrokeWidth:null!==c?c:Array.isArray(p.strokeWidth)?p.strokeWidth[i]:p.strokeWidth,pointStrokeColor:u.pointStrokeColor,pointFillColor:u.pointFillColor,shape:u.pointShape||(Array.isArray(p.shape)?p.shape[i]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[i]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[i]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[i]:p.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(t){var e=this.w,i=new Mi(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,a=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[t]:a,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),Ui=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return s(t,[{key:"draw",value:function(t,e,i){var a=this.w,s=new Mi(this.ctx),r=i.realIndex,n=i.pointsPos,o=i.zRatio,l=i.elParent,h=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(h.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(n.x))for(var c=0;cp.maxBubbleRadius&&(g=p.maxBubbleRadius)}var f=n.x[c],x=n.y[c];if(g=g||0,null!==x&&void 0!==a.globals.series[r][d]||(u=!1),u){var b=this.drawPoint(f,x,g,r,d,e);h.add(b)}l.add(h)}}},{key:"drawPoint",value:function(t,e,i,a,s,r){var n=this.w,o=a,l=new y(this.ctx),h=new Li(this.ctx),c=new ji(this.ctx),d=new Vi(this.ctx),u=new Mi(this.ctx),g=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:s,radius:"bubble"===n.config.chart.type||n.globals.comboCharts&&n.config.series[a]&&"bubble"===n.config.series[a].type?i:null}),p=c.fillPath({seriesNumber:a,dataPointIndex:s,color:g.pointFillColor,patternUnits:"objectBoundingBox",value:n.globals.series[a][r]}),f=u.drawMarker(t,e,g);if(n.config.series[o].data[s]&&n.config.series[o].data[s].fillColor&&(p=n.config.series[o].data[s].fillColor),f.attr({fill:p}),n.config.chart.dropShadow.enabled){var x=n.config.chart.dropShadow;h.dropShadow(f,x,a)}if(!this.initialAnim||n.globals.dataChanged||n.globals.resized)n.globals.animationEnded=!0;else{var b=n.config.chart.animations.speed;l.animateMarker(f,b,n.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(f)}),100)}))}return f.attr({rel:s,j:s,index:a,"default-marker-size":g.pSize}),h.setSelectionFilter(f,a,s),d.addEvents(f),f.node.classList.add("apexcharts-marker"),f}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}]),t}(),qi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"dataLabelsCorrection",value:function(t,e,i,a,s,r,n){var o=this.w,l=!1,h=new Mi(this.ctx).getTextRects(i,n),c=h.width,d=h.height;e<0&&(e=0),e>o.globals.gridHeight+d&&(e=o.globals.gridHeight+d/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:t,y:e,width:c,height:d});var u=o.globals.dataLabelsRects[a].length-2,g=void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(void 0!==o.globals.dataLabelsRects[a][u]){var p=o.globals.dataLabelsRects[a][g];(t>p.x+p.width||e>p.y+p.height||e+de.globals.gridWidth+b.textRects.width+30)&&(o="");var m=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(m=e.globals.dataLabels.style.colors[n]),"function"==typeof m&&(m=m({series:e.globals.series,seriesIndex:r,dataPointIndex:n,w:e})),u&&(m=u);var v=d.offsetX,y=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(v=0,y=0),e.globals.isSlopeChart&&(0!==n&&(v=-2*d.offsetX+5),0!==n&&n!==e.config.series[r].data.length-1&&(v=0)),b.drawnextLabel){if((x=i.drawText({width:100,height:parseInt(d.style.fontSize,10),x:a+v,y:s+y,foreColor:m,textAnchor:l||d.textAnchor,text:o,fontSize:h||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"})).attr({class:f||"apexcharts-datalabel",cx:a,cy:s}),d.dropShadow.enabled){var w=d.dropShadow;new Li(this.ctx).dropShadow(x,w)}c.add(x),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(n)}return x}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,a=i.config.dataLabels.background,s=a.padding,r=a.padding/2,n=e.width,o=e.height,l=new Mi(this.ctx).drawRect(e.x-s,e.y-r/2,n+2*s,o+r,a.borderRadius,"transparent"!==i.config.chart.background&&i.config.chart.background?i.config.chart.background:"#fff",a.opacity,a.borderWidth,a.borderColor);a.dropShadow.enabled&&new Li(this.ctx).dropShadow(l,a.dropShadow);return l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,s=v.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,t&&(e&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i-1&&(t[i].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,i=this.getSeriesByName(t),a=parseInt(null==i?void 0:i.getAttribute("data:realIndex"),10),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),r=null,n=null,o=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){r=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),n=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']"));var l=e.globals.seriesYAxisReverseMap[a];o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']"));else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var h=0;h=t.from&&(r0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1)for(var s=i.config.series.map((function(t,a){return t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(a)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(i.config.series[a].type)>-1)?a:-1})),r="asc"===t?0:s.length-1;"asc"===t?r=0;"asc"===t?r++:r--)if(-1!==s[r]){a=s[r];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,a){for(var s=e[i].childNodes,r={type:a,paths:[],realIndex:e[i].getAttribute("data:realIndex")},n=0;n0)for(var a=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),a=[],s=function(t){var e=function(e){return i[t].getAttribute(e)},s={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};a.push({rect:s,color:i[t].getAttribute("color")})},r=0;r0?t:[]}));return t}}]),t}(),$i=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,a=this.w.globals,s="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,r=0;r=5?this.twoDSeries.push(v.parseNumber(t[e].data[r][4])):this.twoDSeries.push(v.parseNumber(t[e].data[r][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var n=new Date(t[e].data[r][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(t[e].data[r][0]);for(var o=0;o-1&&(r=this.activeSeriesIndex);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,r=new zi(i),n=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isRangeBar="rangeBar"===a.chart.type&&s.isBarHorizontal,s.hasXaxisGroups="category"===a.xaxis.type&&a.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=a.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?s.seriesNames.push(t.name):s.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var o=[],l=f(new Set(a.series.map((function(t){return t.group}))));a.series.forEach((function(t,e){var i=l.indexOf(t.group);o[i]||(o[i]=[]),o[i].push(s.seriesNames[e])})),s.seriesGroups=o;for(var h=function(){for(var t=0;t0&&(this.twoDSeriesX=n,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var d=t[c].data.map((function(t){return v.parseNumber(t)}));s.series.push(d)}s.seriesZ.push(this.threeDSeries),void 0!==t[c].color?s.seriesColors.push(t[c].color):s.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var a=0;a0)i.labels=e.xaxis.categories;else if(e.labels.length>0)i.labels=e.labels.slice();else if(this.fallbackToCategory){if(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric)new Ni(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t)}else this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,a=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var s=i.series.map((function(t,e){return t.data.filter((function(t,e,i){return i.findIndex((function(e){return e.x===t.x}))===e}))})),r=s.reduce((function(t,e,i,a){return a[t].length>e.length?t:i}),0),n=0;n0&&s==i.length&&e.push(a)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}]),t}(),Ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),a=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",a*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"getSvgString",value:function(){var t=this;return new Promise((function(e){var i=t.w,a=i.config.chart.toolbar.export.width,s=i.config.chart.toolbar.export.scale||a/i.globals.svgWidth;s||(s=1);var r=t.w.globals.dom.Paper.svg(),n=t.w.globals.dom.Paper.node.cloneNode(!0);1!==s&&t.scaleSvgNode(n,s),t.convertImagesToBase64(n).then((function(){r=(new XMLSerializer).serializeToString(n),e(r.replace(/ /g," "))}))}))}},{key:"convertImagesToBase64",value:function(t){var e=this,i=t.getElementsByTagName("image"),a=Array.from(i).map((function(t){var i=t.getAttributeNS("http://www.w3.org/1999/xlink","href");return i&&!i.startsWith("data:")?e.getBase64FromUrl(i).then((function(e){t.setAttributeNS("http://www.w3.org/1999/xlink","href",e)})).catch((function(t){console.error("Error converting image to base64:",t)})):Promise.resolve()}));return Promise.all(a)}},{key:"getBase64FromUrl",value:function(t){return new Promise((function(e,i){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var t=document.createElement("canvas");t.width=a.width,t.height=a.height,t.getContext("2d").drawImage(a,0,0),e(t.toDataURL())},a.onerror=i,a.src=t}))}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var t=this;return new Promise((function(e){t.cleanup(),t.getSvgString().then((function(t){var i=new Blob([t],{type:"image/svg+xml;charset=utf-8"});e(URL.createObjectURL(i))}))}))}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var a=e.w,s=t?t.scale||t.width/a.globals.svgWidth:1;e.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*s,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var n="transparent"!==a.config.chart.background&&a.config.chart.background?a.config.chart.background:"#fff",o=r.getContext("2d");o.fillStyle=n,o.fillRect(0,0,r.width*s,r.height*s),e.getSvgString().then((function(t){var e="data:image/svg+xml,"+encodeURIComponent(t),a=new Image;a.crossOrigin="anonymous",a.onload=function(){if(o.drawImage(a,0,0),r.msToBlob){var t=r.msToBlob();i({blob:t})}else{var e=r.toDataURL("image/png");i({imgURI:e})}},a.src=e}))}))}},{key:"exportToSVG",value:function(){var t=this;this.svgUrl().then((function(e){t.triggerDownload(e,t.w.config.chart.toolbar.export.svg.filename,".svg")}))}},{key:"exportToPng",value:function(){var t=this,e=this.w.config.chart.toolbar.export.scale,i=this.w.config.chart.toolbar.export.width,a=e?{scale:e}:i?{width:i}:void 0;this.dataURI(a).then((function(e){var i=e.imgURI,a=e.blob;a?navigator.msSaveOrOpenBlob(a,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,a=t.fileName,s=t.columnDelimiter,r=void 0===s?",":s,n=t.lineDelimiter,o=void 0===n?"\n":n,l=this.w;i||(i=l.config.series);var h=[],c=[],d="",u=l.globals.series.map((function(t,e){return-1===l.globals.collapsedSeriesIndices.indexOf(e)?t:[]})),g=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.categoryFormatter?l.config.chart.toolbar.export.csv.categoryFormatter(t):"datetime"===l.config.xaxis.type&&String(t).length>=10?new Date(t).toDateString():v.isNumber(t)?t:t.split(r).join("")},p=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},x=Math.max.apply(Math,f(i.map((function(t){return t.data?t.data.length:0})))),b=new $i(this.ctx),m=new Ri(this.ctx),y=function(t){var i="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var a=l.globals.yLabelFormatters[0],s=new Zi(e.ctx).getActiveConfigSeriesIndex();i=a(l.globals.labels[t],{seriesIndex:s,dataPointIndex:t,w:l})}else i=m.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?i=l.config.xaxis.categories[t]:l.config.labels.length&&(i=l.config.labels[t]))}else i=l.config.labels[t];return null===i?"nullvalue":(Array.isArray(i)&&(i=i.join(" ")),v.isNumber(i)?i:i.split(r).join(""))},w=function(t,e){if(h.length&&0===e&&c.push(h.join(r)),t.data){t.data=t.data.length&&t.data||f(Array(x)).map((function(){return""}));for(var a=0;a0&&!s.globals.isBarHorizontal&&(this.xaxisLabels=s.globals.timescaleLabels.slice()),s.config.xaxis.overwriteCategories&&(this.xaxisLabels=s.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===s.config.xaxis.position?this.offY=0:this.offY=s.globals.gridHeight,this.offY=this.offY+s.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.xaxisBorderWidth=s.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=s.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=s.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=s.config.xaxis.axisBorder.height,this.yaxis=s.config.yaxis[0]}return s(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new Mi(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});i.add(a);for(var s=[],r=0;r6&&void 0!==arguments[6]?arguments[6]:{},h=[],c=[],d=this.w,u=l.xaxisFontSize||this.xaxisFontSize,g=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,f=l.fontWeight||d.config.xaxis.labels.style.fontWeight,x=l.cssClass||d.config.xaxis.labels.style.cssClass,b=d.globals.padHorizontal,m=a.length,v="category"===d.config.xaxis.type?d.globals.dataPoints:m;if(0===v&&m>v&&(v=m),s){var y=v>1?v-1:v;n=d.globals.gridWidth/Math.min(y,m-1),b=b+r(0,n)/2+d.config.xaxis.labels.offsetX}else n=d.globals.gridWidth/v,b=b+r(0,n)+d.config.xaxis.labels.offsetX;for(var w=function(s){var l=b-r(s,n)/2+d.config.xaxis.labels.offsetX;0===s&&1===m&&n/2===b&&1===v&&(l=d.globals.gridWidth/2);var y=o.axesUtils.getLabel(a,d.globals.timescaleLabels,l,s,h,u,t),w=28;d.globals.rotateXLabels&&t&&(w=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(w+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(u)+(d.globals.xAxisLabelsHeight-d.globals.xAxisGroupLabelsHeight)+(d.globals.rotateXLabels?10:0)),y=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(s,y,m):o.axesUtils.checkForOverflowingLabels(s,y,m,h,c);if(d.config.xaxis.labels.show){var k=e.drawText({x:y.x,y:o.offY+d.config.xaxis.labels.offsetY+w-("top"===d.config.xaxis.position?d.globals.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:"middle",fontWeight:y.isBold?600:f,fontSize:u,fontFamily:g,foreColor:Array.isArray(p)?t&&d.config.xaxis.convertedCatToNumeric?p[d.globals.minX+s-1]:p[s]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(i.add(k),k.on("click",(function(t){if("function"==typeof d.config.chart.events.xAxisLabelClick){var e=Object.assign({},d,{labelIndex:s});d.config.chart.events.xAxisLabelClick(t,o.ctx,e)}})),t){var A=document.createElementNS(d.globals.SVGNS,"title");A.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,k.node.appendChild(A),""!==y.text&&(h.push(y.text),c.push(y))}}sa.globals.gridWidth)){var r=this.offY+a.config.xaxis.axisTicks.offsetY;if(e=e+r+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(e=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new Mi(this.ctx).drawLine(t+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,s+a.config.xaxis.axisTicks.offsetX,e+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var s=0;s0){var h=s[s.length-1].getBBox(),c=s[0].getBBox();h.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),c.x+c.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var d=0;d0&&(this.xaxisLabels=a.globals.timescaleLabels.slice())}return s(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new Mi(this.ctx);t||(t=i.group({class:"apexcharts-grid"}));var a=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),s=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(s),t.add(a),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new Mi(this.ctx),a=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,f(t.config.stroke.width)):t.config.stroke.width,s=function(t){var i=document.createElementNS(e.SVGNS,"clipPath");return i.setAttribute("id",t),i};e.dom.elGridRectMask=s("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=s("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=s("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=s("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=s("nonForecastMask".concat(e.cuid));var r=0,n=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),n=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=i.drawRect(-a/2-r-2,-a/2-2,e.gridWidth+a+n+r+4,e.gridHeight+a+4,0,"#fff");var o=t.globals.markers.largestSize;e.dom.elGridRectMarker=i.drawRect(-o,-o,e.gridWidth+2*o,e.gridHeight+2*o,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,a=t.y1,s=t.x2,r=t.y2,n=t.xCount,o=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===n-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:i,y1:a,x2:s,y2:r,xCount:n,parent:o});var h=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var c=l.globals.groups;if(c){for(var d=0,u=0;d0&&"datetime"!==t.config.xaxis.type&&(s=e.yAxisScale[a].result.length-1);this._drawXYLines({xCount:s,tickAmount:r})}else s=r,r=e.xTickAmount,this._drawInvertedXYLines({xCount:s,tickAmount:r});return this.drawGridBands(s,r),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/s}}},{key:"drawGridBands",value:function(t,e){var i,a,s=this,r=this.w;if((null===(i=r.config.grid.row.colors)||void 0===i?void 0:i.length)>0&&function(t,i,a,n,o,l){for(var h=0,c=0;h=r.config.grid[t].colors.length&&(c=0),s._drawGridBandRect({c:c,x1:a,y1:n,x2:o,y2:l,type:t}),n+=r.globals.gridHeight/e}("row",e,0,0,r.globals.gridWidth,r.globals.gridHeight/e),(null===(a=r.config.grid.column.colors)||void 0===a?void 0:a.length)>0){var n=r.globals.isBarHorizontal||"on"!==r.config.xaxis.tickPlacement||"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric?t:t-1;r.globals.isXNumeric&&(n=r.globals.xAxisScale.result.length-1);for(var o=r.globals.padHorizontal,l=r.globals.padHorizontal+r.globals.gridWidth/n,h=r.globals.gridHeight,c=0,d=0;c=r.config.grid.column.colors.length&&(d=0),"datetime"===r.config.xaxis.type)o=this.xaxisLabels[c].position,l=((null===(u=this.xaxisLabels[c+1])||void 0===u?void 0:u.position)||r.globals.gridWidth)-this.xaxisLabels[c].position;this._drawGridBandRect({c:d,x1:o,y1:0,x2:l,y2:h,type:"column"}),o+=r.globals.gridWidth/n}}}}]),t}(),ta=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"niceScale",value:function(t,e){var i,a,s,r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=1e-11,l=this.w,h=l.globals;h.isBarHorizontal?(i=l.config.xaxis,a=Math.max((h.svgWidth-100)/25,2)):(i=l.config.yaxis[n],a=Math.max((h.svgHeight-100)/15,2)),v.isNumber(a)||(a=10),s=void 0!==i.min&&null!==i.min,r=void 0!==i.max&&null!==i.min;var c=void 0!==i.stepSize&&null!==i.stepSize,d=void 0!==i.tickAmount&&null!==i.tickAmount,u=d?i.tickAmount:h.niceScaleDefaultTicks[Math.min(Math.round(a/2),h.niceScaleDefaultTicks.length-1)];if(h.isMultipleYAxis&&!d&&h.multiAxisTickAmount>0&&(u=h.multiAxisTickAmount,d=!0),u="dataPoints"===u?h.dataPoints-1:Math.abs(Math.round(u)),(t===Number.MIN_VALUE&&0===e||!v.isNumber(t)&&!v.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=v.isNumber(i.min)?i.min:0,e=v.isNumber(i.max)?i.max:t+u,h.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var g=e;e=t,t=g}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var p=[];u<1&&(u=1);var f=u,x=Math.abs(e-t);!s&&t>0&&t/x<.15&&(t=0,s=!0),!r&&e<0&&-e/x<.15&&(e=0,r=!0);var b=(x=Math.abs(e-t))/f,m=b,y=Math.floor(Math.log10(m)),w=Math.pow(10,y),k=Math.ceil(m/w);if(b=m=(k=h.niceScaleAllowedMagMsd[0===h.yValueDecimal?0:1][k])*w,h.isBarHorizontal&&i.stepSize&&"datetime"!==i.type?(b=i.stepSize,c=!0):c&&(b=i.stepSize),c&&i.forceNiceScale){var A=Math.floor(Math.log10(b));b*=Math.pow(10,y-A)}if(s&&r){var C=x/f;if(d)if(c)if(0!=v.mod(x,b)){var S=v.getGCD(b,C);b=C/S<10?S:C}else 0==v.mod(b,C)?b=C:(C=b,d=!1);else b=C;else if(c)0==v.mod(x,b)?C=b:b=C;else if(0==v.mod(x,b))C=b;else{C=x/(f=Math.ceil(x/b));var L=v.getGCD(x,b);x/La&&(t=e-b*u,t+=b*Math.floor((M-t)/b))}else if(s)if(d)e=t+b*f;else{var P=e;e=b*Math.ceil(e/b),Math.abs(e-t)/v.getGCD(x,b)>a&&(e=t+b*u,e+=b*Math.ceil((P-e)/b))}}else if(h.isMultipleYAxis&&d){var I=b*Math.floor(t/b),T=I+b*f;T0&&t16&&v.getPrimeFactors(f).length<2&&f++,!d&&i.forceNiceScale&&0===h.yValueDecimal&&f>x&&(f=x,b=Math.round(x/f)),f>a&&(!d&&!c||i.forceNiceScale)){var z=v.getPrimeFactors(f),X=z.length-1,R=f;t:for(var E=0;EN);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,r=Math.abs(e-t),n=[];if(t===e)return{result:n=[t],niceMin:n[0],niceMax:n[n.length-1]};"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,r))&&(i=this.w.globals.dataPoints-1),s||(s=r/i),s=Math.round(10*(s+Number.EPSILON))/10,i===Number.MAX_VALUE&&(i=5,s=1);for(var o=t;i>=0;)n.push(o),o=v.preciseAddition(o,s),i-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,i){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));for(var a=[],s=Math.ceil(Math.log(e)/Math.log(i)+1),r=Math.floor(Math.log(t)/Math.log(i));r5?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase):this.logarithmicScale(e,i,r.logBase)):i!==-Number.MAX_VALUE&&v.isNumber(i)&&e!==Number.MAX_VALUE&&v.isNumber(e)?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.niceScale(e,i,t)):a.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var i=this.w,a=i.globals,s=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&v.isNumber(e)){var r=a.xTickAmount+1;s<10&&s>1&&(r=s),a.xAxisScale=this.linearScale(t,e,r,0,i.config.xaxis.stepSize)}else a.xAxisScale=this.linearScale(0,10,10);return a.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,i=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var a=i.seriesYAxisMap,s=i.minYArr,r=i.maxYArr;i.allSeriesCollapsed=!0,i.barGroups=[],a.forEach((function(a,n){var o=[];a.forEach((function(t){var i=e.series[t].group;o.indexOf(i)<0&&o.push(i)})),a.length>0?function(){var l,h,c=Number.MAX_VALUE,d=-Number.MAX_VALUE,u=c,g=d;if(e.chart.stacked)!function(){var t=new Array(i.dataPoints).fill(0),s=[],r=[],p=[];o.forEach((function(){s.push(t.map((function(){return Number.MIN_VALUE}))),r.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var f=function(t){!l&&e.series[a[t]].type&&(l=e.series[a[t]].type);var c=a[t];h=e.series[c].group?e.series[c].group:"axis-".concat(n),!(i.collapsedSeriesIndices.indexOf(c)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(c)<0)||(i.allSeriesCollapsed=!1,o.forEach((function(t,a){if(e.series[c].group===t)for(var n=0;n=0?r[a][n]+=o:p[a][n]+=o,s[a][n]+=o,u=Math.min(u,o),g=Math.max(g,o)}}))),"bar"!==l&&"column"!==l||i.barGroups.push(h)},x=0;x1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w.config,r=this.w.globals,n=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=t+1);var l=r.series,h=l,c=l;"candlestick"===s.chart.type?(h=r.seriesCandleL,c=r.seriesCandleH):"boxPlot"===s.chart.type?(h=r.seriesCandleO,c=r.seriesCandleC):r.isRangeData&&(h=r.seriesRangeStart,c=r.seriesRangeEnd);var d=!1;if(r.seriesX.length>=a){var u,g=null===(u=r.brushSource)||void 0===u?void 0:u.w.config.chart.brush;(s.chart.zoom.enabled&&s.chart.zoom.autoScaleYaxis||null!=g&&g.enabled&&null!=g&&g.autoScaleYaxis)&&(d=!0)}for(var p=t;px&&r.seriesX[p][b]>s.xaxis.max;b--);}for(var m=x;m<=b&&mh[p][m]&&h[p][m]<0&&(o=h[p][m])}else r.hasNullValues=!0}"bar"!==f&&"column"!==f||(o<0&&n<0&&(n=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,e=Math.min(e,0)))}return"rangeBar"===s.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&(o=e),"bar"===s.chart.type&&(o<0&&n<0&&(n=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:n,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i,a=Number.MAX_VALUE;if(t.isMultipleYAxis){a=Number.MAX_VALUE;for(var s=0;st.dataPoints&&0!==t.dataPoints&&(a=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(a=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var s=t.maxX-t.minX;s<30&&(a=s-1)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var r=[],n=t.minX-1;n0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,a-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var s=e-a[i-1];s>0&&(t.minXDiff=Math.min(s,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var i=e.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map((function(t){return t}))]);var a={},s={};i.forEach((function(i){a[i]=[],s[i]=[],t.w.config.series.map((function(t,a){return i.indexOf(e.seriesNames[a])>-1?a:null})).filter((function(t){return null!==t})).forEach((function(r){for(var n=0;n0?a[i][n]+=parseFloat(e.series[r][n])+1e-4:s[i][n]+=parseFloat(e.series[r][n]))}}))})),Object.entries(a).forEach((function(t){var i=p(t,1)[0];a[i].forEach((function(t,r){e.maxY=Math.max(e.maxY,a[i][r]),e.minY=Math.min(e.minY,s[i][r])}))}))}}}]),t}(),ia=function(){function t(e,a){i(this,t),this.ctx=e,this.elgrid=a,this.w=e.w;var s=this.w;this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.axisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xAxisoffX="bottom"===s.config.xaxis.position?s.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Ri(e)}return s(t,[{key:"drawYaxis",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.yaxis[t].labels.style,s=a.fontSize,r=a.fontFamily,n=a.fontWeight,o=i.group({class:"apexcharts-yaxis",rel:t,transform:"translate(".concat(e.globals.translateYAxisX[t],", 0)")});if(this.axesUtils.isYAxisHidden(t))return o;var l=i.group({class:"apexcharts-yaxis-texts-g"});o.add(l);var h=e.globals.yAxisScale[t].result.length-1,c=e.globals.gridHeight/h,d=e.globals.yLabelFormatters[t],u=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){var g=e.globals.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?g=0:"heatmap"===e.config.chart.type&&(g-=c/2),g+=parseInt(s,10)/3;for(var p=h;p>=0;p--){var f=d(u[p],p,e),x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(x*=-1);var b=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(a.colors,t),y=Array.isArray(m)?m[p]:m,w=v.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),k=i.drawText({x:x,y:g,text:w.includes(f)&&!e.config.yaxis[t].labels.showDuplicates?"":f,textAnchor:b,fontSize:s,fontFamily:r,fontWeight:n,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(a.cssClass)});l.add(k),this.addTooltip(k,f),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(i,k,firstLabel,e.config.yaxis[t].labels.rotate),g+=c}}return this.addYAxisTitle(i,o,t),this.addAxisBorder(i,o,t,h,c),o}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var i=document.createElementNS(this.w.globals.SVGNS,"title");i.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(i)}},{key:"rotateLabel",value:function(t,e,i,a){var s=t.rotateAroundCenter(i.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(a," ").concat(s.x," ").concat(r.y,")"))}},{key:"addYAxisTitle",value:function(t,e,i){var a=this.w;if(void 0!==a.config.yaxis[i].title.text){var s=t.group({class:"apexcharts-yaxis-title"}),r=a.config.yaxis[i].opposite?a.globals.translateYAxisX[i]:0,n=t.drawText({x:r,y:a.globals.gridHeight/2+a.globals.translateY+a.config.yaxis[i].title.offsetY,text:a.config.yaxis[i].title.text,textAnchor:"end",foreColor:a.config.yaxis[i].title.style.color,fontSize:a.config.yaxis[i].title.style.fontSize,fontWeight:a.config.yaxis[i].title.style.fontWeight,fontFamily:a.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(a.config.yaxis[i].title.style.cssClass)});s.add(n),e.add(s)}}},{key:"addAxisBorder",value:function(t,e,i,a,s){var r=this.w,n=r.config.yaxis[i].axisBorder,o=31+n.offsetX;if(r.config.yaxis[i].opposite&&(o=-31-n.offsetX),n.show){var l=t.drawLine(o,r.globals.translateY+n.offsetY-2,o,r.globals.gridHeight+r.globals.translateY+n.offsetY+2,n.color,0,n.width);e.add(l)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,a,n,r.config.yaxis[i].axisTicks,i,s,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});a.add(s);var r=e.globals.yAxisScale[t].result.length-1,n=e.globals.gridWidth/r+.1,o=n+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,h=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),c=e.globals.timescaleLabels;if(c.length>0&&(this.xaxisLabels=c.slice(),r=(h=c.slice()).length),e.config.xaxis.labels.show)for(var d=c.length?0:r;c.length?d=0;c.length?d++:d--){var u=l(h[d],d,e),g=e.globals.gridWidth+e.globals.padHorizontal-(o-n+e.config.xaxis.labels.offsetX);if(c.length){var p=this.axesUtils.getLabel(h,c,g,d,this.drawnLabels,this.xaxisFontSize);g=p.x,u=p.text,this.drawnLabels.push(p.text),0===d&&e.globals.skipFirstTimelinelabel&&(u=""),d===h.length-1&&e.globals.skipLastTimelinelabel&&(u="")}var f=i.drawText({x:g,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:u,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});s.add(f),f.tspan(u),this.addTooltip(f,u),o+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.xaxis.axisBorder;if(a.show){var s=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(s-=15);var r=i.drawLine(e.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new Mi(this.ctx);if(void 0!==e.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});a.add(s),t.add(a)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),r=s?s.getBoundingClientRect():{width:0,height:0},n=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),o=n?n.getBoundingClientRect():{width:0,height:0};if(n){var l=this.xPaddingForYAxisTitle(t,r,o,e);n.setAttribute("x",l.xPos-(e?10:0));var h=a.rotateAroundCenter(n);n.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(h.x," ").concat(h.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var s=this.w,r=0,n=10;return void 0===s.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(a?r=e.width+s.config.yaxis[t].title.offsetX+i.width/2+n/2:(r=-1*e.width+s.config.yaxis[t].title.offsetX+n/2+i.width/2,s.globals.isBarHorizontal&&(n=25,r=-1*e.width-s.config.yaxis[t].title.offsetX-n)),{xPos:r,padd:n})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,a=0,s=0,r=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach((function(o,l){var h=i.globals.ignoreYAxisIndexes.includes(l)||!o.show||o.floating||0===t[l].width,c=t[l].width+e[l].width;o.opposite?i.globals.isBarHorizontal?(s=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=s-o.labels.offsetX):(s=i.globals.gridWidth+i.globals.translateX+n,h||(n+=c+20),i.globals.translateYAxisX[l]=s-o.labels.offsetX+20):(a=i.globals.translateX-r,h||(r+=c+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;v.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,i){var a=t.config.yaxis[i];if(a&&!a.floating&&void 0!==a.labels.align){var s=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=v.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"))),n=s.getBoundingClientRect();r.forEach((function(t){t.setAttribute("text-anchor",a.labels.align)})),"left"!==a.labels.align||a.opposite?"center"===a.labels.align?s.setAttribute("transform","translate(".concat(n.width/2*(a.opposite?1:-1),", 0)")):"right"===a.labels.align&&a.opposite&&s.setAttribute("transform","translate(".concat(n.width,", 0)")):s.setAttribute("transform","translate(-".concat(n.width,", 0)"))}}))}}]),t}(),aa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.documentEvent=v.bind(this.documentEvent,this)}return s(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var a=i.globals.events[t].indexOf(e);-1!==a&&i.globals.events[t].splice(a,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var a=i.globals.events[t],s=a.length,r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=v.extend(Hi,i);this.w.globals.locale=a.options}}]),t}(),ra=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawAxis",value:function(t,e){var i,a,s=this,r=this.w.globals,n=this.w.config,o=new Qi(this.ctx,e),l=new ia(this.ctx,e);r.axisCharts&&"radar"!==t&&(r.isBarHorizontal?(a=l.drawYaxisInversed(0),i=o.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(a)):(i=o.drawXaxis(),r.dom.elGraphical.add(i),n.yaxis.map((function(t,e){if(-1===r.ignoreYAxisIndexes.indexOf(e)&&(a=l.drawYaxis(e),r.dom.Paper.add(a),"back"===s.w.config.grid.position)){var i=r.dom.Paper.children()[1];i.remove(),r.dom.Paper.add(i)}}))))}}]),t}(),na=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Li(this.ctx),a=t.config.xaxis.crosshairs.fill.gradient,s=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,n=a.colorFrom,o=a.colorTo,l=a.opacityFrom,h=a.opacityTo,c=a.stops,d=s.enabled,u=s.left,g=s.top,p=s.blur,f=s.color,x=s.opacity,b=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(b=e.drawGradient("vertical",n,o,l,h,null,c,null));var m=e.drawRect();1===t.config.xaxis.crosshairs.width&&(m=e.drawLine());var y=t.globals.gridHeight;(!v.isNumber(y)||y<0)&&(y=0);var w=t.config.xaxis.crosshairs.width;(!v.isNumber(w)||w<0)&&(w=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:w,height:y,fill:b,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),d&&(m=i.dropShadow(m,{left:u,top:g,blur:p,color:f,opacity:x})),t.globals.dom.elGraphical.add(m)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var s=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(s)}var r=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(r)}}]),t}(),oa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,a=i.config;if(0!==a.responsive.length){var s=a.responsive.slice();s.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var r=new Wi({}),n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=s[0].breakpoint,n=window.innerWidth>0?window.innerWidth:screen.width;if(n>a){var o=v.clone(i.globals.initialConfig);o.series=v.clone(i.config.series);var l=Pi.extendArrayProps(r,o,i);t=v.extend(l,t),t=v.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var h=0;h0&&"function"==typeof t[0]?(this.isColorFn=!0,i.config.series.map((function(a,s){var r=t[s]||t[0];return"function"==typeof r?r({value:i.globals.axisCharts?i.globals.series[s][0]||0:i.globals.series[s],seriesIndex:s,dataPointIndex:s,w:e.w}):r}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,i){t&&(e[i]=t)}))}},{key:"getMonochromeColors",value:function(t,e,i){var a=t.color,s=t.shadeIntensity,r=t.shadeTo,n=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,o=1/(n/s),l=0;return Array.from({length:n},(function(){var t="dark"===r?i.shadeColor(-1*l,a):i.shadeColor(l,a);return l+=o,t}))}},{key:"applyColorTypes",value:function(t,e){var i=this,a=this.w;t.forEach((function(t){a.globals[t].colors=void 0===a.config[t].colors?i.isColorFn?a.config.colors:e:a.config[t].colors.slice(),i.pushExtraColors(a.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=e||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),t.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,i=[];e.config.series.forEach((function(s,r){s.data.forEach((function(s,n){var o;o=e.globals.series[r][n],a=e.config.dataLabels.formatter(o,{ctx:t.dCtx.ctx,seriesIndex:r,dataPointIndex:n,w:e}),i.push(a)}))}));var a=v.getLargestStringFromArr(i),s=new Mi(this.dCtx.ctx),r=e.config.dataLabels.style,n=s.getTextRects(a,parseInt(r.fontSize),r.fontFamily);return{width:1.05*n.width,height:n.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var a=e.map((function(t,e){return Array.isArray(t)?t.length:1})),s=Math.max.apply(Math,f(a));i=e[a.indexOf(s)]}return i}}]),t}(),da=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();t={width:a.width,height:a.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var s=e.globals.xLabelFormatter,r=v.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);e.globals.isBarHorizontal&&(n=r=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var o=new Xi(this.dCtx.ctx),l=r;r=o.xLabelFormat(s,r,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),n=o.xLabelFormat(s,n,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(n=r="1");var h=new Mi(this.dCtx.ctx),c=h.getTextRects(r,e.config.xaxis.labels.style.fontSize),d=c;if(r!==n&&(d=h.getTextRects(n,e.config.xaxis.labels.style.fontSize)),(t={width:c.width>=d.width?c.width:d.width,height:c.height>=d.height?c.height:d.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return h.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};c=u(r),r!==n&&(d=u(n)),t.height=(c.height>d.height?c.height:d.height)/1.5,t.width=c.width>d.width?c.width:d.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var i,a=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,s=e.globals.groups.map((function(t){return t.title})),r=v.getLargestStringFromArr(s),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),o=new Mi(this.dCtx.ctx),l=o.getTextRects(r,a),h=l;return r!==n&&(h=o.getTextRects(n,a)),i={width:l.width>=h.width?l.width:h.width,height:l.height>=h.height?l.height:h.height},e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new Mi(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,i=a.height}return{width:e,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(t){return t.value})),a=i.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Mi(this.dCtx.ctx).getTextRects(a,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,a=i.globals,s=i.config,r=s.xaxis.type,n=t.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,o){s.yaxis.length>1&&function(t){return-1!==a.collapsedSeriesIndices.indexOf(t)}(o)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var o=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+n/1.75-e.dCtx.yAxisWidthRight,h=o.position-n/1.75+e.dCtx.yAxisWidthLeft,c="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>a.svgWidth-a.translateX-c&&(a.skipLastTimelinelabel=!0),h<-(t.show&&!t.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===r?e.dCtx.gridPad.right(null===(a=String(c(e,o)))||void 0===a?void 0:a.length)?t:e}),d),g=u=c(u,o);if(void 0!==u&&0!==u.length||(u=l.niceMax),e.globals.isBarHorizontal){a=0;var p=e.globals.labels.slice();u=v.getLargestStringFromArr(p),u=c(u,{seriesIndex:n,dataPointIndex:-1,w:e}),g=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,p)}var f=new Mi(t.dCtx.ctx),x="rotate(".concat(r.labels.rotate," 0 0)"),b=f.getTextRects(u,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1),m=b;u!==g&&(m=f.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1)),i.push({width:(h>m.width||h>b.width?h:m.width>b.width?m.width:b.width)+a,height:m.height>b.height?m.height:b.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,a){if(e.show&&void 0!==e.title.text){var s=new Mi(t.dCtx.ctx),r="rotate(".concat(e.title.rotate," 0 0)"),n=s.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);i.push({width:n.width,height:n.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,a=0,s=t.globals.yAxisScale.length>1?10:0,r=new Ri(this.dCtx.ctx),n=function(n,o){var l=t.config.yaxis[o].floating,h=0;n.width>0&&!l?(h=n.width+s,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(o)&&(h=h-n.width-s)):h=l||r.isYAxisHidden(o)?0:5,t.config.yaxis[o].opposite?a+=h:i+=h,e+=h};return t.globals.yLabelsCoords.map((function(t,e){n(t,e)})),t.globals.yTitleCoords.map((function(t,e){n(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,e}}]),t}(),ga=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w,i=e.config,a=e.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.series.length)return 0;var s=function(t){return["bar","rangeBar","candlestick","boxPlot"].includes(t)},r=i.chart.type,n=0,o=s(r)?i.series.length:1;a.comboBarCount>0&&(o=a.comboBarCount),a.collapsedSeries.forEach((function(t){s(t.type)&&(o-=1)})),i.chart.stacked&&(o=1);var l=s(r)||a.comboBarCount>0,h=Math.abs(a.initialMaxX-a.initialMinX);if(l&&a.isXNumeric&&!a.isBarHorizontal&&o>0&&0!==h){h<=3&&(h=a.dataPoints);var c=h/t,d=a.minXDiff&&a.minXDiff/c>0?a.minXDiff/c:0;d>t/2&&(d/=2),(n=d*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),a.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,a=this.dCtx.isSparkline||!i.axisCharts?0:10;["title","subtitle"].forEach((function(s){void 0!==e.config[s].text?a+=e.config[s].margin:a+=t.dCtx.isSparkline||!i.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||i.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight-=s.height+r.height+a,i.translateY+=s.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,a=new Ri(this.dCtx.ctx);i.config.yaxis.forEach((function(s,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||s.floating||a.isYAxisHidden(r)||(s.opposite&&(i.globals.translateX-=e[r].width+t[r].width+parseInt(s.labels.style.fontSize,10)/1.2+12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),pa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new ca(this),this.dimYAxis=new ua(this),this.dimXAxis=new da(this),this.dimGrid=new ga(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return s(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,i=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var a=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,f(e.config.stroke.width)):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var i=p(e,2),a=i[0],s=i[1];t.gridPad[a]=Math.max(s,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(a/2,this.gridPad.top),this.gridPad.bottom=Math.max(a/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var s=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*s,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:a[i].width,index:i}),e.globals.yTitleCoords.push({width:s[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o,n),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,h=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var c=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,h=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,h=0,c=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(r);var d=function(){i.translateX=l+t.datalabelsCoords.width,i.gridHeight=i.svgHeight-t.lgRect.height-h-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(c=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=c,d();break;case"top":i.translateY=this.lgRect.height+c,d();break;case"left":i.translateY=c,i.translateX=this.lgRect.width+l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":i.translateY=c,i.translateX=l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new ia(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,a=0;t.config.legend.show&&!t.config.legend.floating&&(a=20);var s="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[s].offsetY,n=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating){e.gridHeight=e.svgHeight;var o=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(o,e.gridHeight),e.translateY=r,void(e.translateX=n+(e.svgWidth-e.gridWidth)/2)}switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=r-10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+r+10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-a,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+this.lgRect.width+a;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-a-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,i){var a=this.w,s=a.globals.hasXaxisGroups?2:1,r=i.height+t.height+e.height,n=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,o=a.globals.rotateXLabels?22:10,l=a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0;this.xAxisHeight=r*n+s*o+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeightc&&(this.yAxisWidth=c)}}]),t}(),fa=function(){function t(e){i(this,t),this.w=e.w,this.lgCtx=e}return s(t,[{key:"getLegendStyles",value:function(){var t,e,i,a=document.createElement("style");a.setAttribute("type","text/css");var s=(null===(t=this.lgCtx.ctx)||void 0===t||null===(e=t.opts)||void 0===e||null===(i=e.chart)||void 0===i?void 0:i.nonce)||this.w.config.chart.nonce;s&&a.setAttribute("nonce",s);var r=document.createTextNode("\n .apexcharts-flip-y {\n transform: scaleY(-1) translateY(-100%);\n transform-origin: top;\n transform-box: fill-box;\n }\n .apexcharts-flip-x {\n transform: scaleX(-1);\n transform-origin: center;\n transform-box: fill-box;\n }\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-right: 1px;\n }\n\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }\n\n ");return a.appendChild(r),a}},{key:"getLegendDimensions",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(t,e){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var s=null,r=null;if(a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),r=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),r=parseInt(s.getAttribute("rel"),10)-1),e)[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,r)}));else this.hideSeries({seriesEl:s,realIndex:r})}else{var n=a.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(t+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=a.config.plotOptions.pie.donut.labels;new Mi(this.lgCtx.ctx).pathMouseDown(n,null),this.lgCtx.ctx.pie.printDataLabelsInner(n.node,l)}n.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(t){var e=t.realIndex,i=this.w,a=i.globals,s=v.clone(i.config.series);if(a.axisCharts){var r=i.config.yaxis[a.seriesYAxisReverseMap[e]],n={index:e,data:s[e].data.slice(),type:s[e].type||i.config.chart.type};if(r&&r.show&&r.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(e)<0&&(a.ancillaryCollapsedSeries.push(n),a.ancillaryCollapsedSeriesIndices.push(e));else if(a.collapsedSeriesIndices.indexOf(e)<0){a.collapsedSeries.push(n),a.collapsedSeriesIndices.push(e);var o=a.risingSeries.indexOf(e);a.risingSeries.splice(o,1)}}else a.collapsedSeries.push({index:e,data:s[e]}),a.collapsedSeriesIndices.push(e);return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.config.series.length,this._getSeriesBasedOnCollapsedState(s)}},{key:"hideSeries",value:function(t){for(var e=t.seriesEl,i=t.realIndex,a=this.w,s=this.getSeriesAfterCollapsing({realIndex:i}),r=e.childNodes,n=0;n0){for(var r=0;r1;if(this.legendHelpers.appendToForeignObject(),(a||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,i=t.fillcolor,a=this.w,s=document.createElement("span");s.classList.add("apexcharts-legend-marker");var r=a.config.legend.markers.shape||a.config.markers.shape,n=r;Array.isArray(r)&&(n=r[e]);var o=Array.isArray(a.config.legend.markers.size)?parseFloat(a.config.legend.markers.size[e]):parseFloat(a.config.legend.markers.size),l=Array.isArray(a.config.legend.markers.offsetX)?parseFloat(a.config.legend.markers.offsetX[e]):parseFloat(a.config.legend.markers.offsetX),h=Array.isArray(a.config.legend.markers.offsetY)?parseFloat(a.config.legend.markers.offsetY[e]):parseFloat(a.config.legend.markers.offsetY),c=Array.isArray(a.config.legend.markers.strokeWidth)?parseFloat(a.config.legend.markers.strokeWidth[e]):parseFloat(a.config.legend.markers.strokeWidth),d=s.style;if(d.height=2*(o+c)+"px",d.width=2*(o+c)+"px",d.left=l+"px",d.top=h+"px",a.config.legend.markers.customHTML)d.background="transparent",d.color=i[e],Array.isArray(a.config.legend.markers.customHTML)?a.config.legend.markers.customHTML[e]&&(s.innerHTML=a.config.legend.markers.customHTML[e]()):s.innerHTML=a.config.legend.markers.customHTML();else{var g=new Vi(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(n),seriesIndex:e,strokeWidth:c,size:o}),p=window.SVG().addTo(s).size("100%","100%"),f=new Mi(this.ctx).drawMarker(0,0,u(u({},g),{},{pointFillColor:Array.isArray(i)?i[e]:g.pointFillColor,shape:n}));a.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),p.add(f)}return s}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,a=e.globals.seriesNames,s=e.config.legend.markers.fillColors?e.config.legend.markers.fillColors.slice():e.globals.colors.slice();if("heatmap"===e.config.chart.type){var r=e.config.plotOptions.heatmap.colorScale.ranges;a=r.map((function(t){return t.name?t.name:t.from+" - "+t.to})),s=r.map((function(t){return t.color}))}else this.isBarsDistributed&&(a=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(a=e.config.legend.customLegendItems);for(var n=e.globals.legendFormatter,o=e.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var h,c=n(a[l],{seriesIndex:l,w:e}),d=!1,u=!1;if(e.globals.collapsedSeries.length>0)for(var g=0;g0)for(var p=0;p0?l-10:0)+(h>0?h-10:0)}a.style.position="absolute",r=r+t+i.config.legend.offsetX,n=n+e+i.config.legend.offsetY,a.style.left=r+"px",a.style.top=n+"px","right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px");["width","height"].forEach((function(t){a.style[t]&&(a.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new pa(this.ctx),i=e.dimHelpers.getTitleSubtitleCoords("title"),a=e.dimHelpers.getTitleSubtitleCoords("subtitle"),s=0;"top"===t.config.legend.position&&(s=i.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,s)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new Zi(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new Zi(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,a="true"===t.target.getAttribute("data:collapsed"),s=this.w.config.chart.events.legendClick;"function"==typeof s&&s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;"function"==typeof r&&t.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),t}(),ba=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=a.globals.minX,this.maxX=a.globals.maxX}return s(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=e.config.chart.toolbar.offsetY+"px",a.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s\n \n \n\n'),n("zoomOut",this.elZoomOut,'\n \n \n\n');var o=function(i){t.t[i]&&e.config.chart[i].enabled&&r.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'\n \n \n \n':'\n \n \n',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&e.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,'\n \n \n'),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;lthis.wheelDelay&&(this.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){a-i.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,i=this.w;this.minX=i.globals.isRangeBar?i.globals.minY:i.globals.minX,this.maxX=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;var a=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(a){var s,r,n,o=(t.clientX-a.left)/a.width,l=this.minX,h=this.maxX,c=h-l;if(t.deltaY<0){var d=l+o*c;r=d-(s=.5*c)/2,n=d+s/2}else r=l-(s=1.5*c)/2,n=h+s/2;if(!i.globals.isRangeBar){r=Math.max(r,i.globals.initialMinX),n=Math.min(n,i.globals.initialMaxX);var u=.01*(i.globals.initialMaxX-i.globals.initialMinX);if(n-r0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,i,a,s){return"l"===s||"r"===s?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resizing",this.selectionDragging.bind(this,"resizing")))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(u(u({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,a=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i;t.globals.isRangeBar&&(i=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,a=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var s={x:i,y:0,width:a,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(s),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,a=t.width,s=t.height,r=t.translateX,n=void 0===r?0:r,o=t.translateY,l=void 0===o?0:o,h=this.w,c=this.zoomRect,d=this.selectionRect;if(this.dragged||null!==h.globals.selection){var u={transform:"translate("+n+", "+l+")"};h.globals.zoomEnabled&&this.dragged&&(a<0&&(a=1),c.attr({x:e,y:i,width:a,height:s,fill:h.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":h.config.chart.zoom.zoomedArea.fill.opacity,stroke:h.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":h.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":h.config.chart.zoom.zoomedArea.stroke.opacity}),Mi.setAttrs(c.node,u)),h.globals.selectionEnabled&&(d.attr({x:e,y:i,width:a>0?a:0,height:s>0?s:0,fill:h.config.chart.selection.fill.color,"fill-opacity":h.config.chart.selection.fill.opacity,stroke:h.config.chart.selection.stroke.color,"stroke-width":h.config.chart.selection.stroke.width,"stroke-dasharray":h.config.chart.selection.stroke.dashArray,"stroke-opacity":h.config.chart.selection.stroke.opacity}),Mi.setAttrs(d.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.gridRect.getBoundingClientRect(),n=s.startX-1,o=s.startY,l=!1,h=!1,c=s.clientX-r.left-n,d=s.clientY-r.top-o,g={translateX:a.globals.translateX,translateY:a.globals.translateY};return Math.abs(c+n)>a.globals.gridWidth?c=a.globals.gridWidth-n:s.clientX-r.left<0&&(c=n),n>s.clientX-r.left&&(l=!0,c=Math.abs(c)),o>s.clientY-r.top&&(h=!0,d=Math.abs(d)),g=u(u({},g="x"===i?{x:l?n-c:n,y:0,width:c,height:a.globals.gridHeight}:"y"===i?{x:0,y:h?o-d:o,width:a.globals.gridWidth,height:d}:{x:l?n-c:n,y:h?o-d:o,width:c,height:d}),{},{translateX:a.globals.translateX,translateY:a.globals.translateY}),s.drawSelectionRect(g),s.selectionDragging("resizing"),g}},{key:"selectionDragging",value:function(t,e){var i=this,a=this.w;if(e){e.preventDefault();var s=e.detail,r=s.handler,n=s.box,o=n.x,l=n.y;othis.constraints.x2&&(o=this.constraints.x2-n.w),n.y2>this.constraints.y2&&(l=this.constraints.y2-n.h),r.move(o,l);var h=this.xyRatios,c=this.selectionRect,d=0;"resizing"===t&&(d=30);var u=function(t){return parseFloat(c.node.getAttribute(t))},g={x:u("x"),y:u("y"),width:u("width"),height:u("height")};a.globals.selection=g,"function"==typeof a.config.chart.events.selection&&a.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,s,r,n=i.gridRect.getBoundingClientRect(),o=c.node.getBoundingClientRect();a.globals.isRangeBar?(t=a.globals.yAxisScale[0].niceMin+(o.left-n.left)*h.invertedYRatio,e=a.globals.yAxisScale[0].niceMin+(o.right-n.left)*h.invertedYRatio,s=0,r=1):(t=a.globals.xAxisScale.niceMin+(o.left-n.left)*h.xRatio,e=a.globals.xAxisScale.niceMin+(o.right-n.left)*h.xRatio,s=a.globals.yAxisScale[0].niceMin+(n.bottom-o.bottom)*h.yRatio[0],r=a.globals.yAxisScale[0].niceMax-(o.top-n.top)*h.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:s,max:r}};a.config.chart.events.selection(i.ctx,l),a.config.chart.brush.enabled&&void 0!==a.config.chart.events.brushScrolled&&a.config.chart.events.brushScrolled(i.ctx,l)}),d))}}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.xyRatios,n=this.ctx.toolbar;if(s.startX>s.endX){var o=s.startX;s.startX=s.endX,s.endX=o}if(s.startY>s.endY){var l=s.startY;s.startY=s.endY,s.endY=l}var h=void 0,c=void 0;a.globals.isRangeBar?(h=a.globals.yAxisScale[0].niceMin+s.startX*r.invertedYRatio,c=a.globals.yAxisScale[0].niceMin+s.endX*r.invertedYRatio):(h=a.globals.xAxisScale.niceMin+s.startX*r.xRatio,c=a.globals.xAxisScale.niceMin+s.endX*r.xRatio);var d=[],u=[];if(a.config.yaxis.forEach((function(t,e){var i=a.globals.seriesYAxisMap[e][0];d.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.startY),u.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.endY)})),s.dragged&&(s.dragX>10||s.dragY>10)&&h!==c)if(a.globals.zoomEnabled){var g=v.clone(a.globals.initialConfig.yaxis),p=v.clone(a.globals.initialConfig.xaxis);if(a.globals.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),c=Math.floor(c),h<1&&(h=1,c=a.globals.dataPoints),c-h<2&&(c=h+1)),"xy"!==i&&"x"!==i||(p={min:h,max:c}),"xy"!==i&&"y"!==i||g.forEach((function(t,e){g[e].min=u[e],g[e].max=d[e]})),n){var f=n.getBeforeZoomRange(p,g);f&&(p=f.xaxis?f.xaxis:p,g=f.yaxis?f.yaxis:g)}var x={xaxis:p};a.config.chart.group||(x.yaxis=g),s.ctx.updateHelpers._updateOptions(x,!1,s.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&n.zoomCallback(p,g)}else if(a.globals.selectionEnabled){var b,m=null;b={min:h,max:c},"xy"!==i&&"y"!==i||(m=v.clone(a.config.yaxis)).forEach((function(t,e){m[e].min=u[e],m[e].max=d[e]})),a.globals.selection=s.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(s.ctx,{xaxis:b,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,a=e;if(void 0!==i.globals.lastClientPosition.x){var s=i.globals.lastClientPosition.x-a.clientX,r=i.globals.lastClientPosition.y-a.clientY;Math.abs(s)>Math.abs(r)&&s>0?this.moveDirection="left":Math.abs(s)>Math.abs(r)&&s<0?this.moveDirection="right":Math.abs(r)>Math.abs(s)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(s)&&r<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var n=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||a.panScrolled(n,o)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,a=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+a,i=t.globals.maxX+a):"right"===this.moveDirection&&(e=t.globals.minX-a,i=t.globals.maxX-a),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,a=this.xyRatios,s=v.clone(i.globals.initialConfig.yaxis),r=a.xRatio,n=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(r=a.invertedYRatio,n=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(t=n+i.globals.gridWidth/15*r,e=o+i.globals.gridWidth/15*r):"right"===this.moveDirection&&(t=n-i.globals.gridWidth/15*r,e=o-i.globals.gridWidth/15*r),i.globals.isRangeBar||(ti.globals.initialMaxX)&&(t=n,e=o);var l={xaxis:{min:t,max:e}};i.config.chart.group||(l.yaxis=s),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var a=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),a}(),va=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return s(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,a=t.clientX,s=t.clientY,r=this.w,n=i.getBoundingClientRect(),o=n.width,l=n.height,h=o/(r.globals.dataPoints-1),c=l/r.globals.dataPoints,d=this.hasBars();!r.globals.comboCharts&&!d||r.config.xaxis.convertedCatToNumeric||(h=o/r.globals.dataPoints);var u=a-n.left-r.globals.barPadForNumericAxis,g=s-n.top;u<0||g<0||u>o||g>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var p=Math.round(u/h),f=Math.floor(g/c);d&&!r.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(u/h),p-=1);var x=null,b=null,m=r.globals.seriesXvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))})),y=r.globals.seriesYvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))}));if(r.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),k=u*(w.width/o),A=g*(w.height/l);x=(b=this.closestInMultiArray(k,A,m,y)).index,p=b.j,null!==x&&(m=r.globals.seriesXvalues[x],p=(b=this.closestInArray(k,m)).index)}return r.globals.capturedSeriesIndex=null===x?-1:x,(!p||p<1)&&(p=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=f:r.globals.capturedDataPointIndex=p,{capturedSeries:x,j:r.globals.isBarHorizontal?f:p,hoverX:u,hoverY:g}}},{key:"closestInMultiArray",value:function(t,e,i,a){var s=this.w,r=0,n=null,o=-1;s.globals.series.length>1?r=this.getFirstActiveXArray(i):n=0;var l=i[r][0],h=Math.abs(t-l);if(i.forEach((function(e){e.forEach((function(e,i){var a=Math.abs(t-e);a<=h&&(h=a,o=i)}))})),-1!==o){var c=a[r][o],d=Math.abs(e-c);n=r,a.forEach((function(t,i){var a=Math.abs(e-t[o]);a<=d&&(d=a,n=i)}))}return{index:n,j:o}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,i=0,a=t.map((function(t,e){return t.length>0?e:-1})),s=0;s0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=f(t)).sort((function(t,e){var i=Number(t.getAttribute("data:realIndex")),a=Number(e.getAttribute("data:realIndex"));return ai?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var i=Number(t.getAttribute("cx")),a=Number(t.getAttribute("cy")),s=t.getAttribute("shape");return new Mi(this.ctx).getMarkerPath(i,a,s,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s ').concat(i.attrs.name,""),e+="
".concat(i.val,"
")})),m.innerHTML=t+"",v.innerHTML=e+""};n?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?y():(m.innerHTML="",v.innerHTML=""):y()}else m.innerHTML="",v.innerHTML="";null!==p&&(a[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:"");if(n&&f[0]){if(l.config.tooltip.hideEmptySeries){var w=a[e].querySelector(".apexcharts-tooltip-marker"),k=a[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(c)?(w.style.display="none",k.style.display="none"):(w.style.display="block",k.style.display="block")}null==c||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)?f[0].parentNode.style.display="none":f[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)&&(f[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var i=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));a&&(a.classList.add("apexcharts-active"),a.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",n="",o=null,l=null,h={series:a.globals.series,seriesIndex:e,dataPointIndex:i,w:a},c=a.globals.ttZFormatter;null===i?l=a.globals.series[e]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(r=s[e][i],0===s[e].length&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=new $i(this.ctx).isFormatXY()?void 0!==a.config.series[e].data[i]?a.config.series[e].data[i].x:"":void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var d=r;a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?r=new Xi(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(this.ctx).formatDate,w:this.w}):r=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](d,h):a.globals.xLabelFormatter(d,h);return void 0!==a.config.tooltip.x.formatter&&(r=a.globals.ttKeyFormatter(d,h)),a.globals.seriesZ.length>0&&a.globals.seriesZ[e].length>0&&(o=c(a.globals.seriesZ[e][i],a)),n="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(d,h):r,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,a=t.y1,s=t.y2,r=t.w,n=this.ttCtx.getElTooltip(),o=r.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]),n.innerHTML=o({ctx:this.ctx,series:r.globals.series,seriesIndex:e,dataPointIndex:i,y1:a,y2:s,w:r})}}]),t}(),wa=function(){function t(e){i(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return s(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=t-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(null!==e&&(r=a.globals.gridWidth/n*e),null===s||a.globals.isBarHorizontal||(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=r;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Mi.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Mi.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=e.globals.translateX;var s;s=new Mi(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=e.globals.translateY+a,r=i.yaxisTTEls[t].getBoundingClientRect().height,n=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(n-=26),s-=r/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=n+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),n=s.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(t)+o+5,h=parseFloat(e)+o/2;if(l>a.globals.gridWidth/2&&(l=l-n.ttWidth-o-10),l>a.globals.gridWidth-n.ttWidth-10&&(l=a.globals.gridWidth-n.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var c=s.getElGrid().getBoundingClientRect();(l=s.e.clientX-c.left)>a.globals.gridWidth/2&&(l-=s.tooltipRect.ttWidth),(h=s.e.clientY+a.globals.translateY-c.top)>a.globals.gridHeight/2&&(h-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+h>a.globals.gridHeight&&(h=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(l)||(l+=a.globals.translateX,r.style.left=l+"px",r.style.top=h+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),r=0;r0){var g=u.getAttribute("shape"),p=l.getMarkerPath(s,r,g,1.5*c);u.setAttribute("d",p)}this.moveXCrosshairs(s),o.fixedTooltip||this.moveTooltip(s,r,c)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,a=i.w,s=0,r=0,n=a.globals.pointsArray,o=new Zi(this.ctx),l=new Mi(this.ctx);e=o.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var h=i.tooltipUtil.getHoverMarkerSize(e);n[e]&&(s=n[e][t][0],r=n[e][t][1]);var c=i.tooltipUtil.getAllMarkers();if(null!==c)for(var d=0;d0){var b=l.getMarkerPath(s,g,f,h);c[d].setAttribute("d",b)}else c[d].setAttribute("d","")}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,r||a.globals.gridHeight,h)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(r=new Zi(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"']"));n||"number"!=typeof e||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var o=n?parseFloat(n.getAttribute("cx")):0,l=n?parseFloat(n.getAttribute("cy")):0,h=n?parseFloat(n.getAttribute("barWidth")):0,c=a.getElGrid().getBoundingClientRect(),d=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!d&&(o-=s%2!=0?h/2:0),n&&d&&i.globals.comboCharts&&(o-=h/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[t-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[t]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?l-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?l=a.e.clientY-c.top-a.tooltipRect.ttHeight/2:l+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(l=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,l||i.globals.gridHeight)}}]),t}(),ka=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new wa(e)}return s(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Vi(this.ctx),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=f(a),t.config.chart.stacked&&a.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w;"bubble"!==s.config.chart.type&&this.newPointSize(t,e);var r=e.getAttribute("cx"),n=e.getAttribute("cy");if(null!==i&&null!==a&&(r=i,n=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===s.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(r,n,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,a=this.ttCtx,s=t,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=e.config.markers.hover.size,o=0;o0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],i);t[e].setAttribute("d",a)}else t[e].setAttribute("d","M0,0")}}}]),t}(),Aa=function(){function t(e){i(this,t),this.w=e.w;var a=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!a.globals.isBarHorizontal&&"rangeBar"===a.config.chart.type&&a.config.plotOptions.bar.rangeBarGroupRows}return s(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,s=t.y,r=t.type,n=this.ttCtx,o=this.w;if(e.target.classList.contains("apexcharts-".concat(r,"-rect"))){var l=this.getAttr(e,"i"),h=this.getAttr(e,"j"),c=this.getAttr(e,"cx"),d=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),g=this.getAttr(e,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:h,shared:!1,e:e}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=h,a=c+n.tooltipRect.ttWidth/2+u,s=d+n.tooltipRect.ttHeight/2-g/2,n.tooltipPosition.moveXCrosshairs(c+u/2),a>o.globals.gridWidth/2&&(a=c-n.tooltipRect.ttWidth/2+u),n.w.config.tooltip.followCursor){var p=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-p.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),s=o.globals.clientY-p.top-(s>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=t.x,n=t.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var h=parseInt(s.paths.getAttribute("cx"),10),c=parseInt(s.paths.getAttribute("cy"),10),d=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),e=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=v.findAncestor(s.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,e,i),o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=i,r=h,n=c+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var g=l.getElGrid().getBoundingClientRect();n=l.e.clientY+o.globals.translateY-g.top}d<0&&(n=c),l.marker.enlargeCurrentPoint(i,s.paths,r,n)}return{x:r,y:n}}},{key:"handleBarTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=this.ttCtx,o=n.getElTooltip(),l=0,h=0,c=0,d=this.getBarTooltipXY({e:a,opt:s});if(null!==d.j||0!==d.barHeight||0!==d.barWidth){e=d.i;var u=d.j;if(r.globals.capturedSeriesIndex=e,r.globals.capturedDataPointIndex=u,r.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!r.config.tooltip.shared?(h=d.x,c=d.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[e]:r.config.stroke.width,l=h):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(c)&&(c=r.globals.svgHeight-n.tooltipRect.ttHeight),parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),h+n.tooltipRect.ttWidth>r.globals.gridWidth?h-=n.tooltipRect.ttWidth:h<0&&(h=0),n.w.config.tooltip.followCursor){var g=n.getElGrid().getBoundingClientRect();c=n.e.clientY-g.top}null===n.tooltip&&(n.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?n.tooltipPosition.moveXCrosshairs(l+i/2):n.tooltipPosition.moveXCrosshairs(l)),!n.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(c=c+r.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=h+r.globals.translateX+"px",o.style.top=c+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,i=t.e,a=t.opt,s=this.w,r=null,n=this.ttCtx,o=0,l=0,h=0,c=0,d=0,u=i.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){var g=i.target,p=g.getBoundingClientRect(),f=a.elGrid.getBoundingClientRect(),x=p.height;d=p.height;var b=p.width,m=parseInt(g.getAttribute("cx"),10),v=parseInt(g.getAttribute("cy"),10);c=parseFloat(g.getAttribute("barWidth"));var y="touchmove"===i.type?i.touches[0].clientX:i.clientX;r=parseInt(g.getAttribute("j"),10),o=parseInt(g.parentNode.getAttribute("rel"),10)-1;var w=g.getAttribute("data-range-y1"),k=g.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(g.parentNode.getAttribute("data:realIndex"),10));var A=function(t){return s.globals.isXNumeric?m-b/2:e.isVerticalGroupedRangeBar?m+b/2:m-n.dataPointsDividedWidth+b/2},C=function(){return v-n.dataPointsDividedHeight+x/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:r,y1:w?parseInt(w,10):null,y2:k?parseInt(k,10):null,shared:!n.showOnIntersect&&s.config.tooltip.shared,e:i}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(l=y-f.left+15,h=C()):(l=A(),h=i.clientY-f.top-n.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((l=m)0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var a=this.ttCtx,s=this.w,r=s.globals,n=r.seriesYAxisMap[t];if(a.yaxisTooltips[t]&&n.length>0){var o=r.yLabelFormatters[t],l=a.getElGrid().getBoundingClientRect(),h=n[0],c=0;i.yRatio.length>1&&(c=h);var d=(e-l.top)*i.yRatio[c],u=r.maxYArr[h]-r.minYArr[h],g=r.minYArr[h]+(u-d);s.config.yaxis[t].reversed&&(g=r.maxYArr[h]-(u-d)),a.tooltipPosition.moveYCrosshairs(e-l.top),a.yaxisTooltipText[t].innerHTML=o(g),a.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),Sa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.tConfig=a.config.tooltip,this.tooltipUtil=new va(this),this.tooltipLabels=new ya(this),this.tooltipPosition=new wa(this),this.marker=new ka(this),this.intersect=new Aa(this),this.axesTooltip=new Ca(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!a.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return s(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new Qi(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,a=[],s=this.getElTooltip(),r=function(r){var n=document.createElement("div");n.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(r)),n.style.order=i.config.tooltip.inverseOrder?t-r:r+1;var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[r],n.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var a=document.createElement("span");a.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(a),l.appendChild(e)})),n.appendChild(l),s.appendChild(n),a.push(n)},n=0;n0&&this.addPathsEventListeners(g,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(r=r+t.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+t.globals.svgHeight-s-10),e.style.left=r+"px",e.style.top=n+"px",{x:r,y:n,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,a=function(a){var s={paths:t[a],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[a].addEventListener(e,i.onSeriesHover.bind(i,s),{capture:!1,passive:!0})}))},s=0;s=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(t,e)}),20-a))}},{key:"seriesHover",value:function(t,e){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||0===s.globals.dataPoints)||(a.length?a.forEach((function(a){var s=i.getElTooltip(a),r={paths:t.paths,tooltipEl:s,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===i.w.globals.minX&&a.w.globals.maxX===i.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:r,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,a=t.opt,s=t.e,r=e.w,n=this.getElTooltip(e);if(n){if(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=s,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared)if(this.tConfig.onDatasetHover.highlightDataSeries)new Zi(e).toggleSeriesOnHover(s,s.target.parentNode);i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect})}}},{key:"axisChartsTooltips",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=s.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,ln.top+n.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var h=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(h)<0)return void this.handleMouseOut(s)}var c=this.getElTooltip(),d=this.getElXCrosshairs(),u=[];r.config.chart.group&&(u=this.ctx.getSyncedCharts());var g=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;null!==d&&d.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),g&&!this.showOnIntersect||u.length>1)this.handleStickyTooltip(a,o,l,s);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:e,y:i,type:r.config.chart.type});e=f.x,i=f.y,c.style.left=e+"px",c.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:e,y:i});if(this.yaxisTooltips.length)for(var x=0;xl.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(t,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||s.globals.isBarHorizontal){var h=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,h,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,i,a){var s=this.w;if(!this.tConfig.shared&&null===s.globals.series[e][a])return void this.handleMouseOut(i);if(void 0!==s.globals.series[e][a])this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,a,i.ttItems):this.create(t,this,e,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var r=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,r,a,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Mi(this.ctx),i=t.globals.dom.Paper.find(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,A=this.w,C=e;"mouseup"===t.type&&this.markerClick(t,i,a),null===k&&(k=this.tConfig.shared);var S=this.tooltipUtil.hasMarkers(i),L=this.tooltipUtil.getElBars();if(A.config.legend.tooltipHoverFormatter){var M=A.config.legend.tooltipHoverFormatter,P=Array.from(this.legendLabels);P.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var I=0;I0?C.marker.enlargePoints(a):C.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var Y=new Mi(this.ctx),H=A.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var O=0;O0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*k)),w){u=u+d.height/2-b/2-2}var C=e.globals.series[i][a]<0,S=o;switch(this.barCtx.isReversed&&(S=o+(C?c:-c)),f.position){case"center":g=w?C?S-c/2+v:S+c/2-v:C?S-c/2+d.height/2+v:S+c/2+d.height/2-v;break;case"bottom":g=w?C?S-c+v:S+c-v:C?S-c+d.height+b+v:S+c-d.height/2+b-v;break;case"top":g=w?C?S+v:S-v:C?S-d.height/2-v:S+d.height+v}if(this.barCtx.lastActiveBarSerieIndex===s&&x.enabled){var L=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:a}),p.fontSize);r=C?S-L.height/2-v-x.offsetY+18:S+L.height+v+x.offsetY-18;var M=A;n=y+(e.globals.isXNumeric?-h*e.globals.barGroups.length/2:e.globals.barGroups.length*h/2-(e.globals.barGroups.length-1)*h-M)+x.offsetX}return e.config.chart.stacked||(g<0?g=0+b:g+d.height/3>e.globals.gridHeight&&(g=e.globals.gridHeight-b)),{bcx:l,bcy:o,dataLabelsX:u,dataLabelsY:g,totalDataLabelsX:n,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,a=t.i,s=t.j,r=t.realIndex,n=t.bcy,o=t.barHeight,l=t.barWidth,h=t.textRects,c=t.dataLabelsX,d=t.strokeWidth,u=t.dataLabelsConfig,g=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,f=t.offX,x=t.offY,b=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var m,v,y=n-(this.barCtx.isRangeBar?0:b)+o/2+h.height/2+x-3,w="start",k=e.globals.series[a][s]<0,A=i;switch(this.barCtx.isReversed&&(A=i+(k?-l:l),w=k?"start":"end"),g.position){case"center":c=k?A+l/2-f:Math.max(h.width/2,A-l/2)+f;break;case"bottom":c=k?A+l-d-f:A-l+d+f;break;case"top":c=k?A-d-f:A-d+f}if(this.barCtx.lastActiveBarSerieIndex===r&&p.enabled){var C=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:s}),u.fontSize);k?(m=A-d-f-p.offsetX,w="end"):m=A+f+p.offsetX+(this.barCtx.isReversed?-(l+d):d),v=y-h.height/2+C.height/2+p.offsetY+d}return e.config.chart.stacked||("start"===u.textAnchor?c-h.width<0?c=k?h.width+d:d:c+h.width>e.globals.gridWidth&&(c=k?e.globals.gridWidth-d:e.globals.gridWidth-h.width-d):"middle"===u.textAnchor?c-h.width/2<0?c=h.width/2+d:c+h.width/2>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width/2-d):"end"===u.textAnchor&&(c<1?c=h.width+d:c+1>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width-d))),{bcx:i,bcy:n,dataLabelsX:c,dataLabelsY:y,totalDataLabelsX:m,totalDataLabelsY:v,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.i,r=t.j,n=t.textRects,o=t.barHeight,l=t.barWidth,h=t.dataLabelsConfig,c=this.w,d="rotate(0)";"vertical"===c.config.plotOptions.bar.dataLabels.orientation&&(d="rotate(-90, ".concat(e,", ").concat(i,")"));var g=new qi(this.barCtx.ctx),p=new Mi(this.barCtx.ctx),f=h.formatter,x=null,b=c.globals.collapsedSeriesIndices.indexOf(s)>-1;if(h.enabled&&!b){x=p.group({class:"apexcharts-data-labels",transform:d});var m="";void 0!==a&&(m=f(a,u(u({},c),{},{seriesIndex:s,dataPointIndex:r,w:c}))),!a&&c.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(m="");var v=c.globals.series[s][r]<0,y=c.config.plotOptions.bar.dataLabels.position;if("vertical"===c.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(h.textAnchor=v?"end":"start"),"center"===y&&(h.textAnchor="middle"),"bottom"===y&&(h.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels)lMath.abs(l)&&(m=""):n.height/1.6>Math.abs(o)&&(m=""));var w=u({},h);this.barCtx.isHorizontal&&a<0&&("start"===h.textAnchor?w.textAnchor="end":"end"===h.textAnchor&&(w.textAnchor="start")),g.plotDataLabelsText({x:e,y:i,text:m,i:s,j:r,parent:x,dataLabelsConfig:w,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}},{key:"drawTotalDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.realIndex,r=t.textAnchor,n=t.barTotalDataLabelsConfig;this.w;var o,l=new Mi(this.barCtx.ctx);return n.enabled&&void 0!==e&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===s&&(o=l.drawText({x:e,y:i,foreColor:n.style.color,text:a,textAnchor:r,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),o}}]),t}(),Ma=function(){function t(e){i(this,t),this.w=e.w,this.barCtx=e}return s(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[i].length),e.globals.isXNumeric)for(var a=0;ae.globals.minX&&e.globals.seriesX[i][a]0&&(a=l.globals.minXDiff/d),(r=a/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),n=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+(a-r*this.barCtx.seriesLen)/2}return l.globals.barHeight=s,l.globals.barWidth=r,{x:t,y:e,yDivision:i,xDivision:a,barHeight:s,barWidth:r,zeroH:n,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,i,a){var s,r,n,o,l=this.w,h=this.barCtx.ctx.fill,c=null,d=this.barCtx.barOptions.distributed?i:e;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(a){t[e][i]>=a.from&&t[e][i]<=a.to&&(c=a.color)}));return h.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:a,dataPointIndex:i,color:c,value:t[e][i],fillConfig:null===(s=l.config.series[e].data[i])||void 0===s?void 0:s.fill,fillType:null!==(r=l.config.series[e].data[i])&&void 0!==r&&null!==(n=r.fill)&&void 0!==n&&n.type?null===(o=l.config.series[e].data[i])||void 0===o?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[a]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,i){var a=0,s=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"createBorderRadiusArr",value:function(t){var e,i=this.w,a=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,s=t.length,n=0|(null===(e=t[0])||void 0===e?void 0:e.length),o=Array.from({length:s},(function(){return Array(n).fill(a?"top":"none")}));if(a)return o;for(var l=0;l0?(h.push(u),d++):g<0&&(c.push(u),d++)}if(h.length>0&&0===c.length)if(1===h.length)o[h[0]][l]="both";else{var p,f=h[0],x=h[h.length-1],b=r(h);try{for(b.s();!(p=b.n()).done;){var m=p.value;o[m][l]=m===f?"bottom":m===x?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===h.length)if(1===c.length)o[c[0]][l]="both";else{var v,y=Math.max.apply(Math,c),w=Math.min.apply(Math,c),k=r(c);try{for(k.s();!(v=k.n()).done;){var A=v.value;o[A][l]=A===y?"bottom":A===w?"top":"none"}}catch(t){k.e(t)}finally{k.f()}}else if(h.length>0&&c.length>0){var C,S=h[h.length-1],L=r(h);try{for(L.s();!(C=L.n()).done;){var M=C.value;o[M][l]=M===S?"top":"none"}}catch(t){L.e(t)}finally{L.f()}var P,I=Math.max.apply(Math,c),T=r(c);try{for(T.s();!(P=T.n()).done;){var z=P.value;o[z][l]=z===I?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else if(1===d){o[h[0]||c[0]][l]="both"}}return o}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,a=t.x1,s=t.x2,r=t.y1,n=t.y2,o=t.elSeries,l=this.w,h=new Mi(this.barCtx.ctx),c=new Zi(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var d=this.barCtx.barOptions.colors.backgroundBarColors[e],u=h.drawRect(void 0!==a?a:0,void 0!==r?r:0,void 0!==s?s:l.globals.gridWidth,void 0!==n?n:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,i=t.barWidth,a=t.barXPosition,s=t.y1,r=t.y2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.columnWidthOffset&&(x=a-g.config.series[c].data[u].columnWidthOffset/2,f=i+g.config.series[c].data[u].columnWidthOffset);var b=n/2,m=x+b,v=x+f-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001-b*y,r+=.001+b*y;var w=p.move(m,s),k=p.move(m,s),A=p.line(v,s);if(g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1)),w=w+p.line(m,r)+p.line(v,r)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(m,s)+A+A+A+A+A+p.line(m,s)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).yArrj.push(r-b*y),C.yArrjF.push(Math.abs(s-r+n*y)),C.yArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"getBarpaths",value:function(t){var e,i=t.barYPosition,a=t.barHeight,s=t.x1,r=t.x2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.barHeightOffset&&(f=i-g.config.series[c].data[u].barHeightOffset/2,x=a+g.config.series[c].data[u].barHeightOffset);var b=n/2,m=f+b,v=f+x-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001+b*y,r+=.001-b*y;var w=p.move(s,m),k=p.move(s,m);g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1));var A=p.line(s,v);if(w=w+p.line(r,m)+p.line(r,v)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(s,m)+A+A+A+A+A+p.line(s,m)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).xArrj.push(r+b*y),C.xArrjF.push(Math.abs(s-r-n*y)),C.xArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;a2&&void 0!==arguments[2])||arguments[2]?e:null;return null!=t&&(i=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(t,e,i){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?e:null;return null!=t&&(a=e-t/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(t,e,i,a,s,r){var n=this,l=this.w,h=[],c=function(a,s){var l;h.push((o(l={},t,"x"===t?n.getXForValue(a,e,!1):n.getYForValue(a,i,r,!1)),o(l,"attrs",s),l))};if(l.globals.seriesGoals[a]&&l.globals.seriesGoals[a][s]&&Array.isArray(l.globals.seriesGoals[a][s])&&l.globals.seriesGoals[a][s].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,g={strokeHeight:"x"===t?0:l.globals.markers.size[a],strokeWidth:"x"===t?l.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[a])?d[a][0]:d[a]};c(l.globals.seriesRangeStart[a][s],g),c(l.globals.seriesRangeEnd[a][s],u(u({},g),{},{strokeColor:Array.isArray(d[a])?d[a][1]:d[a]}))}return h}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,a=t.goalX,s=t.goalY,r=t.barWidth,n=t.barHeight,o=new Mi(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var h=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach((function(t){if(t.x>=-1&&t.x<=o.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:n/2,a=i+e+n/2;h=o.drawLine(t.x,a-2*e,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(h)}})):Array.isArray(s)&&s.forEach((function(t){if(t.y>=-1&&t.y<=o.w.globals.gridHeight+1){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:r/2,a=e+i+r/2;h=o.drawLine(a-2*i,t.y,a,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(h)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,i=t.currPaths,a=t.color,s=this.w,r=e.x,n=e.x1,o=e.barYPosition,l=i.x,h=i.x1,c=i.barYPosition,d=o+i.barHeight,u=new Mi(this.barCtx.ctx),g=new v,p=u.move(n,d)+u.line(r,d)+u.line(l,c)+u.line(h,c)+u.line(n,d)+("around"===s.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return u.drawPath({d:p,fill:g.shadeColor(.5,v.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,i=t.i,a=t.j,s=this.w,r=0,n=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map((function(t,e){return e})):(null===(e=s.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=s.globals.seriesPercent[t][a];e&&r++,t-1})),a=this.barCtx.columnGroupIndices,s=a.indexOf(i);return s<0&&(a.push(i),s=a.length-1),{groupIndex:i,columnGroupIndex:s}}}]),t}(),Pa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w;var s=this.w;this.barOptions=s.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=s.config.stroke.width,this.isNullValue=!1,this.isRangeBar=s.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!s.globals.isBarHorizontal&&s.globals.seriesRange.length&&s.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=a,null!==this.xyRatios&&(this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.invertedXRatio=a.invertedXRatio,this.invertedYRatio=a.invertedYRatio,this.baseLineY=a.baseLineY,this.baseLineInvertedY=a.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var r=new Zi(this.ctx);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var n=r.getBarSeriesIndices(),o=new Pi(this.ctx);this.stackedSeriesTotals=o.getStackedSeriesTotals(this.w.config.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}))),this.barHelpers=new Ma(this)}return s(t,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=new Pi(this.ctx,i);t=s.getLogSeries(t),this.series=t,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var n=0,o=0;n0&&(this.visibleI=this.visibleI+1);var w=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[b],this.translationsIndex=b);var A=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var C=this.barHelpers.initialPositions();p=C.y,w=C.barHeight,h=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,l=C.xDivision,c=C.zeroH,this.isHorizontal||x.push(g+k/2);var S=a.group({class:"apexcharts-datalabels","data:realIndex":b});i.globals.delayedElements.push({el:S.node}),S.node.classList.add("apexcharts-element-hidden");var L=a.group({class:"apexcharts-bar-goals-markers"}),M=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");for(var P=0;P0){var R=this.barHelpers.drawBarShadow({color:"string"==typeof X&&-1===(null==X?void 0:X.indexOf("url"))?X:v.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});if(M.add(R),i.config.chart.dropShadow.enabled)new Li(this.ctx).dropShadow(R,i.config.chart.dropShadow,b)}this.pathArr.push(T);var E=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:w,barWidth:k});E&&L.add(E),p=T.y,g=T.x,P>0&&x.push(g+k/2),f.push(p),this.renderSeries({realIndex:b,pathFill:X,j:P,i:n,columnGroupIndex:m,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:I,elSeries:y,x:g,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:w),barWidth:Math.abs(T.barWidth?T.barWidth:k),elDataLabelsWrap:S,elGoalsMarkers:L,elBarShadows:M,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[b]=x,i.globals.seriesYvalues[b]=f,r.add(y)}return r}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,a=t.lineFill,s=t.j,r=t.i,n=t.columnGroupIndex,o=t.pathFrom,l=t.pathTo,h=t.strokeWidth,c=t.elSeries,d=t.x,u=t.y,g=t.y1,p=t.y2,f=t.series,x=t.barHeight,b=t.barWidth,m=t.barXPosition,v=t.barYPosition,y=t.elDataLabelsWrap,w=t.elGoalsMarkers,k=t.elBarShadows,A=t.visibleSeries,C=t.type,S=t.classes,L=this.w,M=new Mi(this.ctx);if(!a){var P="function"==typeof L.globals.stroke.colors[e]?function(t){var e,i=L.config.stroke.colors;return Array.isArray(i)&&i.length>0&&((e=i[t])||(e=""),"function"==typeof e)?e({value:L.globals.series[t][s],dataPointIndex:s,w:L}):e}(e):L.globals.stroke.colors[e];a=this.barOptions.distributed?L.globals.stroke.colors[s]:P}L.config.series[r].data[s]&&L.config.series[r].data[s].strokeColor&&(a=L.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var I=s/L.config.chart.animations.animateGradually.delay*(L.config.chart.animations.speed/L.globals.dataPoints)/2.4,T=M.renderPaths({i:r,j:s,realIndex:e,pathFrom:o,pathTo:l,stroke:a,strokeWidth:h,strokeLineCap:L.config.stroke.lineCap,fill:i,animationDelay:I,initialSpeed:L.config.chart.animations.speed,dataChangeSpeed:L.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(C,"-area ").concat(S),chartType:C});T.attr("clip-path","url(#gridRectBarMask".concat(L.globals.cuid,")"));var z=L.config.forecastDataPoints;z.count>0&&s>=L.globals.dataPoints-z.count&&(T.node.setAttribute("stroke-dasharray",z.dashArray),T.node.setAttribute("stroke-width",z.strokeWidth),T.node.setAttribute("fill-opacity",z.fillOpacity)),void 0!==g&&void 0!==p&&(T.attr("data-range-y1",g),T.attr("data-range-y2",p)),new Li(this.ctx).setSelectionFilter(T,e,s),c.add(T);var X=new La(this).handleBarDataLabels({x:d,y:u,y1:g,y2:p,i:r,j:s,series:f,realIndex:e,columnGroupIndex:n,barHeight:x,barWidth:b,barXPosition:m,barYPosition:v,renderedPath:T,visibleSeries:A});return null!==X.dataLabels&&y.add(X.dataLabels),X.totalDataLabels&&y.add(X.totalDataLabels),c.add(y),w&&c.add(w),k&&c.add(k),c}},{key:"drawBarPaths",value:function(t){var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.yDivision,h=t.elSeries,c=this.w,d=i.i,u=i.j;if(c.globals.isXNumeric)e=(o=(c.globals.seriesX[d][u]-c.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var g=0,p=0;c.globals.seriesPercent.forEach((function(t,e){t[u]&&g++,e0&&(a=this.seriesLen*a/g),e=o+a*this.visibleI,e-=a*p}else e=o+a*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[d][u],r)-r)/2),n=this.barHelpers.getXForValue(this.series[d][u],r);var f=this.barHelpers.getBarpaths({barYPosition:e,barHeight:a,x1:r,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:d,j:u,w:c});return c.globals.isXNumeric||(o+=l),this.barHelpers.barBackground({j:u,i:d,y1:e-a*this.visibleI,y2:a*this.seriesLen,elSeries:h}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x1:r,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",r,null,d,u),barYPosition:e,barHeight:a}}},{key:"drawColumnPaths",value:function(t){var e,i=t.indexes,a=t.x,s=t.y,r=t.xDivision,n=t.barWidth,o=t.zeroH,l=t.strokeWidth,h=t.elSeries,c=this.w,d=i.realIndex,u=i.translationsIndex,g=i.i,p=i.j,f=i.bc;if(c.globals.isXNumeric){var x=this.getBarXForNumericXAxis({x:a,j:p,realIndex:d,barWidth:n});a=x.x,e=x.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var b=this.barHelpers.getZeroValueEncounters({i:g,j:p}),m=b.nonZeroColumns,v=b.zeroEncounters;m>0&&(n=this.seriesLen*n/m),e=a+n*this.visibleI,e-=n*v}else e=a+n*this.visibleI;s=this.barHelpers.getYForValue(this.series[g][p],o,u);var y=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:n,y1:o,y2:s,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:d,i:g,j:p,w:c});return c.globals.isXNumeric||(a+=r),this.barHelpers.barBackground({bc:f,j:p,i:g,x1:e-l/2-n*this.visibleI,x2:n*this.seriesLen+l/2,elSeries:h}),{pathTo:y.pathTo,pathFrom:y.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,g,p,u),barXPosition:e,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,i=t.barWidth,a=t.realIndex,s=t.j,r=this.w,n=a;return r.globals.seriesX[a].length||(n=r.globals.maxValsInArrayIndex),v.isNumber(r.globals.seriesX[n][s])&&(e=(r.globals.seriesX[n][s]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:e+i*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var i,a=this.w,s=0;s0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==a.globals.previousPaths[s].paths[e]&&(i=a.globals.previousPaths[s].paths[e].d)}return i}}]),t}(),Ia=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this,a=this.w;this.graphics=new Mi(this.ctx),this.bar=new Pa(this.ctx,this.xyRatios);var s=new Pi(this.ctx,a);t=s.getLogSeries(t),this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===a.config.chart.stackType&&(t=a.globals.comboCharts?e.map((function(t){return a.globals.seriesPercent[t]})):a.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);for(var r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),n=0,o=0,l=function(s,l){var h=void 0,c=void 0,d=void 0,g=void 0,p=a.globals.comboCharts?e[s]:s,f=i.barHelpers.getGroupIndex(p),x=f.groupIndex,b=f.columnGroupIndex;i.groupCtx=i[a.globals.seriesGroups[x]];var m=[],y=[],w=0;i.yRatio.length>1&&(i.yaxisIndex=a.globals.seriesYAxisReverseMap[p][0],w=p),i.isReversed=a.config.yaxis[i.yaxisIndex]&&a.config.yaxis[i.yaxisIndex].reversed;var k=i.graphics.group({class:"apexcharts-series",seriesName:v.escapeString(a.globals.seriesNames[p]),rel:s+1,"data:realIndex":p});i.ctx.series.addCollapsedClassToSeries(k,p);var A=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),C=i.graphics.group({class:"apexcharts-bar-goals-markers"}),S=0,L=0,M=i.initialPositions(n,o,h,c,d,g,w);o=M.y,S=M.barHeight,c=M.yDivision,g=M.zeroW,n=M.x,L=M.barWidth,h=M.xDivision,d=M.zeroH,a.globals.barHeight=S,a.globals.barWidth=L,i.barHelpers.initializeStackedXYVars(i),1===i.groupCtx.prevY.length&&i.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(i.groupCtx.prevY[0]=i.groupCtx.prevY[0].map((function(){return d})),i.groupCtx.prevYF[0]=i.groupCtx.prevYF[0].map((function(){return 0})));for(var P=0;P0||"top"===i.barHelpers.arrBorderRadius[p][P]&&a.globals.series[p][P]<0)&&(E=Y),k=i.renderSeries({realIndex:p,pathFill:R,j:P,i:s,columnGroupIndex:b,pathFrom:z.pathFrom,pathTo:z.pathTo,strokeWidth:I,elSeries:k,x:n,y:o,series:t,barHeight:S,barWidth:L,elDataLabelsWrap:A,elGoalsMarkers:C,type:"bar",visibleSeries:b,classes:E})}a.globals.seriesXvalues[p]=m,a.globals.seriesYvalues[p]=y,i.groupCtx.prevY.push(i.groupCtx.yArrj),i.groupCtx.prevYF.push(i.groupCtx.yArrjF),i.groupCtx.prevYVal.push(i.groupCtx.yArrjVal),i.groupCtx.prevX.push(i.groupCtx.xArrj),i.groupCtx.prevXF.push(i.groupCtx.xArrjF),i.groupCtx.prevXVal.push(i.groupCtx.xArrjVal),r.add(k)},h=0,c=0;h1?l=(i=h.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(d).indexOf("%")?l=parseInt(d,10):l*=parseInt(d,10)/100,s=this.isReversed?this.baseLineY[n]:h.globals.gridHeight-this.baseLineY[n],t=h.globals.padHorizontal+(i-l)/2}var u=h.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:i,barHeight:o/u,barWidth:l/u,zeroH:s,zeroW:r}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.columnGroupIndex,h=t.seriesGroup,c=t.yDivision,d=t.elSeries,u=this.w,g=o+l*a,p=i.i,f=i.j,x=i.realIndex,b=i.translationsIndex,m=0,v=0;v0){var w=r;this.groupCtx.prevXVal[y-1][f]<0?w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[y-1][f]:this.groupCtx.prevXVal[y-1][f]>=0&&(w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]:this.groupCtx.prevX[y-1][f]-m+2*(this.isReversed?m:0)),e=w}else e=r;n=null===this.series[p][f]?e:e+this.series[p][f]/this.invertedYRatio-2*(this.isReversed?this.series[p][f]/this.invertedYRatio:0);var k=this.barHelpers.getBarpaths({barYPosition:g,barHeight:a,x1:e,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,seriesGroup:h,i:p,j:f,w:u});return this.barHelpers.barBackground({j:f,i:p,y1:g,y2:a,elSeries:d}),o+=c,{pathTo:k.pathTo,pathFrom:k.pathFrom,goalX:this.barHelpers.getGoalValues("x",r,null,p,f,b),barXPosition:e,barYPosition:g,x:n,y:o}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,r=t.barWidth,n=t.zeroH,o=t.columnGroupIndex,l=t.seriesGroup,h=t.elSeries,c=this.w,d=e.i,u=e.j,g=e.bc,p=e.realIndex,f=e.translationsIndex;if(c.globals.isXNumeric){var x=c.globals.seriesX[p][u];x||(x=0),i=(x-c.globals.minX)/this.xRatio-r/2*c.globals.barGroups.length}for(var b,m=i+o*r,v=0,y=0;y0&&!c.globals.isXNumeric||w>0&&c.globals.isXNumeric&&c.globals.seriesX[p-1][u]===c.globals.seriesX[p][u]){var k,A,C,S=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var L=1;L=0?C-v+2*(this.isReversed?v:0):C;break}if((null===(T=this.groupCtx.prevYVal[w-P])||void 0===T?void 0:T[u])>=0){A=this.series[d][u]>=0?C:C+v-2*(this.isReversed?v:0);break}}void 0===A&&(A=c.globals.gridHeight),b=null!==(k=this.groupCtx.prevYF[0])&&void 0!==k&&k.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?n:A}else b=n;a=this.series[d][u]?b-this.series[d][u]/this.yRatio[f]+2*(this.isReversed?this.series[d][u]/this.yRatio[f]:0):b;var z=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:r,y1:b,y2:a,yRatio:this.yRatio[f],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:d,j:u,w:c});return this.barHelpers.barBackground({bc:g,j:u,i:d,x1:m,x2:r,elSeries:h}),{pathTo:z.pathTo,pathFrom:z.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,n,d,u),barXPosition:m,x:c.globals.isXNumeric?i:i+s,y:a}}}]),a}(),Ta=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e,i){var a=this,s=this.w,r=new Mi(this.ctx),n=s.globals.comboCharts?e:s.config.chart.type,o=new ji(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=s.config.plotOptions.bar.horizontal;var l=new Pi(this.ctx,s);t=l.getLogSeries(t),this.series=t,this.yRatio=l.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var h=r.group({class:"apexcharts-".concat(n,"-series apexcharts-plot-series")}),c=function(e){a.isBoxPlot="boxPlot"===s.config.chart.type||"boxPlot"===s.config.series[e].type;var n,l,c,d,g=void 0,p=void 0,f=[],x=[],b=s.globals.comboCharts?i[e]:e,m=a.barHelpers.getGroupIndex(b).columnGroupIndex,y=r.group({class:"apexcharts-series",seriesName:v.escapeString(s.globals.seriesNames[b]),rel:e+1,"data:realIndex":b});a.ctx.series.addCollapsedClassToSeries(y,b),t[e].length>0&&(a.visibleI=a.visibleI+1);var w,k,A=0;a.yRatio.length>1&&(a.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],A=b);var C=a.barHelpers.initialPositions();p=C.y,w=C.barHeight,l=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,n=C.xDivision,c=C.zeroH,x.push(g+k/2);for(var S=r.group({class:"apexcharts-datalabels","data:realIndex":b}),L=r.group({class:"apexcharts-bar-goals-markers"}),M=function(i){var r=a.barHelpers.getStrokeWidth(e,i,b),h=null,v={indexes:{i:e,j:i,realIndex:b,translationsIndex:A},x:g,y:p,strokeWidth:r,elSeries:y};h=a.isHorizontal?a.drawHorizontalBoxPaths(u(u({},v),{},{yDivision:l,barHeight:w,zeroW:d})):a.drawVerticalBoxPaths(u(u({},v),{},{xDivision:n,barWidth:k,zeroH:c})),p=h.y,g=h.x;var C=a.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:h.barYPosition,goalX:h.goalX,goalY:h.goalY,barHeight:w,barWidth:k});C&&L.add(C),i>0&&x.push(g+k/2),f.push(p),h.pathTo.forEach((function(n,l){var c=!a.isBoxPlot&&a.candlestickOptions.wick.useFillColor?h.color[l]:s.globals.stroke.colors[e],d=o.fillPath({seriesNumber:b,dataPointIndex:i,color:h.color[l],value:t[e][i]});a.renderSeries({realIndex:b,pathFill:d,lineFill:c,j:i,i:e,pathFrom:h.pathFrom,pathTo:n,strokeWidth:r,elSeries:y,x:g,y:p,series:t,columnGroupIndex:m,barHeight:w,barWidth:k,elDataLabelsWrap:S,elGoalsMarkers:L,visibleSeries:a.visibleI,type:s.config.chart.type})}))},P=0;Pb.c&&(d=!1);var y=Math.min(b.o,b.c),w=Math.max(b.o,b.c),k=b.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[x][c]-o.globals.minX)/this.xRatio-s/2);var A=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(y=r,w=r):(y=r-y/f,w=r-w/f,m=r-b.h/f,v=r-b.l/f,k=r-b.m/f);var C=l.move(A,r),S=l.move(A+s/2,y);return o.globals.previousPaths.length>0&&(S=this.getPreviousPath(x,c,!0)),C=this.isBoxPlot?[l.move(A,y)+l.line(A+s/2,y)+l.line(A+s/2,m)+l.line(A+s/4,m)+l.line(A+s-s/4,m)+l.line(A+s/2,m)+l.line(A+s/2,y)+l.line(A+s,y)+l.line(A+s,k)+l.line(A,k)+l.line(A,y+n/2),l.move(A,k)+l.line(A+s,k)+l.line(A+s,w)+l.line(A+s/2,w)+l.line(A+s/2,v)+l.line(A+s-s/4,v)+l.line(A+s/4,v)+l.line(A+s/2,v)+l.line(A+s/2,w)+l.line(A,w)+l.line(A,k)+"z"]:[l.move(A,w)+l.line(A+s/2,w)+l.line(A+s/2,m)+l.line(A+s/2,w)+l.line(A+s,w)+l.line(A+s,y)+l.line(A+s/2,y)+l.line(A+s/2,v)+l.line(A+s/2,y)+l.line(A,y)+l.line(A,w-n/2)],S+=l.move(A,y),o.globals.isXNumeric||(i+=a),{pathTo:C,pathFrom:S,x:i,y:w,goalY:this.barHelpers.getGoalValues("y",null,r,h,c,e.translationsIndex),barXPosition:A,color:this.isBoxPlot?p:d?[u]:[g]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var i=t.y,a=t.yDivision,s=t.barHeight,r=t.zeroW,n=t.strokeWidth,o=this.w,l=new Mi(this.ctx),h=e.i,c=e.j,d=this.boxOptions.colors.lower;this.isBoxPlot&&(d=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,g=e.realIndex,p=this.getOHLCValue(g,c),f=r,x=r,b=Math.min(p.o,p.c),m=Math.max(p.o,p.c),v=p.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[g][c]-o.globals.minX)/this.invertedXRatio-s/2);var y=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(b=r,m=r):(b=r+b/u,m=r+m/u,f=r+p.h/u,x=r+p.l/u,v=r+p.m/u);var w=l.move(r,y),k=l.move(b,y+s/2);return o.globals.previousPaths.length>0&&(k=this.getPreviousPath(g,c,!0)),w=[l.move(b,y)+l.line(b,y+s/2)+l.line(f,y+s/2)+l.line(f,y+s/2-s/4)+l.line(f,y+s/2+s/4)+l.line(f,y+s/2)+l.line(b,y+s/2)+l.line(b,y+s)+l.line(v,y+s)+l.line(v,y)+l.line(b+n/2,y),l.move(v,y)+l.line(v,y+s)+l.line(m,y+s)+l.line(m,y+s/2)+l.line(x,y+s/2)+l.line(x,y+s-s/4)+l.line(x,y+s/4)+l.line(x,y+s/2)+l.line(m,y+s/2)+l.line(m,y)+l.line(v,y)+"z"],k+=l.move(b,y),o.globals.isXNumeric||(i+=a),{pathTo:w,pathFrom:k,x:m,y:i,goalX:this.barHelpers.getGoalValues("x",r,null,h,c),barYPosition:y,color:d}}},{key:"getOHLCValue",value:function(t,e){var i=this.w;return{o:this.isBoxPlot?i.globals.seriesCandleH[t][e]:i.globals.seriesCandleO[t][e],h:this.isBoxPlot?i.globals.seriesCandleO[t][e]:i.globals.seriesCandleH[t][e],m:i.globals.seriesCandleM[t][e],l:this.isBoxPlot?i.globals.seriesCandleC[t][e]:i.globals.seriesCandleL[t][e],c:this.isBoxPlot?i.globals.seriesCandleL[t][e]:i.globals.seriesCandleC[t][e]}}}]),a}(),za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,a){var s=this.w,r=1,n=s.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,i);s.globals.hasNegs||a?r=s.config.plotOptions[t].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):(1-o.percent/100)*(1.25*n):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(r=1-o.percent/100,"treemap"===t&&(r=(1-o.percent/100)*(1.25*n)));var l=o.color,h=new v;if(s.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var c=h.shadeColor(-1*r,o.color);l=v.hexToRgba(v.isColorHex(c)?c:v.rgb2hex(c),s.config.fill.opacity)}else{var d=h.shadeColor(r,o.color);l=v.hexToRgba(v.isColorHex(d)?d:v.rgb2hex(d),s.config.fill.opacity)}return{color:l,colorProps:o}}},{key:"determineColor",value:function(t,e,i){var a=this.w,s=a.globals.series[e][i],r=a.config.plotOptions[t],n=r.colorScale.inverse?i:e;r.distributed&&"treemap"===a.config.chart.type&&(n=i);var o=a.globals.colors[n],l=null,h=Math.min.apply(Math,f(a.globals.series[e])),c=Math.max.apply(Math,f(a.globals.series[e]));r.distributed||"heatmap"!==t||(h=a.globals.minY,c=a.globals.maxY),void 0!==r.colorScale.min&&(h=r.colorScale.mina.globals.maxY?r.colorScale.max:a.globals.maxY);var d=Math.abs(c)+Math.abs(h),u=100*s/(0===d?d-1e-6:d);r.colorScale.ranges.length>0&&r.colorScale.ranges.map((function(t,e){if(s>=t.from&&s<=t.to){o=t.color,l=t.foreColor?t.foreColor:null,h=t.from,c=t.to;var i=Math.abs(c)+Math.abs(h);u=100*s/(0===i?i-1e-6:i)}}));return{color:o,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,a=t.y,s=t.i,r=t.j,n=t.colorProps,o=t.fontSize,l=this.w.config.dataLabels,h=new Mi(this.ctx),c=new qi(this.ctx),d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});var u=l.offsetX,g=l.offsetY,p=i+u,f=a+parseFloat(l.style.fontSize)/3+g;c.plotDataLabelsText({x:p,y:f,text:e,i:s,j:r,color:n.foreColor,parent:d,fontSize:o,dataLabelsConfig:l})}return d}},{key:"addListeners",value:function(t){var e=new Mi(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),Xa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w,this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new za(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return s(t,[{key:"draw",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var s=e.globals.gridWidth/e.globals.dataPoints,r=e.globals.gridHeight/e.globals.series.length,n=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var h=o?0:l.length-1;o?h=0;o?h++:h--){var c=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:v.escapeString(e.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(this.ctx.series.addCollapsedClassToSeries(c,h),e.config.chart.dropShadow.enabled){var d=e.config.chart.dropShadow;new Li(this.ctx).dropShadow(c,d,h)}for(var u=0,g=e.config.plotOptions.heatmap.shadeIntensity,p=0;p-1&&this.pieClicked(d),i.config.dataLabels.enabled){var w=m.x,k=m.y,A=100*g/this.fullAngle+"%";if(0!==g&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(h=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(h)>this.fullAngle&&(h-=this.fullAngle);var c=Math.PI*(h-90)/180,d=i.centerX+r*Math.cos(l),u=i.centerY+r*Math.sin(l),g=i.centerX+r*Math.cos(c),p=i.centerY+r*Math.sin(c),f=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,h),x=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),b=s>180?1:0,m=["M",d,u,"A",r,r,0,b,1,g,p];return e="donut"===i.chartType?[].concat(m,["L",f.x,f.y,"A",i.donutSize,i.donutSize,0,b,0,x.x,x.y,"L",d,u,"z"]).join(" "):"pie"===i.chartType||"polarArea"===i.chartType?[].concat(m,["L",i.centerX,i.centerY,"L",d,u]).join(" "):[].concat(m).join(" "),n.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new ta(this.ctx),a=new Mi(this.ctx),s=new Ra(this.ctx),r=a.group(),n=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),h=o.result.length;this.maxY=o.niceMax;for(var c=e.globals.radialSize,d=c/(h-1),u=0;u1&&t.total.show&&(s=t.total.color);var n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,r),a||"function"!=typeof t.total.formatter||(i=t.total.formatter(r));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,r):"",null!==n&&(n.textContent=e),null!==o&&(o.textContent=i),null!==n&&(n.style.fill=s)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,a=t.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,s,a,t);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,a=new Mi(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(0!==s.strokeWidth){for(var r=[],n=360/i.globals.series.length,o=0;o0&&(f=e.getPreviousPath(n));for(var x=0;x=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?s-=10:t.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,a=0;a0&&parseInt(s.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[a].paths[0]&&(i=e.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var a=[],s=0;s=360&&(u=360-Math.abs(this.startAngle)-.1);var g=i.drawPath({d:"",stroke:c,strokeWidth:n*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){var p=h.dropShadow;s.dropShadow(g,p)}l.add(g),g.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(g,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:d,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return a}},{key:"drawArcs",value:function(t){var e=this.w,i=new Mi(this.ctx),a=new ji(this.ctx),s=new Li(this.ctx),r=i.group(),n=this.getStrokeWidth(t);t.size=t.size-n/2;var o=e.config.plotOptions.radialBar.hollow.background,l=t.size-n*t.series.length-this.margin*t.series.length-n*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(t,r,l,o));var c=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:o||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var d=e.config.plotOptions.radialBar.hollow.dropShadow;s.dropShadow(c,d)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var g=null;if(this.radialDataLabels.show){var p=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");g=this.renderInnerDataLabels(p,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})}"back"===e.config.plotOptions.radialBar.hollow.position&&(r.add(c),g&&r.add(g));var f=!1;e.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var x=f?t.series.length-1:0;f?x>=0:x100?100:t.series[x])/100,A=Math.round(this.totalAngle*k)+this.startAngle,C=void 0;e.globals.dataChanged&&(w=this.startAngle,C=Math.round(this.totalAngle*v.negToZero(e.globals.previousPaths[x])/100)+w),Math.abs(A)+Math.abs(y)>360&&(A-=.01),Math.abs(C)+Math.abs(w)>360&&(C-=.01);var S=A-y,L=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[x]:e.config.stroke.dashArray,M=i.drawPath({d:"",stroke:m,strokeWidth:n,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+x,strokeDashArray:L});if(Mi.setAttrs(M.node,{"data:angle":S,"data:value":t.series[x]}),e.config.chart.dropShadow.enabled){var P=e.config.chart.dropShadow;s.dropShadow(M,P,x)}if(s.setSelectionFilter(M,0,x),this.addListeners(M,this.radialDataLabels),b.add(M),M.attr({index:0,j:x}),this.barLabels.enabled){var I=v.polarToCartesian(t.centerX,t.centerY,t.size,y),T=this.barLabels.formatter(e.globals.seriesNames[x],{seriesIndex:x,w:e}),z=["apexcharts-radialbar-label"];this.barLabels.onClick||z.push("apexcharts-no-click");var X=this.barLabels.useSeriesColors?e.globals.colors[x]:e.config.chart.foreColor;X||(X=e.config.chart.foreColor);var R=I.x+this.barLabels.offsetX,E=I.y+this.barLabels.offsetY,Y=i.drawText({x:R,y:E,text:T,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:X,cssClass:z.join(" ")});Y.on("click",this.onBarLabelClick),Y.attr({rel:x+1}),0!==y&&Y.attr({"transform-origin":"".concat(R," ").concat(E),transform:"rotate(".concat(y," 0 0)")}),b.add(Y)}var H=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(H=e.config.chart.animations.speed),e.globals.dataChanged&&(H=e.config.chart.animations.dynamicAnimation.speed),this.animDur=H/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(M,{centerX:t.centerX,centerY:t.centerY,endAngle:A,startAngle:y,prevEndAngle:C,prevStartAngle:w,size:t.size,i:x,totalItems:2,animBeginArr:this.animBeginArr,dur:H,shouldSetPrevPaths:!0})}return{g:r,elHollow:c,dataLabels:g}}},{key:"drawHollow",value:function(t){var e=new Mi(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,a){var s=this.w,r=new ji(this.ctx),n=v.randomId(),o=s.config.plotOptions.radialBar.hollow.image;if(s.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:o,patternID:"pattern".concat(s.globals.cuid).concat(n)}),a="url(#pattern".concat(s.globals.cuid).concat(n,")");else{var l=s.config.plotOptions.radialBar.hollow.imageWidth,h=s.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===h){var c=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-e.width/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+s.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(c)}else{var d=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-l/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-h/2+s.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,h)}));e.add(d)}}return a}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,i=this.barLabels.onClick,a=this.w;i&&i(a.globals.seriesNames[e],{w:a,seriesIndex:e})}}]),r}(),Oa=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var s=a.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),r=0;r0&&(this.visibleI=this.visibleI+1);var x=0,b=0,m=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[g][0],m=g);var y=this.barHelpers.initialPositions();d=y.y,h=y.zeroW,c=y.x,b=y.barWidth,x=y.barHeight,n=y.xDivision,o=y.yDivision,l=y.zeroH;for(var w=a.group({class:"apexcharts-datalabels","data:realIndex":g}),k=a.group({class:"apexcharts-rangebar-goals-markers"}),A=0;A0}));return this.isHorizontal?(a=u.config.plotOptions.bar.rangeBarGroupRows?r+h*b:r+o*this.visibleI+h*b,m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(a=(o=d.barHeight/g.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+g.indexOf(p))+h*b)):(b>-1&&!u.globals.timescaleLabels.length&&(s=u.config.plotOptions.bar.rangeBarGroupRows?n+c*b:n+l*this.visibleI+c*b),m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(s=(l=d.barWidth/g.length)*this.visibleI+c*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+g.indexOf(p))+c*b)),{barYPosition:a,barXPosition:s,barHeight:o,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.xDivision,s=t.barWidth,r=t.barXPosition,n=t.zeroH,o=this.w,l=e.i,h=e.j,c=e.realIndex,d=e.translationsIndex,u=this.yRatio[d],g=this.getRangeValue(c,h),p=Math.min(g.start,g.end),f=Math.max(g.start,g.end);void 0===this.series[l][h]||null===this.series[l][h]?p=n:(p=n-p/u,f=n-f/u);var x=Math.abs(f-p),b=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:s,y1:p,y2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:c,i:c,j:h,w:o});if(o.globals.isXNumeric){var m=this.getBarXForNumericXAxis({x:i,j:h,realIndex:c,barWidth:s});i=m.x,r=m.barXPosition}else i+=a;return{pathTo:b.pathTo,pathFrom:b.pathFrom,barHeight:x,x:i,y:g.start<0&&g.end<0?p:f,goalY:this.barHelpers.getGoalValues("y",null,n,l,h,d),barXPosition:r}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,a=t.y1,s=t.y2,r=t.yDivision,n=t.barHeight,o=t.barYPosition,l=t.zeroW,h=this.w,c=e.realIndex,d=e.j,u=this.preventBarOverflow(l+a/this.invertedYRatio),g=this.preventBarOverflow(l+s/this.invertedYRatio),p=this.getRangeValue(c,d),f=Math.abs(g-u),x=this.barHelpers.getBarpaths({barYPosition:o,barHeight:n,x1:u,x2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:c,realIndex:c,j:d,w:h});return h.globals.isXNumeric||(i+=r),{pathTo:x.pathTo,pathFrom:x.pathFrom,barWidth:f,x:p.start<0&&p.end<0?u:g,goalX:this.barHelpers.getGoalValues("x",l,null,c,d),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}}]),a}(),Fa=function(){function t(e){i(this,t),this.w=e.w,this.lineCtx=e}return s(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new Pi(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,a=t.x,s=t.y,r=t.i,n=t.j,o=t.prevY,l=this.w,h=[],c=[];if(0===n){var d=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(d=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),h.push(d),c.push(v.isNumber(e[r][0])?o+l.config.markers.offsetY:null),h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null)}else h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null);return{x:h,y:c}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,a=t.realIndex,s=this.w,r=0;r0&&parseInt(n.realIndex,10)===parseInt(a,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,e=s.globals.previousPaths[r].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[r].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[r].paths[1]&&(e=s.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e,i,a,s=t.i,r=t.realIndex,n=t.series,o=t.prevY,l=t.lineYPosition,h=t.translationsIndex,c=this.w,d=c.config.chart.stacked&&!c.globals.comboCharts||c.config.chart.stacked&&c.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[r])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[r])||void 0===i?void 0:i.type));if(void 0!==(null===(a=n[s])||void 0===a?void 0:a[0]))o=(l=d&&s>0?this.lineCtx.prevSeriesY[s-1][0]:this.lineCtx.zeroY)-n[s][0]/this.lineCtx.yRatio[h]+2*(this.lineCtx.isReversed?n[s][0]/this.lineCtx.yRatio[h]:0);else if(d&&s>0&&void 0===n[s][0])for(var u=s-1;u>=0;u--)if(null!==n[u][0]&&void 0!==n[u][0]){o=l=this.lineCtx.prevSeriesY[u][0];break}return{prevY:o,lineYPosition:l}}}]),t}(),Da=function(t){for(var e,i,a,s,r=function(t){for(var e=[],i=t[0],a=t[1],s=e[0]=Wa(i,a),r=1,n=t.length-1;r9&&(s=3*a/Math.sqrt(s),r[l]=s*e,r[l+1]=s*i);for(var h=0;h<=n;h++)s=(t[Math.min(n,h+1)][0]-t[Math.max(0,h-1)][0])/(6*(1+r[h]*r[h])),o.push([s||0,r[h]*s||0]);return o},_a=function(t){var e=Da(t),i=t[1],a=t[0],s=[],r=e[1],n=e[0];s.push(a,[a[0]+n[0],a[1]+n[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(var o=2,l=e.length;o1&&a[1].length<6){var s=a[0].length;a[1]=[2*a[0][s-2]-a[0][s-4],2*a[0][s-1]-a[0][s-3]].concat(a[1])}a[0]=a[0].slice(-2)}return a};function Wa(t,e){return(e[1]-t[1])/(e[0]-t[0])}var Ba=function(){function t(e,a,s){i(this,t),this.ctx=e,this.w=e.w,this.xyRatios=a,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||s,this.scatter=new Ui(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Fa(this),this.markers=new Vi(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return s(t,[{key:"draw",value:function(t,e,i,a){var s,r=this.w,n=new Mi(this.ctx),o=r.globals.comboCharts?e:r.config.chart.type,l=n.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),h=new Pi(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=h.getLogSeries(t),this.yRatio=h.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var c=[],d=0;d1?g:0;this._initSerieVariables(t,d,g);var f=[],x=[],b=[],m=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,g),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(m=(r.globals.seriesX[g][0]-r.globals.minX)/this.xRatio),b.push(m);var v,y=m,w=void 0,k=y,A=this.zeroY,C=this.zeroY;A=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:t,prevY:A,lineYPosition:0,translationsIndex:p}).prevY,"monotoneCubic"===r.config.stroke.curve&&null===t[d][0]?f.push(null):f.push(A),v=A;"rangeArea"===o&&(w=C=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:a,prevY:C,lineYPosition:0,translationsIndex:p}).prevY,x.push(null!==f[0]?C:null));var S=this._calculatePathsFrom({type:o,series:t,i:d,realIndex:g,translationsIndex:p,prevX:k,prevY:A,prevY2:C}),L=[f[0]],M=[x[0]],P={type:o,series:t,realIndex:g,translationsIndex:p,i:d,x:m,y:1,pX:y,pY:v,pathsFrom:S,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:b,yArrj:f,y2Arrj:x,seriesRangeEnd:a},I=this._iterateOverDataPoints(u(u({},P),{},{iterations:"rangeArea"===o?t[d].length-1:void 0,isRangeStart:!0}));if("rangeArea"===o){for(var T=this._calculatePathsFrom({series:a,i:d,realIndex:g,prevX:k,prevY:C}),z=this._iterateOverDataPoints(u(u({},P),{},{series:a,xArrj:[m],yArrj:L,y2Arrj:M,pY:w,areaPaths:I.areaPaths,pathsFrom:T,iterations:a[d].length-1,isRangeStart:!1})),X=I.linePaths.length/2,R=0;R=0;E--)l.add(c[E]);else for(var Y=0;Y1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[r]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",zIndex:void 0!==a.config.series[i].zIndex?a.config.series[i].zIndex:i,seriesName:v.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i});var n=t[e].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,a,s,r=t.type,n=t.series,o=t.i,l=t.realIndex,h=t.translationsIndex,c=t.prevX,d=t.prevY,u=t.prevY2,g=this.w,p=new Mi(this.ctx);if(null===n[o][0]){for(var f=0;f0){var x=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:l});a=x.pathFromLine,s=x.pathFromArea}return{prevX:c,prevY:d,linePath:e,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(t){var e=t.type,i=t.realIndex,a=t.i,s=t.paths,r=this.w,n=new Mi(this.ctx),o=new ji(this.ctx);this.prevSeriesY.push(s.yArrj),r.globals.seriesXvalues[i]=s.xArrj,r.globals.seriesYvalues[i]=s.yArrj;var l=r.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var h=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-l.count-1],c=n.drawRect(h,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(c.node);var d=n.drawRect(0,0,h,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(d.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var g={i:a,realIndex:i,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var p=o.fillPath({seriesNumber:i}),f=0;f0&&"rangeArea"!==e){var A=n.renderPaths(w);A.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&A.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(A),A.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),k.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,i,a=this,s=t.type,r=t.series,n=t.iterations,o=t.realIndex,l=t.translationsIndex,h=t.i,c=t.x,d=t.y,u=t.pX,g=t.pY,p=t.pathsFrom,f=t.linePaths,x=t.areaPaths,b=t.seriesIndex,m=t.lineYPosition,y=t.xArrj,w=t.yArrj,k=t.y2Arrj,A=t.isRangeStart,C=t.seriesRangeEnd,S=this.w,L=new Mi(this.ctx),M=this.yRatio,P=p.prevY,I=p.linePath,T=p.areaPath,z=p.pathFromLine,X=p.pathFromArea,R=v.isNumber(S.globals.minYArr[o])?S.globals.minYArr[o]:S.globals.minY;n||(n=S.globals.dataPoints>1?S.globals.dataPoints-1:S.globals.dataPoints);var E=function(t,e){return e-t/M[l]+2*(a.isReversed?t/M[l]:0)},Y=d,H=S.config.chart.stacked&&!S.globals.comboCharts||S.config.chart.stacked&&S.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[o])||void 0===i?void 0:i.type)),O=S.config.stroke.curve;Array.isArray(O)&&(O=Array.isArray(b)?O[b[h]]:O[h]);for(var F,D=0,_=0;_0&&S.globals.collapsedSeries.length0;e--){if(!(S.globals.collapsedSeriesIndices.indexOf((null==b?void 0:b[e])||e)>-1))return e;e--}return 0}(h-1)][_+1]}else m=this.zeroY;else m=this.zeroY;N?d=E(R,m):(d=E(r[h][_+1],m),"rangeArea"===s&&(Y=E(C[h][_+1],m))),y.push(c),!N||"smooth"!==S.config.stroke.curve&&"monotoneCubic"!==S.config.stroke.curve?(w.push(d),k.push(Y)):(w.push(null),k.push(null));var B=this.lineHelpers.calculatePoints({series:r,x:c,y:d,realIndex:o,i:h,j:_,prevY:P}),G=this._createPaths({type:s,series:r,i:h,realIndex:o,j:_,x:c,y:d,y2:Y,xArrj:y,yArrj:w,y2Arrj:k,pX:u,pY:g,pathState:D,segmentStartX:F,linePath:I,areaPath:T,linePaths:f,areaPaths:x,curve:O,isRangeStart:A});x=G.areaPaths,f=G.linePaths,u=G.pX,g=G.pY,D=G.pathState,F=G.segmentStartX,T=G.areaPath,I=G.linePath,!this.appendPathFrom||S.globals.hasNullValues||"monotoneCubic"===O&&"rangeArea"===s||(z+=L.line(c,this.areaBottomY),X+=L.line(c,this.areaBottomY)),this.handleNullDataPoints(r,B,h,_,o),this._handleMarkersAndLabels({type:s,pointsPos:B,i:h,j:_,realIndex:o,isRangeStart:A})}return{yArrj:w,xArrj:y,pathFromArea:X,areaPaths:x,pathFromLine:z,linePaths:f,linePath:I,areaPath:T}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,i=t.pointsPos,a=t.isRangeStart,s=t.i,r=t.j,n=t.realIndex,o=this.w,l=new qi(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var h=this.markers.plotChartMarkers(i,n,r+1);null!==h&&this.elPointsMain.add(h)}var c=l.drawDataLabel({type:e,isRangeStart:a,pos:i,i:n,j:r+1});null!==c&&this.elDataLabelsWrap.add(c)}},{key:"_createPaths",value:function(t){var e=t.type,i=t.series,a=t.i;t.realIndex;var s,r=t.j,n=t.x,o=t.y,l=t.xArrj,h=t.yArrj,c=t.y2,d=t.y2Arrj,u=t.pX,g=t.pY,p=t.pathState,f=t.segmentStartX,x=t.linePath,b=t.areaPath,m=t.linePaths,v=t.areaPaths,y=t.curve,w=t.isRangeStart,k=new Mi(this.ctx),A=this.areaBottomY,C="rangeArea"===e,S="rangeArea"===e&&w;switch(y){case"monotoneCubic":var L=w?h:d;switch(p){case 0:if(null===L[r+1])break;p=1;case 1:if(!(C?l.length===i[a].length:r===i[a].length-2))break;case 2:var M=w?l:l.slice().reverse(),P=w?L:L.slice().reverse(),I=(s=P,M.map((function(t,e){return[t,s[e]]})).filter((function(t){return null!==t[1]}))),T=I.length>1?_a(I):I,z=[];C&&(S?v=I:z=v.reverse());var X=0,R=0;if(function(t,e){for(var i=function(t){var e=[],i=0;return t.forEach((function(t){null!==t?i++:i>0&&(e.push(i),i=0)})),i>0&&e.push(i),e}(t),a=[],s=0,r=0;s4?(e+="C".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]),e+=", ".concat(a[4],", ").concat(a[5])):s>2&&(e+="S".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]))}return e}(t),i=R,a=(R+=t.length)-1;S?x=k.move(I[i][0],I[i][1])+e:C?x=k.move(z[i][0],z[i][1])+k.line(I[i][0],I[i][1])+e+k.line(z[a][0],z[a][1]):(x=k.move(I[i][0],I[i][1])+e,b=x+k.line(I[a][0],A)+k.line(I[i][0],A)+"z",v.push(b)),m.push(x)})),C&&X>1&&!S){var E=m.slice(X).reverse();m.splice(X),E.forEach((function(t){return m.push(t)}))}p=0}break;case"smooth":var Y=.35*(n-u);if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.curve(n,o,n,o,n,c)+k.move(n,c)),b+=k.curve(n,o,n,o,n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o;break;default:var F=function(t,e,i){var a=[];switch(t){case"stepline":a=k.line(e,null,"H")+k.line(null,i,"V");break;case"linestep":a=k.line(null,i,"V")+k.line(e,null,"H");break;case"straight":a=k.line(e,i)}return a};if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.line(n,c)),b+=k.line(n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o}return{linePaths:m,areaPaths:v,pX:u,pY:g,pathState:p,segmentStartX:f,linePath:x,areaPath:b}}},{key:"handleNullDataPoints",value:function(t,e,i,a,s){var r=this.w;if(null===t[i][a]&&r.config.markers.showNullDataPoints||1===t[i].length){var n=this.strokeWidth-r.config.markers.strokeWidth/2;n>0||(n=0);var o=this.markers.plotChartMarkers(e,s,a+1,n,!0);null!==o&&this.elPointsMain.add(o)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,a,s){this.xoffset=e,this.yoffset=i,this.height=s,this.width=a,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],a=this.xoffset,s=this.yoffset,n=r(t)/this.height,o=r(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var a=e/this.height,s=this.width-a;i=new t(this.xoffset+a,this.yoffset,s,this.height)}else{var r=e/this.width,n=this.height-r;i=new t(this.xoffset,this.yoffset+r,this.width,n)}return i}}function e(e,a,s,n,o){n=void 0===n?0:n,o=void 0===o?0:o;var l=i(function(t,e){var i,a=[],s=e/r(t);for(i=0;i=n}(e,l=t[0],o)?(e.push(l),i(t.slice(1),e,s,n)):(h=s.cutArea(r(e),n),n.push(s.getCoordinates(e)),i(t,[],h,n)),n;n.push(s.getCoordinates(e))}function a(t,e){var i=Math.min.apply(Math,t),a=Math.max.apply(Math,t),s=r(t);return Math.max(Math.pow(e,2)*a/Math.pow(s,2),Math.pow(s,2)/(Math.pow(e,2)*i))}function s(t){return t&&t.constructor===Array}function r(t){var e,i=0;for(e=0;er-a&&l.width<=n-s){var h=o.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(h.x," ").concat(h.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,i,a,s,r){var n=new Mi(this.ctx),o=n.getTextRects(t,e).width+this.w.config.stroke.width+5>s-i&&r-a>s-i?r-a:s-i,l=n.getTextBasedOnMaxWidth({text:t,maxWidth:o,fontSize:e});return t.length!==l.length&&o/e<5?"":l}},{key:"animateTreemap",value:function(t,e,i,a){var s=new y(this.ctx);s.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,(function(){s.animationCompleted(t)}))}}]),t}(),ja=86400,Va=10/ja,Ua=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return s(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new zi(this.ctx),r=(e-t)/864e5;this.determineInterval(r),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,r5e4&&(a.globals.disableZoomOut=!0);var n=s.getTimeUnitsfromTimestamp(t,e,this.utc),o=a.globals.gridWidth/r,l=o/24,h=l/60,c=h/60,d=Math.floor(24*r),g=Math.floor(1440*r),p=Math.floor(r*ja),f=Math.floor(r),x=Math.floor(r/30),b=Math.floor(r/365),m={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},v={firstVal:m,currentMillisecond:m.minMillisecond,currentSecond:m.minSecond,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:l,minutesWidthOnXAxis:h,secondsWidthOnXAxis:c,numberOfSeconds:p,numberOfMinutes:g,numberOfHours:d,numberOfDays:f,numberOfMonths:x,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var y=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?u(u({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?u(u({},e),{},{value:t.value}):"minute"===t.unit?u(u({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?u(u({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return y.filter((function(t){var e=1,s=Math.ceil(a.globals.gridWidth/120),r=t.value;void 0!==a.config.xaxis.tickAmount&&(s=a.config.xaxis.tickAmount),y.length>s&&(e=Math.floor(y.length/s));var n=!1,o=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(n=!0);break;case"half_year":e=7,"year"===t.unit&&(n=!0);break;case"months":e=1,"year"===t.unit&&(n=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(n=!0),30===r&&(o=!0);break;case"months_days":e=10,"month"===t.unit&&(n=!0),30===r&&(o=!0);break;case"week_days":e=8,"month"===t.unit&&(n=!0);break;case"days":e=1,"month"===t.unit&&(n=!0);break;case"hours":"day"===t.unit&&(n=!0);break;case"minutes_fives":case"seconds_fives":r%5!=0&&(o=!0);break;case"seconds_tens":r%10!=0&&(o=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!o)return!0}else if((r%e==0||n)&&!o)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,a=this.formatDates(t),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new pa(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.daysWidthOnXAxis,r=t.numberOfYears,n=e.minYear,o=0,l=new zi(this.ctx),h="year";if(e.minDate>1||e.minMonth>0){var c=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(l.determineDaysOfYear(e.minYear)-c+1)*s,n=e.minYear+1,this.timeScaleArray.push({position:o,value:n,unit:h,year:n,month:v.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:o,value:n,unit:h,year:a,month:v.monthMod(i+1)});for(var d=n,u=o,g=0;g1){l=(h.determineDaysOfMonths(a+1,e.minYear)-i+1)*r,o=v.monthMod(a+1);var u=s+d,g=v.monthMod(o),p=o;0===o&&(c="year",p=u,g=1,u+=d+=1),this.timeScaleArray.push({position:l,value:p,unit:c,year:u,month:g})}else this.timeScaleArray.push({position:l,value:o,unit:c,year:s,month:v.monthMod(a)});for(var f=o+1,x=l,b=0,m=1;bn.determineDaysOfMonths(e+1,i)?(h=1,o="month",u=e+=1,e):e},d=(24-e.minHour)*s,u=l,g=c(h,i,a);0===e.minHour&&1===e.minDate?(d=0,u=v.monthMod(e.minMonth),o="month",h=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(d=0,l=e.minDate,u=l,g=c(h=l,i,a)),this.timeScaleArray.push({position:d,value:u,unit:o,year:this._getYear(a,g,0),month:v.monthMod(g),day:h});for(var p=d,f=0;fo.determineDaysOfMonths(e+1,s)&&(f=1,e+=1),{month:e,date:f}},c=function(t,e){return t>o.determineDaysOfMonths(e+1,s)?e+=1:e},d=60-(e.minMinute+e.minSecond/60),u=d*r,g=e.minHour+1,p=g;60===d&&(u=0,p=g=e.minHour);var f=i;p>=24&&(p=0,l="day",g=f+=1);var x=h(f,a).month;x=c(f,x),this.timeScaleArray.push({position:u,value:g,unit:l,day:f,hour:p,year:s,month:v.monthMod(x)}),p++;for(var b=u,m=0;m=24)p=0,l="day",x=h(f+=1,x).month,x=c(f,x);var y=this._getYear(s,x,0);b=60*r+b;var w=0===p?f:p;this.timeScaleArray.push({position:b,value:w,unit:l,hour:p,day:f,year:y,month:v.monthMod(x)}),p++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.minutesWidthOnXAxis,h=t.secondsWidthOnXAxis,c=t.numberOfMinutes,d=a+1,u=r,g=n,p=o,f=s,x=(60-i-e/1e3)*h,b=0;b=60&&(d=0,24===(f+=1)&&(f=0)),this.timeScaleArray.push({position:x,value:d,unit:"minute",hour:f,minute:d,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,d++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.secondsWidthOnXAxis,h=t.numberOfSeconds,c=i+1,d=a,u=r,g=n,p=o,f=s,x=(1e3-e)/1e3*l,b=0;b=60&&(c=0,++d>=60&&(d=0,24===++f&&(f=0))),this.timeScaleArray.push({position:x,value:c,unit:"second",hour:f,minute:d,second:c,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,c++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var a=t.value.toString(),s=new zi(e.ctx),r=e.createRawDateString(t,a),n=s.getDate(s.parseDate(r));if(e.utc||(n=s.getDate(s.parseDateWithTimezone(r))),void 0===i.config.xaxis.labels.format){var o="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(o=l.year),"month"===t.unit&&(o=l.month),"day"===t.unit&&(o=l.day),"hour"===t.unit&&(o=l.hour),"minute"===t.unit&&(o=l.minute),"second"===t.unit&&(o=l.second),a=s.formatDate(n,o)}else a=s.formatDate(n,i.config.xaxis.labels.format);return{dateString:r,position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,a=new Mi(this.ctx),s=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(s=!0,e=a.getTextRects(t[0].value).width);var r=0,n=t.map((function(n,o){if(o>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=s?e:a.getTextRects(t[r].value).width,h=t[r].position;return n.position>h+l+10?(r=o,n):null}return n}));return n=n.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),qa=function(){function t(e,a){i(this,t),this.ctx=a,this.w=a.w,this.el=e}return s(t,[{key:"setupElements",value:function(){var t=this.w,e=t.globals,i=t.config,a=i.chart.type;e.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(a),e.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(a),e.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(a)&&i.plotOptions.bar.horizontal,e.chartClass=".apexcharts".concat(e.chartID),e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),Mi.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas ".concat(e.chartClass.substring(1))}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=window.SVG().addTo(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(i.chart.offsetX,", ").concat(i.chart.offsetY,")")}),e.dom.Paper.node.style.background="dark"!==i.theme.mode||i.chart.background?"light"!==i.theme.mode||i.chart.background?i.chart.background:"#fff":"#424242",this.setSVGDimensions(),e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject"),Mi.setAttrs(e.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap),e.dom.Paper.node.appendChild(e.dom.elLegendForeign),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,a=this.ctx,s=i.config,r=i.globals,n={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},o=s.chart.type||"line",l=null,h=0;r.series.forEach((function(e,a){var s=t[a].type||o;n[s]?("rangeArea"===s?(n[s].series.push(r.seriesRangeStart[a]),n[s].seriesRangeEnd.push(r.seriesRangeEnd[a])):n[s].series.push(e),n[s].i.push(a),"column"!==s&&"bar"!==s||(i.globals.columnSeries=n.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(s)?l=s:"bar"===s?(n.column.series.push(e),n.column.i.push(a)):console.warn("You have specified an unrecognized series type (".concat(s,").")),o!==s&&"scatter"!==s&&h++})),h>0&&(l&&console.warn("Chart or series type ".concat(l," cannot appear with other chart or series types.")),n.column.series.length>0&&s.plotOptions.bar.horizontal&&(h-=n.column.series.length,n.column={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||(r.comboCharts=h>0);var c=new Ba(a,e),d=new Ta(a,e);a.pie=new Ea(a);var u=new Ha(a);a.rangeBar=new Oa(a,e);var g=new Ya(a),p=[];if(r.comboCharts){var x,b,m=new Pi(a);if(n.area.series.length>0)(x=p).push.apply(x,f(m.drawSeriesByGroup(n.area,r.areaGroups,"area",c)));if(n.column.series.length>0)if(s.chart.stacked){var v=new Ia(a,e);p.push(v.draw(n.column.series,n.column.i))}else a.bar=new Pa(a,e),p.push(a.bar.draw(n.column.series,n.column.i));if(n.rangeArea.series.length>0&&p.push(c.draw(n.rangeArea.series,"rangeArea",n.rangeArea.i,n.rangeArea.seriesRangeEnd)),n.line.series.length>0)(b=p).push.apply(b,f(m.drawSeriesByGroup(n.line,r.lineGroups,"line",c)));if(n.candlestick.series.length>0&&p.push(d.draw(n.candlestick.series,"candlestick",n.candlestick.i)),n.boxPlot.series.length>0&&p.push(d.draw(n.boxPlot.series,"boxPlot",n.boxPlot.i)),n.rangeBar.series.length>0&&p.push(a.rangeBar.draw(n.rangeBar.series,n.rangeBar.i)),n.scatter.series.length>0){var y=new Ba(a,e,!0);p.push(y.draw(n.scatter.series,"scatter",n.scatter.i))}if(n.bubble.series.length>0){var w=new Ba(a,e,!0);p.push(w.draw(n.bubble.series,"bubble",n.bubble.i))}}else switch(s.chart.type){case"line":p=c.draw(r.series,"line");break;case"area":p=c.draw(r.series,"area");break;case"bar":if(s.chart.stacked)p=new Ia(a,e).draw(r.series);else a.bar=new Pa(a,e),p=a.bar.draw(r.series);break;case"candlestick":p=new Ta(a,e).draw(r.series,"candlestick");break;case"boxPlot":p=new Ta(a,e).draw(r.series,s.chart.type);break;case"rangeBar":p=a.rangeBar.draw(r.series);break;case"rangeArea":p=c.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":p=new Xa(a,e).draw(r.series);break;case"treemap":p=new Ga(a,e).draw(r.series);break;case"pie":case"donut":case"polarArea":p=a.pie.draw(r.series);break;case"radialBar":p=u.draw(r.series);break;case"radar":p=g.draw(r.series);break;default:p=c.draw(r.series)}return p}},{key:"setSVGDimensions",value:function(){var t=this.w,e=t.globals,i=t.config;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto",e.svgWidth=i.chart.width,e.svgHeight=i.chart.height;var a=v.getDimensions(this.el),s=i.chart.width.toString().split(/[0-9]+/g).pop();"%"===s?v.isNumber(a[0])&&(0===a[0].width&&(a=v.getDimensions(this.el.parentNode)),e.svgWidth=a[0]*parseInt(i.chart.width,10)/100):"px"!==s&&""!==s||(e.svgWidth=parseInt(i.chart.width,10));var r=String(i.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===r){var n=v.getDimensions(this.el.parentNode);e.svgHeight=n[1]*parseInt(i.chart.height,10)/100}else e.svgHeight=parseInt(i.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Mi.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==r){var o=i.chart.sparkline.enabled?0:e.axisCharts?i.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(e.svgHeight+o,"px")}e.dom.elWrap.style.width="".concat(e.svgWidth,"px"),e.dom.elWrap.style.height="".concat(e.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i=t.translateX;Mi.setAttrs(t.dom.elGraphical.node,{transform:"translate(".concat(i,", ").concat(e,")")})}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,a=t.config.chart.sparkline.enabled?1:15;a+=t.config.grid.padding.bottom,["top","bottom"].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(i=new xa(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var s=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*t.globals.radialSize;if(s&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var n=v.getBoundingClientRect(s);r=n.bottom;var o=n.bottom-n.top;r=Math.max(2.05*t.globals.radialSize,o)}var l=Math.ceil(r+e.translateY+i+a);e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).includes("%")||(e.dom.elWrap.style.height="".concat(l,"px"),Mi.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(l,"px"))}},{key:"coreCalculations",value:function(){new ea(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(){return[]}))},i=new Bi,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=e(),a.seriesYvalues=e()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var t=this.w,e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new na(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new na(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Ua(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new Pi(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var i=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];i.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){return t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){return t.updateSourceChart(i)})})),e.config.chart.events.selection=function(t,e){i.forEach((function(t){ApexCharts.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:e.xaxis.min,max:e.xaxis.max}},!1,!1,!1,!1)}))}}}}]),t}(),Za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"_updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(n){var o=[e.ctx];s&&(o=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(o=[e.ctx],e.ctx.w.globals.isExecCalled=!1),o.forEach((function(s,l){var h=s.w;if(h.globals.shouldAnimate=a,i||(h.globals.resized=!0,h.globals.dataChanged=!0,a&&s.series.getPreviousPaths()),t&&"object"===b(t)&&(s.config=new Wi(t),t=Pi.extendArrayProps(s.config,t,h),s.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,h.config=v.extend(h.config,t),r&&(h.globals.lastXAxis=t.xaxis?v.clone(t.xaxis):[],h.globals.lastYAxis=t.yaxis?v.clone(t.yaxis):[],h.globals.initialConfig=v.extend({},h.config),h.globals.initialSeries=v.clone(h.config.series),t.series))){for(var c=0;c2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(s){var r,n=i.w;return n.globals.shouldAnimate=e,n.globals.dataChanged=!0,e&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?(0===(r=t.map((function(t,e){return i._extendSeries(t,e)}))).length&&(r=[{data:[]}]),n.config.series=r):n.config.series=t.slice(),a&&(n.globals.initialConfig.series=v.clone(n.config.series),n.globals.initialSeries=v.clone(n.config.series)),i.ctx.update().then((function(){s(i.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var i=this.w,a=i.config.series[e];return u(u({},i.config.series[e]),{},{name:t.name?t.name:null==a?void 0:a.name,color:t.color?t.color:null==a?void 0:a.color,type:t.type?t.type:null==a?void 0:a.type,group:t.group?t.group:null==a?void 0:a.group,hidden:void 0!==t.hidden?t.hidden:null==a?void 0:a.hidden,data:t.data?t.data:null==a?void 0:a.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(e,"'], ").concat(s," circle[j='").concat(e,"'], ").concat(s," rect[j='").concat(e,"']")):void 0===e&&(a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(t,"']")),"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),a?(new Mi(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new Ni(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;t&&t.xaxis&&(a=t.xaxis),t&&t.yaxis&&(s=t.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;var r=function(t){void 0!==s[t]&&(i.config.yaxis[t].min=s[t].min,i.config.yaxis[t].max=s[t].max)};i.config.yaxis.map((function(t,a){i.globals.zoomed||void 0!==s[a]?r(a):void 0!==e.ctx.opts.yaxis[a]&&(t.min=e.ctx.opts.yaxis[a].min,t.max=e.ctx.opts.yaxis[a].max)}))}}]),t}();!function(){function t(){for(var t=arguments.length>0&&arguments[0]!==h?arguments[0]:[],s=arguments.length>1?arguments[1]:h,r=arguments.length>2?arguments[2]:h,n=arguments.length>3?arguments[3]:h,o=arguments.length>4?arguments[4]:h,l=arguments.length>5?arguments[5]:h,h=arguments.length>6?arguments[6]:h,c=t.slice(s,r||h),d=n.slice(o,l||h),u=0,g={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};;){if(c[u]=e.call(g,c[u]),d[u]=e.call(p,d[u]),c[u][0]!=d[u][0]||"M"==c[u][0]||"A"==c[u][0]&&(c[u][4]!=d[u][4]||c[u][5]!=d[u][5])?(Array.prototype.splice.apply(c,[u,1].concat(a.call(g,c[u]))),Array.prototype.splice.apply(d,[u,1].concat(a.call(p,d[u])))):(c[u]=i.call(g,c[u]),d[u]=i.call(p,d[u])),++u==c.length&&u==d.length)break;u==c.length&&c.push(["C",g.pos[0],g.pos[1],g.pos[0],g.pos[1],g.pos[0],g.pos[1]]),u==d.length&&d.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]])}return{start:c,dest:d}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function i(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function a(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var i,a,s,r,n,o,l,h,c,d,u,g,p,f,x,b,m,v,y,w,k,A,C,S,L,M,P=Math.abs(e[1]),I=Math.abs(e[2]),T=e[3]%360,z=e[4],X=e[5],R=e[6],E=e[7],Y=new bt(t),H=new bt(R,E),O=[];if(0===P||0===I||Y.x===H.x&&Y.y===H.y)return[["C",Y.x,Y.y,H.x,H.y,H.x,H.y]];i=new bt((Y.x-H.x)/2,(Y.y-H.y)/2).transform((new vt).rotate(T)),a=i.x*i.x/(P*P)+i.y*i.y/(I*I),a>1&&(P*=a=Math.sqrt(a),I*=a);s=(new vt).rotate(T).scale(1/P,1/I).rotate(-T),Y=Y.transform(s),H=H.transform(s),r=[H.x-Y.x,H.y-Y.y],o=r[0]*r[0]+r[1]*r[1],n=Math.sqrt(o),r[0]/=n,r[1]/=n,l=o<4?Math.sqrt(1-o/4):0,z===X&&(l*=-1);h=new bt((H.x+Y.x)/2+l*-r[1],(H.y+Y.y)/2+l*r[0]),c=new bt(Y.x-h.x,Y.y-h.y),d=new bt(H.x-h.x,H.y-h.y),u=Math.acos(c.x/Math.sqrt(c.x*c.x+c.y*c.y)),c.y<0&&(u*=-1);g=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(g*=-1);X&&u>g&&(g+=2*Math.PI);!X&&u0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(!1===e)return!1;for(var i=e,a=t.length;i(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class Ja{constructor(t){t.remember("_draggable",this),this.el=t,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(t){t?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(t){const e=!t.type.indexOf("mouse");if(e&&1!==t.which&&0!==t.buttons)return;if(this.el.dispatch("beforedrag",{event:t,handler:this}).defaultPrevented)return;t.preventDefault(),t.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point($a(t));const i=(e?"mouseup":"touchend")+".drag";zt(window,(e?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),zt(window,i,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:t,handler:this,box:this.box})}drag(t){const{box:e,lastClick:i}=this,a=this.el.point($a(t)),s=a.x-i.x,r=a.y-i.y;if(!s&&!r)return e;const n=e.x+s,o=e.y+r;this.box=new kt(n,o,e.w,e.h),this.lastClick=a,this.el.dispatch("dragmove",{event:t,handler:this,box:this.box}).defaultPrevented||this.move(n,o)}move(t,e){"svg"===this.el.type?gi.prototype.move.call(this.el,t,e):this.el.move(t,e)}endDrag(t){this.drag(t),this.el.fire("dragend",{event:t,handler:this,box:this.box}),Xt(window,"mousemove.drag"),Xt(window,"touchmove.drag"),Xt(window,"mouseup.drag"),Xt(window,"touchend.drag"),this.init(!0)}} /*! * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse * @version 4.0.1 @@ -17,13 +17,13 @@ function Qa(t,e,i,a=null){return function(s){s.preventDefault(),s.stopPropagation();var r=s.pageX||s.touches[0].pageX,n=s.pageY||s.touches[0].pageY;e.fire(t,{x:r,y:n,event:s,index:a,points:i})}}function Ka([t,e],{a:i,b:a,c:s,d:r,e:n,f:o}){return[t*i+e*s+n,t*a+e*r+o]}Q(Gt,{draggable(t=!0){return(this.remember("_draggable")||new Ja(this)).init(t),this}});let ts=class{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",Qa(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",Qa("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>Ka(t,e))),this.rotationPoint=Ka(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}};const es=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ts?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this}; /*! * @svgdotjs/svg.resize.js - An extension for svg.js which allows to resize elements which are selected -* @version 2.0.2 +* @version 2.0.4 * https://github.com/svgdotjs/svg.resize.js * * @copyright [object Object] * @license MIT * -* BUILT: Mon Jul 01 2024 15:05:58 GMT+0200 (Central European Summer Time) +* BUILT: Fri Sep 13 2024 12:43:14 GMT+0200 (Central European Summer Time) */ /*! * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse @@ -35,4 +35,4 @@ function Qa(t,e,i,a=null){return function(s){s.preventDefault(),s.stopPropagatio * * BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time) */ -function is(t,e,i,a=null){return function(s){s.preventDefault(),s.stopPropagation();var r=s.pageX||s.touches[0].pageX,n=s.pageY||s.touches[0].pageY;e.fire(t,{x:r,y:n,event:s,index:a,points:i})}}function as([t,e],{a:i,b:a,c:s,d:r,e:n,f:o}){return[t*i+e*s+n,t*a+e*r+o]}Q(Gt,{select:es(ts)}),Q([Ge,je,xe],{pointSelect:es(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",Qa("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>Ka(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class ss{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",is(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",is("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>as(t,e))),this.rotationPoint=as(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const rs=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ss?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this};Q(Gt,{select:rs(ss)}),Q([Ge,je,xe],{pointSelect:rs(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",is("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>as(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const ns=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),os=t=>{let e=1/0,i=1/0,a=-1/0,s=-1/0;for(let r=0;r{const s=t-e[0],r=(a-e[1])*i;return[s*i+e[0],r+e[1]]}));return os(a)}(this.box,s,r)}this.el.dispatch("resize",{box:new kt(l),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.move(l.x,l.y).size(l.width,l.height)}movePoint(t){this.lastEvent=t;const{x:e,y:i}=this.snapToGrid(this.el.point(ns(t))),a=this.el.array().slice();a[this.index]=[e,i],this.el.dispatch("resize",{box:os(a),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.plot(a)}rotate(t){this.lastEvent=t;const e=this.el.point(ns(t)),i=this.box.cx,a=this.box.cy,s=this.startPoint.x-i,r=this.startPoint.y-a,n=e.x-i,o=e.y-a,l=Math.sqrt(s*s+r*r)*Math.sqrt(n*n+o*o);if(0===l)return;let h=Math.acos((s*n+r*o)/l)/Math.PI*180;e.xdiv {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}';var h=(null===(l=t.opts.chart)||void 0===l?void 0:l.nonce)||t.w.config.chart.nonce;h&&o.setAttribute("nonce",h),r?s.prepend(o):n.head.appendChild(o)}var c=t.create(t.w.config.series,{});if(!c)return e(t);t.mount(c).then((function(){"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(c)})).catch((function(t){i(t)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var i=this,a=this.w;new hs(this).initModules();var s=this.w.globals;if(s.noData=!1,s.animationEnded=!1,!v.elementExists(this.el))return s.animationEnded=!0,this.destroy(),null;(this.responsive.checkResponsiveConfig(e),a.config.xaxis.convertedCatToNumeric)&&new Ni(a.config).convertCatToNumericXaxis(a.config,this.ctx);if(this.core.setupElements(),"treemap"===a.config.chart.type&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),0===s.svgWidth)return s.animationEnded=!0,null;var r=t;t.forEach((function(t,e){t.hidden&&(r=i.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}))}));var n=Pi.checkComboSeries(r,a.config.chart.type);s.comboCharts=n.comboCharts,s.comboBarCount=n.comboBarCount;var o=r.every((function(t){return t.data&&0===t.data.length}));(0===r.length||o&&s.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(r),this.theme.init(),new Vi(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),s.noData&&s.collapsedSeries.length!==s.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),s.axisCharts&&(this.core.coreCalculations(),"category"!==a.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new Pi(this).getLargestMarkerSize(),this.dimensions.plotCoords();var l=this.core.xySettings();this.grid.createGridMask();var h=this.core.plotChartType(r,l),c=new qi(this);return c.bringForward(),a.config.dataLabels.background.enabled&&c.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:h,xyRatios:l,dimensions:{plot:{left:a.globals.translateX,top:a.globals.translateY,width:a.globals.gridWidth,height:a.globals.gridHeight}}}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise((function(s,r){if(null===i.el)return r(new Error("Not enough data to display or target element not found"));(null===e||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new Ki(i);var n,o,l=i.grid.drawGrid();(i.annotations=new Fi(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position)&&(l&&a.globals.dom.elGraphical.add(l.el),null!=l&&null!==(n=l.elGridBorders)&&void 0!==n&&n.node&&a.globals.dom.elGraphical.add(l.elGridBorders));if(Array.isArray(e.elGraph))for(var h=0;h0&&a.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),s(i)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,e){var i=ds.get(e);i&&(i.disconnect(),ds.delete(e))}(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,i){e.id===v.escapeString(t)&&Apex._chartInstances.splice(i,1)})),new cs(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w;return n.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,i){return e.updateHelpers._extendSeries(t,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,a,s,r)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,e,i)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(t,e,a)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(t,e,a)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(t,e,a)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;e&&(i=e),i.annotations.removeAnnotation(i,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Ji(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ji(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var e=v.escapeString(t);if(Apex._chartInstances){var i=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i2?s-2:0),n=2;n{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",Qa("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>Ka(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class ss{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",is(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",is("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>as(t,e))),this.rotationPoint=as(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const rs=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ss?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this};Q(Gt,{select:rs(ss)}),Q([Ge,je,xe],{pointSelect:rs(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",is("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>as(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const ns=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),os=t=>{let e=1/0,i=1/0,a=-1/0,s=-1/0;for(let r=0;r{const s=t-e[0],r=(a-e[1])*i;return[s*i+e[0],r+e[1]]}));return os(a)}(this.box,s,r)}this.el.dispatch("resize",{box:new kt(l),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.size(l.width,l.height).move(l.x,l.y)}movePoint(t){this.lastEvent=t;const{x:e,y:i}=this.snapToGrid(this.el.point(ns(t))),a=this.el.array().slice();a[this.index]=[e,i],this.el.dispatch("resize",{box:os(a),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.plot(a)}rotate(t){this.lastEvent=t;const e=this.startPoint,i=this.el.point(ns(t)),{cx:a,cy:s}=this.box,r=e.x-a,n=e.y-s,o=i.x-a,l=i.y-s,h=Math.sqrt(r*r+n*n)*Math.sqrt(o*o+l*l);if(0===h)return;let c=Math.acos((r*o+n*l)/h)/Math.PI*180;if(!c)return;i.xdiv {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}';var h=(null===(l=t.opts.chart)||void 0===l?void 0:l.nonce)||t.w.config.chart.nonce;h&&o.setAttribute("nonce",h),r?s.prepend(o):n.head.appendChild(o)}var c=t.create(t.w.config.series,{});if(!c)return e(t);t.mount(c).then((function(){"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(c)})).catch((function(t){i(t)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var i=this,a=this.w;new hs(this).initModules();var s=this.w.globals;if(s.noData=!1,s.animationEnded=!1,!v.elementExists(this.el))return s.animationEnded=!0,this.destroy(),null;(this.responsive.checkResponsiveConfig(e),a.config.xaxis.convertedCatToNumeric)&&new Ni(a.config).convertCatToNumericXaxis(a.config,this.ctx);if(this.core.setupElements(),"treemap"===a.config.chart.type&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),0===s.svgWidth)return s.animationEnded=!0,null;var r=t;t.forEach((function(t,e){t.hidden&&(r=i.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}))}));var n=Pi.checkComboSeries(r,a.config.chart.type);s.comboCharts=n.comboCharts,s.comboBarCount=n.comboBarCount;var o=r.every((function(t){return t.data&&0===t.data.length}));(0===r.length||o&&s.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(r),this.theme.init(),new Vi(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),s.noData&&s.collapsedSeries.length!==s.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),s.axisCharts&&(this.core.coreCalculations(),"category"!==a.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new Pi(this).getLargestMarkerSize(),this.dimensions.plotCoords();var l=this.core.xySettings();this.grid.createGridMask();var h=this.core.plotChartType(r,l),c=new qi(this);return c.bringForward(),a.config.dataLabels.background.enabled&&c.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:h,xyRatios:l,dimensions:{plot:{left:a.globals.translateX,top:a.globals.translateY,width:a.globals.gridWidth,height:a.globals.gridHeight}}}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise((function(s,r){if(null===i.el)return r(new Error("Not enough data to display or target element not found"));(null===e||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new Ki(i);var n,o,l=i.grid.drawGrid();(i.annotations=new Fi(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position)&&(l&&a.globals.dom.elGraphical.add(l.el),null!=l&&null!==(n=l.elGridBorders)&&void 0!==n&&n.node&&a.globals.dom.elGraphical.add(l.elGridBorders));if(Array.isArray(e.elGraph))for(var h=0;h0&&a.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),s(i)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,e){var i=ds.get(e);i&&(i.disconnect(),ds.delete(e))}(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,i){e.id===v.escapeString(t)&&Apex._chartInstances.splice(i,1)})),new cs(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w;return n.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,i){return e.updateHelpers._extendSeries(t,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,a,s,r)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,e,i)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(t,e,a)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(t,e,a)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(t,e,a)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;e&&(i=e),i.annotations.removeAnnotation(i,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Ji(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ji(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var e=v.escapeString(t);if(Apex._chartInstances){var i=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i2?s-2:0),n=2;nt.length)&&(e=t.length);for(var i=0,a=Array(e);i=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,n=!0,o=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){o=!0,r=t},f:function(){try{n||null==i.return||i.return()}finally{if(o)throw r}}}}function n(t){var i=c();return function(){var a,s=l(t);if(i){var r=l(this).constructor;a=Reflect.construct(s,arguments,r)}else a=s.apply(this,arguments);return function(t,i){if(i&&("object"==typeof i||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return e(t)}(this,a)}}function o(t,e,i){return(e=x(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function d(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function u(t){for(var e=1;e>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-r)*s)+r)+256*(Math.round((a-n)*s)+n)+(Math.round((a-o)*s)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,i){return t.isColorHex(i)?this.shadeHexColor(e,i):this.shadeRGBColor(e,i)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===b(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,i=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var i="",a=t<0?"-":"",s=e[0].replace(".",""),r=Number(e[1])+1;if(r<0){for(i=a+"0.";r++;)i+="0";return i+s.replace(/^-/,"")}for(r-=s.length;r--;)i+="0";return s+i}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),i=t.clientHeight,a=t.clientWidth;return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[a-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),i]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:"x",i=t.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,i){if(i>=t.length)for(var a=i-t.length+1;a--;)t.push(void 0);return t.splice(i,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style.key=e[i])}},{key:"preciseAddition",value:function(t,e){var i=(String(t).split(".")[1]||"").length,a=(String(e).split(".")[1]||"").length,s=Math.pow(10,Math.max(i,a));return(Math.round(t*s)+Math.round(e*s))/s}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*a),e=Math.round(Math.abs(e)*a);e;){var s=e;e=t%e,t=s}return t/a}},{key:"getPrimeFactors",value:function(t){for(var e=[],i=2;t>=2;)t%i==0?(e.push(i),t/=i):i++;return e}},{key:"mod",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*a))%(e=Math.round(Math.abs(e)*a))/a}}]),t}(),y=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"animateLine",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animateMarker",value:function(t,e,i,a){t.attr({opacity:0}).animate(e).attr({opacity:1}).after((function(){a()}))}},{key:"animateRect",value:function(t,e,i,a,s){t.attr(e).animate(a).attr(i).after((function(){return s()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.realIndex,a=t.j,s=t.fill,r=t.pathFrom,n=t.pathTo,o=t.speed,l=t.delay,h=this.w,c=0;h.config.chart.animations.animateGradually.enabled&&(c=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&"bar"!==h.config.chart.type&&(c=0),this.morphSVG(e,i,a,"line"!==h.config.chart.type||h.globals.comboCharts?s:"stroke",r,n,o,l*c)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){var e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,i,a,s,r,n,o){var l=this,h=this.w;s||(s=t.attr("pathFrom")),r||(r=t.attr("pathTo"));var c=function(t){return"radar"===h.config.chart.type&&(n=1),"M 0 ".concat(h.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=c()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=c()),h.globals.shouldAnimate||(n=1),t.plot(s).animate(1,o).plot(s).animate(n,o).plot(r).after((function(){v.isNumber(i)?i===h.globals.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&l.animationCompleted(t):"none"!==a&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&e===h.globals.series.length-1||h.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}]),t}();const w={},k=[];function A(t,e){if(Array.isArray(t))for(const i of t)A(i,e);else if("object"!=typeof t)S(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(const e in t)A(e,t[e])}function C(t){return w[t]||{}}function S(t){k.push(...t)}function L(t,e){let i;const a=t.length,s=[];for(i=0;iz.has(t.nodeName),R=(t,e,i={})=>{const a={...e};for(const t in a)a[t].valueOf()===i[t]&&delete a[t];Object.keys(a).length?t.node.setAttribute("data-svgjs",JSON.stringify(a)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},Y="http://www.w3.org/2000/svg",E="http://www.w3.org/2000/xmlns/",H="http://www.w3.org/1999/xlink",O={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function F(){return O.window}let D=class{};const _={},N="___SYMBOL___ROOT___";function W(t,e=Y){return O.document.createElementNS(e,t)}function B(t,e=!1){if(t instanceof D)return t;if("object"==typeof t)return U(t);if(null==t)return new _[N];if("string"==typeof t&&"<"!==t.charAt(0))return U(O.document.querySelector(t));const i=e?O.document.createElement("div"):W("svg");return i.innerHTML=t,t=U(i.firstChild),i.removeChild(i.firstChild),t}function G(t,e){return e&&(e instanceof O.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:W(t)}function V(t){if(!t)return null;if(t.instance instanceof D)return t.instance;if("#document-fragment"===t.nodeName)return new _.Fragment(t);let e=P(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":_[e]||(e="Dom"),new _[e](t)}let U=V;function q(t,e=t.name,i=!1){return _[e]=t,i&&(_[N]=t),S(Object.getOwnPropertyNames(t.prototype)),t}let Z=1e3;function $(t){return"Svgjs"+P(t)+Z++}function J(t){for(let e=t.children.length-1;e>=0;e--)J(t.children[e]);return t.id?(t.id=$(t.nodeName),t):t}function Q(t,e){let i,a;for(a=(t=Array.isArray(t)?t:[t]).length-1;a>=0;a--)for(i in e)t[a].prototype[i]=e[i]}function K(t){return function(...e){const i=e[e.length-1];return!i||i.constructor!==Object||i instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(i)}}A("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=B(t)).before(this),this},insertAfter:function(t){return(t=B(t)).after(this),this}});const tt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,et=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,it=/rgb\((\d+),(\d+),(\d+)\)/,at=/(#[a-z_][a-z0-9\-_]*)/i,st=/\)\s*,?\s*/,rt=/\s/g,nt=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ot=/^rgb\(/,lt=/^(\s+)?$/,ht=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ct=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,dt=/[\s,]+/,ut=/[MLHVCSQTAZ]/i;function gt(t){const e=Math.round(t),i=Math.max(0,Math.min(255,e)).toString(16);return 1===i.length?"0"+i:i}function pt(t,e){for(let i=e.length;i--;)if(null==t[e[i]])return!1;return!0}function ft(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}A("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(dt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),A("Dom",{css:function(t,e){const i={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);i[e[0]]=e[1]})),i;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;i[e]=this.node.style.getPropertyValue(t)}return i}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||lt.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||lt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),A("Dom",{data:function(t,e,i){if(null==t)return this.data(L(function(t,e){let i;const a=t.length,s=[];for(i=0;i0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const i of t)e[i]=this.data(i);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===i||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),A("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class xt{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof xt||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:i,round:a,sin:s,PI:r}=Math;if("vibrant"===t){const t=24*i()+57,e=38*i()+45,a=360*i();return new xt(t,e,a,"lch")}if("sine"===t){const t=a(80*s(2*r*(e=null==e?i():e)/.5+.01)+150),n=a(50*s(2*r*e/.5+4.6)+200),o=a(100*s(2*r*e/.5+2.3)+150);return new xt(t,n,o)}if("pastel"===t){const t=8*i()+86,e=17*i()+9,a=360*i();return new xt(t,e,a,"lch")}if("dark"===t){const t=10+10*i(),e=50*i()+86,a=360*i();return new xt(t,e,a,"lch")}if("rgb"===t){const t=255*i(),e=255*i(),a=255*i();return new xt(t,e,a)}if("lab"===t){const t=100*i(),e=256*i()-128,a=256*i()-128;return new xt(t,e,a,"lab")}if("grey"===t){const t=255*i();return new xt(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(nt.test(t)||ot.test(t))}cmyk(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.min(1-a,1-s,1-r);if(1===n)return new xt(0,0,0,1,"cmyk");return new xt((1-a-n)/(1-n),(1-s-n)/(1-n),(1-r-n)/(1-n),n,"cmyk")}hsl(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.max(a,s,r),o=Math.min(a,s,r),l=(n+o)/2,h=n===o,c=n-o;return new xt(360*(h?0:n===a?((s-r)/c+(s.5?c/(2-n-o):c/(n+o)),100*l,"hsl")}init(t=0,e=0,i=0,a=0,s="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)s="string"==typeof a?a:s,a="string"==typeof a?0:a,Object.assign(this,{_a:t,_b:e,_c:i,_d:a,space:s});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const i=function(t,e){const i=pt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:pt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:pt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:pt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:pt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:pt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return i.space=e||i.space,i}(t,e);Object.assign(this,i)}else if("string"==typeof t)if(ot.test(t)){const e=t.replace(rt,""),[i,a,s]=it.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}else{if(!nt.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,i,a,s]=et.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}}const{_a:r,_b:n,_c:o,_d:l}=this,h="rgb"===this.space?{r:r,g:n,b:o}:"xyz"===this.space?{x:r,y:n,z:o}:"hsl"===this.space?{h:r,s:n,l:o}:"lab"===this.space?{l:r,a:n,b:o}:"lch"===this.space?{l:r,c:n,h:o}:"cmyk"===this.space?{c:r,m:n,y:o,k:l}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:i}=this.xyz();return new xt(116*e-16,500*(t-e),200*(e-i),"lab")}lch(){const{l:t,a:e,b:i}=this.lab(),a=Math.sqrt(e**2+i**2);let s=180*Math.atan2(i,e)/Math.PI;s<0&&(s*=-1,s=360-s);return new xt(t,a,s,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:a,a:s,b:r}=this;if("lch"===this.space){const{c:t,h:e}=this,i=Math.PI/180;s=t*Math.cos(i*e),r=t*Math.sin(i*e)}const n=(a+16)/116,o=s/500+n,l=n-r/200,h=16/116,c=.008856,d=7.787;t=.95047*(o**3>c?o**3:(o-h)/d),e=1*(n**3>c?n**3:(n-h)/d),i=1.08883*(l**3>c?l**3:(l-h)/d)}const a=3.2406*t+-1.5372*e+-.4986*i,s=-.9689*t+1.8758*e+.0415*i,r=.0557*t+-.204*e+1.057*i,n=Math.pow,o=.0031308,l=a>o?1.055*n(a,1/2.4)-.055:12.92*a,h=s>o?1.055*n(s,1/2.4)-.055:12.92*s,c=r>o?1.055*n(r,1/2.4)-.055:12.92*r;return new xt(255*l,255*h,255*c)}if("hsl"===this.space){let{h:t,s:e,l:i}=this;if(t/=360,e/=100,i/=100,0===e){i*=255;return new xt(i,i,i)}const a=i<.5?i*(1+e):i+e-i*e,s=2*i-a,r=255*ft(s,a,t+1/3),n=255*ft(s,a,t),o=255*ft(s,a,t-1/3);return new xt(r,n,o)}if("cmyk"===this.space){const{c:t,m:e,y:i,k:a}=this,s=255*(1-Math.min(1,t*(1-a)+a)),r=255*(1-Math.min(1,e*(1-a)+a)),n=255*(1-Math.min(1,i*(1-a)+a));return new xt(s,r,n)}return this;var t}toArray(){const{_a:t,_b:e,_c:i,_d:a,space:s}=this;return[t,e,i,a,s]}toHex(){const[t,e,i]=this._clamped().map(gt);return`#${t}${e}${i}`}toRgb(){const[t,e,i]=this._clamped();return`rgb(${t},${e},${i})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,o=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,l=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,h=(.4124*n+.3576*o+.1805*l)/.95047,c=(.2126*n+.7152*o+.0722*l)/1,d=(.0193*n+.1192*o+.9505*l)/1.08883,u=h>.008856?Math.pow(h,1/3):7.787*h+16/116,g=c>.008856?Math.pow(c,1/3):7.787*c+16/116,p=d>.008856?Math.pow(d,1/3):7.787*d+16/116;return new xt(u,g,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:i}=this.rgb(),{max:a,min:s,round:r}=Math;return[t,e,i].map((t=>a(0,s(r(t),255))))}}class bt{constructor(...t){this.init(...t)}clone(){return new bt(this)}init(t,e){const i=0,a=0,s=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==s.x?i:s.x,this.y=null==s.y?a:s.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){vt.isMatrixLike(t)||(t=new vt(t));const{x:e,y:i}=this;return this.x=t.a*e+t.c*i+t.e,this.y=t.b*e+t.d*i+t.f,this}}function mt(t,e,i){return Math.abs(e-t)<(i||1e-6)}class vt{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,i=t.flip&&(e||"x"===t.flip)?-1:1,a=t.flip&&(e||"y"===t.flip)?-1:1,s=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,r=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,n=t.scale&&t.scale.length?t.scale[0]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleX)?t.scaleX*i:i,o=t.scale&&t.scale.length?t.scale[1]*a:isFinite(t.scale)?t.scale*a:isFinite(t.scaleY)?t.scaleY*a:a,l=t.shear||0,h=t.rotate||t.theta||0,c=new bt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),d=c.x,u=c.y,g=new bt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=g.x,f=g.y,x=new bt(t.translate||t.tx||t.translateX,t.ty||t.translateY),b=x.x,m=x.y,v=new bt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:n,scaleY:o,skewX:s,skewY:r,shear:l,theta:h,rx:v.x,ry:v.y,tx:b,ty:m,ox:d,oy:u,px:p,py:f}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,i){const a=t.a*e.a+t.c*e.b,s=t.b*e.a+t.d*e.b,r=t.a*e.c+t.c*e.d,n=t.b*e.c+t.d*e.d,o=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return i.a=a,i.b=s,i.c=r,i.d=n,i.e=o,i.f=l,i}around(t,e,i){return this.clone().aroundO(t,e,i)}aroundO(t,e,i){const a=t||0,s=e||0;return this.translateO(-a,-s).lmultiplyO(i).translateO(a,s)}clone(){return new vt(this)}decompose(t=0,e=0){const i=this.a,a=this.b,s=this.c,r=this.d,n=this.e,o=this.f,l=i*r-a*s,h=l>0?1:-1,c=h*Math.sqrt(i*i+a*a),d=Math.atan2(h*a,h*i),u=180/Math.PI*d,g=Math.cos(d),p=Math.sin(d),f=(i*s+a*r)/l,x=s*c/(f*i-a)||r*c/(f*a+i);return{scaleX:c,scaleY:x,shear:f,rotate:u,translateX:n-t+t*g*c+e*(f*g*c-p*x),translateY:o-e+t*p*c+e*(f*p*c+g*x),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new vt(t);return mt(this.a,e.a)&&mt(this.b,e.b)&&mt(this.c,e.c)&&mt(this.d,e.d)&&mt(this.e,e.e)&&mt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=vt.fromArray([1,0,0,1,0,0]);return t=t instanceof Gt?t.matrixify():"string"==typeof t?vt.fromArray(t.split(dt).map(parseFloat)):Array.isArray(t)?vt.fromArray(t):"object"==typeof t&&vt.isMatrixLike(t)?t:"object"==typeof t?(new vt).transform(t):6===arguments.length?vt.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,i=this.c,a=this.d,s=this.e,r=this.f,n=t*a-e*i;if(!n)throw new Error("Cannot invert "+this);const o=a/n,l=-e/n,h=-i/n,c=t/n,d=-(o*s+h*r),u=-(l*s+c*r);return this.a=o,this.b=l,this.c=h,this.d=c,this.e=d,this.f=u,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(this,e,this)}rotate(t,e,i){return this.clone().rotateO(t,e,i)}rotateO(t,e=0,i=0){t=M(t);const a=Math.cos(t),s=Math.sin(t),{a:r,b:n,c:o,d:l,e:h,f:c}=this;return this.a=r*a-n*s,this.b=n*a+r*s,this.c=o*a-l*s,this.d=l*a+o*s,this.e=h*a-c*s+i*s-e*a+e,this.f=c*a+h*s-e*s-i*a+i,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t);const{a:s,b:r,c:n,d:o,e:l,f:h}=this;return this.a=s*t,this.b=r*e,this.c=n*t,this.d=o*e,this.e=l*t-i*t+i,this.f=h*e-a*e+a,this}shear(t,e,i){return this.clone().shearO(t,e,i)}shearO(t,e=0,i=0){const{a:a,b:s,c:r,d:n,e:o,f:l}=this;return this.a=a+s*t,this.c=r+n*t,this.e=o+l*t-i*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t),t=M(t),e=M(e);const s=Math.tan(t),r=Math.tan(e),{a:n,b:o,c:l,d:h,e:c,f:d}=this;return this.a=n+o*s,this.b=o+n*r,this.c=l+h*s,this.d=h+l*r,this.e=c+d*s-a*s,this.f=d+c*r-i*r,this}skewX(t,e,i){return this.skew(t,0,e,i)}skewY(t,e,i){return this.skew(0,t,e,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(vt.isMatrixLike(t)){return new vt(t).multiplyO(this)}const e=vt.formatTransforms(t),{x:i,y:a}=new bt(e.ox,e.oy).transform(this),s=(new vt).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-i,-a).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(i,a);if(isFinite(e.px)||isFinite(e.py)){const t=new bt(i,a).transform(s),r=isFinite(e.px)?e.px-t.x:0,n=isFinite(e.py)?e.py-t.y:0;s.translateO(r,n)}return s.translateO(e.tx,e.ty),s}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function yt(){if(!yt.nodes){const t=B().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;yt.nodes={svg:t,path:e}}if(!yt.nodes.svg.node.parentNode){const t=O.document.body||O.document.documentElement;yt.nodes.svg.addTo(t)}return yt.nodes}function wt(t){return!(t.width||t.height||t.x||t.y)}q(vt,"Matrix");class kt{constructor(...t){this.init(...t)}addOffset(){return this.x+=O.window.pageXOffset,this.y+=O.window.pageYOffset,new kt(this)}init(t){return t="string"==typeof t?t.split(dt).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return wt(this)}merge(t){const e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),a=Math.max(this.x+this.width,t.x+t.width)-e,s=Math.max(this.y+this.height,t.y+t.height)-i;return new kt(e,i,a,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof vt||(t=new vt(t));let e=1/0,i=-1/0,a=1/0,s=-1/0;return[new bt(this.x,this.y),new bt(this.x2,this.y),new bt(this.x,this.y2),new bt(this.x2,this.y2)].forEach((function(r){r=r.transform(t),e=Math.min(e,r.x),i=Math.max(i,r.x),a=Math.min(a,r.y),s=Math.max(s,r.y)})),new kt(e,a,i-e,s-a)}}function At(t,e,i){let a;try{if(a=e(t.node),wt(a)&&((s=t.node)!==O.document&&!(O.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===O.document}).call(O.document.documentElement,s)))throw new Error("Element not in the dom")}catch(e){a=i(t)}var s;return a}A({viewbox:{viewbox(t,e,i,a){return null==t?new kt(this.attr("viewBox")):this.attr("viewBox",new kt(t,e,i,a))},zoom(t,e){let{width:i,height:a}=this.attr(["width","height"]);if((i||a)&&"string"!=typeof i&&"string"!=typeof a||(i=this.node.clientWidth,a=this.node.clientHeight),!i||!a)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const s=this.viewbox(),r=i/s.width,n=a/s.height,o=Math.min(r,n);if(null==t)return o;let l=o/t;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new bt(i/2/r+s.x,a/2/n+s.y);const h=new kt(s).transform(new vt({scale:l,origin:e}));return this.viewbox(h)}}}),q(kt,"Box");class Ct extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}Q([Ct],{each(t,...e){return"function"==typeof t?this.map(((e,i,a)=>t.call(e,e,i,a))):this.map((i=>i[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const St=["toArray","constructor","each"];function Lt(t,e){return new Ct(L((e||O.document).querySelectorAll(t),(function(t){return V(t)})))}Ct.extend=function(t){t=t.reduce(((t,e)=>(St.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),Q([Ct],t)};let Mt=0;const Pt={};function It(t){let e=t.getEventHolder();return e===O.window&&(e=Pt),e.events||(e.events={}),e.events}function Tt(t){return t.getEventTarget()}function zt(t,e,i,a,s){const r=i.bind(a||t),n=B(t),o=It(n),l=Tt(n);e=Array.isArray(e)?e:e.split(dt),i._svgjsListenerId||(i._svgjsListenerId=++Mt),e.forEach((function(t){const e=t.split(".")[0],a=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][a]=o[e][a]||{},o[e][a][i._svgjsListenerId]=r,l.addEventListener(e,r,s||!1)}))}function Xt(t,e,i,a){const s=B(t),r=It(s),n=Tt(s);("function"!=typeof i||(i=i._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(dt)).forEach((function(t){const e=t&&t.split(".")[0],o=t&&t.split(".")[1];let l,h;if(i)r[e]&&r[e][o||"*"]&&(n.removeEventListener(e,r[e][o||"*"][i],a||!1),delete r[e][o||"*"][i]);else if(e&&o){if(r[e]&&r[e][o]){for(h in r[e][o])Xt(n,[e,o].join("."),h);delete r[e][o]}}else if(o)for(t in r)for(l in r[t])o===l&&Xt(n,[t,o].join("."));else if(e){if(r[e]){for(l in r[e])Xt(n,[e,l].join("."));delete r[e]}}else{for(t in r)Xt(n,t);!function(t){let e=t.getEventHolder();e===O.window&&(e=Pt),e.events&&(e.events={})}(s)}}))}class Rt extends D{addEventListener(){}dispatch(t,e,i){return function(t,e,i,a){const s=Tt(t);return e instanceof O.window.Event||(e=new O.window.CustomEvent(e,{detail:i,cancelable:!0,...a})),s.dispatchEvent(e),e}(this,t,e,i)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const i=e[t.type];for(const e in i)for(const a in i[e])i[e][a](t);return!t.defaultPrevented}fire(t,e,i){return this.dispatch(t,e,i),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,i){return Xt(this,t,e,i),this}on(t,e,i,a){return zt(this,t,e,i,a),this}removeEventListener(){}}function Yt(){}q(Rt,"EventTarget");const Et=400,Ht=">",Ot=0,Ft={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Dt extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(dt).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class _t{constructor(...t){this.init(...t)}convert(t){return new _t(this.value,t)}divide(t){return t=new _t(t),new _t(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(tt))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof _t&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new _t(t),new _t(this-t,this.unit||t.unit)}plus(t){return t=new _t(t),new _t(this+t,this.unit||t.unit)}times(t){return t=new _t(t),new _t(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Nt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Wt=[];class Bt extends Rt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=B(t)).removeNamespace&&this.node instanceof O.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return B(t).put(this,e)}children(){return new Ct(L(this.node.children,(function(t){return V(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let i=this.node.cloneNode(t);return e&&(i=J(i)),new this.constructor(i)}each(t,e){const i=this.children();let a,s;for(a=0,s=i.length;a=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=$(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return V(this.node.lastChild)}matches(t){const e=this.node,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return i&&i.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=V(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=V(e.node.parentNode));return e}put(t,e){return t=B(t),this.add(t,e),t}putIn(t,e){return B(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=B(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const i=10**t,a=this.attr(e);for(const t in a)"number"==typeof a[t]&&(a[t]=Math.round(a[t]*i)/i);return this.attr(a),this}svg(t,e){return this.xml(t,e,Y)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const i=e.index(this);return e.put(t,i).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let i=this;if(null!=t){if(i=V(i.node.cloneNode(!0)),e){const e=t(i);if(i=e||i,!1===e)return""}i.each((function(){const e=t(this),i=e||this;!1===e?this.remove():e&&this!==i&&this.replace(i)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;const a=W("wrapper",i),s=O.document.createDocumentFragment();a.innerHTML=t;for(let t=a.children.length;t--;)s.appendChild(a.firstElementChild);const r=this.parent();return e?this.replace(s)&&r:this.add(s)}}Q(Bt,{attr:function(t,e,i){if(null==t){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=ht.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ft[t]:ht.test(e)?parseFloat(e):e;"number"==typeof(e=Wt.reduce(((e,i)=>i(t,e,this)),e))?e=new _t(e):Nt.has(t)&&xt.isColor(e)?e=new xt(e):e.constructor===Array&&(e=new Dt(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return Lt(t,this.node)},findOne:function(t){return V(this.node.querySelector(t))}}),q(Bt,"Dom");class Gt extends Bt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new _t(t).plus(this.x()))}dy(t=0){return this.y(new _t(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=B(t));const i=new Ct;let a=this;for(;(a=a.parent())&&a.node!==O.document&&"#document-fragment"!==a.nodeName&&(i.push(a),e||a.node!==t.node)&&(!e||!a.matches(t));)if(a.node===this.root().node)return null;return i}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(at);return e?B(e[1]):null}root(){const t=this.parent(function(t){return _[t]}(N));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const i=I(this,t,e);return this.width(new _t(i.width)).height(new _t(i.height))}width(t){return this.attr("width",t)}writeDataToDom(){return R(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}Q(Gt,{bbox:function(){const t=At(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(yt().svg).show(),i=e.node.getBBox();return e.remove(),i}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new kt(t)},rbox:function(t){const e=At(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),i=new kt(e);return t?i.transform(t.screenCTM().inverseO()):i.addOffset()},inside:function(t,e){const i=this.bbox();return t>i.x&&e>i.y&&t=0;i--)null!=e[jt[t][i]]&&this.attr(jt.prefix(t,jt[t][i]),e[jt[t][i]]);return this},A(["Element","Runner"],e)})),A(["Element","Runner"],{matrix:function(t,e,i,a,s,r){return null==t?new vt(this):this.attr("transform",new vt(t,e,i,a,s,r))},rotate:function(t,e,i){return this.transform({rotate:t,ox:e,oy:i},!0)},skew:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:i},!0):this.transform({skew:[t,e],ox:i,oy:a},!0)},shear:function(t,e,i){return this.transform({shear:t,ox:e,oy:i},!0)},scale:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:i},!0):this.transform({scale:[t,e],ox:i,oy:a},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),A("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new _t(t)):this.rx(t).ry(e)}}),A("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new bt(this.node.getPointAtLength(t))}}),A(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});A("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),A("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){const t=(this.attr("transform")||"").split(st).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(dt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(vt.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new vt);return t},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);const i=this.screenCTM(),a=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(a.multiply(i)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new vt(this).decompose();return null==t?e:e[t]}vt.isMatrixLike(t)||(t={...t,origin:T(t,this)});const i=new vt(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});class Vt extends Gt{flatten(){return this.each((function(){if(this instanceof Vt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(i,a){return a[a.length-i-1].toParent(t,e)})),this.remove()}}q(Vt,"Container");class Ut extends Vt{constructor(t,e=t){super(G("defs",t),e)}flatten(){return this}ungroup(){return this}}q(Ut,"Defs");class qt extends Gt{}function Zt(t){return this.attr("rx",t)}function $t(t){return this.attr("ry",t)}function Jt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Qt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Kt(t){return this.attr("cx",t)}function te(t){return this.attr("cy",t)}function ee(t){return null==t?2*this.rx():this.rx(new _t(t).divide(2))}function ie(t){return null==t?2*this.ry():this.ry(new _t(t).divide(2))}q(qt,"Shape");var ae=Object.freeze({__proto__:null,cx:Kt,cy:te,height:ie,rx:Zt,ry:$t,width:ee,x:Jt,y:Qt});class se extends qt{constructor(t,e=t){super(G("ellipse",t),e)}size(t,e){const i=I(this,t,e);return this.rx(new _t(i.width).divide(2)).ry(new _t(i.height).divide(2))}}Q(se,ae),A("Container",{ellipse:K((function(t=0,e=t){return this.put(new se).size(t,e).move(0,0)}))}),q(se,"Ellipse");class re extends Bt{constructor(t=O.document.createDocumentFragment()){super(t)}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){const t=new Bt(W("wrapper",i));return t.add(this.node.cloneNode(!0)),t.xml(!1,i)}return super.xml(t,!1,i)}}function ne(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new _t(t),fy:new _t(e)}):this.attr({x1:new _t(t),y1:new _t(e)})}function oe(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new _t(t),cy:new _t(e)}):this.attr({x2:new _t(t),y2:new _t(e)})}q(re,"Fragment");var le=Object.freeze({__proto__:null,from:ne,to:oe});class he extends Vt{constructor(t,e){super(G(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,i){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}Q(he,le),A({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:K((function(t,e){return this.put(new he(t)).update(e)}))}}),q(he,"Gradient");class ce extends Vt{constructor(t,e=t){super(G("pattern",t),e)}attr(t,e,i){return"transform"===t&&(t="patternTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}A({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:K((function(t,e,i){return this.put(new ce).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),q(ce,"Pattern");let de=class extends qt{constructor(t,e=t){super(G("image",t),e)}load(t,e){if(!t)return this;const i=new O.window.Image;return zt(i,"load",(function(t){const a=this.parent(ce);0===this.width()&&0===this.height()&&this.size(i.width,i.height),a instanceof ce&&0===a.width()&&0===a.height()&&a.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),zt(i,"load error",(function(){Xt(i)})),this.attr("href",i.src=t,H)}};var ue;ue=function(t,e,i){return"fill"!==t&&"stroke"!==t||ct.test(e)&&(e=i.root().defs().image(e)),e instanceof de&&(e=i.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Wt.push(ue),A({Container:{image:K((function(t,e){return this.put(new de).size(0,0).load(t,e)}))}}),q(de,"Image");class ge extends Dt{bbox(){let t=-1/0,e=-1/0,i=1/0,a=1/0;return this.forEach((function(s){t=Math.max(s[0],t),e=Math.max(s[1],e),i=Math.min(s[0],i),a=Math.min(s[1],a)})),new kt(i,a,t-i,e-a)}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let i=this.length-1;i>=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(dt).map(parseFloat)).length%2!=0&&t.pop();for(let i=0,a=t.length;i=0;i--)a.width&&(this[i][0]=(this[i][0]-a.x)*t/a.width+a.x),a.height&&(this[i][1]=(this[i][1]-a.y)*e/a.height+a.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,i=this.length;e":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,i,a){return function(s){return s<0?t>0?e/t*s:i>0?a/i*s:0:s>1?i<1?(1-a)/(1-i)*s+(a-i)/(1-i):t<1?(1-e)/(1-t)*s+(e-t)/(1-t):1:3*s*(1-s)**2*e+3*s**2*(1-s)*a+s**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let i=t;return"none"===e?--i:"both"===e&&++i,(a,s=!1)=>{let r=Math.floor(a*t);const n=a*r%1==0;return"start"!==e&&"both"!==e||++r,s&&n&&--r,a>=0&&r<0&&(r=0),a<=1&&r>i&&(r=i),r/i}}};class ye{done(){return!1}}class we extends ye{constructor(t=Ht){super(),this.ease=ve[t]||t}step(t,e,i){return"number"!=typeof t?i<1?t:e:t+(e-t)*this.ease(i)}}class ke extends ye{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,i,a){return this.stepper(t,e,i,a)}}function Ae(){const t=(this._duration||500)/1e3,e=this._overshoot||0,i=Math.PI,a=Math.log(e/100+1e-10),s=-a/Math.sqrt(i*i+a*a),r=3.9/(s*t);this.d=2*s*r,this.k=r*r}Q(class extends ke{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;i>100&&(i=16),i/=1e3;const s=a.velocity||0,r=-this.d*s-this.k*(t-e),n=t+s*i+r*i*i/2;return a.velocity=s+r*i,a.done=Math.abs(e-n)+Math.abs(s)<.002,a.done?e:n}},{duration:me("_duration",Ae),overshoot:me("_overshoot",Ae)});Q(class extends ke{constructor(t=.1,e=.01,i=0,a=1e3){super(),this.p(t).i(e).d(i).windup(a)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;const s=e-t;let r=(a.integral||0)+s*i;const n=(s-(a.error||0))/i,o=this._windup;return!1!==o&&(r=Math.max(-o,Math.min(r,o))),a.error=s,a.integral=r,a.done=Math.abs(s)<.001,a.done?e:t+(this.P*s+this.I*r+this.D*n)}},{windup:me("_windup"),p:me("P"),i:me("I"),d:me("D")});const Ce={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Se={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Le="mlhvqtcsaz".split("");for(let t=0,e=Le.length;t=0;a--)i=this[a][0],"M"===i||"L"===i||"T"===i?(this[a][1]+=t,this[a][2]+=e):"H"===i?this[a][1]+=t:"V"===i?this[a][1]+=e:"C"===i||"S"===i||"Q"===i?(this[a][1]+=t,this[a][2]+=e,this[a][3]+=t,this[a][4]+=e,"C"===i&&(this[a][5]+=t,this[a][6]+=e)):"A"===i&&(this[a][6]+=t,this[a][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let i=0,a="";const s={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new bt,p:new bt};for(;s.lastToken=a,a=t.charAt(i++);)if(s.inSegment||!Pe(s,a))if("."!==a)if(isNaN(parseInt(a)))if(Re.has(a))s.inNumber&&Ie(s,!1);else if("-"!==a&&"+"!==a)if("E"!==a.toUpperCase()){if(ut.test(a)){if(s.inNumber)Ie(s,!1);else{if(!Me(s))throw new Error("parser Error");Te(s)}--i}}else s.number+=a,s.hasExponent=!0;else{if(s.inNumber&&!Xe(s)){Ie(s,!1),--i;continue}s.number+=a,s.inNumber=!0}else{if("0"===s.number||ze(s)){s.inNumber=!0,s.number=a,Ie(s,!0);continue}s.inNumber=!0,s.number+=a}else{if(s.pointSeen||s.hasExponent){Ie(s,!1),--i;continue}s.inNumber=!0,s.pointSeen=!0,s.number+=a}return s.inNumber&&Ie(s,!1),s.inSegment&&Me(s)&&Te(s),s.segments}(t)}size(t,e){const i=this.bbox();let a,s;for(i.width=0===i.width?1:i.width,i.height=0===i.height?1:i.height,a=this.length-1;a>=0;a--)s=this[a][0],"M"===s||"L"===s||"T"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y):"H"===s?this[a][1]=(this[a][1]-i.x)*t/i.width+i.x:"V"===s?this[a][1]=(this[a][1]-i.y)*e/i.height+i.y:"C"===s||"S"===s||"Q"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y,this[a][3]=(this[a][3]-i.x)*t/i.width+i.x,this[a][4]=(this[a][4]-i.y)*e/i.height+i.y,"C"===s&&(this[a][5]=(this[a][5]-i.x)*t/i.width+i.x,this[a][6]=(this[a][6]-i.y)*e/i.height+i.y)):"A"===s&&(this[a][1]=this[a][1]*t/i.width,this[a][2]=this[a][2]*e/i.height,this[a][6]=(this[a][6]-i.x)*t/i.width+i.x,this[a][7]=(this[a][7]-i.y)*e/i.height+i.y);return this}toString(){return function(t){let e="";for(let i=0,a=t.length;i{const e=typeof t;return"number"===e?_t:"string"===e?xt.isColor(t)?xt:dt.test(t)?ut.test(t)?Ye:Dt:tt.test(t)?_t:Oe:Ne.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Dt:"object"===e?_e:Oe};class He{constructor(t){this._stepper=t||new we("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Ee(t));let e=new this._type(t);return this._type===xt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===_e&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Oe{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Fe{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Fe.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Fe.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const De=(t,e)=>t[0]e[0]?1:0;class _e{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let i=0,a=e.length;it.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const i=e.shift(),a=e.shift(),s=e.shift(),r=e.splice(0,s);t[i]=new a(r)}return t}}const Ne=[Oe,Fe,_e];class We extends qt{constructor(t,e=t){super(G("path",t),e)}array(){return this._array||(this._array=new Ye(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Ye(t))}size(t,e){const i=I(this,t,e);return this.attr("d",this.array().size(i.width,i.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}We.prototype.MorphArray=Ye,A({Container:{path:K((function(t){return this.put(new We).plot(t||new Ye)}))}}),q(We,"Path");var Be=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new ge(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new ge(t))},size:function(t,e){const i=I(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}});class Ge extends qt{constructor(t,e=t){super(G("polygon",t),e)}}A({Container:{polygon:K((function(t){return this.put(new Ge).plot(t||new ge)}))}}),Q(Ge,fe),Q(Ge,Be),q(Ge,"Polygon");class je extends qt{constructor(t,e=t){super(G("polyline",t),e)}}A({Container:{polyline:K((function(t){return this.put(new je).plot(t||new ge)}))}}),Q(je,fe),Q(je,Be),q(je,"Polyline");class Ve extends qt{constructor(t,e=t){super(G("rect",t),e)}}Q(Ve,{rx:Zt,ry:$t}),A({Container:{rect:K((function(t,e){return this.put(new Ve).size(t,e)}))}}),q(Ve,"Rect");class Ue{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const qe={nextDraw:null,frames:new Ue,timeouts:new Ue,immediates:new Ue,timer:()=>O.window.performance||O.window.Date,transforms:[],frame(t){const e=qe.frames.push({run:t});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},timeout(t,e){e=e||0;const i=qe.timer().now()+e,a=qe.timeouts.push({run:t,time:i});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),a},immediate(t){const e=qe.immediates.push(t);return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},cancelFrame(t){null!=t&&qe.frames.remove(t)},clearTimeout(t){null!=t&&qe.timeouts.remove(t)},cancelImmediate(t){null!=t&&qe.immediates.remove(t)},_draw(t){let e=null;const i=qe.timeouts.last();for(;(e=qe.timeouts.shift())&&(t>=e.time?e.run():qe.timeouts.push(e),e!==i););let a=null;const s=qe.frames.last();for(;a!==s&&(a=qe.frames.shift());)a.run(t);let r=null;for(;r=qe.immediates.shift();)r();qe.nextDraw=qe.timeouts.first()||qe.frames.first()?O.window.requestAnimationFrame(qe._draw):null}},Ze=function(t){const e=t.start,i=t.runner.duration();return{start:e,duration:i,end:e+i,runner:t.runner}},$e=function(){const t=O.window;return(t.performance||t.Date).now()};class Je extends Rt{constructor(t=$e){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const i=Math.abs(e);return this.speed(t?-i:i)}schedule(t,e,i){if(null==t)return this._runners.map(Ze);let a=0;const s=this.getEndTime();if(e=e||0,null==i||"last"===i||"after"===i)a=s;else if("absolute"===i||"start"===i)a=e,e=0;else if("now"===i)a=this._time;else if("relative"===i){const i=this.getRunnerInfoById(t.id);i&&(a=i.start+e,e=0)}else{if("with-last"!==i)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();a=t?t.start:this._time}}t.unschedule(),t.timeline(this);const r=t.persist(),n={persist:null===r?this._persist:r,start:a+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(n),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return qe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let i=e-this._lastSourceTime;t&&(i=0);const a=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=a,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],i=e.runner;this._time-e.start<=0&&i.reset()}let s=!1;for(let t=0,e=this._runners.length;t0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}A({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Je,this._timeline):(this._timeline=t,this)}}});class Qe extends Rt{constructor(t){super(),this.id=Qe.id++,t="function"==typeof(t=null==t?Et:t)?new ke(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ke,this._stepper=this._isDeclarative?t:new we,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new vt,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,i){let a=1,s=!1,r=0;return e=e??Ot,i=i||"last","object"!=typeof(t=t??Et)||t instanceof ye||(e=t.delay??e,i=t.when??i,s=t.swing||s,a=t.times??a,r=t.wait??r,t=t.duration??Et),{duration:t,delay:e,swing:s,times:a,wait:r,when:i}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,i){const a=Qe.sanitise(t,e,i),s=new Qe(a.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(a).schedule(a.delay,a.when)}clearTransform(){return this.transforms=new vt,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new we(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,i){return"object"==typeof t&&(e=t.swing,i=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=i||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),i=(this._time-t*e)/this._duration;return Math.min(t+i,this._times)}const i=t%1,a=e*Math.floor(t)+this._duration*i;return this.time(a)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,i=this._duration,a=this._wait,s=this._times,r=this._swing,n=this._reverse;let o;if(null==t){const t=function(t){const e=r*Math.floor(t%(2*(a+i))/(a+i)),s=e&&!n||!e&&n,o=Math.pow(-1,s)*(t%(a+i))/i+s;return Math.max(Math.min(o,1),0)},l=s*(a+i)-a;return o=e<=0?Math.round(t(1e-5)):e=0;this._lastPosition=e;const a=this.duration(),s=this._lastTime<=0&&this._time>0,r=this._lastTime=a;this._lastTime=this._time,s&&this.fire("start",this);const n=this._isDeclarative;this.done=!n&&!r&&this._time>=a,this._reseted=!1;let o=!1;return(i||n)&&(this._initialise(i),this.transforms=new vt,o=this._run(n?t:e),this.fire("step",this)),this.done=this.done||o&&n,r&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,i=this._queue.length;et.lmultiplyO(e),ei=t=>t.transforms;function ii(){const t=this._transformationRunners.runners.map(ei).reduce(ti,new vt);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class ai{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Ke).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const i=this.ids.indexOf(t+1);return this.ids.splice(i,1,t+1),this.runners.splice(i,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;ee.id<=t.id)).map(ei).reduce(ti,new vt)},_addRunner(t){this._transformationRunners.add(t),qe.cancelImmediate(this._frameId),this._frameId=qe.immediate(ii.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new ai).add(new Ke(new vt(this))))}}});Q(Qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,i){if("string"==typeof e)return this.styleAttr(t,{[e]:i});let a=e;if(this._tryRetarget(t,a))return this;let s=new He(this._stepper).to(a),r=Object.keys(a);return this.queue((function(){s=s.from(this.element()[t](r))}),(function(e){return this.element()[t](s.at(e).valueOf()),s.done()}),(function(e){const i=Object.keys(e),n=(o=r,i.filter((t=>!o.includes(t))));var o;if(n.length){const e=this.element()[t](n),i=new _e(s.from()).valueOf();Object.assign(i,e),s.from(i)}const l=new _e(s.to()).valueOf();Object.assign(l,e),s.to(l),r=i,a=e})),this._rememberMorpher(t,s),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let i=new He(this._stepper).to(new _t(t));return this.queue((function(){i=i.from(this.element().zoom())}),(function(t){return this.element().zoom(i.at(t),e),i.done()}),(function(t,a){e=a,i.to(t)})),this._rememberMorpher("zoom",i),this},transform(t,e,i){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const a=vt.isMatrixLike(t);i=null!=t.affine?t.affine:null!=i?i:!a;const s=new He(this._stepper).type(i?Fe:vt);let r,n,o,l,h;return this.queue((function(){n=n||this.element(),r=r||T(t,n),h=new vt(e?void 0:n),n._addRunner(this),e||n._clearTransformRunnersBefore(this)}),(function(c){e||this.clearTransform();const{x:d,y:u}=new bt(r).transform(n._currentTransform(this));let g=new vt({...t,origin:[d,u]}),p=this._isDeclarative&&o?o:h;if(i){g=g.decompose(d,u),p=p.decompose(d,u);const t=g.rotate,e=p.rotate,i=[t-360,t,t+360],a=i.map((t=>Math.abs(t-e))),s=Math.min(...a),r=a.indexOf(s);g.rotate=i[r]}e&&(a||(g.rotate=t.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),s.from(p),s.to(g);const f=s.at(c);return l=f.rotate,o=new vt(f),this.addTransform(o),n._addRunner(this),s.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(r=T(e,n)),t={...e,origin:r}}),!0),this._isDeclarative&&this._rememberMorpher("transform",s),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new _t(e),this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);let a=null;return this.queue((function(){a=this.element()[t](),i.from(a),i.to(a+e)}),(function(e){return this.element()[t](i.at(e)),i.done()}),(function(t){i.to(a+new _t(t))})),this._rememberMorpher(t,i),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);return this.queue((function(){i.from(this.element()[t]())}),(function(e){return this.element()[t](i.at(e)),i.done()})),this._rememberMorpher(t,i),this},_queueNumber(t,e){return this._queueObject(t,new _t(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let i;return t&&e||(i=this._element.bbox()),t||(t=i.width/i.height*e),e||(e=i.height/i.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,i,a){if(4===arguments.length)return this.plot([t,e,i,a]);if(this._tryRetarget("plot",t))return this;const s=new He(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){s.from(this._element.array())}),(function(t){return this._element.plot(s.at(t)),s.done()})),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,i,a){return this._queueObject("viewbox",new kt(t,e,i,a))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Q(Qe,{rx:Zt,ry:$t,from:ne,to:oe}),q(Qe,"Runner");class si extends Vt{constructor(t,e=t){super(G("svg",t),e),this.namespace()}defs(){return this.isRoot()?V(this.node.querySelector("defs"))||this.put(new Ut):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof O.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:Y,version:"1.1"}).attr("xmlns:xlink",H,E):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,E).attr("xmlns:svgjs",null,E)}root(){return this.isRoot()?this:super.root()}}A({Container:{nested:K((function(){return this.put(new si)}))}}),q(si,"Svg",!0);let ri=class extends Vt{constructor(t,e=t){super(G("symbol",t),e)}};A({Container:{symbol:K((function(){return this.put(new ri)}))}}),q(ri,"Symbol");var ni=Object.freeze({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,i=this.bbox()){return this.cx(t,i).cy(e,i)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,i=this.bbox()){return this.x(t,i).y(e,i)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(O.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}});class oi extends qt{constructor(t,e=t){super(G("text",t),e),this.dom.leading=this.dom.leading??new _t(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new _t(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const i=this.dom.leading;this.each((function(a){if(X(this.node))return;const s=O.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=i*new _t(s);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=r:(this.attr("dy",a?r+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new _t(t.leading||1.3),this}writeDataToDom(){return R(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let i=0;t="";for(let a=0,s=e.length;a{let a;try{a=i.node instanceof F().SVGSVGElement?new kt(i.attr(["x","y","width","height"])):i.bbox()}catch(t){return}const s=new vt(i),r=s.translate(t,e).transform(s.inverse()),n=new bt(a.x,a.y).transform(r);i.move(n.x,n.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,i=this.bbox()){const a=t-i.x,s=e-i.y;return this.dmove(a,s)},size:function(t,e,i=this.bbox()){const a=I(this,t,e,i),s=a.width/i.width,r=a.height/i.height;return this.children().forEach((t=>{const e=new bt(i).transform(new vt(t).inverse());t.scale(s,r,e.x,e.y)})),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}});class gi extends Vt{constructor(t,e=t){super(G("g",t),e)}}Q(gi,ui),A({Container:{group:K((function(){return this.put(new gi)}))}}),q(gi,"G");class pi extends Vt{constructor(t,e=t){super(G("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,H)}}Q(pi,ui),A({Container:{link:K((function(t){return this.put(new pi).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const i=e.index(t);return e.add(this,i),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new pi,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),q(pi,"A");class fi extends Vt{constructor(t,e=t){super(G("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Lt("svg [mask*="+this.id()+"]")}}A({Container:{mask:K((function(){return this.defs().put(new fi)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof fi?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),q(fi,"Mask");class xi extends Gt{constructor(t,e=t){super(G("stop",t),e)}update(t){return("number"==typeof t||t instanceof _t)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new _t(t.offset)),this}}A({Gradient:{stop:function(t,e,i){return this.put(new xi).update(t,e,i)}}}),q(xi,"Stop");class bi extends Gt{constructor(t,e=t){super(G("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,i={}){return this.rule("@font-face",{fontFamily:t,src:e,...i})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let i=t+"{";for(const t in e)i+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return i+="}",i}(t,e))}}A("Dom",{style(t,e){return this.put(new bi).rule(t,e)},fontface(t,e,i){return this.put(new bi).font(t,e,i)}}),q(bi,"Style");class mi extends oi{constructor(t,e=t){super(G("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let i=null;return e&&(i=e.plot(t)),null==t?i:this}track(){return this.reference("href")}}A({Container:{textPath:K((function(t,e){return t instanceof oi||(t=this.text(t)),t.path(e)}))},Text:{path:K((function(t,e=!0){const i=new mi;let a;if(t instanceof We||(t=this.defs().path(t)),i.attr("href","#"+t,H),e)for(;a=this.node.firstChild;)i.node.appendChild(a);return this.put(i)})),textPath(){return this.findOne("textPath")}},Path:{text:K((function(t){return t instanceof oi||(t=(new oi).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Lt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),mi.prototype.MorphArray=Ye,q(mi,"TextPath");class vi extends qt{constructor(t,e=t){super(G("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,H)}}A({Container:{use:K((function(t,e){return this.put(new vi).use(t,e)}))}}),q(vi,"Use");const yi=B;Q([si,ri,de,ce,be],C("viewbox")),Q([xe,je,Ge,We],C("marker")),Q(oi,C("Text")),Q(We,C("Path")),Q(Ut,C("Defs")),Q([oi,li],C("Tspan")),Q([Ve,se,he,Qe],C("radius")),Q(Rt,C("EventTarget")),Q(Bt,C("Dom")),Q(Gt,C("Element")),Q(qt,C("Shape")),Q([Vt,re],C("Container")),Q(he,C("Gradient")),Q(Qe,C("Runner")),Ct.extend([...new Set(k)]),function(t=[]){Ne.push(...[].concat(t))}([_t,xt,kt,vt,Dt,ge,Ye,bt]),Q(Ne,{to(t){return(new He).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,i,a,s){return this.fromArray(t.map((function(t,r){return a.step(t,e[r],i,s[r],s)})))}});class wi extends Gt{constructor(t){super(G("filter",t),t),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(t,e){return!(t=super.put(t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return Lt('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class ki extends Gt{constructor(t,e){super(t,e),this.result(this.id())}in(t){if(null==t){const t=this.attr("in");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in",t)}result(t){return this.attr("result",t)}toString(){return this.result()}}const Ai=t=>function(...e){for(let i=t.length;i--;)null!=e[i]&&this.attr(t[i],e[i])},Ci={blend:Ai(["in","in2","mode"]),colorMatrix:Ai(["type","values"]),composite:Ai(["in","in2","operator"]),convolveMatrix:function(t){t=new Dt(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Ai(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Ai(["in","dx","dy","stdDeviation"]),flood:Ai(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,H)},morphology:Ai(["operator","radius"]),offset:Ai(["dx","dy"]),specularLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Ai([]),turbulence:Ai(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((t=>{const e=P(t),i=Ci[t];wi[e+"Effect"]=class extends ki{constructor(t){super(G("fe"+e,t),t)}update(t){return i.apply(this,t),this}},wi.prototype[t]=K((function(t,...i){const a=new wi[e+"Effect"];return null==t?this.put(a):("function"==typeof t?t.call(a,a):i.unshift(t),this.put(a).update(i))}))})),Q(wi,{merge(t){const e=this.put(new wi.MergeEffect);if("function"==typeof t)return t.call(e,e),e;return(t instanceof Array?t:[...arguments]).forEach((t=>{t instanceof wi.MergeNode?e.put(t):e.mergeNode(t)})),e},componentTransfer(t={}){const e=this.put(new wi.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;if(!(t.r||t.g||t.b||t.a)){t={r:t,g:t,b:t,a:t}}for(const i in t)e.add(new(wi["Func"+i.toUpperCase()])(t[i]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((t=>{const e=P(t);wi[e]=class extends ki{constructor(t){super(G("fe"+e,t),t)}}}));["funcR","funcG","funcB","funcA"].forEach((function(t){const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.ComponentTransferEffect.prototype[t]=i}));["distantLight","pointLight","spotLight"].forEach((t=>{const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.DiffuseLightingEffect.prototype[t]=i,wi.SpecularLightingEffect.prototype[t]=i})),Q(wi.MergeEffect,{mergeNode(t){return this.put(new wi.MergeNode).attr("in",t)}}),Q(Ut,{filter:function(t){const e=this.put(new wi);return"function"==typeof t&&t.call(e,e),e}}),Q(Vt,{filter:function(t){return this.defs().filter(t)}}),Q(Gt,{filterWith:function(t){const e=t instanceof wi?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const Si={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,i,a){return this.parent()&&this.parent().diffuseLighting(t,i,a).in(this)},displacementMap:function(t,e,i,a){return this.parent()&&this.parent().displacementMap(this,t,e,i,a)},dropShadow:function(t,e,i){return this.parent()&&this.parent().dropShadow(this,t,e,i).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){return t=t instanceof Array?t:[...t],this.parent()&&this.parent().merge(this,...t)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,i,a,s){return this.parent()&&this.parent().specularLighting(t,i,a,s).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,a,s){return this.parent()&&this.parent().turbulence(t,e,i,a,s).in(this)}};Q(ki,Si),Q(wi.MergeEffect,{in:function(t){return t instanceof wi.MergeNode?this.add(t,0):this.add((new wi.MergeNode).in(t),0),this}}),Q([wi.CompositeEffect,wi.BlendEffect,wi.DisplacementMapEffect],{in2:function(t){if(null==t){const t=this.attr("in2");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in2",t)}}),wi.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var Li=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getDefaultFilter",value:function(t,e){var i=this.w;t.unfilter(!0),(new wi).size("120%","180%","-5%","-40%"),i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"applyFilter",value:function(t,e,i){var a,s=this,r=this.w;if(t.unfilter(!0),"none"!==i){var n,o,l=r.config.chart.dropShadow,h="lighten"===i?2:.3;if(t.filterWith((function(t){t.colorMatrix({type:"matrix",values:"\n ".concat(h," 0 0 0 0\n 0 ").concat(h," 0 0 0\n 0 0 ").concat(h," 0 0\n 0 0 0 1 0\n "),in:"SourceGraphic",result:"brightness"}),l.enabled&&s.addShadow(t,e,l,"brightness")})),!l.noUserSpaceOnUse)null===(n=t.filterer())||void 0===n||null===(o=n.node)||void 0===o||o.setAttribute("filterUnits","userSpaceOnUse");this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node)}else this.getDefaultFilter(t,e)}},{key:"addShadow",value:function(t,e,i,a){var s,r=this.w,n=i.blur,o=i.top,l=i.left,h=i.color,c=i.opacity;if(h=Array.isArray(h)?h[e]:h,(null===(s=r.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:a,dx:l,dy:o,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:n,result:"blur"}),t.flood({"flood-color":h,"flood-opacity":c,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",a])}},{key:"dropShadow",value:function(t,e){var i,a,s,r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.w;if(t.unfilter(!0),v.isMsEdge()&&"radialBar"===o.config.chart.type)return t;if((null===(i=o.config.chart.dropShadow.enabledOnSeries)||void 0===i?void 0:i.length)>0&&-1===(null===(s=o.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.indexOf(n)))return t;return t.filterWith((function(t){r.addShadow(t,n,e,"SourceGraphic")})),e.noUserSpaceOnUse||t.filterer().node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node),t}},{key:"setSelectionFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;"none"!==s&&this.applyFilter(t,e,s.type)}}},{key:"_scaleFilterSize",value:function(t){if(t){!function(e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}}]),t}(),Mi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"roundPathCorners",value:function(t,e){function i(t,e,i){var s=e.x-t.x,r=e.y-t.y,n=Math.sqrt(s*s+r*r);return a(t,e,Math.min(1,i/n))}function a(t,e,i){return{x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}}function s(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function r(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var n=t.split(/[,\s]/).reduce((function(t,e){var i=e.match("([a-zA-Z])(.+)");return i?(t.push(i[1]),t.push(i[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),o=[];if(n.length>1){var l=r(n[0]),h=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(h=["L",l.x,l.y],n[n.length-1]=h),o.push(n[0]);for(var c=1;c2&&"L"==u[0]&&g.length>2&&"L"==g[0]){var p,f,x=r(d),b=r(u),m=r(g);p=i(b,x,e),f=i(b,m,e),s(u,p),u.origPoint=b,o.push(u);var v=a(p,b,.5),y=a(b,f,.5),w=["C",v.x,v.y,y.x,y.y,f.x,f.y];w.origPoint=b,o.push(w)}else o.push(u)}if(h){var k=r(o[o.length-1]);o.push(["Z"]),s(o[0],k)}}else o=n;return o.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":n,"stroke-linecap":o})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,c=this.w.globals.dom.Paper.rect();return c.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":h}),c.node.setAttribute("fill",r),c}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:a,stroke:e,"stroke-width":i})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var i=this.w.globals.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,s=void 0===a?"#a8a8a8":a,r=t.strokeWidth,n=void 0===r?1:r,o=t.fill,l=t.fillOpacity,h=void 0===l?1:l,c=t.strokeOpacity,d=void 0===c?1:c,u=t.classes,g=t.strokeLinecap,p=void 0===g?null:g,f=t.strokeDashArray,x=void 0===f?0:f,b=this.w;return null===p&&(p=b.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(b.globals.gridHeight)),b.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":h,stroke:s,"stroke-opacity":d,"stroke-linecap":p,"stroke-width":n,"stroke-dasharray":x,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){var i=["M",t,e].join(" ");return i}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=[" L",t,e].join(" "):"H"===i?a=[" H",t].join(" "):"V"===i&&(a=[" V",e].join(" ")),a}},{key:"curve",value:function(t,e,i,a,s,r){var n=["C",t,e,i,a,s,r].join(" ");return n}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,s,r,n){var o="A";arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(o="a");var l=[o,t,e,i,a,s,r,n].join(" ");return l}},{key:"renderPaths",value:function(t){var e,i=t.j,a=t.realIndex,s=t.pathFrom,r=t.pathTo,n=t.stroke,o=t.strokeWidth,l=t.strokeLinecap,h=t.fill,c=t.animationDelay,d=t.initialSpeed,g=t.dataChangeSpeed,p=t.className,f=t.chartType,x=t.shouldClipToGrid,b=void 0===x||x,m=t.bindEventsOnPaths,v=void 0===m||m,w=t.drawShadow,k=void 0===w||w,A=this.w,C=new Li(this.ctx),S=new y(this.ctx),L=this.w.config.chart.animations.enabled,M=L&&this.w.config.chart.animations.dynamicAnimation.enabled,P=!!(L&&!A.globals.resized||M&&A.globals.dataChanged&&A.globals.shouldAnimate);P?e=s:(e=r,A.globals.animationEnded=!0);var I=A.config.stroke.dashArray,T=0;T=Array.isArray(I)?I[a]:A.config.stroke.dashArray;var z=this.drawPath({d:e,stroke:n,strokeWidth:o,fill:h,fillOpacity:1,classes:p,strokeLinecap:l,strokeDashArray:T});z.attr("index",a),b&&("bar"===f&&!A.globals.isHorizontal||A.globals.comboCharts?z.attr({"clip-path":"url(#gridRectBarMask".concat(A.globals.cuid,")")}):z.attr({"clip-path":"url(#gridRectMask".concat(A.globals.cuid,")")})),A.config.chart.dropShadow.enabled&&k&&C.dropShadow(z,A.config.chart.dropShadow,a),v&&(z.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,z)),z.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,z)),z.node.addEventListener("mousedown",this.pathMouseDown.bind(this,z))),z.attr({pathTo:r,pathFrom:s});var X={el:z,j:i,realIndex:a,pathFrom:s,pathTo:r,fill:h,strokeWidth:o,delay:c};return!L||A.globals.resized||A.globals.dataChanged?!A.globals.resized&&A.globals.dataChanged||S.showDelayedElements():S.animatePathsGradually(u(u({},X),{},{speed:d})),A.globals.dataChanged&&M&&P&&S.animatePathsGradually(u(u({},X),{},{speed:g})),z}},{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,i,(function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:a,width:s+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:a,width:s}):"squares"===t?r.rect(e,i).fill("none").stroke({color:a,width:s}):"circles"===t&&r.circle(e).fill("none").stroke({color:a,width:s})}))}},{key:"drawGradient",value:function(t,e,i,a,s){var r,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,c=this.w;e.length<9&&0===e.indexOf("#")&&(e=v.hexToRgba(e,a)),i.length<9&&0===i.indexOf("#")&&(i=v.hexToRgba(i,s));var d=0,u=1,g=1,p=null;null!==o&&(d=void 0!==o[0]?o[0]/100:0,u=void 0!==o[1]?o[1]/100:1,g=void 0!==o[2]?o[2]/100:1,p=void 0!==o[3]?o[3]/100:null);var f=!("donut"!==c.config.chart.type&&"pie"!==c.config.chart.type&&"polarArea"!==c.config.chart.type&&"bubble"!==c.config.chart.type);if(r=l&&0!==l.length?c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){(Array.isArray(l[h])?l[h]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){t.stop(d,e,a),t.stop(u,i,s),t.stop(g,i,s),null!==p&&t.stop(p,e,a)})),f){var x=c.globals.gridWidth/2,b=c.globals.gridHeight/2;"bubble"!==c.config.chart.type?r.attr({gradientUnits:"userSpaceOnUse",cx:x,cy:b,r:n}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?r.from(0,0).to(0,1):"diagonal"===t?r.from(0,0).to(1,1):"horizontal"===t?r.from(0,1).to(1,1):"diagonal2"===t&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,i=t.maxWidth,a=t.fontSize,s=t.fontFamily,r=this.getTextRects(e,a,s),n=r.width/e.length,o=Math.floor(i/n);return i-1){var o=i.globals.selectedDataPoints[s].indexOf(r);i.globals.selectedDataPoints[s].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),h=i.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),c=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),a.getDefaultFilter(t,s)}))};c(l),c(h)}t.node.setAttribute("selected","true"),n="true",void 0===i.globals.selectedDataPoints[s]&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(r)}if("true"===n){var d=i.config.states.active.filter;if("none"!==d)a.applyFilter(t,s,d.type);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}}else if("none"!==i.config.states.active.filter.type)if("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice)a.getDefaultFilter(t,s);else{u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,a){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w,n=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),r.globals.dom.Paper.add(n);var o=n.bbox();return s||(o=n.node.getBoundingClientRect()),n.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i/1.1)return void(t.textContent=e.substring(0,a)+"...");t.textContent="."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}(),Pi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getStackedSeriesTotals",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,i=[];if(0===e.globals.series.length)return i;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,i=[];return e.globals.seriesGroups.forEach((function(a){var s=[];e.config.series.forEach((function(t,i){a.indexOf(e.globals.seriesNames[i])>-1&&s.push(i)}));var r=e.globals.series.map((function(t,e){return-1===s.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));i.push(t.getStackedSeriesTotals(r))})),i}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,i=[],a=[],s=[],r=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){s.push(e),a.push(null)})),e.yaxis.forEach((function(t,e){i[e]=[]}));var n=[];e.yaxis.forEach((function(t,a){var o=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,n){if(e.name===t){var l=n;a===n||r?!r||s.indexOf(n)>-1?i[a].push([a,n]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[n].push([n,a]),l=a),o=!0,-1!==(l=s.indexOf(l))&&s.splice(l,1)}}))}))}o||n.push(a)})),i=i.map((function(t,e){var i=[];return t.forEach((function(t){a[t[1]]=t[0],i.push(t[1])})),i}));for(var o=e.yaxis.length-1,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,i){return t===i[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map((function(t,i){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),i}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var i=0;if(Array.isArray(t))for(var a=0;at&&i.globals.seriesX[s][n]0){var g=function(t,e){var i=s.config.yaxis[s.globals.seriesYAxisReverseMap[e]],r=t<0?-1:1;return t=Math.abs(t),i.logarithmic&&(t=a.getBaseLog(i.logBase,t)),-r*t/n[e]};if(r.isMultipleYAxis){l=[];for(var p=0;p0&&e.forEach((function(e){var n=[],o=[];t.i.forEach((function(i,a){s.config.series[i].group===e&&(n.push(t.series[a]),o.push(i))})),n.length>0&&r.push(a.draw(n,i,o))})),r}}],[{key:"checkComboSeries",value:function(t,e){var i=!1,a=0,s=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||a++,void 0!==t.type&&t.type!==e&&s++})),s>0&&(i=!0),{comboBarCount:a,comboCharts:i}}},{key:"extendArrayProps",value:function(t,e,i){var a,s,r,n,o,l;(null!==(a=e)&&void 0!==a&&a.yaxis&&(e=t.extendYAxis(e,i)),null!==(s=e)&&void 0!==s&&s.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(r=e)&&void 0!==r&&null!==(n=r.annotations)&&void 0!==n&&n.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(l=o.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e)));return e}}]),t}(),Ii=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e}return s(t,[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===t.label.orientation){var a=null!==e?e:0,s=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(null!==s){var r=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-r.height+4);var n="top"===t.label.position?r.width:-r.width;s.setAttribute("y",parseFloat(s.getAttribute("y"))+n);var o=this.annoCtx.graphics.rotateAroundCenter(s),l=o.x,h=o.y;s.setAttribute("transform","rotate(-90 ".concat(l," ").concat(h,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=t.getBoundingClientRect(),r=e.label.style.padding,n=r.left,o=r.right,l=r.top,h=r.bottom;if("vertical"===e.label.orientation){var c=[n,o,l,h];l=c[0],h=c[1],n=c[2],o=c[3]}var d=s.left-a.left-n,u=s.top-a.top-l,g=this.annoCtx.graphics.drawRect(d-i.globals.barPadForNumericAxis,u,s.width+n+o,s.height+l+h,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&g.node.classList.add(e.id),g}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,a,s){var r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(a,"']"));if(r){var n=r.parentNode,o=t.addBackgroundToAnno(r,i);o&&(n.insertBefore(o.node,r),i.label.mouseEnter&&o.node.addEventListener("mouseenter",i.label.mouseEnter.bind(t,i)),i.label.mouseLeave&&o.node.addEventListener("mouseleave",i.label.mouseLeave.bind(t,i)),i.label.click&&o.node.addEventListener("click",i.label.click.bind(t,i)))}};e.config.annotations.xaxis.forEach((function(t,e){return i(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return i(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return i(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var i,a=this.w,s="y1"===t?e.y:e.y2,r=!1;if(this.annoCtx.invertAxis){var n=a.config.xaxis.convertedCatToNumeric?a.globals.categoryLabels:a.globals.labels,o=n.indexOf(s),l=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(o+1,")"));i=l?parseFloat(l.getAttribute("y")):(a.globals.gridHeight/n.length-1)*(o+1)-a.globals.barHeight,void 0!==e.seriesIndex&&a.globals.barHeight&&(i-=a.globals.barHeight/2*(a.globals.series.length-1)-a.globals.barHeight*e.seriesIndex)}else{var h,c=a.globals.seriesYAxisMap[e.yAxisIndex][0],d=a.config.yaxis[e.yAxisIndex].logarithmic?new Pi(this.annoCtx.ctx).getLogVal(a.config.yaxis[e.yAxisIndex].logBase,s,c)/a.globals.yLogRatio[c]:(s-a.globals.minYArr[c])/(a.globals.yRange[c]/a.globals.gridHeight);i=a.globals.gridHeight-Math.min(Math.max(d,0),a.globals.gridHeight),r=d>a.globals.gridHeight||d<0,!e.marker||void 0!==e.y&&null!==e.y||(i=0),null!==(h=a.config.yaxis[e.yAxisIndex])&&void 0!==h&&h.reversed&&(i=d)}return"string"==typeof s&&s.includes("px")&&(i=parseFloat(s)),{yP:i,clipped:r}}},{key:"getX1X2",value:function(t,e){var i=this.w,a="x1"===t?e.x:e.x2,s=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,r=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,n=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,o=!1,l=this.annoCtx.inversedReversedAxis?(r-a)/(n/i.globals.gridWidth):(a-s)/(n/i.globals.gridWidth);return"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||i.config.chart.sparkline.enabled||(l=this.getStringX(a)),"string"==typeof a&&a.includes("px")&&(l=parseFloat(a)),null==a&&e.marker&&(l=i.globals.gridWidth),void 0!==e.seriesIndex&&i.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=i.globals.barWidth/2*(i.globals.series.length-1)-i.globals.barWidth*e.seriesIndex),l>i.globals.gridWidth?(l=i.globals.gridWidth,o=!0):l<0&&(l=0,o=!0),{x:l,clipped:o}}},{key:"getStringX",value:function(t){var e=this.w,i=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var a=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),s=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(a+1,")"));return s&&(i=parseFloat(s.getAttribute("x"))),i}}]),t}(),Ti=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addXaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=this.helpers.getX1X2("x1",t),n=r.x,o=r.clipped,l=!0,h=t.label.text,c=t.strokeDashArray;if(v.isNumber(n)){if(null===t.x2||void 0===t.x2){if(!o){var d=this.annoCtx.graphics.drawLine(n+t.offsetX,0+t.offsetY,n+t.offsetX,s.globals.gridHeight+t.offsetY,t.borderColor,c,t.borderWidth);e.appendChild(d.node),t.id&&d.node.classList.add(t.id)}}else{var u=this.helpers.getX1X2("x2",t);if(a=u.x,l=u.clipped,!o||!l){if(a12?u-12:0===u?12:u;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(g))).replace(/(^|[^\\])h/g,"$1"+g);var p=a?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var x=a?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);var b=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var m=u<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));var v=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var y=-t.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){var k=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(k)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var A=(a?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(n[0],"g"),n[A])).replace(new RegExp(o[0],"g"),o[A])).replace(new RegExp(s[0],"g"),s[c])).replace(new RegExp(r[0],"g"),r[c])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var a=this.w;void 0!==a.config.xaxis.min&&(t=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(e=a.config.xaxis.max);var s=this.getDate(t),r=this.getDate(e),n=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=v.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),Xi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return s(t,[{key:"xLabelFormat",value:function(t,e,i,a){var s=this.w;if("datetime"===s.config.xaxis.type&&void 0===s.config.xaxis.labels.formatter&&void 0===s.config.tooltip.x.formatter){var r=new zi(this.ctx);return r.formatDate(r.getDate(e),s.config.tooltip.x.format)}return t(e,i,a)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,i){var a=this.w;if(v.isNumber(t))if(0!==a.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:a.globals.yValueDecimal);else{var s=t.toFixed(0);t=t==s?s:t.toFixed(1)}return t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(v.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(v.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var i=e.globals.maxX-e.globals.minX;return i>0&&i<100?t.toFixed(1):t.toFixed(0)}if(e.globals.isBarHorizontal)if(e.globals.maxY-e.globals.minYArr<4)return t.toFixed(1);return t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,a){void 0!==i.labels.formatter?e.globals.yLabelFormatters[a]=i.labels.formatter:e.globals.yLabelFormatters[a]=function(s){return e.globals.xyCharts?Array.isArray(s)?s.map((function(e){return t.defaultYFormatter(e,i,a)})):t.defaultYFormatter(s,i,a):s}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),Ri=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getLabel",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",n=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,l=void 0===t[a]?"":t[a],h=l,c=o.globals.xLabelFormatter,d=o.config.xaxis.labels.formatter,u=!1,g=new Xi(this.ctx),p=l;n&&(h=g.xLabelFormat(c,l,p,{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o}),void 0!==d&&(h=d(l,t[a],{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o})));var f,x;e.length>0?(f=e[a].unit,x=null,e.forEach((function(t){"month"===t.unit?x="year":"day"===t.unit?x="month":"hour"===t.unit?x="day":"minute"===t.unit&&(x="hour")})),u=x===f,i=e[a].position,h=e[a].value):"datetime"===o.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var b=new Mi(this.ctx),m={};m=o.globals.rotateXLabels&&n?b.getTextRects(h,parseInt(r,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):b.getTextRects(h,parseInt(r,10));var v=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||s.indexOf(h)>=0&&v)&&(h=""),{x:i,text:h,textRect:m,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var a=this.w,s=a.config.xaxis.tickAmount;return"dataPoints"===s&&(s=Math.round(a.globals.gridWidth/120)),s>i||t%Math.round(i/(s+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,a,s){var r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=s[s.length-1];e.xa.length||a.some((function(t){return Array.isArray(t.seriesName)}))?t:i.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,i=e.config.yaxis[t];if(!i.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!i.showForNullSeries){var a=e.globals.seriesYAxisMap[t],s=new Pi(this.ctx);return a.every((function(t){return s.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,i,a,s,r,n){var o=this.w,l=new Mi(this.ctx),h=o.globals.translateY+o.config.yaxis[s].labels.offsetY;if(o.globals.isBarHorizontal?h=0:"heatmap"===o.config.chart.type&&(h+=r/2),a.show&&e>0){!0===o.config.yaxis[s].opposite&&(t+=a.width);for(var c=e;c>=0;c--){var d=l.drawLine(t+i.offsetX-a.width+a.offsetX,h+a.offsetY,t+i.offsetX+a.offsetX,h+a.offsetY,a.color);n.add(d),h+=r}}}}]),t}(),Yi=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx),this.axesUtils=new Ri(this.annoCtx)}return s(t,[{key:"addYaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=t.strokeDashArray,n=this.helpers.getY1Y2("y1",t),o=n.yP,l=n.clipped,h=!0,c=!1,d=t.label.text;if(null===t.y2||void 0===t.y2){if(!l){c=!0;var u=this.annoCtx.graphics.drawLine(0+t.offsetX,o+t.offsetY,this._getYAxisAnnotationWidth(t),o+t.offsetY,t.borderColor,r,t.borderWidth);e.appendChild(u.node),t.id&&u.node.classList.add(t.id)}}else{if(a=(n=this.helpers.getY1Y2("y2",t)).yP,h=n.clipped,a>o){var g=o;o=a,a=g}if(!l||!h){c=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,a+t.offsetY,this._getYAxisAnnotationWidth(t),o-a,0,t.fillColor,t.opacity,1,t.borderColor,r);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(c){var f="right"===t.label.position?s.globals.gridWidth:"center"===t.label.position?s.globals.gridWidth/2:0,x=this.annoCtx.graphics.drawText({x:f+t.label.offsetX,y:(null!=a?a:o)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});x.attr({rel:i}),e.appendChild(x.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;e.globals.gridWidth;return(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,a){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,i.node,a)})),i}}]),t}(),Ei=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addPointAnnotation",value:function(t,e,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",t),s=a.x,r=a.clipped,n=(a=this.helpers.getY1Y2("y1",t)).yP,o=a.clipped;if(v.isNumber(s)&&!o&&!r){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},h=this.annoCtx.graphics.drawMarker(s+t.marker.offsetX,n+t.marker.offsetY,l);e.appendChild(h.node);var c=t.label.text?t.label.text:"",d=this.annoCtx.graphics.drawText({x:s+t.label.offsetX,y:n+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:c,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(d.attr({rel:i}),e.appendChild(d.node),t.customSVG.SVG){var u=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});u.attr({transform:"translate(".concat(s+t.customSVG.offsetX,", ").concat(n+t.customSVG.offsetY,")")}),u.node.innerHTML=t.customSVG.SVG,e.appendChild(u.node)}if(t.image.path){var g=t.image.width?t.image.width:20,p=t.image.height?t.image.height:20;h=this.annoCtx.addImage({x:s+t.image.offsetX-g/2,y:n+t.image.offsetY-p/2,width:g,height:p,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&h.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&h.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&h.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,a){t.addPointAnnotation(e,i.node,a)})),i}}]),t}();var Hi={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},Oi=function(){function t(){i(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return s(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[Hi],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),Fi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.graphics=new Mi(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Ii(this),this.xAxisAnnotations=new Ti(this),this.yAxisAnnotations=new Yi(this),this.pointsAnnotations=new Ei(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return s(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=t.config.chart.animations.enabled,r=[e,i,a],n=[i.node,e.node,a.node],o=0;o<3;o++)t.globals.dom.elGraphical.add(r[o]),!s||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&n[o].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:n[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,a=t.y,s=t.text,r=t.textAnchor,n=t.foreColor,o=t.fontSize,l=t.fontFamily,h=t.fontWeight,c=t.cssClass,d=t.backgroundColor,u=t.borderWidth,g=t.strokeDashArray,p=t.borderRadius,f=t.borderColor,x=t.appendTo,b=void 0===x?".apexcharts-svg":x,m=t.paddingLeft,v=void 0===m?4:m,y=t.paddingRight,w=void 0===y?4:y,k=t.paddingBottom,A=void 0===k?2:k,C=t.paddingTop,S=void 0===C?2:C,L=this.w,M=this.graphics.drawText({x:i,y:a,text:s,textAnchor:r||"start",fontSize:o||"12px",fontWeight:h||"regular",fontFamily:l||L.config.chart.fontFamily,foreColor:n||L.config.chart.foreColor,cssClass:c}),P=L.globals.dom.baseEl.querySelector(b);P&&P.appendChild(M.node);var I=M.bbox();if(s){var T=this.graphics.drawRect(I.x-v,I.y-S,I.width+v+w,I.height+A+S,p,d||"transparent",1,u,f,g);P.insertBefore(T.node,M.node)}}},{key:"addImage",value:function(t,e){var i=this.w,a=t.path,s=t.x,r=void 0===s?0:s,n=t.y,o=void 0===n?0:n,l=t.width,h=void 0===l?20:l,c=t.height,d=void 0===c?20:c,u=t.appendTo,g=void 0===u?".apexcharts-svg":u,p=i.globals.dom.Paper.image(a);p.size(h,d).move(r,o);var f=i.globals.dom.baseEl.querySelector(g);return f&&f.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,a=t.context,s=t.type,r=t.contextMethod,n=a,o=n.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),h=l.childNodes.length+1,c=new Oi,d=Object.assign({},"xaxis"===s?c.xAxisAnnotation:"yaxis"===s?c.yAxisAnnotation:c.pointAnnotation),u=v.extend(d,e);switch(s){case"xaxis":this.addXaxisAnnotation(u,l,h);break;case"yaxis":this.addYaxisAnnotation(u,l,h);break;case"point":this.addPointAnnotation(u,l,h)}var g=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(h,"']")),p=this.helpers.addBackgroundToAnno(g,u);return p&&l.insertBefore(p.node,g),i&&o.globals.memory.methodsToExec.push({context:n,id:u.id?u.id:v.randomId(),method:r,label:"addAnnotation",params:e}),a}},{key:"clearAnnotations",value:function(t){for(var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),a=e.globals.memory.methodsToExec.length-1;a>=0;a--)"addText"!==e.globals.memory.methodsToExec[a].label&&"addAnnotation"!==e.globals.memory.methodsToExec[a].label||e.globals.memory.methodsToExec.splice(a,1);i=v.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(e));a&&(i.globals.memory.methodsToExec.map((function(t,a){t.id===e&&i.globals.memory.methodsToExec.splice(a,1)})),Array.prototype.forEach.call(a,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),Di=function(t){var e,i=t.isTimeline,a=t.ctx,s=t.seriesIndex,r=t.dataPointIndex,n=t.y1,o=t.y2,l=t.w,h=l.globals.seriesRangeStart[s][r],c=l.globals.seriesRangeEnd[s][r],d=l.globals.labels[r],u=l.config.series[s].name?l.config.series[s].name:"",g=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,f={w:l,seriesIndex:s,dataPointIndex:r,start:h,end:c};("function"==typeof p&&(u=p(u,f)),null!==(e=l.config.series[s].data[r])&&void 0!==e&&e.x&&(d=l.config.series[s].data[r].x),i)||"datetime"===l.config.xaxis.type&&(d=new Xi(a).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(a).formatDate,w:l}));"function"==typeof g&&(d=g(d,f)),Number.isFinite(n)&&Number.isFinite(o)&&(h=n,c=o);var x="",b="",m=l.globals.colors[s];if(void 0===l.config.tooltip.x.formatter)if("datetime"===l.config.xaxis.type){var v=new zi(a);x=v.formatDate(v.getDate(h),l.config.tooltip.x.format),b=v.formatDate(v.getDate(c),l.config.tooltip.x.format)}else x=h,b=c;else x=l.config.tooltip.x.formatter(h),b=l.config.tooltip.x.formatter(c);return{start:h,end:c,startVal:x,endVal:b,ylabel:d,color:m,seriesName:u}},_i=function(t){var e=t.color,i=t.seriesName,a=t.ylabel,s=t.start,r=t.end,n=t.seriesIndex,o=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(n);s=l.yLbFormatter(s),r=l.yLbFormatter(r);var h=l.yLbFormatter(t.w.globals.series[n][o]),c='\n '.concat(s,'\n - \n ').concat(r,"\n ");return'
'+(i||"")+'
'+a+": "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[n].type||"rangeBar"===t.w.config.series[n].type?c:"".concat(h,""):c)+"
"},Ni=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){this.hideYAxis();return v.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var i=e.w.config.series[e.seriesIndex].name;return null!==t?i+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),u(u({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,a=e.dataPointIndex,s=e.w,r=function(){var t=s.globals.seriesRangeStart[i][a];return s.globals.seriesRangeEnd[i][a]-t};return s.globals.comboCharts?"rangeBar"===s.config.series[i].type||"rangeArea"===s.config.series[i].type?r():t:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Di(u(u({},t),{},{isTimeline:!0})),i=e.color,a=e.seriesName,s=e.ylabel,r=e.startVal,n=e.endVal;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t):function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,i;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(i=t.plotOptions.bar)&&void 0!==i&&i.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}}}}},{key:"brush",value:function(t){return v.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return u(u({},t),{},{plotOptions:u(u({},t.plotOptions),{},{bar:u(u({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return v.isNumber(t)?Math.floor(t):t};var a=t.xaxis.labels.formatter,s=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(s=i.map((function(t){return Array.isArray(t)?t:String(t)}))),s&&s.length&&(t.xaxis.labels.formatter=function(t){return v.isNumber(t)?a(s[Math.floor(t)-1]):a(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,i,a,s){var r=t.globals.seriesCandleO[e][i],n=t.globals.seriesCandleH[e][i],o=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],h=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==s?'
\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][i],"\n
"):'
')+"
".concat(a[0],': ')+r+"
"+"
".concat(a[1],': ')+n+"
"+(o?"
".concat(a[2],': ')+o+"
":"")+"
".concat(a[3],': ')+l+"
"+"
".concat(a[4],': ')+h+"
"}}]),t}(),Wi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(t){var e=t.responsiveOverride,i=this.opts,a=new Oi,s=new Ni(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),n={};if(i&&"object"===b(i)){var o,l,h,c,d,u,g,p,f,x,m={};m=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?s[i.chart.type]():s.line(),null!==(o=i.plotOptions)&&void 0!==o&&null!==(l=o.bar)&&void 0!==l&&l.isFunnel&&(m=s.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(m=s.stackedBars()),null!==(h=i.chart.brush)&&void 0!==h&&h.enabled&&(m=s.brush(m)),null!==(c=i.plotOptions)&&void 0!==c&&null!==(d=c.line)&&void 0!==d&&d.isSlopeChart&&(m=s.slope()),i.chart.stacked&&"100%"===i.chart.stackType&&(i=s.stacked100(i)),null!==(u=i.plotOptions)&&void 0!==u&&null!==(g=u.bar)&&void 0!==g&&g.isDumbbell&&(i=s.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},e||(i.xaxis.convertedCatToNumeric=!1),(null!==(p=(i=this.checkForCatToNumericXAxis(this.chartType,m,i)).chart.sparkline)&&void 0!==p&&p.enabled||null!==(f=window.Apex.chart)&&void 0!==f&&null!==(x=f.sparkline)&&void 0!==x&&x.enabled)&&(m=s.sparkline(m)),n=v.extend(r,m)}var y=v.extend(n,window.Apex);return r=v.extend(y,i),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var a,s,r=new Ni(i),n=("bar"===t||"boxPlot"===t)&&(null===(a=i.plotOptions)||void 0===a||null===(s=a.bar)||void 0===s?void 0:s.horizontal),o="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,l="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,h=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return n||o||!l||"between"===h||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new Oi;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=v.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[v.extend(i.yAxis,t.yaxis)]:t.yaxis=v.extendArray(t.yaxis,i.yAxis);var a=!1;t.yaxis.forEach((function(t){t.logarithmic&&(a=!0)}));var s=t.series;return e&&!s&&(s=e.config.series),a&&s.length!==t.yaxis.length&&s.length&&(t.yaxis=s.map((function(e,a){if(e.name||(s[a].name="series-".concat(a+1)),t.yaxis[a])return t.yaxis[a].seriesName=s[a].name,t.yaxis[a];var r=v.extend(i.yAxis,t.yaxis[0]);return r.show=!1,r}))),a&&s.length>1&&s.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.yaxis=v.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.xaxis=v.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new Oi;return t.annotations.points=v.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),Bi=function(){function t(){i(this,t)}return s(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:t.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=v.extend({},t),e.initialSeries=v.clone(t.series),e.lastXAxis=v.clone(e.initialConfig.xaxis),e.lastYAxis=v.clone(e.initialConfig.yaxis),e}}]),t}(),Gi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(){var t=new Wi(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new Bi).init(t)}}}]),t}(),ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return s(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,a=parseInt(e.globals.gridWidth,10),s=parseInt(e.globals.gridHeight,10),r=a>s?a:s,n=t.image,o=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=r+1,l=r):(o=t.width,l=t.height);var h=document.createElementNS(e.globals.SVGNS,"pattern");Mi.setAttrs(h,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var c=document.createElementNS(e.globals.SVGNS,"image");h.appendChild(c),c.setAttributeNS(window.SVG.xlink,"href",n),Mi.setAttrs(c,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),c.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(h)}},{key:"getSeriesIndex",value:function(t){var e=this.w,i=e.config.chart.type;return("bar"===i||"rangeBar"===i)&&e.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var i,a=this.w,s=null,n=null,o=r(t);try{for(o.s();!(i=o.n()).done;){var l=i.value;l>=e.threshold?(null===s||l>s)&&(s=l):(null===n||l-1?x=v.getOpacityFromRGBA(c):m=v.hexToRgba(v.rgb2hex(c),x),t.opacity&&(x=t.opacity),"pattern"===p&&(n=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:n,fillColor:c,fillOpacity:x,defaultColor:m})),b){var y=f(l.fill.gradient.colorStops)||[],w=l.fill.gradient.type;h&&(y[this.seriesIndex]=this.computeColorStops(s.globals.series[this.seriesIndex],l.plotOptions.line.colors),w="vertical"),o=this.handleGradientFill({type:w,fillConfig:t.fillConfig,fillColor:c,fillOpacity:x,colorStops:y,i:this.seriesIndex})}if("image"===p){var k=l.fill.image.src,A=t.patternID?t.patternID:"",C="pattern".concat(s.globals.cuid).concat(t.seriesNumber+1).concat(A);-1===this.patternIDs.indexOf(C)&&(this.clippedImgArea({opacity:x,image:Array.isArray(k)?t.seriesNumber-1&&(p=v.getOpacityFromRGBA(g));var f=void 0===o.gradient.opacityTo?a:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[n]:o.gradient.opacityTo;if(void 0===o.gradient.gradientToColors||0===o.gradient.gradientToColors.length)d="dark"===o.gradient.shade?c.shadeColor(-1*parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i):c.shadeColor(parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i);else if(o.gradient.gradientToColors[l.seriesNumber]){var x=o.gradient.gradientToColors[l.seriesNumber];d=x,x.indexOf("rgba")>-1&&(f=v.getOpacityFromRGBA(x))}else d=i;if(o.gradient.gradientFrom&&(g=o.gradient.gradientFrom),o.gradient.gradientTo&&(d=o.gradient.gradientTo),o.gradient.inverseColors){var b=g;g=d,d=b}return g.indexOf("rgb")>-1&&(g=v.rgb2hex(g)),d.indexOf("rgb")>-1&&(d=v.rgb2hex(d)),h.drawGradient(e,g,d,p,f,l.size,o.gradient.stops,r,n)}}]),t}(),Vi=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],r=this.w,n=e,o=t,l=null,h=new Mi(this.ctx),c=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(o.x))for(var d=0;d0:r.config.markers.size>0)||s||c){p||(f+=" w".concat(v.randomId()));var x=this.getMarkerConfig({cssClass:f,seriesIndex:e,dataPointIndex:g});if(r.config.series[n].data[g]&&(r.config.series[n].data[g].fillColor&&(x.pointFillColor=r.config.series[n].data[g].fillColor),r.config.series[n].data[g].strokeColor&&(x.pointStrokeColor=r.config.series[n].data[g].strokeColor)),void 0!==a&&(x.pSize=a),(o.x[d]<-r.globals.markers.largestSize||o.x[d]>r.globals.gridWidth+r.globals.markers.largestSize||o.y[d]<-r.globals.markers.largestSize||o.y[d]>r.globals.gridHeight+r.globals.markers.largestSize)&&(x.pSize=0),!p)(r.globals.markers.size[e]>0||s||c)&&!l&&(l=h.group({class:s||c?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),(u=h.drawMarker(o.x[d],o.y[d],x)).attr("rel",g),u.attr("j",g),u.attr("index",e),u.node.setAttribute("default-marker-size",x.pSize),new Li(this.ctx).setSelectionFilter(u,e,g),this.addEvents(u),l&&l.add(u)}else void 0===r.globals.pointsArray[e]&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([o.x[d],o.y[d]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,i=t.seriesIndex,a=t.dataPointIndex,s=void 0===a?null:a,r=t.radius,n=void 0===r?null:r,o=t.size,l=void 0===o?null:o,h=t.strokeWidth,c=void 0===h?null:h,d=this.w,u=this.getMarkerStyle(i),g=null===l?d.globals.markers.size[i]:l,p=d.config.markers;return null!==s&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===i&&t.dataPointIndex===s&&(u.pointStrokeColor=t.strokeColor,u.pointFillColor=t.fillColor,g=t.size,u.pointShape=t.shape)})),{pSize:null===n?g:n,pRadius:null!==n?n:p.radius,pointStrokeWidth:null!==c?c:Array.isArray(p.strokeWidth)?p.strokeWidth[i]:p.strokeWidth,pointStrokeColor:u.pointStrokeColor,pointFillColor:u.pointFillColor,shape:u.pointShape||(Array.isArray(p.shape)?p.shape[i]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[i]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[i]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[i]:p.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(t){var e=this.w,i=new Mi(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,a=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[t]:a,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),Ui=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return s(t,[{key:"draw",value:function(t,e,i){var a=this.w,s=new Mi(this.ctx),r=i.realIndex,n=i.pointsPos,o=i.zRatio,l=i.elParent,h=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(h.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(n.x))for(var c=0;cp.maxBubbleRadius&&(g=p.maxBubbleRadius)}var f=n.x[c],x=n.y[c];if(g=g||0,null!==x&&void 0!==a.globals.series[r][d]||(u=!1),u){var b=this.drawPoint(f,x,g,r,d,e);h.add(b)}l.add(h)}}},{key:"drawPoint",value:function(t,e,i,a,s,r){var n=this.w,o=a,l=new y(this.ctx),h=new Li(this.ctx),c=new ji(this.ctx),d=new Vi(this.ctx),u=new Mi(this.ctx),g=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:s,radius:"bubble"===n.config.chart.type||n.globals.comboCharts&&n.config.series[a]&&"bubble"===n.config.series[a].type?i:null}),p=c.fillPath({seriesNumber:a,dataPointIndex:s,color:g.pointFillColor,patternUnits:"objectBoundingBox",value:n.globals.series[a][r]}),f=u.drawMarker(t,e,g);if(n.config.series[o].data[s]&&n.config.series[o].data[s].fillColor&&(p=n.config.series[o].data[s].fillColor),f.attr({fill:p}),n.config.chart.dropShadow.enabled){var x=n.config.chart.dropShadow;h.dropShadow(f,x,a)}if(!this.initialAnim||n.globals.dataChanged||n.globals.resized)n.globals.animationEnded=!0;else{var b=n.config.chart.animations.speed;l.animateMarker(f,b,n.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(f)}),100)}))}return f.attr({rel:s,j:s,index:a,"default-marker-size":g.pSize}),h.setSelectionFilter(f,a,s),d.addEvents(f),f.node.classList.add("apexcharts-marker"),f}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}]),t}(),qi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"dataLabelsCorrection",value:function(t,e,i,a,s,r,n){var o=this.w,l=!1,h=new Mi(this.ctx).getTextRects(i,n),c=h.width,d=h.height;e<0&&(e=0),e>o.globals.gridHeight+d&&(e=o.globals.gridHeight+d/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:t,y:e,width:c,height:d});var u=o.globals.dataLabelsRects[a].length-2,g=void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(void 0!==o.globals.dataLabelsRects[a][u]){var p=o.globals.dataLabelsRects[a][g];(t>p.x+p.width||e>p.y+p.height||e+de.globals.gridWidth+b.textRects.width+30)&&(o="");var m=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(m=e.globals.dataLabels.style.colors[n]),"function"==typeof m&&(m=m({series:e.globals.series,seriesIndex:r,dataPointIndex:n,w:e})),u&&(m=u);var v=d.offsetX,y=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(v=0,y=0),e.globals.isSlopeChart&&(0!==n&&(v=-2*d.offsetX+5),0!==n&&n!==e.config.series[r].data.length-1&&(v=0)),b.drawnextLabel){if((x=i.drawText({width:100,height:parseInt(d.style.fontSize,10),x:a+v,y:s+y,foreColor:m,textAnchor:l||d.textAnchor,text:o,fontSize:h||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"})).attr({class:f||"apexcharts-datalabel",cx:a,cy:s}),d.dropShadow.enabled){var w=d.dropShadow;new Li(this.ctx).dropShadow(x,w)}c.add(x),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(n)}return x}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,a=i.config.dataLabels.background,s=a.padding,r=a.padding/2,n=e.width,o=e.height,l=new Mi(this.ctx).drawRect(e.x-s,e.y-r/2,n+2*s,o+r,a.borderRadius,"transparent"!==i.config.chart.background&&i.config.chart.background?i.config.chart.background:"#fff",a.opacity,a.borderWidth,a.borderColor);a.dropShadow.enabled&&new Li(this.ctx).dropShadow(l,a.dropShadow);return l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,s=v.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,t&&(e&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i-1&&(t[i].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,i=this.getSeriesByName(t),a=parseInt(null==i?void 0:i.getAttribute("data:realIndex"),10),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),r=null,n=null,o=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){r=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),n=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']"));var l=e.globals.seriesYAxisReverseMap[a];o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']"));else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var h=0;h=t.from&&(r0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1)for(var s=i.config.series.map((function(t,a){return t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(a)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(i.config.series[a].type)>-1)?a:-1})),r="asc"===t?0:s.length-1;"asc"===t?r=0;"asc"===t?r++:r--)if(-1!==s[r]){a=s[r];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,a){for(var s=e[i].childNodes,r={type:a,paths:[],realIndex:e[i].getAttribute("data:realIndex")},n=0;n0)for(var a=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),a=[],s=function(t){var e=function(e){return i[t].getAttribute(e)},s={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};a.push({rect:s,color:i[t].getAttribute("color")})},r=0;r0?t:[]}));return t}}]),t}(),$i=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,a=this.w.globals,s="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,r=0;r=5?this.twoDSeries.push(v.parseNumber(t[e].data[r][4])):this.twoDSeries.push(v.parseNumber(t[e].data[r][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var n=new Date(t[e].data[r][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(t[e].data[r][0]);for(var o=0;o-1&&(r=this.activeSeriesIndex);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,r=new zi(i),n=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isRangeBar="rangeBar"===a.chart.type&&s.isBarHorizontal,s.hasXaxisGroups="category"===a.xaxis.type&&a.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=a.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?s.seriesNames.push(t.name):s.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var o=[],l=f(new Set(a.series.map((function(t){return t.group}))));a.series.forEach((function(t,e){var i=l.indexOf(t.group);o[i]||(o[i]=[]),o[i].push(s.seriesNames[e])})),s.seriesGroups=o;for(var h=function(){for(var t=0;t0&&(this.twoDSeriesX=n,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var d=t[c].data.map((function(t){return v.parseNumber(t)}));s.series.push(d)}s.seriesZ.push(this.threeDSeries),void 0!==t[c].color?s.seriesColors.push(t[c].color):s.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var a=0;a0)i.labels=e.xaxis.categories;else if(e.labels.length>0)i.labels=e.labels.slice();else if(this.fallbackToCategory){if(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric)new Ni(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t)}else this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,a=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var s=i.series.map((function(t,e){return t.data.filter((function(t,e,i){return i.findIndex((function(e){return e.x===t.x}))===e}))})),r=s.reduce((function(t,e,i,a){return a[t].length>e.length?t:i}),0),n=0;n0&&s==i.length&&e.push(a)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}]),t}(),Ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),a=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",a*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"getSvgString",value:function(){var t=this;return new Promise((function(e){var i=t.w,a=i.config.chart.toolbar.export.width,s=i.config.chart.toolbar.export.scale||a/i.globals.svgWidth;s||(s=1);var r=t.w.globals.dom.Paper.svg(),n=t.w.globals.dom.Paper.node.cloneNode(!0);1!==s&&t.scaleSvgNode(n,s),t.convertImagesToBase64(n).then((function(){r=(new XMLSerializer).serializeToString(n),e(r.replace(/ /g," "))}))}))}},{key:"convertImagesToBase64",value:function(t){var e=this,i=t.getElementsByTagName("image"),a=Array.from(i).map((function(t){var i=t.getAttributeNS("http://www.w3.org/1999/xlink","href");return i&&!i.startsWith("data:")?e.getBase64FromUrl(i).then((function(e){t.setAttributeNS("http://www.w3.org/1999/xlink","href",e)})).catch((function(t){console.error("Error converting image to base64:",t)})):Promise.resolve()}));return Promise.all(a)}},{key:"getBase64FromUrl",value:function(t){return new Promise((function(e,i){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var t=document.createElement("canvas");t.width=a.width,t.height=a.height,t.getContext("2d").drawImage(a,0,0),e(t.toDataURL())},a.onerror=i,a.src=t}))}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var t=this;return new Promise((function(e){t.cleanup(),t.getSvgString().then((function(t){var i=new Blob([t],{type:"image/svg+xml;charset=utf-8"});e(URL.createObjectURL(i))}))}))}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var a=e.w,s=t?t.scale||t.width/a.globals.svgWidth:1;e.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*s,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var n="transparent"!==a.config.chart.background&&a.config.chart.background?a.config.chart.background:"#fff",o=r.getContext("2d");o.fillStyle=n,o.fillRect(0,0,r.width*s,r.height*s),e.getSvgString().then((function(t){var e="data:image/svg+xml,"+encodeURIComponent(t),a=new Image;a.crossOrigin="anonymous",a.onload=function(){if(o.drawImage(a,0,0),r.msToBlob){var t=r.msToBlob();i({blob:t})}else{var e=r.toDataURL("image/png");i({imgURI:e})}},a.src=e}))}))}},{key:"exportToSVG",value:function(){var t=this;this.svgUrl().then((function(e){t.triggerDownload(e,t.w.config.chart.toolbar.export.svg.filename,".svg")}))}},{key:"exportToPng",value:function(){var t=this,e=this.w.config.chart.toolbar.export.scale,i=this.w.config.chart.toolbar.export.width,a=e?{scale:e}:i?{width:i}:void 0;this.dataURI(a).then((function(e){var i=e.imgURI,a=e.blob;a?navigator.msSaveOrOpenBlob(a,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,a=t.fileName,s=t.columnDelimiter,r=void 0===s?",":s,n=t.lineDelimiter,o=void 0===n?"\n":n,l=this.w;i||(i=l.config.series);var h=[],c=[],d="",u=l.globals.series.map((function(t,e){return-1===l.globals.collapsedSeriesIndices.indexOf(e)?t:[]})),g=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.categoryFormatter?l.config.chart.toolbar.export.csv.categoryFormatter(t):"datetime"===l.config.xaxis.type&&String(t).length>=10?new Date(t).toDateString():v.isNumber(t)?t:t.split(r).join("")},p=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},x=Math.max.apply(Math,f(i.map((function(t){return t.data?t.data.length:0})))),b=new $i(this.ctx),m=new Ri(this.ctx),y=function(t){var i="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var a=l.globals.yLabelFormatters[0],s=new Zi(e.ctx).getActiveConfigSeriesIndex();i=a(l.globals.labels[t],{seriesIndex:s,dataPointIndex:t,w:l})}else i=m.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?i=l.config.xaxis.categories[t]:l.config.labels.length&&(i=l.config.labels[t]))}else i=l.config.labels[t];return null===i?"nullvalue":(Array.isArray(i)&&(i=i.join(" ")),v.isNumber(i)?i:i.split(r).join(""))},w=function(t,e){if(h.length&&0===e&&c.push(h.join(r)),t.data){t.data=t.data.length&&t.data||f(Array(x)).map((function(){return""}));for(var a=0;a0&&!s.globals.isBarHorizontal&&(this.xaxisLabels=s.globals.timescaleLabels.slice()),s.config.xaxis.overwriteCategories&&(this.xaxisLabels=s.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===s.config.xaxis.position?this.offY=0:this.offY=s.globals.gridHeight,this.offY=this.offY+s.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.xaxisBorderWidth=s.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=s.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=s.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=s.config.xaxis.axisBorder.height,this.yaxis=s.config.yaxis[0]}return s(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new Mi(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});i.add(a);for(var s=[],r=0;r6&&void 0!==arguments[6]?arguments[6]:{},h=[],c=[],d=this.w,u=l.xaxisFontSize||this.xaxisFontSize,g=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,f=l.fontWeight||d.config.xaxis.labels.style.fontWeight,x=l.cssClass||d.config.xaxis.labels.style.cssClass,b=d.globals.padHorizontal,m=a.length,v="category"===d.config.xaxis.type?d.globals.dataPoints:m;if(0===v&&m>v&&(v=m),s){var y=v>1?v-1:v;n=d.globals.gridWidth/Math.min(y,m-1),b=b+r(0,n)/2+d.config.xaxis.labels.offsetX}else n=d.globals.gridWidth/v,b=b+r(0,n)+d.config.xaxis.labels.offsetX;for(var w=function(s){var l=b-r(s,n)/2+d.config.xaxis.labels.offsetX;0===s&&1===m&&n/2===b&&1===v&&(l=d.globals.gridWidth/2);var y=o.axesUtils.getLabel(a,d.globals.timescaleLabels,l,s,h,u,t),w=28;d.globals.rotateXLabels&&t&&(w=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(w+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(u)+(d.globals.xAxisLabelsHeight-d.globals.xAxisGroupLabelsHeight)+(d.globals.rotateXLabels?10:0)),y=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(s,y,m):o.axesUtils.checkForOverflowingLabels(s,y,m,h,c);if(d.config.xaxis.labels.show){var k=e.drawText({x:y.x,y:o.offY+d.config.xaxis.labels.offsetY+w-("top"===d.config.xaxis.position?d.globals.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:"middle",fontWeight:y.isBold?600:f,fontSize:u,fontFamily:g,foreColor:Array.isArray(p)?t&&d.config.xaxis.convertedCatToNumeric?p[d.globals.minX+s-1]:p[s]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(i.add(k),k.on("click",(function(t){if("function"==typeof d.config.chart.events.xAxisLabelClick){var e=Object.assign({},d,{labelIndex:s});d.config.chart.events.xAxisLabelClick(t,o.ctx,e)}})),t){var A=document.createElementNS(d.globals.SVGNS,"title");A.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,k.node.appendChild(A),""!==y.text&&(h.push(y.text),c.push(y))}}sa.globals.gridWidth)){var r=this.offY+a.config.xaxis.axisTicks.offsetY;if(e=e+r+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(e=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new Mi(this.ctx).drawLine(t+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,s+a.config.xaxis.axisTicks.offsetX,e+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var s=0;s0){var h=s[s.length-1].getBBox(),c=s[0].getBBox();h.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),c.x+c.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var d=0;d0&&(this.xaxisLabels=a.globals.timescaleLabels.slice())}return s(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new Mi(this.ctx);t||(t=i.group({class:"apexcharts-grid"}));var a=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),s=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(s),t.add(a),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new Mi(this.ctx),a=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,f(t.config.stroke.width)):t.config.stroke.width,s=function(t){var i=document.createElementNS(e.SVGNS,"clipPath");return i.setAttribute("id",t),i};e.dom.elGridRectMask=s("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=s("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=s("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=s("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=s("nonForecastMask".concat(e.cuid));var r=0,n=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),n=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=i.drawRect(-a/2-r-2,-a/2-2,e.gridWidth+a+n+r+4,e.gridHeight+a+4,0,"#fff");var o=t.globals.markers.largestSize;e.dom.elGridRectMarker=i.drawRect(-o,-o,e.gridWidth+2*o,e.gridHeight+2*o,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,a=t.y1,s=t.x2,r=t.y2,n=t.xCount,o=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===n-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:i,y1:a,x2:s,y2:r,xCount:n,parent:o});var h=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var c=l.globals.groups;if(c){for(var d=0,u=0;d0&&"datetime"!==t.config.xaxis.type&&(s=e.yAxisScale[a].result.length-1);this._drawXYLines({xCount:s,tickAmount:r})}else s=r,r=e.xTickAmount,this._drawInvertedXYLines({xCount:s,tickAmount:r});return this.drawGridBands(s,r),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/s}}},{key:"drawGridBands",value:function(t,e){var i,a,s=this,r=this.w;if((null===(i=r.config.grid.row.colors)||void 0===i?void 0:i.length)>0&&function(t,i,a,n,o,l){for(var h=0,c=0;h=r.config.grid[t].colors.length&&(c=0),s._drawGridBandRect({c:c,x1:a,y1:n,x2:o,y2:l,type:t}),n+=r.globals.gridHeight/e}("row",e,0,0,r.globals.gridWidth,r.globals.gridHeight/e),(null===(a=r.config.grid.column.colors)||void 0===a?void 0:a.length)>0){var n=r.globals.isBarHorizontal||"on"!==r.config.xaxis.tickPlacement||"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric?t:t-1;r.globals.isXNumeric&&(n=r.globals.xAxisScale.result.length-1);for(var o=r.globals.padHorizontal,l=r.globals.padHorizontal+r.globals.gridWidth/n,h=r.globals.gridHeight,c=0,d=0;c=r.config.grid.column.colors.length&&(d=0),"datetime"===r.config.xaxis.type)o=this.xaxisLabels[c].position,l=((null===(u=this.xaxisLabels[c+1])||void 0===u?void 0:u.position)||r.globals.gridWidth)-this.xaxisLabels[c].position;this._drawGridBandRect({c:d,x1:o,y1:0,x2:l,y2:h,type:"column"}),o+=r.globals.gridWidth/n}}}}]),t}(),ta=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"niceScale",value:function(t,e){var i,a,s,r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=1e-11,l=this.w,h=l.globals;h.isBarHorizontal?(i=l.config.xaxis,a=Math.max((h.svgWidth-100)/25,2)):(i=l.config.yaxis[n],a=Math.max((h.svgHeight-100)/15,2)),v.isNumber(a)||(a=10),s=void 0!==i.min&&null!==i.min,r=void 0!==i.max&&null!==i.min;var c=void 0!==i.stepSize&&null!==i.stepSize,d=void 0!==i.tickAmount&&null!==i.tickAmount,u=d?i.tickAmount:h.niceScaleDefaultTicks[Math.min(Math.round(a/2),h.niceScaleDefaultTicks.length-1)];if(h.isMultipleYAxis&&!d&&h.multiAxisTickAmount>0&&(u=h.multiAxisTickAmount,d=!0),u="dataPoints"===u?h.dataPoints-1:Math.abs(Math.round(u)),(t===Number.MIN_VALUE&&0===e||!v.isNumber(t)&&!v.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=v.isNumber(i.min)?i.min:0,e=v.isNumber(i.max)?i.max:t+u,h.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var g=e;e=t,t=g}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var p=[];u<1&&(u=1);var f=u,x=Math.abs(e-t);!s&&t>0&&t/x<.15&&(t=0,s=!0),!r&&e<0&&-e/x<.15&&(e=0,r=!0);var b=(x=Math.abs(e-t))/f,m=b,y=Math.floor(Math.log10(m)),w=Math.pow(10,y),k=Math.ceil(m/w);if(b=m=(k=h.niceScaleAllowedMagMsd[0===h.yValueDecimal?0:1][k])*w,h.isBarHorizontal&&i.stepSize&&"datetime"!==i.type?(b=i.stepSize,c=!0):c&&(b=i.stepSize),c&&i.forceNiceScale){var A=Math.floor(Math.log10(b));b*=Math.pow(10,y-A)}if(s&&r){var C=x/f;if(d)if(c)if(0!=v.mod(x,b)){var S=v.getGCD(b,C);b=C/S<10?S:C}else 0==v.mod(b,C)?b=C:(C=b,d=!1);else b=C;else if(c)0==v.mod(x,b)?C=b:b=C;else if(0==v.mod(x,b))C=b;else{C=x/(f=Math.ceil(x/b));var L=v.getGCD(x,b);x/La&&(t=e-b*u,t+=b*Math.floor((M-t)/b))}else if(s)if(d)e=t+b*f;else{var P=e;e=b*Math.ceil(e/b),Math.abs(e-t)/v.getGCD(x,b)>a&&(e=t+b*u,e+=b*Math.ceil((P-e)/b))}}else if(h.isMultipleYAxis&&d){var I=b*Math.floor(t/b),T=I+b*f;T0&&t16&&v.getPrimeFactors(f).length<2&&f++,!d&&i.forceNiceScale&&0===h.yValueDecimal&&f>x&&(f=x,b=Math.round(x/f)),f>a&&(!d&&!c||i.forceNiceScale)){var z=v.getPrimeFactors(f),X=z.length-1,R=f;t:for(var Y=0;YN);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,r=Math.abs(e-t),n=[];if(t===e)return{result:n=[t],niceMin:n[0],niceMax:n[n.length-1]};"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,r))&&(i=this.w.globals.dataPoints-1),s||(s=r/i),s=Math.round(10*(s+Number.EPSILON))/10,i===Number.MAX_VALUE&&(i=5,s=1);for(var o=t;i>=0;)n.push(o),o=v.preciseAddition(o,s),i-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,i){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));for(var a=[],s=Math.ceil(Math.log(e)/Math.log(i)+1),r=Math.floor(Math.log(t)/Math.log(i));r5?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase):this.logarithmicScale(e,i,r.logBase)):i!==-Number.MAX_VALUE&&v.isNumber(i)&&e!==Number.MAX_VALUE&&v.isNumber(e)?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.niceScale(e,i,t)):a.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var i=this.w,a=i.globals,s=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&v.isNumber(e)){var r=a.xTickAmount+1;s<10&&s>1&&(r=s),a.xAxisScale=this.linearScale(t,e,r,0,i.config.xaxis.stepSize)}else a.xAxisScale=this.linearScale(0,10,10);return a.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,i=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var a=i.seriesYAxisMap,s=i.minYArr,r=i.maxYArr;i.allSeriesCollapsed=!0,i.barGroups=[],a.forEach((function(a,n){var o=[];a.forEach((function(t){var i=e.series[t].group;o.indexOf(i)<0&&o.push(i)})),a.length>0?function(){var l,h,c=Number.MAX_VALUE,d=-Number.MAX_VALUE,u=c,g=d;if(e.chart.stacked)!function(){var t=new Array(i.dataPoints).fill(0),s=[],r=[],p=[];o.forEach((function(){s.push(t.map((function(){return Number.MIN_VALUE}))),r.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var f=function(t){!l&&e.series[a[t]].type&&(l=e.series[a[t]].type);var c=a[t];h=e.series[c].group?e.series[c].group:"axis-".concat(n),!(i.collapsedSeriesIndices.indexOf(c)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(c)<0)||(i.allSeriesCollapsed=!1,o.forEach((function(t,a){if(e.series[c].group===t)for(var n=0;n=0?r[a][n]+=o:p[a][n]+=o,s[a][n]+=o,u=Math.min(u,o),g=Math.max(g,o)}}))),"bar"!==l&&"column"!==l||i.barGroups.push(h)},x=0;x1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w.config,r=this.w.globals,n=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=t+1);var l=r.series,h=l,c=l;"candlestick"===s.chart.type?(h=r.seriesCandleL,c=r.seriesCandleH):"boxPlot"===s.chart.type?(h=r.seriesCandleO,c=r.seriesCandleC):r.isRangeData&&(h=r.seriesRangeStart,c=r.seriesRangeEnd);var d=!1;if(r.seriesX.length>=a){var u,g=null===(u=r.brushSource)||void 0===u?void 0:u.w.config.chart.brush;(s.chart.zoom.enabled&&s.chart.zoom.autoScaleYaxis||null!=g&&g.enabled&&null!=g&&g.autoScaleYaxis)&&(d=!0)}for(var p=t;px&&r.seriesX[p][b]>s.xaxis.max;b--);}for(var m=x;m<=b&&mh[p][m]&&h[p][m]<0&&(o=h[p][m])}else r.hasNullValues=!0}"bar"!==f&&"column"!==f||(o<0&&n<0&&(n=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,e=Math.min(e,0)))}return"rangeBar"===s.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&(o=e),"bar"===s.chart.type&&(o<0&&n<0&&(n=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:n,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i,a=Number.MAX_VALUE;if(t.isMultipleYAxis){a=Number.MAX_VALUE;for(var s=0;st.dataPoints&&0!==t.dataPoints&&(a=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(a=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var s=t.maxX-t.minX;s<30&&(a=s-1)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var r=[],n=t.minX-1;n0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,a-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var s=e-a[i-1];s>0&&(t.minXDiff=Math.min(s,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var i=e.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map((function(t){return t}))]);var a={},s={};i.forEach((function(i){a[i]=[],s[i]=[],t.w.config.series.map((function(t,a){return i.indexOf(e.seriesNames[a])>-1?a:null})).filter((function(t){return null!==t})).forEach((function(r){for(var n=0;n0?a[i][n]+=parseFloat(e.series[r][n])+1e-4:s[i][n]+=parseFloat(e.series[r][n]))}}))})),Object.entries(a).forEach((function(t){var i=p(t,1)[0];a[i].forEach((function(t,r){e.maxY=Math.max(e.maxY,a[i][r]),e.minY=Math.min(e.minY,s[i][r])}))}))}}}]),t}(),ia=function(){function t(e,a){i(this,t),this.ctx=e,this.elgrid=a,this.w=e.w;var s=this.w;this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.axisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xAxisoffX="bottom"===s.config.xaxis.position?s.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Ri(e)}return s(t,[{key:"drawYaxis",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.yaxis[t].labels.style,s=a.fontSize,r=a.fontFamily,n=a.fontWeight,o=i.group({class:"apexcharts-yaxis",rel:t,transform:"translate(".concat(e.globals.translateYAxisX[t],", 0)")});if(this.axesUtils.isYAxisHidden(t))return o;var l=i.group({class:"apexcharts-yaxis-texts-g"});o.add(l);var h=e.globals.yAxisScale[t].result.length-1,c=e.globals.gridHeight/h,d=e.globals.yLabelFormatters[t],u=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){var g=e.globals.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?g=0:"heatmap"===e.config.chart.type&&(g-=c/2),g+=parseInt(s,10)/3;for(var p=h;p>=0;p--){var f=d(u[p],p,e),x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(x*=-1);var b=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(a.colors,t),y=Array.isArray(m)?m[p]:m,w=v.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),k=i.drawText({x:x,y:g,text:w.includes(f)&&!e.config.yaxis[t].labels.showDuplicates?"":f,textAnchor:b,fontSize:s,fontFamily:r,fontWeight:n,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(a.cssClass)});l.add(k),this.addTooltip(k,f),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(i,k,firstLabel,e.config.yaxis[t].labels.rotate),g+=c}}return this.addYAxisTitle(i,o,t),this.addAxisBorder(i,o,t,h,c),o}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var i=document.createElementNS(this.w.globals.SVGNS,"title");i.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(i)}},{key:"rotateLabel",value:function(t,e,i,a){var s=t.rotateAroundCenter(i.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(a," ").concat(s.x," ").concat(r.y,")"))}},{key:"addYAxisTitle",value:function(t,e,i){var a=this.w;if(void 0!==a.config.yaxis[i].title.text){var s=t.group({class:"apexcharts-yaxis-title"}),r=a.config.yaxis[i].opposite?a.globals.translateYAxisX[i]:0,n=t.drawText({x:r,y:a.globals.gridHeight/2+a.globals.translateY+a.config.yaxis[i].title.offsetY,text:a.config.yaxis[i].title.text,textAnchor:"end",foreColor:a.config.yaxis[i].title.style.color,fontSize:a.config.yaxis[i].title.style.fontSize,fontWeight:a.config.yaxis[i].title.style.fontWeight,fontFamily:a.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(a.config.yaxis[i].title.style.cssClass)});s.add(n),e.add(s)}}},{key:"addAxisBorder",value:function(t,e,i,a,s){var r=this.w,n=r.config.yaxis[i].axisBorder,o=31+n.offsetX;if(r.config.yaxis[i].opposite&&(o=-31-n.offsetX),n.show){var l=t.drawLine(o,r.globals.translateY+n.offsetY-2,o,r.globals.gridHeight+r.globals.translateY+n.offsetY+2,n.color,0,n.width);e.add(l)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,a,n,r.config.yaxis[i].axisTicks,i,s,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});a.add(s);var r=e.globals.yAxisScale[t].result.length-1,n=e.globals.gridWidth/r+.1,o=n+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,h=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),c=e.globals.timescaleLabels;if(c.length>0&&(this.xaxisLabels=c.slice(),r=(h=c.slice()).length),e.config.xaxis.labels.show)for(var d=c.length?0:r;c.length?d=0;c.length?d++:d--){var u=l(h[d],d,e),g=e.globals.gridWidth+e.globals.padHorizontal-(o-n+e.config.xaxis.labels.offsetX);if(c.length){var p=this.axesUtils.getLabel(h,c,g,d,this.drawnLabels,this.xaxisFontSize);g=p.x,u=p.text,this.drawnLabels.push(p.text),0===d&&e.globals.skipFirstTimelinelabel&&(u=""),d===h.length-1&&e.globals.skipLastTimelinelabel&&(u="")}var f=i.drawText({x:g,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:u,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});s.add(f),f.tspan(u),this.addTooltip(f,u),o+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.xaxis.axisBorder;if(a.show){var s=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(s-=15);var r=i.drawLine(e.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new Mi(this.ctx);if(void 0!==e.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});a.add(s),t.add(a)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),r=s?s.getBoundingClientRect():{width:0,height:0},n=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),o=n?n.getBoundingClientRect():{width:0,height:0};if(n){var l=this.xPaddingForYAxisTitle(t,r,o,e);n.setAttribute("x",l.xPos-(e?10:0));var h=a.rotateAroundCenter(n);n.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(h.x," ").concat(h.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var s=this.w,r=0,n=10;return void 0===s.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(a?r=e.width+s.config.yaxis[t].title.offsetX+i.width/2+n/2:(r=-1*e.width+s.config.yaxis[t].title.offsetX+n/2+i.width/2,s.globals.isBarHorizontal&&(n=25,r=-1*e.width-s.config.yaxis[t].title.offsetX-n)),{xPos:r,padd:n})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,a=0,s=0,r=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach((function(o,l){var h=i.globals.ignoreYAxisIndexes.includes(l)||!o.show||o.floating||0===t[l].width,c=t[l].width+e[l].width;o.opposite?i.globals.isBarHorizontal?(s=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=s-o.labels.offsetX):(s=i.globals.gridWidth+i.globals.translateX+n,h||(n+=c+20),i.globals.translateYAxisX[l]=s-o.labels.offsetX+20):(a=i.globals.translateX-r,h||(r+=c+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;v.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,i){var a=t.config.yaxis[i];if(a&&!a.floating&&void 0!==a.labels.align){var s=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=v.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"))),n=s.getBoundingClientRect();r.forEach((function(t){t.setAttribute("text-anchor",a.labels.align)})),"left"!==a.labels.align||a.opposite?"center"===a.labels.align?s.setAttribute("transform","translate(".concat(n.width/2*(a.opposite?1:-1),", 0)")):"right"===a.labels.align&&a.opposite&&s.setAttribute("transform","translate(".concat(n.width,", 0)")):s.setAttribute("transform","translate(-".concat(n.width,", 0)"))}}))}}]),t}(),aa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.documentEvent=v.bind(this.documentEvent,this)}return s(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var a=i.globals.events[t].indexOf(e);-1!==a&&i.globals.events[t].splice(a,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var a=i.globals.events[t],s=a.length,r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=v.extend(Hi,i);this.w.globals.locale=a.options}}]),t}(),ra=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawAxis",value:function(t,e){var i,a,s=this,r=this.w.globals,n=this.w.config,o=new Qi(this.ctx,e),l=new ia(this.ctx,e);r.axisCharts&&"radar"!==t&&(r.isBarHorizontal?(a=l.drawYaxisInversed(0),i=o.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(a)):(i=o.drawXaxis(),r.dom.elGraphical.add(i),n.yaxis.map((function(t,e){if(-1===r.ignoreYAxisIndexes.indexOf(e)&&(a=l.drawYaxis(e),r.dom.Paper.add(a),"back"===s.w.config.grid.position)){var i=r.dom.Paper.children()[1];i.remove(),r.dom.Paper.add(i)}}))))}}]),t}(),na=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Li(this.ctx),a=t.config.xaxis.crosshairs.fill.gradient,s=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,n=a.colorFrom,o=a.colorTo,l=a.opacityFrom,h=a.opacityTo,c=a.stops,d=s.enabled,u=s.left,g=s.top,p=s.blur,f=s.color,x=s.opacity,b=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(b=e.drawGradient("vertical",n,o,l,h,null,c,null));var m=e.drawRect();1===t.config.xaxis.crosshairs.width&&(m=e.drawLine());var y=t.globals.gridHeight;(!v.isNumber(y)||y<0)&&(y=0);var w=t.config.xaxis.crosshairs.width;(!v.isNumber(w)||w<0)&&(w=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:w,height:y,fill:b,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),d&&(m=i.dropShadow(m,{left:u,top:g,blur:p,color:f,opacity:x})),t.globals.dom.elGraphical.add(m)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var s=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(s)}var r=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(r)}}]),t}(),oa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,a=i.config;if(0!==a.responsive.length){var s=a.responsive.slice();s.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var r=new Wi({}),n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=s[0].breakpoint,n=window.innerWidth>0?window.innerWidth:screen.width;if(n>a){var o=v.clone(i.globals.initialConfig);o.series=v.clone(i.config.series);var l=Pi.extendArrayProps(r,o,i);t=v.extend(l,t),t=v.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var h=0;h0&&"function"==typeof t[0]?(this.isColorFn=!0,i.config.series.map((function(a,s){var r=t[s]||t[0];return"function"==typeof r?r({value:i.globals.axisCharts?i.globals.series[s][0]||0:i.globals.series[s],seriesIndex:s,dataPointIndex:s,w:e.w}):r}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,i){t&&(e[i]=t)}))}},{key:"getMonochromeColors",value:function(t,e,i){var a=t.color,s=t.shadeIntensity,r=t.shadeTo,n=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,o=1/(n/s),l=0;return Array.from({length:n},(function(){var t="dark"===r?i.shadeColor(-1*l,a):i.shadeColor(l,a);return l+=o,t}))}},{key:"applyColorTypes",value:function(t,e){var i=this,a=this.w;t.forEach((function(t){a.globals[t].colors=void 0===a.config[t].colors?i.isColorFn?a.config.colors:e:a.config[t].colors.slice(),i.pushExtraColors(a.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=e||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),t.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,i=[];e.config.series.forEach((function(s,r){s.data.forEach((function(s,n){var o;o=e.globals.series[r][n],a=e.config.dataLabels.formatter(o,{ctx:t.dCtx.ctx,seriesIndex:r,dataPointIndex:n,w:e}),i.push(a)}))}));var a=v.getLargestStringFromArr(i),s=new Mi(this.dCtx.ctx),r=e.config.dataLabels.style,n=s.getTextRects(a,parseInt(r.fontSize),r.fontFamily);return{width:1.05*n.width,height:n.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var a=e.map((function(t,e){return Array.isArray(t)?t.length:1})),s=Math.max.apply(Math,f(a));i=e[a.indexOf(s)]}return i}}]),t}(),da=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();t={width:a.width,height:a.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var s=e.globals.xLabelFormatter,r=v.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);e.globals.isBarHorizontal&&(n=r=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var o=new Xi(this.dCtx.ctx),l=r;r=o.xLabelFormat(s,r,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),n=o.xLabelFormat(s,n,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(n=r="1");var h=new Mi(this.dCtx.ctx),c=h.getTextRects(r,e.config.xaxis.labels.style.fontSize),d=c;if(r!==n&&(d=h.getTextRects(n,e.config.xaxis.labels.style.fontSize)),(t={width:c.width>=d.width?c.width:d.width,height:c.height>=d.height?c.height:d.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return h.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};c=u(r),r!==n&&(d=u(n)),t.height=(c.height>d.height?c.height:d.height)/1.5,t.width=c.width>d.width?c.width:d.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var i,a=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,s=e.globals.groups.map((function(t){return t.title})),r=v.getLargestStringFromArr(s),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),o=new Mi(this.dCtx.ctx),l=o.getTextRects(r,a),h=l;return r!==n&&(h=o.getTextRects(n,a)),i={width:l.width>=h.width?l.width:h.width,height:l.height>=h.height?l.height:h.height},e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new Mi(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,i=a.height}return{width:e,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(t){return t.value})),a=i.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Mi(this.dCtx.ctx).getTextRects(a,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,a=i.globals,s=i.config,r=s.xaxis.type,n=t.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,o){s.yaxis.length>1&&function(t){return-1!==a.collapsedSeriesIndices.indexOf(t)}(o)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var o=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+n/1.75-e.dCtx.yAxisWidthRight,h=o.position-n/1.75+e.dCtx.yAxisWidthLeft,c="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>a.svgWidth-a.translateX-c&&(a.skipLastTimelinelabel=!0),h<-(t.show&&!t.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===r?e.dCtx.gridPad.right(null===(a=String(c(e,o)))||void 0===a?void 0:a.length)?t:e}),d),g=u=c(u,o);if(void 0!==u&&0!==u.length||(u=l.niceMax),e.globals.isBarHorizontal){a=0;var p=e.globals.labels.slice();u=v.getLargestStringFromArr(p),u=c(u,{seriesIndex:n,dataPointIndex:-1,w:e}),g=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,p)}var f=new Mi(t.dCtx.ctx),x="rotate(".concat(r.labels.rotate," 0 0)"),b=f.getTextRects(u,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1),m=b;u!==g&&(m=f.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1)),i.push({width:(h>m.width||h>b.width?h:m.width>b.width?m.width:b.width)+a,height:m.height>b.height?m.height:b.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,a){if(e.show&&void 0!==e.title.text){var s=new Mi(t.dCtx.ctx),r="rotate(".concat(e.title.rotate," 0 0)"),n=s.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);i.push({width:n.width,height:n.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,a=0,s=t.globals.yAxisScale.length>1?10:0,r=new Ri(this.dCtx.ctx),n=function(n,o){var l=t.config.yaxis[o].floating,h=0;n.width>0&&!l?(h=n.width+s,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(o)&&(h=h-n.width-s)):h=l||r.isYAxisHidden(o)?0:5,t.config.yaxis[o].opposite?a+=h:i+=h,e+=h};return t.globals.yLabelsCoords.map((function(t,e){n(t,e)})),t.globals.yTitleCoords.map((function(t,e){n(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,e}}]),t}(),ga=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w,i=e.config,a=e.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.series.length)return 0;var s=function(t){return["bar","rangeBar","candlestick","boxPlot"].includes(t)},r=i.chart.type,n=0,o=s(r)?i.series.length:1;a.comboBarCount>0&&(o=a.comboBarCount),a.collapsedSeries.forEach((function(t){s(t.type)&&(o-=1)})),i.chart.stacked&&(o=1);var l=s(r)||a.comboBarCount>0,h=Math.abs(a.initialMaxX-a.initialMinX);if(l&&a.isXNumeric&&!a.isBarHorizontal&&o>0&&0!==h){h<=3&&(h=a.dataPoints);var c=h/t,d=a.minXDiff&&a.minXDiff/c>0?a.minXDiff/c:0;d>t/2&&(d/=2),(n=d*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),a.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,a=this.dCtx.isSparkline||!i.axisCharts?0:10;["title","subtitle"].forEach((function(s){void 0!==e.config[s].text?a+=e.config[s].margin:a+=t.dCtx.isSparkline||!i.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||i.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight-=s.height+r.height+a,i.translateY+=s.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,a=new Ri(this.dCtx.ctx);i.config.yaxis.forEach((function(s,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||s.floating||a.isYAxisHidden(r)||(s.opposite&&(i.globals.translateX-=e[r].width+t[r].width+parseInt(s.labels.style.fontSize,10)/1.2+12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),pa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new ca(this),this.dimYAxis=new ua(this),this.dimXAxis=new da(this),this.dimGrid=new ga(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return s(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,i=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var a=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,f(e.config.stroke.width)):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var i=p(e,2),a=i[0],s=i[1];t.gridPad[a]=Math.max(s,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(a/2,this.gridPad.top),this.gridPad.bottom=Math.max(a/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var s=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*s,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:a[i].width,index:i}),e.globals.yTitleCoords.push({width:s[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o,n),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,h=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var c=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,h=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,h=0,c=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(r);var d=function(){i.translateX=l+t.datalabelsCoords.width,i.gridHeight=i.svgHeight-t.lgRect.height-h-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(c=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=c,d();break;case"top":i.translateY=this.lgRect.height+c,d();break;case"left":i.translateY=c,i.translateX=this.lgRect.width+l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":i.translateY=c,i.translateX=l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new ia(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,a=0;t.config.legend.show&&!t.config.legend.floating&&(a=20);var s="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[s].offsetY,n=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating){e.gridHeight=e.svgHeight;var o=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(o,e.gridHeight),e.translateY=r,void(e.translateX=n+(e.svgWidth-e.gridWidth)/2)}switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=r-10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+r+10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-a,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+this.lgRect.width+a;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-a-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,i){var a=this.w,s=a.globals.hasXaxisGroups?2:1,r=i.height+t.height+e.height,n=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,o=a.globals.rotateXLabels?22:10,l=a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0;this.xAxisHeight=r*n+s*o+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeightc&&(this.yAxisWidth=c)}}]),t}(),fa=function(){function t(e){i(this,t),this.w=e.w,this.lgCtx=e}return s(t,[{key:"getLegendStyles",value:function(){var t,e,i,a=document.createElement("style");a.setAttribute("type","text/css");var s=(null===(t=this.lgCtx.ctx)||void 0===t||null===(e=t.opts)||void 0===e||null===(i=e.chart)||void 0===i?void 0:i.nonce)||this.w.config.chart.nonce;s&&a.setAttribute("nonce",s);var r=document.createTextNode("\n .apexcharts-flip-y {\n transform: scaleY(-1) translateY(-100%);\n transform-origin: top;\n transform-box: fill-box;\n }\n .apexcharts-flip-x {\n transform: scaleX(-1);\n transform-origin: center;\n transform-box: fill-box;\n }\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-right: 1px;\n }\n\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }\n\n ");return a.appendChild(r),a}},{key:"getLegendDimensions",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(t,e){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var s=null,r=null;if(a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),r=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),r=parseInt(s.getAttribute("rel"),10)-1),e)[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,r)}));else this.hideSeries({seriesEl:s,realIndex:r})}else{var n=a.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(t+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=a.config.plotOptions.pie.donut.labels;new Mi(this.lgCtx.ctx).pathMouseDown(n,null),this.lgCtx.ctx.pie.printDataLabelsInner(n.node,l)}n.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(t){var e=t.realIndex,i=this.w,a=i.globals,s=v.clone(i.config.series);if(a.axisCharts){var r=i.config.yaxis[a.seriesYAxisReverseMap[e]],n={index:e,data:s[e].data.slice(),type:s[e].type||i.config.chart.type};if(r&&r.show&&r.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(e)<0&&(a.ancillaryCollapsedSeries.push(n),a.ancillaryCollapsedSeriesIndices.push(e));else if(a.collapsedSeriesIndices.indexOf(e)<0){a.collapsedSeries.push(n),a.collapsedSeriesIndices.push(e);var o=a.risingSeries.indexOf(e);a.risingSeries.splice(o,1)}}else a.collapsedSeries.push({index:e,data:s[e]}),a.collapsedSeriesIndices.push(e);return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.config.series.length,this._getSeriesBasedOnCollapsedState(s)}},{key:"hideSeries",value:function(t){for(var e=t.seriesEl,i=t.realIndex,a=this.w,s=this.getSeriesAfterCollapsing({realIndex:i}),r=e.childNodes,n=0;n0){for(var r=0;r1;if(this.legendHelpers.appendToForeignObject(),(a||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,i=t.fillcolor,a=this.w,s=document.createElement("span");s.classList.add("apexcharts-legend-marker");var r=a.config.legend.markers.shape||a.config.markers.shape,n=r;Array.isArray(r)&&(n=r[e]);var o=Array.isArray(a.config.legend.markers.size)?parseFloat(a.config.legend.markers.size[e]):parseFloat(a.config.legend.markers.size),l=Array.isArray(a.config.legend.markers.offsetX)?parseFloat(a.config.legend.markers.offsetX[e]):parseFloat(a.config.legend.markers.offsetX),h=Array.isArray(a.config.legend.markers.offsetY)?parseFloat(a.config.legend.markers.offsetY[e]):parseFloat(a.config.legend.markers.offsetY),c=Array.isArray(a.config.legend.markers.strokeWidth)?parseFloat(a.config.legend.markers.strokeWidth[e]):parseFloat(a.config.legend.markers.strokeWidth),d=s.style;if(d.height=2*(o+c)+"px",d.width=2*(o+c)+"px",d.left=l+"px",d.top=h+"px",a.config.legend.markers.customHTML)d.background="transparent",d.color=i[e],Array.isArray(a.config.legend.markers.customHTML)?a.config.legend.markers.customHTML[e]&&(s.innerHTML=a.config.legend.markers.customHTML[e]()):s.innerHTML=a.config.legend.markers.customHTML();else{var g=new Vi(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(n),seriesIndex:e,strokeWidth:c,size:o}),p=window.SVG().addTo(s).size("100%","100%"),f=new Mi(this.ctx).drawMarker(0,0,u(u({},g),{},{pointFillColor:Array.isArray(i)?i[e]:g.pointFillColor,shape:n}));a.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),p.add(f)}return s}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,a=e.globals.seriesNames,s=e.config.legend.markers.fillColors?e.config.legend.markers.fillColors.slice():e.globals.colors.slice();if("heatmap"===e.config.chart.type){var r=e.config.plotOptions.heatmap.colorScale.ranges;a=r.map((function(t){return t.name?t.name:t.from+" - "+t.to})),s=r.map((function(t){return t.color}))}else this.isBarsDistributed&&(a=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(a=e.config.legend.customLegendItems);for(var n=e.globals.legendFormatter,o=e.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var h,c=n(a[l],{seriesIndex:l,w:e}),d=!1,u=!1;if(e.globals.collapsedSeries.length>0)for(var g=0;g0)for(var p=0;p0?l-10:0)+(h>0?h-10:0)}a.style.position="absolute",r=r+t+i.config.legend.offsetX,n=n+e+i.config.legend.offsetY,a.style.left=r+"px",a.style.top=n+"px","right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px");["width","height"].forEach((function(t){a.style[t]&&(a.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new pa(this.ctx),i=e.dimHelpers.getTitleSubtitleCoords("title"),a=e.dimHelpers.getTitleSubtitleCoords("subtitle"),s=0;"top"===t.config.legend.position&&(s=i.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,s)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new Zi(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new Zi(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,a="true"===t.target.getAttribute("data:collapsed"),s=this.w.config.chart.events.legendClick;"function"==typeof s&&s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;"function"==typeof r&&t.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),t}(),ba=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=a.globals.minX,this.maxX=a.globals.maxX}return s(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=e.config.chart.toolbar.offsetY+"px",a.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s\n \n \n\n'),n("zoomOut",this.elZoomOut,'\n \n \n\n');var o=function(i){t.t[i]&&e.config.chart[i].enabled&&r.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'\n \n \n \n':'\n \n \n',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&e.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,'\n \n \n'),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;lthis.wheelDelay&&(this.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){a-i.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,i=this.w;this.minX=i.globals.isRangeBar?i.globals.minY:i.globals.minX,this.maxX=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;var a=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(a){var s,r,n,o=(t.clientX-a.left)/a.width,l=this.minX,h=this.maxX,c=h-l;if(t.deltaY<0){var d=l+o*c;r=d-(s=.5*c)/2,n=d+s/2}else r=l-(s=1.5*c)/2,n=h+s/2;if(!i.globals.isRangeBar){r=Math.max(r,i.globals.initialMinX),n=Math.min(n,i.globals.initialMaxX);var u=.01*(i.globals.initialMaxX-i.globals.initialMinX);if(n-r0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,i,a,s){return"l"===s||"r"===s?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resizing",this.selectionDragging.bind(this,"resizing")))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(u(u({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,a=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i;t.globals.isRangeBar&&(i=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,a=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var s={x:i,y:0,width:a,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(s),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,a=t.width,s=t.height,r=t.translateX,n=void 0===r?0:r,o=t.translateY,l=void 0===o?0:o,h=this.w,c=this.zoomRect,d=this.selectionRect;if(this.dragged||null!==h.globals.selection){var u={transform:"translate("+n+", "+l+")"};h.globals.zoomEnabled&&this.dragged&&(a<0&&(a=1),c.attr({x:e,y:i,width:a,height:s,fill:h.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":h.config.chart.zoom.zoomedArea.fill.opacity,stroke:h.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":h.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":h.config.chart.zoom.zoomedArea.stroke.opacity}),Mi.setAttrs(c.node,u)),h.globals.selectionEnabled&&(d.attr({x:e,y:i,width:a>0?a:0,height:s>0?s:0,fill:h.config.chart.selection.fill.color,"fill-opacity":h.config.chart.selection.fill.opacity,stroke:h.config.chart.selection.stroke.color,"stroke-width":h.config.chart.selection.stroke.width,"stroke-dasharray":h.config.chart.selection.stroke.dashArray,"stroke-opacity":h.config.chart.selection.stroke.opacity}),Mi.setAttrs(d.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.gridRect.getBoundingClientRect(),n=s.startX-1,o=s.startY,l=!1,h=!1,c=s.clientX-r.left-n,d=s.clientY-r.top-o,g={translateX:a.globals.translateX,translateY:a.globals.translateY};return Math.abs(c+n)>a.globals.gridWidth?c=a.globals.gridWidth-n:s.clientX-r.left<0&&(c=n),n>s.clientX-r.left&&(l=!0,c=Math.abs(c)),o>s.clientY-r.top&&(h=!0,d=Math.abs(d)),g=u(u({},g="x"===i?{x:l?n-c:n,y:0,width:c,height:a.globals.gridHeight}:"y"===i?{x:0,y:h?o-d:o,width:a.globals.gridWidth,height:d}:{x:l?n-c:n,y:h?o-d:o,width:c,height:d}),{},{translateX:a.globals.translateX,translateY:a.globals.translateY}),s.drawSelectionRect(g),s.selectionDragging("resizing"),g}},{key:"selectionDragging",value:function(t,e){var i=this,a=this.w;if(e){e.preventDefault();var s=e.detail,r=s.handler,n=s.box,o=n.x,l=n.y;othis.constraints.x2&&(o=this.constraints.x2-n.w),n.y2>this.constraints.y2&&(l=this.constraints.y2-n.h),r.move(o,l);var h=this.xyRatios,c=this.selectionRect,d=0;"resizing"===t&&(d=30);var u=function(t){return parseFloat(c.node.getAttribute(t))},g={x:u("x"),y:u("y"),width:u("width"),height:u("height")};a.globals.selection=g,"function"==typeof a.config.chart.events.selection&&a.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,s,r,n=i.gridRect.getBoundingClientRect(),o=c.node.getBoundingClientRect();a.globals.isRangeBar?(t=a.globals.yAxisScale[0].niceMin+(o.left-n.left)*h.invertedYRatio,e=a.globals.yAxisScale[0].niceMin+(o.right-n.left)*h.invertedYRatio,s=0,r=1):(t=a.globals.xAxisScale.niceMin+(o.left-n.left)*h.xRatio,e=a.globals.xAxisScale.niceMin+(o.right-n.left)*h.xRatio,s=a.globals.yAxisScale[0].niceMin+(n.bottom-o.bottom)*h.yRatio[0],r=a.globals.yAxisScale[0].niceMax-(o.top-n.top)*h.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:s,max:r}};a.config.chart.events.selection(i.ctx,l),a.config.chart.brush.enabled&&void 0!==a.config.chart.events.brushScrolled&&a.config.chart.events.brushScrolled(i.ctx,l)}),d))}}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.xyRatios,n=this.ctx.toolbar;if(s.startX>s.endX){var o=s.startX;s.startX=s.endX,s.endX=o}if(s.startY>s.endY){var l=s.startY;s.startY=s.endY,s.endY=l}var h=void 0,c=void 0;a.globals.isRangeBar?(h=a.globals.yAxisScale[0].niceMin+s.startX*r.invertedYRatio,c=a.globals.yAxisScale[0].niceMin+s.endX*r.invertedYRatio):(h=a.globals.xAxisScale.niceMin+s.startX*r.xRatio,c=a.globals.xAxisScale.niceMin+s.endX*r.xRatio);var d=[],u=[];if(a.config.yaxis.forEach((function(t,e){var i=a.globals.seriesYAxisMap[e][0];d.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.startY),u.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.endY)})),s.dragged&&(s.dragX>10||s.dragY>10)&&h!==c)if(a.globals.zoomEnabled){var g=v.clone(a.globals.initialConfig.yaxis),p=v.clone(a.globals.initialConfig.xaxis);if(a.globals.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),c=Math.floor(c),h<1&&(h=1,c=a.globals.dataPoints),c-h<2&&(c=h+1)),"xy"!==i&&"x"!==i||(p={min:h,max:c}),"xy"!==i&&"y"!==i||g.forEach((function(t,e){g[e].min=u[e],g[e].max=d[e]})),n){var f=n.getBeforeZoomRange(p,g);f&&(p=f.xaxis?f.xaxis:p,g=f.yaxis?f.yaxis:g)}var x={xaxis:p};a.config.chart.group||(x.yaxis=g),s.ctx.updateHelpers._updateOptions(x,!1,s.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&n.zoomCallback(p,g)}else if(a.globals.selectionEnabled){var b,m=null;b={min:h,max:c},"xy"!==i&&"y"!==i||(m=v.clone(a.config.yaxis)).forEach((function(t,e){m[e].min=u[e],m[e].max=d[e]})),a.globals.selection=s.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(s.ctx,{xaxis:b,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,a=e;if(void 0!==i.globals.lastClientPosition.x){var s=i.globals.lastClientPosition.x-a.clientX,r=i.globals.lastClientPosition.y-a.clientY;Math.abs(s)>Math.abs(r)&&s>0?this.moveDirection="left":Math.abs(s)>Math.abs(r)&&s<0?this.moveDirection="right":Math.abs(r)>Math.abs(s)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(s)&&r<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var n=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||a.panScrolled(n,o)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,a=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+a,i=t.globals.maxX+a):"right"===this.moveDirection&&(e=t.globals.minX-a,i=t.globals.maxX-a),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,a=this.xyRatios,s=v.clone(i.globals.initialConfig.yaxis),r=a.xRatio,n=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(r=a.invertedYRatio,n=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(t=n+i.globals.gridWidth/15*r,e=o+i.globals.gridWidth/15*r):"right"===this.moveDirection&&(t=n-i.globals.gridWidth/15*r,e=o-i.globals.gridWidth/15*r),i.globals.isRangeBar||(ti.globals.initialMaxX)&&(t=n,e=o);var l={xaxis:{min:t,max:e}};i.config.chart.group||(l.yaxis=s),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var a=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),a}(),va=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return s(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,a=t.clientX,s=t.clientY,r=this.w,n=i.getBoundingClientRect(),o=n.width,l=n.height,h=o/(r.globals.dataPoints-1),c=l/r.globals.dataPoints,d=this.hasBars();!r.globals.comboCharts&&!d||r.config.xaxis.convertedCatToNumeric||(h=o/r.globals.dataPoints);var u=a-n.left-r.globals.barPadForNumericAxis,g=s-n.top;u<0||g<0||u>o||g>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var p=Math.round(u/h),f=Math.floor(g/c);d&&!r.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(u/h),p-=1);var x=null,b=null,m=r.globals.seriesXvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))})),y=r.globals.seriesYvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))}));if(r.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),k=u*(w.width/o),A=g*(w.height/l);x=(b=this.closestInMultiArray(k,A,m,y)).index,p=b.j,null!==x&&(m=r.globals.seriesXvalues[x],p=(b=this.closestInArray(k,m)).index)}return r.globals.capturedSeriesIndex=null===x?-1:x,(!p||p<1)&&(p=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=f:r.globals.capturedDataPointIndex=p,{capturedSeries:x,j:r.globals.isBarHorizontal?f:p,hoverX:u,hoverY:g}}},{key:"closestInMultiArray",value:function(t,e,i,a){var s=this.w,r=0,n=null,o=-1;s.globals.series.length>1?r=this.getFirstActiveXArray(i):n=0;var l=i[r][0],h=Math.abs(t-l);if(i.forEach((function(e){e.forEach((function(e,i){var a=Math.abs(t-e);a<=h&&(h=a,o=i)}))})),-1!==o){var c=a[r][o],d=Math.abs(e-c);n=r,a.forEach((function(t,i){var a=Math.abs(e-t[o]);a<=d&&(d=a,n=i)}))}return{index:n,j:o}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,i=0,a=t.map((function(t,e){return t.length>0?e:-1})),s=0;s0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=f(t)).sort((function(t,e){var i=Number(t.getAttribute("data:realIndex")),a=Number(e.getAttribute("data:realIndex"));return ai?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var i=Number(t.getAttribute("cx")),a=Number(t.getAttribute("cy")),s=t.getAttribute("shape");return new Mi(this.ctx).getMarkerPath(i,a,s,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s ').concat(i.attrs.name,""),e+="
".concat(i.val,"
")})),m.innerHTML=t+"",v.innerHTML=e+""};n?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?y():(m.innerHTML="",v.innerHTML=""):y()}else m.innerHTML="",v.innerHTML="";null!==p&&(a[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:"");if(n&&f[0]){if(l.config.tooltip.hideEmptySeries){var w=a[e].querySelector(".apexcharts-tooltip-marker"),k=a[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(c)?(w.style.display="none",k.style.display="none"):(w.style.display="block",k.style.display="block")}null==c||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)?f[0].parentNode.style.display="none":f[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)&&(f[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var i=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));a&&(a.classList.add("apexcharts-active"),a.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",n="",o=null,l=null,h={series:a.globals.series,seriesIndex:e,dataPointIndex:i,w:a},c=a.globals.ttZFormatter;null===i?l=a.globals.series[e]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(r=s[e][i],0===s[e].length&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=new $i(this.ctx).isFormatXY()?void 0!==a.config.series[e].data[i]?a.config.series[e].data[i].x:"":void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var d=r;a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?r=new Xi(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(this.ctx).formatDate,w:this.w}):r=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](d,h):a.globals.xLabelFormatter(d,h);return void 0!==a.config.tooltip.x.formatter&&(r=a.globals.ttKeyFormatter(d,h)),a.globals.seriesZ.length>0&&a.globals.seriesZ[e].length>0&&(o=c(a.globals.seriesZ[e][i],a)),n="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(d,h):r,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,a=t.y1,s=t.y2,r=t.w,n=this.ttCtx.getElTooltip(),o=r.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]),n.innerHTML=o({ctx:this.ctx,series:r.globals.series,seriesIndex:e,dataPointIndex:i,y1:a,y2:s,w:r})}}]),t}(),wa=function(){function t(e){i(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return s(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=t-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(null!==e&&(r=a.globals.gridWidth/n*e),null===s||a.globals.isBarHorizontal||(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=r;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Mi.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Mi.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=e.globals.translateX;var s;s=new Mi(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=e.globals.translateY+a,r=i.yaxisTTEls[t].getBoundingClientRect().height,n=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(n-=26),s-=r/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=n+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),n=s.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(t)+o+5,h=parseFloat(e)+o/2;if(l>a.globals.gridWidth/2&&(l=l-n.ttWidth-o-10),l>a.globals.gridWidth-n.ttWidth-10&&(l=a.globals.gridWidth-n.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var c=s.getElGrid().getBoundingClientRect();(l=s.e.clientX-c.left)>a.globals.gridWidth/2&&(l-=s.tooltipRect.ttWidth),(h=s.e.clientY+a.globals.translateY-c.top)>a.globals.gridHeight/2&&(h-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+h>a.globals.gridHeight&&(h=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(l)||(l+=a.globals.translateX,r.style.left=l+"px",r.style.top=h+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),r=0;r0){var g=u.getAttribute("shape"),p=l.getMarkerPath(s,r,g,1.5*c);u.setAttribute("d",p)}this.moveXCrosshairs(s),o.fixedTooltip||this.moveTooltip(s,r,c)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,a=i.w,s=0,r=0,n=a.globals.pointsArray,o=new Zi(this.ctx),l=new Mi(this.ctx);e=o.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var h=i.tooltipUtil.getHoverMarkerSize(e);n[e]&&(s=n[e][t][0],r=n[e][t][1]);var c=i.tooltipUtil.getAllMarkers();if(null!==c)for(var d=0;d0){var b=l.getMarkerPath(s,g,f,h);c[d].setAttribute("d",b)}else c[d].setAttribute("d","")}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,r||a.globals.gridHeight,h)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(r=new Zi(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"']"));n||"number"!=typeof e||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var o=n?parseFloat(n.getAttribute("cx")):0,l=n?parseFloat(n.getAttribute("cy")):0,h=n?parseFloat(n.getAttribute("barWidth")):0,c=a.getElGrid().getBoundingClientRect(),d=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!d&&(o-=s%2!=0?h/2:0),n&&d&&(o-=h/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[t-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[t]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?l-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?l=a.e.clientY-c.top-a.tooltipRect.ttHeight/2:l+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(l=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,l||i.globals.gridHeight)}}]),t}(),ka=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new wa(e)}return s(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Vi(this.ctx),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=f(a),t.config.chart.stacked&&a.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w;"bubble"!==s.config.chart.type&&this.newPointSize(t,e);var r=e.getAttribute("cx"),n=e.getAttribute("cy");if(null!==i&&null!==a&&(r=i,n=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===s.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(r,n,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,a=this.ttCtx,s=t,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=e.config.markers.hover.size,o=0;o0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],i);t[e].setAttribute("d",a)}else t[e].setAttribute("d","M0,0")}}}]),t}(),Aa=function(){function t(e){i(this,t),this.w=e.w;var a=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!a.globals.isBarHorizontal&&"rangeBar"===a.config.chart.type&&a.config.plotOptions.bar.rangeBarGroupRows}return s(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,s=t.y,r=t.type,n=this.ttCtx,o=this.w;if(e.target.classList.contains("apexcharts-".concat(r,"-rect"))){var l=this.getAttr(e,"i"),h=this.getAttr(e,"j"),c=this.getAttr(e,"cx"),d=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),g=this.getAttr(e,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:h,shared:!1,e:e}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=h,a=c+n.tooltipRect.ttWidth/2+u,s=d+n.tooltipRect.ttHeight/2-g/2,n.tooltipPosition.moveXCrosshairs(c+u/2),a>o.globals.gridWidth/2&&(a=c-n.tooltipRect.ttWidth/2+u),n.w.config.tooltip.followCursor){var p=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-p.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),s=o.globals.clientY-p.top-(s>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=t.x,n=t.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var h=parseInt(s.paths.getAttribute("cx"),10),c=parseInt(s.paths.getAttribute("cy"),10),d=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),e=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=v.findAncestor(s.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,e,i),o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=i,r=h,n=c+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var g=l.getElGrid().getBoundingClientRect();n=l.e.clientY+o.globals.translateY-g.top}d<0&&(n=c),l.marker.enlargeCurrentPoint(i,s.paths,r,n)}return{x:r,y:n}}},{key:"handleBarTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=this.ttCtx,o=n.getElTooltip(),l=0,h=0,c=0,d=this.getBarTooltipXY({e:a,opt:s});if(null!==d.j||0!==d.barHeight||0!==d.barWidth){e=d.i;var u=d.j;if(r.globals.capturedSeriesIndex=e,r.globals.capturedDataPointIndex=u,r.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!r.config.tooltip.shared?(h=d.x,c=d.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[e]:r.config.stroke.width,l=h):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(c)&&(c=r.globals.svgHeight-n.tooltipRect.ttHeight),parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),h+n.tooltipRect.ttWidth>r.globals.gridWidth?h-=n.tooltipRect.ttWidth:h<0&&(h=0),n.w.config.tooltip.followCursor){var g=n.getElGrid().getBoundingClientRect();c=n.e.clientY-g.top}null===n.tooltip&&(n.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?n.tooltipPosition.moveXCrosshairs(l+i/2):n.tooltipPosition.moveXCrosshairs(l)),!n.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(c=c+r.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=h+r.globals.translateX+"px",o.style.top=c+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,i=t.e,a=t.opt,s=this.w,r=null,n=this.ttCtx,o=0,l=0,h=0,c=0,d=0,u=i.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){var g=i.target,p=g.getBoundingClientRect(),f=a.elGrid.getBoundingClientRect(),x=p.height;d=p.height;var b=p.width,m=parseInt(g.getAttribute("cx"),10),v=parseInt(g.getAttribute("cy"),10);c=parseFloat(g.getAttribute("barWidth"));var y="touchmove"===i.type?i.touches[0].clientX:i.clientX;r=parseInt(g.getAttribute("j"),10),o=parseInt(g.parentNode.getAttribute("rel"),10)-1;var w=g.getAttribute("data-range-y1"),k=g.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(g.parentNode.getAttribute("data:realIndex"),10));var A=function(t){return s.globals.isXNumeric?m-b/2:e.isVerticalGroupedRangeBar?m+b/2:m-n.dataPointsDividedWidth+b/2},C=function(){return v-n.dataPointsDividedHeight+x/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:r,y1:w?parseInt(w,10):null,y2:k?parseInt(k,10):null,shared:!n.showOnIntersect&&s.config.tooltip.shared,e:i}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(l=y-f.left+15,h=C()):(l=A(),h=i.clientY-f.top-n.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((l=m)0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var a=this.ttCtx,s=this.w,r=s.globals,n=r.seriesYAxisMap[t];if(a.yaxisTooltips[t]&&n.length>0){var o=r.yLabelFormatters[t],l=a.getElGrid().getBoundingClientRect(),h=n[0],c=0;i.yRatio.length>1&&(c=h);var d=(e-l.top)*i.yRatio[c],u=r.maxYArr[h]-r.minYArr[h],g=r.minYArr[h]+(u-d);s.config.yaxis[t].reversed&&(g=r.maxYArr[h]-(u-d)),a.tooltipPosition.moveYCrosshairs(e-l.top),a.yaxisTooltipText[t].innerHTML=o(g),a.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),Sa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.tConfig=a.config.tooltip,this.tooltipUtil=new va(this),this.tooltipLabels=new ya(this),this.tooltipPosition=new wa(this),this.marker=new ka(this),this.intersect=new Aa(this),this.axesTooltip=new Ca(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!a.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return s(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new Qi(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,a=[],s=this.getElTooltip(),r=function(r){var n=document.createElement("div");n.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(r)),n.style.order=i.config.tooltip.inverseOrder?t-r:r+1;var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[r],n.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var a=document.createElement("span");a.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(a),l.appendChild(e)})),n.appendChild(l),s.appendChild(n),a.push(n)},n=0;n0&&this.addPathsEventListeners(g,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(r=r+t.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+t.globals.svgHeight-s-10),e.style.left=r+"px",e.style.top=n+"px",{x:r,y:n,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,a=function(a){var s={paths:t[a],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[a].addEventListener(e,i.onSeriesHover.bind(i,s),{capture:!1,passive:!0})}))},s=0;s=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(t,e)}),20-a))}},{key:"seriesHover",value:function(t,e){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||0===s.globals.dataPoints)||(a.length?a.forEach((function(a){var s=i.getElTooltip(a),r={paths:t.paths,tooltipEl:s,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===i.w.globals.minX&&a.w.globals.maxX===i.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:r,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,a=t.opt,s=t.e,r=e.w,n=this.getElTooltip(e);if(n){if(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=s,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared)if(this.tConfig.onDatasetHover.highlightDataSeries)new Zi(e).toggleSeriesOnHover(s,s.target.parentNode);i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect})}}},{key:"axisChartsTooltips",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=s.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,ln.top+n.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var h=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(h)<0)return void this.handleMouseOut(s)}var c=this.getElTooltip(),d=this.getElXCrosshairs(),u=[];r.config.chart.group&&(u=this.ctx.getSyncedCharts());var g=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;null!==d&&d.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),g&&!this.showOnIntersect||u.length>1)this.handleStickyTooltip(a,o,l,s);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:e,y:i,type:r.config.chart.type});e=f.x,i=f.y,c.style.left=e+"px",c.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:e,y:i});if(this.yaxisTooltips.length)for(var x=0;xl.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(t,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||s.globals.isBarHorizontal){var h=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,h,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,i,a){var s=this.w;if(!this.tConfig.shared&&null===s.globals.series[e][a])return void this.handleMouseOut(i);if(void 0!==s.globals.series[e][a])this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,a,i.ttItems):this.create(t,this,e,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var r=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,r,a,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Mi(this.ctx),i=t.globals.dom.Paper.find(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,A=this.w,C=e;"mouseup"===t.type&&this.markerClick(t,i,a),null===k&&(k=this.tConfig.shared);var S=this.tooltipUtil.hasMarkers(i),L=this.tooltipUtil.getElBars();if(A.config.legend.tooltipHoverFormatter){var M=A.config.legend.tooltipHoverFormatter,P=Array.from(this.legendLabels);P.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var I=0;I0?C.marker.enlargePoints(a):C.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var E=new Mi(this.ctx),H=A.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var O=0;O0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*k)),w){u=u+d.height/2-b/2-2}var C=e.globals.series[i][a]<0,S=o;switch(this.barCtx.isReversed&&(S=o+(C?c:-c)),f.position){case"center":g=w?C?S-c/2+v:S+c/2-v:C?S-c/2+d.height/2+v:S+c/2+d.height/2-v;break;case"bottom":g=w?C?S-c+v:S+c-v:C?S-c+d.height+b+v:S+c-d.height/2+b-v;break;case"top":g=w?C?S+v:S-v:C?S-d.height/2-v:S+d.height+v}if(this.barCtx.lastActiveBarSerieIndex===s&&x.enabled){var L=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:a}),p.fontSize);r=C?S-L.height/2-v-x.offsetY+18:S+L.height+v+x.offsetY-18;var M=A;n=y+(e.globals.isXNumeric?-h*e.globals.barGroups.length/2:e.globals.barGroups.length*h/2-(e.globals.barGroups.length-1)*h-M)+x.offsetX}return e.config.chart.stacked||(g<0?g=0+b:g+d.height/3>e.globals.gridHeight&&(g=e.globals.gridHeight-b)),{bcx:l,bcy:o,dataLabelsX:u,dataLabelsY:g,totalDataLabelsX:n,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,a=t.i,s=t.j,r=t.realIndex,n=t.bcy,o=t.barHeight,l=t.barWidth,h=t.textRects,c=t.dataLabelsX,d=t.strokeWidth,u=t.dataLabelsConfig,g=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,f=t.offX,x=t.offY,b=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var m,v,y=n-(this.barCtx.isRangeBar?0:b)+o/2+h.height/2+x-3,w="start",k=e.globals.series[a][s]<0,A=i;switch(this.barCtx.isReversed&&(A=i+(k?-l:l),w=k?"start":"end"),g.position){case"center":c=k?A+l/2-f:Math.max(h.width/2,A-l/2)+f;break;case"bottom":c=k?A+l-d-f:A-l+d+f;break;case"top":c=k?A-d-f:A-d+f}if(this.barCtx.lastActiveBarSerieIndex===r&&p.enabled){var C=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:s}),u.fontSize);k?(m=A-d-f-p.offsetX,w="end"):m=A+f+p.offsetX+(this.barCtx.isReversed?-(l+d):d),v=y-h.height/2+C.height/2+p.offsetY+d}return e.config.chart.stacked||("start"===u.textAnchor?c-h.width<0?c=k?h.width+d:d:c+h.width>e.globals.gridWidth&&(c=k?e.globals.gridWidth-d:e.globals.gridWidth-h.width-d):"middle"===u.textAnchor?c-h.width/2<0?c=h.width/2+d:c+h.width/2>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width/2-d):"end"===u.textAnchor&&(c<1?c=h.width+d:c+1>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width-d))),{bcx:i,bcy:n,dataLabelsX:c,dataLabelsY:y,totalDataLabelsX:m,totalDataLabelsY:v,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.i,r=t.j,n=t.textRects,o=t.barHeight,l=t.barWidth,h=t.dataLabelsConfig,c=this.w,d="rotate(0)";"vertical"===c.config.plotOptions.bar.dataLabels.orientation&&(d="rotate(-90, ".concat(e,", ").concat(i,")"));var g=new qi(this.barCtx.ctx),p=new Mi(this.barCtx.ctx),f=h.formatter,x=null,b=c.globals.collapsedSeriesIndices.indexOf(s)>-1;if(h.enabled&&!b){x=p.group({class:"apexcharts-data-labels",transform:d});var m="";void 0!==a&&(m=f(a,u(u({},c),{},{seriesIndex:s,dataPointIndex:r,w:c}))),!a&&c.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(m="");var v=c.globals.series[s][r]<0,y=c.config.plotOptions.bar.dataLabels.position;if("vertical"===c.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(h.textAnchor=v?"end":"start"),"center"===y&&(h.textAnchor="middle"),"bottom"===y&&(h.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels)lMath.abs(l)&&(m=""):n.height/1.6>Math.abs(o)&&(m=""));var w=u({},h);this.barCtx.isHorizontal&&a<0&&("start"===h.textAnchor?w.textAnchor="end":"end"===h.textAnchor&&(w.textAnchor="start")),g.plotDataLabelsText({x:e,y:i,text:m,i:s,j:r,parent:x,dataLabelsConfig:w,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}},{key:"drawTotalDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.realIndex,r=t.textAnchor,n=t.barTotalDataLabelsConfig;this.w;var o,l=new Mi(this.barCtx.ctx);return n.enabled&&void 0!==e&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===s&&(o=l.drawText({x:e,y:i,foreColor:n.style.color,text:a,textAnchor:r,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),o}}]),t}(),Ma=function(){function t(e){i(this,t),this.w=e.w,this.barCtx=e}return s(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[i].length),e.globals.isXNumeric)for(var a=0;ae.globals.minX&&e.globals.seriesX[i][a]0&&(a=l.globals.minXDiff/d),(r=a/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),n=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+(a-r*this.barCtx.seriesLen)/2}return l.globals.barHeight=s,l.globals.barWidth=r,{x:t,y:e,yDivision:i,xDivision:a,barHeight:s,barWidth:r,zeroH:n,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,i,a){var s,r,n,o,l=this.w,h=this.barCtx.ctx.fill,c=null,d=this.barCtx.barOptions.distributed?i:e;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(a){t[e][i]>=a.from&&t[e][i]<=a.to&&(c=a.color)}));return h.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:a,dataPointIndex:i,color:c,value:t[e][i],fillConfig:null===(s=l.config.series[e].data[i])||void 0===s?void 0:s.fill,fillType:null!==(r=l.config.series[e].data[i])&&void 0!==r&&null!==(n=r.fill)&&void 0!==n&&n.type?null===(o=l.config.series[e].data[i])||void 0===o?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[a]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,i){var a=0,s=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"createBorderRadiusArr",value:function(t){var e,i=this.w,a=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,s=t.length,n=0|(null===(e=t[0])||void 0===e?void 0:e.length),o=Array.from({length:s},(function(){return Array(n).fill(a?"top":"none")}));if(a)return o;for(var l=0;l0?(h.push(u),d++):g<0&&(c.push(u),d++)}if(h.length>0&&0===c.length)if(1===h.length)o[h[0]][l]="both";else{var p,f=h[0],x=h[h.length-1],b=r(h);try{for(b.s();!(p=b.n()).done;){var m=p.value;o[m][l]=m===f?"bottom":m===x?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===h.length)if(1===c.length)o[c[0]][l]="both";else{var v,y=Math.max.apply(Math,c),w=Math.min.apply(Math,c),k=r(c);try{for(k.s();!(v=k.n()).done;){var A=v.value;o[A][l]=A===y?"bottom":A===w?"top":"none"}}catch(t){k.e(t)}finally{k.f()}}else if(h.length>0&&c.length>0){var C,S=h[h.length-1],L=r(h);try{for(L.s();!(C=L.n()).done;){var M=C.value;o[M][l]=M===S?"top":"none"}}catch(t){L.e(t)}finally{L.f()}var P,I=Math.max.apply(Math,c),T=r(c);try{for(T.s();!(P=T.n()).done;){var z=P.value;o[z][l]=z===I?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else if(1===d){o[h[0]||c[0]][l]="both"}}return o}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,a=t.x1,s=t.x2,r=t.y1,n=t.y2,o=t.elSeries,l=this.w,h=new Mi(this.barCtx.ctx),c=new Zi(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var d=this.barCtx.barOptions.colors.backgroundBarColors[e],u=h.drawRect(void 0!==a?a:0,void 0!==r?r:0,void 0!==s?s:l.globals.gridWidth,void 0!==n?n:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,i=t.barWidth,a=t.barXPosition,s=t.y1,r=t.y2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.columnWidthOffset&&(x=a-g.config.series[c].data[u].columnWidthOffset/2,f=i+g.config.series[c].data[u].columnWidthOffset);var b=n/2,m=x+b,v=x+f-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001-b*y,r+=.001+b*y;var w=p.move(m,s),k=p.move(m,s),A=p.line(v,s);if(g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1)),w=w+p.line(m,r)+p.line(v,r)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(m,s)+A+A+A+A+A+p.line(m,s)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).yArrj.push(r-b*y),C.yArrjF.push(Math.abs(s-r+n*y)),C.yArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"getBarpaths",value:function(t){var e,i=t.barYPosition,a=t.barHeight,s=t.x1,r=t.x2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.barHeightOffset&&(f=i-g.config.series[c].data[u].barHeightOffset/2,x=a+g.config.series[c].data[u].barHeightOffset);var b=n/2,m=f+b,v=f+x-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001+b*y,r+=.001-b*y;var w=p.move(s,m),k=p.move(s,m);g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1));var A=p.line(s,v);if(w=w+p.line(r,m)+p.line(r,v)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(s,m)+A+A+A+A+A+p.line(s,m)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).xArrj.push(r+b*y),C.xArrjF.push(Math.abs(s-r-n*y)),C.xArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;a2&&void 0!==arguments[2])||arguments[2]?e:null;return null!=t&&(i=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(t,e,i){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?e:null;return null!=t&&(a=e-t/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(t,e,i,a,s,r){var n=this,l=this.w,h=[],c=function(a,s){var l;h.push((o(l={},t,"x"===t?n.getXForValue(a,e,!1):n.getYForValue(a,i,r,!1)),o(l,"attrs",s),l))};if(l.globals.seriesGoals[a]&&l.globals.seriesGoals[a][s]&&Array.isArray(l.globals.seriesGoals[a][s])&&l.globals.seriesGoals[a][s].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,g={strokeHeight:"x"===t?0:l.globals.markers.size[a],strokeWidth:"x"===t?l.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[a])?d[a][0]:d[a]};c(l.globals.seriesRangeStart[a][s],g),c(l.globals.seriesRangeEnd[a][s],u(u({},g),{},{strokeColor:Array.isArray(d[a])?d[a][1]:d[a]}))}return h}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,a=t.goalX,s=t.goalY,r=t.barWidth,n=t.barHeight,o=new Mi(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var h=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach((function(t){if(t.x>=-1&&t.x<=o.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:n/2,a=i+e+n/2;h=o.drawLine(t.x,a-2*e,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(h)}})):Array.isArray(s)&&s.forEach((function(t){if(t.y>=-1&&t.y<=o.w.globals.gridHeight+1){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:r/2,a=e+i+r/2;h=o.drawLine(a-2*i,t.y,a,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(h)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,i=t.currPaths,a=t.color,s=this.w,r=e.x,n=e.x1,o=e.barYPosition,l=i.x,h=i.x1,c=i.barYPosition,d=o+i.barHeight,u=new Mi(this.barCtx.ctx),g=new v,p=u.move(n,d)+u.line(r,d)+u.line(l,c)+u.line(h,c)+u.line(n,d)+("around"===s.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return u.drawPath({d:p,fill:g.shadeColor(.5,v.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,i=t.i,a=t.j,s=this.w,r=0,n=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map((function(t,e){return e})):(null===(e=s.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=s.globals.seriesPercent[t][a];e&&r++,t-1})),a=this.barCtx.columnGroupIndices,s=a.indexOf(i);return s<0&&(a.push(i),s=a.length-1),{groupIndex:i,columnGroupIndex:s}}}]),t}(),Pa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w;var s=this.w;this.barOptions=s.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=s.config.stroke.width,this.isNullValue=!1,this.isRangeBar=s.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!s.globals.isBarHorizontal&&s.globals.seriesRange.length&&s.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=a,null!==this.xyRatios&&(this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.invertedXRatio=a.invertedXRatio,this.invertedYRatio=a.invertedYRatio,this.baseLineY=a.baseLineY,this.baseLineInvertedY=a.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var r=new Zi(this.ctx);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var n=r.getBarSeriesIndices(),o=new Pi(this.ctx);this.stackedSeriesTotals=o.getStackedSeriesTotals(this.w.config.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}))),this.barHelpers=new Ma(this)}return s(t,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=new Pi(this.ctx,i);t=s.getLogSeries(t),this.series=t,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var n=0,o=0;n0&&(this.visibleI=this.visibleI+1);var w=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[b],this.translationsIndex=b);var A=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var C=this.barHelpers.initialPositions();p=C.y,w=C.barHeight,h=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,l=C.xDivision,c=C.zeroH,this.isHorizontal||x.push(g+k/2);var S=a.group({class:"apexcharts-datalabels","data:realIndex":b});i.globals.delayedElements.push({el:S.node}),S.node.classList.add("apexcharts-element-hidden");var L=a.group({class:"apexcharts-bar-goals-markers"}),M=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");for(var P=0;P0){var R=this.barHelpers.drawBarShadow({color:"string"==typeof X&&-1===(null==X?void 0:X.indexOf("url"))?X:v.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});if(M.add(R),i.config.chart.dropShadow.enabled)new Li(this.ctx).dropShadow(R,i.config.chart.dropShadow,b)}this.pathArr.push(T);var Y=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:w,barWidth:k});Y&&L.add(Y),p=T.y,g=T.x,P>0&&x.push(g+k/2),f.push(p),this.renderSeries({realIndex:b,pathFill:X,j:P,i:n,columnGroupIndex:m,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:I,elSeries:y,x:g,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:w),barWidth:Math.abs(T.barWidth?T.barWidth:k),elDataLabelsWrap:S,elGoalsMarkers:L,elBarShadows:M,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[b]=x,i.globals.seriesYvalues[b]=f,r.add(y)}return r}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,a=t.lineFill,s=t.j,r=t.i,n=t.columnGroupIndex,o=t.pathFrom,l=t.pathTo,h=t.strokeWidth,c=t.elSeries,d=t.x,u=t.y,g=t.y1,p=t.y2,f=t.series,x=t.barHeight,b=t.barWidth,m=t.barXPosition,v=t.barYPosition,y=t.elDataLabelsWrap,w=t.elGoalsMarkers,k=t.elBarShadows,A=t.visibleSeries,C=t.type,S=t.classes,L=this.w,M=new Mi(this.ctx);if(!a){var P="function"==typeof L.globals.stroke.colors[e]?function(t){var e,i=L.config.stroke.colors;return Array.isArray(i)&&i.length>0&&((e=i[t])||(e=""),"function"==typeof e)?e({value:L.globals.series[t][s],dataPointIndex:s,w:L}):e}(e):L.globals.stroke.colors[e];a=this.barOptions.distributed?L.globals.stroke.colors[s]:P}L.config.series[r].data[s]&&L.config.series[r].data[s].strokeColor&&(a=L.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var I=s/L.config.chart.animations.animateGradually.delay*(L.config.chart.animations.speed/L.globals.dataPoints)/2.4,T=M.renderPaths({i:r,j:s,realIndex:e,pathFrom:o,pathTo:l,stroke:a,strokeWidth:h,strokeLineCap:L.config.stroke.lineCap,fill:i,animationDelay:I,initialSpeed:L.config.chart.animations.speed,dataChangeSpeed:L.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(C,"-area ").concat(S),chartType:C});T.attr("clip-path","url(#gridRectBarMask".concat(L.globals.cuid,")"));var z=L.config.forecastDataPoints;z.count>0&&s>=L.globals.dataPoints-z.count&&(T.node.setAttribute("stroke-dasharray",z.dashArray),T.node.setAttribute("stroke-width",z.strokeWidth),T.node.setAttribute("fill-opacity",z.fillOpacity)),void 0!==g&&void 0!==p&&(T.attr("data-range-y1",g),T.attr("data-range-y2",p)),new Li(this.ctx).setSelectionFilter(T,e,s),c.add(T);var X=new La(this).handleBarDataLabels({x:d,y:u,y1:g,y2:p,i:r,j:s,series:f,realIndex:e,columnGroupIndex:n,barHeight:x,barWidth:b,barXPosition:m,barYPosition:v,renderedPath:T,visibleSeries:A});return null!==X.dataLabels&&y.add(X.dataLabels),X.totalDataLabels&&y.add(X.totalDataLabels),c.add(y),w&&c.add(w),k&&c.add(k),c}},{key:"drawBarPaths",value:function(t){var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.yDivision,h=t.elSeries,c=this.w,d=i.i,u=i.j;if(c.globals.isXNumeric)e=(o=(c.globals.seriesX[d][u]-c.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var g=0,p=0;c.globals.seriesPercent.forEach((function(t,e){t[u]&&g++,e0&&(a=this.seriesLen*a/g),e=o+a*this.visibleI,e-=a*p}else e=o+a*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[d][u],r)-r)/2),n=this.barHelpers.getXForValue(this.series[d][u],r);var f=this.barHelpers.getBarpaths({barYPosition:e,barHeight:a,x1:r,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:d,j:u,w:c});return c.globals.isXNumeric||(o+=l),this.barHelpers.barBackground({j:u,i:d,y1:e-a*this.visibleI,y2:a*this.seriesLen,elSeries:h}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x1:r,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",r,null,d,u),barYPosition:e,barHeight:a}}},{key:"drawColumnPaths",value:function(t){var e,i=t.indexes,a=t.x,s=t.y,r=t.xDivision,n=t.barWidth,o=t.zeroH,l=t.strokeWidth,h=t.elSeries,c=this.w,d=i.realIndex,u=i.translationsIndex,g=i.i,p=i.j,f=i.bc;if(c.globals.isXNumeric){var x=this.getBarXForNumericXAxis({x:a,j:p,realIndex:d,barWidth:n});a=x.x,e=x.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var b=this.barHelpers.getZeroValueEncounters({i:g,j:p}),m=b.nonZeroColumns,v=b.zeroEncounters;m>0&&(n=this.seriesLen*n/m),e=a+n*this.visibleI,e-=n*v}else e=a+n*this.visibleI;s=this.barHelpers.getYForValue(this.series[g][p],o,u);var y=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:n,y1:o,y2:s,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:d,i:g,j:p,w:c});return c.globals.isXNumeric||(a+=r),this.barHelpers.barBackground({bc:f,j:p,i:g,x1:e-l/2-n*this.visibleI,x2:n*this.seriesLen+l/2,elSeries:h}),{pathTo:y.pathTo,pathFrom:y.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,g,p,u),barXPosition:e,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,i=t.barWidth,a=t.realIndex,s=t.j,r=this.w,n=a;return r.globals.seriesX[a].length||(n=r.globals.maxValsInArrayIndex),v.isNumber(r.globals.seriesX[n][s])&&(e=(r.globals.seriesX[n][s]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:e+i*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var i,a=this.w,s=0;s0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==a.globals.previousPaths[s].paths[e]&&(i=a.globals.previousPaths[s].paths[e].d)}return i}}]),t}(),Ia=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this,a=this.w;this.graphics=new Mi(this.ctx),this.bar=new Pa(this.ctx,this.xyRatios);var s=new Pi(this.ctx,a);t=s.getLogSeries(t),this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===a.config.chart.stackType&&(t=a.globals.comboCharts?e.map((function(t){return a.globals.seriesPercent[t]})):a.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);for(var r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),n=0,o=0,l=function(s,l){var h=void 0,c=void 0,d=void 0,g=void 0,p=a.globals.comboCharts?e[s]:s,f=i.barHelpers.getGroupIndex(p),x=f.groupIndex,b=f.columnGroupIndex;i.groupCtx=i[a.globals.seriesGroups[x]];var m=[],y=[],w=0;i.yRatio.length>1&&(i.yaxisIndex=a.globals.seriesYAxisReverseMap[p][0],w=p),i.isReversed=a.config.yaxis[i.yaxisIndex]&&a.config.yaxis[i.yaxisIndex].reversed;var k=i.graphics.group({class:"apexcharts-series",seriesName:v.escapeString(a.globals.seriesNames[p]),rel:s+1,"data:realIndex":p});i.ctx.series.addCollapsedClassToSeries(k,p);var A=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),C=i.graphics.group({class:"apexcharts-bar-goals-markers"}),S=0,L=0,M=i.initialPositions(n,o,h,c,d,g,w);o=M.y,S=M.barHeight,c=M.yDivision,g=M.zeroW,n=M.x,L=M.barWidth,h=M.xDivision,d=M.zeroH,a.globals.barHeight=S,a.globals.barWidth=L,i.barHelpers.initializeStackedXYVars(i),1===i.groupCtx.prevY.length&&i.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(i.groupCtx.prevY[0]=i.groupCtx.prevY[0].map((function(){return d})),i.groupCtx.prevYF[0]=i.groupCtx.prevYF[0].map((function(){return 0})));for(var P=0;P0||"top"===i.barHelpers.arrBorderRadius[p][P]&&a.globals.series[p][P]<0)&&(Y=E),k=i.renderSeries({realIndex:p,pathFill:R,j:P,i:s,columnGroupIndex:b,pathFrom:z.pathFrom,pathTo:z.pathTo,strokeWidth:I,elSeries:k,x:n,y:o,series:t,barHeight:S,barWidth:L,elDataLabelsWrap:A,elGoalsMarkers:C,type:"bar",visibleSeries:b,classes:Y})}a.globals.seriesXvalues[p]=m,a.globals.seriesYvalues[p]=y,i.groupCtx.prevY.push(i.groupCtx.yArrj),i.groupCtx.prevYF.push(i.groupCtx.yArrjF),i.groupCtx.prevYVal.push(i.groupCtx.yArrjVal),i.groupCtx.prevX.push(i.groupCtx.xArrj),i.groupCtx.prevXF.push(i.groupCtx.xArrjF),i.groupCtx.prevXVal.push(i.groupCtx.xArrjVal),r.add(k)},h=0,c=0;h1?l=(i=h.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(d).indexOf("%")?l=parseInt(d,10):l*=parseInt(d,10)/100,s=this.isReversed?this.baseLineY[n]:h.globals.gridHeight-this.baseLineY[n],t=h.globals.padHorizontal+(i-l)/2}var u=h.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:i,barHeight:o/u,barWidth:l/u,zeroH:s,zeroW:r}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.columnGroupIndex,h=t.seriesGroup,c=t.yDivision,d=t.elSeries,u=this.w,g=o+l*a,p=i.i,f=i.j,x=i.realIndex,b=i.translationsIndex,m=0,v=0;v0){var w=r;this.groupCtx.prevXVal[y-1][f]<0?w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[y-1][f]:this.groupCtx.prevXVal[y-1][f]>=0&&(w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]:this.groupCtx.prevX[y-1][f]-m+2*(this.isReversed?m:0)),e=w}else e=r;n=null===this.series[p][f]?e:e+this.series[p][f]/this.invertedYRatio-2*(this.isReversed?this.series[p][f]/this.invertedYRatio:0);var k=this.barHelpers.getBarpaths({barYPosition:g,barHeight:a,x1:e,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,seriesGroup:h,i:p,j:f,w:u});return this.barHelpers.barBackground({j:f,i:p,y1:g,y2:a,elSeries:d}),o+=c,{pathTo:k.pathTo,pathFrom:k.pathFrom,goalX:this.barHelpers.getGoalValues("x",r,null,p,f,b),barXPosition:e,barYPosition:g,x:n,y:o}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,r=t.barWidth,n=t.zeroH,o=t.columnGroupIndex,l=t.seriesGroup,h=t.elSeries,c=this.w,d=e.i,u=e.j,g=e.bc,p=e.realIndex,f=e.translationsIndex;if(c.globals.isXNumeric){var x=c.globals.seriesX[p][u];x||(x=0),i=(x-c.globals.minX)/this.xRatio-r/2*c.globals.barGroups.length}for(var b,m=i+o*r,v=0,y=0;y0&&!c.globals.isXNumeric||w>0&&c.globals.isXNumeric&&c.globals.seriesX[p-1][u]===c.globals.seriesX[p][u]){var k,A,C,S=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var L=1;L=0?C-v+2*(this.isReversed?v:0):C;break}if((null===(T=this.groupCtx.prevYVal[w-P])||void 0===T?void 0:T[u])>=0){A=this.series[d][u]>=0?C:C+v-2*(this.isReversed?v:0);break}}void 0===A&&(A=c.globals.gridHeight),b=null!==(k=this.groupCtx.prevYF[0])&&void 0!==k&&k.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?n:A}else b=n;a=this.series[d][u]?b-this.series[d][u]/this.yRatio[f]+2*(this.isReversed?this.series[d][u]/this.yRatio[f]:0):b;var z=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:r,y1:b,y2:a,yRatio:this.yRatio[f],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:d,j:u,w:c});return this.barHelpers.barBackground({bc:g,j:u,i:d,x1:m,x2:r,elSeries:h}),{pathTo:z.pathTo,pathFrom:z.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,n,d,u),barXPosition:m,x:c.globals.isXNumeric?i:i+s,y:a}}}]),a}(),Ta=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e,i){var a=this,s=this.w,r=new Mi(this.ctx),n=s.globals.comboCharts?e:s.config.chart.type,o=new ji(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=s.config.plotOptions.bar.horizontal;var l=new Pi(this.ctx,s);t=l.getLogSeries(t),this.series=t,this.yRatio=l.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var h=r.group({class:"apexcharts-".concat(n,"-series apexcharts-plot-series")}),c=function(e){a.isBoxPlot="boxPlot"===s.config.chart.type||"boxPlot"===s.config.series[e].type;var n,l,c,d,g=void 0,p=void 0,f=[],x=[],b=s.globals.comboCharts?i[e]:e,m=a.barHelpers.getGroupIndex(b).columnGroupIndex,y=r.group({class:"apexcharts-series",seriesName:v.escapeString(s.globals.seriesNames[b]),rel:e+1,"data:realIndex":b});a.ctx.series.addCollapsedClassToSeries(y,b),t[e].length>0&&(a.visibleI=a.visibleI+1);var w,k,A=0;a.yRatio.length>1&&(a.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],A=b);var C=a.barHelpers.initialPositions();p=C.y,w=C.barHeight,l=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,n=C.xDivision,c=C.zeroH,x.push(g+k/2);for(var S=r.group({class:"apexcharts-datalabels","data:realIndex":b}),L=r.group({class:"apexcharts-bar-goals-markers"}),M=function(i){var r=a.barHelpers.getStrokeWidth(e,i,b),h=null,v={indexes:{i:e,j:i,realIndex:b,translationsIndex:A},x:g,y:p,strokeWidth:r,elSeries:y};h=a.isHorizontal?a.drawHorizontalBoxPaths(u(u({},v),{},{yDivision:l,barHeight:w,zeroW:d})):a.drawVerticalBoxPaths(u(u({},v),{},{xDivision:n,barWidth:k,zeroH:c})),p=h.y,g=h.x;var C=a.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:h.barYPosition,goalX:h.goalX,goalY:h.goalY,barHeight:w,barWidth:k});C&&L.add(C),i>0&&x.push(g+k/2),f.push(p),h.pathTo.forEach((function(n,l){var c=!a.isBoxPlot&&a.candlestickOptions.wick.useFillColor?h.color[l]:s.globals.stroke.colors[e],d=o.fillPath({seriesNumber:b,dataPointIndex:i,color:h.color[l],value:t[e][i]});a.renderSeries({realIndex:b,pathFill:d,lineFill:c,j:i,i:e,pathFrom:h.pathFrom,pathTo:n,strokeWidth:r,elSeries:y,x:g,y:p,series:t,columnGroupIndex:m,barHeight:w,barWidth:k,elDataLabelsWrap:S,elGoalsMarkers:L,visibleSeries:a.visibleI,type:s.config.chart.type})}))},P=0;Pb.c&&(d=!1);var y=Math.min(b.o,b.c),w=Math.max(b.o,b.c),k=b.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[u][c]-o.globals.minX)/this.xRatio-s/2);var A=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(y=r,w=r):(y=r-y/x,w=r-w/x,m=r-b.h/x,v=r-b.l/x,k=r-b.m/x);var C=l.move(A,r),S=l.move(A+s/2,y);return o.globals.previousPaths.length>0&&(S=this.getPreviousPath(u,c,!0)),C=this.isBoxPlot?[l.move(A,y)+l.line(A+s/2,y)+l.line(A+s/2,m)+l.line(A+s/4,m)+l.line(A+s-s/4,m)+l.line(A+s/2,m)+l.line(A+s/2,y)+l.line(A+s,y)+l.line(A+s,k)+l.line(A,k)+l.line(A,y+n/2),l.move(A,k)+l.line(A+s,k)+l.line(A+s,w)+l.line(A+s/2,w)+l.line(A+s/2,v)+l.line(A+s-s/4,v)+l.line(A+s/4,v)+l.line(A+s/2,v)+l.line(A+s/2,w)+l.line(A,w)+l.line(A,k)+"z"]:[l.move(A,w)+l.line(A+s/2,w)+l.line(A+s/2,m)+l.line(A+s/2,w)+l.line(A+s,w)+l.line(A+s,y)+l.line(A+s/2,y)+l.line(A+s/2,v)+l.line(A+s/2,y)+l.line(A,y)+l.line(A,w-n/2)],S+=l.move(A,y),o.globals.isXNumeric||(i+=a),{pathTo:C,pathFrom:S,x:i,y:w,goalY:this.barHelpers.getGoalValues("y",null,r,h,c,e.translationsIndex),barXPosition:A,color:this.isBoxPlot?f:d?[g]:[p]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var i=t.y,a=t.yDivision,s=t.barHeight,r=t.zeroW,n=t.strokeWidth,o=this.w,l=new Mi(this.ctx),h=e.i,c=e.j,d=this.boxOptions.colors.lower;this.isBoxPlot&&(d=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,g=e.realIndex,p=this.getOHLCValue(g,c),f=r,x=r,b=Math.min(p.o,p.c),m=Math.max(p.o,p.c),v=p.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[g][c]-o.globals.minX)/this.invertedXRatio-s/2);var y=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(b=r,m=r):(b=r+b/u,m=r+m/u,f=r+p.h/u,x=r+p.l/u,v=r+p.m/u);var w=l.move(r,y),k=l.move(b,y+s/2);return o.globals.previousPaths.length>0&&(k=this.getPreviousPath(g,c,!0)),w=[l.move(b,y)+l.line(b,y+s/2)+l.line(f,y+s/2)+l.line(f,y+s/2-s/4)+l.line(f,y+s/2+s/4)+l.line(f,y+s/2)+l.line(b,y+s/2)+l.line(b,y+s)+l.line(v,y+s)+l.line(v,y)+l.line(b+n/2,y),l.move(v,y)+l.line(v,y+s)+l.line(m,y+s)+l.line(m,y+s/2)+l.line(x,y+s/2)+l.line(x,y+s-s/4)+l.line(x,y+s/4)+l.line(x,y+s/2)+l.line(m,y+s/2)+l.line(m,y)+l.line(v,y)+"z"],k+=l.move(b,y),o.globals.isXNumeric||(i+=a),{pathTo:w,pathFrom:k,x:m,y:i,goalX:this.barHelpers.getGoalValues("x",r,null,h,c),barYPosition:y,color:d}}},{key:"getOHLCValue",value:function(t,e){var i=this.w,a=new Pi(this.ctx,i),s=a.getLogValAtSeriesIndex(i.globals.seriesCandleH[t][e],t),r=a.getLogValAtSeriesIndex(i.globals.seriesCandleO[t][e],t),n=a.getLogValAtSeriesIndex(i.globals.seriesCandleM[t][e],t),o=a.getLogValAtSeriesIndex(i.globals.seriesCandleC[t][e],t),l=a.getLogValAtSeriesIndex(i.globals.seriesCandleL[t][e],t);return{o:this.isBoxPlot?s:r,h:this.isBoxPlot?r:s,m:n,l:this.isBoxPlot?o:l,c:this.isBoxPlot?l:o}}}]),a}(),za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,a){var s=this.w,r=1,n=s.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,i);s.globals.hasNegs||a?r=s.config.plotOptions[t].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):(1-o.percent/100)*(1.25*n):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(r=1-o.percent/100,"treemap"===t&&(r=(1-o.percent/100)*(1.25*n)));var l=o.color,h=new v;if(s.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var c=h.shadeColor(-1*r,o.color);l=v.hexToRgba(v.isColorHex(c)?c:v.rgb2hex(c),s.config.fill.opacity)}else{var d=h.shadeColor(r,o.color);l=v.hexToRgba(v.isColorHex(d)?d:v.rgb2hex(d),s.config.fill.opacity)}return{color:l,colorProps:o}}},{key:"determineColor",value:function(t,e,i){var a=this.w,s=a.globals.series[e][i],r=a.config.plotOptions[t],n=r.colorScale.inverse?i:e;r.distributed&&"treemap"===a.config.chart.type&&(n=i);var o=a.globals.colors[n],l=null,h=Math.min.apply(Math,f(a.globals.series[e])),c=Math.max.apply(Math,f(a.globals.series[e]));r.distributed||"heatmap"!==t||(h=a.globals.minY,c=a.globals.maxY),void 0!==r.colorScale.min&&(h=r.colorScale.mina.globals.maxY?r.colorScale.max:a.globals.maxY);var d=Math.abs(c)+Math.abs(h),u=100*s/(0===d?d-1e-6:d);r.colorScale.ranges.length>0&&r.colorScale.ranges.map((function(t,e){if(s>=t.from&&s<=t.to){o=t.color,l=t.foreColor?t.foreColor:null,h=t.from,c=t.to;var i=Math.abs(c)+Math.abs(h);u=100*s/(0===i?i-1e-6:i)}}));return{color:o,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,a=t.y,s=t.i,r=t.j,n=t.colorProps,o=t.fontSize,l=this.w.config.dataLabels,h=new Mi(this.ctx),c=new qi(this.ctx),d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});var u=l.offsetX,g=l.offsetY,p=i+u,f=a+parseFloat(l.style.fontSize)/3+g;c.plotDataLabelsText({x:p,y:f,text:e,i:s,j:r,color:n.foreColor,parent:d,fontSize:o,dataLabelsConfig:l})}return d}},{key:"addListeners",value:function(t){var e=new Mi(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),Xa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w,this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new za(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return s(t,[{key:"draw",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var s=e.globals.gridWidth/e.globals.dataPoints,r=e.globals.gridHeight/e.globals.series.length,n=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var h=o?0:l.length-1;o?h=0;o?h++:h--){var c=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:v.escapeString(e.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(this.ctx.series.addCollapsedClassToSeries(c,h),e.config.chart.dropShadow.enabled){var d=e.config.chart.dropShadow;new Li(this.ctx).dropShadow(c,d,h)}for(var u=0,g=e.config.plotOptions.heatmap.shadeIntensity,p=0;p-1&&this.pieClicked(d),i.config.dataLabels.enabled){var w=m.x,k=m.y,A=100*g/this.fullAngle+"%";if(0!==g&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(h=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(h)>this.fullAngle&&(h-=this.fullAngle);var c=Math.PI*(h-90)/180,d=i.centerX+r*Math.cos(l),u=i.centerY+r*Math.sin(l),g=i.centerX+r*Math.cos(c),p=i.centerY+r*Math.sin(c),f=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,h),x=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),b=s>180?1:0,m=["M",d,u,"A",r,r,0,b,1,g,p];return e="donut"===i.chartType?[].concat(m,["L",f.x,f.y,"A",i.donutSize,i.donutSize,0,b,0,x.x,x.y,"L",d,u,"z"]).join(" "):"pie"===i.chartType||"polarArea"===i.chartType?[].concat(m,["L",i.centerX,i.centerY,"L",d,u]).join(" "):[].concat(m).join(" "),n.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new ta(this.ctx),a=new Mi(this.ctx),s=new Ra(this.ctx),r=a.group(),n=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),h=o.result.length;this.maxY=o.niceMax;for(var c=e.globals.radialSize,d=c/(h-1),u=0;u1&&t.total.show&&(s=t.total.color);var n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,r),a||"function"!=typeof t.total.formatter||(i=t.total.formatter(r));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,r):"",null!==n&&(n.textContent=e),null!==o&&(o.textContent=i),null!==n&&(n.style.fill=s)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,a=t.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,s,a,t);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,a=new Mi(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(0!==s.strokeWidth){for(var r=[],n=360/i.globals.series.length,o=0;o0&&(f=e.getPreviousPath(n));for(var x=0;x=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?s-=10:t.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,a=0;a0&&parseInt(s.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[a].paths[0]&&(i=e.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var a=[],s=0;s=360&&(u=360-Math.abs(this.startAngle)-.1);var g=i.drawPath({d:"",stroke:c,strokeWidth:n*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){var p=h.dropShadow;s.dropShadow(g,p)}l.add(g),g.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(g,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:d,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return a}},{key:"drawArcs",value:function(t){var e=this.w,i=new Mi(this.ctx),a=new ji(this.ctx),s=new Li(this.ctx),r=i.group(),n=this.getStrokeWidth(t);t.size=t.size-n/2;var o=e.config.plotOptions.radialBar.hollow.background,l=t.size-n*t.series.length-this.margin*t.series.length-n*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(t,r,l,o));var c=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:o||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var d=e.config.plotOptions.radialBar.hollow.dropShadow;s.dropShadow(c,d)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var g=null;if(this.radialDataLabels.show){var p=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");g=this.renderInnerDataLabels(p,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})}"back"===e.config.plotOptions.radialBar.hollow.position&&(r.add(c),g&&r.add(g));var f=!1;e.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var x=f?t.series.length-1:0;f?x>=0:x100?100:t.series[x])/100,A=Math.round(this.totalAngle*k)+this.startAngle,C=void 0;e.globals.dataChanged&&(w=this.startAngle,C=Math.round(this.totalAngle*v.negToZero(e.globals.previousPaths[x])/100)+w),Math.abs(A)+Math.abs(y)>360&&(A-=.01),Math.abs(C)+Math.abs(w)>360&&(C-=.01);var S=A-y,L=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[x]:e.config.stroke.dashArray,M=i.drawPath({d:"",stroke:m,strokeWidth:n,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+x,strokeDashArray:L});if(Mi.setAttrs(M.node,{"data:angle":S,"data:value":t.series[x]}),e.config.chart.dropShadow.enabled){var P=e.config.chart.dropShadow;s.dropShadow(M,P,x)}if(s.setSelectionFilter(M,0,x),this.addListeners(M,this.radialDataLabels),b.add(M),M.attr({index:0,j:x}),this.barLabels.enabled){var I=v.polarToCartesian(t.centerX,t.centerY,t.size,y),T=this.barLabels.formatter(e.globals.seriesNames[x],{seriesIndex:x,w:e}),z=["apexcharts-radialbar-label"];this.barLabels.onClick||z.push("apexcharts-no-click");var X=this.barLabels.useSeriesColors?e.globals.colors[x]:e.config.chart.foreColor;X||(X=e.config.chart.foreColor);var R=I.x+this.barLabels.offsetX,Y=I.y+this.barLabels.offsetY,E=i.drawText({x:R,y:Y,text:T,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:X,cssClass:z.join(" ")});E.on("click",this.onBarLabelClick),E.attr({rel:x+1}),0!==y&&E.attr({"transform-origin":"".concat(R," ").concat(Y),transform:"rotate(".concat(y," 0 0)")}),b.add(E)}var H=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(H=e.config.chart.animations.speed),e.globals.dataChanged&&(H=e.config.chart.animations.dynamicAnimation.speed),this.animDur=H/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(M,{centerX:t.centerX,centerY:t.centerY,endAngle:A,startAngle:y,prevEndAngle:C,prevStartAngle:w,size:t.size,i:x,totalItems:2,animBeginArr:this.animBeginArr,dur:H,shouldSetPrevPaths:!0})}return{g:r,elHollow:c,dataLabels:g}}},{key:"drawHollow",value:function(t){var e=new Mi(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,a){var s=this.w,r=new ji(this.ctx),n=v.randomId(),o=s.config.plotOptions.radialBar.hollow.image;if(s.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:o,patternID:"pattern".concat(s.globals.cuid).concat(n)}),a="url(#pattern".concat(s.globals.cuid).concat(n,")");else{var l=s.config.plotOptions.radialBar.hollow.imageWidth,h=s.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===h){var c=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-e.width/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+s.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(c)}else{var d=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-l/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-h/2+s.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,h)}));e.add(d)}}return a}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,i=this.barLabels.onClick,a=this.w;i&&i(a.globals.seriesNames[e],{w:a,seriesIndex:e})}}]),r}(),Oa=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var s=a.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),r=0;r0&&(this.visibleI=this.visibleI+1);var x=0,b=0,m=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[g][0],m=g);var y=this.barHelpers.initialPositions();d=y.y,h=y.zeroW,c=y.x,b=y.barWidth,x=y.barHeight,n=y.xDivision,o=y.yDivision,l=y.zeroH;for(var w=a.group({class:"apexcharts-datalabels","data:realIndex":g}),k=a.group({class:"apexcharts-rangebar-goals-markers"}),A=0;A0}));return this.isHorizontal?(a=u.config.plotOptions.bar.rangeBarGroupRows?r+h*b:r+o*this.visibleI+h*b,m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(a=(o=d.barHeight/g.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+g.indexOf(p))+h*b)):(b>-1&&!u.globals.timescaleLabels.length&&(s=u.config.plotOptions.bar.rangeBarGroupRows?n+c*b:n+l*this.visibleI+c*b),m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(s=(l=d.barWidth/g.length)*this.visibleI+c*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+g.indexOf(p))+c*b)),{barYPosition:a,barXPosition:s,barHeight:o,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.xDivision,s=t.barWidth,r=t.barXPosition,n=t.zeroH,o=this.w,l=e.i,h=e.j,c=e.realIndex,d=e.translationsIndex,u=this.yRatio[d],g=this.getRangeValue(c,h),p=Math.min(g.start,g.end),f=Math.max(g.start,g.end);void 0===this.series[l][h]||null===this.series[l][h]?p=n:(p=n-p/u,f=n-f/u);var x=Math.abs(f-p),b=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:s,y1:p,y2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:c,i:c,j:h,w:o});if(o.globals.isXNumeric){var m=this.getBarXForNumericXAxis({x:i,j:h,realIndex:c,barWidth:s});i=m.x,r=m.barXPosition}else i+=a;return{pathTo:b.pathTo,pathFrom:b.pathFrom,barHeight:x,x:i,y:g.start<0&&g.end<0?p:f,goalY:this.barHelpers.getGoalValues("y",null,n,l,h,d),barXPosition:r}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,a=t.y1,s=t.y2,r=t.yDivision,n=t.barHeight,o=t.barYPosition,l=t.zeroW,h=this.w,c=e.realIndex,d=e.j,u=this.preventBarOverflow(l+a/this.invertedYRatio),g=this.preventBarOverflow(l+s/this.invertedYRatio),p=this.getRangeValue(c,d),f=Math.abs(g-u),x=this.barHelpers.getBarpaths({barYPosition:o,barHeight:n,x1:u,x2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:c,realIndex:c,j:d,w:h});return h.globals.isXNumeric||(i+=r),{pathTo:x.pathTo,pathFrom:x.pathFrom,barWidth:f,x:p.start<0&&p.end<0?u:g,goalX:this.barHelpers.getGoalValues("x",l,null,c,d),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}}]),a}(),Fa=function(){function t(e){i(this,t),this.w=e.w,this.lineCtx=e}return s(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new Pi(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,a=t.x,s=t.y,r=t.i,n=t.j,o=t.prevY,l=this.w,h=[],c=[];if(0===n){var d=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(d=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),h.push(d),c.push(v.isNumber(e[r][0])?o+l.config.markers.offsetY:null),h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null)}else h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null);return{x:h,y:c}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,a=t.realIndex,s=this.w,r=0;r0&&parseInt(n.realIndex,10)===parseInt(a,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,e=s.globals.previousPaths[r].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[r].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[r].paths[1]&&(e=s.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e,i,a,s=t.i,r=t.realIndex,n=t.series,o=t.prevY,l=t.lineYPosition,h=t.translationsIndex,c=this.w,d=c.config.chart.stacked&&!c.globals.comboCharts||c.config.chart.stacked&&c.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[r])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[r])||void 0===i?void 0:i.type));if(void 0!==(null===(a=n[s])||void 0===a?void 0:a[0]))o=(l=d&&s>0?this.lineCtx.prevSeriesY[s-1][0]:this.lineCtx.zeroY)-n[s][0]/this.lineCtx.yRatio[h]+2*(this.lineCtx.isReversed?n[s][0]/this.lineCtx.yRatio[h]:0);else if(d&&s>0&&void 0===n[s][0])for(var u=s-1;u>=0;u--)if(null!==n[u][0]&&void 0!==n[u][0]){o=l=this.lineCtx.prevSeriesY[u][0];break}return{prevY:o,lineYPosition:l}}}]),t}(),Da=function(t){for(var e,i,a,s,r=function(t){for(var e=[],i=t[0],a=t[1],s=e[0]=Wa(i,a),r=1,n=t.length-1;r9&&(s=3*a/Math.sqrt(s),r[l]=s*e,r[l+1]=s*i);for(var h=0;h<=n;h++)s=(t[Math.min(n,h+1)][0]-t[Math.max(0,h-1)][0])/(6*(1+r[h]*r[h])),o.push([s||0,r[h]*s||0]);return o},_a=function(t){var e=Da(t),i=t[1],a=t[0],s=[],r=e[1],n=e[0];s.push(a,[a[0]+n[0],a[1]+n[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(var o=2,l=e.length;o1&&a[1].length<6){var s=a[0].length;a[1]=[2*a[0][s-2]-a[0][s-4],2*a[0][s-1]-a[0][s-3]].concat(a[1])}a[0]=a[0].slice(-2)}return a};function Wa(t,e){return(e[1]-t[1])/(e[0]-t[0])}var Ba=function(){function t(e,a,s){i(this,t),this.ctx=e,this.w=e.w,this.xyRatios=a,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||s,this.scatter=new Ui(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Fa(this),this.markers=new Vi(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return s(t,[{key:"draw",value:function(t,e,i,a){var s,r=this.w,n=new Mi(this.ctx),o=r.globals.comboCharts?e:r.config.chart.type,l=n.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),h=new Pi(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=h.getLogSeries(t),this.yRatio=h.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var c=[],d=0;d1?g:0;this._initSerieVariables(t,d,g);var f=[],x=[],b=[],m=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,g),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(m=(r.globals.seriesX[g][0]-r.globals.minX)/this.xRatio),b.push(m);var v,y=m,w=void 0,k=y,A=this.zeroY,C=this.zeroY;A=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:t,prevY:A,lineYPosition:0,translationsIndex:p}).prevY,"monotoneCubic"===r.config.stroke.curve&&null===t[d][0]?f.push(null):f.push(A),v=A;"rangeArea"===o&&(w=C=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:a,prevY:C,lineYPosition:0,translationsIndex:p}).prevY,x.push(null!==f[0]?C:null));var S=this._calculatePathsFrom({type:o,series:t,i:d,realIndex:g,translationsIndex:p,prevX:k,prevY:A,prevY2:C}),L=[f[0]],M=[x[0]],P={type:o,series:t,realIndex:g,translationsIndex:p,i:d,x:m,y:1,pX:y,pY:v,pathsFrom:S,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:b,yArrj:f,y2Arrj:x,seriesRangeEnd:a},I=this._iterateOverDataPoints(u(u({},P),{},{iterations:"rangeArea"===o?t[d].length-1:void 0,isRangeStart:!0}));if("rangeArea"===o){for(var T=this._calculatePathsFrom({series:a,i:d,realIndex:g,prevX:k,prevY:C}),z=this._iterateOverDataPoints(u(u({},P),{},{series:a,xArrj:[m],yArrj:L,y2Arrj:M,pY:w,areaPaths:I.areaPaths,pathsFrom:T,iterations:a[d].length-1,isRangeStart:!1})),X=I.linePaths.length/2,R=0;R=0;Y--)l.add(c[Y]);else for(var E=0;E1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[r]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",zIndex:void 0!==a.config.series[i].zIndex?a.config.series[i].zIndex:i,seriesName:v.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i});var n=t[e].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,a,s,r=t.type,n=t.series,o=t.i,l=t.realIndex,h=t.translationsIndex,c=t.prevX,d=t.prevY,u=t.prevY2,g=this.w,p=new Mi(this.ctx);if(null===n[o][0]){for(var f=0;f0){var x=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:l});a=x.pathFromLine,s=x.pathFromArea}return{prevX:c,prevY:d,linePath:e,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(t){var e=t.type,i=t.realIndex,a=t.i,s=t.paths,r=this.w,n=new Mi(this.ctx),o=new ji(this.ctx);this.prevSeriesY.push(s.yArrj),r.globals.seriesXvalues[i]=s.xArrj,r.globals.seriesYvalues[i]=s.yArrj;var l=r.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var h=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-l.count-1],c=n.drawRect(h,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(c.node);var d=n.drawRect(0,0,h,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(d.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var g={i:a,realIndex:i,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var p=o.fillPath({seriesNumber:i}),f=0;f0&&"rangeArea"!==e){var A=n.renderPaths(w);A.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&A.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(A),A.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),k.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,i,a=this,s=t.type,r=t.series,n=t.iterations,o=t.realIndex,l=t.translationsIndex,h=t.i,c=t.x,d=t.y,u=t.pX,g=t.pY,p=t.pathsFrom,f=t.linePaths,x=t.areaPaths,b=t.seriesIndex,m=t.lineYPosition,y=t.xArrj,w=t.yArrj,k=t.y2Arrj,A=t.isRangeStart,C=t.seriesRangeEnd,S=this.w,L=new Mi(this.ctx),M=this.yRatio,P=p.prevY,I=p.linePath,T=p.areaPath,z=p.pathFromLine,X=p.pathFromArea,R=v.isNumber(S.globals.minYArr[o])?S.globals.minYArr[o]:S.globals.minY;n||(n=S.globals.dataPoints>1?S.globals.dataPoints-1:S.globals.dataPoints);var Y=function(t,e){return e-t/M[l]+2*(a.isReversed?t/M[l]:0)},E=d,H=S.config.chart.stacked&&!S.globals.comboCharts||S.config.chart.stacked&&S.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[o])||void 0===i?void 0:i.type)),O=S.config.stroke.curve;Array.isArray(O)&&(O=Array.isArray(b)?O[b[h]]:O[h]);for(var F,D=0,_=0;_0&&S.globals.collapsedSeries.length0;e--){if(!(S.globals.collapsedSeriesIndices.indexOf((null==b?void 0:b[e])||e)>-1))return e;e--}return 0}(h-1)][_+1]}else m=this.zeroY;else m=this.zeroY;N?d=Y(R,m):(d=Y(r[h][_+1],m),"rangeArea"===s&&(E=Y(C[h][_+1],m))),y.push(c),!N||"smooth"!==S.config.stroke.curve&&"monotoneCubic"!==S.config.stroke.curve?(w.push(d),k.push(E)):(w.push(null),k.push(null));var B=this.lineHelpers.calculatePoints({series:r,x:c,y:d,realIndex:o,i:h,j:_,prevY:P}),G=this._createPaths({type:s,series:r,i:h,realIndex:o,j:_,x:c,y:d,y2:E,xArrj:y,yArrj:w,y2Arrj:k,pX:u,pY:g,pathState:D,segmentStartX:F,linePath:I,areaPath:T,linePaths:f,areaPaths:x,curve:O,isRangeStart:A});x=G.areaPaths,f=G.linePaths,u=G.pX,g=G.pY,D=G.pathState,F=G.segmentStartX,T=G.areaPath,I=G.linePath,!this.appendPathFrom||S.globals.hasNullValues||"monotoneCubic"===O&&"rangeArea"===s||(z+=L.line(c,this.areaBottomY),X+=L.line(c,this.areaBottomY)),this.handleNullDataPoints(r,B,h,_,o),this._handleMarkersAndLabels({type:s,pointsPos:B,i:h,j:_,realIndex:o,isRangeStart:A})}return{yArrj:w,xArrj:y,pathFromArea:X,areaPaths:x,pathFromLine:z,linePaths:f,linePath:I,areaPath:T}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,i=t.pointsPos,a=t.isRangeStart,s=t.i,r=t.j,n=t.realIndex,o=this.w,l=new qi(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var h=this.markers.plotChartMarkers(i,n,r+1);null!==h&&this.elPointsMain.add(h)}var c=l.drawDataLabel({type:e,isRangeStart:a,pos:i,i:n,j:r+1});null!==c&&this.elDataLabelsWrap.add(c)}},{key:"_createPaths",value:function(t){var e=t.type,i=t.series,a=t.i;t.realIndex;var s,r=t.j,n=t.x,o=t.y,l=t.xArrj,h=t.yArrj,c=t.y2,d=t.y2Arrj,u=t.pX,g=t.pY,p=t.pathState,f=t.segmentStartX,x=t.linePath,b=t.areaPath,m=t.linePaths,v=t.areaPaths,y=t.curve,w=t.isRangeStart,k=new Mi(this.ctx),A=this.areaBottomY,C="rangeArea"===e,S="rangeArea"===e&&w;switch(y){case"monotoneCubic":var L=w?h:d;switch(p){case 0:if(null===L[r+1])break;p=1;case 1:if(!(C?l.length===i[a].length:r===i[a].length-2))break;case 2:var M=w?l:l.slice().reverse(),P=w?L:L.slice().reverse(),I=(s=P,M.map((function(t,e){return[t,s[e]]})).filter((function(t){return null!==t[1]}))),T=I.length>1?_a(I):I,z=[];C&&(S?v=I:z=v.reverse());var X=0,R=0;if(function(t,e){for(var i=function(t){var e=[],i=0;return t.forEach((function(t){null!==t?i++:i>0&&(e.push(i),i=0)})),i>0&&e.push(i),e}(t),a=[],s=0,r=0;s4?(e+="C".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]),e+=", ".concat(a[4],", ").concat(a[5])):s>2&&(e+="S".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]))}return e}(t),i=R,a=(R+=t.length)-1;S?x=k.move(I[i][0],I[i][1])+e:C?x=k.move(z[i][0],z[i][1])+k.line(I[i][0],I[i][1])+e+k.line(z[a][0],z[a][1]):(x=k.move(I[i][0],I[i][1])+e,b=x+k.line(I[a][0],A)+k.line(I[i][0],A)+"z",v.push(b)),m.push(x)})),C&&X>1&&!S){var Y=m.slice(X).reverse();m.splice(X),Y.forEach((function(t){return m.push(t)}))}p=0}break;case"smooth":var E=.35*(n-u);if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.curve(n,o,n,o,n,c)+k.move(n,c)),b+=k.curve(n,o,n,o,n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o;break;default:var F=function(t,e,i){var a=[];switch(t){case"stepline":a=k.line(e,null,"H")+k.line(null,i,"V");break;case"linestep":a=k.line(null,i,"V")+k.line(e,null,"H");break;case"straight":a=k.line(e,i)}return a};if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.line(n,c)),b+=k.line(n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o}return{linePaths:m,areaPaths:v,pX:u,pY:g,pathState:p,segmentStartX:f,linePath:x,areaPath:b}}},{key:"handleNullDataPoints",value:function(t,e,i,a,s){var r=this.w;if(null===t[i][a]&&r.config.markers.showNullDataPoints||1===t[i].length){var n=this.strokeWidth-r.config.markers.strokeWidth/2;n>0||(n=0);var o=this.markers.plotChartMarkers(e,s,a+1,n,!0);null!==o&&this.elPointsMain.add(o)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,a,s){this.xoffset=e,this.yoffset=i,this.height=s,this.width=a,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],a=this.xoffset,s=this.yoffset,n=r(t)/this.height,o=r(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var a=e/this.height,s=this.width-a;i=new t(this.xoffset+a,this.yoffset,s,this.height)}else{var r=e/this.width,n=this.height-r;i=new t(this.xoffset,this.yoffset+r,this.width,n)}return i}}function e(e,a,s,n,o){n=void 0===n?0:n,o=void 0===o?0:o;var l=i(function(t,e){var i,a=[],s=e/r(t);for(i=0;i=n}(e,l=t[0],o)?(e.push(l),i(t.slice(1),e,s,n)):(h=s.cutArea(r(e),n),n.push(s.getCoordinates(e)),i(t,[],h,n)),n;n.push(s.getCoordinates(e))}function a(t,e){var i=Math.min.apply(Math,t),a=Math.max.apply(Math,t),s=r(t);return Math.max(Math.pow(e,2)*a/Math.pow(s,2),Math.pow(s,2)/(Math.pow(e,2)*i))}function s(t){return t&&t.constructor===Array}function r(t){var e,i=0;for(e=0;er-a&&l.width<=n-s){var h=o.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(h.x," ").concat(h.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,i,a,s,r){var n=new Mi(this.ctx),o=n.getTextRects(t,e).width+this.w.config.stroke.width+5>s-i&&r-a>s-i?r-a:s-i,l=n.getTextBasedOnMaxWidth({text:t,maxWidth:o,fontSize:e});return t.length!==l.length&&o/e<5?"":l}},{key:"animateTreemap",value:function(t,e,i,a){var s=new y(this.ctx);s.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,(function(){s.animationCompleted(t)}))}}]),t}(),ja=86400,Va=10/ja,Ua=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return s(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new zi(this.ctx),r=(e-t)/864e5;this.determineInterval(r),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,r5e4&&(a.globals.disableZoomOut=!0);var n=s.getTimeUnitsfromTimestamp(t,e,this.utc),o=a.globals.gridWidth/r,l=o/24,h=l/60,c=h/60,d=Math.floor(24*r),g=Math.floor(1440*r),p=Math.floor(r*ja),f=Math.floor(r),x=Math.floor(r/30),b=Math.floor(r/365),m={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},v={firstVal:m,currentMillisecond:m.minMillisecond,currentSecond:m.minSecond,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:l,minutesWidthOnXAxis:h,secondsWidthOnXAxis:c,numberOfSeconds:p,numberOfMinutes:g,numberOfHours:d,numberOfDays:f,numberOfMonths:x,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var y=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?u(u({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?u(u({},e),{},{value:t.value}):"minute"===t.unit?u(u({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?u(u({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return y.filter((function(t){var e=1,s=Math.ceil(a.globals.gridWidth/120),r=t.value;void 0!==a.config.xaxis.tickAmount&&(s=a.config.xaxis.tickAmount),y.length>s&&(e=Math.floor(y.length/s));var n=!1,o=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(n=!0);break;case"half_year":e=7,"year"===t.unit&&(n=!0);break;case"months":e=1,"year"===t.unit&&(n=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(n=!0),30===r&&(o=!0);break;case"months_days":e=10,"month"===t.unit&&(n=!0),30===r&&(o=!0);break;case"week_days":e=8,"month"===t.unit&&(n=!0);break;case"days":e=1,"month"===t.unit&&(n=!0);break;case"hours":"day"===t.unit&&(n=!0);break;case"minutes_fives":case"seconds_fives":r%5!=0&&(o=!0);break;case"seconds_tens":r%10!=0&&(o=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!o)return!0}else if((r%e==0||n)&&!o)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,a=this.formatDates(t),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new pa(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.daysWidthOnXAxis,r=t.numberOfYears,n=e.minYear,o=0,l=new zi(this.ctx),h="year";if(e.minDate>1||e.minMonth>0){var c=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(l.determineDaysOfYear(e.minYear)-c+1)*s,n=e.minYear+1,this.timeScaleArray.push({position:o,value:n,unit:h,year:n,month:v.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:o,value:n,unit:h,year:a,month:v.monthMod(i+1)});for(var d=n,u=o,g=0;g1){l=(h.determineDaysOfMonths(a+1,e.minYear)-i+1)*r,o=v.monthMod(a+1);var u=s+d,g=v.monthMod(o),p=o;0===o&&(c="year",p=u,g=1,u+=d+=1),this.timeScaleArray.push({position:l,value:p,unit:c,year:u,month:g})}else this.timeScaleArray.push({position:l,value:o,unit:c,year:s,month:v.monthMod(a)});for(var f=o+1,x=l,b=0,m=1;bn.determineDaysOfMonths(e+1,i)?(h=1,o="month",u=e+=1,e):e},d=(24-e.minHour)*s,u=l,g=c(h,i,a);0===e.minHour&&1===e.minDate?(d=0,u=v.monthMod(e.minMonth),o="month",h=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(d=0,l=e.minDate,u=l,g=c(h=l,i,a)),this.timeScaleArray.push({position:d,value:u,unit:o,year:this._getYear(a,g,0),month:v.monthMod(g),day:h});for(var p=d,f=0;fo.determineDaysOfMonths(e+1,s)&&(f=1,e+=1),{month:e,date:f}},c=function(t,e){return t>o.determineDaysOfMonths(e+1,s)?e+=1:e},d=60-(e.minMinute+e.minSecond/60),u=d*r,g=e.minHour+1,p=g;60===d&&(u=0,p=g=e.minHour);var f=i;p>=24&&(p=0,l="day",g=f+=1);var x=h(f,a).month;x=c(f,x),this.timeScaleArray.push({position:u,value:g,unit:l,day:f,hour:p,year:s,month:v.monthMod(x)}),p++;for(var b=u,m=0;m=24)p=0,l="day",x=h(f+=1,x).month,x=c(f,x);var y=this._getYear(s,x,0);b=60*r+b;var w=0===p?f:p;this.timeScaleArray.push({position:b,value:w,unit:l,hour:p,day:f,year:y,month:v.monthMod(x)}),p++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.minutesWidthOnXAxis,h=t.secondsWidthOnXAxis,c=t.numberOfMinutes,d=a+1,u=r,g=n,p=o,f=s,x=(60-i-e/1e3)*h,b=0;b=60&&(d=0,24===(f+=1)&&(f=0)),this.timeScaleArray.push({position:x,value:d,unit:"minute",hour:f,minute:d,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,d++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.secondsWidthOnXAxis,h=t.numberOfSeconds,c=i+1,d=a,u=r,g=n,p=o,f=s,x=(1e3-e)/1e3*l,b=0;b=60&&(c=0,++d>=60&&(d=0,24===++f&&(f=0))),this.timeScaleArray.push({position:x,value:c,unit:"second",hour:f,minute:d,second:c,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,c++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var a=t.value.toString(),s=new zi(e.ctx),r=e.createRawDateString(t,a),n=s.getDate(s.parseDate(r));if(e.utc||(n=s.getDate(s.parseDateWithTimezone(r))),void 0===i.config.xaxis.labels.format){var o="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(o=l.year),"month"===t.unit&&(o=l.month),"day"===t.unit&&(o=l.day),"hour"===t.unit&&(o=l.hour),"minute"===t.unit&&(o=l.minute),"second"===t.unit&&(o=l.second),a=s.formatDate(n,o)}else a=s.formatDate(n,i.config.xaxis.labels.format);return{dateString:r,position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,a=new Mi(this.ctx),s=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(s=!0,e=a.getTextRects(t[0].value).width);var r=0,n=t.map((function(n,o){if(o>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=s?e:a.getTextRects(t[r].value).width,h=t[r].position;return n.position>h+l+10?(r=o,n):null}return n}));return n=n.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),qa=function(){function t(e,a){i(this,t),this.ctx=a,this.w=a.w,this.el=e}return s(t,[{key:"setupElements",value:function(){var t=this.w,e=t.globals,i=t.config,a=i.chart.type;e.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(a),e.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(a),e.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(a)&&i.plotOptions.bar.horizontal,e.chartClass=".apexcharts".concat(e.chartID),e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),Mi.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas ".concat(e.chartClass.substring(1))}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=window.SVG().addTo(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(i.chart.offsetX,", ").concat(i.chart.offsetY,")")}),e.dom.Paper.node.style.background="dark"!==i.theme.mode||i.chart.background?"light"!==i.theme.mode||i.chart.background?i.chart.background:"#fff":"#424242",this.setSVGDimensions(),e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject"),Mi.setAttrs(e.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap),e.dom.Paper.node.appendChild(e.dom.elLegendForeign),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,a=this.ctx,s=i.config,r=i.globals,n={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},o=s.chart.type||"line",l=null,h=0;r.series.forEach((function(e,a){var s=t[a].type||o;n[s]?("rangeArea"===s?(n[s].series.push(r.seriesRangeStart[a]),n[s].seriesRangeEnd.push(r.seriesRangeEnd[a])):n[s].series.push(e),n[s].i.push(a),"column"!==s&&"bar"!==s||(i.globals.columnSeries=n.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(s)?l=s:"bar"===s?(n.column.series.push(e),n.column.i.push(a)):console.warn("You have specified an unrecognized series type (".concat(s,").")),o!==s&&"scatter"!==s&&h++})),h>0&&(l&&console.warn("Chart or series type ".concat(l," cannot appear with other chart or series types.")),n.column.series.length>0&&s.plotOptions.bar.horizontal&&(h-=n.column.series.length,n.column={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||(r.comboCharts=h>0);var c=new Ba(a,e),d=new Ta(a,e);a.pie=new Ya(a);var u=new Ha(a);a.rangeBar=new Oa(a,e);var g=new Ea(a),p=[];if(r.comboCharts){var x,b,m=new Pi(a);if(n.area.series.length>0)(x=p).push.apply(x,f(m.drawSeriesByGroup(n.area,r.areaGroups,"area",c)));if(n.column.series.length>0)if(s.chart.stacked){var v=new Ia(a,e);p.push(v.draw(n.column.series,n.column.i))}else a.bar=new Pa(a,e),p.push(a.bar.draw(n.column.series,n.column.i));if(n.rangeArea.series.length>0&&p.push(c.draw(n.rangeArea.series,"rangeArea",n.rangeArea.i,n.rangeArea.seriesRangeEnd)),n.line.series.length>0)(b=p).push.apply(b,f(m.drawSeriesByGroup(n.line,r.lineGroups,"line",c)));if(n.candlestick.series.length>0&&p.push(d.draw(n.candlestick.series,"candlestick",n.candlestick.i)),n.boxPlot.series.length>0&&p.push(d.draw(n.boxPlot.series,"boxPlot",n.boxPlot.i)),n.rangeBar.series.length>0&&p.push(a.rangeBar.draw(n.rangeBar.series,n.rangeBar.i)),n.scatter.series.length>0){var y=new Ba(a,e,!0);p.push(y.draw(n.scatter.series,"scatter",n.scatter.i))}if(n.bubble.series.length>0){var w=new Ba(a,e,!0);p.push(w.draw(n.bubble.series,"bubble",n.bubble.i))}}else switch(s.chart.type){case"line":p=c.draw(r.series,"line");break;case"area":p=c.draw(r.series,"area");break;case"bar":if(s.chart.stacked)p=new Ia(a,e).draw(r.series);else a.bar=new Pa(a,e),p=a.bar.draw(r.series);break;case"candlestick":p=new Ta(a,e).draw(r.series,"candlestick");break;case"boxPlot":p=new Ta(a,e).draw(r.series,s.chart.type);break;case"rangeBar":p=a.rangeBar.draw(r.series);break;case"rangeArea":p=c.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":p=new Xa(a,e).draw(r.series);break;case"treemap":p=new Ga(a,e).draw(r.series);break;case"pie":case"donut":case"polarArea":p=a.pie.draw(r.series);break;case"radialBar":p=u.draw(r.series);break;case"radar":p=g.draw(r.series);break;default:p=c.draw(r.series)}return p}},{key:"setSVGDimensions",value:function(){var t=this.w,e=t.globals,i=t.config;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto",e.svgWidth=i.chart.width,e.svgHeight=i.chart.height;var a=v.getDimensions(this.el),s=i.chart.width.toString().split(/[0-9]+/g).pop();"%"===s?v.isNumber(a[0])&&(0===a[0].width&&(a=v.getDimensions(this.el.parentNode)),e.svgWidth=a[0]*parseInt(i.chart.width,10)/100):"px"!==s&&""!==s||(e.svgWidth=parseInt(i.chart.width,10));var r=String(i.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===r){var n=v.getDimensions(this.el.parentNode);e.svgHeight=n[1]*parseInt(i.chart.height,10)/100}else e.svgHeight=parseInt(i.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Mi.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==r){var o=i.chart.sparkline.enabled?0:e.axisCharts?i.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(e.svgHeight+o,"px")}e.dom.elWrap.style.width="".concat(e.svgWidth,"px"),e.dom.elWrap.style.height="".concat(e.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i=t.translateX;Mi.setAttrs(t.dom.elGraphical.node,{transform:"translate(".concat(i,", ").concat(e,")")})}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,a=t.config.chart.sparkline.enabled?1:15;a+=t.config.grid.padding.bottom,["top","bottom"].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(i=new xa(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var s=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*t.globals.radialSize;if(s&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var n=v.getBoundingClientRect(s);r=n.bottom;var o=n.bottom-n.top;r=Math.max(2.05*t.globals.radialSize,o)}var l=Math.ceil(r+e.translateY+i+a);e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).includes("%")||(e.dom.elWrap.style.height="".concat(l,"px"),Mi.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(l,"px"))}},{key:"coreCalculations",value:function(){new ea(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(){return[]}))},i=new Bi,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=e(),a.seriesYvalues=e()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var t=this.w,e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new na(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new na(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Ua(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new Pi(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var i=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];i.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){return t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){return t.updateSourceChart(i)})})),e.config.chart.events.selection=function(t,e){i.forEach((function(t){ApexCharts.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:e.xaxis.min,max:e.xaxis.max}},!1,!1,!1,!1)}))}}}}]),t}(),Za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"_updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(n){var o=[e.ctx];s&&(o=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(o=[e.ctx],e.ctx.w.globals.isExecCalled=!1),o.forEach((function(s,l){var h=s.w;if(h.globals.shouldAnimate=a,i||(h.globals.resized=!0,h.globals.dataChanged=!0,a&&s.series.getPreviousPaths()),t&&"object"===b(t)&&(s.config=new Wi(t),t=Pi.extendArrayProps(s.config,t,h),s.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,h.config=v.extend(h.config,t),r&&(h.globals.lastXAxis=t.xaxis?v.clone(t.xaxis):[],h.globals.lastYAxis=t.yaxis?v.clone(t.yaxis):[],h.globals.initialConfig=v.extend({},h.config),h.globals.initialSeries=v.clone(h.config.series),t.series))){for(var c=0;c2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(s){var r,n=i.w;return n.globals.shouldAnimate=e,n.globals.dataChanged=!0,e&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?(0===(r=t.map((function(t,e){return i._extendSeries(t,e)}))).length&&(r=[{data:[]}]),n.config.series=r):n.config.series=t.slice(),a&&(n.globals.initialConfig.series=v.clone(n.config.series),n.globals.initialSeries=v.clone(n.config.series)),i.ctx.update().then((function(){s(i.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var i=this.w,a=i.config.series[e];return u(u({},i.config.series[e]),{},{name:t.name?t.name:null==a?void 0:a.name,color:t.color?t.color:null==a?void 0:a.color,type:t.type?t.type:null==a?void 0:a.type,group:t.group?t.group:null==a?void 0:a.group,hidden:void 0!==t.hidden?t.hidden:null==a?void 0:a.hidden,data:t.data?t.data:null==a?void 0:a.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(e,"'], ").concat(s," circle[j='").concat(e,"'], ").concat(s," rect[j='").concat(e,"']")):void 0===e&&(a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(t,"']")),"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),a?(new Mi(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new Ni(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;t&&t.xaxis&&(a=t.xaxis),t&&t.yaxis&&(s=t.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;var r=function(t){void 0!==s[t]&&(i.config.yaxis[t].min=s[t].min,i.config.yaxis[t].max=s[t].max)};i.config.yaxis.map((function(t,a){i.globals.zoomed||void 0!==s[a]?r(a):void 0!==e.ctx.opts.yaxis[a]&&(t.min=e.ctx.opts.yaxis[a].min,t.max=e.ctx.opts.yaxis[a].max)}))}}]),t}();!function(){function t(){for(var t=arguments.length>0&&arguments[0]!==h?arguments[0]:[],s=arguments.length>1?arguments[1]:h,r=arguments.length>2?arguments[2]:h,n=arguments.length>3?arguments[3]:h,o=arguments.length>4?arguments[4]:h,l=arguments.length>5?arguments[5]:h,h=arguments.length>6?arguments[6]:h,c=t.slice(s,r||h),d=n.slice(o,l||h),u=0,g={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};;){if(c[u]=e.call(g,c[u]),d[u]=e.call(p,d[u]),c[u][0]!=d[u][0]||"M"==c[u][0]||"A"==c[u][0]&&(c[u][4]!=d[u][4]||c[u][5]!=d[u][5])?(Array.prototype.splice.apply(c,[u,1].concat(a.call(g,c[u]))),Array.prototype.splice.apply(d,[u,1].concat(a.call(p,d[u])))):(c[u]=i.call(g,c[u]),d[u]=i.call(p,d[u])),++u==c.length&&u==d.length)break;u==c.length&&c.push(["C",g.pos[0],g.pos[1],g.pos[0],g.pos[1],g.pos[0],g.pos[1]]),u==d.length&&d.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]])}return{start:c,dest:d}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function i(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function a(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var i,a,s,r,n,o,l,h,c,d,u,g,p,f,x,b,m,v,y,w,k,A,C,S,L,M,P=Math.abs(e[1]),I=Math.abs(e[2]),T=e[3]%360,z=e[4],X=e[5],R=e[6],Y=e[7],E=new bt(t),H=new bt(R,Y),O=[];if(0===P||0===I||E.x===H.x&&E.y===H.y)return[["C",E.x,E.y,H.x,H.y,H.x,H.y]];i=new bt((E.x-H.x)/2,(E.y-H.y)/2).transform((new vt).rotate(T)),a=i.x*i.x/(P*P)+i.y*i.y/(I*I),a>1&&(P*=a=Math.sqrt(a),I*=a);s=(new vt).rotate(T).scale(1/P,1/I).rotate(-T),E=E.transform(s),H=H.transform(s),r=[H.x-E.x,H.y-E.y],o=r[0]*r[0]+r[1]*r[1],n=Math.sqrt(o),r[0]/=n,r[1]/=n,l=o<4?Math.sqrt(1-o/4):0,z===X&&(l*=-1);h=new bt((H.x+E.x)/2+l*-r[1],(H.y+E.y)/2+l*r[0]),c=new bt(E.x-h.x,E.y-h.y),d=new bt(H.x-h.x,H.y-h.y),u=Math.acos(c.x/Math.sqrt(c.x*c.x+c.y*c.y)),c.y<0&&(u*=-1);g=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(g*=-1);X&&u>g&&(g+=2*Math.PI);!X&&u0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(!1===e)return!1;for(var i=e,a=t.length;i(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class Ja{constructor(t){t.remember("_draggable",this),this.el=t,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(t){t?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(t){const e=!t.type.indexOf("mouse");if(e&&1!==t.which&&0!==t.buttons)return;if(this.el.dispatch("beforedrag",{event:t,handler:this}).defaultPrevented)return;t.preventDefault(),t.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point($a(t));const i=(e?"mouseup":"touchend")+".drag";zt(window,(e?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),zt(window,i,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:t,handler:this,box:this.box})}drag(t){const{box:e,lastClick:i}=this,a=this.el.point($a(t)),s=a.x-i.x,r=a.y-i.y;if(!s&&!r)return e;const n=e.x+s,o=e.y+r;this.box=new kt(n,o,e.w,e.h),this.lastClick=a,this.el.dispatch("dragmove",{event:t,handler:this,box:this.box}).defaultPrevented||this.move(n,o)}move(t,e){"svg"===this.el.type?gi.prototype.move.call(this.el,t,e):this.el.move(t,e)}endDrag(t){this.drag(t),this.el.fire("dragend",{event:t,handler:this,box:this.box}),Xt(window,"mousemove.drag"),Xt(window,"touchmove.drag"),Xt(window,"mouseup.drag"),Xt(window,"touchend.drag"),this.init(!0)}} +function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=Array(e);i=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,n=!0,o=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){o=!0,r=t},f:function(){try{n||null==i.return||i.return()}finally{if(o)throw r}}}}function n(t){var i=c();return function(){var a,s=l(t);if(i){var r=l(this).constructor;a=Reflect.construct(s,arguments,r)}else a=s.apply(this,arguments);return function(t,i){if(i&&("object"==typeof i||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return e(t)}(this,a)}}function o(t,e,i){return(e=x(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function d(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function u(t){for(var e=1;e>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-r)*s)+r)+256*(Math.round((a-n)*s)+n)+(Math.round((a-o)*s)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,i){return t.isColorHex(i)?this.shadeHexColor(e,i):this.shadeRGBColor(e,i)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===b(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,i=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var i="",a=t<0?"-":"",s=e[0].replace(".",""),r=Number(e[1])+1;if(r<0){for(i=a+"0.";r++;)i+="0";return i+s.replace(/^-/,"")}for(r-=s.length;r--;)i+="0";return s+i}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),i=t.clientHeight,a=t.clientWidth;return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[a-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),i]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:"x",i=t.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,i){if(i>=t.length)for(var a=i-t.length+1;a--;)t.push(void 0);return t.splice(i,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style.key=e[i])}},{key:"preciseAddition",value:function(t,e){var i=(String(t).split(".")[1]||"").length,a=(String(e).split(".")[1]||"").length,s=Math.pow(10,Math.max(i,a));return(Math.round(t*s)+Math.round(e*s))/s}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*a),e=Math.round(Math.abs(e)*a);e;){var s=e;e=t%e,t=s}return t/a}},{key:"getPrimeFactors",value:function(t){for(var e=[],i=2;t>=2;)t%i==0?(e.push(i),t/=i):i++;return e}},{key:"mod",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*a))%(e=Math.round(Math.abs(e)*a))/a}}]),t}(),y=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"animateLine",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animateMarker",value:function(t,e,i,a){t.attr({opacity:0}).animate(e).attr({opacity:1}).after((function(){a()}))}},{key:"animateRect",value:function(t,e,i,a,s){t.attr(e).animate(a).attr(i).after((function(){return s()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.realIndex,a=t.j,s=t.fill,r=t.pathFrom,n=t.pathTo,o=t.speed,l=t.delay,h=this.w,c=0;h.config.chart.animations.animateGradually.enabled&&(c=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&"bar"!==h.config.chart.type&&(c=0),this.morphSVG(e,i,a,"line"!==h.config.chart.type||h.globals.comboCharts?s:"stroke",r,n,o,l*c)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){var e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,i,a,s,r,n,o){var l=this,h=this.w;s||(s=t.attr("pathFrom")),r||(r=t.attr("pathTo"));var c=function(t){return"radar"===h.config.chart.type&&(n=1),"M 0 ".concat(h.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=c()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=c()),h.globals.shouldAnimate||(n=1),t.plot(s).animate(1,o).plot(s).animate(n,o).plot(r).after((function(){v.isNumber(i)?i===h.globals.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&l.animationCompleted(t):"none"!==a&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&e===h.globals.series.length-1||h.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}]),t}();const w={},k=[];function A(t,e){if(Array.isArray(t))for(const i of t)A(i,e);else if("object"!=typeof t)S(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(const e in t)A(e,t[e])}function C(t){return w[t]||{}}function S(t){k.push(...t)}function L(t,e){let i;const a=t.length,s=[];for(i=0;iz.has(t.nodeName),R=(t,e,i={})=>{const a={...e};for(const t in a)a[t].valueOf()===i[t]&&delete a[t];Object.keys(a).length?t.node.setAttribute("data-svgjs",JSON.stringify(a)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},E="http://www.w3.org/2000/svg",Y="http://www.w3.org/2000/xmlns/",H="http://www.w3.org/1999/xlink",O={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function F(){return O.window}let D=class{};const _={},N="___SYMBOL___ROOT___";function W(t,e=E){return O.document.createElementNS(e,t)}function B(t,e=!1){if(t instanceof D)return t;if("object"==typeof t)return U(t);if(null==t)return new _[N];if("string"==typeof t&&"<"!==t.charAt(0))return U(O.document.querySelector(t));const i=e?O.document.createElement("div"):W("svg");return i.innerHTML=t,t=U(i.firstChild),i.removeChild(i.firstChild),t}function G(t,e){return e&&(e instanceof O.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:W(t)}function V(t){if(!t)return null;if(t.instance instanceof D)return t.instance;if("#document-fragment"===t.nodeName)return new _.Fragment(t);let e=P(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":_[e]||(e="Dom"),new _[e](t)}let U=V;function q(t,e=t.name,i=!1){return _[e]=t,i&&(_[N]=t),S(Object.getOwnPropertyNames(t.prototype)),t}let Z=1e3;function $(t){return"Svgjs"+P(t)+Z++}function J(t){for(let e=t.children.length-1;e>=0;e--)J(t.children[e]);return t.id?(t.id=$(t.nodeName),t):t}function Q(t,e){let i,a;for(a=(t=Array.isArray(t)?t:[t]).length-1;a>=0;a--)for(i in e)t[a].prototype[i]=e[i]}function K(t){return function(...e){const i=e[e.length-1];return!i||i.constructor!==Object||i instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(i)}}A("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=B(t)).before(this),this},insertAfter:function(t){return(t=B(t)).after(this),this}});const tt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,et=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,it=/rgb\((\d+),(\d+),(\d+)\)/,at=/(#[a-z_][a-z0-9\-_]*)/i,st=/\)\s*,?\s*/,rt=/\s/g,nt=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ot=/^rgb\(/,lt=/^(\s+)?$/,ht=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ct=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,dt=/[\s,]+/,ut=/[MLHVCSQTAZ]/i;function gt(t){const e=Math.round(t),i=Math.max(0,Math.min(255,e)).toString(16);return 1===i.length?"0"+i:i}function pt(t,e){for(let i=e.length;i--;)if(null==t[e[i]])return!1;return!0}function ft(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}A("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(dt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),A("Dom",{css:function(t,e){const i={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);i[e[0]]=e[1]})),i;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;i[e]=this.node.style.getPropertyValue(t)}return i}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||lt.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||lt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),A("Dom",{data:function(t,e,i){if(null==t)return this.data(L(function(t,e){let i;const a=t.length,s=[];for(i=0;i0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const i of t)e[i]=this.data(i);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===i||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),A("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class xt{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof xt||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:i,round:a,sin:s,PI:r}=Math;if("vibrant"===t){const t=24*i()+57,e=38*i()+45,a=360*i();return new xt(t,e,a,"lch")}if("sine"===t){const t=a(80*s(2*r*(e=null==e?i():e)/.5+.01)+150),n=a(50*s(2*r*e/.5+4.6)+200),o=a(100*s(2*r*e/.5+2.3)+150);return new xt(t,n,o)}if("pastel"===t){const t=8*i()+86,e=17*i()+9,a=360*i();return new xt(t,e,a,"lch")}if("dark"===t){const t=10+10*i(),e=50*i()+86,a=360*i();return new xt(t,e,a,"lch")}if("rgb"===t){const t=255*i(),e=255*i(),a=255*i();return new xt(t,e,a)}if("lab"===t){const t=100*i(),e=256*i()-128,a=256*i()-128;return new xt(t,e,a,"lab")}if("grey"===t){const t=255*i();return new xt(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(nt.test(t)||ot.test(t))}cmyk(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.min(1-a,1-s,1-r);if(1===n)return new xt(0,0,0,1,"cmyk");return new xt((1-a-n)/(1-n),(1-s-n)/(1-n),(1-r-n)/(1-n),n,"cmyk")}hsl(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.max(a,s,r),o=Math.min(a,s,r),l=(n+o)/2,h=n===o,c=n-o;return new xt(360*(h?0:n===a?((s-r)/c+(s.5?c/(2-n-o):c/(n+o)),100*l,"hsl")}init(t=0,e=0,i=0,a=0,s="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)s="string"==typeof a?a:s,a="string"==typeof a?0:a,Object.assign(this,{_a:t,_b:e,_c:i,_d:a,space:s});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const i=function(t,e){const i=pt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:pt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:pt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:pt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:pt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:pt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return i.space=e||i.space,i}(t,e);Object.assign(this,i)}else if("string"==typeof t)if(ot.test(t)){const e=t.replace(rt,""),[i,a,s]=it.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}else{if(!nt.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,i,a,s]=et.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}}const{_a:r,_b:n,_c:o,_d:l}=this,h="rgb"===this.space?{r:r,g:n,b:o}:"xyz"===this.space?{x:r,y:n,z:o}:"hsl"===this.space?{h:r,s:n,l:o}:"lab"===this.space?{l:r,a:n,b:o}:"lch"===this.space?{l:r,c:n,h:o}:"cmyk"===this.space?{c:r,m:n,y:o,k:l}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:i}=this.xyz();return new xt(116*e-16,500*(t-e),200*(e-i),"lab")}lch(){const{l:t,a:e,b:i}=this.lab(),a=Math.sqrt(e**2+i**2);let s=180*Math.atan2(i,e)/Math.PI;s<0&&(s*=-1,s=360-s);return new xt(t,a,s,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:a,a:s,b:r}=this;if("lch"===this.space){const{c:t,h:e}=this,i=Math.PI/180;s=t*Math.cos(i*e),r=t*Math.sin(i*e)}const n=(a+16)/116,o=s/500+n,l=n-r/200,h=16/116,c=.008856,d=7.787;t=.95047*(o**3>c?o**3:(o-h)/d),e=1*(n**3>c?n**3:(n-h)/d),i=1.08883*(l**3>c?l**3:(l-h)/d)}const a=3.2406*t+-1.5372*e+-.4986*i,s=-.9689*t+1.8758*e+.0415*i,r=.0557*t+-.204*e+1.057*i,n=Math.pow,o=.0031308,l=a>o?1.055*n(a,1/2.4)-.055:12.92*a,h=s>o?1.055*n(s,1/2.4)-.055:12.92*s,c=r>o?1.055*n(r,1/2.4)-.055:12.92*r;return new xt(255*l,255*h,255*c)}if("hsl"===this.space){let{h:t,s:e,l:i}=this;if(t/=360,e/=100,i/=100,0===e){i*=255;return new xt(i,i,i)}const a=i<.5?i*(1+e):i+e-i*e,s=2*i-a,r=255*ft(s,a,t+1/3),n=255*ft(s,a,t),o=255*ft(s,a,t-1/3);return new xt(r,n,o)}if("cmyk"===this.space){const{c:t,m:e,y:i,k:a}=this,s=255*(1-Math.min(1,t*(1-a)+a)),r=255*(1-Math.min(1,e*(1-a)+a)),n=255*(1-Math.min(1,i*(1-a)+a));return new xt(s,r,n)}return this;var t}toArray(){const{_a:t,_b:e,_c:i,_d:a,space:s}=this;return[t,e,i,a,s]}toHex(){const[t,e,i]=this._clamped().map(gt);return`#${t}${e}${i}`}toRgb(){const[t,e,i]=this._clamped();return`rgb(${t},${e},${i})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,o=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,l=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,h=(.4124*n+.3576*o+.1805*l)/.95047,c=(.2126*n+.7152*o+.0722*l)/1,d=(.0193*n+.1192*o+.9505*l)/1.08883,u=h>.008856?Math.pow(h,1/3):7.787*h+16/116,g=c>.008856?Math.pow(c,1/3):7.787*c+16/116,p=d>.008856?Math.pow(d,1/3):7.787*d+16/116;return new xt(u,g,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:i}=this.rgb(),{max:a,min:s,round:r}=Math;return[t,e,i].map((t=>a(0,s(r(t),255))))}}class bt{constructor(...t){this.init(...t)}clone(){return new bt(this)}init(t,e){const i=0,a=0,s=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==s.x?i:s.x,this.y=null==s.y?a:s.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){vt.isMatrixLike(t)||(t=new vt(t));const{x:e,y:i}=this;return this.x=t.a*e+t.c*i+t.e,this.y=t.b*e+t.d*i+t.f,this}}function mt(t,e,i){return Math.abs(e-t)<(i||1e-6)}class vt{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,i=t.flip&&(e||"x"===t.flip)?-1:1,a=t.flip&&(e||"y"===t.flip)?-1:1,s=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,r=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,n=t.scale&&t.scale.length?t.scale[0]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleX)?t.scaleX*i:i,o=t.scale&&t.scale.length?t.scale[1]*a:isFinite(t.scale)?t.scale*a:isFinite(t.scaleY)?t.scaleY*a:a,l=t.shear||0,h=t.rotate||t.theta||0,c=new bt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),d=c.x,u=c.y,g=new bt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=g.x,f=g.y,x=new bt(t.translate||t.tx||t.translateX,t.ty||t.translateY),b=x.x,m=x.y,v=new bt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:n,scaleY:o,skewX:s,skewY:r,shear:l,theta:h,rx:v.x,ry:v.y,tx:b,ty:m,ox:d,oy:u,px:p,py:f}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,i){const a=t.a*e.a+t.c*e.b,s=t.b*e.a+t.d*e.b,r=t.a*e.c+t.c*e.d,n=t.b*e.c+t.d*e.d,o=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return i.a=a,i.b=s,i.c=r,i.d=n,i.e=o,i.f=l,i}around(t,e,i){return this.clone().aroundO(t,e,i)}aroundO(t,e,i){const a=t||0,s=e||0;return this.translateO(-a,-s).lmultiplyO(i).translateO(a,s)}clone(){return new vt(this)}decompose(t=0,e=0){const i=this.a,a=this.b,s=this.c,r=this.d,n=this.e,o=this.f,l=i*r-a*s,h=l>0?1:-1,c=h*Math.sqrt(i*i+a*a),d=Math.atan2(h*a,h*i),u=180/Math.PI*d,g=Math.cos(d),p=Math.sin(d),f=(i*s+a*r)/l,x=s*c/(f*i-a)||r*c/(f*a+i);return{scaleX:c,scaleY:x,shear:f,rotate:u,translateX:n-t+t*g*c+e*(f*g*c-p*x),translateY:o-e+t*p*c+e*(f*p*c+g*x),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new vt(t);return mt(this.a,e.a)&&mt(this.b,e.b)&&mt(this.c,e.c)&&mt(this.d,e.d)&&mt(this.e,e.e)&&mt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=vt.fromArray([1,0,0,1,0,0]);return t=t instanceof Gt?t.matrixify():"string"==typeof t?vt.fromArray(t.split(dt).map(parseFloat)):Array.isArray(t)?vt.fromArray(t):"object"==typeof t&&vt.isMatrixLike(t)?t:"object"==typeof t?(new vt).transform(t):6===arguments.length?vt.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,i=this.c,a=this.d,s=this.e,r=this.f,n=t*a-e*i;if(!n)throw new Error("Cannot invert "+this);const o=a/n,l=-e/n,h=-i/n,c=t/n,d=-(o*s+h*r),u=-(l*s+c*r);return this.a=o,this.b=l,this.c=h,this.d=c,this.e=d,this.f=u,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(this,e,this)}rotate(t,e,i){return this.clone().rotateO(t,e,i)}rotateO(t,e=0,i=0){t=M(t);const a=Math.cos(t),s=Math.sin(t),{a:r,b:n,c:o,d:l,e:h,f:c}=this;return this.a=r*a-n*s,this.b=n*a+r*s,this.c=o*a-l*s,this.d=l*a+o*s,this.e=h*a-c*s+i*s-e*a+e,this.f=c*a+h*s-e*s-i*a+i,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t);const{a:s,b:r,c:n,d:o,e:l,f:h}=this;return this.a=s*t,this.b=r*e,this.c=n*t,this.d=o*e,this.e=l*t-i*t+i,this.f=h*e-a*e+a,this}shear(t,e,i){return this.clone().shearO(t,e,i)}shearO(t,e=0,i=0){const{a:a,b:s,c:r,d:n,e:o,f:l}=this;return this.a=a+s*t,this.c=r+n*t,this.e=o+l*t-i*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t),t=M(t),e=M(e);const s=Math.tan(t),r=Math.tan(e),{a:n,b:o,c:l,d:h,e:c,f:d}=this;return this.a=n+o*s,this.b=o+n*r,this.c=l+h*s,this.d=h+l*r,this.e=c+d*s-a*s,this.f=d+c*r-i*r,this}skewX(t,e,i){return this.skew(t,0,e,i)}skewY(t,e,i){return this.skew(0,t,e,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(vt.isMatrixLike(t)){return new vt(t).multiplyO(this)}const e=vt.formatTransforms(t),{x:i,y:a}=new bt(e.ox,e.oy).transform(this),s=(new vt).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-i,-a).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(i,a);if(isFinite(e.px)||isFinite(e.py)){const t=new bt(i,a).transform(s),r=isFinite(e.px)?e.px-t.x:0,n=isFinite(e.py)?e.py-t.y:0;s.translateO(r,n)}return s.translateO(e.tx,e.ty),s}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function yt(){if(!yt.nodes){const t=B().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;yt.nodes={svg:t,path:e}}if(!yt.nodes.svg.node.parentNode){const t=O.document.body||O.document.documentElement;yt.nodes.svg.addTo(t)}return yt.nodes}function wt(t){return!(t.width||t.height||t.x||t.y)}q(vt,"Matrix");class kt{constructor(...t){this.init(...t)}addOffset(){return this.x+=O.window.pageXOffset,this.y+=O.window.pageYOffset,new kt(this)}init(t){return t="string"==typeof t?t.split(dt).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return wt(this)}merge(t){const e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),a=Math.max(this.x+this.width,t.x+t.width)-e,s=Math.max(this.y+this.height,t.y+t.height)-i;return new kt(e,i,a,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof vt||(t=new vt(t));let e=1/0,i=-1/0,a=1/0,s=-1/0;return[new bt(this.x,this.y),new bt(this.x2,this.y),new bt(this.x,this.y2),new bt(this.x2,this.y2)].forEach((function(r){r=r.transform(t),e=Math.min(e,r.x),i=Math.max(i,r.x),a=Math.min(a,r.y),s=Math.max(s,r.y)})),new kt(e,a,i-e,s-a)}}function At(t,e,i){let a;try{if(a=e(t.node),wt(a)&&((s=t.node)!==O.document&&!(O.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===O.document}).call(O.document.documentElement,s)))throw new Error("Element not in the dom")}catch(e){a=i(t)}var s;return a}A({viewbox:{viewbox(t,e,i,a){return null==t?new kt(this.attr("viewBox")):this.attr("viewBox",new kt(t,e,i,a))},zoom(t,e){let{width:i,height:a}=this.attr(["width","height"]);if((i||a)&&"string"!=typeof i&&"string"!=typeof a||(i=this.node.clientWidth,a=this.node.clientHeight),!i||!a)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const s=this.viewbox(),r=i/s.width,n=a/s.height,o=Math.min(r,n);if(null==t)return o;let l=o/t;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new bt(i/2/r+s.x,a/2/n+s.y);const h=new kt(s).transform(new vt({scale:l,origin:e}));return this.viewbox(h)}}}),q(kt,"Box");class Ct extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}Q([Ct],{each(t,...e){return"function"==typeof t?this.map(((e,i,a)=>t.call(e,e,i,a))):this.map((i=>i[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const St=["toArray","constructor","each"];function Lt(t,e){return new Ct(L((e||O.document).querySelectorAll(t),(function(t){return V(t)})))}Ct.extend=function(t){t=t.reduce(((t,e)=>(St.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),Q([Ct],t)};let Mt=0;const Pt={};function It(t){let e=t.getEventHolder();return e===O.window&&(e=Pt),e.events||(e.events={}),e.events}function Tt(t){return t.getEventTarget()}function zt(t,e,i,a,s){const r=i.bind(a||t),n=B(t),o=It(n),l=Tt(n);e=Array.isArray(e)?e:e.split(dt),i._svgjsListenerId||(i._svgjsListenerId=++Mt),e.forEach((function(t){const e=t.split(".")[0],a=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][a]=o[e][a]||{},o[e][a][i._svgjsListenerId]=r,l.addEventListener(e,r,s||!1)}))}function Xt(t,e,i,a){const s=B(t),r=It(s),n=Tt(s);("function"!=typeof i||(i=i._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(dt)).forEach((function(t){const e=t&&t.split(".")[0],o=t&&t.split(".")[1];let l,h;if(i)r[e]&&r[e][o||"*"]&&(n.removeEventListener(e,r[e][o||"*"][i],a||!1),delete r[e][o||"*"][i]);else if(e&&o){if(r[e]&&r[e][o]){for(h in r[e][o])Xt(n,[e,o].join("."),h);delete r[e][o]}}else if(o)for(t in r)for(l in r[t])o===l&&Xt(n,[t,o].join("."));else if(e){if(r[e]){for(l in r[e])Xt(n,[e,l].join("."));delete r[e]}}else{for(t in r)Xt(n,t);!function(t){let e=t.getEventHolder();e===O.window&&(e=Pt),e.events&&(e.events={})}(s)}}))}class Rt extends D{addEventListener(){}dispatch(t,e,i){return function(t,e,i,a){const s=Tt(t);return e instanceof O.window.Event||(e=new O.window.CustomEvent(e,{detail:i,cancelable:!0,...a})),s.dispatchEvent(e),e}(this,t,e,i)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const i=e[t.type];for(const e in i)for(const a in i[e])i[e][a](t);return!t.defaultPrevented}fire(t,e,i){return this.dispatch(t,e,i),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,i){return Xt(this,t,e,i),this}on(t,e,i,a){return zt(this,t,e,i,a),this}removeEventListener(){}}function Et(){}q(Rt,"EventTarget");const Yt=400,Ht=">",Ot=0,Ft={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Dt extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(dt).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class _t{constructor(...t){this.init(...t)}convert(t){return new _t(this.value,t)}divide(t){return t=new _t(t),new _t(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(tt))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof _t&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new _t(t),new _t(this-t,this.unit||t.unit)}plus(t){return t=new _t(t),new _t(this+t,this.unit||t.unit)}times(t){return t=new _t(t),new _t(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Nt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Wt=[];class Bt extends Rt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=B(t)).removeNamespace&&this.node instanceof O.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return B(t).put(this,e)}children(){return new Ct(L(this.node.children,(function(t){return V(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let i=this.node.cloneNode(t);return e&&(i=J(i)),new this.constructor(i)}each(t,e){const i=this.children();let a,s;for(a=0,s=i.length;a=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=$(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return V(this.node.lastChild)}matches(t){const e=this.node,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return i&&i.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=V(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=V(e.node.parentNode));return e}put(t,e){return t=B(t),this.add(t,e),t}putIn(t,e){return B(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=B(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const i=10**t,a=this.attr(e);for(const t in a)"number"==typeof a[t]&&(a[t]=Math.round(a[t]*i)/i);return this.attr(a),this}svg(t,e){return this.xml(t,e,E)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const i=e.index(this);return e.put(t,i).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let i=this;if(null!=t){if(i=V(i.node.cloneNode(!0)),e){const e=t(i);if(i=e||i,!1===e)return""}i.each((function(){const e=t(this),i=e||this;!1===e?this.remove():e&&this!==i&&this.replace(i)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;const a=W("wrapper",i),s=O.document.createDocumentFragment();a.innerHTML=t;for(let t=a.children.length;t--;)s.appendChild(a.firstElementChild);const r=this.parent();return e?this.replace(s)&&r:this.add(s)}}Q(Bt,{attr:function(t,e,i){if(null==t){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=ht.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ft[t]:ht.test(e)?parseFloat(e):e;"number"==typeof(e=Wt.reduce(((e,i)=>i(t,e,this)),e))?e=new _t(e):Nt.has(t)&&xt.isColor(e)?e=new xt(e):e.constructor===Array&&(e=new Dt(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return Lt(t,this.node)},findOne:function(t){return V(this.node.querySelector(t))}}),q(Bt,"Dom");class Gt extends Bt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new _t(t).plus(this.x()))}dy(t=0){return this.y(new _t(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=B(t));const i=new Ct;let a=this;for(;(a=a.parent())&&a.node!==O.document&&"#document-fragment"!==a.nodeName&&(i.push(a),e||a.node!==t.node)&&(!e||!a.matches(t));)if(a.node===this.root().node)return null;return i}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(at);return e?B(e[1]):null}root(){const t=this.parent(function(t){return _[t]}(N));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const i=I(this,t,e);return this.width(new _t(i.width)).height(new _t(i.height))}width(t){return this.attr("width",t)}writeDataToDom(){return R(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}Q(Gt,{bbox:function(){const t=At(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(yt().svg).show(),i=e.node.getBBox();return e.remove(),i}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new kt(t)},rbox:function(t){const e=At(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),i=new kt(e);return t?i.transform(t.screenCTM().inverseO()):i.addOffset()},inside:function(t,e){const i=this.bbox();return t>i.x&&e>i.y&&t=0;i--)null!=e[jt[t][i]]&&this.attr(jt.prefix(t,jt[t][i]),e[jt[t][i]]);return this},A(["Element","Runner"],e)})),A(["Element","Runner"],{matrix:function(t,e,i,a,s,r){return null==t?new vt(this):this.attr("transform",new vt(t,e,i,a,s,r))},rotate:function(t,e,i){return this.transform({rotate:t,ox:e,oy:i},!0)},skew:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:i},!0):this.transform({skew:[t,e],ox:i,oy:a},!0)},shear:function(t,e,i){return this.transform({shear:t,ox:e,oy:i},!0)},scale:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:i},!0):this.transform({scale:[t,e],ox:i,oy:a},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),A("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new _t(t)):this.rx(t).ry(e)}}),A("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new bt(this.node.getPointAtLength(t))}}),A(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});A("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),A("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){const t=(this.attr("transform")||"").split(st).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(dt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(vt.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new vt);return t},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);const i=this.screenCTM(),a=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(a.multiply(i)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new vt(this).decompose();return null==t?e:e[t]}vt.isMatrixLike(t)||(t={...t,origin:T(t,this)});const i=new vt(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});class Vt extends Gt{flatten(){return this.each((function(){if(this instanceof Vt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(i,a){return a[a.length-i-1].toParent(t,e)})),this.remove()}}q(Vt,"Container");class Ut extends Vt{constructor(t,e=t){super(G("defs",t),e)}flatten(){return this}ungroup(){return this}}q(Ut,"Defs");class qt extends Gt{}function Zt(t){return this.attr("rx",t)}function $t(t){return this.attr("ry",t)}function Jt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Qt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Kt(t){return this.attr("cx",t)}function te(t){return this.attr("cy",t)}function ee(t){return null==t?2*this.rx():this.rx(new _t(t).divide(2))}function ie(t){return null==t?2*this.ry():this.ry(new _t(t).divide(2))}q(qt,"Shape");var ae=Object.freeze({__proto__:null,cx:Kt,cy:te,height:ie,rx:Zt,ry:$t,width:ee,x:Jt,y:Qt});class se extends qt{constructor(t,e=t){super(G("ellipse",t),e)}size(t,e){const i=I(this,t,e);return this.rx(new _t(i.width).divide(2)).ry(new _t(i.height).divide(2))}}Q(se,ae),A("Container",{ellipse:K((function(t=0,e=t){return this.put(new se).size(t,e).move(0,0)}))}),q(se,"Ellipse");class re extends Bt{constructor(t=O.document.createDocumentFragment()){super(t)}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){const t=new Bt(W("wrapper",i));return t.add(this.node.cloneNode(!0)),t.xml(!1,i)}return super.xml(t,!1,i)}}function ne(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new _t(t),fy:new _t(e)}):this.attr({x1:new _t(t),y1:new _t(e)})}function oe(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new _t(t),cy:new _t(e)}):this.attr({x2:new _t(t),y2:new _t(e)})}q(re,"Fragment");var le=Object.freeze({__proto__:null,from:ne,to:oe});class he extends Vt{constructor(t,e){super(G(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,i){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}Q(he,le),A({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:K((function(t,e){return this.put(new he(t)).update(e)}))}}),q(he,"Gradient");class ce extends Vt{constructor(t,e=t){super(G("pattern",t),e)}attr(t,e,i){return"transform"===t&&(t="patternTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}A({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:K((function(t,e,i){return this.put(new ce).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),q(ce,"Pattern");let de=class extends qt{constructor(t,e=t){super(G("image",t),e)}load(t,e){if(!t)return this;const i=new O.window.Image;return zt(i,"load",(function(t){const a=this.parent(ce);0===this.width()&&0===this.height()&&this.size(i.width,i.height),a instanceof ce&&0===a.width()&&0===a.height()&&a.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),zt(i,"load error",(function(){Xt(i)})),this.attr("href",i.src=t,H)}};var ue;ue=function(t,e,i){return"fill"!==t&&"stroke"!==t||ct.test(e)&&(e=i.root().defs().image(e)),e instanceof de&&(e=i.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Wt.push(ue),A({Container:{image:K((function(t,e){return this.put(new de).size(0,0).load(t,e)}))}}),q(de,"Image");class ge extends Dt{bbox(){let t=-1/0,e=-1/0,i=1/0,a=1/0;return this.forEach((function(s){t=Math.max(s[0],t),e=Math.max(s[1],e),i=Math.min(s[0],i),a=Math.min(s[1],a)})),new kt(i,a,t-i,e-a)}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let i=this.length-1;i>=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(dt).map(parseFloat)).length%2!=0&&t.pop();for(let i=0,a=t.length;i=0;i--)a.width&&(this[i][0]=(this[i][0]-a.x)*t/a.width+a.x),a.height&&(this[i][1]=(this[i][1]-a.y)*e/a.height+a.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,i=this.length;e":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,i,a){return function(s){return s<0?t>0?e/t*s:i>0?a/i*s:0:s>1?i<1?(1-a)/(1-i)*s+(a-i)/(1-i):t<1?(1-e)/(1-t)*s+(e-t)/(1-t):1:3*s*(1-s)**2*e+3*s**2*(1-s)*a+s**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let i=t;return"none"===e?--i:"both"===e&&++i,(a,s=!1)=>{let r=Math.floor(a*t);const n=a*r%1==0;return"start"!==e&&"both"!==e||++r,s&&n&&--r,a>=0&&r<0&&(r=0),a<=1&&r>i&&(r=i),r/i}}};class ye{done(){return!1}}class we extends ye{constructor(t=Ht){super(),this.ease=ve[t]||t}step(t,e,i){return"number"!=typeof t?i<1?t:e:t+(e-t)*this.ease(i)}}class ke extends ye{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,i,a){return this.stepper(t,e,i,a)}}function Ae(){const t=(this._duration||500)/1e3,e=this._overshoot||0,i=Math.PI,a=Math.log(e/100+1e-10),s=-a/Math.sqrt(i*i+a*a),r=3.9/(s*t);this.d=2*s*r,this.k=r*r}Q(class extends ke{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;i>100&&(i=16),i/=1e3;const s=a.velocity||0,r=-this.d*s-this.k*(t-e),n=t+s*i+r*i*i/2;return a.velocity=s+r*i,a.done=Math.abs(e-n)+Math.abs(s)<.002,a.done?e:n}},{duration:me("_duration",Ae),overshoot:me("_overshoot",Ae)});Q(class extends ke{constructor(t=.1,e=.01,i=0,a=1e3){super(),this.p(t).i(e).d(i).windup(a)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;const s=e-t;let r=(a.integral||0)+s*i;const n=(s-(a.error||0))/i,o=this._windup;return!1!==o&&(r=Math.max(-o,Math.min(r,o))),a.error=s,a.integral=r,a.done=Math.abs(s)<.001,a.done?e:t+(this.P*s+this.I*r+this.D*n)}},{windup:me("_windup"),p:me("P"),i:me("I"),d:me("D")});const Ce={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Se={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Le="mlhvqtcsaz".split("");for(let t=0,e=Le.length;t=0;a--)i=this[a][0],"M"===i||"L"===i||"T"===i?(this[a][1]+=t,this[a][2]+=e):"H"===i?this[a][1]+=t:"V"===i?this[a][1]+=e:"C"===i||"S"===i||"Q"===i?(this[a][1]+=t,this[a][2]+=e,this[a][3]+=t,this[a][4]+=e,"C"===i&&(this[a][5]+=t,this[a][6]+=e)):"A"===i&&(this[a][6]+=t,this[a][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let i=0,a="";const s={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new bt,p:new bt};for(;s.lastToken=a,a=t.charAt(i++);)if(s.inSegment||!Pe(s,a))if("."!==a)if(isNaN(parseInt(a)))if(Re.has(a))s.inNumber&&Ie(s,!1);else if("-"!==a&&"+"!==a)if("E"!==a.toUpperCase()){if(ut.test(a)){if(s.inNumber)Ie(s,!1);else{if(!Me(s))throw new Error("parser Error");Te(s)}--i}}else s.number+=a,s.hasExponent=!0;else{if(s.inNumber&&!Xe(s)){Ie(s,!1),--i;continue}s.number+=a,s.inNumber=!0}else{if("0"===s.number||ze(s)){s.inNumber=!0,s.number=a,Ie(s,!0);continue}s.inNumber=!0,s.number+=a}else{if(s.pointSeen||s.hasExponent){Ie(s,!1),--i;continue}s.inNumber=!0,s.pointSeen=!0,s.number+=a}return s.inNumber&&Ie(s,!1),s.inSegment&&Me(s)&&Te(s),s.segments}(t)}size(t,e){const i=this.bbox();let a,s;for(i.width=0===i.width?1:i.width,i.height=0===i.height?1:i.height,a=this.length-1;a>=0;a--)s=this[a][0],"M"===s||"L"===s||"T"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y):"H"===s?this[a][1]=(this[a][1]-i.x)*t/i.width+i.x:"V"===s?this[a][1]=(this[a][1]-i.y)*e/i.height+i.y:"C"===s||"S"===s||"Q"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y,this[a][3]=(this[a][3]-i.x)*t/i.width+i.x,this[a][4]=(this[a][4]-i.y)*e/i.height+i.y,"C"===s&&(this[a][5]=(this[a][5]-i.x)*t/i.width+i.x,this[a][6]=(this[a][6]-i.y)*e/i.height+i.y)):"A"===s&&(this[a][1]=this[a][1]*t/i.width,this[a][2]=this[a][2]*e/i.height,this[a][6]=(this[a][6]-i.x)*t/i.width+i.x,this[a][7]=(this[a][7]-i.y)*e/i.height+i.y);return this}toString(){return function(t){let e="";for(let i=0,a=t.length;i{const e=typeof t;return"number"===e?_t:"string"===e?xt.isColor(t)?xt:dt.test(t)?ut.test(t)?Ee:Dt:tt.test(t)?_t:Oe:Ne.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Dt:"object"===e?_e:Oe};class He{constructor(t){this._stepper=t||new we("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Ye(t));let e=new this._type(t);return this._type===xt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===_e&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Oe{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Fe{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Fe.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Fe.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const De=(t,e)=>t[0]e[0]?1:0;class _e{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let i=0,a=e.length;it.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const i=e.shift(),a=e.shift(),s=e.shift(),r=e.splice(0,s);t[i]=new a(r)}return t}}const Ne=[Oe,Fe,_e];class We extends qt{constructor(t,e=t){super(G("path",t),e)}array(){return this._array||(this._array=new Ee(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Ee(t))}size(t,e){const i=I(this,t,e);return this.attr("d",this.array().size(i.width,i.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}We.prototype.MorphArray=Ee,A({Container:{path:K((function(t){return this.put(new We).plot(t||new Ee)}))}}),q(We,"Path");var Be=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new ge(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new ge(t))},size:function(t,e){const i=I(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}});class Ge extends qt{constructor(t,e=t){super(G("polygon",t),e)}}A({Container:{polygon:K((function(t){return this.put(new Ge).plot(t||new ge)}))}}),Q(Ge,fe),Q(Ge,Be),q(Ge,"Polygon");class je extends qt{constructor(t,e=t){super(G("polyline",t),e)}}A({Container:{polyline:K((function(t){return this.put(new je).plot(t||new ge)}))}}),Q(je,fe),Q(je,Be),q(je,"Polyline");class Ve extends qt{constructor(t,e=t){super(G("rect",t),e)}}Q(Ve,{rx:Zt,ry:$t}),A({Container:{rect:K((function(t,e){return this.put(new Ve).size(t,e)}))}}),q(Ve,"Rect");class Ue{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const qe={nextDraw:null,frames:new Ue,timeouts:new Ue,immediates:new Ue,timer:()=>O.window.performance||O.window.Date,transforms:[],frame(t){const e=qe.frames.push({run:t});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},timeout(t,e){e=e||0;const i=qe.timer().now()+e,a=qe.timeouts.push({run:t,time:i});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),a},immediate(t){const e=qe.immediates.push(t);return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},cancelFrame(t){null!=t&&qe.frames.remove(t)},clearTimeout(t){null!=t&&qe.timeouts.remove(t)},cancelImmediate(t){null!=t&&qe.immediates.remove(t)},_draw(t){let e=null;const i=qe.timeouts.last();for(;(e=qe.timeouts.shift())&&(t>=e.time?e.run():qe.timeouts.push(e),e!==i););let a=null;const s=qe.frames.last();for(;a!==s&&(a=qe.frames.shift());)a.run(t);let r=null;for(;r=qe.immediates.shift();)r();qe.nextDraw=qe.timeouts.first()||qe.frames.first()?O.window.requestAnimationFrame(qe._draw):null}},Ze=function(t){const e=t.start,i=t.runner.duration();return{start:e,duration:i,end:e+i,runner:t.runner}},$e=function(){const t=O.window;return(t.performance||t.Date).now()};class Je extends Rt{constructor(t=$e){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const i=Math.abs(e);return this.speed(t?-i:i)}schedule(t,e,i){if(null==t)return this._runners.map(Ze);let a=0;const s=this.getEndTime();if(e=e||0,null==i||"last"===i||"after"===i)a=s;else if("absolute"===i||"start"===i)a=e,e=0;else if("now"===i)a=this._time;else if("relative"===i){const i=this.getRunnerInfoById(t.id);i&&(a=i.start+e,e=0)}else{if("with-last"!==i)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();a=t?t.start:this._time}}t.unschedule(),t.timeline(this);const r=t.persist(),n={persist:null===r?this._persist:r,start:a+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(n),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return qe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let i=e-this._lastSourceTime;t&&(i=0);const a=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=a,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],i=e.runner;this._time-e.start<=0&&i.reset()}let s=!1;for(let t=0,e=this._runners.length;t0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}A({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Je,this._timeline):(this._timeline=t,this)}}});class Qe extends Rt{constructor(t){super(),this.id=Qe.id++,t="function"==typeof(t=null==t?Yt:t)?new ke(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ke,this._stepper=this._isDeclarative?t:new we,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new vt,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,i){let a=1,s=!1,r=0;return e=e??Ot,i=i||"last","object"!=typeof(t=t??Yt)||t instanceof ye||(e=t.delay??e,i=t.when??i,s=t.swing||s,a=t.times??a,r=t.wait??r,t=t.duration??Yt),{duration:t,delay:e,swing:s,times:a,wait:r,when:i}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,i){const a=Qe.sanitise(t,e,i),s=new Qe(a.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(a).schedule(a.delay,a.when)}clearTransform(){return this.transforms=new vt,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new we(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,i){return"object"==typeof t&&(e=t.swing,i=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=i||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),i=(this._time-t*e)/this._duration;return Math.min(t+i,this._times)}const i=t%1,a=e*Math.floor(t)+this._duration*i;return this.time(a)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,i=this._duration,a=this._wait,s=this._times,r=this._swing,n=this._reverse;let o;if(null==t){const t=function(t){const e=r*Math.floor(t%(2*(a+i))/(a+i)),s=e&&!n||!e&&n,o=Math.pow(-1,s)*(t%(a+i))/i+s;return Math.max(Math.min(o,1),0)},l=s*(a+i)-a;return o=e<=0?Math.round(t(1e-5)):e=0;this._lastPosition=e;const a=this.duration(),s=this._lastTime<=0&&this._time>0,r=this._lastTime=a;this._lastTime=this._time,s&&this.fire("start",this);const n=this._isDeclarative;this.done=!n&&!r&&this._time>=a,this._reseted=!1;let o=!1;return(i||n)&&(this._initialise(i),this.transforms=new vt,o=this._run(n?t:e),this.fire("step",this)),this.done=this.done||o&&n,r&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,i=this._queue.length;et.lmultiplyO(e),ei=t=>t.transforms;function ii(){const t=this._transformationRunners.runners.map(ei).reduce(ti,new vt);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class ai{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Ke).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const i=this.ids.indexOf(t+1);return this.ids.splice(i,1,t+1),this.runners.splice(i,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;ee.id<=t.id)).map(ei).reduce(ti,new vt)},_addRunner(t){this._transformationRunners.add(t),qe.cancelImmediate(this._frameId),this._frameId=qe.immediate(ii.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new ai).add(new Ke(new vt(this))))}}});Q(Qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,i){if("string"==typeof e)return this.styleAttr(t,{[e]:i});let a=e;if(this._tryRetarget(t,a))return this;let s=new He(this._stepper).to(a),r=Object.keys(a);return this.queue((function(){s=s.from(this.element()[t](r))}),(function(e){return this.element()[t](s.at(e).valueOf()),s.done()}),(function(e){const i=Object.keys(e),n=(o=r,i.filter((t=>!o.includes(t))));var o;if(n.length){const e=this.element()[t](n),i=new _e(s.from()).valueOf();Object.assign(i,e),s.from(i)}const l=new _e(s.to()).valueOf();Object.assign(l,e),s.to(l),r=i,a=e})),this._rememberMorpher(t,s),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let i=new He(this._stepper).to(new _t(t));return this.queue((function(){i=i.from(this.element().zoom())}),(function(t){return this.element().zoom(i.at(t),e),i.done()}),(function(t,a){e=a,i.to(t)})),this._rememberMorpher("zoom",i),this},transform(t,e,i){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const a=vt.isMatrixLike(t);i=null!=t.affine?t.affine:null!=i?i:!a;const s=new He(this._stepper).type(i?Fe:vt);let r,n,o,l,h;return this.queue((function(){n=n||this.element(),r=r||T(t,n),h=new vt(e?void 0:n),n._addRunner(this),e||n._clearTransformRunnersBefore(this)}),(function(c){e||this.clearTransform();const{x:d,y:u}=new bt(r).transform(n._currentTransform(this));let g=new vt({...t,origin:[d,u]}),p=this._isDeclarative&&o?o:h;if(i){g=g.decompose(d,u),p=p.decompose(d,u);const t=g.rotate,e=p.rotate,i=[t-360,t,t+360],a=i.map((t=>Math.abs(t-e))),s=Math.min(...a),r=a.indexOf(s);g.rotate=i[r]}e&&(a||(g.rotate=t.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),s.from(p),s.to(g);const f=s.at(c);return l=f.rotate,o=new vt(f),this.addTransform(o),n._addRunner(this),s.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(r=T(e,n)),t={...e,origin:r}}),!0),this._isDeclarative&&this._rememberMorpher("transform",s),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new _t(e),this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);let a=null;return this.queue((function(){a=this.element()[t](),i.from(a),i.to(a+e)}),(function(e){return this.element()[t](i.at(e)),i.done()}),(function(t){i.to(a+new _t(t))})),this._rememberMorpher(t,i),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);return this.queue((function(){i.from(this.element()[t]())}),(function(e){return this.element()[t](i.at(e)),i.done()})),this._rememberMorpher(t,i),this},_queueNumber(t,e){return this._queueObject(t,new _t(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let i;return t&&e||(i=this._element.bbox()),t||(t=i.width/i.height*e),e||(e=i.height/i.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,i,a){if(4===arguments.length)return this.plot([t,e,i,a]);if(this._tryRetarget("plot",t))return this;const s=new He(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){s.from(this._element.array())}),(function(t){return this._element.plot(s.at(t)),s.done()})),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,i,a){return this._queueObject("viewbox",new kt(t,e,i,a))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Q(Qe,{rx:Zt,ry:$t,from:ne,to:oe}),q(Qe,"Runner");class si extends Vt{constructor(t,e=t){super(G("svg",t),e),this.namespace()}defs(){return this.isRoot()?V(this.node.querySelector("defs"))||this.put(new Ut):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof O.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:E,version:"1.1"}).attr("xmlns:xlink",H,Y):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Y).attr("xmlns:svgjs",null,Y)}root(){return this.isRoot()?this:super.root()}}A({Container:{nested:K((function(){return this.put(new si)}))}}),q(si,"Svg",!0);let ri=class extends Vt{constructor(t,e=t){super(G("symbol",t),e)}};A({Container:{symbol:K((function(){return this.put(new ri)}))}}),q(ri,"Symbol");var ni=Object.freeze({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,i=this.bbox()){return this.cx(t,i).cy(e,i)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,i=this.bbox()){return this.x(t,i).y(e,i)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(O.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}});class oi extends qt{constructor(t,e=t){super(G("text",t),e),this.dom.leading=this.dom.leading??new _t(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new _t(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const i=this.dom.leading;this.each((function(a){if(X(this.node))return;const s=O.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=i*new _t(s);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=r:(this.attr("dy",a?r+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new _t(t.leading||1.3),this}writeDataToDom(){return R(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let i=0;t="";for(let a=0,s=e.length;a{let a;try{a=i.node instanceof F().SVGSVGElement?new kt(i.attr(["x","y","width","height"])):i.bbox()}catch(t){return}const s=new vt(i),r=s.translate(t,e).transform(s.inverse()),n=new bt(a.x,a.y).transform(r);i.move(n.x,n.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,i=this.bbox()){const a=t-i.x,s=e-i.y;return this.dmove(a,s)},size:function(t,e,i=this.bbox()){const a=I(this,t,e,i),s=a.width/i.width,r=a.height/i.height;return this.children().forEach((t=>{const e=new bt(i).transform(new vt(t).inverse());t.scale(s,r,e.x,e.y)})),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}});class gi extends Vt{constructor(t,e=t){super(G("g",t),e)}}Q(gi,ui),A({Container:{group:K((function(){return this.put(new gi)}))}}),q(gi,"G");class pi extends Vt{constructor(t,e=t){super(G("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,H)}}Q(pi,ui),A({Container:{link:K((function(t){return this.put(new pi).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const i=e.index(t);return e.add(this,i),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new pi,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),q(pi,"A");class fi extends Vt{constructor(t,e=t){super(G("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Lt("svg [mask*="+this.id()+"]")}}A({Container:{mask:K((function(){return this.defs().put(new fi)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof fi?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),q(fi,"Mask");class xi extends Gt{constructor(t,e=t){super(G("stop",t),e)}update(t){return("number"==typeof t||t instanceof _t)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new _t(t.offset)),this}}A({Gradient:{stop:function(t,e,i){return this.put(new xi).update(t,e,i)}}}),q(xi,"Stop");class bi extends Gt{constructor(t,e=t){super(G("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,i={}){return this.rule("@font-face",{fontFamily:t,src:e,...i})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let i=t+"{";for(const t in e)i+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return i+="}",i}(t,e))}}A("Dom",{style(t,e){return this.put(new bi).rule(t,e)},fontface(t,e,i){return this.put(new bi).font(t,e,i)}}),q(bi,"Style");class mi extends oi{constructor(t,e=t){super(G("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let i=null;return e&&(i=e.plot(t)),null==t?i:this}track(){return this.reference("href")}}A({Container:{textPath:K((function(t,e){return t instanceof oi||(t=this.text(t)),t.path(e)}))},Text:{path:K((function(t,e=!0){const i=new mi;let a;if(t instanceof We||(t=this.defs().path(t)),i.attr("href","#"+t,H),e)for(;a=this.node.firstChild;)i.node.appendChild(a);return this.put(i)})),textPath(){return this.findOne("textPath")}},Path:{text:K((function(t){return t instanceof oi||(t=(new oi).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Lt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),mi.prototype.MorphArray=Ee,q(mi,"TextPath");class vi extends qt{constructor(t,e=t){super(G("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,H)}}A({Container:{use:K((function(t,e){return this.put(new vi).use(t,e)}))}}),q(vi,"Use");const yi=B;Q([si,ri,de,ce,be],C("viewbox")),Q([xe,je,Ge,We],C("marker")),Q(oi,C("Text")),Q(We,C("Path")),Q(Ut,C("Defs")),Q([oi,li],C("Tspan")),Q([Ve,se,he,Qe],C("radius")),Q(Rt,C("EventTarget")),Q(Bt,C("Dom")),Q(Gt,C("Element")),Q(qt,C("Shape")),Q([Vt,re],C("Container")),Q(he,C("Gradient")),Q(Qe,C("Runner")),Ct.extend([...new Set(k)]),function(t=[]){Ne.push(...[].concat(t))}([_t,xt,kt,vt,Dt,ge,Ee,bt]),Q(Ne,{to(t){return(new He).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,i,a,s){return this.fromArray(t.map((function(t,r){return a.step(t,e[r],i,s[r],s)})))}});class wi extends Gt{constructor(t){super(G("filter",t),t),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(t,e){return!(t=super.put(t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return Lt('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class ki extends Gt{constructor(t,e){super(t,e),this.result(this.id())}in(t){if(null==t){const t=this.attr("in");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in",t)}result(t){return this.attr("result",t)}toString(){return this.result()}}const Ai=t=>function(...e){for(let i=t.length;i--;)null!=e[i]&&this.attr(t[i],e[i])},Ci={blend:Ai(["in","in2","mode"]),colorMatrix:Ai(["type","values"]),composite:Ai(["in","in2","operator"]),convolveMatrix:function(t){t=new Dt(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Ai(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Ai(["in","dx","dy","stdDeviation"]),flood:Ai(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,H)},morphology:Ai(["operator","radius"]),offset:Ai(["dx","dy"]),specularLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Ai([]),turbulence:Ai(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((t=>{const e=P(t),i=Ci[t];wi[e+"Effect"]=class extends ki{constructor(t){super(G("fe"+e,t),t)}update(t){return i.apply(this,t),this}},wi.prototype[t]=K((function(t,...i){const a=new wi[e+"Effect"];return null==t?this.put(a):("function"==typeof t?t.call(a,a):i.unshift(t),this.put(a).update(i))}))})),Q(wi,{merge(t){const e=this.put(new wi.MergeEffect);if("function"==typeof t)return t.call(e,e),e;return(t instanceof Array?t:[...arguments]).forEach((t=>{t instanceof wi.MergeNode?e.put(t):e.mergeNode(t)})),e},componentTransfer(t={}){const e=this.put(new wi.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;if(!(t.r||t.g||t.b||t.a)){t={r:t,g:t,b:t,a:t}}for(const i in t)e.add(new(wi["Func"+i.toUpperCase()])(t[i]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((t=>{const e=P(t);wi[e]=class extends ki{constructor(t){super(G("fe"+e,t),t)}}}));["funcR","funcG","funcB","funcA"].forEach((function(t){const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.ComponentTransferEffect.prototype[t]=i}));["distantLight","pointLight","spotLight"].forEach((t=>{const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.DiffuseLightingEffect.prototype[t]=i,wi.SpecularLightingEffect.prototype[t]=i})),Q(wi.MergeEffect,{mergeNode(t){return this.put(new wi.MergeNode).attr("in",t)}}),Q(Ut,{filter:function(t){const e=this.put(new wi);return"function"==typeof t&&t.call(e,e),e}}),Q(Vt,{filter:function(t){return this.defs().filter(t)}}),Q(Gt,{filterWith:function(t){const e=t instanceof wi?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const Si={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,i,a){return this.parent()&&this.parent().diffuseLighting(t,i,a).in(this)},displacementMap:function(t,e,i,a){return this.parent()&&this.parent().displacementMap(this,t,e,i,a)},dropShadow:function(t,e,i){return this.parent()&&this.parent().dropShadow(this,t,e,i).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){return t=t instanceof Array?t:[...t],this.parent()&&this.parent().merge(this,...t)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,i,a,s){return this.parent()&&this.parent().specularLighting(t,i,a,s).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,a,s){return this.parent()&&this.parent().turbulence(t,e,i,a,s).in(this)}};Q(ki,Si),Q(wi.MergeEffect,{in:function(t){return t instanceof wi.MergeNode?this.add(t,0):this.add((new wi.MergeNode).in(t),0),this}}),Q([wi.CompositeEffect,wi.BlendEffect,wi.DisplacementMapEffect],{in2:function(t){if(null==t){const t=this.attr("in2");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in2",t)}}),wi.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var Li=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getDefaultFilter",value:function(t,e){var i=this.w;t.unfilter(!0),(new wi).size("120%","180%","-5%","-40%"),i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"applyFilter",value:function(t,e,i){var a,s=this,r=this.w;if(t.unfilter(!0),"none"!==i){var n,o,l=r.config.chart.dropShadow,h="lighten"===i?2:.3;if(t.filterWith((function(t){t.colorMatrix({type:"matrix",values:"\n ".concat(h," 0 0 0 0\n 0 ").concat(h," 0 0 0\n 0 0 ").concat(h," 0 0\n 0 0 0 1 0\n "),in:"SourceGraphic",result:"brightness"}),l.enabled&&s.addShadow(t,e,l,"brightness")})),!l.noUserSpaceOnUse)null===(n=t.filterer())||void 0===n||null===(o=n.node)||void 0===o||o.setAttribute("filterUnits","userSpaceOnUse");this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node)}else this.getDefaultFilter(t,e)}},{key:"addShadow",value:function(t,e,i,a){var s,r=this.w,n=i.blur,o=i.top,l=i.left,h=i.color,c=i.opacity;if(h=Array.isArray(h)?h[e]:h,(null===(s=r.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:a,dx:l,dy:o,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:n,result:"blur"}),t.flood({"flood-color":h,"flood-opacity":c,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",a])}},{key:"dropShadow",value:function(t,e){var i,a,s,r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.w;if(t.unfilter(!0),v.isMsEdge()&&"radialBar"===o.config.chart.type)return t;if((null===(i=o.config.chart.dropShadow.enabledOnSeries)||void 0===i?void 0:i.length)>0&&-1===(null===(s=o.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.indexOf(n)))return t;return t.filterWith((function(t){r.addShadow(t,n,e,"SourceGraphic")})),e.noUserSpaceOnUse||t.filterer().node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node),t}},{key:"setSelectionFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;"none"!==s&&this.applyFilter(t,e,s.type)}}},{key:"_scaleFilterSize",value:function(t){if(t){!function(e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}}]),t}(),Mi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"roundPathCorners",value:function(t,e){function i(t,e,i){var s=e.x-t.x,r=e.y-t.y,n=Math.sqrt(s*s+r*r);return a(t,e,Math.min(1,i/n))}function a(t,e,i){return{x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}}function s(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function r(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var n=t.split(/[,\s]/).reduce((function(t,e){var i=e.match("([a-zA-Z])(.+)");return i?(t.push(i[1]),t.push(i[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),o=[];if(n.length>1){var l=r(n[0]),h=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(h=["L",l.x,l.y],n[n.length-1]=h),o.push(n[0]);for(var c=1;c2&&"L"==u[0]&&g.length>2&&"L"==g[0]){var p,f,x=r(d),b=r(u),m=r(g);p=i(b,x,e),f=i(b,m,e),s(u,p),u.origPoint=b,o.push(u);var v=a(p,b,.5),y=a(b,f,.5),w=["C",v.x,v.y,y.x,y.y,f.x,f.y];w.origPoint=b,o.push(w)}else o.push(u)}if(h){var k=r(o[o.length-1]);o.push(["Z"]),s(o[0],k)}}else o=n;return o.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":n,"stroke-linecap":o})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,c=this.w.globals.dom.Paper.rect();return c.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":h}),c.node.setAttribute("fill",r),c}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:a,stroke:e,"stroke-width":i})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var i=this.w.globals.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,s=void 0===a?"#a8a8a8":a,r=t.strokeWidth,n=void 0===r?1:r,o=t.fill,l=t.fillOpacity,h=void 0===l?1:l,c=t.strokeOpacity,d=void 0===c?1:c,u=t.classes,g=t.strokeLinecap,p=void 0===g?null:g,f=t.strokeDashArray,x=void 0===f?0:f,b=this.w;return null===p&&(p=b.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(b.globals.gridHeight)),b.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":h,stroke:s,"stroke-opacity":d,"stroke-linecap":p,"stroke-width":n,"stroke-dasharray":x,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){var i=["M",t,e].join(" ");return i}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=[" L",t,e].join(" "):"H"===i?a=[" H",t].join(" "):"V"===i&&(a=[" V",e].join(" ")),a}},{key:"curve",value:function(t,e,i,a,s,r){var n=["C",t,e,i,a,s,r].join(" ");return n}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,s,r,n){var o="A";arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(o="a");var l=[o,t,e,i,a,s,r,n].join(" ");return l}},{key:"renderPaths",value:function(t){var e,i=t.j,a=t.realIndex,s=t.pathFrom,r=t.pathTo,n=t.stroke,o=t.strokeWidth,l=t.strokeLinecap,h=t.fill,c=t.animationDelay,d=t.initialSpeed,g=t.dataChangeSpeed,p=t.className,f=t.chartType,x=t.shouldClipToGrid,b=void 0===x||x,m=t.bindEventsOnPaths,v=void 0===m||m,w=t.drawShadow,k=void 0===w||w,A=this.w,C=new Li(this.ctx),S=new y(this.ctx),L=this.w.config.chart.animations.enabled,M=L&&this.w.config.chart.animations.dynamicAnimation.enabled,P=!!(L&&!A.globals.resized||M&&A.globals.dataChanged&&A.globals.shouldAnimate);P?e=s:(e=r,A.globals.animationEnded=!0);var I=A.config.stroke.dashArray,T=0;T=Array.isArray(I)?I[a]:A.config.stroke.dashArray;var z=this.drawPath({d:e,stroke:n,strokeWidth:o,fill:h,fillOpacity:1,classes:p,strokeLinecap:l,strokeDashArray:T});z.attr("index",a),b&&("bar"===f&&!A.globals.isHorizontal||A.globals.comboCharts?z.attr({"clip-path":"url(#gridRectBarMask".concat(A.globals.cuid,")")}):z.attr({"clip-path":"url(#gridRectMask".concat(A.globals.cuid,")")})),A.config.chart.dropShadow.enabled&&k&&C.dropShadow(z,A.config.chart.dropShadow,a),v&&(z.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,z)),z.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,z)),z.node.addEventListener("mousedown",this.pathMouseDown.bind(this,z))),z.attr({pathTo:r,pathFrom:s});var X={el:z,j:i,realIndex:a,pathFrom:s,pathTo:r,fill:h,strokeWidth:o,delay:c};return!L||A.globals.resized||A.globals.dataChanged?!A.globals.resized&&A.globals.dataChanged||S.showDelayedElements():S.animatePathsGradually(u(u({},X),{},{speed:d})),A.globals.dataChanged&&M&&P&&S.animatePathsGradually(u(u({},X),{},{speed:g})),z}},{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,i,(function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:a,width:s+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:a,width:s}):"squares"===t?r.rect(e,i).fill("none").stroke({color:a,width:s}):"circles"===t&&r.circle(e).fill("none").stroke({color:a,width:s})}))}},{key:"drawGradient",value:function(t,e,i,a,s){var r,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,c=this.w;e.length<9&&0===e.indexOf("#")&&(e=v.hexToRgba(e,a)),i.length<9&&0===i.indexOf("#")&&(i=v.hexToRgba(i,s));var d=0,u=1,g=1,p=null;null!==o&&(d=void 0!==o[0]?o[0]/100:0,u=void 0!==o[1]?o[1]/100:1,g=void 0!==o[2]?o[2]/100:1,p=void 0!==o[3]?o[3]/100:null);var f=!("donut"!==c.config.chart.type&&"pie"!==c.config.chart.type&&"polarArea"!==c.config.chart.type&&"bubble"!==c.config.chart.type);if(r=l&&0!==l.length?c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){(Array.isArray(l[h])?l[h]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){t.stop(d,e,a),t.stop(u,i,s),t.stop(g,i,s),null!==p&&t.stop(p,e,a)})),f){var x=c.globals.gridWidth/2,b=c.globals.gridHeight/2;"bubble"!==c.config.chart.type?r.attr({gradientUnits:"userSpaceOnUse",cx:x,cy:b,r:n}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?r.from(0,0).to(0,1):"diagonal"===t?r.from(0,0).to(1,1):"horizontal"===t?r.from(0,1).to(1,1):"diagonal2"===t&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,i=t.maxWidth,a=t.fontSize,s=t.fontFamily,r=this.getTextRects(e,a,s),n=r.width/e.length,o=Math.floor(i/n);return i-1){var o=i.globals.selectedDataPoints[s].indexOf(r);i.globals.selectedDataPoints[s].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),h=i.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),c=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),a.getDefaultFilter(t,s)}))};c(l),c(h)}t.node.setAttribute("selected","true"),n="true",void 0===i.globals.selectedDataPoints[s]&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(r)}if("true"===n){var d=i.config.states.active.filter;if("none"!==d)a.applyFilter(t,s,d.type);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}}else if("none"!==i.config.states.active.filter.type)if("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice)a.getDefaultFilter(t,s);else{u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,a){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w,n=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),r.globals.dom.Paper.add(n);var o=n.bbox();return s||(o=n.node.getBoundingClientRect()),n.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i/1.1)return void(t.textContent=e.substring(0,a)+"...");t.textContent="."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}(),Pi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getStackedSeriesTotals",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,i=[];if(0===e.globals.series.length)return i;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,i=[];return e.globals.seriesGroups.forEach((function(a){var s=[];e.config.series.forEach((function(t,i){a.indexOf(e.globals.seriesNames[i])>-1&&s.push(i)}));var r=e.globals.series.map((function(t,e){return-1===s.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));i.push(t.getStackedSeriesTotals(r))})),i}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,i=[],a=[],s=[],r=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){s.push(e),a.push(null)})),e.yaxis.forEach((function(t,e){i[e]=[]}));var n=[];e.yaxis.forEach((function(t,a){var o=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,n){if(e.name===t){var l=n;a===n||r?!r||s.indexOf(n)>-1?i[a].push([a,n]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[n].push([n,a]),l=a),o=!0,-1!==(l=s.indexOf(l))&&s.splice(l,1)}}))}))}o||n.push(a)})),i=i.map((function(t,e){var i=[];return t.forEach((function(t){a[t[1]]=t[0],i.push(t[1])})),i}));for(var o=e.yaxis.length-1,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,i){return t===i[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map((function(t,i){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),i}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var i=0;if(Array.isArray(t))for(var a=0;at&&i.globals.seriesX[s][n]0){var g=function(t,e){var i=s.config.yaxis[s.globals.seriesYAxisReverseMap[e]],r=t<0?-1:1;return t=Math.abs(t),i.logarithmic&&(t=a.getBaseLog(i.logBase,t)),-r*t/n[e]};if(r.isMultipleYAxis){l=[];for(var p=0;p0&&e.forEach((function(e){var n=[],o=[];t.i.forEach((function(i,a){s.config.series[i].group===e&&(n.push(t.series[a]),o.push(i))})),n.length>0&&r.push(a.draw(n,i,o))})),r}}],[{key:"checkComboSeries",value:function(t,e){var i=!1,a=0,s=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||a++,void 0!==t.type&&t.type!==e&&s++})),s>0&&(i=!0),{comboBarCount:a,comboCharts:i}}},{key:"extendArrayProps",value:function(t,e,i){var a,s,r,n,o,l;(null!==(a=e)&&void 0!==a&&a.yaxis&&(e=t.extendYAxis(e,i)),null!==(s=e)&&void 0!==s&&s.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(r=e)&&void 0!==r&&null!==(n=r.annotations)&&void 0!==n&&n.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(l=o.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e)));return e}}]),t}(),Ii=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e}return s(t,[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===t.label.orientation){var a=null!==e?e:0,s=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(null!==s){var r=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-r.height+4);var n="top"===t.label.position?r.width:-r.width;s.setAttribute("y",parseFloat(s.getAttribute("y"))+n);var o=this.annoCtx.graphics.rotateAroundCenter(s),l=o.x,h=o.y;s.setAttribute("transform","rotate(-90 ".concat(l," ").concat(h,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=t.getBoundingClientRect(),r=e.label.style.padding,n=r.left,o=r.right,l=r.top,h=r.bottom;if("vertical"===e.label.orientation){var c=[n,o,l,h];l=c[0],h=c[1],n=c[2],o=c[3]}var d=s.left-a.left-n,u=s.top-a.top-l,g=this.annoCtx.graphics.drawRect(d-i.globals.barPadForNumericAxis,u,s.width+n+o,s.height+l+h,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&g.node.classList.add(e.id),g}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,a,s){var r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(a,"']"));if(r){var n=r.parentNode,o=t.addBackgroundToAnno(r,i);o&&(n.insertBefore(o.node,r),i.label.mouseEnter&&o.node.addEventListener("mouseenter",i.label.mouseEnter.bind(t,i)),i.label.mouseLeave&&o.node.addEventListener("mouseleave",i.label.mouseLeave.bind(t,i)),i.label.click&&o.node.addEventListener("click",i.label.click.bind(t,i)))}};e.config.annotations.xaxis.forEach((function(t,e){return i(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return i(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return i(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var i,a=this.w,s="y1"===t?e.y:e.y2,r=!1;if(this.annoCtx.invertAxis){var n=a.config.xaxis.convertedCatToNumeric?a.globals.categoryLabels:a.globals.labels,o=n.indexOf(s),l=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(o+1,")"));i=l?parseFloat(l.getAttribute("y")):(a.globals.gridHeight/n.length-1)*(o+1)-a.globals.barHeight,void 0!==e.seriesIndex&&a.globals.barHeight&&(i-=a.globals.barHeight/2*(a.globals.series.length-1)-a.globals.barHeight*e.seriesIndex)}else{var h,c=a.globals.seriesYAxisMap[e.yAxisIndex][0],d=a.config.yaxis[e.yAxisIndex].logarithmic?new Pi(this.annoCtx.ctx).getLogVal(a.config.yaxis[e.yAxisIndex].logBase,s,c)/a.globals.yLogRatio[c]:(s-a.globals.minYArr[c])/(a.globals.yRange[c]/a.globals.gridHeight);i=a.globals.gridHeight-Math.min(Math.max(d,0),a.globals.gridHeight),r=d>a.globals.gridHeight||d<0,!e.marker||void 0!==e.y&&null!==e.y||(i=0),null!==(h=a.config.yaxis[e.yAxisIndex])&&void 0!==h&&h.reversed&&(i=d)}return"string"==typeof s&&s.includes("px")&&(i=parseFloat(s)),{yP:i,clipped:r}}},{key:"getX1X2",value:function(t,e){var i=this.w,a="x1"===t?e.x:e.x2,s=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,r=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,n=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,o=!1,l=this.annoCtx.inversedReversedAxis?(r-a)/(n/i.globals.gridWidth):(a-s)/(n/i.globals.gridWidth);return"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||i.config.chart.sparkline.enabled||(l=this.getStringX(a)),"string"==typeof a&&a.includes("px")&&(l=parseFloat(a)),null==a&&e.marker&&(l=i.globals.gridWidth),void 0!==e.seriesIndex&&i.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=i.globals.barWidth/2*(i.globals.series.length-1)-i.globals.barWidth*e.seriesIndex),l>i.globals.gridWidth?(l=i.globals.gridWidth,o=!0):l<0&&(l=0,o=!0),{x:l,clipped:o}}},{key:"getStringX",value:function(t){var e=this.w,i=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var a=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),s=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(a+1,")"));return s&&(i=parseFloat(s.getAttribute("x"))),i}}]),t}(),Ti=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addXaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=this.helpers.getX1X2("x1",t),n=r.x,o=r.clipped,l=!0,h=t.label.text,c=t.strokeDashArray;if(v.isNumber(n)){if(null===t.x2||void 0===t.x2){if(!o){var d=this.annoCtx.graphics.drawLine(n+t.offsetX,0+t.offsetY,n+t.offsetX,s.globals.gridHeight+t.offsetY,t.borderColor,c,t.borderWidth);e.appendChild(d.node),t.id&&d.node.classList.add(t.id)}}else{var u=this.helpers.getX1X2("x2",t);if(a=u.x,l=u.clipped,!o||!l){if(a12?u-12:0===u?12:u;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(g))).replace(/(^|[^\\])h/g,"$1"+g);var p=a?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var x=a?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);var b=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var m=u<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));var v=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var y=-t.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){var k=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(k)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var A=(a?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(n[0],"g"),n[A])).replace(new RegExp(o[0],"g"),o[A])).replace(new RegExp(s[0],"g"),s[c])).replace(new RegExp(r[0],"g"),r[c])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var a=this.w;void 0!==a.config.xaxis.min&&(t=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(e=a.config.xaxis.max);var s=this.getDate(t),r=this.getDate(e),n=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=v.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),Xi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return s(t,[{key:"xLabelFormat",value:function(t,e,i,a){var s=this.w;if("datetime"===s.config.xaxis.type&&void 0===s.config.xaxis.labels.formatter&&void 0===s.config.tooltip.x.formatter){var r=new zi(this.ctx);return r.formatDate(r.getDate(e),s.config.tooltip.x.format)}return t(e,i,a)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,i){var a=this.w;if(v.isNumber(t))if(0!==a.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:a.globals.yValueDecimal);else{var s=t.toFixed(0);t=t==s?s:t.toFixed(1)}return t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(v.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(v.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var i=e.globals.maxX-e.globals.minX;return i>0&&i<100?t.toFixed(1):t.toFixed(0)}if(e.globals.isBarHorizontal)if(e.globals.maxY-e.globals.minYArr<4)return t.toFixed(1);return t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,a){void 0!==i.labels.formatter?e.globals.yLabelFormatters[a]=i.labels.formatter:e.globals.yLabelFormatters[a]=function(s){return e.globals.xyCharts?Array.isArray(s)?s.map((function(e){return t.defaultYFormatter(e,i,a)})):t.defaultYFormatter(s,i,a):s}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),Ri=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getLabel",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",n=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,l=void 0===t[a]?"":t[a],h=l,c=o.globals.xLabelFormatter,d=o.config.xaxis.labels.formatter,u=!1,g=new Xi(this.ctx),p=l;n&&(h=g.xLabelFormat(c,l,p,{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o}),void 0!==d&&(h=d(l,t[a],{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o})));var f,x;e.length>0?(f=e[a].unit,x=null,e.forEach((function(t){"month"===t.unit?x="year":"day"===t.unit?x="month":"hour"===t.unit?x="day":"minute"===t.unit&&(x="hour")})),u=x===f,i=e[a].position,h=e[a].value):"datetime"===o.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var b=new Mi(this.ctx),m={};m=o.globals.rotateXLabels&&n?b.getTextRects(h,parseInt(r,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):b.getTextRects(h,parseInt(r,10));var v=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||s.indexOf(h)>=0&&v)&&(h=""),{x:i,text:h,textRect:m,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var a=this.w,s=a.config.xaxis.tickAmount;return"dataPoints"===s&&(s=Math.round(a.globals.gridWidth/120)),s>i||t%Math.round(i/(s+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,a,s){var r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=s[s.length-1];e.xa.length||a.some((function(t){return Array.isArray(t.seriesName)}))?t:i.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,i=e.config.yaxis[t];if(!i.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!i.showForNullSeries){var a=e.globals.seriesYAxisMap[t],s=new Pi(this.ctx);return a.every((function(t){return s.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,i,a,s,r,n){var o=this.w,l=new Mi(this.ctx),h=o.globals.translateY+o.config.yaxis[s].labels.offsetY;if(o.globals.isBarHorizontal?h=0:"heatmap"===o.config.chart.type&&(h+=r/2),a.show&&e>0){!0===o.config.yaxis[s].opposite&&(t+=a.width);for(var c=e;c>=0;c--){var d=l.drawLine(t+i.offsetX-a.width+a.offsetX,h+a.offsetY,t+i.offsetX+a.offsetX,h+a.offsetY,a.color);n.add(d),h+=r}}}}]),t}(),Ei=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx),this.axesUtils=new Ri(this.annoCtx)}return s(t,[{key:"addYaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=t.strokeDashArray,n=this.helpers.getY1Y2("y1",t),o=n.yP,l=n.clipped,h=!0,c=!1,d=t.label.text;if(null===t.y2||void 0===t.y2){if(!l){c=!0;var u=this.annoCtx.graphics.drawLine(0+t.offsetX,o+t.offsetY,this._getYAxisAnnotationWidth(t),o+t.offsetY,t.borderColor,r,t.borderWidth);e.appendChild(u.node),t.id&&u.node.classList.add(t.id)}}else{if(a=(n=this.helpers.getY1Y2("y2",t)).yP,h=n.clipped,a>o){var g=o;o=a,a=g}if(!l||!h){c=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,a+t.offsetY,this._getYAxisAnnotationWidth(t),o-a,0,t.fillColor,t.opacity,1,t.borderColor,r);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(c){var f="right"===t.label.position?s.globals.gridWidth:"center"===t.label.position?s.globals.gridWidth/2:0,x=this.annoCtx.graphics.drawText({x:f+t.label.offsetX,y:(null!=a?a:o)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});x.attr({rel:i}),e.appendChild(x.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;e.globals.gridWidth;return(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,a){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,i.node,a)})),i}}]),t}(),Yi=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addPointAnnotation",value:function(t,e,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",t),s=a.x,r=a.clipped,n=(a=this.helpers.getY1Y2("y1",t)).yP,o=a.clipped;if(v.isNumber(s)&&!o&&!r){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},h=this.annoCtx.graphics.drawMarker(s+t.marker.offsetX,n+t.marker.offsetY,l);e.appendChild(h.node);var c=t.label.text?t.label.text:"",d=this.annoCtx.graphics.drawText({x:s+t.label.offsetX,y:n+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:c,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(d.attr({rel:i}),e.appendChild(d.node),t.customSVG.SVG){var u=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});u.attr({transform:"translate(".concat(s+t.customSVG.offsetX,", ").concat(n+t.customSVG.offsetY,")")}),u.node.innerHTML=t.customSVG.SVG,e.appendChild(u.node)}if(t.image.path){var g=t.image.width?t.image.width:20,p=t.image.height?t.image.height:20;h=this.annoCtx.addImage({x:s+t.image.offsetX-g/2,y:n+t.image.offsetY-p/2,width:g,height:p,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&h.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&h.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&h.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,a){t.addPointAnnotation(e,i.node,a)})),i}}]),t}();var Hi={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},Oi=function(){function t(){i(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return s(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[Hi],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),Fi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.graphics=new Mi(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Ii(this),this.xAxisAnnotations=new Ti(this),this.yAxisAnnotations=new Ei(this),this.pointsAnnotations=new Yi(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return s(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=t.config.chart.animations.enabled,r=[e,i,a],n=[i.node,e.node,a.node],o=0;o<3;o++)t.globals.dom.elGraphical.add(r[o]),!s||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&n[o].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:n[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,a=t.y,s=t.text,r=t.textAnchor,n=t.foreColor,o=t.fontSize,l=t.fontFamily,h=t.fontWeight,c=t.cssClass,d=t.backgroundColor,u=t.borderWidth,g=t.strokeDashArray,p=t.borderRadius,f=t.borderColor,x=t.appendTo,b=void 0===x?".apexcharts-svg":x,m=t.paddingLeft,v=void 0===m?4:m,y=t.paddingRight,w=void 0===y?4:y,k=t.paddingBottom,A=void 0===k?2:k,C=t.paddingTop,S=void 0===C?2:C,L=this.w,M=this.graphics.drawText({x:i,y:a,text:s,textAnchor:r||"start",fontSize:o||"12px",fontWeight:h||"regular",fontFamily:l||L.config.chart.fontFamily,foreColor:n||L.config.chart.foreColor,cssClass:c}),P=L.globals.dom.baseEl.querySelector(b);P&&P.appendChild(M.node);var I=M.bbox();if(s){var T=this.graphics.drawRect(I.x-v,I.y-S,I.width+v+w,I.height+A+S,p,d||"transparent",1,u,f,g);P.insertBefore(T.node,M.node)}}},{key:"addImage",value:function(t,e){var i=this.w,a=t.path,s=t.x,r=void 0===s?0:s,n=t.y,o=void 0===n?0:n,l=t.width,h=void 0===l?20:l,c=t.height,d=void 0===c?20:c,u=t.appendTo,g=void 0===u?".apexcharts-svg":u,p=i.globals.dom.Paper.image(a);p.size(h,d).move(r,o);var f=i.globals.dom.baseEl.querySelector(g);return f&&f.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,a=t.context,s=t.type,r=t.contextMethod,n=a,o=n.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),h=l.childNodes.length+1,c=new Oi,d=Object.assign({},"xaxis"===s?c.xAxisAnnotation:"yaxis"===s?c.yAxisAnnotation:c.pointAnnotation),u=v.extend(d,e);switch(s){case"xaxis":this.addXaxisAnnotation(u,l,h);break;case"yaxis":this.addYaxisAnnotation(u,l,h);break;case"point":this.addPointAnnotation(u,l,h)}var g=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(h,"']")),p=this.helpers.addBackgroundToAnno(g,u);return p&&l.insertBefore(p.node,g),i&&o.globals.memory.methodsToExec.push({context:n,id:u.id?u.id:v.randomId(),method:r,label:"addAnnotation",params:e}),a}},{key:"clearAnnotations",value:function(t){for(var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),a=e.globals.memory.methodsToExec.length-1;a>=0;a--)"addText"!==e.globals.memory.methodsToExec[a].label&&"addAnnotation"!==e.globals.memory.methodsToExec[a].label||e.globals.memory.methodsToExec.splice(a,1);i=v.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(e));a&&(i.globals.memory.methodsToExec.map((function(t,a){t.id===e&&i.globals.memory.methodsToExec.splice(a,1)})),Array.prototype.forEach.call(a,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),Di=function(t){var e,i=t.isTimeline,a=t.ctx,s=t.seriesIndex,r=t.dataPointIndex,n=t.y1,o=t.y2,l=t.w,h=l.globals.seriesRangeStart[s][r],c=l.globals.seriesRangeEnd[s][r],d=l.globals.labels[r],u=l.config.series[s].name?l.config.series[s].name:"",g=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,f={w:l,seriesIndex:s,dataPointIndex:r,start:h,end:c};("function"==typeof p&&(u=p(u,f)),null!==(e=l.config.series[s].data[r])&&void 0!==e&&e.x&&(d=l.config.series[s].data[r].x),i)||"datetime"===l.config.xaxis.type&&(d=new Xi(a).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(a).formatDate,w:l}));"function"==typeof g&&(d=g(d,f)),Number.isFinite(n)&&Number.isFinite(o)&&(h=n,c=o);var x="",b="",m=l.globals.colors[s];if(void 0===l.config.tooltip.x.formatter)if("datetime"===l.config.xaxis.type){var v=new zi(a);x=v.formatDate(v.getDate(h),l.config.tooltip.x.format),b=v.formatDate(v.getDate(c),l.config.tooltip.x.format)}else x=h,b=c;else x=l.config.tooltip.x.formatter(h),b=l.config.tooltip.x.formatter(c);return{start:h,end:c,startVal:x,endVal:b,ylabel:d,color:m,seriesName:u}},_i=function(t){var e=t.color,i=t.seriesName,a=t.ylabel,s=t.start,r=t.end,n=t.seriesIndex,o=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(n);s=l.yLbFormatter(s),r=l.yLbFormatter(r);var h=l.yLbFormatter(t.w.globals.series[n][o]),c='\n '.concat(s,'\n - \n ').concat(r,"\n ");return'
'+(i||"")+'
'+a+": "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[n].type||"rangeBar"===t.w.config.series[n].type?c:"".concat(h,""):c)+"
"},Ni=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){this.hideYAxis();return v.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var i=e.w.config.series[e.seriesIndex].name;return null!==t?i+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),u(u({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,a=e.dataPointIndex,s=e.w,r=function(){var t=s.globals.seriesRangeStart[i][a];return s.globals.seriesRangeEnd[i][a]-t};return s.globals.comboCharts?"rangeBar"===s.config.series[i].type||"rangeArea"===s.config.series[i].type?r():t:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Di(u(u({},t),{},{isTimeline:!0})),i=e.color,a=e.seriesName,s=e.ylabel,r=e.startVal,n=e.endVal;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t):function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,i;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(i=t.plotOptions.bar)&&void 0!==i&&i.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}}}}},{key:"brush",value:function(t){return v.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return u(u({},t),{},{plotOptions:u(u({},t.plotOptions),{},{bar:u(u({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return v.isNumber(t)?Math.floor(t):t};var a=t.xaxis.labels.formatter,s=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(s=i.map((function(t){return Array.isArray(t)?t:String(t)}))),s&&s.length&&(t.xaxis.labels.formatter=function(t){return v.isNumber(t)?a(s[Math.floor(t)-1]):a(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,i,a,s){var r=t.globals.seriesCandleO[e][i],n=t.globals.seriesCandleH[e][i],o=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],h=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==s?'
\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][i],"\n
"):'
')+"
".concat(a[0],': ')+r+"
"+"
".concat(a[1],': ')+n+"
"+(o?"
".concat(a[2],': ')+o+"
":"")+"
".concat(a[3],': ')+l+"
"+"
".concat(a[4],': ')+h+"
"}}]),t}(),Wi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(t){var e=t.responsiveOverride,i=this.opts,a=new Oi,s=new Ni(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),n={};if(i&&"object"===b(i)){var o,l,h,c,d,u,g,p,f,x,m={};m=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?s[i.chart.type]():s.line(),null!==(o=i.plotOptions)&&void 0!==o&&null!==(l=o.bar)&&void 0!==l&&l.isFunnel&&(m=s.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(m=s.stackedBars()),null!==(h=i.chart.brush)&&void 0!==h&&h.enabled&&(m=s.brush(m)),null!==(c=i.plotOptions)&&void 0!==c&&null!==(d=c.line)&&void 0!==d&&d.isSlopeChart&&(m=s.slope()),i.chart.stacked&&"100%"===i.chart.stackType&&(i=s.stacked100(i)),null!==(u=i.plotOptions)&&void 0!==u&&null!==(g=u.bar)&&void 0!==g&&g.isDumbbell&&(i=s.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},e||(i.xaxis.convertedCatToNumeric=!1),(null!==(p=(i=this.checkForCatToNumericXAxis(this.chartType,m,i)).chart.sparkline)&&void 0!==p&&p.enabled||null!==(f=window.Apex.chart)&&void 0!==f&&null!==(x=f.sparkline)&&void 0!==x&&x.enabled)&&(m=s.sparkline(m)),n=v.extend(r,m)}var y=v.extend(n,window.Apex);return r=v.extend(y,i),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var a,s,r=new Ni(i),n=("bar"===t||"boxPlot"===t)&&(null===(a=i.plotOptions)||void 0===a||null===(s=a.bar)||void 0===s?void 0:s.horizontal),o="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,l="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,h=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return n||o||!l||"between"===h||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new Oi;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=v.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[v.extend(i.yAxis,t.yaxis)]:t.yaxis=v.extendArray(t.yaxis,i.yAxis);var a=!1;t.yaxis.forEach((function(t){t.logarithmic&&(a=!0)}));var s=t.series;return e&&!s&&(s=e.config.series),a&&s.length!==t.yaxis.length&&s.length&&(t.yaxis=s.map((function(e,a){if(e.name||(s[a].name="series-".concat(a+1)),t.yaxis[a])return t.yaxis[a].seriesName=s[a].name,t.yaxis[a];var r=v.extend(i.yAxis,t.yaxis[0]);return r.show=!1,r}))),a&&s.length>1&&s.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.yaxis=v.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.xaxis=v.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new Oi;return t.annotations.points=v.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),Bi=function(){function t(){i(this,t)}return s(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:t.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=v.extend({},t),e.initialSeries=v.clone(t.series),e.lastXAxis=v.clone(e.initialConfig.xaxis),e.lastYAxis=v.clone(e.initialConfig.yaxis),e}}]),t}(),Gi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(){var t=new Wi(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new Bi).init(t)}}}]),t}(),ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return s(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,a=parseInt(e.globals.gridWidth,10),s=parseInt(e.globals.gridHeight,10),r=a>s?a:s,n=t.image,o=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=r+1,l=r):(o=t.width,l=t.height);var h=document.createElementNS(e.globals.SVGNS,"pattern");Mi.setAttrs(h,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var c=document.createElementNS(e.globals.SVGNS,"image");h.appendChild(c),c.setAttributeNS(window.SVG.xlink,"href",n),Mi.setAttrs(c,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),c.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(h)}},{key:"getSeriesIndex",value:function(t){var e=this.w,i=e.config.chart.type;return("bar"===i||"rangeBar"===i)&&e.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var i,a=this.w,s=null,n=null,o=r(t);try{for(o.s();!(i=o.n()).done;){var l=i.value;l>=e.threshold?(null===s||l>s)&&(s=l):(null===n||l-1?x=v.getOpacityFromRGBA(c):m=v.hexToRgba(v.rgb2hex(c),x),t.opacity&&(x=t.opacity),"pattern"===p&&(n=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:n,fillColor:c,fillOpacity:x,defaultColor:m})),b){var y=f(l.fill.gradient.colorStops)||[],w=l.fill.gradient.type;h&&(y[this.seriesIndex]=this.computeColorStops(s.globals.series[this.seriesIndex],l.plotOptions.line.colors),w="vertical"),o=this.handleGradientFill({type:w,fillConfig:t.fillConfig,fillColor:c,fillOpacity:x,colorStops:y,i:this.seriesIndex})}if("image"===p){var k=l.fill.image.src,A=t.patternID?t.patternID:"",C="pattern".concat(s.globals.cuid).concat(t.seriesNumber+1).concat(A);-1===this.patternIDs.indexOf(C)&&(this.clippedImgArea({opacity:x,image:Array.isArray(k)?t.seriesNumber-1&&(p=v.getOpacityFromRGBA(g));var f=void 0===o.gradient.opacityTo?a:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[n]:o.gradient.opacityTo;if(void 0===o.gradient.gradientToColors||0===o.gradient.gradientToColors.length)d="dark"===o.gradient.shade?c.shadeColor(-1*parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i):c.shadeColor(parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i);else if(o.gradient.gradientToColors[l.seriesNumber]){var x=o.gradient.gradientToColors[l.seriesNumber];d=x,x.indexOf("rgba")>-1&&(f=v.getOpacityFromRGBA(x))}else d=i;if(o.gradient.gradientFrom&&(g=o.gradient.gradientFrom),o.gradient.gradientTo&&(d=o.gradient.gradientTo),o.gradient.inverseColors){var b=g;g=d,d=b}return g.indexOf("rgb")>-1&&(g=v.rgb2hex(g)),d.indexOf("rgb")>-1&&(d=v.rgb2hex(d)),h.drawGradient(e,g,d,p,f,l.size,o.gradient.stops,r,n)}}]),t}(),Vi=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],r=this.w,n=e,o=t,l=null,h=new Mi(this.ctx),c=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(o.x))for(var d=0;d0:r.config.markers.size>0)||s||c){p||(f+=" w".concat(v.randomId()));var x=this.getMarkerConfig({cssClass:f,seriesIndex:e,dataPointIndex:g});if(r.config.series[n].data[g]&&(r.config.series[n].data[g].fillColor&&(x.pointFillColor=r.config.series[n].data[g].fillColor),r.config.series[n].data[g].strokeColor&&(x.pointStrokeColor=r.config.series[n].data[g].strokeColor)),void 0!==a&&(x.pSize=a),(o.x[d]<-r.globals.markers.largestSize||o.x[d]>r.globals.gridWidth+r.globals.markers.largestSize||o.y[d]<-r.globals.markers.largestSize||o.y[d]>r.globals.gridHeight+r.globals.markers.largestSize)&&(x.pSize=0),!p)(r.globals.markers.size[e]>0||s||c)&&!l&&(l=h.group({class:s||c?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),(u=h.drawMarker(o.x[d],o.y[d],x)).attr("rel",g),u.attr("j",g),u.attr("index",e),u.node.setAttribute("default-marker-size",x.pSize),new Li(this.ctx).setSelectionFilter(u,e,g),this.addEvents(u),l&&l.add(u)}else void 0===r.globals.pointsArray[e]&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([o.x[d],o.y[d]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,i=t.seriesIndex,a=t.dataPointIndex,s=void 0===a?null:a,r=t.radius,n=void 0===r?null:r,o=t.size,l=void 0===o?null:o,h=t.strokeWidth,c=void 0===h?null:h,d=this.w,u=this.getMarkerStyle(i),g=null===l?d.globals.markers.size[i]:l,p=d.config.markers;return null!==s&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===i&&t.dataPointIndex===s&&(u.pointStrokeColor=t.strokeColor,u.pointFillColor=t.fillColor,g=t.size,u.pointShape=t.shape)})),{pSize:null===n?g:n,pRadius:null!==n?n:p.radius,pointStrokeWidth:null!==c?c:Array.isArray(p.strokeWidth)?p.strokeWidth[i]:p.strokeWidth,pointStrokeColor:u.pointStrokeColor,pointFillColor:u.pointFillColor,shape:u.pointShape||(Array.isArray(p.shape)?p.shape[i]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[i]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[i]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[i]:p.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(t){var e=this.w,i=new Mi(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,a=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[t]:a,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),Ui=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return s(t,[{key:"draw",value:function(t,e,i){var a=this.w,s=new Mi(this.ctx),r=i.realIndex,n=i.pointsPos,o=i.zRatio,l=i.elParent,h=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(h.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(n.x))for(var c=0;cp.maxBubbleRadius&&(g=p.maxBubbleRadius)}var f=n.x[c],x=n.y[c];if(g=g||0,null!==x&&void 0!==a.globals.series[r][d]||(u=!1),u){var b=this.drawPoint(f,x,g,r,d,e);h.add(b)}l.add(h)}}},{key:"drawPoint",value:function(t,e,i,a,s,r){var n=this.w,o=a,l=new y(this.ctx),h=new Li(this.ctx),c=new ji(this.ctx),d=new Vi(this.ctx),u=new Mi(this.ctx),g=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:s,radius:"bubble"===n.config.chart.type||n.globals.comboCharts&&n.config.series[a]&&"bubble"===n.config.series[a].type?i:null}),p=c.fillPath({seriesNumber:a,dataPointIndex:s,color:g.pointFillColor,patternUnits:"objectBoundingBox",value:n.globals.series[a][r]}),f=u.drawMarker(t,e,g);if(n.config.series[o].data[s]&&n.config.series[o].data[s].fillColor&&(p=n.config.series[o].data[s].fillColor),f.attr({fill:p}),n.config.chart.dropShadow.enabled){var x=n.config.chart.dropShadow;h.dropShadow(f,x,a)}if(!this.initialAnim||n.globals.dataChanged||n.globals.resized)n.globals.animationEnded=!0;else{var b=n.config.chart.animations.speed;l.animateMarker(f,b,n.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(f)}),100)}))}return f.attr({rel:s,j:s,index:a,"default-marker-size":g.pSize}),h.setSelectionFilter(f,a,s),d.addEvents(f),f.node.classList.add("apexcharts-marker"),f}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}]),t}(),qi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"dataLabelsCorrection",value:function(t,e,i,a,s,r,n){var o=this.w,l=!1,h=new Mi(this.ctx).getTextRects(i,n),c=h.width,d=h.height;e<0&&(e=0),e>o.globals.gridHeight+d&&(e=o.globals.gridHeight+d/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:t,y:e,width:c,height:d});var u=o.globals.dataLabelsRects[a].length-2,g=void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(void 0!==o.globals.dataLabelsRects[a][u]){var p=o.globals.dataLabelsRects[a][g];(t>p.x+p.width||e>p.y+p.height||e+de.globals.gridWidth+b.textRects.width+30)&&(o="");var m=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(m=e.globals.dataLabels.style.colors[n]),"function"==typeof m&&(m=m({series:e.globals.series,seriesIndex:r,dataPointIndex:n,w:e})),u&&(m=u);var v=d.offsetX,y=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(v=0,y=0),e.globals.isSlopeChart&&(0!==n&&(v=-2*d.offsetX+5),0!==n&&n!==e.config.series[r].data.length-1&&(v=0)),b.drawnextLabel){if((x=i.drawText({width:100,height:parseInt(d.style.fontSize,10),x:a+v,y:s+y,foreColor:m,textAnchor:l||d.textAnchor,text:o,fontSize:h||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"})).attr({class:f||"apexcharts-datalabel",cx:a,cy:s}),d.dropShadow.enabled){var w=d.dropShadow;new Li(this.ctx).dropShadow(x,w)}c.add(x),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(n)}return x}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,a=i.config.dataLabels.background,s=a.padding,r=a.padding/2,n=e.width,o=e.height,l=new Mi(this.ctx).drawRect(e.x-s,e.y-r/2,n+2*s,o+r,a.borderRadius,"transparent"!==i.config.chart.background&&i.config.chart.background?i.config.chart.background:"#fff",a.opacity,a.borderWidth,a.borderColor);a.dropShadow.enabled&&new Li(this.ctx).dropShadow(l,a.dropShadow);return l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,s=v.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,t&&(e&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i-1&&(t[i].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,i=this.getSeriesByName(t),a=parseInt(null==i?void 0:i.getAttribute("data:realIndex"),10),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),r=null,n=null,o=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){r=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),n=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']"));var l=e.globals.seriesYAxisReverseMap[a];o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']"));else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var h=0;h=t.from&&(r0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1)for(var s=i.config.series.map((function(t,a){return t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(a)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(i.config.series[a].type)>-1)?a:-1})),r="asc"===t?0:s.length-1;"asc"===t?r=0;"asc"===t?r++:r--)if(-1!==s[r]){a=s[r];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,a){for(var s=e[i].childNodes,r={type:a,paths:[],realIndex:e[i].getAttribute("data:realIndex")},n=0;n0)for(var a=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),a=[],s=function(t){var e=function(e){return i[t].getAttribute(e)},s={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};a.push({rect:s,color:i[t].getAttribute("color")})},r=0;r0?t:[]}));return t}}]),t}(),$i=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,a=this.w.globals,s="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,r=0;r=5?this.twoDSeries.push(v.parseNumber(t[e].data[r][4])):this.twoDSeries.push(v.parseNumber(t[e].data[r][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var n=new Date(t[e].data[r][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(t[e].data[r][0]);for(var o=0;o-1&&(r=this.activeSeriesIndex);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,r=new zi(i),n=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isRangeBar="rangeBar"===a.chart.type&&s.isBarHorizontal,s.hasXaxisGroups="category"===a.xaxis.type&&a.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=a.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?s.seriesNames.push(t.name):s.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var o=[],l=f(new Set(a.series.map((function(t){return t.group}))));a.series.forEach((function(t,e){var i=l.indexOf(t.group);o[i]||(o[i]=[]),o[i].push(s.seriesNames[e])})),s.seriesGroups=o;for(var h=function(){for(var t=0;t0&&(this.twoDSeriesX=n,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var d=t[c].data.map((function(t){return v.parseNumber(t)}));s.series.push(d)}s.seriesZ.push(this.threeDSeries),void 0!==t[c].color?s.seriesColors.push(t[c].color):s.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var a=0;a0)i.labels=e.xaxis.categories;else if(e.labels.length>0)i.labels=e.labels.slice();else if(this.fallbackToCategory){if(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric)new Ni(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t)}else this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,a=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var s=i.series.map((function(t,e){return t.data.filter((function(t,e,i){return i.findIndex((function(e){return e.x===t.x}))===e}))})),r=s.reduce((function(t,e,i,a){return a[t].length>e.length?t:i}),0),n=0;n0&&s==i.length&&e.push(a)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}]),t}(),Ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),a=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",a*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"getSvgString",value:function(){var t=this;return new Promise((function(e){var i=t.w,a=i.config.chart.toolbar.export.width,s=i.config.chart.toolbar.export.scale||a/i.globals.svgWidth;s||(s=1);var r=t.w.globals.dom.Paper.svg(),n=t.w.globals.dom.Paper.node.cloneNode(!0);1!==s&&t.scaleSvgNode(n,s),t.convertImagesToBase64(n).then((function(){r=(new XMLSerializer).serializeToString(n),e(r.replace(/ /g," "))}))}))}},{key:"convertImagesToBase64",value:function(t){var e=this,i=t.getElementsByTagName("image"),a=Array.from(i).map((function(t){var i=t.getAttributeNS("http://www.w3.org/1999/xlink","href");return i&&!i.startsWith("data:")?e.getBase64FromUrl(i).then((function(e){t.setAttributeNS("http://www.w3.org/1999/xlink","href",e)})).catch((function(t){console.error("Error converting image to base64:",t)})):Promise.resolve()}));return Promise.all(a)}},{key:"getBase64FromUrl",value:function(t){return new Promise((function(e,i){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var t=document.createElement("canvas");t.width=a.width,t.height=a.height,t.getContext("2d").drawImage(a,0,0),e(t.toDataURL())},a.onerror=i,a.src=t}))}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var t=this;return new Promise((function(e){t.cleanup(),t.getSvgString().then((function(t){var i=new Blob([t],{type:"image/svg+xml;charset=utf-8"});e(URL.createObjectURL(i))}))}))}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var a=e.w,s=t?t.scale||t.width/a.globals.svgWidth:1;e.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*s,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var n="transparent"!==a.config.chart.background&&a.config.chart.background?a.config.chart.background:"#fff",o=r.getContext("2d");o.fillStyle=n,o.fillRect(0,0,r.width*s,r.height*s),e.getSvgString().then((function(t){var e="data:image/svg+xml,"+encodeURIComponent(t),a=new Image;a.crossOrigin="anonymous",a.onload=function(){if(o.drawImage(a,0,0),r.msToBlob){var t=r.msToBlob();i({blob:t})}else{var e=r.toDataURL("image/png");i({imgURI:e})}},a.src=e}))}))}},{key:"exportToSVG",value:function(){var t=this;this.svgUrl().then((function(e){t.triggerDownload(e,t.w.config.chart.toolbar.export.svg.filename,".svg")}))}},{key:"exportToPng",value:function(){var t=this,e=this.w.config.chart.toolbar.export.scale,i=this.w.config.chart.toolbar.export.width,a=e?{scale:e}:i?{width:i}:void 0;this.dataURI(a).then((function(e){var i=e.imgURI,a=e.blob;a?navigator.msSaveOrOpenBlob(a,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,a=t.fileName,s=t.columnDelimiter,r=void 0===s?",":s,n=t.lineDelimiter,o=void 0===n?"\n":n,l=this.w;i||(i=l.config.series);var h=[],c=[],d="",u=l.globals.series.map((function(t,e){return-1===l.globals.collapsedSeriesIndices.indexOf(e)?t:[]})),g=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.categoryFormatter?l.config.chart.toolbar.export.csv.categoryFormatter(t):"datetime"===l.config.xaxis.type&&String(t).length>=10?new Date(t).toDateString():v.isNumber(t)?t:t.split(r).join("")},p=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},x=Math.max.apply(Math,f(i.map((function(t){return t.data?t.data.length:0})))),b=new $i(this.ctx),m=new Ri(this.ctx),y=function(t){var i="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var a=l.globals.yLabelFormatters[0],s=new Zi(e.ctx).getActiveConfigSeriesIndex();i=a(l.globals.labels[t],{seriesIndex:s,dataPointIndex:t,w:l})}else i=m.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?i=l.config.xaxis.categories[t]:l.config.labels.length&&(i=l.config.labels[t]))}else i=l.config.labels[t];return null===i?"nullvalue":(Array.isArray(i)&&(i=i.join(" ")),v.isNumber(i)?i:i.split(r).join(""))},w=function(t,e){if(h.length&&0===e&&c.push(h.join(r)),t.data){t.data=t.data.length&&t.data||f(Array(x)).map((function(){return""}));for(var a=0;a0&&!s.globals.isBarHorizontal&&(this.xaxisLabels=s.globals.timescaleLabels.slice()),s.config.xaxis.overwriteCategories&&(this.xaxisLabels=s.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===s.config.xaxis.position?this.offY=0:this.offY=s.globals.gridHeight,this.offY=this.offY+s.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.xaxisBorderWidth=s.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=s.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=s.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=s.config.xaxis.axisBorder.height,this.yaxis=s.config.yaxis[0]}return s(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new Mi(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});i.add(a);for(var s=[],r=0;r6&&void 0!==arguments[6]?arguments[6]:{},h=[],c=[],d=this.w,u=l.xaxisFontSize||this.xaxisFontSize,g=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,f=l.fontWeight||d.config.xaxis.labels.style.fontWeight,x=l.cssClass||d.config.xaxis.labels.style.cssClass,b=d.globals.padHorizontal,m=a.length,v="category"===d.config.xaxis.type?d.globals.dataPoints:m;if(0===v&&m>v&&(v=m),s){var y=v>1?v-1:v;n=d.globals.gridWidth/Math.min(y,m-1),b=b+r(0,n)/2+d.config.xaxis.labels.offsetX}else n=d.globals.gridWidth/v,b=b+r(0,n)+d.config.xaxis.labels.offsetX;for(var w=function(s){var l=b-r(s,n)/2+d.config.xaxis.labels.offsetX;0===s&&1===m&&n/2===b&&1===v&&(l=d.globals.gridWidth/2);var y=o.axesUtils.getLabel(a,d.globals.timescaleLabels,l,s,h,u,t),w=28;d.globals.rotateXLabels&&t&&(w=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(w+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(u)+(d.globals.xAxisLabelsHeight-d.globals.xAxisGroupLabelsHeight)+(d.globals.rotateXLabels?10:0)),y=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(s,y,m):o.axesUtils.checkForOverflowingLabels(s,y,m,h,c);if(d.config.xaxis.labels.show){var k=e.drawText({x:y.x,y:o.offY+d.config.xaxis.labels.offsetY+w-("top"===d.config.xaxis.position?d.globals.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:"middle",fontWeight:y.isBold?600:f,fontSize:u,fontFamily:g,foreColor:Array.isArray(p)?t&&d.config.xaxis.convertedCatToNumeric?p[d.globals.minX+s-1]:p[s]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(i.add(k),k.on("click",(function(t){if("function"==typeof d.config.chart.events.xAxisLabelClick){var e=Object.assign({},d,{labelIndex:s});d.config.chart.events.xAxisLabelClick(t,o.ctx,e)}})),t){var A=document.createElementNS(d.globals.SVGNS,"title");A.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,k.node.appendChild(A),""!==y.text&&(h.push(y.text),c.push(y))}}sa.globals.gridWidth)){var r=this.offY+a.config.xaxis.axisTicks.offsetY;if(e=e+r+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(e=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new Mi(this.ctx).drawLine(t+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,s+a.config.xaxis.axisTicks.offsetX,e+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var s=0;s0){var h=s[s.length-1].getBBox(),c=s[0].getBBox();h.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),c.x+c.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var d=0;d0&&(this.xaxisLabels=a.globals.timescaleLabels.slice())}return s(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new Mi(this.ctx);t||(t=i.group({class:"apexcharts-grid"}));var a=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),s=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(s),t.add(a),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new Mi(this.ctx),a=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,f(t.config.stroke.width)):t.config.stroke.width,s=function(t){var i=document.createElementNS(e.SVGNS,"clipPath");return i.setAttribute("id",t),i};e.dom.elGridRectMask=s("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=s("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=s("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=s("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=s("nonForecastMask".concat(e.cuid));var r=0,n=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),n=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=i.drawRect(-a/2-r-2,-a/2-2,e.gridWidth+a+n+r+4,e.gridHeight+a+4,0,"#fff");var o=t.globals.markers.largestSize;e.dom.elGridRectMarker=i.drawRect(-o,-o,e.gridWidth+2*o,e.gridHeight+2*o,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,a=t.y1,s=t.x2,r=t.y2,n=t.xCount,o=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===n-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:i,y1:a,x2:s,y2:r,xCount:n,parent:o});var h=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var c=l.globals.groups;if(c){for(var d=0,u=0;d0&&"datetime"!==t.config.xaxis.type&&(s=e.yAxisScale[a].result.length-1);this._drawXYLines({xCount:s,tickAmount:r})}else s=r,r=e.xTickAmount,this._drawInvertedXYLines({xCount:s,tickAmount:r});return this.drawGridBands(s,r),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/s}}},{key:"drawGridBands",value:function(t,e){var i,a,s=this,r=this.w;if((null===(i=r.config.grid.row.colors)||void 0===i?void 0:i.length)>0&&function(t,i,a,n,o,l){for(var h=0,c=0;h=r.config.grid[t].colors.length&&(c=0),s._drawGridBandRect({c:c,x1:a,y1:n,x2:o,y2:l,type:t}),n+=r.globals.gridHeight/e}("row",e,0,0,r.globals.gridWidth,r.globals.gridHeight/e),(null===(a=r.config.grid.column.colors)||void 0===a?void 0:a.length)>0){var n=r.globals.isBarHorizontal||"on"!==r.config.xaxis.tickPlacement||"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric?t:t-1;r.globals.isXNumeric&&(n=r.globals.xAxisScale.result.length-1);for(var o=r.globals.padHorizontal,l=r.globals.padHorizontal+r.globals.gridWidth/n,h=r.globals.gridHeight,c=0,d=0;c=r.config.grid.column.colors.length&&(d=0),"datetime"===r.config.xaxis.type)o=this.xaxisLabels[c].position,l=((null===(u=this.xaxisLabels[c+1])||void 0===u?void 0:u.position)||r.globals.gridWidth)-this.xaxisLabels[c].position;this._drawGridBandRect({c:d,x1:o,y1:0,x2:l,y2:h,type:"column"}),o+=r.globals.gridWidth/n}}}}]),t}(),ta=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"niceScale",value:function(t,e){var i,a,s,r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=1e-11,l=this.w,h=l.globals;h.isBarHorizontal?(i=l.config.xaxis,a=Math.max((h.svgWidth-100)/25,2)):(i=l.config.yaxis[n],a=Math.max((h.svgHeight-100)/15,2)),v.isNumber(a)||(a=10),s=void 0!==i.min&&null!==i.min,r=void 0!==i.max&&null!==i.min;var c=void 0!==i.stepSize&&null!==i.stepSize,d=void 0!==i.tickAmount&&null!==i.tickAmount,u=d?i.tickAmount:h.niceScaleDefaultTicks[Math.min(Math.round(a/2),h.niceScaleDefaultTicks.length-1)];if(h.isMultipleYAxis&&!d&&h.multiAxisTickAmount>0&&(u=h.multiAxisTickAmount,d=!0),u="dataPoints"===u?h.dataPoints-1:Math.abs(Math.round(u)),(t===Number.MIN_VALUE&&0===e||!v.isNumber(t)&&!v.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=v.isNumber(i.min)?i.min:0,e=v.isNumber(i.max)?i.max:t+u,h.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var g=e;e=t,t=g}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var p=[];u<1&&(u=1);var f=u,x=Math.abs(e-t);!s&&t>0&&t/x<.15&&(t=0,s=!0),!r&&e<0&&-e/x<.15&&(e=0,r=!0);var b=(x=Math.abs(e-t))/f,m=b,y=Math.floor(Math.log10(m)),w=Math.pow(10,y),k=Math.ceil(m/w);if(b=m=(k=h.niceScaleAllowedMagMsd[0===h.yValueDecimal?0:1][k])*w,h.isBarHorizontal&&i.stepSize&&"datetime"!==i.type?(b=i.stepSize,c=!0):c&&(b=i.stepSize),c&&i.forceNiceScale){var A=Math.floor(Math.log10(b));b*=Math.pow(10,y-A)}if(s&&r){var C=x/f;if(d)if(c)if(0!=v.mod(x,b)){var S=v.getGCD(b,C);b=C/S<10?S:C}else 0==v.mod(b,C)?b=C:(C=b,d=!1);else b=C;else if(c)0==v.mod(x,b)?C=b:b=C;else if(0==v.mod(x,b))C=b;else{C=x/(f=Math.ceil(x/b));var L=v.getGCD(x,b);x/La&&(t=e-b*u,t+=b*Math.floor((M-t)/b))}else if(s)if(d)e=t+b*f;else{var P=e;e=b*Math.ceil(e/b),Math.abs(e-t)/v.getGCD(x,b)>a&&(e=t+b*u,e+=b*Math.ceil((P-e)/b))}}else if(h.isMultipleYAxis&&d){var I=b*Math.floor(t/b),T=I+b*f;T0&&t16&&v.getPrimeFactors(f).length<2&&f++,!d&&i.forceNiceScale&&0===h.yValueDecimal&&f>x&&(f=x,b=Math.round(x/f)),f>a&&(!d&&!c||i.forceNiceScale)){var z=v.getPrimeFactors(f),X=z.length-1,R=f;t:for(var E=0;EN);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,r=Math.abs(e-t),n=[];if(t===e)return{result:n=[t],niceMin:n[0],niceMax:n[n.length-1]};"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,r))&&(i=this.w.globals.dataPoints-1),s||(s=r/i),s=Math.round(10*(s+Number.EPSILON))/10,i===Number.MAX_VALUE&&(i=5,s=1);for(var o=t;i>=0;)n.push(o),o=v.preciseAddition(o,s),i-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,i){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));for(var a=[],s=Math.ceil(Math.log(e)/Math.log(i)+1),r=Math.floor(Math.log(t)/Math.log(i));r5?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase):this.logarithmicScale(e,i,r.logBase)):i!==-Number.MAX_VALUE&&v.isNumber(i)&&e!==Number.MAX_VALUE&&v.isNumber(e)?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.niceScale(e,i,t)):a.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var i=this.w,a=i.globals,s=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&v.isNumber(e)){var r=a.xTickAmount+1;s<10&&s>1&&(r=s),a.xAxisScale=this.linearScale(t,e,r,0,i.config.xaxis.stepSize)}else a.xAxisScale=this.linearScale(0,10,10);return a.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,i=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var a=i.seriesYAxisMap,s=i.minYArr,r=i.maxYArr;i.allSeriesCollapsed=!0,i.barGroups=[],a.forEach((function(a,n){var o=[];a.forEach((function(t){var i=e.series[t].group;o.indexOf(i)<0&&o.push(i)})),a.length>0?function(){var l,h,c=Number.MAX_VALUE,d=-Number.MAX_VALUE,u=c,g=d;if(e.chart.stacked)!function(){var t=new Array(i.dataPoints).fill(0),s=[],r=[],p=[];o.forEach((function(){s.push(t.map((function(){return Number.MIN_VALUE}))),r.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var f=function(t){!l&&e.series[a[t]].type&&(l=e.series[a[t]].type);var c=a[t];h=e.series[c].group?e.series[c].group:"axis-".concat(n),!(i.collapsedSeriesIndices.indexOf(c)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(c)<0)||(i.allSeriesCollapsed=!1,o.forEach((function(t,a){if(e.series[c].group===t)for(var n=0;n=0?r[a][n]+=o:p[a][n]+=o,s[a][n]+=o,u=Math.min(u,o),g=Math.max(g,o)}}))),"bar"!==l&&"column"!==l||i.barGroups.push(h)},x=0;x1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w.config,r=this.w.globals,n=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=t+1);var l=r.series,h=l,c=l;"candlestick"===s.chart.type?(h=r.seriesCandleL,c=r.seriesCandleH):"boxPlot"===s.chart.type?(h=r.seriesCandleO,c=r.seriesCandleC):r.isRangeData&&(h=r.seriesRangeStart,c=r.seriesRangeEnd);var d=!1;if(r.seriesX.length>=a){var u,g=null===(u=r.brushSource)||void 0===u?void 0:u.w.config.chart.brush;(s.chart.zoom.enabled&&s.chart.zoom.autoScaleYaxis||null!=g&&g.enabled&&null!=g&&g.autoScaleYaxis)&&(d=!0)}for(var p=t;px&&r.seriesX[p][b]>s.xaxis.max;b--);}for(var m=x;m<=b&&mh[p][m]&&h[p][m]<0&&(o=h[p][m])}else r.hasNullValues=!0}"bar"!==f&&"column"!==f||(o<0&&n<0&&(n=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,e=Math.min(e,0)))}return"rangeBar"===s.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&(o=e),"bar"===s.chart.type&&(o<0&&n<0&&(n=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:n,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i,a=Number.MAX_VALUE;if(t.isMultipleYAxis){a=Number.MAX_VALUE;for(var s=0;st.dataPoints&&0!==t.dataPoints&&(a=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(a=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var s=t.maxX-t.minX;s<30&&(a=s-1)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var r=[],n=t.minX-1;n0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,a-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var s=e-a[i-1];s>0&&(t.minXDiff=Math.min(s,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var i=e.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map((function(t){return t}))]);var a={},s={};i.forEach((function(i){a[i]=[],s[i]=[],t.w.config.series.map((function(t,a){return i.indexOf(e.seriesNames[a])>-1?a:null})).filter((function(t){return null!==t})).forEach((function(r){for(var n=0;n0?a[i][n]+=parseFloat(e.series[r][n])+1e-4:s[i][n]+=parseFloat(e.series[r][n]))}}))})),Object.entries(a).forEach((function(t){var i=p(t,1)[0];a[i].forEach((function(t,r){e.maxY=Math.max(e.maxY,a[i][r]),e.minY=Math.min(e.minY,s[i][r])}))}))}}}]),t}(),ia=function(){function t(e,a){i(this,t),this.ctx=e,this.elgrid=a,this.w=e.w;var s=this.w;this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.axisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xAxisoffX="bottom"===s.config.xaxis.position?s.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Ri(e)}return s(t,[{key:"drawYaxis",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.yaxis[t].labels.style,s=a.fontSize,r=a.fontFamily,n=a.fontWeight,o=i.group({class:"apexcharts-yaxis",rel:t,transform:"translate(".concat(e.globals.translateYAxisX[t],", 0)")});if(this.axesUtils.isYAxisHidden(t))return o;var l=i.group({class:"apexcharts-yaxis-texts-g"});o.add(l);var h=e.globals.yAxisScale[t].result.length-1,c=e.globals.gridHeight/h,d=e.globals.yLabelFormatters[t],u=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){var g=e.globals.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?g=0:"heatmap"===e.config.chart.type&&(g-=c/2),g+=parseInt(s,10)/3;for(var p=h;p>=0;p--){var f=d(u[p],p,e),x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(x*=-1);var b=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(a.colors,t),y=Array.isArray(m)?m[p]:m,w=v.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),k=i.drawText({x:x,y:g,text:w.includes(f)&&!e.config.yaxis[t].labels.showDuplicates?"":f,textAnchor:b,fontSize:s,fontFamily:r,fontWeight:n,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(a.cssClass)});l.add(k),this.addTooltip(k,f),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(i,k,firstLabel,e.config.yaxis[t].labels.rotate),g+=c}}return this.addYAxisTitle(i,o,t),this.addAxisBorder(i,o,t,h,c),o}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var i=document.createElementNS(this.w.globals.SVGNS,"title");i.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(i)}},{key:"rotateLabel",value:function(t,e,i,a){var s=t.rotateAroundCenter(i.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(a," ").concat(s.x," ").concat(r.y,")"))}},{key:"addYAxisTitle",value:function(t,e,i){var a=this.w;if(void 0!==a.config.yaxis[i].title.text){var s=t.group({class:"apexcharts-yaxis-title"}),r=a.config.yaxis[i].opposite?a.globals.translateYAxisX[i]:0,n=t.drawText({x:r,y:a.globals.gridHeight/2+a.globals.translateY+a.config.yaxis[i].title.offsetY,text:a.config.yaxis[i].title.text,textAnchor:"end",foreColor:a.config.yaxis[i].title.style.color,fontSize:a.config.yaxis[i].title.style.fontSize,fontWeight:a.config.yaxis[i].title.style.fontWeight,fontFamily:a.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(a.config.yaxis[i].title.style.cssClass)});s.add(n),e.add(s)}}},{key:"addAxisBorder",value:function(t,e,i,a,s){var r=this.w,n=r.config.yaxis[i].axisBorder,o=31+n.offsetX;if(r.config.yaxis[i].opposite&&(o=-31-n.offsetX),n.show){var l=t.drawLine(o,r.globals.translateY+n.offsetY-2,o,r.globals.gridHeight+r.globals.translateY+n.offsetY+2,n.color,0,n.width);e.add(l)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,a,n,r.config.yaxis[i].axisTicks,i,s,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});a.add(s);var r=e.globals.yAxisScale[t].result.length-1,n=e.globals.gridWidth/r+.1,o=n+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,h=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),c=e.globals.timescaleLabels;if(c.length>0&&(this.xaxisLabels=c.slice(),r=(h=c.slice()).length),e.config.xaxis.labels.show)for(var d=c.length?0:r;c.length?d=0;c.length?d++:d--){var u=l(h[d],d,e),g=e.globals.gridWidth+e.globals.padHorizontal-(o-n+e.config.xaxis.labels.offsetX);if(c.length){var p=this.axesUtils.getLabel(h,c,g,d,this.drawnLabels,this.xaxisFontSize);g=p.x,u=p.text,this.drawnLabels.push(p.text),0===d&&e.globals.skipFirstTimelinelabel&&(u=""),d===h.length-1&&e.globals.skipLastTimelinelabel&&(u="")}var f=i.drawText({x:g,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:u,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});s.add(f),f.tspan(u),this.addTooltip(f,u),o+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.xaxis.axisBorder;if(a.show){var s=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(s-=15);var r=i.drawLine(e.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new Mi(this.ctx);if(void 0!==e.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});a.add(s),t.add(a)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),r=s?s.getBoundingClientRect():{width:0,height:0},n=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),o=n?n.getBoundingClientRect():{width:0,height:0};if(n){var l=this.xPaddingForYAxisTitle(t,r,o,e);n.setAttribute("x",l.xPos-(e?10:0));var h=a.rotateAroundCenter(n);n.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(h.x," ").concat(h.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var s=this.w,r=0,n=10;return void 0===s.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(a?r=e.width+s.config.yaxis[t].title.offsetX+i.width/2+n/2:(r=-1*e.width+s.config.yaxis[t].title.offsetX+n/2+i.width/2,s.globals.isBarHorizontal&&(n=25,r=-1*e.width-s.config.yaxis[t].title.offsetX-n)),{xPos:r,padd:n})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,a=0,s=0,r=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach((function(o,l){var h=i.globals.ignoreYAxisIndexes.includes(l)||!o.show||o.floating||0===t[l].width,c=t[l].width+e[l].width;o.opposite?i.globals.isBarHorizontal?(s=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=s-o.labels.offsetX):(s=i.globals.gridWidth+i.globals.translateX+n,h||(n+=c+20),i.globals.translateYAxisX[l]=s-o.labels.offsetX+20):(a=i.globals.translateX-r,h||(r+=c+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;v.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,i){var a=t.config.yaxis[i];if(a&&!a.floating&&void 0!==a.labels.align){var s=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=v.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"))),n=s.getBoundingClientRect();r.forEach((function(t){t.setAttribute("text-anchor",a.labels.align)})),"left"!==a.labels.align||a.opposite?"center"===a.labels.align?s.setAttribute("transform","translate(".concat(n.width/2*(a.opposite?1:-1),", 0)")):"right"===a.labels.align&&a.opposite&&s.setAttribute("transform","translate(".concat(n.width,", 0)")):s.setAttribute("transform","translate(-".concat(n.width,", 0)"))}}))}}]),t}(),aa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.documentEvent=v.bind(this.documentEvent,this)}return s(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var a=i.globals.events[t].indexOf(e);-1!==a&&i.globals.events[t].splice(a,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var a=i.globals.events[t],s=a.length,r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=v.extend(Hi,i);this.w.globals.locale=a.options}}]),t}(),ra=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawAxis",value:function(t,e){var i,a,s=this,r=this.w.globals,n=this.w.config,o=new Qi(this.ctx,e),l=new ia(this.ctx,e);r.axisCharts&&"radar"!==t&&(r.isBarHorizontal?(a=l.drawYaxisInversed(0),i=o.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(a)):(i=o.drawXaxis(),r.dom.elGraphical.add(i),n.yaxis.map((function(t,e){if(-1===r.ignoreYAxisIndexes.indexOf(e)&&(a=l.drawYaxis(e),r.dom.Paper.add(a),"back"===s.w.config.grid.position)){var i=r.dom.Paper.children()[1];i.remove(),r.dom.Paper.add(i)}}))))}}]),t}(),na=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Li(this.ctx),a=t.config.xaxis.crosshairs.fill.gradient,s=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,n=a.colorFrom,o=a.colorTo,l=a.opacityFrom,h=a.opacityTo,c=a.stops,d=s.enabled,u=s.left,g=s.top,p=s.blur,f=s.color,x=s.opacity,b=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(b=e.drawGradient("vertical",n,o,l,h,null,c,null));var m=e.drawRect();1===t.config.xaxis.crosshairs.width&&(m=e.drawLine());var y=t.globals.gridHeight;(!v.isNumber(y)||y<0)&&(y=0);var w=t.config.xaxis.crosshairs.width;(!v.isNumber(w)||w<0)&&(w=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:w,height:y,fill:b,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),d&&(m=i.dropShadow(m,{left:u,top:g,blur:p,color:f,opacity:x})),t.globals.dom.elGraphical.add(m)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var s=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(s)}var r=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(r)}}]),t}(),oa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,a=i.config;if(0!==a.responsive.length){var s=a.responsive.slice();s.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var r=new Wi({}),n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=s[0].breakpoint,n=window.innerWidth>0?window.innerWidth:screen.width;if(n>a){var o=v.clone(i.globals.initialConfig);o.series=v.clone(i.config.series);var l=Pi.extendArrayProps(r,o,i);t=v.extend(l,t),t=v.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var h=0;h0&&"function"==typeof t[0]?(this.isColorFn=!0,i.config.series.map((function(a,s){var r=t[s]||t[0];return"function"==typeof r?r({value:i.globals.axisCharts?i.globals.series[s][0]||0:i.globals.series[s],seriesIndex:s,dataPointIndex:s,w:e.w}):r}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,i){t&&(e[i]=t)}))}},{key:"getMonochromeColors",value:function(t,e,i){var a=t.color,s=t.shadeIntensity,r=t.shadeTo,n=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,o=1/(n/s),l=0;return Array.from({length:n},(function(){var t="dark"===r?i.shadeColor(-1*l,a):i.shadeColor(l,a);return l+=o,t}))}},{key:"applyColorTypes",value:function(t,e){var i=this,a=this.w;t.forEach((function(t){a.globals[t].colors=void 0===a.config[t].colors?i.isColorFn?a.config.colors:e:a.config[t].colors.slice(),i.pushExtraColors(a.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=e||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),t.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,i=[];e.config.series.forEach((function(s,r){s.data.forEach((function(s,n){var o;o=e.globals.series[r][n],a=e.config.dataLabels.formatter(o,{ctx:t.dCtx.ctx,seriesIndex:r,dataPointIndex:n,w:e}),i.push(a)}))}));var a=v.getLargestStringFromArr(i),s=new Mi(this.dCtx.ctx),r=e.config.dataLabels.style,n=s.getTextRects(a,parseInt(r.fontSize),r.fontFamily);return{width:1.05*n.width,height:n.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var a=e.map((function(t,e){return Array.isArray(t)?t.length:1})),s=Math.max.apply(Math,f(a));i=e[a.indexOf(s)]}return i}}]),t}(),da=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();t={width:a.width,height:a.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var s=e.globals.xLabelFormatter,r=v.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);e.globals.isBarHorizontal&&(n=r=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var o=new Xi(this.dCtx.ctx),l=r;r=o.xLabelFormat(s,r,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),n=o.xLabelFormat(s,n,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(n=r="1");var h=new Mi(this.dCtx.ctx),c=h.getTextRects(r,e.config.xaxis.labels.style.fontSize),d=c;if(r!==n&&(d=h.getTextRects(n,e.config.xaxis.labels.style.fontSize)),(t={width:c.width>=d.width?c.width:d.width,height:c.height>=d.height?c.height:d.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return h.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};c=u(r),r!==n&&(d=u(n)),t.height=(c.height>d.height?c.height:d.height)/1.5,t.width=c.width>d.width?c.width:d.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var i,a=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,s=e.globals.groups.map((function(t){return t.title})),r=v.getLargestStringFromArr(s),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),o=new Mi(this.dCtx.ctx),l=o.getTextRects(r,a),h=l;return r!==n&&(h=o.getTextRects(n,a)),i={width:l.width>=h.width?l.width:h.width,height:l.height>=h.height?l.height:h.height},e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new Mi(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,i=a.height}return{width:e,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(t){return t.value})),a=i.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Mi(this.dCtx.ctx).getTextRects(a,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,a=i.globals,s=i.config,r=s.xaxis.type,n=t.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,o){s.yaxis.length>1&&function(t){return-1!==a.collapsedSeriesIndices.indexOf(t)}(o)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var o=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+n/1.75-e.dCtx.yAxisWidthRight,h=o.position-n/1.75+e.dCtx.yAxisWidthLeft,c="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>a.svgWidth-a.translateX-c&&(a.skipLastTimelinelabel=!0),h<-(t.show&&!t.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===r?e.dCtx.gridPad.right(null===(a=String(c(e,o)))||void 0===a?void 0:a.length)?t:e}),d),g=u=c(u,o);if(void 0!==u&&0!==u.length||(u=l.niceMax),e.globals.isBarHorizontal){a=0;var p=e.globals.labels.slice();u=v.getLargestStringFromArr(p),u=c(u,{seriesIndex:n,dataPointIndex:-1,w:e}),g=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,p)}var f=new Mi(t.dCtx.ctx),x="rotate(".concat(r.labels.rotate," 0 0)"),b=f.getTextRects(u,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1),m=b;u!==g&&(m=f.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1)),i.push({width:(h>m.width||h>b.width?h:m.width>b.width?m.width:b.width)+a,height:m.height>b.height?m.height:b.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,a){if(e.show&&void 0!==e.title.text){var s=new Mi(t.dCtx.ctx),r="rotate(".concat(e.title.rotate," 0 0)"),n=s.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);i.push({width:n.width,height:n.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,a=0,s=t.globals.yAxisScale.length>1?10:0,r=new Ri(this.dCtx.ctx),n=function(n,o){var l=t.config.yaxis[o].floating,h=0;n.width>0&&!l?(h=n.width+s,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(o)&&(h=h-n.width-s)):h=l||r.isYAxisHidden(o)?0:5,t.config.yaxis[o].opposite?a+=h:i+=h,e+=h};return t.globals.yLabelsCoords.map((function(t,e){n(t,e)})),t.globals.yTitleCoords.map((function(t,e){n(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,e}}]),t}(),ga=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w,i=e.config,a=e.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.series.length)return 0;var s=function(t){return["bar","rangeBar","candlestick","boxPlot"].includes(t)},r=i.chart.type,n=0,o=s(r)?i.series.length:1;a.comboBarCount>0&&(o=a.comboBarCount),a.collapsedSeries.forEach((function(t){s(t.type)&&(o-=1)})),i.chart.stacked&&(o=1);var l=s(r)||a.comboBarCount>0,h=Math.abs(a.initialMaxX-a.initialMinX);if(l&&a.isXNumeric&&!a.isBarHorizontal&&o>0&&0!==h){h<=3&&(h=a.dataPoints);var c=h/t,d=a.minXDiff&&a.minXDiff/c>0?a.minXDiff/c:0;d>t/2&&(d/=2),(n=d*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),a.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,a=this.dCtx.isSparkline||!i.axisCharts?0:10;["title","subtitle"].forEach((function(s){void 0!==e.config[s].text?a+=e.config[s].margin:a+=t.dCtx.isSparkline||!i.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||i.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight-=s.height+r.height+a,i.translateY+=s.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,a=new Ri(this.dCtx.ctx);i.config.yaxis.forEach((function(s,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||s.floating||a.isYAxisHidden(r)||(s.opposite&&(i.globals.translateX-=e[r].width+t[r].width+parseInt(s.labels.style.fontSize,10)/1.2+12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),pa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new ca(this),this.dimYAxis=new ua(this),this.dimXAxis=new da(this),this.dimGrid=new ga(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return s(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,i=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var a=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,f(e.config.stroke.width)):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var i=p(e,2),a=i[0],s=i[1];t.gridPad[a]=Math.max(s,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(a/2,this.gridPad.top),this.gridPad.bottom=Math.max(a/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var s=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*s,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:a[i].width,index:i}),e.globals.yTitleCoords.push({width:s[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o,n),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,h=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var c=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,h=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,h=0,c=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(r);var d=function(){i.translateX=l+t.datalabelsCoords.width,i.gridHeight=i.svgHeight-t.lgRect.height-h-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(c=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=c,d();break;case"top":i.translateY=this.lgRect.height+c,d();break;case"left":i.translateY=c,i.translateX=this.lgRect.width+l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":i.translateY=c,i.translateX=l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new ia(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,a=0;t.config.legend.show&&!t.config.legend.floating&&(a=20);var s="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[s].offsetY,n=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating){e.gridHeight=e.svgHeight;var o=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(o,e.gridHeight),e.translateY=r,void(e.translateX=n+(e.svgWidth-e.gridWidth)/2)}switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=r-10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+r+10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-a,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+this.lgRect.width+a;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-a-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,i){var a=this.w,s=a.globals.hasXaxisGroups?2:1,r=i.height+t.height+e.height,n=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,o=a.globals.rotateXLabels?22:10,l=a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0;this.xAxisHeight=r*n+s*o+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeightc&&(this.yAxisWidth=c)}}]),t}(),fa=function(){function t(e){i(this,t),this.w=e.w,this.lgCtx=e}return s(t,[{key:"getLegendStyles",value:function(){var t,e,i,a=document.createElement("style");a.setAttribute("type","text/css");var s=(null===(t=this.lgCtx.ctx)||void 0===t||null===(e=t.opts)||void 0===e||null===(i=e.chart)||void 0===i?void 0:i.nonce)||this.w.config.chart.nonce;s&&a.setAttribute("nonce",s);var r=document.createTextNode("\n .apexcharts-flip-y {\n transform: scaleY(-1) translateY(-100%);\n transform-origin: top;\n transform-box: fill-box;\n }\n .apexcharts-flip-x {\n transform: scaleX(-1);\n transform-origin: center;\n transform-box: fill-box;\n }\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-right: 1px;\n }\n\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }\n\n ");return a.appendChild(r),a}},{key:"getLegendDimensions",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(t,e){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var s=null,r=null;if(a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),r=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),r=parseInt(s.getAttribute("rel"),10)-1),e)[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,r)}));else this.hideSeries({seriesEl:s,realIndex:r})}else{var n=a.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(t+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=a.config.plotOptions.pie.donut.labels;new Mi(this.lgCtx.ctx).pathMouseDown(n,null),this.lgCtx.ctx.pie.printDataLabelsInner(n.node,l)}n.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(t){var e=t.realIndex,i=this.w,a=i.globals,s=v.clone(i.config.series);if(a.axisCharts){var r=i.config.yaxis[a.seriesYAxisReverseMap[e]],n={index:e,data:s[e].data.slice(),type:s[e].type||i.config.chart.type};if(r&&r.show&&r.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(e)<0&&(a.ancillaryCollapsedSeries.push(n),a.ancillaryCollapsedSeriesIndices.push(e));else if(a.collapsedSeriesIndices.indexOf(e)<0){a.collapsedSeries.push(n),a.collapsedSeriesIndices.push(e);var o=a.risingSeries.indexOf(e);a.risingSeries.splice(o,1)}}else a.collapsedSeries.push({index:e,data:s[e]}),a.collapsedSeriesIndices.push(e);return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.config.series.length,this._getSeriesBasedOnCollapsedState(s)}},{key:"hideSeries",value:function(t){for(var e=t.seriesEl,i=t.realIndex,a=this.w,s=this.getSeriesAfterCollapsing({realIndex:i}),r=e.childNodes,n=0;n0){for(var r=0;r1;if(this.legendHelpers.appendToForeignObject(),(a||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,i=t.fillcolor,a=this.w,s=document.createElement("span");s.classList.add("apexcharts-legend-marker");var r=a.config.legend.markers.shape||a.config.markers.shape,n=r;Array.isArray(r)&&(n=r[e]);var o=Array.isArray(a.config.legend.markers.size)?parseFloat(a.config.legend.markers.size[e]):parseFloat(a.config.legend.markers.size),l=Array.isArray(a.config.legend.markers.offsetX)?parseFloat(a.config.legend.markers.offsetX[e]):parseFloat(a.config.legend.markers.offsetX),h=Array.isArray(a.config.legend.markers.offsetY)?parseFloat(a.config.legend.markers.offsetY[e]):parseFloat(a.config.legend.markers.offsetY),c=Array.isArray(a.config.legend.markers.strokeWidth)?parseFloat(a.config.legend.markers.strokeWidth[e]):parseFloat(a.config.legend.markers.strokeWidth),d=s.style;if(d.height=2*(o+c)+"px",d.width=2*(o+c)+"px",d.left=l+"px",d.top=h+"px",a.config.legend.markers.customHTML)d.background="transparent",d.color=i[e],Array.isArray(a.config.legend.markers.customHTML)?a.config.legend.markers.customHTML[e]&&(s.innerHTML=a.config.legend.markers.customHTML[e]()):s.innerHTML=a.config.legend.markers.customHTML();else{var g=new Vi(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(n),seriesIndex:e,strokeWidth:c,size:o}),p=window.SVG().addTo(s).size("100%","100%"),f=new Mi(this.ctx).drawMarker(0,0,u(u({},g),{},{pointFillColor:Array.isArray(i)?i[e]:g.pointFillColor,shape:n}));a.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),p.add(f)}return s}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,a=e.globals.seriesNames,s=e.config.legend.markers.fillColors?e.config.legend.markers.fillColors.slice():e.globals.colors.slice();if("heatmap"===e.config.chart.type){var r=e.config.plotOptions.heatmap.colorScale.ranges;a=r.map((function(t){return t.name?t.name:t.from+" - "+t.to})),s=r.map((function(t){return t.color}))}else this.isBarsDistributed&&(a=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(a=e.config.legend.customLegendItems);for(var n=e.globals.legendFormatter,o=e.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var h,c=n(a[l],{seriesIndex:l,w:e}),d=!1,u=!1;if(e.globals.collapsedSeries.length>0)for(var g=0;g0)for(var p=0;p0?l-10:0)+(h>0?h-10:0)}a.style.position="absolute",r=r+t+i.config.legend.offsetX,n=n+e+i.config.legend.offsetY,a.style.left=r+"px",a.style.top=n+"px","right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px");["width","height"].forEach((function(t){a.style[t]&&(a.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new pa(this.ctx),i=e.dimHelpers.getTitleSubtitleCoords("title"),a=e.dimHelpers.getTitleSubtitleCoords("subtitle"),s=0;"top"===t.config.legend.position&&(s=i.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,s)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new Zi(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new Zi(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,a="true"===t.target.getAttribute("data:collapsed"),s=this.w.config.chart.events.legendClick;"function"==typeof s&&s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;"function"==typeof r&&t.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),t}(),ba=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=a.globals.minX,this.maxX=a.globals.maxX}return s(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=e.config.chart.toolbar.offsetY+"px",a.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s\n \n \n\n'),n("zoomOut",this.elZoomOut,'\n \n \n\n');var o=function(i){t.t[i]&&e.config.chart[i].enabled&&r.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'\n \n \n \n':'\n \n \n',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&e.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,'\n \n \n'),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;lthis.wheelDelay&&(this.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){a-i.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,i=this.w;this.minX=i.globals.isRangeBar?i.globals.minY:i.globals.minX,this.maxX=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;var a=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(a){var s,r,n,o=(t.clientX-a.left)/a.width,l=this.minX,h=this.maxX,c=h-l;if(t.deltaY<0){var d=l+o*c;r=d-(s=.5*c)/2,n=d+s/2}else r=l-(s=1.5*c)/2,n=h+s/2;if(!i.globals.isRangeBar){r=Math.max(r,i.globals.initialMinX),n=Math.min(n,i.globals.initialMaxX);var u=.01*(i.globals.initialMaxX-i.globals.initialMinX);if(n-r0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,i,a,s){return"l"===s||"r"===s?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resizing",this.selectionDragging.bind(this,"resizing")))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(u(u({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,a=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i;t.globals.isRangeBar&&(i=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,a=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var s={x:i,y:0,width:a,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(s),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,a=t.width,s=t.height,r=t.translateX,n=void 0===r?0:r,o=t.translateY,l=void 0===o?0:o,h=this.w,c=this.zoomRect,d=this.selectionRect;if(this.dragged||null!==h.globals.selection){var u={transform:"translate("+n+", "+l+")"};h.globals.zoomEnabled&&this.dragged&&(a<0&&(a=1),c.attr({x:e,y:i,width:a,height:s,fill:h.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":h.config.chart.zoom.zoomedArea.fill.opacity,stroke:h.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":h.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":h.config.chart.zoom.zoomedArea.stroke.opacity}),Mi.setAttrs(c.node,u)),h.globals.selectionEnabled&&(d.attr({x:e,y:i,width:a>0?a:0,height:s>0?s:0,fill:h.config.chart.selection.fill.color,"fill-opacity":h.config.chart.selection.fill.opacity,stroke:h.config.chart.selection.stroke.color,"stroke-width":h.config.chart.selection.stroke.width,"stroke-dasharray":h.config.chart.selection.stroke.dashArray,"stroke-opacity":h.config.chart.selection.stroke.opacity}),Mi.setAttrs(d.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.gridRect.getBoundingClientRect(),n=s.startX-1,o=s.startY,l=!1,h=!1,c=s.clientX-r.left-n,d=s.clientY-r.top-o,g={translateX:a.globals.translateX,translateY:a.globals.translateY};return Math.abs(c+n)>a.globals.gridWidth?c=a.globals.gridWidth-n:s.clientX-r.left<0&&(c=n),n>s.clientX-r.left&&(l=!0,c=Math.abs(c)),o>s.clientY-r.top&&(h=!0,d=Math.abs(d)),g=u(u({},g="x"===i?{x:l?n-c:n,y:0,width:c,height:a.globals.gridHeight}:"y"===i?{x:0,y:h?o-d:o,width:a.globals.gridWidth,height:d}:{x:l?n-c:n,y:h?o-d:o,width:c,height:d}),{},{translateX:a.globals.translateX,translateY:a.globals.translateY}),s.drawSelectionRect(g),s.selectionDragging("resizing"),g}},{key:"selectionDragging",value:function(t,e){var i=this,a=this.w;if(e){e.preventDefault();var s=e.detail,r=s.handler,n=s.box,o=n.x,l=n.y;othis.constraints.x2&&(o=this.constraints.x2-n.w),n.y2>this.constraints.y2&&(l=this.constraints.y2-n.h),r.move(o,l);var h=this.xyRatios,c=this.selectionRect,d=0;"resizing"===t&&(d=30);var u=function(t){return parseFloat(c.node.getAttribute(t))},g={x:u("x"),y:u("y"),width:u("width"),height:u("height")};a.globals.selection=g,"function"==typeof a.config.chart.events.selection&&a.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,s,r,n=i.gridRect.getBoundingClientRect(),o=c.node.getBoundingClientRect();a.globals.isRangeBar?(t=a.globals.yAxisScale[0].niceMin+(o.left-n.left)*h.invertedYRatio,e=a.globals.yAxisScale[0].niceMin+(o.right-n.left)*h.invertedYRatio,s=0,r=1):(t=a.globals.xAxisScale.niceMin+(o.left-n.left)*h.xRatio,e=a.globals.xAxisScale.niceMin+(o.right-n.left)*h.xRatio,s=a.globals.yAxisScale[0].niceMin+(n.bottom-o.bottom)*h.yRatio[0],r=a.globals.yAxisScale[0].niceMax-(o.top-n.top)*h.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:s,max:r}};a.config.chart.events.selection(i.ctx,l),a.config.chart.brush.enabled&&void 0!==a.config.chart.events.brushScrolled&&a.config.chart.events.brushScrolled(i.ctx,l)}),d))}}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.xyRatios,n=this.ctx.toolbar;if(s.startX>s.endX){var o=s.startX;s.startX=s.endX,s.endX=o}if(s.startY>s.endY){var l=s.startY;s.startY=s.endY,s.endY=l}var h=void 0,c=void 0;a.globals.isRangeBar?(h=a.globals.yAxisScale[0].niceMin+s.startX*r.invertedYRatio,c=a.globals.yAxisScale[0].niceMin+s.endX*r.invertedYRatio):(h=a.globals.xAxisScale.niceMin+s.startX*r.xRatio,c=a.globals.xAxisScale.niceMin+s.endX*r.xRatio);var d=[],u=[];if(a.config.yaxis.forEach((function(t,e){var i=a.globals.seriesYAxisMap[e][0];d.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.startY),u.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.endY)})),s.dragged&&(s.dragX>10||s.dragY>10)&&h!==c)if(a.globals.zoomEnabled){var g=v.clone(a.globals.initialConfig.yaxis),p=v.clone(a.globals.initialConfig.xaxis);if(a.globals.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),c=Math.floor(c),h<1&&(h=1,c=a.globals.dataPoints),c-h<2&&(c=h+1)),"xy"!==i&&"x"!==i||(p={min:h,max:c}),"xy"!==i&&"y"!==i||g.forEach((function(t,e){g[e].min=u[e],g[e].max=d[e]})),n){var f=n.getBeforeZoomRange(p,g);f&&(p=f.xaxis?f.xaxis:p,g=f.yaxis?f.yaxis:g)}var x={xaxis:p};a.config.chart.group||(x.yaxis=g),s.ctx.updateHelpers._updateOptions(x,!1,s.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&n.zoomCallback(p,g)}else if(a.globals.selectionEnabled){var b,m=null;b={min:h,max:c},"xy"!==i&&"y"!==i||(m=v.clone(a.config.yaxis)).forEach((function(t,e){m[e].min=u[e],m[e].max=d[e]})),a.globals.selection=s.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(s.ctx,{xaxis:b,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,a=e;if(void 0!==i.globals.lastClientPosition.x){var s=i.globals.lastClientPosition.x-a.clientX,r=i.globals.lastClientPosition.y-a.clientY;Math.abs(s)>Math.abs(r)&&s>0?this.moveDirection="left":Math.abs(s)>Math.abs(r)&&s<0?this.moveDirection="right":Math.abs(r)>Math.abs(s)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(s)&&r<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var n=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||a.panScrolled(n,o)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,a=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+a,i=t.globals.maxX+a):"right"===this.moveDirection&&(e=t.globals.minX-a,i=t.globals.maxX-a),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,a=this.xyRatios,s=v.clone(i.globals.initialConfig.yaxis),r=a.xRatio,n=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(r=a.invertedYRatio,n=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(t=n+i.globals.gridWidth/15*r,e=o+i.globals.gridWidth/15*r):"right"===this.moveDirection&&(t=n-i.globals.gridWidth/15*r,e=o-i.globals.gridWidth/15*r),i.globals.isRangeBar||(ti.globals.initialMaxX)&&(t=n,e=o);var l={xaxis:{min:t,max:e}};i.config.chart.group||(l.yaxis=s),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var a=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),a}(),va=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return s(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,a=t.clientX,s=t.clientY,r=this.w,n=i.getBoundingClientRect(),o=n.width,l=n.height,h=o/(r.globals.dataPoints-1),c=l/r.globals.dataPoints,d=this.hasBars();!r.globals.comboCharts&&!d||r.config.xaxis.convertedCatToNumeric||(h=o/r.globals.dataPoints);var u=a-n.left-r.globals.barPadForNumericAxis,g=s-n.top;u<0||g<0||u>o||g>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var p=Math.round(u/h),f=Math.floor(g/c);d&&!r.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(u/h),p-=1);var x=null,b=null,m=r.globals.seriesXvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))})),y=r.globals.seriesYvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))}));if(r.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),k=u*(w.width/o),A=g*(w.height/l);x=(b=this.closestInMultiArray(k,A,m,y)).index,p=b.j,null!==x&&(m=r.globals.seriesXvalues[x],p=(b=this.closestInArray(k,m)).index)}return r.globals.capturedSeriesIndex=null===x?-1:x,(!p||p<1)&&(p=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=f:r.globals.capturedDataPointIndex=p,{capturedSeries:x,j:r.globals.isBarHorizontal?f:p,hoverX:u,hoverY:g}}},{key:"closestInMultiArray",value:function(t,e,i,a){var s=this.w,r=0,n=null,o=-1;s.globals.series.length>1?r=this.getFirstActiveXArray(i):n=0;var l=i[r][0],h=Math.abs(t-l);if(i.forEach((function(e){e.forEach((function(e,i){var a=Math.abs(t-e);a<=h&&(h=a,o=i)}))})),-1!==o){var c=a[r][o],d=Math.abs(e-c);n=r,a.forEach((function(t,i){var a=Math.abs(e-t[o]);a<=d&&(d=a,n=i)}))}return{index:n,j:o}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,i=0,a=t.map((function(t,e){return t.length>0?e:-1})),s=0;s0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=f(t)).sort((function(t,e){var i=Number(t.getAttribute("data:realIndex")),a=Number(e.getAttribute("data:realIndex"));return ai?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var i=Number(t.getAttribute("cx")),a=Number(t.getAttribute("cy")),s=t.getAttribute("shape");return new Mi(this.ctx).getMarkerPath(i,a,s,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s ').concat(i.attrs.name,""),e+="
".concat(i.val,"
")})),m.innerHTML=t+"",v.innerHTML=e+""};n?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?y():(m.innerHTML="",v.innerHTML=""):y()}else m.innerHTML="",v.innerHTML="";null!==p&&(a[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:"");if(n&&f[0]){if(l.config.tooltip.hideEmptySeries){var w=a[e].querySelector(".apexcharts-tooltip-marker"),k=a[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(c)?(w.style.display="none",k.style.display="none"):(w.style.display="block",k.style.display="block")}null==c||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)?f[0].parentNode.style.display="none":f[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)&&(f[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var i=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));a&&(a.classList.add("apexcharts-active"),a.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",n="",o=null,l=null,h={series:a.globals.series,seriesIndex:e,dataPointIndex:i,w:a},c=a.globals.ttZFormatter;null===i?l=a.globals.series[e]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(r=s[e][i],0===s[e].length&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=new $i(this.ctx).isFormatXY()?void 0!==a.config.series[e].data[i]?a.config.series[e].data[i].x:"":void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var d=r;a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?r=new Xi(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(this.ctx).formatDate,w:this.w}):r=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](d,h):a.globals.xLabelFormatter(d,h);return void 0!==a.config.tooltip.x.formatter&&(r=a.globals.ttKeyFormatter(d,h)),a.globals.seriesZ.length>0&&a.globals.seriesZ[e].length>0&&(o=c(a.globals.seriesZ[e][i],a)),n="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(d,h):r,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,a=t.y1,s=t.y2,r=t.w,n=this.ttCtx.getElTooltip(),o=r.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]),n.innerHTML=o({ctx:this.ctx,series:r.globals.series,seriesIndex:e,dataPointIndex:i,y1:a,y2:s,w:r})}}]),t}(),wa=function(){function t(e){i(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return s(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=t-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(null!==e&&(r=a.globals.gridWidth/n*e),null===s||a.globals.isBarHorizontal||(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=r;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Mi.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Mi.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=e.globals.translateX;var s;s=new Mi(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=e.globals.translateY+a,r=i.yaxisTTEls[t].getBoundingClientRect().height,n=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(n-=26),s-=r/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=n+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),n=s.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(t)+o+5,h=parseFloat(e)+o/2;if(l>a.globals.gridWidth/2&&(l=l-n.ttWidth-o-10),l>a.globals.gridWidth-n.ttWidth-10&&(l=a.globals.gridWidth-n.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var c=s.getElGrid().getBoundingClientRect();(l=s.e.clientX-c.left)>a.globals.gridWidth/2&&(l-=s.tooltipRect.ttWidth),(h=s.e.clientY+a.globals.translateY-c.top)>a.globals.gridHeight/2&&(h-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+h>a.globals.gridHeight&&(h=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(l)||(l+=a.globals.translateX,r.style.left=l+"px",r.style.top=h+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),r=0;r0){var g=u.getAttribute("shape"),p=l.getMarkerPath(s,r,g,1.5*c);u.setAttribute("d",p)}this.moveXCrosshairs(s),o.fixedTooltip||this.moveTooltip(s,r,c)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,a=i.w,s=0,r=0,n=a.globals.pointsArray,o=new Zi(this.ctx),l=new Mi(this.ctx);e=o.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var h=i.tooltipUtil.getHoverMarkerSize(e);n[e]&&(s=n[e][t][0],r=n[e][t][1]);var c=i.tooltipUtil.getAllMarkers();if(null!==c)for(var d=0;d0){var b=l.getMarkerPath(s,g,f,h);c[d].setAttribute("d",b)}else c[d].setAttribute("d","")}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,r||a.globals.gridHeight,h)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(r=new Zi(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"']"));n||"number"!=typeof e||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var o=n?parseFloat(n.getAttribute("cx")):0,l=n?parseFloat(n.getAttribute("cy")):0,h=n?parseFloat(n.getAttribute("barWidth")):0,c=a.getElGrid().getBoundingClientRect(),d=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!d&&(o-=s%2!=0?h/2:0),n&&d&&i.globals.comboCharts&&(o-=h/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[t-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[t]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?l-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?l=a.e.clientY-c.top-a.tooltipRect.ttHeight/2:l+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(l=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,l||i.globals.gridHeight)}}]),t}(),ka=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new wa(e)}return s(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Vi(this.ctx),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=f(a),t.config.chart.stacked&&a.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w;"bubble"!==s.config.chart.type&&this.newPointSize(t,e);var r=e.getAttribute("cx"),n=e.getAttribute("cy");if(null!==i&&null!==a&&(r=i,n=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===s.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(r,n,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,a=this.ttCtx,s=t,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=e.config.markers.hover.size,o=0;o0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],i);t[e].setAttribute("d",a)}else t[e].setAttribute("d","M0,0")}}}]),t}(),Aa=function(){function t(e){i(this,t),this.w=e.w;var a=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!a.globals.isBarHorizontal&&"rangeBar"===a.config.chart.type&&a.config.plotOptions.bar.rangeBarGroupRows}return s(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,s=t.y,r=t.type,n=this.ttCtx,o=this.w;if(e.target.classList.contains("apexcharts-".concat(r,"-rect"))){var l=this.getAttr(e,"i"),h=this.getAttr(e,"j"),c=this.getAttr(e,"cx"),d=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),g=this.getAttr(e,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:h,shared:!1,e:e}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=h,a=c+n.tooltipRect.ttWidth/2+u,s=d+n.tooltipRect.ttHeight/2-g/2,n.tooltipPosition.moveXCrosshairs(c+u/2),a>o.globals.gridWidth/2&&(a=c-n.tooltipRect.ttWidth/2+u),n.w.config.tooltip.followCursor){var p=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-p.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),s=o.globals.clientY-p.top-(s>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=t.x,n=t.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var h=parseInt(s.paths.getAttribute("cx"),10),c=parseInt(s.paths.getAttribute("cy"),10),d=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),e=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=v.findAncestor(s.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,e,i),o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=i,r=h,n=c+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var g=l.getElGrid().getBoundingClientRect();n=l.e.clientY+o.globals.translateY-g.top}d<0&&(n=c),l.marker.enlargeCurrentPoint(i,s.paths,r,n)}return{x:r,y:n}}},{key:"handleBarTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=this.ttCtx,o=n.getElTooltip(),l=0,h=0,c=0,d=this.getBarTooltipXY({e:a,opt:s});if(null!==d.j||0!==d.barHeight||0!==d.barWidth){e=d.i;var u=d.j;if(r.globals.capturedSeriesIndex=e,r.globals.capturedDataPointIndex=u,r.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!r.config.tooltip.shared?(h=d.x,c=d.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[e]:r.config.stroke.width,l=h):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(c)&&(c=r.globals.svgHeight-n.tooltipRect.ttHeight),parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),h+n.tooltipRect.ttWidth>r.globals.gridWidth?h-=n.tooltipRect.ttWidth:h<0&&(h=0),n.w.config.tooltip.followCursor){var g=n.getElGrid().getBoundingClientRect();c=n.e.clientY-g.top}null===n.tooltip&&(n.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?n.tooltipPosition.moveXCrosshairs(l+i/2):n.tooltipPosition.moveXCrosshairs(l)),!n.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(c=c+r.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=h+r.globals.translateX+"px",o.style.top=c+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,i=t.e,a=t.opt,s=this.w,r=null,n=this.ttCtx,o=0,l=0,h=0,c=0,d=0,u=i.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){var g=i.target,p=g.getBoundingClientRect(),f=a.elGrid.getBoundingClientRect(),x=p.height;d=p.height;var b=p.width,m=parseInt(g.getAttribute("cx"),10),v=parseInt(g.getAttribute("cy"),10);c=parseFloat(g.getAttribute("barWidth"));var y="touchmove"===i.type?i.touches[0].clientX:i.clientX;r=parseInt(g.getAttribute("j"),10),o=parseInt(g.parentNode.getAttribute("rel"),10)-1;var w=g.getAttribute("data-range-y1"),k=g.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(g.parentNode.getAttribute("data:realIndex"),10));var A=function(t){return s.globals.isXNumeric?m-b/2:e.isVerticalGroupedRangeBar?m+b/2:m-n.dataPointsDividedWidth+b/2},C=function(){return v-n.dataPointsDividedHeight+x/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:r,y1:w?parseInt(w,10):null,y2:k?parseInt(k,10):null,shared:!n.showOnIntersect&&s.config.tooltip.shared,e:i}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(l=y-f.left+15,h=C()):(l=A(),h=i.clientY-f.top-n.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((l=m)0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var a=this.ttCtx,s=this.w,r=s.globals,n=r.seriesYAxisMap[t];if(a.yaxisTooltips[t]&&n.length>0){var o=r.yLabelFormatters[t],l=a.getElGrid().getBoundingClientRect(),h=n[0],c=0;i.yRatio.length>1&&(c=h);var d=(e-l.top)*i.yRatio[c],u=r.maxYArr[h]-r.minYArr[h],g=r.minYArr[h]+(u-d);s.config.yaxis[t].reversed&&(g=r.maxYArr[h]-(u-d)),a.tooltipPosition.moveYCrosshairs(e-l.top),a.yaxisTooltipText[t].innerHTML=o(g),a.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),Sa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.tConfig=a.config.tooltip,this.tooltipUtil=new va(this),this.tooltipLabels=new ya(this),this.tooltipPosition=new wa(this),this.marker=new ka(this),this.intersect=new Aa(this),this.axesTooltip=new Ca(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!a.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return s(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new Qi(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,a=[],s=this.getElTooltip(),r=function(r){var n=document.createElement("div");n.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(r)),n.style.order=i.config.tooltip.inverseOrder?t-r:r+1;var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[r],n.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var a=document.createElement("span");a.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(a),l.appendChild(e)})),n.appendChild(l),s.appendChild(n),a.push(n)},n=0;n0&&this.addPathsEventListeners(g,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(r=r+t.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+t.globals.svgHeight-s-10),e.style.left=r+"px",e.style.top=n+"px",{x:r,y:n,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,a=function(a){var s={paths:t[a],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[a].addEventListener(e,i.onSeriesHover.bind(i,s),{capture:!1,passive:!0})}))},s=0;s=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(t,e)}),20-a))}},{key:"seriesHover",value:function(t,e){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||0===s.globals.dataPoints)||(a.length?a.forEach((function(a){var s=i.getElTooltip(a),r={paths:t.paths,tooltipEl:s,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===i.w.globals.minX&&a.w.globals.maxX===i.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:r,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,a=t.opt,s=t.e,r=e.w,n=this.getElTooltip(e);if(n){if(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=s,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared)if(this.tConfig.onDatasetHover.highlightDataSeries)new Zi(e).toggleSeriesOnHover(s,s.target.parentNode);i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect})}}},{key:"axisChartsTooltips",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=s.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,ln.top+n.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var h=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(h)<0)return void this.handleMouseOut(s)}var c=this.getElTooltip(),d=this.getElXCrosshairs(),u=[];r.config.chart.group&&(u=this.ctx.getSyncedCharts());var g=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;null!==d&&d.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),g&&!this.showOnIntersect||u.length>1)this.handleStickyTooltip(a,o,l,s);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:e,y:i,type:r.config.chart.type});e=f.x,i=f.y,c.style.left=e+"px",c.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:e,y:i});if(this.yaxisTooltips.length)for(var x=0;xl.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(t,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||s.globals.isBarHorizontal){var h=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,h,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,i,a){var s=this.w;if(!this.tConfig.shared&&null===s.globals.series[e][a])return void this.handleMouseOut(i);if(void 0!==s.globals.series[e][a])this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,a,i.ttItems):this.create(t,this,e,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var r=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,r,a,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Mi(this.ctx),i=t.globals.dom.Paper.find(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,A=this.w,C=e;"mouseup"===t.type&&this.markerClick(t,i,a),null===k&&(k=this.tConfig.shared);var S=this.tooltipUtil.hasMarkers(i),L=this.tooltipUtil.getElBars();if(A.config.legend.tooltipHoverFormatter){var M=A.config.legend.tooltipHoverFormatter,P=Array.from(this.legendLabels);P.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var I=0;I0?C.marker.enlargePoints(a):C.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var Y=new Mi(this.ctx),H=A.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var O=0;O0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*k)),w){u=u+d.height/2-b/2-2}var C=e.globals.series[i][a]<0,S=o;switch(this.barCtx.isReversed&&(S=o+(C?c:-c)),f.position){case"center":g=w?C?S-c/2+v:S+c/2-v:C?S-c/2+d.height/2+v:S+c/2+d.height/2-v;break;case"bottom":g=w?C?S-c+v:S+c-v:C?S-c+d.height+b+v:S+c-d.height/2+b-v;break;case"top":g=w?C?S+v:S-v:C?S-d.height/2-v:S+d.height+v}if(this.barCtx.lastActiveBarSerieIndex===s&&x.enabled){var L=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:a}),p.fontSize);r=C?S-L.height/2-v-x.offsetY+18:S+L.height+v+x.offsetY-18;var M=A;n=y+(e.globals.isXNumeric?-h*e.globals.barGroups.length/2:e.globals.barGroups.length*h/2-(e.globals.barGroups.length-1)*h-M)+x.offsetX}return e.config.chart.stacked||(g<0?g=0+b:g+d.height/3>e.globals.gridHeight&&(g=e.globals.gridHeight-b)),{bcx:l,bcy:o,dataLabelsX:u,dataLabelsY:g,totalDataLabelsX:n,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,a=t.i,s=t.j,r=t.realIndex,n=t.bcy,o=t.barHeight,l=t.barWidth,h=t.textRects,c=t.dataLabelsX,d=t.strokeWidth,u=t.dataLabelsConfig,g=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,f=t.offX,x=t.offY,b=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var m,v,y=n-(this.barCtx.isRangeBar?0:b)+o/2+h.height/2+x-3,w="start",k=e.globals.series[a][s]<0,A=i;switch(this.barCtx.isReversed&&(A=i+(k?-l:l),w=k?"start":"end"),g.position){case"center":c=k?A+l/2-f:Math.max(h.width/2,A-l/2)+f;break;case"bottom":c=k?A+l-d-f:A-l+d+f;break;case"top":c=k?A-d-f:A-d+f}if(this.barCtx.lastActiveBarSerieIndex===r&&p.enabled){var C=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:s}),u.fontSize);k?(m=A-d-f-p.offsetX,w="end"):m=A+f+p.offsetX+(this.barCtx.isReversed?-(l+d):d),v=y-h.height/2+C.height/2+p.offsetY+d}return e.config.chart.stacked||("start"===u.textAnchor?c-h.width<0?c=k?h.width+d:d:c+h.width>e.globals.gridWidth&&(c=k?e.globals.gridWidth-d:e.globals.gridWidth-h.width-d):"middle"===u.textAnchor?c-h.width/2<0?c=h.width/2+d:c+h.width/2>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width/2-d):"end"===u.textAnchor&&(c<1?c=h.width+d:c+1>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width-d))),{bcx:i,bcy:n,dataLabelsX:c,dataLabelsY:y,totalDataLabelsX:m,totalDataLabelsY:v,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.i,r=t.j,n=t.textRects,o=t.barHeight,l=t.barWidth,h=t.dataLabelsConfig,c=this.w,d="rotate(0)";"vertical"===c.config.plotOptions.bar.dataLabels.orientation&&(d="rotate(-90, ".concat(e,", ").concat(i,")"));var g=new qi(this.barCtx.ctx),p=new Mi(this.barCtx.ctx),f=h.formatter,x=null,b=c.globals.collapsedSeriesIndices.indexOf(s)>-1;if(h.enabled&&!b){x=p.group({class:"apexcharts-data-labels",transform:d});var m="";void 0!==a&&(m=f(a,u(u({},c),{},{seriesIndex:s,dataPointIndex:r,w:c}))),!a&&c.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(m="");var v=c.globals.series[s][r]<0,y=c.config.plotOptions.bar.dataLabels.position;if("vertical"===c.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(h.textAnchor=v?"end":"start"),"center"===y&&(h.textAnchor="middle"),"bottom"===y&&(h.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels)lMath.abs(l)&&(m=""):n.height/1.6>Math.abs(o)&&(m=""));var w=u({},h);this.barCtx.isHorizontal&&a<0&&("start"===h.textAnchor?w.textAnchor="end":"end"===h.textAnchor&&(w.textAnchor="start")),g.plotDataLabelsText({x:e,y:i,text:m,i:s,j:r,parent:x,dataLabelsConfig:w,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}},{key:"drawTotalDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.realIndex,r=t.textAnchor,n=t.barTotalDataLabelsConfig;this.w;var o,l=new Mi(this.barCtx.ctx);return n.enabled&&void 0!==e&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===s&&(o=l.drawText({x:e,y:i,foreColor:n.style.color,text:a,textAnchor:r,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),o}}]),t}(),Ma=function(){function t(e){i(this,t),this.w=e.w,this.barCtx=e}return s(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[i].length),e.globals.isXNumeric)for(var a=0;ae.globals.minX&&e.globals.seriesX[i][a]0&&(a=l.globals.minXDiff/d),(r=a/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),n=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+(a-r*this.barCtx.seriesLen)/2}return l.globals.barHeight=s,l.globals.barWidth=r,{x:t,y:e,yDivision:i,xDivision:a,barHeight:s,barWidth:r,zeroH:n,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,i,a){var s,r,n,o,l=this.w,h=this.barCtx.ctx.fill,c=null,d=this.barCtx.barOptions.distributed?i:e;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(a){t[e][i]>=a.from&&t[e][i]<=a.to&&(c=a.color)}));return h.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:a,dataPointIndex:i,color:c,value:t[e][i],fillConfig:null===(s=l.config.series[e].data[i])||void 0===s?void 0:s.fill,fillType:null!==(r=l.config.series[e].data[i])&&void 0!==r&&null!==(n=r.fill)&&void 0!==n&&n.type?null===(o=l.config.series[e].data[i])||void 0===o?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[a]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,i){var a=0,s=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"createBorderRadiusArr",value:function(t){var e,i=this.w,a=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,s=t.length,n=0|(null===(e=t[0])||void 0===e?void 0:e.length),o=Array.from({length:s},(function(){return Array(n).fill(a?"top":"none")}));if(a)return o;for(var l=0;l0?(h.push(u),d++):g<0&&(c.push(u),d++)}if(h.length>0&&0===c.length)if(1===h.length)o[h[0]][l]="both";else{var p,f=h[0],x=h[h.length-1],b=r(h);try{for(b.s();!(p=b.n()).done;){var m=p.value;o[m][l]=m===f?"bottom":m===x?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===h.length)if(1===c.length)o[c[0]][l]="both";else{var v,y=Math.max.apply(Math,c),w=Math.min.apply(Math,c),k=r(c);try{for(k.s();!(v=k.n()).done;){var A=v.value;o[A][l]=A===y?"bottom":A===w?"top":"none"}}catch(t){k.e(t)}finally{k.f()}}else if(h.length>0&&c.length>0){var C,S=h[h.length-1],L=r(h);try{for(L.s();!(C=L.n()).done;){var M=C.value;o[M][l]=M===S?"top":"none"}}catch(t){L.e(t)}finally{L.f()}var P,I=Math.max.apply(Math,c),T=r(c);try{for(T.s();!(P=T.n()).done;){var z=P.value;o[z][l]=z===I?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else if(1===d){o[h[0]||c[0]][l]="both"}}return o}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,a=t.x1,s=t.x2,r=t.y1,n=t.y2,o=t.elSeries,l=this.w,h=new Mi(this.barCtx.ctx),c=new Zi(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var d=this.barCtx.barOptions.colors.backgroundBarColors[e],u=h.drawRect(void 0!==a?a:0,void 0!==r?r:0,void 0!==s?s:l.globals.gridWidth,void 0!==n?n:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,i=t.barWidth,a=t.barXPosition,s=t.y1,r=t.y2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.columnWidthOffset&&(x=a-g.config.series[c].data[u].columnWidthOffset/2,f=i+g.config.series[c].data[u].columnWidthOffset);var b=n/2,m=x+b,v=x+f-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001-b*y,r+=.001+b*y;var w=p.move(m,s),k=p.move(m,s),A=p.line(v,s);if(g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1)),w=w+p.line(m,r)+p.line(v,r)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(m,s)+A+A+A+A+A+p.line(m,s)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).yArrj.push(r-b*y),C.yArrjF.push(Math.abs(s-r+n*y)),C.yArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"getBarpaths",value:function(t){var e,i=t.barYPosition,a=t.barHeight,s=t.x1,r=t.x2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.barHeightOffset&&(f=i-g.config.series[c].data[u].barHeightOffset/2,x=a+g.config.series[c].data[u].barHeightOffset);var b=n/2,m=f+b,v=f+x-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001+b*y,r+=.001-b*y;var w=p.move(s,m),k=p.move(s,m);g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1));var A=p.line(s,v);if(w=w+p.line(r,m)+p.line(r,v)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(s,m)+A+A+A+A+A+p.line(s,m)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).xArrj.push(r+b*y),C.xArrjF.push(Math.abs(s-r-n*y)),C.xArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;a2&&void 0!==arguments[2])||arguments[2]?e:null;return null!=t&&(i=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(t,e,i){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?e:null;return null!=t&&(a=e-t/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(t,e,i,a,s,r){var n=this,l=this.w,h=[],c=function(a,s){var l;h.push((o(l={},t,"x"===t?n.getXForValue(a,e,!1):n.getYForValue(a,i,r,!1)),o(l,"attrs",s),l))};if(l.globals.seriesGoals[a]&&l.globals.seriesGoals[a][s]&&Array.isArray(l.globals.seriesGoals[a][s])&&l.globals.seriesGoals[a][s].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,g={strokeHeight:"x"===t?0:l.globals.markers.size[a],strokeWidth:"x"===t?l.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[a])?d[a][0]:d[a]};c(l.globals.seriesRangeStart[a][s],g),c(l.globals.seriesRangeEnd[a][s],u(u({},g),{},{strokeColor:Array.isArray(d[a])?d[a][1]:d[a]}))}return h}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,a=t.goalX,s=t.goalY,r=t.barWidth,n=t.barHeight,o=new Mi(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var h=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach((function(t){if(t.x>=-1&&t.x<=o.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:n/2,a=i+e+n/2;h=o.drawLine(t.x,a-2*e,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(h)}})):Array.isArray(s)&&s.forEach((function(t){if(t.y>=-1&&t.y<=o.w.globals.gridHeight+1){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:r/2,a=e+i+r/2;h=o.drawLine(a-2*i,t.y,a,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(h)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,i=t.currPaths,a=t.color,s=this.w,r=e.x,n=e.x1,o=e.barYPosition,l=i.x,h=i.x1,c=i.barYPosition,d=o+i.barHeight,u=new Mi(this.barCtx.ctx),g=new v,p=u.move(n,d)+u.line(r,d)+u.line(l,c)+u.line(h,c)+u.line(n,d)+("around"===s.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return u.drawPath({d:p,fill:g.shadeColor(.5,v.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,i=t.i,a=t.j,s=this.w,r=0,n=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map((function(t,e){return e})):(null===(e=s.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=s.globals.seriesPercent[t][a];e&&r++,t-1})),a=this.barCtx.columnGroupIndices,s=a.indexOf(i);return s<0&&(a.push(i),s=a.length-1),{groupIndex:i,columnGroupIndex:s}}}]),t}(),Pa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w;var s=this.w;this.barOptions=s.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=s.config.stroke.width,this.isNullValue=!1,this.isRangeBar=s.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!s.globals.isBarHorizontal&&s.globals.seriesRange.length&&s.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=a,null!==this.xyRatios&&(this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.invertedXRatio=a.invertedXRatio,this.invertedYRatio=a.invertedYRatio,this.baseLineY=a.baseLineY,this.baseLineInvertedY=a.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var r=new Zi(this.ctx);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var n=r.getBarSeriesIndices(),o=new Pi(this.ctx);this.stackedSeriesTotals=o.getStackedSeriesTotals(this.w.config.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}))),this.barHelpers=new Ma(this)}return s(t,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=new Pi(this.ctx,i);t=s.getLogSeries(t),this.series=t,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var n=0,o=0;n0&&(this.visibleI=this.visibleI+1);var w=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[b],this.translationsIndex=b);var A=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var C=this.barHelpers.initialPositions();p=C.y,w=C.barHeight,h=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,l=C.xDivision,c=C.zeroH,this.isHorizontal||x.push(g+k/2);var S=a.group({class:"apexcharts-datalabels","data:realIndex":b});i.globals.delayedElements.push({el:S.node}),S.node.classList.add("apexcharts-element-hidden");var L=a.group({class:"apexcharts-bar-goals-markers"}),M=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");for(var P=0;P0){var R=this.barHelpers.drawBarShadow({color:"string"==typeof X&&-1===(null==X?void 0:X.indexOf("url"))?X:v.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});if(M.add(R),i.config.chart.dropShadow.enabled)new Li(this.ctx).dropShadow(R,i.config.chart.dropShadow,b)}this.pathArr.push(T);var E=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:w,barWidth:k});E&&L.add(E),p=T.y,g=T.x,P>0&&x.push(g+k/2),f.push(p),this.renderSeries({realIndex:b,pathFill:X,j:P,i:n,columnGroupIndex:m,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:I,elSeries:y,x:g,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:w),barWidth:Math.abs(T.barWidth?T.barWidth:k),elDataLabelsWrap:S,elGoalsMarkers:L,elBarShadows:M,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[b]=x,i.globals.seriesYvalues[b]=f,r.add(y)}return r}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,a=t.lineFill,s=t.j,r=t.i,n=t.columnGroupIndex,o=t.pathFrom,l=t.pathTo,h=t.strokeWidth,c=t.elSeries,d=t.x,u=t.y,g=t.y1,p=t.y2,f=t.series,x=t.barHeight,b=t.barWidth,m=t.barXPosition,v=t.barYPosition,y=t.elDataLabelsWrap,w=t.elGoalsMarkers,k=t.elBarShadows,A=t.visibleSeries,C=t.type,S=t.classes,L=this.w,M=new Mi(this.ctx);if(!a){var P="function"==typeof L.globals.stroke.colors[e]?function(t){var e,i=L.config.stroke.colors;return Array.isArray(i)&&i.length>0&&((e=i[t])||(e=""),"function"==typeof e)?e({value:L.globals.series[t][s],dataPointIndex:s,w:L}):e}(e):L.globals.stroke.colors[e];a=this.barOptions.distributed?L.globals.stroke.colors[s]:P}L.config.series[r].data[s]&&L.config.series[r].data[s].strokeColor&&(a=L.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var I=s/L.config.chart.animations.animateGradually.delay*(L.config.chart.animations.speed/L.globals.dataPoints)/2.4,T=M.renderPaths({i:r,j:s,realIndex:e,pathFrom:o,pathTo:l,stroke:a,strokeWidth:h,strokeLineCap:L.config.stroke.lineCap,fill:i,animationDelay:I,initialSpeed:L.config.chart.animations.speed,dataChangeSpeed:L.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(C,"-area ").concat(S),chartType:C});T.attr("clip-path","url(#gridRectBarMask".concat(L.globals.cuid,")"));var z=L.config.forecastDataPoints;z.count>0&&s>=L.globals.dataPoints-z.count&&(T.node.setAttribute("stroke-dasharray",z.dashArray),T.node.setAttribute("stroke-width",z.strokeWidth),T.node.setAttribute("fill-opacity",z.fillOpacity)),void 0!==g&&void 0!==p&&(T.attr("data-range-y1",g),T.attr("data-range-y2",p)),new Li(this.ctx).setSelectionFilter(T,e,s),c.add(T);var X=new La(this).handleBarDataLabels({x:d,y:u,y1:g,y2:p,i:r,j:s,series:f,realIndex:e,columnGroupIndex:n,barHeight:x,barWidth:b,barXPosition:m,barYPosition:v,renderedPath:T,visibleSeries:A});return null!==X.dataLabels&&y.add(X.dataLabels),X.totalDataLabels&&y.add(X.totalDataLabels),c.add(y),w&&c.add(w),k&&c.add(k),c}},{key:"drawBarPaths",value:function(t){var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.yDivision,h=t.elSeries,c=this.w,d=i.i,u=i.j;if(c.globals.isXNumeric)e=(o=(c.globals.seriesX[d][u]-c.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var g=0,p=0;c.globals.seriesPercent.forEach((function(t,e){t[u]&&g++,e0&&(a=this.seriesLen*a/g),e=o+a*this.visibleI,e-=a*p}else e=o+a*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[d][u],r)-r)/2),n=this.barHelpers.getXForValue(this.series[d][u],r);var f=this.barHelpers.getBarpaths({barYPosition:e,barHeight:a,x1:r,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:d,j:u,w:c});return c.globals.isXNumeric||(o+=l),this.barHelpers.barBackground({j:u,i:d,y1:e-a*this.visibleI,y2:a*this.seriesLen,elSeries:h}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x1:r,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",r,null,d,u),barYPosition:e,barHeight:a}}},{key:"drawColumnPaths",value:function(t){var e,i=t.indexes,a=t.x,s=t.y,r=t.xDivision,n=t.barWidth,o=t.zeroH,l=t.strokeWidth,h=t.elSeries,c=this.w,d=i.realIndex,u=i.translationsIndex,g=i.i,p=i.j,f=i.bc;if(c.globals.isXNumeric){var x=this.getBarXForNumericXAxis({x:a,j:p,realIndex:d,barWidth:n});a=x.x,e=x.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var b=this.barHelpers.getZeroValueEncounters({i:g,j:p}),m=b.nonZeroColumns,v=b.zeroEncounters;m>0&&(n=this.seriesLen*n/m),e=a+n*this.visibleI,e-=n*v}else e=a+n*this.visibleI;s=this.barHelpers.getYForValue(this.series[g][p],o,u);var y=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:n,y1:o,y2:s,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:d,i:g,j:p,w:c});return c.globals.isXNumeric||(a+=r),this.barHelpers.barBackground({bc:f,j:p,i:g,x1:e-l/2-n*this.visibleI,x2:n*this.seriesLen+l/2,elSeries:h}),{pathTo:y.pathTo,pathFrom:y.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,g,p,u),barXPosition:e,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,i=t.barWidth,a=t.realIndex,s=t.j,r=this.w,n=a;return r.globals.seriesX[a].length||(n=r.globals.maxValsInArrayIndex),v.isNumber(r.globals.seriesX[n][s])&&(e=(r.globals.seriesX[n][s]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:e+i*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var i,a=this.w,s=0;s0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==a.globals.previousPaths[s].paths[e]&&(i=a.globals.previousPaths[s].paths[e].d)}return i}}]),t}(),Ia=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this,a=this.w;this.graphics=new Mi(this.ctx),this.bar=new Pa(this.ctx,this.xyRatios);var s=new Pi(this.ctx,a);t=s.getLogSeries(t),this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===a.config.chart.stackType&&(t=a.globals.comboCharts?e.map((function(t){return a.globals.seriesPercent[t]})):a.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);for(var r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),n=0,o=0,l=function(s,l){var h=void 0,c=void 0,d=void 0,g=void 0,p=a.globals.comboCharts?e[s]:s,f=i.barHelpers.getGroupIndex(p),x=f.groupIndex,b=f.columnGroupIndex;i.groupCtx=i[a.globals.seriesGroups[x]];var m=[],y=[],w=0;i.yRatio.length>1&&(i.yaxisIndex=a.globals.seriesYAxisReverseMap[p][0],w=p),i.isReversed=a.config.yaxis[i.yaxisIndex]&&a.config.yaxis[i.yaxisIndex].reversed;var k=i.graphics.group({class:"apexcharts-series",seriesName:v.escapeString(a.globals.seriesNames[p]),rel:s+1,"data:realIndex":p});i.ctx.series.addCollapsedClassToSeries(k,p);var A=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),C=i.graphics.group({class:"apexcharts-bar-goals-markers"}),S=0,L=0,M=i.initialPositions(n,o,h,c,d,g,w);o=M.y,S=M.barHeight,c=M.yDivision,g=M.zeroW,n=M.x,L=M.barWidth,h=M.xDivision,d=M.zeroH,a.globals.barHeight=S,a.globals.barWidth=L,i.barHelpers.initializeStackedXYVars(i),1===i.groupCtx.prevY.length&&i.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(i.groupCtx.prevY[0]=i.groupCtx.prevY[0].map((function(){return d})),i.groupCtx.prevYF[0]=i.groupCtx.prevYF[0].map((function(){return 0})));for(var P=0;P0||"top"===i.barHelpers.arrBorderRadius[p][P]&&a.globals.series[p][P]<0)&&(E=Y),k=i.renderSeries({realIndex:p,pathFill:R,j:P,i:s,columnGroupIndex:b,pathFrom:z.pathFrom,pathTo:z.pathTo,strokeWidth:I,elSeries:k,x:n,y:o,series:t,barHeight:S,barWidth:L,elDataLabelsWrap:A,elGoalsMarkers:C,type:"bar",visibleSeries:b,classes:E})}a.globals.seriesXvalues[p]=m,a.globals.seriesYvalues[p]=y,i.groupCtx.prevY.push(i.groupCtx.yArrj),i.groupCtx.prevYF.push(i.groupCtx.yArrjF),i.groupCtx.prevYVal.push(i.groupCtx.yArrjVal),i.groupCtx.prevX.push(i.groupCtx.xArrj),i.groupCtx.prevXF.push(i.groupCtx.xArrjF),i.groupCtx.prevXVal.push(i.groupCtx.xArrjVal),r.add(k)},h=0,c=0;h1?l=(i=h.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(d).indexOf("%")?l=parseInt(d,10):l*=parseInt(d,10)/100,s=this.isReversed?this.baseLineY[n]:h.globals.gridHeight-this.baseLineY[n],t=h.globals.padHorizontal+(i-l)/2}var u=h.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:i,barHeight:o/u,barWidth:l/u,zeroH:s,zeroW:r}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.columnGroupIndex,h=t.seriesGroup,c=t.yDivision,d=t.elSeries,u=this.w,g=o+l*a,p=i.i,f=i.j,x=i.realIndex,b=i.translationsIndex,m=0,v=0;v0){var w=r;this.groupCtx.prevXVal[y-1][f]<0?w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[y-1][f]:this.groupCtx.prevXVal[y-1][f]>=0&&(w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]:this.groupCtx.prevX[y-1][f]-m+2*(this.isReversed?m:0)),e=w}else e=r;n=null===this.series[p][f]?e:e+this.series[p][f]/this.invertedYRatio-2*(this.isReversed?this.series[p][f]/this.invertedYRatio:0);var k=this.barHelpers.getBarpaths({barYPosition:g,barHeight:a,x1:e,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,seriesGroup:h,i:p,j:f,w:u});return this.barHelpers.barBackground({j:f,i:p,y1:g,y2:a,elSeries:d}),o+=c,{pathTo:k.pathTo,pathFrom:k.pathFrom,goalX:this.barHelpers.getGoalValues("x",r,null,p,f,b),barXPosition:e,barYPosition:g,x:n,y:o}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,r=t.barWidth,n=t.zeroH,o=t.columnGroupIndex,l=t.seriesGroup,h=t.elSeries,c=this.w,d=e.i,u=e.j,g=e.bc,p=e.realIndex,f=e.translationsIndex;if(c.globals.isXNumeric){var x=c.globals.seriesX[p][u];x||(x=0),i=(x-c.globals.minX)/this.xRatio-r/2*c.globals.barGroups.length}for(var b,m=i+o*r,v=0,y=0;y0&&!c.globals.isXNumeric||w>0&&c.globals.isXNumeric&&c.globals.seriesX[p-1][u]===c.globals.seriesX[p][u]){var k,A,C,S=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var L=1;L=0?C-v+2*(this.isReversed?v:0):C;break}if((null===(T=this.groupCtx.prevYVal[w-P])||void 0===T?void 0:T[u])>=0){A=this.series[d][u]>=0?C:C+v-2*(this.isReversed?v:0);break}}void 0===A&&(A=c.globals.gridHeight),b=null!==(k=this.groupCtx.prevYF[0])&&void 0!==k&&k.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?n:A}else b=n;a=this.series[d][u]?b-this.series[d][u]/this.yRatio[f]+2*(this.isReversed?this.series[d][u]/this.yRatio[f]:0):b;var z=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:r,y1:b,y2:a,yRatio:this.yRatio[f],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:d,j:u,w:c});return this.barHelpers.barBackground({bc:g,j:u,i:d,x1:m,x2:r,elSeries:h}),{pathTo:z.pathTo,pathFrom:z.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,n,d,u),barXPosition:m,x:c.globals.isXNumeric?i:i+s,y:a}}}]),a}(),Ta=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e,i){var a=this,s=this.w,r=new Mi(this.ctx),n=s.globals.comboCharts?e:s.config.chart.type,o=new ji(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=s.config.plotOptions.bar.horizontal;var l=new Pi(this.ctx,s);t=l.getLogSeries(t),this.series=t,this.yRatio=l.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var h=r.group({class:"apexcharts-".concat(n,"-series apexcharts-plot-series")}),c=function(e){a.isBoxPlot="boxPlot"===s.config.chart.type||"boxPlot"===s.config.series[e].type;var n,l,c,d,g=void 0,p=void 0,f=[],x=[],b=s.globals.comboCharts?i[e]:e,m=a.barHelpers.getGroupIndex(b).columnGroupIndex,y=r.group({class:"apexcharts-series",seriesName:v.escapeString(s.globals.seriesNames[b]),rel:e+1,"data:realIndex":b});a.ctx.series.addCollapsedClassToSeries(y,b),t[e].length>0&&(a.visibleI=a.visibleI+1);var w,k,A=0;a.yRatio.length>1&&(a.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],A=b);var C=a.barHelpers.initialPositions();p=C.y,w=C.barHeight,l=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,n=C.xDivision,c=C.zeroH,x.push(g+k/2);for(var S=r.group({class:"apexcharts-datalabels","data:realIndex":b}),L=r.group({class:"apexcharts-bar-goals-markers"}),M=function(i){var r=a.barHelpers.getStrokeWidth(e,i,b),h=null,v={indexes:{i:e,j:i,realIndex:b,translationsIndex:A},x:g,y:p,strokeWidth:r,elSeries:y};h=a.isHorizontal?a.drawHorizontalBoxPaths(u(u({},v),{},{yDivision:l,barHeight:w,zeroW:d})):a.drawVerticalBoxPaths(u(u({},v),{},{xDivision:n,barWidth:k,zeroH:c})),p=h.y,g=h.x;var C=a.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:h.barYPosition,goalX:h.goalX,goalY:h.goalY,barHeight:w,barWidth:k});C&&L.add(C),i>0&&x.push(g+k/2),f.push(p),h.pathTo.forEach((function(n,l){var c=!a.isBoxPlot&&a.candlestickOptions.wick.useFillColor?h.color[l]:s.globals.stroke.colors[e],d=o.fillPath({seriesNumber:b,dataPointIndex:i,color:h.color[l],value:t[e][i]});a.renderSeries({realIndex:b,pathFill:d,lineFill:c,j:i,i:e,pathFrom:h.pathFrom,pathTo:n,strokeWidth:r,elSeries:y,x:g,y:p,series:t,columnGroupIndex:m,barHeight:w,barWidth:k,elDataLabelsWrap:S,elGoalsMarkers:L,visibleSeries:a.visibleI,type:s.config.chart.type})}))},P=0;Pb.c&&(d=!1);var y=Math.min(b.o,b.c),w=Math.max(b.o,b.c),k=b.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[x][c]-o.globals.minX)/this.xRatio-s/2);var A=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(y=r,w=r):(y=r-y/f,w=r-w/f,m=r-b.h/f,v=r-b.l/f,k=r-b.m/f);var C=l.move(A,r),S=l.move(A+s/2,y);return o.globals.previousPaths.length>0&&(S=this.getPreviousPath(x,c,!0)),C=this.isBoxPlot?[l.move(A,y)+l.line(A+s/2,y)+l.line(A+s/2,m)+l.line(A+s/4,m)+l.line(A+s-s/4,m)+l.line(A+s/2,m)+l.line(A+s/2,y)+l.line(A+s,y)+l.line(A+s,k)+l.line(A,k)+l.line(A,y+n/2),l.move(A,k)+l.line(A+s,k)+l.line(A+s,w)+l.line(A+s/2,w)+l.line(A+s/2,v)+l.line(A+s-s/4,v)+l.line(A+s/4,v)+l.line(A+s/2,v)+l.line(A+s/2,w)+l.line(A,w)+l.line(A,k)+"z"]:[l.move(A,w)+l.line(A+s/2,w)+l.line(A+s/2,m)+l.line(A+s/2,w)+l.line(A+s,w)+l.line(A+s,y)+l.line(A+s/2,y)+l.line(A+s/2,v)+l.line(A+s/2,y)+l.line(A,y)+l.line(A,w-n/2)],S+=l.move(A,y),o.globals.isXNumeric||(i+=a),{pathTo:C,pathFrom:S,x:i,y:w,goalY:this.barHelpers.getGoalValues("y",null,r,h,c,e.translationsIndex),barXPosition:A,color:this.isBoxPlot?p:d?[u]:[g]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var i=t.y,a=t.yDivision,s=t.barHeight,r=t.zeroW,n=t.strokeWidth,o=this.w,l=new Mi(this.ctx),h=e.i,c=e.j,d=this.boxOptions.colors.lower;this.isBoxPlot&&(d=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,g=e.realIndex,p=this.getOHLCValue(g,c),f=r,x=r,b=Math.min(p.o,p.c),m=Math.max(p.o,p.c),v=p.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[g][c]-o.globals.minX)/this.invertedXRatio-s/2);var y=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(b=r,m=r):(b=r+b/u,m=r+m/u,f=r+p.h/u,x=r+p.l/u,v=r+p.m/u);var w=l.move(r,y),k=l.move(b,y+s/2);return o.globals.previousPaths.length>0&&(k=this.getPreviousPath(g,c,!0)),w=[l.move(b,y)+l.line(b,y+s/2)+l.line(f,y+s/2)+l.line(f,y+s/2-s/4)+l.line(f,y+s/2+s/4)+l.line(f,y+s/2)+l.line(b,y+s/2)+l.line(b,y+s)+l.line(v,y+s)+l.line(v,y)+l.line(b+n/2,y),l.move(v,y)+l.line(v,y+s)+l.line(m,y+s)+l.line(m,y+s/2)+l.line(x,y+s/2)+l.line(x,y+s-s/4)+l.line(x,y+s/4)+l.line(x,y+s/2)+l.line(m,y+s/2)+l.line(m,y)+l.line(v,y)+"z"],k+=l.move(b,y),o.globals.isXNumeric||(i+=a),{pathTo:w,pathFrom:k,x:m,y:i,goalX:this.barHelpers.getGoalValues("x",r,null,h,c),barYPosition:y,color:d}}},{key:"getOHLCValue",value:function(t,e){var i=this.w;return{o:this.isBoxPlot?i.globals.seriesCandleH[t][e]:i.globals.seriesCandleO[t][e],h:this.isBoxPlot?i.globals.seriesCandleO[t][e]:i.globals.seriesCandleH[t][e],m:i.globals.seriesCandleM[t][e],l:this.isBoxPlot?i.globals.seriesCandleC[t][e]:i.globals.seriesCandleL[t][e],c:this.isBoxPlot?i.globals.seriesCandleL[t][e]:i.globals.seriesCandleC[t][e]}}}]),a}(),za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,a){var s=this.w,r=1,n=s.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,i);s.globals.hasNegs||a?r=s.config.plotOptions[t].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):(1-o.percent/100)*(1.25*n):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(r=1-o.percent/100,"treemap"===t&&(r=(1-o.percent/100)*(1.25*n)));var l=o.color,h=new v;if(s.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var c=h.shadeColor(-1*r,o.color);l=v.hexToRgba(v.isColorHex(c)?c:v.rgb2hex(c),s.config.fill.opacity)}else{var d=h.shadeColor(r,o.color);l=v.hexToRgba(v.isColorHex(d)?d:v.rgb2hex(d),s.config.fill.opacity)}return{color:l,colorProps:o}}},{key:"determineColor",value:function(t,e,i){var a=this.w,s=a.globals.series[e][i],r=a.config.plotOptions[t],n=r.colorScale.inverse?i:e;r.distributed&&"treemap"===a.config.chart.type&&(n=i);var o=a.globals.colors[n],l=null,h=Math.min.apply(Math,f(a.globals.series[e])),c=Math.max.apply(Math,f(a.globals.series[e]));r.distributed||"heatmap"!==t||(h=a.globals.minY,c=a.globals.maxY),void 0!==r.colorScale.min&&(h=r.colorScale.mina.globals.maxY?r.colorScale.max:a.globals.maxY);var d=Math.abs(c)+Math.abs(h),u=100*s/(0===d?d-1e-6:d);r.colorScale.ranges.length>0&&r.colorScale.ranges.map((function(t,e){if(s>=t.from&&s<=t.to){o=t.color,l=t.foreColor?t.foreColor:null,h=t.from,c=t.to;var i=Math.abs(c)+Math.abs(h);u=100*s/(0===i?i-1e-6:i)}}));return{color:o,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,a=t.y,s=t.i,r=t.j,n=t.colorProps,o=t.fontSize,l=this.w.config.dataLabels,h=new Mi(this.ctx),c=new qi(this.ctx),d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});var u=l.offsetX,g=l.offsetY,p=i+u,f=a+parseFloat(l.style.fontSize)/3+g;c.plotDataLabelsText({x:p,y:f,text:e,i:s,j:r,color:n.foreColor,parent:d,fontSize:o,dataLabelsConfig:l})}return d}},{key:"addListeners",value:function(t){var e=new Mi(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),Xa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w,this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new za(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return s(t,[{key:"draw",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var s=e.globals.gridWidth/e.globals.dataPoints,r=e.globals.gridHeight/e.globals.series.length,n=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var h=o?0:l.length-1;o?h=0;o?h++:h--){var c=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:v.escapeString(e.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(this.ctx.series.addCollapsedClassToSeries(c,h),e.config.chart.dropShadow.enabled){var d=e.config.chart.dropShadow;new Li(this.ctx).dropShadow(c,d,h)}for(var u=0,g=e.config.plotOptions.heatmap.shadeIntensity,p=0;p-1&&this.pieClicked(d),i.config.dataLabels.enabled){var w=m.x,k=m.y,A=100*g/this.fullAngle+"%";if(0!==g&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(h=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(h)>this.fullAngle&&(h-=this.fullAngle);var c=Math.PI*(h-90)/180,d=i.centerX+r*Math.cos(l),u=i.centerY+r*Math.sin(l),g=i.centerX+r*Math.cos(c),p=i.centerY+r*Math.sin(c),f=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,h),x=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),b=s>180?1:0,m=["M",d,u,"A",r,r,0,b,1,g,p];return e="donut"===i.chartType?[].concat(m,["L",f.x,f.y,"A",i.donutSize,i.donutSize,0,b,0,x.x,x.y,"L",d,u,"z"]).join(" "):"pie"===i.chartType||"polarArea"===i.chartType?[].concat(m,["L",i.centerX,i.centerY,"L",d,u]).join(" "):[].concat(m).join(" "),n.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new ta(this.ctx),a=new Mi(this.ctx),s=new Ra(this.ctx),r=a.group(),n=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),h=o.result.length;this.maxY=o.niceMax;for(var c=e.globals.radialSize,d=c/(h-1),u=0;u1&&t.total.show&&(s=t.total.color);var n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,r),a||"function"!=typeof t.total.formatter||(i=t.total.formatter(r));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,r):"",null!==n&&(n.textContent=e),null!==o&&(o.textContent=i),null!==n&&(n.style.fill=s)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,a=t.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,s,a,t);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,a=new Mi(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(0!==s.strokeWidth){for(var r=[],n=360/i.globals.series.length,o=0;o0&&(f=e.getPreviousPath(n));for(var x=0;x=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?s-=10:t.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,a=0;a0&&parseInt(s.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[a].paths[0]&&(i=e.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var a=[],s=0;s=360&&(u=360-Math.abs(this.startAngle)-.1);var g=i.drawPath({d:"",stroke:c,strokeWidth:n*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){var p=h.dropShadow;s.dropShadow(g,p)}l.add(g),g.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(g,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:d,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return a}},{key:"drawArcs",value:function(t){var e=this.w,i=new Mi(this.ctx),a=new ji(this.ctx),s=new Li(this.ctx),r=i.group(),n=this.getStrokeWidth(t);t.size=t.size-n/2;var o=e.config.plotOptions.radialBar.hollow.background,l=t.size-n*t.series.length-this.margin*t.series.length-n*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(t,r,l,o));var c=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:o||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var d=e.config.plotOptions.radialBar.hollow.dropShadow;s.dropShadow(c,d)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var g=null;if(this.radialDataLabels.show){var p=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");g=this.renderInnerDataLabels(p,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})}"back"===e.config.plotOptions.radialBar.hollow.position&&(r.add(c),g&&r.add(g));var f=!1;e.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var x=f?t.series.length-1:0;f?x>=0:x100?100:t.series[x])/100,A=Math.round(this.totalAngle*k)+this.startAngle,C=void 0;e.globals.dataChanged&&(w=this.startAngle,C=Math.round(this.totalAngle*v.negToZero(e.globals.previousPaths[x])/100)+w),Math.abs(A)+Math.abs(y)>360&&(A-=.01),Math.abs(C)+Math.abs(w)>360&&(C-=.01);var S=A-y,L=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[x]:e.config.stroke.dashArray,M=i.drawPath({d:"",stroke:m,strokeWidth:n,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+x,strokeDashArray:L});if(Mi.setAttrs(M.node,{"data:angle":S,"data:value":t.series[x]}),e.config.chart.dropShadow.enabled){var P=e.config.chart.dropShadow;s.dropShadow(M,P,x)}if(s.setSelectionFilter(M,0,x),this.addListeners(M,this.radialDataLabels),b.add(M),M.attr({index:0,j:x}),this.barLabels.enabled){var I=v.polarToCartesian(t.centerX,t.centerY,t.size,y),T=this.barLabels.formatter(e.globals.seriesNames[x],{seriesIndex:x,w:e}),z=["apexcharts-radialbar-label"];this.barLabels.onClick||z.push("apexcharts-no-click");var X=this.barLabels.useSeriesColors?e.globals.colors[x]:e.config.chart.foreColor;X||(X=e.config.chart.foreColor);var R=I.x+this.barLabels.offsetX,E=I.y+this.barLabels.offsetY,Y=i.drawText({x:R,y:E,text:T,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:X,cssClass:z.join(" ")});Y.on("click",this.onBarLabelClick),Y.attr({rel:x+1}),0!==y&&Y.attr({"transform-origin":"".concat(R," ").concat(E),transform:"rotate(".concat(y," 0 0)")}),b.add(Y)}var H=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(H=e.config.chart.animations.speed),e.globals.dataChanged&&(H=e.config.chart.animations.dynamicAnimation.speed),this.animDur=H/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(M,{centerX:t.centerX,centerY:t.centerY,endAngle:A,startAngle:y,prevEndAngle:C,prevStartAngle:w,size:t.size,i:x,totalItems:2,animBeginArr:this.animBeginArr,dur:H,shouldSetPrevPaths:!0})}return{g:r,elHollow:c,dataLabels:g}}},{key:"drawHollow",value:function(t){var e=new Mi(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,a){var s=this.w,r=new ji(this.ctx),n=v.randomId(),o=s.config.plotOptions.radialBar.hollow.image;if(s.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:o,patternID:"pattern".concat(s.globals.cuid).concat(n)}),a="url(#pattern".concat(s.globals.cuid).concat(n,")");else{var l=s.config.plotOptions.radialBar.hollow.imageWidth,h=s.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===h){var c=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-e.width/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+s.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(c)}else{var d=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-l/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-h/2+s.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,h)}));e.add(d)}}return a}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,i=this.barLabels.onClick,a=this.w;i&&i(a.globals.seriesNames[e],{w:a,seriesIndex:e})}}]),r}(),Oa=function(t){h(a,Pa);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var s=a.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),r=0;r0&&(this.visibleI=this.visibleI+1);var x=0,b=0,m=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[g][0],m=g);var y=this.barHelpers.initialPositions();d=y.y,h=y.zeroW,c=y.x,b=y.barWidth,x=y.barHeight,n=y.xDivision,o=y.yDivision,l=y.zeroH;for(var w=a.group({class:"apexcharts-datalabels","data:realIndex":g}),k=a.group({class:"apexcharts-rangebar-goals-markers"}),A=0;A0}));return this.isHorizontal?(a=u.config.plotOptions.bar.rangeBarGroupRows?r+h*b:r+o*this.visibleI+h*b,m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(a=(o=d.barHeight/g.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+g.indexOf(p))+h*b)):(b>-1&&!u.globals.timescaleLabels.length&&(s=u.config.plotOptions.bar.rangeBarGroupRows?n+c*b:n+l*this.visibleI+c*b),m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(s=(l=d.barWidth/g.length)*this.visibleI+c*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+g.indexOf(p))+c*b)),{barYPosition:a,barXPosition:s,barHeight:o,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.xDivision,s=t.barWidth,r=t.barXPosition,n=t.zeroH,o=this.w,l=e.i,h=e.j,c=e.realIndex,d=e.translationsIndex,u=this.yRatio[d],g=this.getRangeValue(c,h),p=Math.min(g.start,g.end),f=Math.max(g.start,g.end);void 0===this.series[l][h]||null===this.series[l][h]?p=n:(p=n-p/u,f=n-f/u);var x=Math.abs(f-p),b=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:s,y1:p,y2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:c,i:c,j:h,w:o});if(o.globals.isXNumeric){var m=this.getBarXForNumericXAxis({x:i,j:h,realIndex:c,barWidth:s});i=m.x,r=m.barXPosition}else i+=a;return{pathTo:b.pathTo,pathFrom:b.pathFrom,barHeight:x,x:i,y:g.start<0&&g.end<0?p:f,goalY:this.barHelpers.getGoalValues("y",null,n,l,h,d),barXPosition:r}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,a=t.y1,s=t.y2,r=t.yDivision,n=t.barHeight,o=t.barYPosition,l=t.zeroW,h=this.w,c=e.realIndex,d=e.j,u=this.preventBarOverflow(l+a/this.invertedYRatio),g=this.preventBarOverflow(l+s/this.invertedYRatio),p=this.getRangeValue(c,d),f=Math.abs(g-u),x=this.barHelpers.getBarpaths({barYPosition:o,barHeight:n,x1:u,x2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:c,realIndex:c,j:d,w:h});return h.globals.isXNumeric||(i+=r),{pathTo:x.pathTo,pathFrom:x.pathFrom,barWidth:f,x:p.start<0&&p.end<0?u:g,goalX:this.barHelpers.getGoalValues("x",l,null,c,d),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}}]),a}(),Fa=function(){function t(e){i(this,t),this.w=e.w,this.lineCtx=e}return s(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new Pi(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,a=t.x,s=t.y,r=t.i,n=t.j,o=t.prevY,l=this.w,h=[],c=[];if(0===n){var d=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(d=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),h.push(d),c.push(v.isNumber(e[r][0])?o+l.config.markers.offsetY:null),h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null)}else h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null);return{x:h,y:c}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,a=t.realIndex,s=this.w,r=0;r0&&parseInt(n.realIndex,10)===parseInt(a,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,e=s.globals.previousPaths[r].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[r].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[r].paths[1]&&(e=s.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e,i,a,s=t.i,r=t.realIndex,n=t.series,o=t.prevY,l=t.lineYPosition,h=t.translationsIndex,c=this.w,d=c.config.chart.stacked&&!c.globals.comboCharts||c.config.chart.stacked&&c.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[r])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[r])||void 0===i?void 0:i.type));if(void 0!==(null===(a=n[s])||void 0===a?void 0:a[0]))o=(l=d&&s>0?this.lineCtx.prevSeriesY[s-1][0]:this.lineCtx.zeroY)-n[s][0]/this.lineCtx.yRatio[h]+2*(this.lineCtx.isReversed?n[s][0]/this.lineCtx.yRatio[h]:0);else if(d&&s>0&&void 0===n[s][0])for(var u=s-1;u>=0;u--)if(null!==n[u][0]&&void 0!==n[u][0]){o=l=this.lineCtx.prevSeriesY[u][0];break}return{prevY:o,lineYPosition:l}}}]),t}(),Da=function(t){for(var e,i,a,s,r=function(t){for(var e=[],i=t[0],a=t[1],s=e[0]=Wa(i,a),r=1,n=t.length-1;r9&&(s=3*a/Math.sqrt(s),r[l]=s*e,r[l+1]=s*i);for(var h=0;h<=n;h++)s=(t[Math.min(n,h+1)][0]-t[Math.max(0,h-1)][0])/(6*(1+r[h]*r[h])),o.push([s||0,r[h]*s||0]);return o},_a=function(t){var e=Da(t),i=t[1],a=t[0],s=[],r=e[1],n=e[0];s.push(a,[a[0]+n[0],a[1]+n[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(var o=2,l=e.length;o1&&a[1].length<6){var s=a[0].length;a[1]=[2*a[0][s-2]-a[0][s-4],2*a[0][s-1]-a[0][s-3]].concat(a[1])}a[0]=a[0].slice(-2)}return a};function Wa(t,e){return(e[1]-t[1])/(e[0]-t[0])}var Ba=function(){function t(e,a,s){i(this,t),this.ctx=e,this.w=e.w,this.xyRatios=a,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||s,this.scatter=new Ui(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Fa(this),this.markers=new Vi(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return s(t,[{key:"draw",value:function(t,e,i,a){var s,r=this.w,n=new Mi(this.ctx),o=r.globals.comboCharts?e:r.config.chart.type,l=n.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),h=new Pi(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=h.getLogSeries(t),this.yRatio=h.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var c=[],d=0;d1?g:0;this._initSerieVariables(t,d,g);var f=[],x=[],b=[],m=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,g),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(m=(r.globals.seriesX[g][0]-r.globals.minX)/this.xRatio),b.push(m);var v,y=m,w=void 0,k=y,A=this.zeroY,C=this.zeroY;A=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:t,prevY:A,lineYPosition:0,translationsIndex:p}).prevY,"monotoneCubic"===r.config.stroke.curve&&null===t[d][0]?f.push(null):f.push(A),v=A;"rangeArea"===o&&(w=C=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:a,prevY:C,lineYPosition:0,translationsIndex:p}).prevY,x.push(null!==f[0]?C:null));var S=this._calculatePathsFrom({type:o,series:t,i:d,realIndex:g,translationsIndex:p,prevX:k,prevY:A,prevY2:C}),L=[f[0]],M=[x[0]],P={type:o,series:t,realIndex:g,translationsIndex:p,i:d,x:m,y:1,pX:y,pY:v,pathsFrom:S,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:b,yArrj:f,y2Arrj:x,seriesRangeEnd:a},I=this._iterateOverDataPoints(u(u({},P),{},{iterations:"rangeArea"===o?t[d].length-1:void 0,isRangeStart:!0}));if("rangeArea"===o){for(var T=this._calculatePathsFrom({series:a,i:d,realIndex:g,prevX:k,prevY:C}),z=this._iterateOverDataPoints(u(u({},P),{},{series:a,xArrj:[m],yArrj:L,y2Arrj:M,pY:w,areaPaths:I.areaPaths,pathsFrom:T,iterations:a[d].length-1,isRangeStart:!1})),X=I.linePaths.length/2,R=0;R=0;E--)l.add(c[E]);else for(var Y=0;Y1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[r]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",zIndex:void 0!==a.config.series[i].zIndex?a.config.series[i].zIndex:i,seriesName:v.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i});var n=t[e].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,a,s,r=t.type,n=t.series,o=t.i,l=t.realIndex,h=t.translationsIndex,c=t.prevX,d=t.prevY,u=t.prevY2,g=this.w,p=new Mi(this.ctx);if(null===n[o][0]){for(var f=0;f0){var x=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:l});a=x.pathFromLine,s=x.pathFromArea}return{prevX:c,prevY:d,linePath:e,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(t){var e=t.type,i=t.realIndex,a=t.i,s=t.paths,r=this.w,n=new Mi(this.ctx),o=new ji(this.ctx);this.prevSeriesY.push(s.yArrj),r.globals.seriesXvalues[i]=s.xArrj,r.globals.seriesYvalues[i]=s.yArrj;var l=r.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var h=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-l.count-1],c=n.drawRect(h,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(c.node);var d=n.drawRect(0,0,h,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(d.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var g={i:a,realIndex:i,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var p=o.fillPath({seriesNumber:i}),f=0;f0&&"rangeArea"!==e){var A=n.renderPaths(w);A.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&A.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(A),A.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),k.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,i,a=this,s=t.type,r=t.series,n=t.iterations,o=t.realIndex,l=t.translationsIndex,h=t.i,c=t.x,d=t.y,u=t.pX,g=t.pY,p=t.pathsFrom,f=t.linePaths,x=t.areaPaths,b=t.seriesIndex,m=t.lineYPosition,y=t.xArrj,w=t.yArrj,k=t.y2Arrj,A=t.isRangeStart,C=t.seriesRangeEnd,S=this.w,L=new Mi(this.ctx),M=this.yRatio,P=p.prevY,I=p.linePath,T=p.areaPath,z=p.pathFromLine,X=p.pathFromArea,R=v.isNumber(S.globals.minYArr[o])?S.globals.minYArr[o]:S.globals.minY;n||(n=S.globals.dataPoints>1?S.globals.dataPoints-1:S.globals.dataPoints);var E=function(t,e){return e-t/M[l]+2*(a.isReversed?t/M[l]:0)},Y=d,H=S.config.chart.stacked&&!S.globals.comboCharts||S.config.chart.stacked&&S.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[o])||void 0===i?void 0:i.type)),O=S.config.stroke.curve;Array.isArray(O)&&(O=Array.isArray(b)?O[b[h]]:O[h]);for(var F,D=0,_=0;_0&&S.globals.collapsedSeries.length0;e--){if(!(S.globals.collapsedSeriesIndices.indexOf((null==b?void 0:b[e])||e)>-1))return e;e--}return 0}(h-1)][_+1]}else m=this.zeroY;else m=this.zeroY;N?d=E(R,m):(d=E(r[h][_+1],m),"rangeArea"===s&&(Y=E(C[h][_+1],m))),y.push(c),!N||"smooth"!==S.config.stroke.curve&&"monotoneCubic"!==S.config.stroke.curve?(w.push(d),k.push(Y)):(w.push(null),k.push(null));var B=this.lineHelpers.calculatePoints({series:r,x:c,y:d,realIndex:o,i:h,j:_,prevY:P}),G=this._createPaths({type:s,series:r,i:h,realIndex:o,j:_,x:c,y:d,y2:Y,xArrj:y,yArrj:w,y2Arrj:k,pX:u,pY:g,pathState:D,segmentStartX:F,linePath:I,areaPath:T,linePaths:f,areaPaths:x,curve:O,isRangeStart:A});x=G.areaPaths,f=G.linePaths,u=G.pX,g=G.pY,D=G.pathState,F=G.segmentStartX,T=G.areaPath,I=G.linePath,!this.appendPathFrom||S.globals.hasNullValues||"monotoneCubic"===O&&"rangeArea"===s||(z+=L.line(c,this.areaBottomY),X+=L.line(c,this.areaBottomY)),this.handleNullDataPoints(r,B,h,_,o),this._handleMarkersAndLabels({type:s,pointsPos:B,i:h,j:_,realIndex:o,isRangeStart:A})}return{yArrj:w,xArrj:y,pathFromArea:X,areaPaths:x,pathFromLine:z,linePaths:f,linePath:I,areaPath:T}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,i=t.pointsPos,a=t.isRangeStart,s=t.i,r=t.j,n=t.realIndex,o=this.w,l=new qi(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var h=this.markers.plotChartMarkers(i,n,r+1);null!==h&&this.elPointsMain.add(h)}var c=l.drawDataLabel({type:e,isRangeStart:a,pos:i,i:n,j:r+1});null!==c&&this.elDataLabelsWrap.add(c)}},{key:"_createPaths",value:function(t){var e=t.type,i=t.series,a=t.i;t.realIndex;var s,r=t.j,n=t.x,o=t.y,l=t.xArrj,h=t.yArrj,c=t.y2,d=t.y2Arrj,u=t.pX,g=t.pY,p=t.pathState,f=t.segmentStartX,x=t.linePath,b=t.areaPath,m=t.linePaths,v=t.areaPaths,y=t.curve,w=t.isRangeStart,k=new Mi(this.ctx),A=this.areaBottomY,C="rangeArea"===e,S="rangeArea"===e&&w;switch(y){case"monotoneCubic":var L=w?h:d;switch(p){case 0:if(null===L[r+1])break;p=1;case 1:if(!(C?l.length===i[a].length:r===i[a].length-2))break;case 2:var M=w?l:l.slice().reverse(),P=w?L:L.slice().reverse(),I=(s=P,M.map((function(t,e){return[t,s[e]]})).filter((function(t){return null!==t[1]}))),T=I.length>1?_a(I):I,z=[];C&&(S?v=I:z=v.reverse());var X=0,R=0;if(function(t,e){for(var i=function(t){var e=[],i=0;return t.forEach((function(t){null!==t?i++:i>0&&(e.push(i),i=0)})),i>0&&e.push(i),e}(t),a=[],s=0,r=0;s4?(e+="C".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]),e+=", ".concat(a[4],", ").concat(a[5])):s>2&&(e+="S".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]))}return e}(t),i=R,a=(R+=t.length)-1;S?x=k.move(I[i][0],I[i][1])+e:C?x=k.move(z[i][0],z[i][1])+k.line(I[i][0],I[i][1])+e+k.line(z[a][0],z[a][1]):(x=k.move(I[i][0],I[i][1])+e,b=x+k.line(I[a][0],A)+k.line(I[i][0],A)+"z",v.push(b)),m.push(x)})),C&&X>1&&!S){var E=m.slice(X).reverse();m.splice(X),E.forEach((function(t){return m.push(t)}))}p=0}break;case"smooth":var Y=.35*(n-u);if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.curve(n,o,n,o,n,c)+k.move(n,c)),b+=k.curve(n,o,n,o,n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o;break;default:var F=function(t,e,i){var a=[];switch(t){case"stepline":a=k.line(e,null,"H")+k.line(null,i,"V");break;case"linestep":a=k.line(null,i,"V")+k.line(e,null,"H");break;case"straight":a=k.line(e,i)}return a};if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.line(n,c)),b+=k.line(n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o}return{linePaths:m,areaPaths:v,pX:u,pY:g,pathState:p,segmentStartX:f,linePath:x,areaPath:b}}},{key:"handleNullDataPoints",value:function(t,e,i,a,s){var r=this.w;if(null===t[i][a]&&r.config.markers.showNullDataPoints||1===t[i].length){var n=this.strokeWidth-r.config.markers.strokeWidth/2;n>0||(n=0);var o=this.markers.plotChartMarkers(e,s,a+1,n,!0);null!==o&&this.elPointsMain.add(o)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,a,s){this.xoffset=e,this.yoffset=i,this.height=s,this.width=a,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],a=this.xoffset,s=this.yoffset,n=r(t)/this.height,o=r(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var a=e/this.height,s=this.width-a;i=new t(this.xoffset+a,this.yoffset,s,this.height)}else{var r=e/this.width,n=this.height-r;i=new t(this.xoffset,this.yoffset+r,this.width,n)}return i}}function e(e,a,s,n,o){n=void 0===n?0:n,o=void 0===o?0:o;var l=i(function(t,e){var i,a=[],s=e/r(t);for(i=0;i=n}(e,l=t[0],o)?(e.push(l),i(t.slice(1),e,s,n)):(h=s.cutArea(r(e),n),n.push(s.getCoordinates(e)),i(t,[],h,n)),n;n.push(s.getCoordinates(e))}function a(t,e){var i=Math.min.apply(Math,t),a=Math.max.apply(Math,t),s=r(t);return Math.max(Math.pow(e,2)*a/Math.pow(s,2),Math.pow(s,2)/(Math.pow(e,2)*i))}function s(t){return t&&t.constructor===Array}function r(t){var e,i=0;for(e=0;er-a&&l.width<=n-s){var h=o.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(h.x," ").concat(h.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,i,a,s,r){var n=new Mi(this.ctx),o=n.getTextRects(t,e).width+this.w.config.stroke.width+5>s-i&&r-a>s-i?r-a:s-i,l=n.getTextBasedOnMaxWidth({text:t,maxWidth:o,fontSize:e});return t.length!==l.length&&o/e<5?"":l}},{key:"animateTreemap",value:function(t,e,i,a){var s=new y(this.ctx);s.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,(function(){s.animationCompleted(t)}))}}]),t}(),ja=86400,Va=10/ja,Ua=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return s(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new zi(this.ctx),r=(e-t)/864e5;this.determineInterval(r),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,r5e4&&(a.globals.disableZoomOut=!0);var n=s.getTimeUnitsfromTimestamp(t,e,this.utc),o=a.globals.gridWidth/r,l=o/24,h=l/60,c=h/60,d=Math.floor(24*r),g=Math.floor(1440*r),p=Math.floor(r*ja),f=Math.floor(r),x=Math.floor(r/30),b=Math.floor(r/365),m={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},v={firstVal:m,currentMillisecond:m.minMillisecond,currentSecond:m.minSecond,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:l,minutesWidthOnXAxis:h,secondsWidthOnXAxis:c,numberOfSeconds:p,numberOfMinutes:g,numberOfHours:d,numberOfDays:f,numberOfMonths:x,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var y=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?u(u({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?u(u({},e),{},{value:t.value}):"minute"===t.unit?u(u({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?u(u({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return y.filter((function(t){var e=1,s=Math.ceil(a.globals.gridWidth/120),r=t.value;void 0!==a.config.xaxis.tickAmount&&(s=a.config.xaxis.tickAmount),y.length>s&&(e=Math.floor(y.length/s));var n=!1,o=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(n=!0);break;case"half_year":e=7,"year"===t.unit&&(n=!0);break;case"months":e=1,"year"===t.unit&&(n=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(n=!0),30===r&&(o=!0);break;case"months_days":e=10,"month"===t.unit&&(n=!0),30===r&&(o=!0);break;case"week_days":e=8,"month"===t.unit&&(n=!0);break;case"days":e=1,"month"===t.unit&&(n=!0);break;case"hours":"day"===t.unit&&(n=!0);break;case"minutes_fives":case"seconds_fives":r%5!=0&&(o=!0);break;case"seconds_tens":r%10!=0&&(o=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!o)return!0}else if((r%e==0||n)&&!o)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,a=this.formatDates(t),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new pa(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.daysWidthOnXAxis,r=t.numberOfYears,n=e.minYear,o=0,l=new zi(this.ctx),h="year";if(e.minDate>1||e.minMonth>0){var c=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(l.determineDaysOfYear(e.minYear)-c+1)*s,n=e.minYear+1,this.timeScaleArray.push({position:o,value:n,unit:h,year:n,month:v.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:o,value:n,unit:h,year:a,month:v.monthMod(i+1)});for(var d=n,u=o,g=0;g1){l=(h.determineDaysOfMonths(a+1,e.minYear)-i+1)*r,o=v.monthMod(a+1);var u=s+d,g=v.monthMod(o),p=o;0===o&&(c="year",p=u,g=1,u+=d+=1),this.timeScaleArray.push({position:l,value:p,unit:c,year:u,month:g})}else this.timeScaleArray.push({position:l,value:o,unit:c,year:s,month:v.monthMod(a)});for(var f=o+1,x=l,b=0,m=1;bn.determineDaysOfMonths(e+1,i)?(h=1,o="month",u=e+=1,e):e},d=(24-e.minHour)*s,u=l,g=c(h,i,a);0===e.minHour&&1===e.minDate?(d=0,u=v.monthMod(e.minMonth),o="month",h=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(d=0,l=e.minDate,u=l,g=c(h=l,i,a)),this.timeScaleArray.push({position:d,value:u,unit:o,year:this._getYear(a,g,0),month:v.monthMod(g),day:h});for(var p=d,f=0;fo.determineDaysOfMonths(e+1,s)&&(f=1,e+=1),{month:e,date:f}},c=function(t,e){return t>o.determineDaysOfMonths(e+1,s)?e+=1:e},d=60-(e.minMinute+e.minSecond/60),u=d*r,g=e.minHour+1,p=g;60===d&&(u=0,p=g=e.minHour);var f=i;p>=24&&(p=0,l="day",g=f+=1);var x=h(f,a).month;x=c(f,x),this.timeScaleArray.push({position:u,value:g,unit:l,day:f,hour:p,year:s,month:v.monthMod(x)}),p++;for(var b=u,m=0;m=24)p=0,l="day",x=h(f+=1,x).month,x=c(f,x);var y=this._getYear(s,x,0);b=60*r+b;var w=0===p?f:p;this.timeScaleArray.push({position:b,value:w,unit:l,hour:p,day:f,year:y,month:v.monthMod(x)}),p++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.minutesWidthOnXAxis,h=t.secondsWidthOnXAxis,c=t.numberOfMinutes,d=a+1,u=r,g=n,p=o,f=s,x=(60-i-e/1e3)*h,b=0;b=60&&(d=0,24===(f+=1)&&(f=0)),this.timeScaleArray.push({position:x,value:d,unit:"minute",hour:f,minute:d,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,d++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.secondsWidthOnXAxis,h=t.numberOfSeconds,c=i+1,d=a,u=r,g=n,p=o,f=s,x=(1e3-e)/1e3*l,b=0;b=60&&(c=0,++d>=60&&(d=0,24===++f&&(f=0))),this.timeScaleArray.push({position:x,value:c,unit:"second",hour:f,minute:d,second:c,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,c++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var a=t.value.toString(),s=new zi(e.ctx),r=e.createRawDateString(t,a),n=s.getDate(s.parseDate(r));if(e.utc||(n=s.getDate(s.parseDateWithTimezone(r))),void 0===i.config.xaxis.labels.format){var o="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(o=l.year),"month"===t.unit&&(o=l.month),"day"===t.unit&&(o=l.day),"hour"===t.unit&&(o=l.hour),"minute"===t.unit&&(o=l.minute),"second"===t.unit&&(o=l.second),a=s.formatDate(n,o)}else a=s.formatDate(n,i.config.xaxis.labels.format);return{dateString:r,position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,a=new Mi(this.ctx),s=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(s=!0,e=a.getTextRects(t[0].value).width);var r=0,n=t.map((function(n,o){if(o>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=s?e:a.getTextRects(t[r].value).width,h=t[r].position;return n.position>h+l+10?(r=o,n):null}return n}));return n=n.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),qa=function(){function t(e,a){i(this,t),this.ctx=a,this.w=a.w,this.el=e}return s(t,[{key:"setupElements",value:function(){var t=this.w,e=t.globals,i=t.config,a=i.chart.type;e.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(a),e.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(a),e.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(a)&&i.plotOptions.bar.horizontal,e.chartClass=".apexcharts".concat(e.chartID),e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),Mi.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas ".concat(e.chartClass.substring(1))}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=window.SVG().addTo(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(i.chart.offsetX,", ").concat(i.chart.offsetY,")")}),e.dom.Paper.node.style.background="dark"!==i.theme.mode||i.chart.background?"light"!==i.theme.mode||i.chart.background?i.chart.background:"#fff":"#424242",this.setSVGDimensions(),e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject"),Mi.setAttrs(e.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap),e.dom.Paper.node.appendChild(e.dom.elLegendForeign),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,a=this.ctx,s=i.config,r=i.globals,n={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},o=s.chart.type||"line",l=null,h=0;r.series.forEach((function(e,a){var s=t[a].type||o;n[s]?("rangeArea"===s?(n[s].series.push(r.seriesRangeStart[a]),n[s].seriesRangeEnd.push(r.seriesRangeEnd[a])):n[s].series.push(e),n[s].i.push(a),"column"!==s&&"bar"!==s||(i.globals.columnSeries=n.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(s)?l=s:"bar"===s?(n.column.series.push(e),n.column.i.push(a)):console.warn("You have specified an unrecognized series type (".concat(s,").")),o!==s&&"scatter"!==s&&h++})),h>0&&(l&&console.warn("Chart or series type ".concat(l," cannot appear with other chart or series types.")),n.column.series.length>0&&s.plotOptions.bar.horizontal&&(h-=n.column.series.length,n.column={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||(r.comboCharts=h>0);var c=new Ba(a,e),d=new Ta(a,e);a.pie=new Ea(a);var u=new Ha(a);a.rangeBar=new Oa(a,e);var g=new Ya(a),p=[];if(r.comboCharts){var x,b,m=new Pi(a);if(n.area.series.length>0)(x=p).push.apply(x,f(m.drawSeriesByGroup(n.area,r.areaGroups,"area",c)));if(n.column.series.length>0)if(s.chart.stacked){var v=new Ia(a,e);p.push(v.draw(n.column.series,n.column.i))}else a.bar=new Pa(a,e),p.push(a.bar.draw(n.column.series,n.column.i));if(n.rangeArea.series.length>0&&p.push(c.draw(n.rangeArea.series,"rangeArea",n.rangeArea.i,n.rangeArea.seriesRangeEnd)),n.line.series.length>0)(b=p).push.apply(b,f(m.drawSeriesByGroup(n.line,r.lineGroups,"line",c)));if(n.candlestick.series.length>0&&p.push(d.draw(n.candlestick.series,"candlestick",n.candlestick.i)),n.boxPlot.series.length>0&&p.push(d.draw(n.boxPlot.series,"boxPlot",n.boxPlot.i)),n.rangeBar.series.length>0&&p.push(a.rangeBar.draw(n.rangeBar.series,n.rangeBar.i)),n.scatter.series.length>0){var y=new Ba(a,e,!0);p.push(y.draw(n.scatter.series,"scatter",n.scatter.i))}if(n.bubble.series.length>0){var w=new Ba(a,e,!0);p.push(w.draw(n.bubble.series,"bubble",n.bubble.i))}}else switch(s.chart.type){case"line":p=c.draw(r.series,"line");break;case"area":p=c.draw(r.series,"area");break;case"bar":if(s.chart.stacked)p=new Ia(a,e).draw(r.series);else a.bar=new Pa(a,e),p=a.bar.draw(r.series);break;case"candlestick":p=new Ta(a,e).draw(r.series,"candlestick");break;case"boxPlot":p=new Ta(a,e).draw(r.series,s.chart.type);break;case"rangeBar":p=a.rangeBar.draw(r.series);break;case"rangeArea":p=c.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":p=new Xa(a,e).draw(r.series);break;case"treemap":p=new Ga(a,e).draw(r.series);break;case"pie":case"donut":case"polarArea":p=a.pie.draw(r.series);break;case"radialBar":p=u.draw(r.series);break;case"radar":p=g.draw(r.series);break;default:p=c.draw(r.series)}return p}},{key:"setSVGDimensions",value:function(){var t=this.w,e=t.globals,i=t.config;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto",e.svgWidth=i.chart.width,e.svgHeight=i.chart.height;var a=v.getDimensions(this.el),s=i.chart.width.toString().split(/[0-9]+/g).pop();"%"===s?v.isNumber(a[0])&&(0===a[0].width&&(a=v.getDimensions(this.el.parentNode)),e.svgWidth=a[0]*parseInt(i.chart.width,10)/100):"px"!==s&&""!==s||(e.svgWidth=parseInt(i.chart.width,10));var r=String(i.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===r){var n=v.getDimensions(this.el.parentNode);e.svgHeight=n[1]*parseInt(i.chart.height,10)/100}else e.svgHeight=parseInt(i.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Mi.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==r){var o=i.chart.sparkline.enabled?0:e.axisCharts?i.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(e.svgHeight+o,"px")}e.dom.elWrap.style.width="".concat(e.svgWidth,"px"),e.dom.elWrap.style.height="".concat(e.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i=t.translateX;Mi.setAttrs(t.dom.elGraphical.node,{transform:"translate(".concat(i,", ").concat(e,")")})}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,a=t.config.chart.sparkline.enabled?1:15;a+=t.config.grid.padding.bottom,["top","bottom"].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(i=new xa(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var s=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*t.globals.radialSize;if(s&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var n=v.getBoundingClientRect(s);r=n.bottom;var o=n.bottom-n.top;r=Math.max(2.05*t.globals.radialSize,o)}var l=Math.ceil(r+e.translateY+i+a);e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).includes("%")||(e.dom.elWrap.style.height="".concat(l,"px"),Mi.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(l,"px"))}},{key:"coreCalculations",value:function(){new ea(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(){return[]}))},i=new Bi,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=e(),a.seriesYvalues=e()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var t=this.w,e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new na(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new na(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Ua(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new Pi(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var i=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];i.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){return t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){return t.updateSourceChart(i)})})),e.config.chart.events.selection=function(t,e){i.forEach((function(t){ApexCharts.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:e.xaxis.min,max:e.xaxis.max}},!1,!1,!1,!1)}))}}}}]),t}(),Za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"_updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(n){var o=[e.ctx];s&&(o=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(o=[e.ctx],e.ctx.w.globals.isExecCalled=!1),o.forEach((function(s,l){var h=s.w;if(h.globals.shouldAnimate=a,i||(h.globals.resized=!0,h.globals.dataChanged=!0,a&&s.series.getPreviousPaths()),t&&"object"===b(t)&&(s.config=new Wi(t),t=Pi.extendArrayProps(s.config,t,h),s.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,h.config=v.extend(h.config,t),r&&(h.globals.lastXAxis=t.xaxis?v.clone(t.xaxis):[],h.globals.lastYAxis=t.yaxis?v.clone(t.yaxis):[],h.globals.initialConfig=v.extend({},h.config),h.globals.initialSeries=v.clone(h.config.series),t.series))){for(var c=0;c2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(s){var r,n=i.w;return n.globals.shouldAnimate=e,n.globals.dataChanged=!0,e&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?(0===(r=t.map((function(t,e){return i._extendSeries(t,e)}))).length&&(r=[{data:[]}]),n.config.series=r):n.config.series=t.slice(),a&&(n.globals.initialConfig.series=v.clone(n.config.series),n.globals.initialSeries=v.clone(n.config.series)),i.ctx.update().then((function(){s(i.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var i=this.w,a=i.config.series[e];return u(u({},i.config.series[e]),{},{name:t.name?t.name:null==a?void 0:a.name,color:t.color?t.color:null==a?void 0:a.color,type:t.type?t.type:null==a?void 0:a.type,group:t.group?t.group:null==a?void 0:a.group,hidden:void 0!==t.hidden?t.hidden:null==a?void 0:a.hidden,data:t.data?t.data:null==a?void 0:a.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(e,"'], ").concat(s," circle[j='").concat(e,"'], ").concat(s," rect[j='").concat(e,"']")):void 0===e&&(a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(t,"']")),"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),a?(new Mi(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new Ni(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;t&&t.xaxis&&(a=t.xaxis),t&&t.yaxis&&(s=t.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;var r=function(t){void 0!==s[t]&&(i.config.yaxis[t].min=s[t].min,i.config.yaxis[t].max=s[t].max)};i.config.yaxis.map((function(t,a){i.globals.zoomed||void 0!==s[a]?r(a):void 0!==e.ctx.opts.yaxis[a]&&(t.min=e.ctx.opts.yaxis[a].min,t.max=e.ctx.opts.yaxis[a].max)}))}}]),t}();!function(){function t(){for(var t=arguments.length>0&&arguments[0]!==h?arguments[0]:[],s=arguments.length>1?arguments[1]:h,r=arguments.length>2?arguments[2]:h,n=arguments.length>3?arguments[3]:h,o=arguments.length>4?arguments[4]:h,l=arguments.length>5?arguments[5]:h,h=arguments.length>6?arguments[6]:h,c=t.slice(s,r||h),d=n.slice(o,l||h),u=0,g={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};;){if(c[u]=e.call(g,c[u]),d[u]=e.call(p,d[u]),c[u][0]!=d[u][0]||"M"==c[u][0]||"A"==c[u][0]&&(c[u][4]!=d[u][4]||c[u][5]!=d[u][5])?(Array.prototype.splice.apply(c,[u,1].concat(a.call(g,c[u]))),Array.prototype.splice.apply(d,[u,1].concat(a.call(p,d[u])))):(c[u]=i.call(g,c[u]),d[u]=i.call(p,d[u])),++u==c.length&&u==d.length)break;u==c.length&&c.push(["C",g.pos[0],g.pos[1],g.pos[0],g.pos[1],g.pos[0],g.pos[1]]),u==d.length&&d.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]])}return{start:c,dest:d}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function i(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function a(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var i,a,s,r,n,o,l,h,c,d,u,g,p,f,x,b,m,v,y,w,k,A,C,S,L,M,P=Math.abs(e[1]),I=Math.abs(e[2]),T=e[3]%360,z=e[4],X=e[5],R=e[6],E=e[7],Y=new bt(t),H=new bt(R,E),O=[];if(0===P||0===I||Y.x===H.x&&Y.y===H.y)return[["C",Y.x,Y.y,H.x,H.y,H.x,H.y]];i=new bt((Y.x-H.x)/2,(Y.y-H.y)/2).transform((new vt).rotate(T)),a=i.x*i.x/(P*P)+i.y*i.y/(I*I),a>1&&(P*=a=Math.sqrt(a),I*=a);s=(new vt).rotate(T).scale(1/P,1/I).rotate(-T),Y=Y.transform(s),H=H.transform(s),r=[H.x-Y.x,H.y-Y.y],o=r[0]*r[0]+r[1]*r[1],n=Math.sqrt(o),r[0]/=n,r[1]/=n,l=o<4?Math.sqrt(1-o/4):0,z===X&&(l*=-1);h=new bt((H.x+Y.x)/2+l*-r[1],(H.y+Y.y)/2+l*r[0]),c=new bt(Y.x-h.x,Y.y-h.y),d=new bt(H.x-h.x,H.y-h.y),u=Math.acos(c.x/Math.sqrt(c.x*c.x+c.y*c.y)),c.y<0&&(u*=-1);g=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(g*=-1);X&&u>g&&(g+=2*Math.PI);!X&&u0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(!1===e)return!1;for(var i=e,a=t.length;i(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class Ja{constructor(t){t.remember("_draggable",this),this.el=t,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(t){t?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(t){const e=!t.type.indexOf("mouse");if(e&&1!==t.which&&0!==t.buttons)return;if(this.el.dispatch("beforedrag",{event:t,handler:this}).defaultPrevented)return;t.preventDefault(),t.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point($a(t));const i=(e?"mouseup":"touchend")+".drag";zt(window,(e?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),zt(window,i,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:t,handler:this,box:this.box})}drag(t){const{box:e,lastClick:i}=this,a=this.el.point($a(t)),s=a.x-i.x,r=a.y-i.y;if(!s&&!r)return e;const n=e.x+s,o=e.y+r;this.box=new kt(n,o,e.w,e.h),this.lastClick=a,this.el.dispatch("dragmove",{event:t,handler:this,box:this.box}).defaultPrevented||this.move(n,o)}move(t,e){"svg"===this.el.type?gi.prototype.move.call(this.el,t,e):this.el.move(t,e)}endDrag(t){this.drag(t),this.el.fire("dragend",{event:t,handler:this,box:this.box}),Xt(window,"mousemove.drag"),Xt(window,"touchmove.drag"),Xt(window,"mouseup.drag"),Xt(window,"touchend.drag"),this.init(!0)}} /*! * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse * @version 4.0.1 @@ -17,13 +17,13 @@ function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=Array(e);i{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",Qa(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",Qa("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>Ka(t,e))),this.rotationPoint=Ka(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}};const es=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ts?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this}; /*! * @svgdotjs/svg.resize.js - An extension for svg.js which allows to resize elements which are selected -* @version 2.0.2 +* @version 2.0.4 * https://github.com/svgdotjs/svg.resize.js * * @copyright [object Object] * @license MIT * -* BUILT: Mon Jul 01 2024 15:05:58 GMT+0200 (Central European Summer Time) +* BUILT: Fri Sep 13 2024 12:43:14 GMT+0200 (Central European Summer Time) */ /*! * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse @@ -35,4 +35,4 @@ function Qa(t,e,i,a=null){return function(s){s.preventDefault(),s.stopPropagatio * * BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time) */ -function is(t,e,i,a=null){return function(s){s.preventDefault(),s.stopPropagation();var r=s.pageX||s.touches[0].pageX,n=s.pageY||s.touches[0].pageY;e.fire(t,{x:r,y:n,event:s,index:a,points:i})}}function as([t,e],{a:i,b:a,c:s,d:r,e:n,f:o}){return[t*i+e*s+n,t*a+e*r+o]}Q(Gt,{select:es(ts)}),Q([Ge,je,xe],{pointSelect:es(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",Qa("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>Ka(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class ss{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",is(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",is("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>as(t,e))),this.rotationPoint=as(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const rs=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ss?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this};Q(Gt,{select:rs(ss)}),Q([Ge,je,xe],{pointSelect:rs(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",is("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>as(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const ns=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),os=t=>{let e=1/0,i=1/0,a=-1/0,s=-1/0;for(let r=0;r{const s=t-e[0],r=(a-e[1])*i;return[s*i+e[0],r+e[1]]}));return os(a)}(this.box,s,r)}this.el.dispatch("resize",{box:new kt(l),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.move(l.x,l.y).size(l.width,l.height)}movePoint(t){this.lastEvent=t;const{x:e,y:i}=this.snapToGrid(this.el.point(ns(t))),a=this.el.array().slice();a[this.index]=[e,i],this.el.dispatch("resize",{box:os(a),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.plot(a)}rotate(t){this.lastEvent=t;const e=this.el.point(ns(t)),i=this.box.cx,a=this.box.cy,s=this.startPoint.x-i,r=this.startPoint.y-a,n=e.x-i,o=e.y-a,l=Math.sqrt(s*s+r*r)*Math.sqrt(n*n+o*o);if(0===l)return;let h=Math.acos((s*n+r*o)/l)/Math.PI*180;e.xdiv {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}';var h=(null===(l=t.opts.chart)||void 0===l?void 0:l.nonce)||t.w.config.chart.nonce;h&&o.setAttribute("nonce",h),r?s.prepend(o):n.head.appendChild(o)}var c=t.create(t.w.config.series,{});if(!c)return e(t);t.mount(c).then((function(){"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(c)})).catch((function(t){i(t)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var i=this,a=this.w;new hs(this).initModules();var s=this.w.globals;if(s.noData=!1,s.animationEnded=!1,!v.elementExists(this.el))return s.animationEnded=!0,this.destroy(),null;(this.responsive.checkResponsiveConfig(e),a.config.xaxis.convertedCatToNumeric)&&new Ni(a.config).convertCatToNumericXaxis(a.config,this.ctx);if(this.core.setupElements(),"treemap"===a.config.chart.type&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),0===s.svgWidth)return s.animationEnded=!0,null;var r=t;t.forEach((function(t,e){t.hidden&&(r=i.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}))}));var n=Pi.checkComboSeries(r,a.config.chart.type);s.comboCharts=n.comboCharts,s.comboBarCount=n.comboBarCount;var o=r.every((function(t){return t.data&&0===t.data.length}));(0===r.length||o&&s.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(r),this.theme.init(),new Vi(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),s.noData&&s.collapsedSeries.length!==s.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),s.axisCharts&&(this.core.coreCalculations(),"category"!==a.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new Pi(this).getLargestMarkerSize(),this.dimensions.plotCoords();var l=this.core.xySettings();this.grid.createGridMask();var h=this.core.plotChartType(r,l),c=new qi(this);return c.bringForward(),a.config.dataLabels.background.enabled&&c.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:h,xyRatios:l,dimensions:{plot:{left:a.globals.translateX,top:a.globals.translateY,width:a.globals.gridWidth,height:a.globals.gridHeight}}}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise((function(s,r){if(null===i.el)return r(new Error("Not enough data to display or target element not found"));(null===e||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new Ki(i);var n,o,l=i.grid.drawGrid();(i.annotations=new Fi(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position)&&(l&&a.globals.dom.elGraphical.add(l.el),null!=l&&null!==(n=l.elGridBorders)&&void 0!==n&&n.node&&a.globals.dom.elGraphical.add(l.elGridBorders));if(Array.isArray(e.elGraph))for(var h=0;h0&&a.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),s(i)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,e){var i=ds.get(e);i&&(i.disconnect(),ds.delete(e))}(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,i){e.id===v.escapeString(t)&&Apex._chartInstances.splice(i,1)})),new cs(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w;return n.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,i){return e.updateHelpers._extendSeries(t,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,a,s,r)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,e,i)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(t,e,a)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(t,e,a)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(t,e,a)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;e&&(i=e),i.annotations.removeAnnotation(i,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Ji(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ji(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var e=v.escapeString(t);if(Apex._chartInstances){var i=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i2?s-2:0),n=2;n{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",Qa("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>Ka(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class ss{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",is(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",is("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>as(t,e))),this.rotationPoint=as(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const rs=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ss?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this};Q(Gt,{select:rs(ss)}),Q([Ge,je,xe],{pointSelect:rs(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",is("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>as(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const ns=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),os=t=>{let e=1/0,i=1/0,a=-1/0,s=-1/0;for(let r=0;r{const s=t-e[0],r=(a-e[1])*i;return[s*i+e[0],r+e[1]]}));return os(a)}(this.box,s,r)}this.el.dispatch("resize",{box:new kt(l),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.size(l.width,l.height).move(l.x,l.y)}movePoint(t){this.lastEvent=t;const{x:e,y:i}=this.snapToGrid(this.el.point(ns(t))),a=this.el.array().slice();a[this.index]=[e,i],this.el.dispatch("resize",{box:os(a),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.plot(a)}rotate(t){this.lastEvent=t;const e=this.startPoint,i=this.el.point(ns(t)),{cx:a,cy:s}=this.box,r=e.x-a,n=e.y-s,o=i.x-a,l=i.y-s,h=Math.sqrt(r*r+n*n)*Math.sqrt(o*o+l*l);if(0===h)return;let c=Math.acos((r*o+n*l)/h)/Math.PI*180;if(!c)return;i.xdiv {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}';var h=(null===(l=t.opts.chart)||void 0===l?void 0:l.nonce)||t.w.config.chart.nonce;h&&o.setAttribute("nonce",h),r?s.prepend(o):n.head.appendChild(o)}var c=t.create(t.w.config.series,{});if(!c)return e(t);t.mount(c).then((function(){"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(c)})).catch((function(t){i(t)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var i=this,a=this.w;new hs(this).initModules();var s=this.w.globals;if(s.noData=!1,s.animationEnded=!1,!v.elementExists(this.el))return s.animationEnded=!0,this.destroy(),null;(this.responsive.checkResponsiveConfig(e),a.config.xaxis.convertedCatToNumeric)&&new Ni(a.config).convertCatToNumericXaxis(a.config,this.ctx);if(this.core.setupElements(),"treemap"===a.config.chart.type&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),0===s.svgWidth)return s.animationEnded=!0,null;var r=t;t.forEach((function(t,e){t.hidden&&(r=i.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}))}));var n=Pi.checkComboSeries(r,a.config.chart.type);s.comboCharts=n.comboCharts,s.comboBarCount=n.comboBarCount;var o=r.every((function(t){return t.data&&0===t.data.length}));(0===r.length||o&&s.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(r),this.theme.init(),new Vi(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),s.noData&&s.collapsedSeries.length!==s.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),s.axisCharts&&(this.core.coreCalculations(),"category"!==a.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new Pi(this).getLargestMarkerSize(),this.dimensions.plotCoords();var l=this.core.xySettings();this.grid.createGridMask();var h=this.core.plotChartType(r,l),c=new qi(this);return c.bringForward(),a.config.dataLabels.background.enabled&&c.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:h,xyRatios:l,dimensions:{plot:{left:a.globals.translateX,top:a.globals.translateY,width:a.globals.gridWidth,height:a.globals.gridHeight}}}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise((function(s,r){if(null===i.el)return r(new Error("Not enough data to display or target element not found"));(null===e||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new Ki(i);var n,o,l=i.grid.drawGrid();(i.annotations=new Fi(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position)&&(l&&a.globals.dom.elGraphical.add(l.el),null!=l&&null!==(n=l.elGridBorders)&&void 0!==n&&n.node&&a.globals.dom.elGraphical.add(l.elGridBorders));if(Array.isArray(e.elGraph))for(var h=0;h0&&a.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),s(i)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,e){var i=ds.get(e);i&&(i.disconnect(),ds.delete(e))}(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,i){e.id===v.escapeString(t)&&Apex._chartInstances.splice(i,1)})),new cs(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w;return n.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,i){return e.updateHelpers._extendSeries(t,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,a,s,r)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,e,i)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(t,e,a)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(t,e,a)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(t,e,a)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;e&&(i=e),i.annotations.removeAnnotation(i,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Ji(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ji(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var e=v.escapeString(t);if(Apex._chartInstances){var i=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i2?s-2:0),n=2;nt.length)&&(e=t.length);for(var i=0,a=Array(e);i=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,n=!0,o=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){o=!0,r=t},f:function(){try{n||null==i.return||i.return()}finally{if(o)throw r}}}}function n(t){var i=c();return function(){var a,s=l(t);if(i){var r=l(this).constructor;a=Reflect.construct(s,arguments,r)}else a=s.apply(this,arguments);return function(t,i){if(i&&("object"==typeof i||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return e(t)}(this,a)}}function o(t,e,i){return(e=x(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function d(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function u(t){for(var e=1;e>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-r)*s)+r)+256*(Math.round((a-n)*s)+n)+(Math.round((a-o)*s)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,i){return t.isColorHex(i)?this.shadeHexColor(e,i):this.shadeRGBColor(e,i)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===b(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,i=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var i="",a=t<0?"-":"",s=e[0].replace(".",""),r=Number(e[1])+1;if(r<0){for(i=a+"0.";r++;)i+="0";return i+s.replace(/^-/,"")}for(r-=s.length;r--;)i+="0";return s+i}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),i=t.clientHeight,a=t.clientWidth;return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[a-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),i]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:"x",i=t.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,i){if(i>=t.length)for(var a=i-t.length+1;a--;)t.push(void 0);return t.splice(i,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style.key=e[i])}},{key:"preciseAddition",value:function(t,e){var i=(String(t).split(".")[1]||"").length,a=(String(e).split(".")[1]||"").length,s=Math.pow(10,Math.max(i,a));return(Math.round(t*s)+Math.round(e*s))/s}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*a),e=Math.round(Math.abs(e)*a);e;){var s=e;e=t%e,t=s}return t/a}},{key:"getPrimeFactors",value:function(t){for(var e=[],i=2;t>=2;)t%i==0?(e.push(i),t/=i):i++;return e}},{key:"mod",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*a))%(e=Math.round(Math.abs(e)*a))/a}}]),t}(),y=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"animateLine",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animateMarker",value:function(t,e,i,a){t.attr({opacity:0}).animate(e).attr({opacity:1}).after((function(){a()}))}},{key:"animateRect",value:function(t,e,i,a,s){t.attr(e).animate(a).attr(i).after((function(){return s()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.realIndex,a=t.j,s=t.fill,r=t.pathFrom,n=t.pathTo,o=t.speed,l=t.delay,h=this.w,c=0;h.config.chart.animations.animateGradually.enabled&&(c=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&"bar"!==h.config.chart.type&&(c=0),this.morphSVG(e,i,a,"line"!==h.config.chart.type||h.globals.comboCharts?s:"stroke",r,n,o,l*c)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){var e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,i,a,s,r,n,o){var l=this,h=this.w;s||(s=t.attr("pathFrom")),r||(r=t.attr("pathTo"));var c=function(t){return"radar"===h.config.chart.type&&(n=1),"M 0 ".concat(h.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=c()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=c()),h.globals.shouldAnimate||(n=1),t.plot(s).animate(1,o).plot(s).animate(n,o).plot(r).after((function(){v.isNumber(i)?i===h.globals.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&l.animationCompleted(t):"none"!==a&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&e===h.globals.series.length-1||h.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}]),t}();const w={},k=[];function A(t,e){if(Array.isArray(t))for(const i of t)A(i,e);else if("object"!=typeof t)S(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(const e in t)A(e,t[e])}function C(t){return w[t]||{}}function S(t){k.push(...t)}function L(t,e){let i;const a=t.length,s=[];for(i=0;iz.has(t.nodeName),R=(t,e,i={})=>{const a={...e};for(const t in a)a[t].valueOf()===i[t]&&delete a[t];Object.keys(a).length?t.node.setAttribute("data-svgjs",JSON.stringify(a)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},Y="http://www.w3.org/2000/svg",E="http://www.w3.org/2000/xmlns/",H="http://www.w3.org/1999/xlink",O={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function F(){return O.window}let D=class{};const _={},N="___SYMBOL___ROOT___";function W(t,e=Y){return O.document.createElementNS(e,t)}function B(t,e=!1){if(t instanceof D)return t;if("object"==typeof t)return U(t);if(null==t)return new _[N];if("string"==typeof t&&"<"!==t.charAt(0))return U(O.document.querySelector(t));const i=e?O.document.createElement("div"):W("svg");return i.innerHTML=t,t=U(i.firstChild),i.removeChild(i.firstChild),t}function G(t,e){return e&&(e instanceof O.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:W(t)}function V(t){if(!t)return null;if(t.instance instanceof D)return t.instance;if("#document-fragment"===t.nodeName)return new _.Fragment(t);let e=P(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":_[e]||(e="Dom"),new _[e](t)}let U=V;function q(t,e=t.name,i=!1){return _[e]=t,i&&(_[N]=t),S(Object.getOwnPropertyNames(t.prototype)),t}let Z=1e3;function $(t){return"Svgjs"+P(t)+Z++}function J(t){for(let e=t.children.length-1;e>=0;e--)J(t.children[e]);return t.id?(t.id=$(t.nodeName),t):t}function Q(t,e){let i,a;for(a=(t=Array.isArray(t)?t:[t]).length-1;a>=0;a--)for(i in e)t[a].prototype[i]=e[i]}function K(t){return function(...e){const i=e[e.length-1];return!i||i.constructor!==Object||i instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(i)}}A("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=B(t)).before(this),this},insertAfter:function(t){return(t=B(t)).after(this),this}});const tt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,et=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,it=/rgb\((\d+),(\d+),(\d+)\)/,at=/(#[a-z_][a-z0-9\-_]*)/i,st=/\)\s*,?\s*/,rt=/\s/g,nt=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ot=/^rgb\(/,lt=/^(\s+)?$/,ht=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ct=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,dt=/[\s,]+/,ut=/[MLHVCSQTAZ]/i;function gt(t){const e=Math.round(t),i=Math.max(0,Math.min(255,e)).toString(16);return 1===i.length?"0"+i:i}function pt(t,e){for(let i=e.length;i--;)if(null==t[e[i]])return!1;return!0}function ft(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}A("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(dt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),A("Dom",{css:function(t,e){const i={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);i[e[0]]=e[1]})),i;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;i[e]=this.node.style.getPropertyValue(t)}return i}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||lt.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||lt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),A("Dom",{data:function(t,e,i){if(null==t)return this.data(L(function(t,e){let i;const a=t.length,s=[];for(i=0;i0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const i of t)e[i]=this.data(i);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===i||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),A("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class xt{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof xt||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:i,round:a,sin:s,PI:r}=Math;if("vibrant"===t){const t=24*i()+57,e=38*i()+45,a=360*i();return new xt(t,e,a,"lch")}if("sine"===t){const t=a(80*s(2*r*(e=null==e?i():e)/.5+.01)+150),n=a(50*s(2*r*e/.5+4.6)+200),o=a(100*s(2*r*e/.5+2.3)+150);return new xt(t,n,o)}if("pastel"===t){const t=8*i()+86,e=17*i()+9,a=360*i();return new xt(t,e,a,"lch")}if("dark"===t){const t=10+10*i(),e=50*i()+86,a=360*i();return new xt(t,e,a,"lch")}if("rgb"===t){const t=255*i(),e=255*i(),a=255*i();return new xt(t,e,a)}if("lab"===t){const t=100*i(),e=256*i()-128,a=256*i()-128;return new xt(t,e,a,"lab")}if("grey"===t){const t=255*i();return new xt(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(nt.test(t)||ot.test(t))}cmyk(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.min(1-a,1-s,1-r);if(1===n)return new xt(0,0,0,1,"cmyk");return new xt((1-a-n)/(1-n),(1-s-n)/(1-n),(1-r-n)/(1-n),n,"cmyk")}hsl(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.max(a,s,r),o=Math.min(a,s,r),l=(n+o)/2,h=n===o,c=n-o;return new xt(360*(h?0:n===a?((s-r)/c+(s.5?c/(2-n-o):c/(n+o)),100*l,"hsl")}init(t=0,e=0,i=0,a=0,s="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)s="string"==typeof a?a:s,a="string"==typeof a?0:a,Object.assign(this,{_a:t,_b:e,_c:i,_d:a,space:s});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const i=function(t,e){const i=pt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:pt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:pt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:pt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:pt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:pt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return i.space=e||i.space,i}(t,e);Object.assign(this,i)}else if("string"==typeof t)if(ot.test(t)){const e=t.replace(rt,""),[i,a,s]=it.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}else{if(!nt.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,i,a,s]=et.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}}const{_a:r,_b:n,_c:o,_d:l}=this,h="rgb"===this.space?{r:r,g:n,b:o}:"xyz"===this.space?{x:r,y:n,z:o}:"hsl"===this.space?{h:r,s:n,l:o}:"lab"===this.space?{l:r,a:n,b:o}:"lch"===this.space?{l:r,c:n,h:o}:"cmyk"===this.space?{c:r,m:n,y:o,k:l}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:i}=this.xyz();return new xt(116*e-16,500*(t-e),200*(e-i),"lab")}lch(){const{l:t,a:e,b:i}=this.lab(),a=Math.sqrt(e**2+i**2);let s=180*Math.atan2(i,e)/Math.PI;s<0&&(s*=-1,s=360-s);return new xt(t,a,s,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:a,a:s,b:r}=this;if("lch"===this.space){const{c:t,h:e}=this,i=Math.PI/180;s=t*Math.cos(i*e),r=t*Math.sin(i*e)}const n=(a+16)/116,o=s/500+n,l=n-r/200,h=16/116,c=.008856,d=7.787;t=.95047*(o**3>c?o**3:(o-h)/d),e=1*(n**3>c?n**3:(n-h)/d),i=1.08883*(l**3>c?l**3:(l-h)/d)}const a=3.2406*t+-1.5372*e+-.4986*i,s=-.9689*t+1.8758*e+.0415*i,r=.0557*t+-.204*e+1.057*i,n=Math.pow,o=.0031308,l=a>o?1.055*n(a,1/2.4)-.055:12.92*a,h=s>o?1.055*n(s,1/2.4)-.055:12.92*s,c=r>o?1.055*n(r,1/2.4)-.055:12.92*r;return new xt(255*l,255*h,255*c)}if("hsl"===this.space){let{h:t,s:e,l:i}=this;if(t/=360,e/=100,i/=100,0===e){i*=255;return new xt(i,i,i)}const a=i<.5?i*(1+e):i+e-i*e,s=2*i-a,r=255*ft(s,a,t+1/3),n=255*ft(s,a,t),o=255*ft(s,a,t-1/3);return new xt(r,n,o)}if("cmyk"===this.space){const{c:t,m:e,y:i,k:a}=this,s=255*(1-Math.min(1,t*(1-a)+a)),r=255*(1-Math.min(1,e*(1-a)+a)),n=255*(1-Math.min(1,i*(1-a)+a));return new xt(s,r,n)}return this;var t}toArray(){const{_a:t,_b:e,_c:i,_d:a,space:s}=this;return[t,e,i,a,s]}toHex(){const[t,e,i]=this._clamped().map(gt);return`#${t}${e}${i}`}toRgb(){const[t,e,i]=this._clamped();return`rgb(${t},${e},${i})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,o=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,l=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,h=(.4124*n+.3576*o+.1805*l)/.95047,c=(.2126*n+.7152*o+.0722*l)/1,d=(.0193*n+.1192*o+.9505*l)/1.08883,u=h>.008856?Math.pow(h,1/3):7.787*h+16/116,g=c>.008856?Math.pow(c,1/3):7.787*c+16/116,p=d>.008856?Math.pow(d,1/3):7.787*d+16/116;return new xt(u,g,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:i}=this.rgb(),{max:a,min:s,round:r}=Math;return[t,e,i].map((t=>a(0,s(r(t),255))))}}class bt{constructor(...t){this.init(...t)}clone(){return new bt(this)}init(t,e){const i=0,a=0,s=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==s.x?i:s.x,this.y=null==s.y?a:s.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){vt.isMatrixLike(t)||(t=new vt(t));const{x:e,y:i}=this;return this.x=t.a*e+t.c*i+t.e,this.y=t.b*e+t.d*i+t.f,this}}function mt(t,e,i){return Math.abs(e-t)<(i||1e-6)}class vt{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,i=t.flip&&(e||"x"===t.flip)?-1:1,a=t.flip&&(e||"y"===t.flip)?-1:1,s=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,r=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,n=t.scale&&t.scale.length?t.scale[0]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleX)?t.scaleX*i:i,o=t.scale&&t.scale.length?t.scale[1]*a:isFinite(t.scale)?t.scale*a:isFinite(t.scaleY)?t.scaleY*a:a,l=t.shear||0,h=t.rotate||t.theta||0,c=new bt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),d=c.x,u=c.y,g=new bt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=g.x,f=g.y,x=new bt(t.translate||t.tx||t.translateX,t.ty||t.translateY),b=x.x,m=x.y,v=new bt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:n,scaleY:o,skewX:s,skewY:r,shear:l,theta:h,rx:v.x,ry:v.y,tx:b,ty:m,ox:d,oy:u,px:p,py:f}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,i){const a=t.a*e.a+t.c*e.b,s=t.b*e.a+t.d*e.b,r=t.a*e.c+t.c*e.d,n=t.b*e.c+t.d*e.d,o=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return i.a=a,i.b=s,i.c=r,i.d=n,i.e=o,i.f=l,i}around(t,e,i){return this.clone().aroundO(t,e,i)}aroundO(t,e,i){const a=t||0,s=e||0;return this.translateO(-a,-s).lmultiplyO(i).translateO(a,s)}clone(){return new vt(this)}decompose(t=0,e=0){const i=this.a,a=this.b,s=this.c,r=this.d,n=this.e,o=this.f,l=i*r-a*s,h=l>0?1:-1,c=h*Math.sqrt(i*i+a*a),d=Math.atan2(h*a,h*i),u=180/Math.PI*d,g=Math.cos(d),p=Math.sin(d),f=(i*s+a*r)/l,x=s*c/(f*i-a)||r*c/(f*a+i);return{scaleX:c,scaleY:x,shear:f,rotate:u,translateX:n-t+t*g*c+e*(f*g*c-p*x),translateY:o-e+t*p*c+e*(f*p*c+g*x),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new vt(t);return mt(this.a,e.a)&&mt(this.b,e.b)&&mt(this.c,e.c)&&mt(this.d,e.d)&&mt(this.e,e.e)&&mt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=vt.fromArray([1,0,0,1,0,0]);return t=t instanceof Gt?t.matrixify():"string"==typeof t?vt.fromArray(t.split(dt).map(parseFloat)):Array.isArray(t)?vt.fromArray(t):"object"==typeof t&&vt.isMatrixLike(t)?t:"object"==typeof t?(new vt).transform(t):6===arguments.length?vt.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,i=this.c,a=this.d,s=this.e,r=this.f,n=t*a-e*i;if(!n)throw new Error("Cannot invert "+this);const o=a/n,l=-e/n,h=-i/n,c=t/n,d=-(o*s+h*r),u=-(l*s+c*r);return this.a=o,this.b=l,this.c=h,this.d=c,this.e=d,this.f=u,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(this,e,this)}rotate(t,e,i){return this.clone().rotateO(t,e,i)}rotateO(t,e=0,i=0){t=M(t);const a=Math.cos(t),s=Math.sin(t),{a:r,b:n,c:o,d:l,e:h,f:c}=this;return this.a=r*a-n*s,this.b=n*a+r*s,this.c=o*a-l*s,this.d=l*a+o*s,this.e=h*a-c*s+i*s-e*a+e,this.f=c*a+h*s-e*s-i*a+i,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t);const{a:s,b:r,c:n,d:o,e:l,f:h}=this;return this.a=s*t,this.b=r*e,this.c=n*t,this.d=o*e,this.e=l*t-i*t+i,this.f=h*e-a*e+a,this}shear(t,e,i){return this.clone().shearO(t,e,i)}shearO(t,e=0,i=0){const{a:a,b:s,c:r,d:n,e:o,f:l}=this;return this.a=a+s*t,this.c=r+n*t,this.e=o+l*t-i*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t),t=M(t),e=M(e);const s=Math.tan(t),r=Math.tan(e),{a:n,b:o,c:l,d:h,e:c,f:d}=this;return this.a=n+o*s,this.b=o+n*r,this.c=l+h*s,this.d=h+l*r,this.e=c+d*s-a*s,this.f=d+c*r-i*r,this}skewX(t,e,i){return this.skew(t,0,e,i)}skewY(t,e,i){return this.skew(0,t,e,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(vt.isMatrixLike(t)){return new vt(t).multiplyO(this)}const e=vt.formatTransforms(t),{x:i,y:a}=new bt(e.ox,e.oy).transform(this),s=(new vt).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-i,-a).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(i,a);if(isFinite(e.px)||isFinite(e.py)){const t=new bt(i,a).transform(s),r=isFinite(e.px)?e.px-t.x:0,n=isFinite(e.py)?e.py-t.y:0;s.translateO(r,n)}return s.translateO(e.tx,e.ty),s}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function yt(){if(!yt.nodes){const t=B().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;yt.nodes={svg:t,path:e}}if(!yt.nodes.svg.node.parentNode){const t=O.document.body||O.document.documentElement;yt.nodes.svg.addTo(t)}return yt.nodes}function wt(t){return!(t.width||t.height||t.x||t.y)}q(vt,"Matrix");class kt{constructor(...t){this.init(...t)}addOffset(){return this.x+=O.window.pageXOffset,this.y+=O.window.pageYOffset,new kt(this)}init(t){return t="string"==typeof t?t.split(dt).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return wt(this)}merge(t){const e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),a=Math.max(this.x+this.width,t.x+t.width)-e,s=Math.max(this.y+this.height,t.y+t.height)-i;return new kt(e,i,a,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof vt||(t=new vt(t));let e=1/0,i=-1/0,a=1/0,s=-1/0;return[new bt(this.x,this.y),new bt(this.x2,this.y),new bt(this.x,this.y2),new bt(this.x2,this.y2)].forEach((function(r){r=r.transform(t),e=Math.min(e,r.x),i=Math.max(i,r.x),a=Math.min(a,r.y),s=Math.max(s,r.y)})),new kt(e,a,i-e,s-a)}}function At(t,e,i){let a;try{if(a=e(t.node),wt(a)&&((s=t.node)!==O.document&&!(O.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===O.document}).call(O.document.documentElement,s)))throw new Error("Element not in the dom")}catch(e){a=i(t)}var s;return a}A({viewbox:{viewbox(t,e,i,a){return null==t?new kt(this.attr("viewBox")):this.attr("viewBox",new kt(t,e,i,a))},zoom(t,e){let{width:i,height:a}=this.attr(["width","height"]);if((i||a)&&"string"!=typeof i&&"string"!=typeof a||(i=this.node.clientWidth,a=this.node.clientHeight),!i||!a)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const s=this.viewbox(),r=i/s.width,n=a/s.height,o=Math.min(r,n);if(null==t)return o;let l=o/t;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new bt(i/2/r+s.x,a/2/n+s.y);const h=new kt(s).transform(new vt({scale:l,origin:e}));return this.viewbox(h)}}}),q(kt,"Box");class Ct extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}Q([Ct],{each(t,...e){return"function"==typeof t?this.map(((e,i,a)=>t.call(e,e,i,a))):this.map((i=>i[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const St=["toArray","constructor","each"];function Lt(t,e){return new Ct(L((e||O.document).querySelectorAll(t),(function(t){return V(t)})))}Ct.extend=function(t){t=t.reduce(((t,e)=>(St.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),Q([Ct],t)};let Mt=0;const Pt={};function It(t){let e=t.getEventHolder();return e===O.window&&(e=Pt),e.events||(e.events={}),e.events}function Tt(t){return t.getEventTarget()}function zt(t,e,i,a,s){const r=i.bind(a||t),n=B(t),o=It(n),l=Tt(n);e=Array.isArray(e)?e:e.split(dt),i._svgjsListenerId||(i._svgjsListenerId=++Mt),e.forEach((function(t){const e=t.split(".")[0],a=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][a]=o[e][a]||{},o[e][a][i._svgjsListenerId]=r,l.addEventListener(e,r,s||!1)}))}function Xt(t,e,i,a){const s=B(t),r=It(s),n=Tt(s);("function"!=typeof i||(i=i._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(dt)).forEach((function(t){const e=t&&t.split(".")[0],o=t&&t.split(".")[1];let l,h;if(i)r[e]&&r[e][o||"*"]&&(n.removeEventListener(e,r[e][o||"*"][i],a||!1),delete r[e][o||"*"][i]);else if(e&&o){if(r[e]&&r[e][o]){for(h in r[e][o])Xt(n,[e,o].join("."),h);delete r[e][o]}}else if(o)for(t in r)for(l in r[t])o===l&&Xt(n,[t,o].join("."));else if(e){if(r[e]){for(l in r[e])Xt(n,[e,l].join("."));delete r[e]}}else{for(t in r)Xt(n,t);!function(t){let e=t.getEventHolder();e===O.window&&(e=Pt),e.events&&(e.events={})}(s)}}))}class Rt extends D{addEventListener(){}dispatch(t,e,i){return function(t,e,i,a){const s=Tt(t);return e instanceof O.window.Event||(e=new O.window.CustomEvent(e,{detail:i,cancelable:!0,...a})),s.dispatchEvent(e),e}(this,t,e,i)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const i=e[t.type];for(const e in i)for(const a in i[e])i[e][a](t);return!t.defaultPrevented}fire(t,e,i){return this.dispatch(t,e,i),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,i){return Xt(this,t,e,i),this}on(t,e,i,a){return zt(this,t,e,i,a),this}removeEventListener(){}}function Yt(){}q(Rt,"EventTarget");const Et=400,Ht=">",Ot=0,Ft={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Dt extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(dt).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class _t{constructor(...t){this.init(...t)}convert(t){return new _t(this.value,t)}divide(t){return t=new _t(t),new _t(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(tt))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof _t&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new _t(t),new _t(this-t,this.unit||t.unit)}plus(t){return t=new _t(t),new _t(this+t,this.unit||t.unit)}times(t){return t=new _t(t),new _t(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Nt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Wt=[];class Bt extends Rt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=B(t)).removeNamespace&&this.node instanceof O.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return B(t).put(this,e)}children(){return new Ct(L(this.node.children,(function(t){return V(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let i=this.node.cloneNode(t);return e&&(i=J(i)),new this.constructor(i)}each(t,e){const i=this.children();let a,s;for(a=0,s=i.length;a=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=$(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return V(this.node.lastChild)}matches(t){const e=this.node,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return i&&i.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=V(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=V(e.node.parentNode));return e}put(t,e){return t=B(t),this.add(t,e),t}putIn(t,e){return B(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=B(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const i=10**t,a=this.attr(e);for(const t in a)"number"==typeof a[t]&&(a[t]=Math.round(a[t]*i)/i);return this.attr(a),this}svg(t,e){return this.xml(t,e,Y)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const i=e.index(this);return e.put(t,i).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let i=this;if(null!=t){if(i=V(i.node.cloneNode(!0)),e){const e=t(i);if(i=e||i,!1===e)return""}i.each((function(){const e=t(this),i=e||this;!1===e?this.remove():e&&this!==i&&this.replace(i)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;const a=W("wrapper",i),s=O.document.createDocumentFragment();a.innerHTML=t;for(let t=a.children.length;t--;)s.appendChild(a.firstElementChild);const r=this.parent();return e?this.replace(s)&&r:this.add(s)}}Q(Bt,{attr:function(t,e,i){if(null==t){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=ht.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ft[t]:ht.test(e)?parseFloat(e):e;"number"==typeof(e=Wt.reduce(((e,i)=>i(t,e,this)),e))?e=new _t(e):Nt.has(t)&&xt.isColor(e)?e=new xt(e):e.constructor===Array&&(e=new Dt(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return Lt(t,this.node)},findOne:function(t){return V(this.node.querySelector(t))}}),q(Bt,"Dom");class Gt extends Bt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new _t(t).plus(this.x()))}dy(t=0){return this.y(new _t(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=B(t));const i=new Ct;let a=this;for(;(a=a.parent())&&a.node!==O.document&&"#document-fragment"!==a.nodeName&&(i.push(a),e||a.node!==t.node)&&(!e||!a.matches(t));)if(a.node===this.root().node)return null;return i}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(at);return e?B(e[1]):null}root(){const t=this.parent(function(t){return _[t]}(N));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const i=I(this,t,e);return this.width(new _t(i.width)).height(new _t(i.height))}width(t){return this.attr("width",t)}writeDataToDom(){return R(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}Q(Gt,{bbox:function(){const t=At(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(yt().svg).show(),i=e.node.getBBox();return e.remove(),i}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new kt(t)},rbox:function(t){const e=At(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),i=new kt(e);return t?i.transform(t.screenCTM().inverseO()):i.addOffset()},inside:function(t,e){const i=this.bbox();return t>i.x&&e>i.y&&t=0;i--)null!=e[jt[t][i]]&&this.attr(jt.prefix(t,jt[t][i]),e[jt[t][i]]);return this},A(["Element","Runner"],e)})),A(["Element","Runner"],{matrix:function(t,e,i,a,s,r){return null==t?new vt(this):this.attr("transform",new vt(t,e,i,a,s,r))},rotate:function(t,e,i){return this.transform({rotate:t,ox:e,oy:i},!0)},skew:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:i},!0):this.transform({skew:[t,e],ox:i,oy:a},!0)},shear:function(t,e,i){return this.transform({shear:t,ox:e,oy:i},!0)},scale:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:i},!0):this.transform({scale:[t,e],ox:i,oy:a},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),A("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new _t(t)):this.rx(t).ry(e)}}),A("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new bt(this.node.getPointAtLength(t))}}),A(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});A("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),A("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){const t=(this.attr("transform")||"").split(st).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(dt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(vt.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new vt);return t},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);const i=this.screenCTM(),a=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(a.multiply(i)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new vt(this).decompose();return null==t?e:e[t]}vt.isMatrixLike(t)||(t={...t,origin:T(t,this)});const i=new vt(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});class Vt extends Gt{flatten(){return this.each((function(){if(this instanceof Vt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(i,a){return a[a.length-i-1].toParent(t,e)})),this.remove()}}q(Vt,"Container");class Ut extends Vt{constructor(t,e=t){super(G("defs",t),e)}flatten(){return this}ungroup(){return this}}q(Ut,"Defs");class qt extends Gt{}function Zt(t){return this.attr("rx",t)}function $t(t){return this.attr("ry",t)}function Jt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Qt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Kt(t){return this.attr("cx",t)}function te(t){return this.attr("cy",t)}function ee(t){return null==t?2*this.rx():this.rx(new _t(t).divide(2))}function ie(t){return null==t?2*this.ry():this.ry(new _t(t).divide(2))}q(qt,"Shape");var ae=Object.freeze({__proto__:null,cx:Kt,cy:te,height:ie,rx:Zt,ry:$t,width:ee,x:Jt,y:Qt});class se extends qt{constructor(t,e=t){super(G("ellipse",t),e)}size(t,e){const i=I(this,t,e);return this.rx(new _t(i.width).divide(2)).ry(new _t(i.height).divide(2))}}Q(se,ae),A("Container",{ellipse:K((function(t=0,e=t){return this.put(new se).size(t,e).move(0,0)}))}),q(se,"Ellipse");class re extends Bt{constructor(t=O.document.createDocumentFragment()){super(t)}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){const t=new Bt(W("wrapper",i));return t.add(this.node.cloneNode(!0)),t.xml(!1,i)}return super.xml(t,!1,i)}}function ne(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new _t(t),fy:new _t(e)}):this.attr({x1:new _t(t),y1:new _t(e)})}function oe(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new _t(t),cy:new _t(e)}):this.attr({x2:new _t(t),y2:new _t(e)})}q(re,"Fragment");var le=Object.freeze({__proto__:null,from:ne,to:oe});class he extends Vt{constructor(t,e){super(G(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,i){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}Q(he,le),A({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:K((function(t,e){return this.put(new he(t)).update(e)}))}}),q(he,"Gradient");class ce extends Vt{constructor(t,e=t){super(G("pattern",t),e)}attr(t,e,i){return"transform"===t&&(t="patternTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}A({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:K((function(t,e,i){return this.put(new ce).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),q(ce,"Pattern");let de=class extends qt{constructor(t,e=t){super(G("image",t),e)}load(t,e){if(!t)return this;const i=new O.window.Image;return zt(i,"load",(function(t){const a=this.parent(ce);0===this.width()&&0===this.height()&&this.size(i.width,i.height),a instanceof ce&&0===a.width()&&0===a.height()&&a.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),zt(i,"load error",(function(){Xt(i)})),this.attr("href",i.src=t,H)}};var ue;ue=function(t,e,i){return"fill"!==t&&"stroke"!==t||ct.test(e)&&(e=i.root().defs().image(e)),e instanceof de&&(e=i.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Wt.push(ue),A({Container:{image:K((function(t,e){return this.put(new de).size(0,0).load(t,e)}))}}),q(de,"Image");class ge extends Dt{bbox(){let t=-1/0,e=-1/0,i=1/0,a=1/0;return this.forEach((function(s){t=Math.max(s[0],t),e=Math.max(s[1],e),i=Math.min(s[0],i),a=Math.min(s[1],a)})),new kt(i,a,t-i,e-a)}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let i=this.length-1;i>=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(dt).map(parseFloat)).length%2!=0&&t.pop();for(let i=0,a=t.length;i=0;i--)a.width&&(this[i][0]=(this[i][0]-a.x)*t/a.width+a.x),a.height&&(this[i][1]=(this[i][1]-a.y)*e/a.height+a.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,i=this.length;e":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,i,a){return function(s){return s<0?t>0?e/t*s:i>0?a/i*s:0:s>1?i<1?(1-a)/(1-i)*s+(a-i)/(1-i):t<1?(1-e)/(1-t)*s+(e-t)/(1-t):1:3*s*(1-s)**2*e+3*s**2*(1-s)*a+s**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let i=t;return"none"===e?--i:"both"===e&&++i,(a,s=!1)=>{let r=Math.floor(a*t);const n=a*r%1==0;return"start"!==e&&"both"!==e||++r,s&&n&&--r,a>=0&&r<0&&(r=0),a<=1&&r>i&&(r=i),r/i}}};class ye{done(){return!1}}class we extends ye{constructor(t=Ht){super(),this.ease=ve[t]||t}step(t,e,i){return"number"!=typeof t?i<1?t:e:t+(e-t)*this.ease(i)}}class ke extends ye{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,i,a){return this.stepper(t,e,i,a)}}function Ae(){const t=(this._duration||500)/1e3,e=this._overshoot||0,i=Math.PI,a=Math.log(e/100+1e-10),s=-a/Math.sqrt(i*i+a*a),r=3.9/(s*t);this.d=2*s*r,this.k=r*r}Q(class extends ke{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;i>100&&(i=16),i/=1e3;const s=a.velocity||0,r=-this.d*s-this.k*(t-e),n=t+s*i+r*i*i/2;return a.velocity=s+r*i,a.done=Math.abs(e-n)+Math.abs(s)<.002,a.done?e:n}},{duration:me("_duration",Ae),overshoot:me("_overshoot",Ae)});Q(class extends ke{constructor(t=.1,e=.01,i=0,a=1e3){super(),this.p(t).i(e).d(i).windup(a)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;const s=e-t;let r=(a.integral||0)+s*i;const n=(s-(a.error||0))/i,o=this._windup;return!1!==o&&(r=Math.max(-o,Math.min(r,o))),a.error=s,a.integral=r,a.done=Math.abs(s)<.001,a.done?e:t+(this.P*s+this.I*r+this.D*n)}},{windup:me("_windup"),p:me("P"),i:me("I"),d:me("D")});const Ce={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Se={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Le="mlhvqtcsaz".split("");for(let t=0,e=Le.length;t=0;a--)i=this[a][0],"M"===i||"L"===i||"T"===i?(this[a][1]+=t,this[a][2]+=e):"H"===i?this[a][1]+=t:"V"===i?this[a][1]+=e:"C"===i||"S"===i||"Q"===i?(this[a][1]+=t,this[a][2]+=e,this[a][3]+=t,this[a][4]+=e,"C"===i&&(this[a][5]+=t,this[a][6]+=e)):"A"===i&&(this[a][6]+=t,this[a][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let i=0,a="";const s={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new bt,p:new bt};for(;s.lastToken=a,a=t.charAt(i++);)if(s.inSegment||!Pe(s,a))if("."!==a)if(isNaN(parseInt(a)))if(Re.has(a))s.inNumber&&Ie(s,!1);else if("-"!==a&&"+"!==a)if("E"!==a.toUpperCase()){if(ut.test(a)){if(s.inNumber)Ie(s,!1);else{if(!Me(s))throw new Error("parser Error");Te(s)}--i}}else s.number+=a,s.hasExponent=!0;else{if(s.inNumber&&!Xe(s)){Ie(s,!1),--i;continue}s.number+=a,s.inNumber=!0}else{if("0"===s.number||ze(s)){s.inNumber=!0,s.number=a,Ie(s,!0);continue}s.inNumber=!0,s.number+=a}else{if(s.pointSeen||s.hasExponent){Ie(s,!1),--i;continue}s.inNumber=!0,s.pointSeen=!0,s.number+=a}return s.inNumber&&Ie(s,!1),s.inSegment&&Me(s)&&Te(s),s.segments}(t)}size(t,e){const i=this.bbox();let a,s;for(i.width=0===i.width?1:i.width,i.height=0===i.height?1:i.height,a=this.length-1;a>=0;a--)s=this[a][0],"M"===s||"L"===s||"T"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y):"H"===s?this[a][1]=(this[a][1]-i.x)*t/i.width+i.x:"V"===s?this[a][1]=(this[a][1]-i.y)*e/i.height+i.y:"C"===s||"S"===s||"Q"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y,this[a][3]=(this[a][3]-i.x)*t/i.width+i.x,this[a][4]=(this[a][4]-i.y)*e/i.height+i.y,"C"===s&&(this[a][5]=(this[a][5]-i.x)*t/i.width+i.x,this[a][6]=(this[a][6]-i.y)*e/i.height+i.y)):"A"===s&&(this[a][1]=this[a][1]*t/i.width,this[a][2]=this[a][2]*e/i.height,this[a][6]=(this[a][6]-i.x)*t/i.width+i.x,this[a][7]=(this[a][7]-i.y)*e/i.height+i.y);return this}toString(){return function(t){let e="";for(let i=0,a=t.length;i{const e=typeof t;return"number"===e?_t:"string"===e?xt.isColor(t)?xt:dt.test(t)?ut.test(t)?Ye:Dt:tt.test(t)?_t:Oe:Ne.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Dt:"object"===e?_e:Oe};class He{constructor(t){this._stepper=t||new we("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Ee(t));let e=new this._type(t);return this._type===xt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===_e&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Oe{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Fe{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Fe.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Fe.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const De=(t,e)=>t[0]e[0]?1:0;class _e{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let i=0,a=e.length;it.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const i=e.shift(),a=e.shift(),s=e.shift(),r=e.splice(0,s);t[i]=new a(r)}return t}}const Ne=[Oe,Fe,_e];class We extends qt{constructor(t,e=t){super(G("path",t),e)}array(){return this._array||(this._array=new Ye(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Ye(t))}size(t,e){const i=I(this,t,e);return this.attr("d",this.array().size(i.width,i.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}We.prototype.MorphArray=Ye,A({Container:{path:K((function(t){return this.put(new We).plot(t||new Ye)}))}}),q(We,"Path");var Be=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new ge(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new ge(t))},size:function(t,e){const i=I(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}});class Ge extends qt{constructor(t,e=t){super(G("polygon",t),e)}}A({Container:{polygon:K((function(t){return this.put(new Ge).plot(t||new ge)}))}}),Q(Ge,fe),Q(Ge,Be),q(Ge,"Polygon");class je extends qt{constructor(t,e=t){super(G("polyline",t),e)}}A({Container:{polyline:K((function(t){return this.put(new je).plot(t||new ge)}))}}),Q(je,fe),Q(je,Be),q(je,"Polyline");class Ve extends qt{constructor(t,e=t){super(G("rect",t),e)}}Q(Ve,{rx:Zt,ry:$t}),A({Container:{rect:K((function(t,e){return this.put(new Ve).size(t,e)}))}}),q(Ve,"Rect");class Ue{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const qe={nextDraw:null,frames:new Ue,timeouts:new Ue,immediates:new Ue,timer:()=>O.window.performance||O.window.Date,transforms:[],frame(t){const e=qe.frames.push({run:t});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},timeout(t,e){e=e||0;const i=qe.timer().now()+e,a=qe.timeouts.push({run:t,time:i});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),a},immediate(t){const e=qe.immediates.push(t);return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},cancelFrame(t){null!=t&&qe.frames.remove(t)},clearTimeout(t){null!=t&&qe.timeouts.remove(t)},cancelImmediate(t){null!=t&&qe.immediates.remove(t)},_draw(t){let e=null;const i=qe.timeouts.last();for(;(e=qe.timeouts.shift())&&(t>=e.time?e.run():qe.timeouts.push(e),e!==i););let a=null;const s=qe.frames.last();for(;a!==s&&(a=qe.frames.shift());)a.run(t);let r=null;for(;r=qe.immediates.shift();)r();qe.nextDraw=qe.timeouts.first()||qe.frames.first()?O.window.requestAnimationFrame(qe._draw):null}},Ze=function(t){const e=t.start,i=t.runner.duration();return{start:e,duration:i,end:e+i,runner:t.runner}},$e=function(){const t=O.window;return(t.performance||t.Date).now()};class Je extends Rt{constructor(t=$e){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const i=Math.abs(e);return this.speed(t?-i:i)}schedule(t,e,i){if(null==t)return this._runners.map(Ze);let a=0;const s=this.getEndTime();if(e=e||0,null==i||"last"===i||"after"===i)a=s;else if("absolute"===i||"start"===i)a=e,e=0;else if("now"===i)a=this._time;else if("relative"===i){const i=this.getRunnerInfoById(t.id);i&&(a=i.start+e,e=0)}else{if("with-last"!==i)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();a=t?t.start:this._time}}t.unschedule(),t.timeline(this);const r=t.persist(),n={persist:null===r?this._persist:r,start:a+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(n),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return qe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let i=e-this._lastSourceTime;t&&(i=0);const a=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=a,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],i=e.runner;this._time-e.start<=0&&i.reset()}let s=!1;for(let t=0,e=this._runners.length;t0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}A({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Je,this._timeline):(this._timeline=t,this)}}});class Qe extends Rt{constructor(t){super(),this.id=Qe.id++,t="function"==typeof(t=null==t?Et:t)?new ke(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ke,this._stepper=this._isDeclarative?t:new we,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new vt,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,i){let a=1,s=!1,r=0;return e=e??Ot,i=i||"last","object"!=typeof(t=t??Et)||t instanceof ye||(e=t.delay??e,i=t.when??i,s=t.swing||s,a=t.times??a,r=t.wait??r,t=t.duration??Et),{duration:t,delay:e,swing:s,times:a,wait:r,when:i}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,i){const a=Qe.sanitise(t,e,i),s=new Qe(a.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(a).schedule(a.delay,a.when)}clearTransform(){return this.transforms=new vt,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new we(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,i){return"object"==typeof t&&(e=t.swing,i=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=i||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),i=(this._time-t*e)/this._duration;return Math.min(t+i,this._times)}const i=t%1,a=e*Math.floor(t)+this._duration*i;return this.time(a)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,i=this._duration,a=this._wait,s=this._times,r=this._swing,n=this._reverse;let o;if(null==t){const t=function(t){const e=r*Math.floor(t%(2*(a+i))/(a+i)),s=e&&!n||!e&&n,o=Math.pow(-1,s)*(t%(a+i))/i+s;return Math.max(Math.min(o,1),0)},l=s*(a+i)-a;return o=e<=0?Math.round(t(1e-5)):e=0;this._lastPosition=e;const a=this.duration(),s=this._lastTime<=0&&this._time>0,r=this._lastTime=a;this._lastTime=this._time,s&&this.fire("start",this);const n=this._isDeclarative;this.done=!n&&!r&&this._time>=a,this._reseted=!1;let o=!1;return(i||n)&&(this._initialise(i),this.transforms=new vt,o=this._run(n?t:e),this.fire("step",this)),this.done=this.done||o&&n,r&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,i=this._queue.length;et.lmultiplyO(e),ei=t=>t.transforms;function ii(){const t=this._transformationRunners.runners.map(ei).reduce(ti,new vt);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class ai{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Ke).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const i=this.ids.indexOf(t+1);return this.ids.splice(i,1,t+1),this.runners.splice(i,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;ee.id<=t.id)).map(ei).reduce(ti,new vt)},_addRunner(t){this._transformationRunners.add(t),qe.cancelImmediate(this._frameId),this._frameId=qe.immediate(ii.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new ai).add(new Ke(new vt(this))))}}});Q(Qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,i){if("string"==typeof e)return this.styleAttr(t,{[e]:i});let a=e;if(this._tryRetarget(t,a))return this;let s=new He(this._stepper).to(a),r=Object.keys(a);return this.queue((function(){s=s.from(this.element()[t](r))}),(function(e){return this.element()[t](s.at(e).valueOf()),s.done()}),(function(e){const i=Object.keys(e),n=(o=r,i.filter((t=>!o.includes(t))));var o;if(n.length){const e=this.element()[t](n),i=new _e(s.from()).valueOf();Object.assign(i,e),s.from(i)}const l=new _e(s.to()).valueOf();Object.assign(l,e),s.to(l),r=i,a=e})),this._rememberMorpher(t,s),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let i=new He(this._stepper).to(new _t(t));return this.queue((function(){i=i.from(this.element().zoom())}),(function(t){return this.element().zoom(i.at(t),e),i.done()}),(function(t,a){e=a,i.to(t)})),this._rememberMorpher("zoom",i),this},transform(t,e,i){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const a=vt.isMatrixLike(t);i=null!=t.affine?t.affine:null!=i?i:!a;const s=new He(this._stepper).type(i?Fe:vt);let r,n,o,l,h;return this.queue((function(){n=n||this.element(),r=r||T(t,n),h=new vt(e?void 0:n),n._addRunner(this),e||n._clearTransformRunnersBefore(this)}),(function(c){e||this.clearTransform();const{x:d,y:u}=new bt(r).transform(n._currentTransform(this));let g=new vt({...t,origin:[d,u]}),p=this._isDeclarative&&o?o:h;if(i){g=g.decompose(d,u),p=p.decompose(d,u);const t=g.rotate,e=p.rotate,i=[t-360,t,t+360],a=i.map((t=>Math.abs(t-e))),s=Math.min(...a),r=a.indexOf(s);g.rotate=i[r]}e&&(a||(g.rotate=t.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),s.from(p),s.to(g);const f=s.at(c);return l=f.rotate,o=new vt(f),this.addTransform(o),n._addRunner(this),s.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(r=T(e,n)),t={...e,origin:r}}),!0),this._isDeclarative&&this._rememberMorpher("transform",s),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new _t(e),this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);let a=null;return this.queue((function(){a=this.element()[t](),i.from(a),i.to(a+e)}),(function(e){return this.element()[t](i.at(e)),i.done()}),(function(t){i.to(a+new _t(t))})),this._rememberMorpher(t,i),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);return this.queue((function(){i.from(this.element()[t]())}),(function(e){return this.element()[t](i.at(e)),i.done()})),this._rememberMorpher(t,i),this},_queueNumber(t,e){return this._queueObject(t,new _t(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let i;return t&&e||(i=this._element.bbox()),t||(t=i.width/i.height*e),e||(e=i.height/i.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,i,a){if(4===arguments.length)return this.plot([t,e,i,a]);if(this._tryRetarget("plot",t))return this;const s=new He(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){s.from(this._element.array())}),(function(t){return this._element.plot(s.at(t)),s.done()})),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,i,a){return this._queueObject("viewbox",new kt(t,e,i,a))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Q(Qe,{rx:Zt,ry:$t,from:ne,to:oe}),q(Qe,"Runner");class si extends Vt{constructor(t,e=t){super(G("svg",t),e),this.namespace()}defs(){return this.isRoot()?V(this.node.querySelector("defs"))||this.put(new Ut):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof O.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:Y,version:"1.1"}).attr("xmlns:xlink",H,E):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,E).attr("xmlns:svgjs",null,E)}root(){return this.isRoot()?this:super.root()}}A({Container:{nested:K((function(){return this.put(new si)}))}}),q(si,"Svg",!0);let ri=class extends Vt{constructor(t,e=t){super(G("symbol",t),e)}};A({Container:{symbol:K((function(){return this.put(new ri)}))}}),q(ri,"Symbol");var ni=Object.freeze({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,i=this.bbox()){return this.cx(t,i).cy(e,i)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,i=this.bbox()){return this.x(t,i).y(e,i)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(O.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}});class oi extends qt{constructor(t,e=t){super(G("text",t),e),this.dom.leading=this.dom.leading??new _t(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new _t(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const i=this.dom.leading;this.each((function(a){if(X(this.node))return;const s=O.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=i*new _t(s);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=r:(this.attr("dy",a?r+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new _t(t.leading||1.3),this}writeDataToDom(){return R(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let i=0;t="";for(let a=0,s=e.length;a{let a;try{a=i.node instanceof F().SVGSVGElement?new kt(i.attr(["x","y","width","height"])):i.bbox()}catch(t){return}const s=new vt(i),r=s.translate(t,e).transform(s.inverse()),n=new bt(a.x,a.y).transform(r);i.move(n.x,n.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,i=this.bbox()){const a=t-i.x,s=e-i.y;return this.dmove(a,s)},size:function(t,e,i=this.bbox()){const a=I(this,t,e,i),s=a.width/i.width,r=a.height/i.height;return this.children().forEach((t=>{const e=new bt(i).transform(new vt(t).inverse());t.scale(s,r,e.x,e.y)})),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}});class gi extends Vt{constructor(t,e=t){super(G("g",t),e)}}Q(gi,ui),A({Container:{group:K((function(){return this.put(new gi)}))}}),q(gi,"G");class pi extends Vt{constructor(t,e=t){super(G("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,H)}}Q(pi,ui),A({Container:{link:K((function(t){return this.put(new pi).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const i=e.index(t);return e.add(this,i),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new pi,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),q(pi,"A");class fi extends Vt{constructor(t,e=t){super(G("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Lt("svg [mask*="+this.id()+"]")}}A({Container:{mask:K((function(){return this.defs().put(new fi)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof fi?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),q(fi,"Mask");class xi extends Gt{constructor(t,e=t){super(G("stop",t),e)}update(t){return("number"==typeof t||t instanceof _t)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new _t(t.offset)),this}}A({Gradient:{stop:function(t,e,i){return this.put(new xi).update(t,e,i)}}}),q(xi,"Stop");class bi extends Gt{constructor(t,e=t){super(G("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,i={}){return this.rule("@font-face",{fontFamily:t,src:e,...i})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let i=t+"{";for(const t in e)i+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return i+="}",i}(t,e))}}A("Dom",{style(t,e){return this.put(new bi).rule(t,e)},fontface(t,e,i){return this.put(new bi).font(t,e,i)}}),q(bi,"Style");class mi extends oi{constructor(t,e=t){super(G("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let i=null;return e&&(i=e.plot(t)),null==t?i:this}track(){return this.reference("href")}}A({Container:{textPath:K((function(t,e){return t instanceof oi||(t=this.text(t)),t.path(e)}))},Text:{path:K((function(t,e=!0){const i=new mi;let a;if(t instanceof We||(t=this.defs().path(t)),i.attr("href","#"+t,H),e)for(;a=this.node.firstChild;)i.node.appendChild(a);return this.put(i)})),textPath(){return this.findOne("textPath")}},Path:{text:K((function(t){return t instanceof oi||(t=(new oi).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Lt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),mi.prototype.MorphArray=Ye,q(mi,"TextPath");class vi extends qt{constructor(t,e=t){super(G("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,H)}}A({Container:{use:K((function(t,e){return this.put(new vi).use(t,e)}))}}),q(vi,"Use");const yi=B;Q([si,ri,de,ce,be],C("viewbox")),Q([xe,je,Ge,We],C("marker")),Q(oi,C("Text")),Q(We,C("Path")),Q(Ut,C("Defs")),Q([oi,li],C("Tspan")),Q([Ve,se,he,Qe],C("radius")),Q(Rt,C("EventTarget")),Q(Bt,C("Dom")),Q(Gt,C("Element")),Q(qt,C("Shape")),Q([Vt,re],C("Container")),Q(he,C("Gradient")),Q(Qe,C("Runner")),Ct.extend([...new Set(k)]),function(t=[]){Ne.push(...[].concat(t))}([_t,xt,kt,vt,Dt,ge,Ye,bt]),Q(Ne,{to(t){return(new He).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,i,a,s){return this.fromArray(t.map((function(t,r){return a.step(t,e[r],i,s[r],s)})))}});class wi extends Gt{constructor(t){super(G("filter",t),t),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(t,e){return!(t=super.put(t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return Lt('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class ki extends Gt{constructor(t,e){super(t,e),this.result(this.id())}in(t){if(null==t){const t=this.attr("in");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in",t)}result(t){return this.attr("result",t)}toString(){return this.result()}}const Ai=t=>function(...e){for(let i=t.length;i--;)null!=e[i]&&this.attr(t[i],e[i])},Ci={blend:Ai(["in","in2","mode"]),colorMatrix:Ai(["type","values"]),composite:Ai(["in","in2","operator"]),convolveMatrix:function(t){t=new Dt(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Ai(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Ai(["in","dx","dy","stdDeviation"]),flood:Ai(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,H)},morphology:Ai(["operator","radius"]),offset:Ai(["dx","dy"]),specularLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Ai([]),turbulence:Ai(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((t=>{const e=P(t),i=Ci[t];wi[e+"Effect"]=class extends ki{constructor(t){super(G("fe"+e,t),t)}update(t){return i.apply(this,t),this}},wi.prototype[t]=K((function(t,...i){const a=new wi[e+"Effect"];return null==t?this.put(a):("function"==typeof t?t.call(a,a):i.unshift(t),this.put(a).update(i))}))})),Q(wi,{merge(t){const e=this.put(new wi.MergeEffect);if("function"==typeof t)return t.call(e,e),e;return(t instanceof Array?t:[...arguments]).forEach((t=>{t instanceof wi.MergeNode?e.put(t):e.mergeNode(t)})),e},componentTransfer(t={}){const e=this.put(new wi.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;if(!(t.r||t.g||t.b||t.a)){t={r:t,g:t,b:t,a:t}}for(const i in t)e.add(new(wi["Func"+i.toUpperCase()])(t[i]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((t=>{const e=P(t);wi[e]=class extends ki{constructor(t){super(G("fe"+e,t),t)}}}));["funcR","funcG","funcB","funcA"].forEach((function(t){const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.ComponentTransferEffect.prototype[t]=i}));["distantLight","pointLight","spotLight"].forEach((t=>{const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.DiffuseLightingEffect.prototype[t]=i,wi.SpecularLightingEffect.prototype[t]=i})),Q(wi.MergeEffect,{mergeNode(t){return this.put(new wi.MergeNode).attr("in",t)}}),Q(Ut,{filter:function(t){const e=this.put(new wi);return"function"==typeof t&&t.call(e,e),e}}),Q(Vt,{filter:function(t){return this.defs().filter(t)}}),Q(Gt,{filterWith:function(t){const e=t instanceof wi?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const Si={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,i,a){return this.parent()&&this.parent().diffuseLighting(t,i,a).in(this)},displacementMap:function(t,e,i,a){return this.parent()&&this.parent().displacementMap(this,t,e,i,a)},dropShadow:function(t,e,i){return this.parent()&&this.parent().dropShadow(this,t,e,i).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){return t=t instanceof Array?t:[...t],this.parent()&&this.parent().merge(this,...t)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,i,a,s){return this.parent()&&this.parent().specularLighting(t,i,a,s).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,a,s){return this.parent()&&this.parent().turbulence(t,e,i,a,s).in(this)}};Q(ki,Si),Q(wi.MergeEffect,{in:function(t){return t instanceof wi.MergeNode?this.add(t,0):this.add((new wi.MergeNode).in(t),0),this}}),Q([wi.CompositeEffect,wi.BlendEffect,wi.DisplacementMapEffect],{in2:function(t){if(null==t){const t=this.attr("in2");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in2",t)}}),wi.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var Li=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getDefaultFilter",value:function(t,e){var i=this.w;t.unfilter(!0),(new wi).size("120%","180%","-5%","-40%"),i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"applyFilter",value:function(t,e,i){var a,s=this,r=this.w;if(t.unfilter(!0),"none"!==i){var n,o,l=r.config.chart.dropShadow,h="lighten"===i?2:.3;if(t.filterWith((function(t){t.colorMatrix({type:"matrix",values:"\n ".concat(h," 0 0 0 0\n 0 ").concat(h," 0 0 0\n 0 0 ").concat(h," 0 0\n 0 0 0 1 0\n "),in:"SourceGraphic",result:"brightness"}),l.enabled&&s.addShadow(t,e,l,"brightness")})),!l.noUserSpaceOnUse)null===(n=t.filterer())||void 0===n||null===(o=n.node)||void 0===o||o.setAttribute("filterUnits","userSpaceOnUse");this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node)}else this.getDefaultFilter(t,e)}},{key:"addShadow",value:function(t,e,i,a){var s,r=this.w,n=i.blur,o=i.top,l=i.left,h=i.color,c=i.opacity;if(h=Array.isArray(h)?h[e]:h,(null===(s=r.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:a,dx:l,dy:o,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:n,result:"blur"}),t.flood({"flood-color":h,"flood-opacity":c,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",a])}},{key:"dropShadow",value:function(t,e){var i,a,s,r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.w;if(t.unfilter(!0),v.isMsEdge()&&"radialBar"===o.config.chart.type)return t;if((null===(i=o.config.chart.dropShadow.enabledOnSeries)||void 0===i?void 0:i.length)>0&&-1===(null===(s=o.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.indexOf(n)))return t;return t.filterWith((function(t){r.addShadow(t,n,e,"SourceGraphic")})),e.noUserSpaceOnUse||t.filterer().node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node),t}},{key:"setSelectionFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;"none"!==s&&this.applyFilter(t,e,s.type)}}},{key:"_scaleFilterSize",value:function(t){if(t){!function(e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}}]),t}(),Mi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"roundPathCorners",value:function(t,e){function i(t,e,i){var s=e.x-t.x,r=e.y-t.y,n=Math.sqrt(s*s+r*r);return a(t,e,Math.min(1,i/n))}function a(t,e,i){return{x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}}function s(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function r(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var n=t.split(/[,\s]/).reduce((function(t,e){var i=e.match("([a-zA-Z])(.+)");return i?(t.push(i[1]),t.push(i[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),o=[];if(n.length>1){var l=r(n[0]),h=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(h=["L",l.x,l.y],n[n.length-1]=h),o.push(n[0]);for(var c=1;c2&&"L"==u[0]&&g.length>2&&"L"==g[0]){var p,f,x=r(d),b=r(u),m=r(g);p=i(b,x,e),f=i(b,m,e),s(u,p),u.origPoint=b,o.push(u);var v=a(p,b,.5),y=a(b,f,.5),w=["C",v.x,v.y,y.x,y.y,f.x,f.y];w.origPoint=b,o.push(w)}else o.push(u)}if(h){var k=r(o[o.length-1]);o.push(["Z"]),s(o[0],k)}}else o=n;return o.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":n,"stroke-linecap":o})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,c=this.w.globals.dom.Paper.rect();return c.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":h}),c.node.setAttribute("fill",r),c}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:a,stroke:e,"stroke-width":i})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var i=this.w.globals.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,s=void 0===a?"#a8a8a8":a,r=t.strokeWidth,n=void 0===r?1:r,o=t.fill,l=t.fillOpacity,h=void 0===l?1:l,c=t.strokeOpacity,d=void 0===c?1:c,u=t.classes,g=t.strokeLinecap,p=void 0===g?null:g,f=t.strokeDashArray,x=void 0===f?0:f,b=this.w;return null===p&&(p=b.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(b.globals.gridHeight)),b.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":h,stroke:s,"stroke-opacity":d,"stroke-linecap":p,"stroke-width":n,"stroke-dasharray":x,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){var i=["M",t,e].join(" ");return i}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=[" L",t,e].join(" "):"H"===i?a=[" H",t].join(" "):"V"===i&&(a=[" V",e].join(" ")),a}},{key:"curve",value:function(t,e,i,a,s,r){var n=["C",t,e,i,a,s,r].join(" ");return n}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,s,r,n){var o="A";arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(o="a");var l=[o,t,e,i,a,s,r,n].join(" ");return l}},{key:"renderPaths",value:function(t){var e,i=t.j,a=t.realIndex,s=t.pathFrom,r=t.pathTo,n=t.stroke,o=t.strokeWidth,l=t.strokeLinecap,h=t.fill,c=t.animationDelay,d=t.initialSpeed,g=t.dataChangeSpeed,p=t.className,f=t.chartType,x=t.shouldClipToGrid,b=void 0===x||x,m=t.bindEventsOnPaths,v=void 0===m||m,w=t.drawShadow,k=void 0===w||w,A=this.w,C=new Li(this.ctx),S=new y(this.ctx),L=this.w.config.chart.animations.enabled,M=L&&this.w.config.chart.animations.dynamicAnimation.enabled,P=!!(L&&!A.globals.resized||M&&A.globals.dataChanged&&A.globals.shouldAnimate);P?e=s:(e=r,A.globals.animationEnded=!0);var I=A.config.stroke.dashArray,T=0;T=Array.isArray(I)?I[a]:A.config.stroke.dashArray;var z=this.drawPath({d:e,stroke:n,strokeWidth:o,fill:h,fillOpacity:1,classes:p,strokeLinecap:l,strokeDashArray:T});z.attr("index",a),b&&("bar"===f&&!A.globals.isHorizontal||A.globals.comboCharts?z.attr({"clip-path":"url(#gridRectBarMask".concat(A.globals.cuid,")")}):z.attr({"clip-path":"url(#gridRectMask".concat(A.globals.cuid,")")})),A.config.chart.dropShadow.enabled&&k&&C.dropShadow(z,A.config.chart.dropShadow,a),v&&(z.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,z)),z.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,z)),z.node.addEventListener("mousedown",this.pathMouseDown.bind(this,z))),z.attr({pathTo:r,pathFrom:s});var X={el:z,j:i,realIndex:a,pathFrom:s,pathTo:r,fill:h,strokeWidth:o,delay:c};return!L||A.globals.resized||A.globals.dataChanged?!A.globals.resized&&A.globals.dataChanged||S.showDelayedElements():S.animatePathsGradually(u(u({},X),{},{speed:d})),A.globals.dataChanged&&M&&P&&S.animatePathsGradually(u(u({},X),{},{speed:g})),z}},{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,i,(function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:a,width:s+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:a,width:s}):"squares"===t?r.rect(e,i).fill("none").stroke({color:a,width:s}):"circles"===t&&r.circle(e).fill("none").stroke({color:a,width:s})}))}},{key:"drawGradient",value:function(t,e,i,a,s){var r,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,c=this.w;e.length<9&&0===e.indexOf("#")&&(e=v.hexToRgba(e,a)),i.length<9&&0===i.indexOf("#")&&(i=v.hexToRgba(i,s));var d=0,u=1,g=1,p=null;null!==o&&(d=void 0!==o[0]?o[0]/100:0,u=void 0!==o[1]?o[1]/100:1,g=void 0!==o[2]?o[2]/100:1,p=void 0!==o[3]?o[3]/100:null);var f=!("donut"!==c.config.chart.type&&"pie"!==c.config.chart.type&&"polarArea"!==c.config.chart.type&&"bubble"!==c.config.chart.type);if(r=l&&0!==l.length?c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){(Array.isArray(l[h])?l[h]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){t.stop(d,e,a),t.stop(u,i,s),t.stop(g,i,s),null!==p&&t.stop(p,e,a)})),f){var x=c.globals.gridWidth/2,b=c.globals.gridHeight/2;"bubble"!==c.config.chart.type?r.attr({gradientUnits:"userSpaceOnUse",cx:x,cy:b,r:n}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?r.from(0,0).to(0,1):"diagonal"===t?r.from(0,0).to(1,1):"horizontal"===t?r.from(0,1).to(1,1):"diagonal2"===t&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,i=t.maxWidth,a=t.fontSize,s=t.fontFamily,r=this.getTextRects(e,a,s),n=r.width/e.length,o=Math.floor(i/n);return i-1){var o=i.globals.selectedDataPoints[s].indexOf(r);i.globals.selectedDataPoints[s].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),h=i.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),c=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),a.getDefaultFilter(t,s)}))};c(l),c(h)}t.node.setAttribute("selected","true"),n="true",void 0===i.globals.selectedDataPoints[s]&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(r)}if("true"===n){var d=i.config.states.active.filter;if("none"!==d)a.applyFilter(t,s,d.type);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}}else if("none"!==i.config.states.active.filter.type)if("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice)a.getDefaultFilter(t,s);else{u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,a){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w,n=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),r.globals.dom.Paper.add(n);var o=n.bbox();return s||(o=n.node.getBoundingClientRect()),n.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i/1.1)return void(t.textContent=e.substring(0,a)+"...");t.textContent="."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}(),Pi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getStackedSeriesTotals",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,i=[];if(0===e.globals.series.length)return i;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,i=[];return e.globals.seriesGroups.forEach((function(a){var s=[];e.config.series.forEach((function(t,i){a.indexOf(e.globals.seriesNames[i])>-1&&s.push(i)}));var r=e.globals.series.map((function(t,e){return-1===s.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));i.push(t.getStackedSeriesTotals(r))})),i}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,i=[],a=[],s=[],r=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){s.push(e),a.push(null)})),e.yaxis.forEach((function(t,e){i[e]=[]}));var n=[];e.yaxis.forEach((function(t,a){var o=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,n){if(e.name===t){var l=n;a===n||r?!r||s.indexOf(n)>-1?i[a].push([a,n]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[n].push([n,a]),l=a),o=!0,-1!==(l=s.indexOf(l))&&s.splice(l,1)}}))}))}o||n.push(a)})),i=i.map((function(t,e){var i=[];return t.forEach((function(t){a[t[1]]=t[0],i.push(t[1])})),i}));for(var o=e.yaxis.length-1,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,i){return t===i[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map((function(t,i){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),i}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var i=0;if(Array.isArray(t))for(var a=0;at&&i.globals.seriesX[s][n]0){var g=function(t,e){var i=s.config.yaxis[s.globals.seriesYAxisReverseMap[e]],r=t<0?-1:1;return t=Math.abs(t),i.logarithmic&&(t=a.getBaseLog(i.logBase,t)),-r*t/n[e]};if(r.isMultipleYAxis){l=[];for(var p=0;p0&&e.forEach((function(e){var n=[],o=[];t.i.forEach((function(i,a){s.config.series[i].group===e&&(n.push(t.series[a]),o.push(i))})),n.length>0&&r.push(a.draw(n,i,o))})),r}}],[{key:"checkComboSeries",value:function(t,e){var i=!1,a=0,s=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||a++,void 0!==t.type&&t.type!==e&&s++})),s>0&&(i=!0),{comboBarCount:a,comboCharts:i}}},{key:"extendArrayProps",value:function(t,e,i){var a,s,r,n,o,l;(null!==(a=e)&&void 0!==a&&a.yaxis&&(e=t.extendYAxis(e,i)),null!==(s=e)&&void 0!==s&&s.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(r=e)&&void 0!==r&&null!==(n=r.annotations)&&void 0!==n&&n.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(l=o.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e)));return e}}]),t}(),Ii=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e}return s(t,[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===t.label.orientation){var a=null!==e?e:0,s=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(null!==s){var r=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-r.height+4);var n="top"===t.label.position?r.width:-r.width;s.setAttribute("y",parseFloat(s.getAttribute("y"))+n);var o=this.annoCtx.graphics.rotateAroundCenter(s),l=o.x,h=o.y;s.setAttribute("transform","rotate(-90 ".concat(l," ").concat(h,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=t.getBoundingClientRect(),r=e.label.style.padding,n=r.left,o=r.right,l=r.top,h=r.bottom;if("vertical"===e.label.orientation){var c=[n,o,l,h];l=c[0],h=c[1],n=c[2],o=c[3]}var d=s.left-a.left-n,u=s.top-a.top-l,g=this.annoCtx.graphics.drawRect(d-i.globals.barPadForNumericAxis,u,s.width+n+o,s.height+l+h,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&g.node.classList.add(e.id),g}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,a,s){var r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(a,"']"));if(r){var n=r.parentNode,o=t.addBackgroundToAnno(r,i);o&&(n.insertBefore(o.node,r),i.label.mouseEnter&&o.node.addEventListener("mouseenter",i.label.mouseEnter.bind(t,i)),i.label.mouseLeave&&o.node.addEventListener("mouseleave",i.label.mouseLeave.bind(t,i)),i.label.click&&o.node.addEventListener("click",i.label.click.bind(t,i)))}};e.config.annotations.xaxis.forEach((function(t,e){return i(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return i(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return i(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var i,a=this.w,s="y1"===t?e.y:e.y2,r=!1;if(this.annoCtx.invertAxis){var n=a.config.xaxis.convertedCatToNumeric?a.globals.categoryLabels:a.globals.labels,o=n.indexOf(s),l=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(o+1,")"));i=l?parseFloat(l.getAttribute("y")):(a.globals.gridHeight/n.length-1)*(o+1)-a.globals.barHeight,void 0!==e.seriesIndex&&a.globals.barHeight&&(i-=a.globals.barHeight/2*(a.globals.series.length-1)-a.globals.barHeight*e.seriesIndex)}else{var h,c=a.globals.seriesYAxisMap[e.yAxisIndex][0],d=a.config.yaxis[e.yAxisIndex].logarithmic?new Pi(this.annoCtx.ctx).getLogVal(a.config.yaxis[e.yAxisIndex].logBase,s,c)/a.globals.yLogRatio[c]:(s-a.globals.minYArr[c])/(a.globals.yRange[c]/a.globals.gridHeight);i=a.globals.gridHeight-Math.min(Math.max(d,0),a.globals.gridHeight),r=d>a.globals.gridHeight||d<0,!e.marker||void 0!==e.y&&null!==e.y||(i=0),null!==(h=a.config.yaxis[e.yAxisIndex])&&void 0!==h&&h.reversed&&(i=d)}return"string"==typeof s&&s.includes("px")&&(i=parseFloat(s)),{yP:i,clipped:r}}},{key:"getX1X2",value:function(t,e){var i=this.w,a="x1"===t?e.x:e.x2,s=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,r=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,n=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,o=!1,l=this.annoCtx.inversedReversedAxis?(r-a)/(n/i.globals.gridWidth):(a-s)/(n/i.globals.gridWidth);return"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||i.config.chart.sparkline.enabled||(l=this.getStringX(a)),"string"==typeof a&&a.includes("px")&&(l=parseFloat(a)),null==a&&e.marker&&(l=i.globals.gridWidth),void 0!==e.seriesIndex&&i.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=i.globals.barWidth/2*(i.globals.series.length-1)-i.globals.barWidth*e.seriesIndex),l>i.globals.gridWidth?(l=i.globals.gridWidth,o=!0):l<0&&(l=0,o=!0),{x:l,clipped:o}}},{key:"getStringX",value:function(t){var e=this.w,i=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var a=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),s=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(a+1,")"));return s&&(i=parseFloat(s.getAttribute("x"))),i}}]),t}(),Ti=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addXaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=this.helpers.getX1X2("x1",t),n=r.x,o=r.clipped,l=!0,h=t.label.text,c=t.strokeDashArray;if(v.isNumber(n)){if(null===t.x2||void 0===t.x2){if(!o){var d=this.annoCtx.graphics.drawLine(n+t.offsetX,0+t.offsetY,n+t.offsetX,s.globals.gridHeight+t.offsetY,t.borderColor,c,t.borderWidth);e.appendChild(d.node),t.id&&d.node.classList.add(t.id)}}else{var u=this.helpers.getX1X2("x2",t);if(a=u.x,l=u.clipped,!o||!l){if(a12?u-12:0===u?12:u;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(g))).replace(/(^|[^\\])h/g,"$1"+g);var p=a?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var x=a?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);var b=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var m=u<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));var v=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var y=-t.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){var k=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(k)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var A=(a?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(n[0],"g"),n[A])).replace(new RegExp(o[0],"g"),o[A])).replace(new RegExp(s[0],"g"),s[c])).replace(new RegExp(r[0],"g"),r[c])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var a=this.w;void 0!==a.config.xaxis.min&&(t=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(e=a.config.xaxis.max);var s=this.getDate(t),r=this.getDate(e),n=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=v.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),Xi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return s(t,[{key:"xLabelFormat",value:function(t,e,i,a){var s=this.w;if("datetime"===s.config.xaxis.type&&void 0===s.config.xaxis.labels.formatter&&void 0===s.config.tooltip.x.formatter){var r=new zi(this.ctx);return r.formatDate(r.getDate(e),s.config.tooltip.x.format)}return t(e,i,a)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,i){var a=this.w;if(v.isNumber(t))if(0!==a.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:a.globals.yValueDecimal);else{var s=t.toFixed(0);t=t==s?s:t.toFixed(1)}return t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(v.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(v.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var i=e.globals.maxX-e.globals.minX;return i>0&&i<100?t.toFixed(1):t.toFixed(0)}if(e.globals.isBarHorizontal)if(e.globals.maxY-e.globals.minYArr<4)return t.toFixed(1);return t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,a){void 0!==i.labels.formatter?e.globals.yLabelFormatters[a]=i.labels.formatter:e.globals.yLabelFormatters[a]=function(s){return e.globals.xyCharts?Array.isArray(s)?s.map((function(e){return t.defaultYFormatter(e,i,a)})):t.defaultYFormatter(s,i,a):s}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),Ri=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getLabel",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",n=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,l=void 0===t[a]?"":t[a],h=l,c=o.globals.xLabelFormatter,d=o.config.xaxis.labels.formatter,u=!1,g=new Xi(this.ctx),p=l;n&&(h=g.xLabelFormat(c,l,p,{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o}),void 0!==d&&(h=d(l,t[a],{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o})));var f,x;e.length>0?(f=e[a].unit,x=null,e.forEach((function(t){"month"===t.unit?x="year":"day"===t.unit?x="month":"hour"===t.unit?x="day":"minute"===t.unit&&(x="hour")})),u=x===f,i=e[a].position,h=e[a].value):"datetime"===o.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var b=new Mi(this.ctx),m={};m=o.globals.rotateXLabels&&n?b.getTextRects(h,parseInt(r,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):b.getTextRects(h,parseInt(r,10));var v=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||s.indexOf(h)>=0&&v)&&(h=""),{x:i,text:h,textRect:m,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var a=this.w,s=a.config.xaxis.tickAmount;return"dataPoints"===s&&(s=Math.round(a.globals.gridWidth/120)),s>i||t%Math.round(i/(s+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,a,s){var r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=s[s.length-1];e.xa.length||a.some((function(t){return Array.isArray(t.seriesName)}))?t:i.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,i=e.config.yaxis[t];if(!i.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!i.showForNullSeries){var a=e.globals.seriesYAxisMap[t],s=new Pi(this.ctx);return a.every((function(t){return s.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,i,a,s,r,n){var o=this.w,l=new Mi(this.ctx),h=o.globals.translateY+o.config.yaxis[s].labels.offsetY;if(o.globals.isBarHorizontal?h=0:"heatmap"===o.config.chart.type&&(h+=r/2),a.show&&e>0){!0===o.config.yaxis[s].opposite&&(t+=a.width);for(var c=e;c>=0;c--){var d=l.drawLine(t+i.offsetX-a.width+a.offsetX,h+a.offsetY,t+i.offsetX+a.offsetX,h+a.offsetY,a.color);n.add(d),h+=r}}}}]),t}(),Yi=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx),this.axesUtils=new Ri(this.annoCtx)}return s(t,[{key:"addYaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=t.strokeDashArray,n=this.helpers.getY1Y2("y1",t),o=n.yP,l=n.clipped,h=!0,c=!1,d=t.label.text;if(null===t.y2||void 0===t.y2){if(!l){c=!0;var u=this.annoCtx.graphics.drawLine(0+t.offsetX,o+t.offsetY,this._getYAxisAnnotationWidth(t),o+t.offsetY,t.borderColor,r,t.borderWidth);e.appendChild(u.node),t.id&&u.node.classList.add(t.id)}}else{if(a=(n=this.helpers.getY1Y2("y2",t)).yP,h=n.clipped,a>o){var g=o;o=a,a=g}if(!l||!h){c=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,a+t.offsetY,this._getYAxisAnnotationWidth(t),o-a,0,t.fillColor,t.opacity,1,t.borderColor,r);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(c){var f="right"===t.label.position?s.globals.gridWidth:"center"===t.label.position?s.globals.gridWidth/2:0,x=this.annoCtx.graphics.drawText({x:f+t.label.offsetX,y:(null!=a?a:o)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});x.attr({rel:i}),e.appendChild(x.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;e.globals.gridWidth;return(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,a){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,i.node,a)})),i}}]),t}(),Ei=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addPointAnnotation",value:function(t,e,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",t),s=a.x,r=a.clipped,n=(a=this.helpers.getY1Y2("y1",t)).yP,o=a.clipped;if(v.isNumber(s)&&!o&&!r){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},h=this.annoCtx.graphics.drawMarker(s+t.marker.offsetX,n+t.marker.offsetY,l);e.appendChild(h.node);var c=t.label.text?t.label.text:"",d=this.annoCtx.graphics.drawText({x:s+t.label.offsetX,y:n+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:c,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(d.attr({rel:i}),e.appendChild(d.node),t.customSVG.SVG){var u=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});u.attr({transform:"translate(".concat(s+t.customSVG.offsetX,", ").concat(n+t.customSVG.offsetY,")")}),u.node.innerHTML=t.customSVG.SVG,e.appendChild(u.node)}if(t.image.path){var g=t.image.width?t.image.width:20,p=t.image.height?t.image.height:20;h=this.annoCtx.addImage({x:s+t.image.offsetX-g/2,y:n+t.image.offsetY-p/2,width:g,height:p,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&h.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&h.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&h.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,a){t.addPointAnnotation(e,i.node,a)})),i}}]),t}();var Hi={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},Oi=function(){function t(){i(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return s(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[Hi],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),Fi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.graphics=new Mi(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Ii(this),this.xAxisAnnotations=new Ti(this),this.yAxisAnnotations=new Yi(this),this.pointsAnnotations=new Ei(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return s(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=t.config.chart.animations.enabled,r=[e,i,a],n=[i.node,e.node,a.node],o=0;o<3;o++)t.globals.dom.elGraphical.add(r[o]),!s||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&n[o].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:n[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,a=t.y,s=t.text,r=t.textAnchor,n=t.foreColor,o=t.fontSize,l=t.fontFamily,h=t.fontWeight,c=t.cssClass,d=t.backgroundColor,u=t.borderWidth,g=t.strokeDashArray,p=t.borderRadius,f=t.borderColor,x=t.appendTo,b=void 0===x?".apexcharts-svg":x,m=t.paddingLeft,v=void 0===m?4:m,y=t.paddingRight,w=void 0===y?4:y,k=t.paddingBottom,A=void 0===k?2:k,C=t.paddingTop,S=void 0===C?2:C,L=this.w,M=this.graphics.drawText({x:i,y:a,text:s,textAnchor:r||"start",fontSize:o||"12px",fontWeight:h||"regular",fontFamily:l||L.config.chart.fontFamily,foreColor:n||L.config.chart.foreColor,cssClass:c}),P=L.globals.dom.baseEl.querySelector(b);P&&P.appendChild(M.node);var I=M.bbox();if(s){var T=this.graphics.drawRect(I.x-v,I.y-S,I.width+v+w,I.height+A+S,p,d||"transparent",1,u,f,g);P.insertBefore(T.node,M.node)}}},{key:"addImage",value:function(t,e){var i=this.w,a=t.path,s=t.x,r=void 0===s?0:s,n=t.y,o=void 0===n?0:n,l=t.width,h=void 0===l?20:l,c=t.height,d=void 0===c?20:c,u=t.appendTo,g=void 0===u?".apexcharts-svg":u,p=i.globals.dom.Paper.image(a);p.size(h,d).move(r,o);var f=i.globals.dom.baseEl.querySelector(g);return f&&f.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,a=t.context,s=t.type,r=t.contextMethod,n=a,o=n.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),h=l.childNodes.length+1,c=new Oi,d=Object.assign({},"xaxis"===s?c.xAxisAnnotation:"yaxis"===s?c.yAxisAnnotation:c.pointAnnotation),u=v.extend(d,e);switch(s){case"xaxis":this.addXaxisAnnotation(u,l,h);break;case"yaxis":this.addYaxisAnnotation(u,l,h);break;case"point":this.addPointAnnotation(u,l,h)}var g=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(h,"']")),p=this.helpers.addBackgroundToAnno(g,u);return p&&l.insertBefore(p.node,g),i&&o.globals.memory.methodsToExec.push({context:n,id:u.id?u.id:v.randomId(),method:r,label:"addAnnotation",params:e}),a}},{key:"clearAnnotations",value:function(t){for(var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),a=e.globals.memory.methodsToExec.length-1;a>=0;a--)"addText"!==e.globals.memory.methodsToExec[a].label&&"addAnnotation"!==e.globals.memory.methodsToExec[a].label||e.globals.memory.methodsToExec.splice(a,1);i=v.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(e));a&&(i.globals.memory.methodsToExec.map((function(t,a){t.id===e&&i.globals.memory.methodsToExec.splice(a,1)})),Array.prototype.forEach.call(a,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),Di=function(t){var e,i=t.isTimeline,a=t.ctx,s=t.seriesIndex,r=t.dataPointIndex,n=t.y1,o=t.y2,l=t.w,h=l.globals.seriesRangeStart[s][r],c=l.globals.seriesRangeEnd[s][r],d=l.globals.labels[r],u=l.config.series[s].name?l.config.series[s].name:"",g=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,f={w:l,seriesIndex:s,dataPointIndex:r,start:h,end:c};("function"==typeof p&&(u=p(u,f)),null!==(e=l.config.series[s].data[r])&&void 0!==e&&e.x&&(d=l.config.series[s].data[r].x),i)||"datetime"===l.config.xaxis.type&&(d=new Xi(a).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(a).formatDate,w:l}));"function"==typeof g&&(d=g(d,f)),Number.isFinite(n)&&Number.isFinite(o)&&(h=n,c=o);var x="",b="",m=l.globals.colors[s];if(void 0===l.config.tooltip.x.formatter)if("datetime"===l.config.xaxis.type){var v=new zi(a);x=v.formatDate(v.getDate(h),l.config.tooltip.x.format),b=v.formatDate(v.getDate(c),l.config.tooltip.x.format)}else x=h,b=c;else x=l.config.tooltip.x.formatter(h),b=l.config.tooltip.x.formatter(c);return{start:h,end:c,startVal:x,endVal:b,ylabel:d,color:m,seriesName:u}},_i=function(t){var e=t.color,i=t.seriesName,a=t.ylabel,s=t.start,r=t.end,n=t.seriesIndex,o=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(n);s=l.yLbFormatter(s),r=l.yLbFormatter(r);var h=l.yLbFormatter(t.w.globals.series[n][o]),c='\n '.concat(s,'\n - \n ').concat(r,"\n ");return'
'+(i||"")+'
'+a+": "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[n].type||"rangeBar"===t.w.config.series[n].type?c:"".concat(h,""):c)+"
"},Ni=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){this.hideYAxis();return v.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var i=e.w.config.series[e.seriesIndex].name;return null!==t?i+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),u(u({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,a=e.dataPointIndex,s=e.w,r=function(){var t=s.globals.seriesRangeStart[i][a];return s.globals.seriesRangeEnd[i][a]-t};return s.globals.comboCharts?"rangeBar"===s.config.series[i].type||"rangeArea"===s.config.series[i].type?r():t:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Di(u(u({},t),{},{isTimeline:!0})),i=e.color,a=e.seriesName,s=e.ylabel,r=e.startVal,n=e.endVal;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t):function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,i;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(i=t.plotOptions.bar)&&void 0!==i&&i.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}}}}},{key:"brush",value:function(t){return v.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return u(u({},t),{},{plotOptions:u(u({},t.plotOptions),{},{bar:u(u({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return v.isNumber(t)?Math.floor(t):t};var a=t.xaxis.labels.formatter,s=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(s=i.map((function(t){return Array.isArray(t)?t:String(t)}))),s&&s.length&&(t.xaxis.labels.formatter=function(t){return v.isNumber(t)?a(s[Math.floor(t)-1]):a(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,i,a,s){var r=t.globals.seriesCandleO[e][i],n=t.globals.seriesCandleH[e][i],o=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],h=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==s?'
\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][i],"\n
"):'
')+"
".concat(a[0],': ')+r+"
"+"
".concat(a[1],': ')+n+"
"+(o?"
".concat(a[2],': ')+o+"
":"")+"
".concat(a[3],': ')+l+"
"+"
".concat(a[4],': ')+h+"
"}}]),t}(),Wi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(t){var e=t.responsiveOverride,i=this.opts,a=new Oi,s=new Ni(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),n={};if(i&&"object"===b(i)){var o,l,h,c,d,u,g,p,f,x,m={};m=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?s[i.chart.type]():s.line(),null!==(o=i.plotOptions)&&void 0!==o&&null!==(l=o.bar)&&void 0!==l&&l.isFunnel&&(m=s.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(m=s.stackedBars()),null!==(h=i.chart.brush)&&void 0!==h&&h.enabled&&(m=s.brush(m)),null!==(c=i.plotOptions)&&void 0!==c&&null!==(d=c.line)&&void 0!==d&&d.isSlopeChart&&(m=s.slope()),i.chart.stacked&&"100%"===i.chart.stackType&&(i=s.stacked100(i)),null!==(u=i.plotOptions)&&void 0!==u&&null!==(g=u.bar)&&void 0!==g&&g.isDumbbell&&(i=s.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},e||(i.xaxis.convertedCatToNumeric=!1),(null!==(p=(i=this.checkForCatToNumericXAxis(this.chartType,m,i)).chart.sparkline)&&void 0!==p&&p.enabled||null!==(f=window.Apex.chart)&&void 0!==f&&null!==(x=f.sparkline)&&void 0!==x&&x.enabled)&&(m=s.sparkline(m)),n=v.extend(r,m)}var y=v.extend(n,window.Apex);return r=v.extend(y,i),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var a,s,r=new Ni(i),n=("bar"===t||"boxPlot"===t)&&(null===(a=i.plotOptions)||void 0===a||null===(s=a.bar)||void 0===s?void 0:s.horizontal),o="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,l="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,h=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return n||o||!l||"between"===h||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new Oi;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=v.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[v.extend(i.yAxis,t.yaxis)]:t.yaxis=v.extendArray(t.yaxis,i.yAxis);var a=!1;t.yaxis.forEach((function(t){t.logarithmic&&(a=!0)}));var s=t.series;return e&&!s&&(s=e.config.series),a&&s.length!==t.yaxis.length&&s.length&&(t.yaxis=s.map((function(e,a){if(e.name||(s[a].name="series-".concat(a+1)),t.yaxis[a])return t.yaxis[a].seriesName=s[a].name,t.yaxis[a];var r=v.extend(i.yAxis,t.yaxis[0]);return r.show=!1,r}))),a&&s.length>1&&s.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.yaxis=v.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.xaxis=v.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new Oi;return t.annotations.points=v.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),Bi=function(){function t(){i(this,t)}return s(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:t.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=v.extend({},t),e.initialSeries=v.clone(t.series),e.lastXAxis=v.clone(e.initialConfig.xaxis),e.lastYAxis=v.clone(e.initialConfig.yaxis),e}}]),t}(),Gi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(){var t=new Wi(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new Bi).init(t)}}}]),t}(),ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return s(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,a=parseInt(e.globals.gridWidth,10),s=parseInt(e.globals.gridHeight,10),r=a>s?a:s,n=t.image,o=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=r+1,l=r):(o=t.width,l=t.height);var h=document.createElementNS(e.globals.SVGNS,"pattern");Mi.setAttrs(h,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var c=document.createElementNS(e.globals.SVGNS,"image");h.appendChild(c),c.setAttributeNS(window.SVG.xlink,"href",n),Mi.setAttrs(c,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),c.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(h)}},{key:"getSeriesIndex",value:function(t){var e=this.w,i=e.config.chart.type;return("bar"===i||"rangeBar"===i)&&e.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var i,a=this.w,s=null,n=null,o=r(t);try{for(o.s();!(i=o.n()).done;){var l=i.value;l>=e.threshold?(null===s||l>s)&&(s=l):(null===n||l-1?x=v.getOpacityFromRGBA(c):m=v.hexToRgba(v.rgb2hex(c),x),t.opacity&&(x=t.opacity),"pattern"===p&&(n=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:n,fillColor:c,fillOpacity:x,defaultColor:m})),b){var y=f(l.fill.gradient.colorStops)||[],w=l.fill.gradient.type;h&&(y[this.seriesIndex]=this.computeColorStops(s.globals.series[this.seriesIndex],l.plotOptions.line.colors),w="vertical"),o=this.handleGradientFill({type:w,fillConfig:t.fillConfig,fillColor:c,fillOpacity:x,colorStops:y,i:this.seriesIndex})}if("image"===p){var k=l.fill.image.src,A=t.patternID?t.patternID:"",C="pattern".concat(s.globals.cuid).concat(t.seriesNumber+1).concat(A);-1===this.patternIDs.indexOf(C)&&(this.clippedImgArea({opacity:x,image:Array.isArray(k)?t.seriesNumber-1&&(p=v.getOpacityFromRGBA(g));var f=void 0===o.gradient.opacityTo?a:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[n]:o.gradient.opacityTo;if(void 0===o.gradient.gradientToColors||0===o.gradient.gradientToColors.length)d="dark"===o.gradient.shade?c.shadeColor(-1*parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i):c.shadeColor(parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i);else if(o.gradient.gradientToColors[l.seriesNumber]){var x=o.gradient.gradientToColors[l.seriesNumber];d=x,x.indexOf("rgba")>-1&&(f=v.getOpacityFromRGBA(x))}else d=i;if(o.gradient.gradientFrom&&(g=o.gradient.gradientFrom),o.gradient.gradientTo&&(d=o.gradient.gradientTo),o.gradient.inverseColors){var b=g;g=d,d=b}return g.indexOf("rgb")>-1&&(g=v.rgb2hex(g)),d.indexOf("rgb")>-1&&(d=v.rgb2hex(d)),h.drawGradient(e,g,d,p,f,l.size,o.gradient.stops,r,n)}}]),t}(),Vi=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],r=this.w,n=e,o=t,l=null,h=new Mi(this.ctx),c=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(o.x))for(var d=0;d0:r.config.markers.size>0)||s||c){p||(f+=" w".concat(v.randomId()));var x=this.getMarkerConfig({cssClass:f,seriesIndex:e,dataPointIndex:g});if(r.config.series[n].data[g]&&(r.config.series[n].data[g].fillColor&&(x.pointFillColor=r.config.series[n].data[g].fillColor),r.config.series[n].data[g].strokeColor&&(x.pointStrokeColor=r.config.series[n].data[g].strokeColor)),void 0!==a&&(x.pSize=a),(o.x[d]<-r.globals.markers.largestSize||o.x[d]>r.globals.gridWidth+r.globals.markers.largestSize||o.y[d]<-r.globals.markers.largestSize||o.y[d]>r.globals.gridHeight+r.globals.markers.largestSize)&&(x.pSize=0),!p)(r.globals.markers.size[e]>0||s||c)&&!l&&(l=h.group({class:s||c?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),(u=h.drawMarker(o.x[d],o.y[d],x)).attr("rel",g),u.attr("j",g),u.attr("index",e),u.node.setAttribute("default-marker-size",x.pSize),new Li(this.ctx).setSelectionFilter(u,e,g),this.addEvents(u),l&&l.add(u)}else void 0===r.globals.pointsArray[e]&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([o.x[d],o.y[d]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,i=t.seriesIndex,a=t.dataPointIndex,s=void 0===a?null:a,r=t.radius,n=void 0===r?null:r,o=t.size,l=void 0===o?null:o,h=t.strokeWidth,c=void 0===h?null:h,d=this.w,u=this.getMarkerStyle(i),g=null===l?d.globals.markers.size[i]:l,p=d.config.markers;return null!==s&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===i&&t.dataPointIndex===s&&(u.pointStrokeColor=t.strokeColor,u.pointFillColor=t.fillColor,g=t.size,u.pointShape=t.shape)})),{pSize:null===n?g:n,pRadius:null!==n?n:p.radius,pointStrokeWidth:null!==c?c:Array.isArray(p.strokeWidth)?p.strokeWidth[i]:p.strokeWidth,pointStrokeColor:u.pointStrokeColor,pointFillColor:u.pointFillColor,shape:u.pointShape||(Array.isArray(p.shape)?p.shape[i]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[i]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[i]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[i]:p.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(t){var e=this.w,i=new Mi(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,a=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[t]:a,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),Ui=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return s(t,[{key:"draw",value:function(t,e,i){var a=this.w,s=new Mi(this.ctx),r=i.realIndex,n=i.pointsPos,o=i.zRatio,l=i.elParent,h=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(h.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(n.x))for(var c=0;cp.maxBubbleRadius&&(g=p.maxBubbleRadius)}var f=n.x[c],x=n.y[c];if(g=g||0,null!==x&&void 0!==a.globals.series[r][d]||(u=!1),u){var b=this.drawPoint(f,x,g,r,d,e);h.add(b)}l.add(h)}}},{key:"drawPoint",value:function(t,e,i,a,s,r){var n=this.w,o=a,l=new y(this.ctx),h=new Li(this.ctx),c=new ji(this.ctx),d=new Vi(this.ctx),u=new Mi(this.ctx),g=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:s,radius:"bubble"===n.config.chart.type||n.globals.comboCharts&&n.config.series[a]&&"bubble"===n.config.series[a].type?i:null}),p=c.fillPath({seriesNumber:a,dataPointIndex:s,color:g.pointFillColor,patternUnits:"objectBoundingBox",value:n.globals.series[a][r]}),f=u.drawMarker(t,e,g);if(n.config.series[o].data[s]&&n.config.series[o].data[s].fillColor&&(p=n.config.series[o].data[s].fillColor),f.attr({fill:p}),n.config.chart.dropShadow.enabled){var x=n.config.chart.dropShadow;h.dropShadow(f,x,a)}if(!this.initialAnim||n.globals.dataChanged||n.globals.resized)n.globals.animationEnded=!0;else{var b=n.config.chart.animations.speed;l.animateMarker(f,b,n.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(f)}),100)}))}return f.attr({rel:s,j:s,index:a,"default-marker-size":g.pSize}),h.setSelectionFilter(f,a,s),d.addEvents(f),f.node.classList.add("apexcharts-marker"),f}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}]),t}(),qi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"dataLabelsCorrection",value:function(t,e,i,a,s,r,n){var o=this.w,l=!1,h=new Mi(this.ctx).getTextRects(i,n),c=h.width,d=h.height;e<0&&(e=0),e>o.globals.gridHeight+d&&(e=o.globals.gridHeight+d/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:t,y:e,width:c,height:d});var u=o.globals.dataLabelsRects[a].length-2,g=void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(void 0!==o.globals.dataLabelsRects[a][u]){var p=o.globals.dataLabelsRects[a][g];(t>p.x+p.width||e>p.y+p.height||e+de.globals.gridWidth+b.textRects.width+30)&&(o="");var m=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(m=e.globals.dataLabels.style.colors[n]),"function"==typeof m&&(m=m({series:e.globals.series,seriesIndex:r,dataPointIndex:n,w:e})),u&&(m=u);var v=d.offsetX,y=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(v=0,y=0),e.globals.isSlopeChart&&(0!==n&&(v=-2*d.offsetX+5),0!==n&&n!==e.config.series[r].data.length-1&&(v=0)),b.drawnextLabel){if((x=i.drawText({width:100,height:parseInt(d.style.fontSize,10),x:a+v,y:s+y,foreColor:m,textAnchor:l||d.textAnchor,text:o,fontSize:h||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"})).attr({class:f||"apexcharts-datalabel",cx:a,cy:s}),d.dropShadow.enabled){var w=d.dropShadow;new Li(this.ctx).dropShadow(x,w)}c.add(x),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(n)}return x}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,a=i.config.dataLabels.background,s=a.padding,r=a.padding/2,n=e.width,o=e.height,l=new Mi(this.ctx).drawRect(e.x-s,e.y-r/2,n+2*s,o+r,a.borderRadius,"transparent"!==i.config.chart.background&&i.config.chart.background?i.config.chart.background:"#fff",a.opacity,a.borderWidth,a.borderColor);a.dropShadow.enabled&&new Li(this.ctx).dropShadow(l,a.dropShadow);return l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,s=v.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,t&&(e&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i-1&&(t[i].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,i=this.getSeriesByName(t),a=parseInt(null==i?void 0:i.getAttribute("data:realIndex"),10),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),r=null,n=null,o=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){r=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),n=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']"));var l=e.globals.seriesYAxisReverseMap[a];o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']"));else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var h=0;h=t.from&&(r0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1)for(var s=i.config.series.map((function(t,a){return t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(a)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(i.config.series[a].type)>-1)?a:-1})),r="asc"===t?0:s.length-1;"asc"===t?r=0;"asc"===t?r++:r--)if(-1!==s[r]){a=s[r];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,a){for(var s=e[i].childNodes,r={type:a,paths:[],realIndex:e[i].getAttribute("data:realIndex")},n=0;n0)for(var a=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),a=[],s=function(t){var e=function(e){return i[t].getAttribute(e)},s={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};a.push({rect:s,color:i[t].getAttribute("color")})},r=0;r0?t:[]}));return t}}]),t}(),$i=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,a=this.w.globals,s="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,r=0;r=5?this.twoDSeries.push(v.parseNumber(t[e].data[r][4])):this.twoDSeries.push(v.parseNumber(t[e].data[r][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var n=new Date(t[e].data[r][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(t[e].data[r][0]);for(var o=0;o-1&&(r=this.activeSeriesIndex);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,r=new zi(i),n=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isRangeBar="rangeBar"===a.chart.type&&s.isBarHorizontal,s.hasXaxisGroups="category"===a.xaxis.type&&a.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=a.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?s.seriesNames.push(t.name):s.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var o=[],l=f(new Set(a.series.map((function(t){return t.group}))));a.series.forEach((function(t,e){var i=l.indexOf(t.group);o[i]||(o[i]=[]),o[i].push(s.seriesNames[e])})),s.seriesGroups=o;for(var h=function(){for(var t=0;t0&&(this.twoDSeriesX=n,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var d=t[c].data.map((function(t){return v.parseNumber(t)}));s.series.push(d)}s.seriesZ.push(this.threeDSeries),void 0!==t[c].color?s.seriesColors.push(t[c].color):s.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var a=0;a0)i.labels=e.xaxis.categories;else if(e.labels.length>0)i.labels=e.labels.slice();else if(this.fallbackToCategory){if(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric)new Ni(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t)}else this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,a=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var s=i.series.map((function(t,e){return t.data.filter((function(t,e,i){return i.findIndex((function(e){return e.x===t.x}))===e}))})),r=s.reduce((function(t,e,i,a){return a[t].length>e.length?t:i}),0),n=0;n0&&s==i.length&&e.push(a)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}]),t}(),Ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),a=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",a*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"getSvgString",value:function(){var t=this;return new Promise((function(e){var i=t.w,a=i.config.chart.toolbar.export.width,s=i.config.chart.toolbar.export.scale||a/i.globals.svgWidth;s||(s=1);var r=t.w.globals.dom.Paper.svg(),n=t.w.globals.dom.Paper.node.cloneNode(!0);1!==s&&t.scaleSvgNode(n,s),t.convertImagesToBase64(n).then((function(){r=(new XMLSerializer).serializeToString(n),e(r.replace(/ /g," "))}))}))}},{key:"convertImagesToBase64",value:function(t){var e=this,i=t.getElementsByTagName("image"),a=Array.from(i).map((function(t){var i=t.getAttributeNS("http://www.w3.org/1999/xlink","href");return i&&!i.startsWith("data:")?e.getBase64FromUrl(i).then((function(e){t.setAttributeNS("http://www.w3.org/1999/xlink","href",e)})).catch((function(t){console.error("Error converting image to base64:",t)})):Promise.resolve()}));return Promise.all(a)}},{key:"getBase64FromUrl",value:function(t){return new Promise((function(e,i){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var t=document.createElement("canvas");t.width=a.width,t.height=a.height,t.getContext("2d").drawImage(a,0,0),e(t.toDataURL())},a.onerror=i,a.src=t}))}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var t=this;return new Promise((function(e){t.cleanup(),t.getSvgString().then((function(t){var i=new Blob([t],{type:"image/svg+xml;charset=utf-8"});e(URL.createObjectURL(i))}))}))}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var a=e.w,s=t?t.scale||t.width/a.globals.svgWidth:1;e.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*s,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var n="transparent"!==a.config.chart.background&&a.config.chart.background?a.config.chart.background:"#fff",o=r.getContext("2d");o.fillStyle=n,o.fillRect(0,0,r.width*s,r.height*s),e.getSvgString().then((function(t){var e="data:image/svg+xml,"+encodeURIComponent(t),a=new Image;a.crossOrigin="anonymous",a.onload=function(){if(o.drawImage(a,0,0),r.msToBlob){var t=r.msToBlob();i({blob:t})}else{var e=r.toDataURL("image/png");i({imgURI:e})}},a.src=e}))}))}},{key:"exportToSVG",value:function(){var t=this;this.svgUrl().then((function(e){t.triggerDownload(e,t.w.config.chart.toolbar.export.svg.filename,".svg")}))}},{key:"exportToPng",value:function(){var t=this,e=this.w.config.chart.toolbar.export.scale,i=this.w.config.chart.toolbar.export.width,a=e?{scale:e}:i?{width:i}:void 0;this.dataURI(a).then((function(e){var i=e.imgURI,a=e.blob;a?navigator.msSaveOrOpenBlob(a,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,a=t.fileName,s=t.columnDelimiter,r=void 0===s?",":s,n=t.lineDelimiter,o=void 0===n?"\n":n,l=this.w;i||(i=l.config.series);var h=[],c=[],d="",u=l.globals.series.map((function(t,e){return-1===l.globals.collapsedSeriesIndices.indexOf(e)?t:[]})),g=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.categoryFormatter?l.config.chart.toolbar.export.csv.categoryFormatter(t):"datetime"===l.config.xaxis.type&&String(t).length>=10?new Date(t).toDateString():v.isNumber(t)?t:t.split(r).join("")},p=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},x=Math.max.apply(Math,f(i.map((function(t){return t.data?t.data.length:0})))),b=new $i(this.ctx),m=new Ri(this.ctx),y=function(t){var i="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var a=l.globals.yLabelFormatters[0],s=new Zi(e.ctx).getActiveConfigSeriesIndex();i=a(l.globals.labels[t],{seriesIndex:s,dataPointIndex:t,w:l})}else i=m.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?i=l.config.xaxis.categories[t]:l.config.labels.length&&(i=l.config.labels[t]))}else i=l.config.labels[t];return null===i?"nullvalue":(Array.isArray(i)&&(i=i.join(" ")),v.isNumber(i)?i:i.split(r).join(""))},w=function(t,e){if(h.length&&0===e&&c.push(h.join(r)),t.data){t.data=t.data.length&&t.data||f(Array(x)).map((function(){return""}));for(var a=0;a0&&!s.globals.isBarHorizontal&&(this.xaxisLabels=s.globals.timescaleLabels.slice()),s.config.xaxis.overwriteCategories&&(this.xaxisLabels=s.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===s.config.xaxis.position?this.offY=0:this.offY=s.globals.gridHeight,this.offY=this.offY+s.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.xaxisBorderWidth=s.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=s.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=s.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=s.config.xaxis.axisBorder.height,this.yaxis=s.config.yaxis[0]}return s(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new Mi(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});i.add(a);for(var s=[],r=0;r6&&void 0!==arguments[6]?arguments[6]:{},h=[],c=[],d=this.w,u=l.xaxisFontSize||this.xaxisFontSize,g=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,f=l.fontWeight||d.config.xaxis.labels.style.fontWeight,x=l.cssClass||d.config.xaxis.labels.style.cssClass,b=d.globals.padHorizontal,m=a.length,v="category"===d.config.xaxis.type?d.globals.dataPoints:m;if(0===v&&m>v&&(v=m),s){var y=v>1?v-1:v;n=d.globals.gridWidth/Math.min(y,m-1),b=b+r(0,n)/2+d.config.xaxis.labels.offsetX}else n=d.globals.gridWidth/v,b=b+r(0,n)+d.config.xaxis.labels.offsetX;for(var w=function(s){var l=b-r(s,n)/2+d.config.xaxis.labels.offsetX;0===s&&1===m&&n/2===b&&1===v&&(l=d.globals.gridWidth/2);var y=o.axesUtils.getLabel(a,d.globals.timescaleLabels,l,s,h,u,t),w=28;d.globals.rotateXLabels&&t&&(w=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(w+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(u)+(d.globals.xAxisLabelsHeight-d.globals.xAxisGroupLabelsHeight)+(d.globals.rotateXLabels?10:0)),y=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(s,y,m):o.axesUtils.checkForOverflowingLabels(s,y,m,h,c);if(d.config.xaxis.labels.show){var k=e.drawText({x:y.x,y:o.offY+d.config.xaxis.labels.offsetY+w-("top"===d.config.xaxis.position?d.globals.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:"middle",fontWeight:y.isBold?600:f,fontSize:u,fontFamily:g,foreColor:Array.isArray(p)?t&&d.config.xaxis.convertedCatToNumeric?p[d.globals.minX+s-1]:p[s]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(i.add(k),k.on("click",(function(t){if("function"==typeof d.config.chart.events.xAxisLabelClick){var e=Object.assign({},d,{labelIndex:s});d.config.chart.events.xAxisLabelClick(t,o.ctx,e)}})),t){var A=document.createElementNS(d.globals.SVGNS,"title");A.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,k.node.appendChild(A),""!==y.text&&(h.push(y.text),c.push(y))}}sa.globals.gridWidth)){var r=this.offY+a.config.xaxis.axisTicks.offsetY;if(e=e+r+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(e=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new Mi(this.ctx).drawLine(t+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,s+a.config.xaxis.axisTicks.offsetX,e+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var s=0;s0){var h=s[s.length-1].getBBox(),c=s[0].getBBox();h.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),c.x+c.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var d=0;d0&&(this.xaxisLabels=a.globals.timescaleLabels.slice())}return s(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new Mi(this.ctx);t||(t=i.group({class:"apexcharts-grid"}));var a=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),s=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(s),t.add(a),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new Mi(this.ctx),a=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,f(t.config.stroke.width)):t.config.stroke.width,s=function(t){var i=document.createElementNS(e.SVGNS,"clipPath");return i.setAttribute("id",t),i};e.dom.elGridRectMask=s("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=s("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=s("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=s("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=s("nonForecastMask".concat(e.cuid));var r=0,n=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),n=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=i.drawRect(-a/2-r-2,-a/2-2,e.gridWidth+a+n+r+4,e.gridHeight+a+4,0,"#fff");var o=t.globals.markers.largestSize;e.dom.elGridRectMarker=i.drawRect(-o,-o,e.gridWidth+2*o,e.gridHeight+2*o,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,a=t.y1,s=t.x2,r=t.y2,n=t.xCount,o=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===n-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:i,y1:a,x2:s,y2:r,xCount:n,parent:o});var h=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var c=l.globals.groups;if(c){for(var d=0,u=0;d0&&"datetime"!==t.config.xaxis.type&&(s=e.yAxisScale[a].result.length-1);this._drawXYLines({xCount:s,tickAmount:r})}else s=r,r=e.xTickAmount,this._drawInvertedXYLines({xCount:s,tickAmount:r});return this.drawGridBands(s,r),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/s}}},{key:"drawGridBands",value:function(t,e){var i,a,s=this,r=this.w;if((null===(i=r.config.grid.row.colors)||void 0===i?void 0:i.length)>0&&function(t,i,a,n,o,l){for(var h=0,c=0;h=r.config.grid[t].colors.length&&(c=0),s._drawGridBandRect({c:c,x1:a,y1:n,x2:o,y2:l,type:t}),n+=r.globals.gridHeight/e}("row",e,0,0,r.globals.gridWidth,r.globals.gridHeight/e),(null===(a=r.config.grid.column.colors)||void 0===a?void 0:a.length)>0){var n=r.globals.isBarHorizontal||"on"!==r.config.xaxis.tickPlacement||"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric?t:t-1;r.globals.isXNumeric&&(n=r.globals.xAxisScale.result.length-1);for(var o=r.globals.padHorizontal,l=r.globals.padHorizontal+r.globals.gridWidth/n,h=r.globals.gridHeight,c=0,d=0;c=r.config.grid.column.colors.length&&(d=0),"datetime"===r.config.xaxis.type)o=this.xaxisLabels[c].position,l=((null===(u=this.xaxisLabels[c+1])||void 0===u?void 0:u.position)||r.globals.gridWidth)-this.xaxisLabels[c].position;this._drawGridBandRect({c:d,x1:o,y1:0,x2:l,y2:h,type:"column"}),o+=r.globals.gridWidth/n}}}}]),t}(),ta=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"niceScale",value:function(t,e){var i,a,s,r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=1e-11,l=this.w,h=l.globals;h.isBarHorizontal?(i=l.config.xaxis,a=Math.max((h.svgWidth-100)/25,2)):(i=l.config.yaxis[n],a=Math.max((h.svgHeight-100)/15,2)),v.isNumber(a)||(a=10),s=void 0!==i.min&&null!==i.min,r=void 0!==i.max&&null!==i.min;var c=void 0!==i.stepSize&&null!==i.stepSize,d=void 0!==i.tickAmount&&null!==i.tickAmount,u=d?i.tickAmount:h.niceScaleDefaultTicks[Math.min(Math.round(a/2),h.niceScaleDefaultTicks.length-1)];if(h.isMultipleYAxis&&!d&&h.multiAxisTickAmount>0&&(u=h.multiAxisTickAmount,d=!0),u="dataPoints"===u?h.dataPoints-1:Math.abs(Math.round(u)),(t===Number.MIN_VALUE&&0===e||!v.isNumber(t)&&!v.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=v.isNumber(i.min)?i.min:0,e=v.isNumber(i.max)?i.max:t+u,h.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var g=e;e=t,t=g}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var p=[];u<1&&(u=1);var f=u,x=Math.abs(e-t);!s&&t>0&&t/x<.15&&(t=0,s=!0),!r&&e<0&&-e/x<.15&&(e=0,r=!0);var b=(x=Math.abs(e-t))/f,m=b,y=Math.floor(Math.log10(m)),w=Math.pow(10,y),k=Math.ceil(m/w);if(b=m=(k=h.niceScaleAllowedMagMsd[0===h.yValueDecimal?0:1][k])*w,h.isBarHorizontal&&i.stepSize&&"datetime"!==i.type?(b=i.stepSize,c=!0):c&&(b=i.stepSize),c&&i.forceNiceScale){var A=Math.floor(Math.log10(b));b*=Math.pow(10,y-A)}if(s&&r){var C=x/f;if(d)if(c)if(0!=v.mod(x,b)){var S=v.getGCD(b,C);b=C/S<10?S:C}else 0==v.mod(b,C)?b=C:(C=b,d=!1);else b=C;else if(c)0==v.mod(x,b)?C=b:b=C;else if(0==v.mod(x,b))C=b;else{C=x/(f=Math.ceil(x/b));var L=v.getGCD(x,b);x/La&&(t=e-b*u,t+=b*Math.floor((M-t)/b))}else if(s)if(d)e=t+b*f;else{var P=e;e=b*Math.ceil(e/b),Math.abs(e-t)/v.getGCD(x,b)>a&&(e=t+b*u,e+=b*Math.ceil((P-e)/b))}}else if(h.isMultipleYAxis&&d){var I=b*Math.floor(t/b),T=I+b*f;T0&&t16&&v.getPrimeFactors(f).length<2&&f++,!d&&i.forceNiceScale&&0===h.yValueDecimal&&f>x&&(f=x,b=Math.round(x/f)),f>a&&(!d&&!c||i.forceNiceScale)){var z=v.getPrimeFactors(f),X=z.length-1,R=f;t:for(var Y=0;YN);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,r=Math.abs(e-t),n=[];if(t===e)return{result:n=[t],niceMin:n[0],niceMax:n[n.length-1]};"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,r))&&(i=this.w.globals.dataPoints-1),s||(s=r/i),s=Math.round(10*(s+Number.EPSILON))/10,i===Number.MAX_VALUE&&(i=5,s=1);for(var o=t;i>=0;)n.push(o),o=v.preciseAddition(o,s),i-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,i){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));for(var a=[],s=Math.ceil(Math.log(e)/Math.log(i)+1),r=Math.floor(Math.log(t)/Math.log(i));r5?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase):this.logarithmicScale(e,i,r.logBase)):i!==-Number.MAX_VALUE&&v.isNumber(i)&&e!==Number.MAX_VALUE&&v.isNumber(e)?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.niceScale(e,i,t)):a.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var i=this.w,a=i.globals,s=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&v.isNumber(e)){var r=a.xTickAmount+1;s<10&&s>1&&(r=s),a.xAxisScale=this.linearScale(t,e,r,0,i.config.xaxis.stepSize)}else a.xAxisScale=this.linearScale(0,10,10);return a.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,i=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var a=i.seriesYAxisMap,s=i.minYArr,r=i.maxYArr;i.allSeriesCollapsed=!0,i.barGroups=[],a.forEach((function(a,n){var o=[];a.forEach((function(t){var i=e.series[t].group;o.indexOf(i)<0&&o.push(i)})),a.length>0?function(){var l,h,c=Number.MAX_VALUE,d=-Number.MAX_VALUE,u=c,g=d;if(e.chart.stacked)!function(){var t=new Array(i.dataPoints).fill(0),s=[],r=[],p=[];o.forEach((function(){s.push(t.map((function(){return Number.MIN_VALUE}))),r.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var f=function(t){!l&&e.series[a[t]].type&&(l=e.series[a[t]].type);var c=a[t];h=e.series[c].group?e.series[c].group:"axis-".concat(n),!(i.collapsedSeriesIndices.indexOf(c)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(c)<0)||(i.allSeriesCollapsed=!1,o.forEach((function(t,a){if(e.series[c].group===t)for(var n=0;n=0?r[a][n]+=o:p[a][n]+=o,s[a][n]+=o,u=Math.min(u,o),g=Math.max(g,o)}}))),"bar"!==l&&"column"!==l||i.barGroups.push(h)},x=0;x1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w.config,r=this.w.globals,n=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=t+1);var l=r.series,h=l,c=l;"candlestick"===s.chart.type?(h=r.seriesCandleL,c=r.seriesCandleH):"boxPlot"===s.chart.type?(h=r.seriesCandleO,c=r.seriesCandleC):r.isRangeData&&(h=r.seriesRangeStart,c=r.seriesRangeEnd);var d=!1;if(r.seriesX.length>=a){var u,g=null===(u=r.brushSource)||void 0===u?void 0:u.w.config.chart.brush;(s.chart.zoom.enabled&&s.chart.zoom.autoScaleYaxis||null!=g&&g.enabled&&null!=g&&g.autoScaleYaxis)&&(d=!0)}for(var p=t;px&&r.seriesX[p][b]>s.xaxis.max;b--);}for(var m=x;m<=b&&mh[p][m]&&h[p][m]<0&&(o=h[p][m])}else r.hasNullValues=!0}"bar"!==f&&"column"!==f||(o<0&&n<0&&(n=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,e=Math.min(e,0)))}return"rangeBar"===s.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&(o=e),"bar"===s.chart.type&&(o<0&&n<0&&(n=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:n,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i,a=Number.MAX_VALUE;if(t.isMultipleYAxis){a=Number.MAX_VALUE;for(var s=0;st.dataPoints&&0!==t.dataPoints&&(a=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(a=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var s=t.maxX-t.minX;s<30&&(a=s-1)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var r=[],n=t.minX-1;n0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,a-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var s=e-a[i-1];s>0&&(t.minXDiff=Math.min(s,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var i=e.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map((function(t){return t}))]);var a={},s={};i.forEach((function(i){a[i]=[],s[i]=[],t.w.config.series.map((function(t,a){return i.indexOf(e.seriesNames[a])>-1?a:null})).filter((function(t){return null!==t})).forEach((function(r){for(var n=0;n0?a[i][n]+=parseFloat(e.series[r][n])+1e-4:s[i][n]+=parseFloat(e.series[r][n]))}}))})),Object.entries(a).forEach((function(t){var i=p(t,1)[0];a[i].forEach((function(t,r){e.maxY=Math.max(e.maxY,a[i][r]),e.minY=Math.min(e.minY,s[i][r])}))}))}}}]),t}(),ia=function(){function t(e,a){i(this,t),this.ctx=e,this.elgrid=a,this.w=e.w;var s=this.w;this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.axisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xAxisoffX="bottom"===s.config.xaxis.position?s.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Ri(e)}return s(t,[{key:"drawYaxis",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.yaxis[t].labels.style,s=a.fontSize,r=a.fontFamily,n=a.fontWeight,o=i.group({class:"apexcharts-yaxis",rel:t,transform:"translate(".concat(e.globals.translateYAxisX[t],", 0)")});if(this.axesUtils.isYAxisHidden(t))return o;var l=i.group({class:"apexcharts-yaxis-texts-g"});o.add(l);var h=e.globals.yAxisScale[t].result.length-1,c=e.globals.gridHeight/h,d=e.globals.yLabelFormatters[t],u=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){var g=e.globals.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?g=0:"heatmap"===e.config.chart.type&&(g-=c/2),g+=parseInt(s,10)/3;for(var p=h;p>=0;p--){var f=d(u[p],p,e),x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(x*=-1);var b=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(a.colors,t),y=Array.isArray(m)?m[p]:m,w=v.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),k=i.drawText({x:x,y:g,text:w.includes(f)&&!e.config.yaxis[t].labels.showDuplicates?"":f,textAnchor:b,fontSize:s,fontFamily:r,fontWeight:n,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(a.cssClass)});l.add(k),this.addTooltip(k,f),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(i,k,firstLabel,e.config.yaxis[t].labels.rotate),g+=c}}return this.addYAxisTitle(i,o,t),this.addAxisBorder(i,o,t,h,c),o}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var i=document.createElementNS(this.w.globals.SVGNS,"title");i.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(i)}},{key:"rotateLabel",value:function(t,e,i,a){var s=t.rotateAroundCenter(i.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(a," ").concat(s.x," ").concat(r.y,")"))}},{key:"addYAxisTitle",value:function(t,e,i){var a=this.w;if(void 0!==a.config.yaxis[i].title.text){var s=t.group({class:"apexcharts-yaxis-title"}),r=a.config.yaxis[i].opposite?a.globals.translateYAxisX[i]:0,n=t.drawText({x:r,y:a.globals.gridHeight/2+a.globals.translateY+a.config.yaxis[i].title.offsetY,text:a.config.yaxis[i].title.text,textAnchor:"end",foreColor:a.config.yaxis[i].title.style.color,fontSize:a.config.yaxis[i].title.style.fontSize,fontWeight:a.config.yaxis[i].title.style.fontWeight,fontFamily:a.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(a.config.yaxis[i].title.style.cssClass)});s.add(n),e.add(s)}}},{key:"addAxisBorder",value:function(t,e,i,a,s){var r=this.w,n=r.config.yaxis[i].axisBorder,o=31+n.offsetX;if(r.config.yaxis[i].opposite&&(o=-31-n.offsetX),n.show){var l=t.drawLine(o,r.globals.translateY+n.offsetY-2,o,r.globals.gridHeight+r.globals.translateY+n.offsetY+2,n.color,0,n.width);e.add(l)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,a,n,r.config.yaxis[i].axisTicks,i,s,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});a.add(s);var r=e.globals.yAxisScale[t].result.length-1,n=e.globals.gridWidth/r+.1,o=n+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,h=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),c=e.globals.timescaleLabels;if(c.length>0&&(this.xaxisLabels=c.slice(),r=(h=c.slice()).length),e.config.xaxis.labels.show)for(var d=c.length?0:r;c.length?d=0;c.length?d++:d--){var u=l(h[d],d,e),g=e.globals.gridWidth+e.globals.padHorizontal-(o-n+e.config.xaxis.labels.offsetX);if(c.length){var p=this.axesUtils.getLabel(h,c,g,d,this.drawnLabels,this.xaxisFontSize);g=p.x,u=p.text,this.drawnLabels.push(p.text),0===d&&e.globals.skipFirstTimelinelabel&&(u=""),d===h.length-1&&e.globals.skipLastTimelinelabel&&(u="")}var f=i.drawText({x:g,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:u,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});s.add(f),f.tspan(u),this.addTooltip(f,u),o+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.xaxis.axisBorder;if(a.show){var s=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(s-=15);var r=i.drawLine(e.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new Mi(this.ctx);if(void 0!==e.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});a.add(s),t.add(a)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),r=s?s.getBoundingClientRect():{width:0,height:0},n=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),o=n?n.getBoundingClientRect():{width:0,height:0};if(n){var l=this.xPaddingForYAxisTitle(t,r,o,e);n.setAttribute("x",l.xPos-(e?10:0));var h=a.rotateAroundCenter(n);n.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(h.x," ").concat(h.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var s=this.w,r=0,n=10;return void 0===s.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(a?r=e.width+s.config.yaxis[t].title.offsetX+i.width/2+n/2:(r=-1*e.width+s.config.yaxis[t].title.offsetX+n/2+i.width/2,s.globals.isBarHorizontal&&(n=25,r=-1*e.width-s.config.yaxis[t].title.offsetX-n)),{xPos:r,padd:n})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,a=0,s=0,r=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach((function(o,l){var h=i.globals.ignoreYAxisIndexes.includes(l)||!o.show||o.floating||0===t[l].width,c=t[l].width+e[l].width;o.opposite?i.globals.isBarHorizontal?(s=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=s-o.labels.offsetX):(s=i.globals.gridWidth+i.globals.translateX+n,h||(n+=c+20),i.globals.translateYAxisX[l]=s-o.labels.offsetX+20):(a=i.globals.translateX-r,h||(r+=c+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;v.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,i){var a=t.config.yaxis[i];if(a&&!a.floating&&void 0!==a.labels.align){var s=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=v.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"))),n=s.getBoundingClientRect();r.forEach((function(t){t.setAttribute("text-anchor",a.labels.align)})),"left"!==a.labels.align||a.opposite?"center"===a.labels.align?s.setAttribute("transform","translate(".concat(n.width/2*(a.opposite?1:-1),", 0)")):"right"===a.labels.align&&a.opposite&&s.setAttribute("transform","translate(".concat(n.width,", 0)")):s.setAttribute("transform","translate(-".concat(n.width,", 0)"))}}))}}]),t}(),aa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.documentEvent=v.bind(this.documentEvent,this)}return s(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var a=i.globals.events[t].indexOf(e);-1!==a&&i.globals.events[t].splice(a,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var a=i.globals.events[t],s=a.length,r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=v.extend(Hi,i);this.w.globals.locale=a.options}}]),t}(),ra=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawAxis",value:function(t,e){var i,a,s=this,r=this.w.globals,n=this.w.config,o=new Qi(this.ctx,e),l=new ia(this.ctx,e);r.axisCharts&&"radar"!==t&&(r.isBarHorizontal?(a=l.drawYaxisInversed(0),i=o.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(a)):(i=o.drawXaxis(),r.dom.elGraphical.add(i),n.yaxis.map((function(t,e){if(-1===r.ignoreYAxisIndexes.indexOf(e)&&(a=l.drawYaxis(e),r.dom.Paper.add(a),"back"===s.w.config.grid.position)){var i=r.dom.Paper.children()[1];i.remove(),r.dom.Paper.add(i)}}))))}}]),t}(),na=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Li(this.ctx),a=t.config.xaxis.crosshairs.fill.gradient,s=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,n=a.colorFrom,o=a.colorTo,l=a.opacityFrom,h=a.opacityTo,c=a.stops,d=s.enabled,u=s.left,g=s.top,p=s.blur,f=s.color,x=s.opacity,b=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(b=e.drawGradient("vertical",n,o,l,h,null,c,null));var m=e.drawRect();1===t.config.xaxis.crosshairs.width&&(m=e.drawLine());var y=t.globals.gridHeight;(!v.isNumber(y)||y<0)&&(y=0);var w=t.config.xaxis.crosshairs.width;(!v.isNumber(w)||w<0)&&(w=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:w,height:y,fill:b,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),d&&(m=i.dropShadow(m,{left:u,top:g,blur:p,color:f,opacity:x})),t.globals.dom.elGraphical.add(m)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var s=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(s)}var r=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(r)}}]),t}(),oa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,a=i.config;if(0!==a.responsive.length){var s=a.responsive.slice();s.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var r=new Wi({}),n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=s[0].breakpoint,n=window.innerWidth>0?window.innerWidth:screen.width;if(n>a){var o=v.clone(i.globals.initialConfig);o.series=v.clone(i.config.series);var l=Pi.extendArrayProps(r,o,i);t=v.extend(l,t),t=v.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var h=0;h0&&"function"==typeof t[0]?(this.isColorFn=!0,i.config.series.map((function(a,s){var r=t[s]||t[0];return"function"==typeof r?r({value:i.globals.axisCharts?i.globals.series[s][0]||0:i.globals.series[s],seriesIndex:s,dataPointIndex:s,w:e.w}):r}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,i){t&&(e[i]=t)}))}},{key:"getMonochromeColors",value:function(t,e,i){var a=t.color,s=t.shadeIntensity,r=t.shadeTo,n=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,o=1/(n/s),l=0;return Array.from({length:n},(function(){var t="dark"===r?i.shadeColor(-1*l,a):i.shadeColor(l,a);return l+=o,t}))}},{key:"applyColorTypes",value:function(t,e){var i=this,a=this.w;t.forEach((function(t){a.globals[t].colors=void 0===a.config[t].colors?i.isColorFn?a.config.colors:e:a.config[t].colors.slice(),i.pushExtraColors(a.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=e||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),t.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,i=[];e.config.series.forEach((function(s,r){s.data.forEach((function(s,n){var o;o=e.globals.series[r][n],a=e.config.dataLabels.formatter(o,{ctx:t.dCtx.ctx,seriesIndex:r,dataPointIndex:n,w:e}),i.push(a)}))}));var a=v.getLargestStringFromArr(i),s=new Mi(this.dCtx.ctx),r=e.config.dataLabels.style,n=s.getTextRects(a,parseInt(r.fontSize),r.fontFamily);return{width:1.05*n.width,height:n.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var a=e.map((function(t,e){return Array.isArray(t)?t.length:1})),s=Math.max.apply(Math,f(a));i=e[a.indexOf(s)]}return i}}]),t}(),da=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();t={width:a.width,height:a.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var s=e.globals.xLabelFormatter,r=v.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);e.globals.isBarHorizontal&&(n=r=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var o=new Xi(this.dCtx.ctx),l=r;r=o.xLabelFormat(s,r,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),n=o.xLabelFormat(s,n,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(n=r="1");var h=new Mi(this.dCtx.ctx),c=h.getTextRects(r,e.config.xaxis.labels.style.fontSize),d=c;if(r!==n&&(d=h.getTextRects(n,e.config.xaxis.labels.style.fontSize)),(t={width:c.width>=d.width?c.width:d.width,height:c.height>=d.height?c.height:d.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return h.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};c=u(r),r!==n&&(d=u(n)),t.height=(c.height>d.height?c.height:d.height)/1.5,t.width=c.width>d.width?c.width:d.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var i,a=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,s=e.globals.groups.map((function(t){return t.title})),r=v.getLargestStringFromArr(s),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),o=new Mi(this.dCtx.ctx),l=o.getTextRects(r,a),h=l;return r!==n&&(h=o.getTextRects(n,a)),i={width:l.width>=h.width?l.width:h.width,height:l.height>=h.height?l.height:h.height},e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new Mi(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,i=a.height}return{width:e,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(t){return t.value})),a=i.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Mi(this.dCtx.ctx).getTextRects(a,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,a=i.globals,s=i.config,r=s.xaxis.type,n=t.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,o){s.yaxis.length>1&&function(t){return-1!==a.collapsedSeriesIndices.indexOf(t)}(o)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var o=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+n/1.75-e.dCtx.yAxisWidthRight,h=o.position-n/1.75+e.dCtx.yAxisWidthLeft,c="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>a.svgWidth-a.translateX-c&&(a.skipLastTimelinelabel=!0),h<-(t.show&&!t.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===r?e.dCtx.gridPad.right(null===(a=String(c(e,o)))||void 0===a?void 0:a.length)?t:e}),d),g=u=c(u,o);if(void 0!==u&&0!==u.length||(u=l.niceMax),e.globals.isBarHorizontal){a=0;var p=e.globals.labels.slice();u=v.getLargestStringFromArr(p),u=c(u,{seriesIndex:n,dataPointIndex:-1,w:e}),g=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,p)}var f=new Mi(t.dCtx.ctx),x="rotate(".concat(r.labels.rotate," 0 0)"),b=f.getTextRects(u,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1),m=b;u!==g&&(m=f.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1)),i.push({width:(h>m.width||h>b.width?h:m.width>b.width?m.width:b.width)+a,height:m.height>b.height?m.height:b.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,a){if(e.show&&void 0!==e.title.text){var s=new Mi(t.dCtx.ctx),r="rotate(".concat(e.title.rotate," 0 0)"),n=s.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);i.push({width:n.width,height:n.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,a=0,s=t.globals.yAxisScale.length>1?10:0,r=new Ri(this.dCtx.ctx),n=function(n,o){var l=t.config.yaxis[o].floating,h=0;n.width>0&&!l?(h=n.width+s,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(o)&&(h=h-n.width-s)):h=l||r.isYAxisHidden(o)?0:5,t.config.yaxis[o].opposite?a+=h:i+=h,e+=h};return t.globals.yLabelsCoords.map((function(t,e){n(t,e)})),t.globals.yTitleCoords.map((function(t,e){n(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,e}}]),t}(),ga=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w,i=e.config,a=e.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.series.length)return 0;var s=function(t){return["bar","rangeBar","candlestick","boxPlot"].includes(t)},r=i.chart.type,n=0,o=s(r)?i.series.length:1;a.comboBarCount>0&&(o=a.comboBarCount),a.collapsedSeries.forEach((function(t){s(t.type)&&(o-=1)})),i.chart.stacked&&(o=1);var l=s(r)||a.comboBarCount>0,h=Math.abs(a.initialMaxX-a.initialMinX);if(l&&a.isXNumeric&&!a.isBarHorizontal&&o>0&&0!==h){h<=3&&(h=a.dataPoints);var c=h/t,d=a.minXDiff&&a.minXDiff/c>0?a.minXDiff/c:0;d>t/2&&(d/=2),(n=d*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),a.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,a=this.dCtx.isSparkline||!i.axisCharts?0:10;["title","subtitle"].forEach((function(s){void 0!==e.config[s].text?a+=e.config[s].margin:a+=t.dCtx.isSparkline||!i.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||i.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight-=s.height+r.height+a,i.translateY+=s.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,a=new Ri(this.dCtx.ctx);i.config.yaxis.forEach((function(s,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||s.floating||a.isYAxisHidden(r)||(s.opposite&&(i.globals.translateX-=e[r].width+t[r].width+parseInt(s.labels.style.fontSize,10)/1.2+12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),pa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new ca(this),this.dimYAxis=new ua(this),this.dimXAxis=new da(this),this.dimGrid=new ga(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return s(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,i=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var a=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,f(e.config.stroke.width)):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var i=p(e,2),a=i[0],s=i[1];t.gridPad[a]=Math.max(s,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(a/2,this.gridPad.top),this.gridPad.bottom=Math.max(a/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var s=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*s,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:a[i].width,index:i}),e.globals.yTitleCoords.push({width:s[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o,n),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,h=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var c=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,h=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,h=0,c=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(r);var d=function(){i.translateX=l+t.datalabelsCoords.width,i.gridHeight=i.svgHeight-t.lgRect.height-h-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(c=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=c,d();break;case"top":i.translateY=this.lgRect.height+c,d();break;case"left":i.translateY=c,i.translateX=this.lgRect.width+l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":i.translateY=c,i.translateX=l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new ia(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,a=0;t.config.legend.show&&!t.config.legend.floating&&(a=20);var s="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[s].offsetY,n=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating){e.gridHeight=e.svgHeight;var o=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(o,e.gridHeight),e.translateY=r,void(e.translateX=n+(e.svgWidth-e.gridWidth)/2)}switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=r-10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+r+10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-a,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+this.lgRect.width+a;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-a-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,i){var a=this.w,s=a.globals.hasXaxisGroups?2:1,r=i.height+t.height+e.height,n=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,o=a.globals.rotateXLabels?22:10,l=a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0;this.xAxisHeight=r*n+s*o+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeightc&&(this.yAxisWidth=c)}}]),t}(),fa=function(){function t(e){i(this,t),this.w=e.w,this.lgCtx=e}return s(t,[{key:"getLegendStyles",value:function(){var t,e,i,a=document.createElement("style");a.setAttribute("type","text/css");var s=(null===(t=this.lgCtx.ctx)||void 0===t||null===(e=t.opts)||void 0===e||null===(i=e.chart)||void 0===i?void 0:i.nonce)||this.w.config.chart.nonce;s&&a.setAttribute("nonce",s);var r=document.createTextNode("\n .apexcharts-flip-y {\n transform: scaleY(-1) translateY(-100%);\n transform-origin: top;\n transform-box: fill-box;\n }\n .apexcharts-flip-x {\n transform: scaleX(-1);\n transform-origin: center;\n transform-box: fill-box;\n }\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-right: 1px;\n }\n\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }\n\n ");return a.appendChild(r),a}},{key:"getLegendDimensions",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(t,e){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var s=null,r=null;if(a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),r=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),r=parseInt(s.getAttribute("rel"),10)-1),e)[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,r)}));else this.hideSeries({seriesEl:s,realIndex:r})}else{var n=a.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(t+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=a.config.plotOptions.pie.donut.labels;new Mi(this.lgCtx.ctx).pathMouseDown(n,null),this.lgCtx.ctx.pie.printDataLabelsInner(n.node,l)}n.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(t){var e=t.realIndex,i=this.w,a=i.globals,s=v.clone(i.config.series);if(a.axisCharts){var r=i.config.yaxis[a.seriesYAxisReverseMap[e]],n={index:e,data:s[e].data.slice(),type:s[e].type||i.config.chart.type};if(r&&r.show&&r.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(e)<0&&(a.ancillaryCollapsedSeries.push(n),a.ancillaryCollapsedSeriesIndices.push(e));else if(a.collapsedSeriesIndices.indexOf(e)<0){a.collapsedSeries.push(n),a.collapsedSeriesIndices.push(e);var o=a.risingSeries.indexOf(e);a.risingSeries.splice(o,1)}}else a.collapsedSeries.push({index:e,data:s[e]}),a.collapsedSeriesIndices.push(e);return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.config.series.length,this._getSeriesBasedOnCollapsedState(s)}},{key:"hideSeries",value:function(t){for(var e=t.seriesEl,i=t.realIndex,a=this.w,s=this.getSeriesAfterCollapsing({realIndex:i}),r=e.childNodes,n=0;n0){for(var r=0;r1;if(this.legendHelpers.appendToForeignObject(),(a||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,i=t.fillcolor,a=this.w,s=document.createElement("span");s.classList.add("apexcharts-legend-marker");var r=a.config.legend.markers.shape||a.config.markers.shape,n=r;Array.isArray(r)&&(n=r[e]);var o=Array.isArray(a.config.legend.markers.size)?parseFloat(a.config.legend.markers.size[e]):parseFloat(a.config.legend.markers.size),l=Array.isArray(a.config.legend.markers.offsetX)?parseFloat(a.config.legend.markers.offsetX[e]):parseFloat(a.config.legend.markers.offsetX),h=Array.isArray(a.config.legend.markers.offsetY)?parseFloat(a.config.legend.markers.offsetY[e]):parseFloat(a.config.legend.markers.offsetY),c=Array.isArray(a.config.legend.markers.strokeWidth)?parseFloat(a.config.legend.markers.strokeWidth[e]):parseFloat(a.config.legend.markers.strokeWidth),d=s.style;if(d.height=2*(o+c)+"px",d.width=2*(o+c)+"px",d.left=l+"px",d.top=h+"px",a.config.legend.markers.customHTML)d.background="transparent",d.color=i[e],Array.isArray(a.config.legend.markers.customHTML)?a.config.legend.markers.customHTML[e]&&(s.innerHTML=a.config.legend.markers.customHTML[e]()):s.innerHTML=a.config.legend.markers.customHTML();else{var g=new Vi(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(n),seriesIndex:e,strokeWidth:c,size:o}),p=window.SVG().addTo(s).size("100%","100%"),f=new Mi(this.ctx).drawMarker(0,0,u(u({},g),{},{pointFillColor:Array.isArray(i)?i[e]:g.pointFillColor,shape:n}));a.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),p.add(f)}return s}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,a=e.globals.seriesNames,s=e.config.legend.markers.fillColors?e.config.legend.markers.fillColors.slice():e.globals.colors.slice();if("heatmap"===e.config.chart.type){var r=e.config.plotOptions.heatmap.colorScale.ranges;a=r.map((function(t){return t.name?t.name:t.from+" - "+t.to})),s=r.map((function(t){return t.color}))}else this.isBarsDistributed&&(a=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(a=e.config.legend.customLegendItems);for(var n=e.globals.legendFormatter,o=e.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var h,c=n(a[l],{seriesIndex:l,w:e}),d=!1,u=!1;if(e.globals.collapsedSeries.length>0)for(var g=0;g0)for(var p=0;p0?l-10:0)+(h>0?h-10:0)}a.style.position="absolute",r=r+t+i.config.legend.offsetX,n=n+e+i.config.legend.offsetY,a.style.left=r+"px",a.style.top=n+"px","right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px");["width","height"].forEach((function(t){a.style[t]&&(a.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new pa(this.ctx),i=e.dimHelpers.getTitleSubtitleCoords("title"),a=e.dimHelpers.getTitleSubtitleCoords("subtitle"),s=0;"top"===t.config.legend.position&&(s=i.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,s)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new Zi(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new Zi(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,a="true"===t.target.getAttribute("data:collapsed"),s=this.w.config.chart.events.legendClick;"function"==typeof s&&s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;"function"==typeof r&&t.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),t}(),ba=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=a.globals.minX,this.maxX=a.globals.maxX}return s(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=e.config.chart.toolbar.offsetY+"px",a.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s\n \n \n\n'),n("zoomOut",this.elZoomOut,'\n \n \n\n');var o=function(i){t.t[i]&&e.config.chart[i].enabled&&r.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'\n \n \n \n':'\n \n \n',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&e.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,'\n \n \n'),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;lthis.wheelDelay&&(this.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){a-i.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,i=this.w;this.minX=i.globals.isRangeBar?i.globals.minY:i.globals.minX,this.maxX=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;var a=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(a){var s,r,n,o=(t.clientX-a.left)/a.width,l=this.minX,h=this.maxX,c=h-l;if(t.deltaY<0){var d=l+o*c;r=d-(s=.5*c)/2,n=d+s/2}else r=l-(s=1.5*c)/2,n=h+s/2;if(!i.globals.isRangeBar){r=Math.max(r,i.globals.initialMinX),n=Math.min(n,i.globals.initialMaxX);var u=.01*(i.globals.initialMaxX-i.globals.initialMinX);if(n-r0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,i,a,s){return"l"===s||"r"===s?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resizing",this.selectionDragging.bind(this,"resizing")))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(u(u({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,a=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i;t.globals.isRangeBar&&(i=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,a=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var s={x:i,y:0,width:a,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(s),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,a=t.width,s=t.height,r=t.translateX,n=void 0===r?0:r,o=t.translateY,l=void 0===o?0:o,h=this.w,c=this.zoomRect,d=this.selectionRect;if(this.dragged||null!==h.globals.selection){var u={transform:"translate("+n+", "+l+")"};h.globals.zoomEnabled&&this.dragged&&(a<0&&(a=1),c.attr({x:e,y:i,width:a,height:s,fill:h.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":h.config.chart.zoom.zoomedArea.fill.opacity,stroke:h.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":h.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":h.config.chart.zoom.zoomedArea.stroke.opacity}),Mi.setAttrs(c.node,u)),h.globals.selectionEnabled&&(d.attr({x:e,y:i,width:a>0?a:0,height:s>0?s:0,fill:h.config.chart.selection.fill.color,"fill-opacity":h.config.chart.selection.fill.opacity,stroke:h.config.chart.selection.stroke.color,"stroke-width":h.config.chart.selection.stroke.width,"stroke-dasharray":h.config.chart.selection.stroke.dashArray,"stroke-opacity":h.config.chart.selection.stroke.opacity}),Mi.setAttrs(d.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.gridRect.getBoundingClientRect(),n=s.startX-1,o=s.startY,l=!1,h=!1,c=s.clientX-r.left-n,d=s.clientY-r.top-o,g={translateX:a.globals.translateX,translateY:a.globals.translateY};return Math.abs(c+n)>a.globals.gridWidth?c=a.globals.gridWidth-n:s.clientX-r.left<0&&(c=n),n>s.clientX-r.left&&(l=!0,c=Math.abs(c)),o>s.clientY-r.top&&(h=!0,d=Math.abs(d)),g=u(u({},g="x"===i?{x:l?n-c:n,y:0,width:c,height:a.globals.gridHeight}:"y"===i?{x:0,y:h?o-d:o,width:a.globals.gridWidth,height:d}:{x:l?n-c:n,y:h?o-d:o,width:c,height:d}),{},{translateX:a.globals.translateX,translateY:a.globals.translateY}),s.drawSelectionRect(g),s.selectionDragging("resizing"),g}},{key:"selectionDragging",value:function(t,e){var i=this,a=this.w;if(e){e.preventDefault();var s=e.detail,r=s.handler,n=s.box,o=n.x,l=n.y;othis.constraints.x2&&(o=this.constraints.x2-n.w),n.y2>this.constraints.y2&&(l=this.constraints.y2-n.h),r.move(o,l);var h=this.xyRatios,c=this.selectionRect,d=0;"resizing"===t&&(d=30);var u=function(t){return parseFloat(c.node.getAttribute(t))},g={x:u("x"),y:u("y"),width:u("width"),height:u("height")};a.globals.selection=g,"function"==typeof a.config.chart.events.selection&&a.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,s,r,n=i.gridRect.getBoundingClientRect(),o=c.node.getBoundingClientRect();a.globals.isRangeBar?(t=a.globals.yAxisScale[0].niceMin+(o.left-n.left)*h.invertedYRatio,e=a.globals.yAxisScale[0].niceMin+(o.right-n.left)*h.invertedYRatio,s=0,r=1):(t=a.globals.xAxisScale.niceMin+(o.left-n.left)*h.xRatio,e=a.globals.xAxisScale.niceMin+(o.right-n.left)*h.xRatio,s=a.globals.yAxisScale[0].niceMin+(n.bottom-o.bottom)*h.yRatio[0],r=a.globals.yAxisScale[0].niceMax-(o.top-n.top)*h.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:s,max:r}};a.config.chart.events.selection(i.ctx,l),a.config.chart.brush.enabled&&void 0!==a.config.chart.events.brushScrolled&&a.config.chart.events.brushScrolled(i.ctx,l)}),d))}}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.xyRatios,n=this.ctx.toolbar;if(s.startX>s.endX){var o=s.startX;s.startX=s.endX,s.endX=o}if(s.startY>s.endY){var l=s.startY;s.startY=s.endY,s.endY=l}var h=void 0,c=void 0;a.globals.isRangeBar?(h=a.globals.yAxisScale[0].niceMin+s.startX*r.invertedYRatio,c=a.globals.yAxisScale[0].niceMin+s.endX*r.invertedYRatio):(h=a.globals.xAxisScale.niceMin+s.startX*r.xRatio,c=a.globals.xAxisScale.niceMin+s.endX*r.xRatio);var d=[],u=[];if(a.config.yaxis.forEach((function(t,e){var i=a.globals.seriesYAxisMap[e][0];d.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.startY),u.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.endY)})),s.dragged&&(s.dragX>10||s.dragY>10)&&h!==c)if(a.globals.zoomEnabled){var g=v.clone(a.globals.initialConfig.yaxis),p=v.clone(a.globals.initialConfig.xaxis);if(a.globals.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),c=Math.floor(c),h<1&&(h=1,c=a.globals.dataPoints),c-h<2&&(c=h+1)),"xy"!==i&&"x"!==i||(p={min:h,max:c}),"xy"!==i&&"y"!==i||g.forEach((function(t,e){g[e].min=u[e],g[e].max=d[e]})),n){var f=n.getBeforeZoomRange(p,g);f&&(p=f.xaxis?f.xaxis:p,g=f.yaxis?f.yaxis:g)}var x={xaxis:p};a.config.chart.group||(x.yaxis=g),s.ctx.updateHelpers._updateOptions(x,!1,s.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&n.zoomCallback(p,g)}else if(a.globals.selectionEnabled){var b,m=null;b={min:h,max:c},"xy"!==i&&"y"!==i||(m=v.clone(a.config.yaxis)).forEach((function(t,e){m[e].min=u[e],m[e].max=d[e]})),a.globals.selection=s.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(s.ctx,{xaxis:b,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,a=e;if(void 0!==i.globals.lastClientPosition.x){var s=i.globals.lastClientPosition.x-a.clientX,r=i.globals.lastClientPosition.y-a.clientY;Math.abs(s)>Math.abs(r)&&s>0?this.moveDirection="left":Math.abs(s)>Math.abs(r)&&s<0?this.moveDirection="right":Math.abs(r)>Math.abs(s)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(s)&&r<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var n=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||a.panScrolled(n,o)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,a=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+a,i=t.globals.maxX+a):"right"===this.moveDirection&&(e=t.globals.minX-a,i=t.globals.maxX-a),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,a=this.xyRatios,s=v.clone(i.globals.initialConfig.yaxis),r=a.xRatio,n=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(r=a.invertedYRatio,n=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(t=n+i.globals.gridWidth/15*r,e=o+i.globals.gridWidth/15*r):"right"===this.moveDirection&&(t=n-i.globals.gridWidth/15*r,e=o-i.globals.gridWidth/15*r),i.globals.isRangeBar||(ti.globals.initialMaxX)&&(t=n,e=o);var l={xaxis:{min:t,max:e}};i.config.chart.group||(l.yaxis=s),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var a=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),a}(ba),va=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return s(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,a=t.clientX,s=t.clientY,r=this.w,n=i.getBoundingClientRect(),o=n.width,l=n.height,h=o/(r.globals.dataPoints-1),c=l/r.globals.dataPoints,d=this.hasBars();!r.globals.comboCharts&&!d||r.config.xaxis.convertedCatToNumeric||(h=o/r.globals.dataPoints);var u=a-n.left-r.globals.barPadForNumericAxis,g=s-n.top;u<0||g<0||u>o||g>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var p=Math.round(u/h),f=Math.floor(g/c);d&&!r.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(u/h),p-=1);var x=null,b=null,m=r.globals.seriesXvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))})),y=r.globals.seriesYvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))}));if(r.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),k=u*(w.width/o),A=g*(w.height/l);x=(b=this.closestInMultiArray(k,A,m,y)).index,p=b.j,null!==x&&(m=r.globals.seriesXvalues[x],p=(b=this.closestInArray(k,m)).index)}return r.globals.capturedSeriesIndex=null===x?-1:x,(!p||p<1)&&(p=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=f:r.globals.capturedDataPointIndex=p,{capturedSeries:x,j:r.globals.isBarHorizontal?f:p,hoverX:u,hoverY:g}}},{key:"closestInMultiArray",value:function(t,e,i,a){var s=this.w,r=0,n=null,o=-1;s.globals.series.length>1?r=this.getFirstActiveXArray(i):n=0;var l=i[r][0],h=Math.abs(t-l);if(i.forEach((function(e){e.forEach((function(e,i){var a=Math.abs(t-e);a<=h&&(h=a,o=i)}))})),-1!==o){var c=a[r][o],d=Math.abs(e-c);n=r,a.forEach((function(t,i){var a=Math.abs(e-t[o]);a<=d&&(d=a,n=i)}))}return{index:n,j:o}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,i=0,a=t.map((function(t,e){return t.length>0?e:-1})),s=0;s0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=f(t)).sort((function(t,e){var i=Number(t.getAttribute("data:realIndex")),a=Number(e.getAttribute("data:realIndex"));return ai?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var i=Number(t.getAttribute("cx")),a=Number(t.getAttribute("cy")),s=t.getAttribute("shape");return new Mi(this.ctx).getMarkerPath(i,a,s,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s ').concat(i.attrs.name,""),e+="
".concat(i.val,"
")})),m.innerHTML=t+"",v.innerHTML=e+""};n?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?y():(m.innerHTML="",v.innerHTML=""):y()}else m.innerHTML="",v.innerHTML="";null!==p&&(a[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:"");if(n&&f[0]){if(l.config.tooltip.hideEmptySeries){var w=a[e].querySelector(".apexcharts-tooltip-marker"),k=a[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(c)?(w.style.display="none",k.style.display="none"):(w.style.display="block",k.style.display="block")}null==c||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)?f[0].parentNode.style.display="none":f[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)&&(f[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var i=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));a&&(a.classList.add("apexcharts-active"),a.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",n="",o=null,l=null,h={series:a.globals.series,seriesIndex:e,dataPointIndex:i,w:a},c=a.globals.ttZFormatter;null===i?l=a.globals.series[e]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(r=s[e][i],0===s[e].length&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=new $i(this.ctx).isFormatXY()?void 0!==a.config.series[e].data[i]?a.config.series[e].data[i].x:"":void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var d=r;a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?r=new Xi(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(this.ctx).formatDate,w:this.w}):r=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](d,h):a.globals.xLabelFormatter(d,h);return void 0!==a.config.tooltip.x.formatter&&(r=a.globals.ttKeyFormatter(d,h)),a.globals.seriesZ.length>0&&a.globals.seriesZ[e].length>0&&(o=c(a.globals.seriesZ[e][i],a)),n="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(d,h):r,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,a=t.y1,s=t.y2,r=t.w,n=this.ttCtx.getElTooltip(),o=r.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]),n.innerHTML=o({ctx:this.ctx,series:r.globals.series,seriesIndex:e,dataPointIndex:i,y1:a,y2:s,w:r})}}]),t}(),wa=function(){function t(e){i(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return s(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=t-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(null!==e&&(r=a.globals.gridWidth/n*e),null===s||a.globals.isBarHorizontal||(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=r;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Mi.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Mi.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=e.globals.translateX;var s;s=new Mi(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=e.globals.translateY+a,r=i.yaxisTTEls[t].getBoundingClientRect().height,n=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(n-=26),s-=r/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=n+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),n=s.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(t)+o+5,h=parseFloat(e)+o/2;if(l>a.globals.gridWidth/2&&(l=l-n.ttWidth-o-10),l>a.globals.gridWidth-n.ttWidth-10&&(l=a.globals.gridWidth-n.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var c=s.getElGrid().getBoundingClientRect();(l=s.e.clientX-c.left)>a.globals.gridWidth/2&&(l-=s.tooltipRect.ttWidth),(h=s.e.clientY+a.globals.translateY-c.top)>a.globals.gridHeight/2&&(h-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+h>a.globals.gridHeight&&(h=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(l)||(l+=a.globals.translateX,r.style.left=l+"px",r.style.top=h+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),r=0;r0){var g=u.getAttribute("shape"),p=l.getMarkerPath(s,r,g,1.5*c);u.setAttribute("d",p)}this.moveXCrosshairs(s),o.fixedTooltip||this.moveTooltip(s,r,c)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,a=i.w,s=0,r=0,n=a.globals.pointsArray,o=new Zi(this.ctx),l=new Mi(this.ctx);e=o.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var h=i.tooltipUtil.getHoverMarkerSize(e);n[e]&&(s=n[e][t][0],r=n[e][t][1]);var c=i.tooltipUtil.getAllMarkers();if(null!==c)for(var d=0;d0){var b=l.getMarkerPath(s,g,f,h);c[d].setAttribute("d",b)}else c[d].setAttribute("d","")}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,r||a.globals.gridHeight,h)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(r=new Zi(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"']"));n||"number"!=typeof e||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var o=n?parseFloat(n.getAttribute("cx")):0,l=n?parseFloat(n.getAttribute("cy")):0,h=n?parseFloat(n.getAttribute("barWidth")):0,c=a.getElGrid().getBoundingClientRect(),d=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!d&&(o-=s%2!=0?h/2:0),n&&d&&(o-=h/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[t-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[t]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?l-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?l=a.e.clientY-c.top-a.tooltipRect.ttHeight/2:l+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(l=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,l||i.globals.gridHeight)}}]),t}(),ka=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new wa(e)}return s(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Vi(this.ctx),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=f(a),t.config.chart.stacked&&a.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w;"bubble"!==s.config.chart.type&&this.newPointSize(t,e);var r=e.getAttribute("cx"),n=e.getAttribute("cy");if(null!==i&&null!==a&&(r=i,n=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===s.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(r,n,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,a=this.ttCtx,s=t,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=e.config.markers.hover.size,o=0;o0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],i);t[e].setAttribute("d",a)}else t[e].setAttribute("d","M0,0")}}}]),t}(),Aa=function(){function t(e){i(this,t),this.w=e.w;var a=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!a.globals.isBarHorizontal&&"rangeBar"===a.config.chart.type&&a.config.plotOptions.bar.rangeBarGroupRows}return s(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,s=t.y,r=t.type,n=this.ttCtx,o=this.w;if(e.target.classList.contains("apexcharts-".concat(r,"-rect"))){var l=this.getAttr(e,"i"),h=this.getAttr(e,"j"),c=this.getAttr(e,"cx"),d=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),g=this.getAttr(e,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:h,shared:!1,e:e}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=h,a=c+n.tooltipRect.ttWidth/2+u,s=d+n.tooltipRect.ttHeight/2-g/2,n.tooltipPosition.moveXCrosshairs(c+u/2),a>o.globals.gridWidth/2&&(a=c-n.tooltipRect.ttWidth/2+u),n.w.config.tooltip.followCursor){var p=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-p.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),s=o.globals.clientY-p.top-(s>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=t.x,n=t.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var h=parseInt(s.paths.getAttribute("cx"),10),c=parseInt(s.paths.getAttribute("cy"),10),d=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),e=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=v.findAncestor(s.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,e,i),o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=i,r=h,n=c+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var g=l.getElGrid().getBoundingClientRect();n=l.e.clientY+o.globals.translateY-g.top}d<0&&(n=c),l.marker.enlargeCurrentPoint(i,s.paths,r,n)}return{x:r,y:n}}},{key:"handleBarTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=this.ttCtx,o=n.getElTooltip(),l=0,h=0,c=0,d=this.getBarTooltipXY({e:a,opt:s});if(null!==d.j||0!==d.barHeight||0!==d.barWidth){e=d.i;var u=d.j;if(r.globals.capturedSeriesIndex=e,r.globals.capturedDataPointIndex=u,r.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!r.config.tooltip.shared?(h=d.x,c=d.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[e]:r.config.stroke.width,l=h):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(c)&&(c=r.globals.svgHeight-n.tooltipRect.ttHeight),parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),h+n.tooltipRect.ttWidth>r.globals.gridWidth?h-=n.tooltipRect.ttWidth:h<0&&(h=0),n.w.config.tooltip.followCursor){var g=n.getElGrid().getBoundingClientRect();c=n.e.clientY-g.top}null===n.tooltip&&(n.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?n.tooltipPosition.moveXCrosshairs(l+i/2):n.tooltipPosition.moveXCrosshairs(l)),!n.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(c=c+r.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=h+r.globals.translateX+"px",o.style.top=c+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,i=t.e,a=t.opt,s=this.w,r=null,n=this.ttCtx,o=0,l=0,h=0,c=0,d=0,u=i.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){var g=i.target,p=g.getBoundingClientRect(),f=a.elGrid.getBoundingClientRect(),x=p.height;d=p.height;var b=p.width,m=parseInt(g.getAttribute("cx"),10),v=parseInt(g.getAttribute("cy"),10);c=parseFloat(g.getAttribute("barWidth"));var y="touchmove"===i.type?i.touches[0].clientX:i.clientX;r=parseInt(g.getAttribute("j"),10),o=parseInt(g.parentNode.getAttribute("rel"),10)-1;var w=g.getAttribute("data-range-y1"),k=g.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(g.parentNode.getAttribute("data:realIndex"),10));var A=function(t){return s.globals.isXNumeric?m-b/2:e.isVerticalGroupedRangeBar?m+b/2:m-n.dataPointsDividedWidth+b/2},C=function(){return v-n.dataPointsDividedHeight+x/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:r,y1:w?parseInt(w,10):null,y2:k?parseInt(k,10):null,shared:!n.showOnIntersect&&s.config.tooltip.shared,e:i}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(l=y-f.left+15,h=C()):(l=A(),h=i.clientY-f.top-n.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((l=m)0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var a=this.ttCtx,s=this.w,r=s.globals,n=r.seriesYAxisMap[t];if(a.yaxisTooltips[t]&&n.length>0){var o=r.yLabelFormatters[t],l=a.getElGrid().getBoundingClientRect(),h=n[0],c=0;i.yRatio.length>1&&(c=h);var d=(e-l.top)*i.yRatio[c],u=r.maxYArr[h]-r.minYArr[h],g=r.minYArr[h]+(u-d);s.config.yaxis[t].reversed&&(g=r.maxYArr[h]-(u-d)),a.tooltipPosition.moveYCrosshairs(e-l.top),a.yaxisTooltipText[t].innerHTML=o(g),a.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),Sa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.tConfig=a.config.tooltip,this.tooltipUtil=new va(this),this.tooltipLabels=new ya(this),this.tooltipPosition=new wa(this),this.marker=new ka(this),this.intersect=new Aa(this),this.axesTooltip=new Ca(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!a.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return s(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new Qi(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,a=[],s=this.getElTooltip(),r=function(r){var n=document.createElement("div");n.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(r)),n.style.order=i.config.tooltip.inverseOrder?t-r:r+1;var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[r],n.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var a=document.createElement("span");a.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(a),l.appendChild(e)})),n.appendChild(l),s.appendChild(n),a.push(n)},n=0;n0&&this.addPathsEventListeners(g,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(r=r+t.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+t.globals.svgHeight-s-10),e.style.left=r+"px",e.style.top=n+"px",{x:r,y:n,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,a=function(a){var s={paths:t[a],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[a].addEventListener(e,i.onSeriesHover.bind(i,s),{capture:!1,passive:!0})}))},s=0;s=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(t,e)}),20-a))}},{key:"seriesHover",value:function(t,e){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||0===s.globals.dataPoints)||(a.length?a.forEach((function(a){var s=i.getElTooltip(a),r={paths:t.paths,tooltipEl:s,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===i.w.globals.minX&&a.w.globals.maxX===i.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:r,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,a=t.opt,s=t.e,r=e.w,n=this.getElTooltip(e);if(n){if(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=s,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared)if(this.tConfig.onDatasetHover.highlightDataSeries)new Zi(e).toggleSeriesOnHover(s,s.target.parentNode);i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect})}}},{key:"axisChartsTooltips",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=s.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,ln.top+n.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var h=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(h)<0)return void this.handleMouseOut(s)}var c=this.getElTooltip(),d=this.getElXCrosshairs(),u=[];r.config.chart.group&&(u=this.ctx.getSyncedCharts());var g=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;null!==d&&d.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),g&&!this.showOnIntersect||u.length>1)this.handleStickyTooltip(a,o,l,s);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:e,y:i,type:r.config.chart.type});e=f.x,i=f.y,c.style.left=e+"px",c.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:e,y:i});if(this.yaxisTooltips.length)for(var x=0;xl.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(t,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||s.globals.isBarHorizontal){var h=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,h,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,i,a){var s=this.w;if(!this.tConfig.shared&&null===s.globals.series[e][a])return void this.handleMouseOut(i);if(void 0!==s.globals.series[e][a])this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,a,i.ttItems):this.create(t,this,e,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var r=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,r,a,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Mi(this.ctx),i=t.globals.dom.Paper.find(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,A=this.w,C=e;"mouseup"===t.type&&this.markerClick(t,i,a),null===k&&(k=this.tConfig.shared);var S=this.tooltipUtil.hasMarkers(i),L=this.tooltipUtil.getElBars();if(A.config.legend.tooltipHoverFormatter){var M=A.config.legend.tooltipHoverFormatter,P=Array.from(this.legendLabels);P.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var I=0;I0?C.marker.enlargePoints(a):C.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var E=new Mi(this.ctx),H=A.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var O=0;O0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*k)),w){u=u+d.height/2-b/2-2}var C=e.globals.series[i][a]<0,S=o;switch(this.barCtx.isReversed&&(S=o+(C?c:-c)),f.position){case"center":g=w?C?S-c/2+v:S+c/2-v:C?S-c/2+d.height/2+v:S+c/2+d.height/2-v;break;case"bottom":g=w?C?S-c+v:S+c-v:C?S-c+d.height+b+v:S+c-d.height/2+b-v;break;case"top":g=w?C?S+v:S-v:C?S-d.height/2-v:S+d.height+v}if(this.barCtx.lastActiveBarSerieIndex===s&&x.enabled){var L=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:a}),p.fontSize);r=C?S-L.height/2-v-x.offsetY+18:S+L.height+v+x.offsetY-18;var M=A;n=y+(e.globals.isXNumeric?-h*e.globals.barGroups.length/2:e.globals.barGroups.length*h/2-(e.globals.barGroups.length-1)*h-M)+x.offsetX}return e.config.chart.stacked||(g<0?g=0+b:g+d.height/3>e.globals.gridHeight&&(g=e.globals.gridHeight-b)),{bcx:l,bcy:o,dataLabelsX:u,dataLabelsY:g,totalDataLabelsX:n,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,a=t.i,s=t.j,r=t.realIndex,n=t.bcy,o=t.barHeight,l=t.barWidth,h=t.textRects,c=t.dataLabelsX,d=t.strokeWidth,u=t.dataLabelsConfig,g=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,f=t.offX,x=t.offY,b=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var m,v,y=n-(this.barCtx.isRangeBar?0:b)+o/2+h.height/2+x-3,w="start",k=e.globals.series[a][s]<0,A=i;switch(this.barCtx.isReversed&&(A=i+(k?-l:l),w=k?"start":"end"),g.position){case"center":c=k?A+l/2-f:Math.max(h.width/2,A-l/2)+f;break;case"bottom":c=k?A+l-d-f:A-l+d+f;break;case"top":c=k?A-d-f:A-d+f}if(this.barCtx.lastActiveBarSerieIndex===r&&p.enabled){var C=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:s}),u.fontSize);k?(m=A-d-f-p.offsetX,w="end"):m=A+f+p.offsetX+(this.barCtx.isReversed?-(l+d):d),v=y-h.height/2+C.height/2+p.offsetY+d}return e.config.chart.stacked||("start"===u.textAnchor?c-h.width<0?c=k?h.width+d:d:c+h.width>e.globals.gridWidth&&(c=k?e.globals.gridWidth-d:e.globals.gridWidth-h.width-d):"middle"===u.textAnchor?c-h.width/2<0?c=h.width/2+d:c+h.width/2>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width/2-d):"end"===u.textAnchor&&(c<1?c=h.width+d:c+1>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width-d))),{bcx:i,bcy:n,dataLabelsX:c,dataLabelsY:y,totalDataLabelsX:m,totalDataLabelsY:v,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.i,r=t.j,n=t.textRects,o=t.barHeight,l=t.barWidth,h=t.dataLabelsConfig,c=this.w,d="rotate(0)";"vertical"===c.config.plotOptions.bar.dataLabels.orientation&&(d="rotate(-90, ".concat(e,", ").concat(i,")"));var g=new qi(this.barCtx.ctx),p=new Mi(this.barCtx.ctx),f=h.formatter,x=null,b=c.globals.collapsedSeriesIndices.indexOf(s)>-1;if(h.enabled&&!b){x=p.group({class:"apexcharts-data-labels",transform:d});var m="";void 0!==a&&(m=f(a,u(u({},c),{},{seriesIndex:s,dataPointIndex:r,w:c}))),!a&&c.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(m="");var v=c.globals.series[s][r]<0,y=c.config.plotOptions.bar.dataLabels.position;if("vertical"===c.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(h.textAnchor=v?"end":"start"),"center"===y&&(h.textAnchor="middle"),"bottom"===y&&(h.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels)lMath.abs(l)&&(m=""):n.height/1.6>Math.abs(o)&&(m=""));var w=u({},h);this.barCtx.isHorizontal&&a<0&&("start"===h.textAnchor?w.textAnchor="end":"end"===h.textAnchor&&(w.textAnchor="start")),g.plotDataLabelsText({x:e,y:i,text:m,i:s,j:r,parent:x,dataLabelsConfig:w,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}},{key:"drawTotalDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.realIndex,r=t.textAnchor,n=t.barTotalDataLabelsConfig;this.w;var o,l=new Mi(this.barCtx.ctx);return n.enabled&&void 0!==e&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===s&&(o=l.drawText({x:e,y:i,foreColor:n.style.color,text:a,textAnchor:r,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),o}}]),t}(),Ma=function(){function t(e){i(this,t),this.w=e.w,this.barCtx=e}return s(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[i].length),e.globals.isXNumeric)for(var a=0;ae.globals.minX&&e.globals.seriesX[i][a]0&&(a=l.globals.minXDiff/d),(r=a/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),n=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+(a-r*this.barCtx.seriesLen)/2}return l.globals.barHeight=s,l.globals.barWidth=r,{x:t,y:e,yDivision:i,xDivision:a,barHeight:s,barWidth:r,zeroH:n,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,i,a){var s,r,n,o,l=this.w,h=this.barCtx.ctx.fill,c=null,d=this.barCtx.barOptions.distributed?i:e;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(a){t[e][i]>=a.from&&t[e][i]<=a.to&&(c=a.color)}));return h.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:a,dataPointIndex:i,color:c,value:t[e][i],fillConfig:null===(s=l.config.series[e].data[i])||void 0===s?void 0:s.fill,fillType:null!==(r=l.config.series[e].data[i])&&void 0!==r&&null!==(n=r.fill)&&void 0!==n&&n.type?null===(o=l.config.series[e].data[i])||void 0===o?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[a]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,i){var a=0,s=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"createBorderRadiusArr",value:function(t){var e,i=this.w,a=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,s=t.length,n=0|(null===(e=t[0])||void 0===e?void 0:e.length),o=Array.from({length:s},(function(){return Array(n).fill(a?"top":"none")}));if(a)return o;for(var l=0;l0?(h.push(u),d++):g<0&&(c.push(u),d++)}if(h.length>0&&0===c.length)if(1===h.length)o[h[0]][l]="both";else{var p,f=h[0],x=h[h.length-1],b=r(h);try{for(b.s();!(p=b.n()).done;){var m=p.value;o[m][l]=m===f?"bottom":m===x?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===h.length)if(1===c.length)o[c[0]][l]="both";else{var v,y=Math.max.apply(Math,c),w=Math.min.apply(Math,c),k=r(c);try{for(k.s();!(v=k.n()).done;){var A=v.value;o[A][l]=A===y?"bottom":A===w?"top":"none"}}catch(t){k.e(t)}finally{k.f()}}else if(h.length>0&&c.length>0){var C,S=h[h.length-1],L=r(h);try{for(L.s();!(C=L.n()).done;){var M=C.value;o[M][l]=M===S?"top":"none"}}catch(t){L.e(t)}finally{L.f()}var P,I=Math.max.apply(Math,c),T=r(c);try{for(T.s();!(P=T.n()).done;){var z=P.value;o[z][l]=z===I?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else if(1===d){o[h[0]||c[0]][l]="both"}}return o}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,a=t.x1,s=t.x2,r=t.y1,n=t.y2,o=t.elSeries,l=this.w,h=new Mi(this.barCtx.ctx),c=new Zi(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var d=this.barCtx.barOptions.colors.backgroundBarColors[e],u=h.drawRect(void 0!==a?a:0,void 0!==r?r:0,void 0!==s?s:l.globals.gridWidth,void 0!==n?n:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,i=t.barWidth,a=t.barXPosition,s=t.y1,r=t.y2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.columnWidthOffset&&(x=a-g.config.series[c].data[u].columnWidthOffset/2,f=i+g.config.series[c].data[u].columnWidthOffset);var b=n/2,m=x+b,v=x+f-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001-b*y,r+=.001+b*y;var w=p.move(m,s),k=p.move(m,s),A=p.line(v,s);if(g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1)),w=w+p.line(m,r)+p.line(v,r)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(m,s)+A+A+A+A+A+p.line(m,s)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).yArrj.push(r-b*y),C.yArrjF.push(Math.abs(s-r+n*y)),C.yArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"getBarpaths",value:function(t){var e,i=t.barYPosition,a=t.barHeight,s=t.x1,r=t.x2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.barHeightOffset&&(f=i-g.config.series[c].data[u].barHeightOffset/2,x=a+g.config.series[c].data[u].barHeightOffset);var b=n/2,m=f+b,v=f+x-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001+b*y,r+=.001-b*y;var w=p.move(s,m),k=p.move(s,m);g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1));var A=p.line(s,v);if(w=w+p.line(r,m)+p.line(r,v)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(s,m)+A+A+A+A+A+p.line(s,m)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).xArrj.push(r+b*y),C.xArrjF.push(Math.abs(s-r-n*y)),C.xArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;a2&&void 0!==arguments[2])||arguments[2]?e:null;return null!=t&&(i=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(t,e,i){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?e:null;return null!=t&&(a=e-t/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(t,e,i,a,s,r){var n=this,l=this.w,h=[],c=function(a,s){var l;h.push((o(l={},t,"x"===t?n.getXForValue(a,e,!1):n.getYForValue(a,i,r,!1)),o(l,"attrs",s),l))};if(l.globals.seriesGoals[a]&&l.globals.seriesGoals[a][s]&&Array.isArray(l.globals.seriesGoals[a][s])&&l.globals.seriesGoals[a][s].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,g={strokeHeight:"x"===t?0:l.globals.markers.size[a],strokeWidth:"x"===t?l.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[a])?d[a][0]:d[a]};c(l.globals.seriesRangeStart[a][s],g),c(l.globals.seriesRangeEnd[a][s],u(u({},g),{},{strokeColor:Array.isArray(d[a])?d[a][1]:d[a]}))}return h}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,a=t.goalX,s=t.goalY,r=t.barWidth,n=t.barHeight,o=new Mi(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var h=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach((function(t){if(t.x>=-1&&t.x<=o.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:n/2,a=i+e+n/2;h=o.drawLine(t.x,a-2*e,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(h)}})):Array.isArray(s)&&s.forEach((function(t){if(t.y>=-1&&t.y<=o.w.globals.gridHeight+1){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:r/2,a=e+i+r/2;h=o.drawLine(a-2*i,t.y,a,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(h)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,i=t.currPaths,a=t.color,s=this.w,r=e.x,n=e.x1,o=e.barYPosition,l=i.x,h=i.x1,c=i.barYPosition,d=o+i.barHeight,u=new Mi(this.barCtx.ctx),g=new v,p=u.move(n,d)+u.line(r,d)+u.line(l,c)+u.line(h,c)+u.line(n,d)+("around"===s.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return u.drawPath({d:p,fill:g.shadeColor(.5,v.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,i=t.i,a=t.j,s=this.w,r=0,n=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map((function(t,e){return e})):(null===(e=s.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=s.globals.seriesPercent[t][a];e&&r++,t-1})),a=this.barCtx.columnGroupIndices,s=a.indexOf(i);return s<0&&(a.push(i),s=a.length-1),{groupIndex:i,columnGroupIndex:s}}}]),t}(),Pa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w;var s=this.w;this.barOptions=s.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=s.config.stroke.width,this.isNullValue=!1,this.isRangeBar=s.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!s.globals.isBarHorizontal&&s.globals.seriesRange.length&&s.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=a,null!==this.xyRatios&&(this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.invertedXRatio=a.invertedXRatio,this.invertedYRatio=a.invertedYRatio,this.baseLineY=a.baseLineY,this.baseLineInvertedY=a.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var r=new Zi(this.ctx);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var n=r.getBarSeriesIndices(),o=new Pi(this.ctx);this.stackedSeriesTotals=o.getStackedSeriesTotals(this.w.config.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}))),this.barHelpers=new Ma(this)}return s(t,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=new Pi(this.ctx,i);t=s.getLogSeries(t),this.series=t,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var n=0,o=0;n0&&(this.visibleI=this.visibleI+1);var w=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[b],this.translationsIndex=b);var A=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var C=this.barHelpers.initialPositions();p=C.y,w=C.barHeight,h=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,l=C.xDivision,c=C.zeroH,this.isHorizontal||x.push(g+k/2);var S=a.group({class:"apexcharts-datalabels","data:realIndex":b});i.globals.delayedElements.push({el:S.node}),S.node.classList.add("apexcharts-element-hidden");var L=a.group({class:"apexcharts-bar-goals-markers"}),M=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");for(var P=0;P0){var R=this.barHelpers.drawBarShadow({color:"string"==typeof X&&-1===(null==X?void 0:X.indexOf("url"))?X:v.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});if(M.add(R),i.config.chart.dropShadow.enabled)new Li(this.ctx).dropShadow(R,i.config.chart.dropShadow,b)}this.pathArr.push(T);var Y=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:w,barWidth:k});Y&&L.add(Y),p=T.y,g=T.x,P>0&&x.push(g+k/2),f.push(p),this.renderSeries({realIndex:b,pathFill:X,j:P,i:n,columnGroupIndex:m,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:I,elSeries:y,x:g,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:w),barWidth:Math.abs(T.barWidth?T.barWidth:k),elDataLabelsWrap:S,elGoalsMarkers:L,elBarShadows:M,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[b]=x,i.globals.seriesYvalues[b]=f,r.add(y)}return r}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,a=t.lineFill,s=t.j,r=t.i,n=t.columnGroupIndex,o=t.pathFrom,l=t.pathTo,h=t.strokeWidth,c=t.elSeries,d=t.x,u=t.y,g=t.y1,p=t.y2,f=t.series,x=t.barHeight,b=t.barWidth,m=t.barXPosition,v=t.barYPosition,y=t.elDataLabelsWrap,w=t.elGoalsMarkers,k=t.elBarShadows,A=t.visibleSeries,C=t.type,S=t.classes,L=this.w,M=new Mi(this.ctx);if(!a){var P="function"==typeof L.globals.stroke.colors[e]?function(t){var e,i=L.config.stroke.colors;return Array.isArray(i)&&i.length>0&&((e=i[t])||(e=""),"function"==typeof e)?e({value:L.globals.series[t][s],dataPointIndex:s,w:L}):e}(e):L.globals.stroke.colors[e];a=this.barOptions.distributed?L.globals.stroke.colors[s]:P}L.config.series[r].data[s]&&L.config.series[r].data[s].strokeColor&&(a=L.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var I=s/L.config.chart.animations.animateGradually.delay*(L.config.chart.animations.speed/L.globals.dataPoints)/2.4,T=M.renderPaths({i:r,j:s,realIndex:e,pathFrom:o,pathTo:l,stroke:a,strokeWidth:h,strokeLineCap:L.config.stroke.lineCap,fill:i,animationDelay:I,initialSpeed:L.config.chart.animations.speed,dataChangeSpeed:L.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(C,"-area ").concat(S),chartType:C});T.attr("clip-path","url(#gridRectBarMask".concat(L.globals.cuid,")"));var z=L.config.forecastDataPoints;z.count>0&&s>=L.globals.dataPoints-z.count&&(T.node.setAttribute("stroke-dasharray",z.dashArray),T.node.setAttribute("stroke-width",z.strokeWidth),T.node.setAttribute("fill-opacity",z.fillOpacity)),void 0!==g&&void 0!==p&&(T.attr("data-range-y1",g),T.attr("data-range-y2",p)),new Li(this.ctx).setSelectionFilter(T,e,s),c.add(T);var X=new La(this).handleBarDataLabels({x:d,y:u,y1:g,y2:p,i:r,j:s,series:f,realIndex:e,columnGroupIndex:n,barHeight:x,barWidth:b,barXPosition:m,barYPosition:v,renderedPath:T,visibleSeries:A});return null!==X.dataLabels&&y.add(X.dataLabels),X.totalDataLabels&&y.add(X.totalDataLabels),c.add(y),w&&c.add(w),k&&c.add(k),c}},{key:"drawBarPaths",value:function(t){var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.yDivision,h=t.elSeries,c=this.w,d=i.i,u=i.j;if(c.globals.isXNumeric)e=(o=(c.globals.seriesX[d][u]-c.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var g=0,p=0;c.globals.seriesPercent.forEach((function(t,e){t[u]&&g++,e0&&(a=this.seriesLen*a/g),e=o+a*this.visibleI,e-=a*p}else e=o+a*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[d][u],r)-r)/2),n=this.barHelpers.getXForValue(this.series[d][u],r);var f=this.barHelpers.getBarpaths({barYPosition:e,barHeight:a,x1:r,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:d,j:u,w:c});return c.globals.isXNumeric||(o+=l),this.barHelpers.barBackground({j:u,i:d,y1:e-a*this.visibleI,y2:a*this.seriesLen,elSeries:h}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x1:r,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",r,null,d,u),barYPosition:e,barHeight:a}}},{key:"drawColumnPaths",value:function(t){var e,i=t.indexes,a=t.x,s=t.y,r=t.xDivision,n=t.barWidth,o=t.zeroH,l=t.strokeWidth,h=t.elSeries,c=this.w,d=i.realIndex,u=i.translationsIndex,g=i.i,p=i.j,f=i.bc;if(c.globals.isXNumeric){var x=this.getBarXForNumericXAxis({x:a,j:p,realIndex:d,barWidth:n});a=x.x,e=x.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var b=this.barHelpers.getZeroValueEncounters({i:g,j:p}),m=b.nonZeroColumns,v=b.zeroEncounters;m>0&&(n=this.seriesLen*n/m),e=a+n*this.visibleI,e-=n*v}else e=a+n*this.visibleI;s=this.barHelpers.getYForValue(this.series[g][p],o,u);var y=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:n,y1:o,y2:s,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:d,i:g,j:p,w:c});return c.globals.isXNumeric||(a+=r),this.barHelpers.barBackground({bc:f,j:p,i:g,x1:e-l/2-n*this.visibleI,x2:n*this.seriesLen+l/2,elSeries:h}),{pathTo:y.pathTo,pathFrom:y.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,g,p,u),barXPosition:e,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,i=t.barWidth,a=t.realIndex,s=t.j,r=this.w,n=a;return r.globals.seriesX[a].length||(n=r.globals.maxValsInArrayIndex),v.isNumber(r.globals.seriesX[n][s])&&(e=(r.globals.seriesX[n][s]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:e+i*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var i,a=this.w,s=0;s0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==a.globals.previousPaths[s].paths[e]&&(i=a.globals.previousPaths[s].paths[e].d)}return i}}]),t}(),Ia=function(t){h(a,t);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this,a=this.w;this.graphics=new Mi(this.ctx),this.bar=new Pa(this.ctx,this.xyRatios);var s=new Pi(this.ctx,a);t=s.getLogSeries(t),this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===a.config.chart.stackType&&(t=a.globals.comboCharts?e.map((function(t){return a.globals.seriesPercent[t]})):a.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);for(var r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),n=0,o=0,l=function(s,l){var h=void 0,c=void 0,d=void 0,g=void 0,p=a.globals.comboCharts?e[s]:s,f=i.barHelpers.getGroupIndex(p),x=f.groupIndex,b=f.columnGroupIndex;i.groupCtx=i[a.globals.seriesGroups[x]];var m=[],y=[],w=0;i.yRatio.length>1&&(i.yaxisIndex=a.globals.seriesYAxisReverseMap[p][0],w=p),i.isReversed=a.config.yaxis[i.yaxisIndex]&&a.config.yaxis[i.yaxisIndex].reversed;var k=i.graphics.group({class:"apexcharts-series",seriesName:v.escapeString(a.globals.seriesNames[p]),rel:s+1,"data:realIndex":p});i.ctx.series.addCollapsedClassToSeries(k,p);var A=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),C=i.graphics.group({class:"apexcharts-bar-goals-markers"}),S=0,L=0,M=i.initialPositions(n,o,h,c,d,g,w);o=M.y,S=M.barHeight,c=M.yDivision,g=M.zeroW,n=M.x,L=M.barWidth,h=M.xDivision,d=M.zeroH,a.globals.barHeight=S,a.globals.barWidth=L,i.barHelpers.initializeStackedXYVars(i),1===i.groupCtx.prevY.length&&i.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(i.groupCtx.prevY[0]=i.groupCtx.prevY[0].map((function(){return d})),i.groupCtx.prevYF[0]=i.groupCtx.prevYF[0].map((function(){return 0})));for(var P=0;P0||"top"===i.barHelpers.arrBorderRadius[p][P]&&a.globals.series[p][P]<0)&&(Y=E),k=i.renderSeries({realIndex:p,pathFill:R,j:P,i:s,columnGroupIndex:b,pathFrom:z.pathFrom,pathTo:z.pathTo,strokeWidth:I,elSeries:k,x:n,y:o,series:t,barHeight:S,barWidth:L,elDataLabelsWrap:A,elGoalsMarkers:C,type:"bar",visibleSeries:b,classes:Y})}a.globals.seriesXvalues[p]=m,a.globals.seriesYvalues[p]=y,i.groupCtx.prevY.push(i.groupCtx.yArrj),i.groupCtx.prevYF.push(i.groupCtx.yArrjF),i.groupCtx.prevYVal.push(i.groupCtx.yArrjVal),i.groupCtx.prevX.push(i.groupCtx.xArrj),i.groupCtx.prevXF.push(i.groupCtx.xArrjF),i.groupCtx.prevXVal.push(i.groupCtx.xArrjVal),r.add(k)},h=0,c=0;h1?l=(i=h.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(d).indexOf("%")?l=parseInt(d,10):l*=parseInt(d,10)/100,s=this.isReversed?this.baseLineY[n]:h.globals.gridHeight-this.baseLineY[n],t=h.globals.padHorizontal+(i-l)/2}var u=h.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:i,barHeight:o/u,barWidth:l/u,zeroH:s,zeroW:r}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.columnGroupIndex,h=t.seriesGroup,c=t.yDivision,d=t.elSeries,u=this.w,g=o+l*a,p=i.i,f=i.j,x=i.realIndex,b=i.translationsIndex,m=0,v=0;v0){var w=r;this.groupCtx.prevXVal[y-1][f]<0?w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[y-1][f]:this.groupCtx.prevXVal[y-1][f]>=0&&(w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]:this.groupCtx.prevX[y-1][f]-m+2*(this.isReversed?m:0)),e=w}else e=r;n=null===this.series[p][f]?e:e+this.series[p][f]/this.invertedYRatio-2*(this.isReversed?this.series[p][f]/this.invertedYRatio:0);var k=this.barHelpers.getBarpaths({barYPosition:g,barHeight:a,x1:e,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,seriesGroup:h,i:p,j:f,w:u});return this.barHelpers.barBackground({j:f,i:p,y1:g,y2:a,elSeries:d}),o+=c,{pathTo:k.pathTo,pathFrom:k.pathFrom,goalX:this.barHelpers.getGoalValues("x",r,null,p,f,b),barXPosition:e,barYPosition:g,x:n,y:o}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,r=t.barWidth,n=t.zeroH,o=t.columnGroupIndex,l=t.seriesGroup,h=t.elSeries,c=this.w,d=e.i,u=e.j,g=e.bc,p=e.realIndex,f=e.translationsIndex;if(c.globals.isXNumeric){var x=c.globals.seriesX[p][u];x||(x=0),i=(x-c.globals.minX)/this.xRatio-r/2*c.globals.barGroups.length}for(var b,m=i+o*r,v=0,y=0;y0&&!c.globals.isXNumeric||w>0&&c.globals.isXNumeric&&c.globals.seriesX[p-1][u]===c.globals.seriesX[p][u]){var k,A,C,S=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var L=1;L=0?C-v+2*(this.isReversed?v:0):C;break}if((null===(T=this.groupCtx.prevYVal[w-P])||void 0===T?void 0:T[u])>=0){A=this.series[d][u]>=0?C:C+v-2*(this.isReversed?v:0);break}}void 0===A&&(A=c.globals.gridHeight),b=null!==(k=this.groupCtx.prevYF[0])&&void 0!==k&&k.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?n:A}else b=n;a=this.series[d][u]?b-this.series[d][u]/this.yRatio[f]+2*(this.isReversed?this.series[d][u]/this.yRatio[f]:0):b;var z=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:r,y1:b,y2:a,yRatio:this.yRatio[f],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:d,j:u,w:c});return this.barHelpers.barBackground({bc:g,j:u,i:d,x1:m,x2:r,elSeries:h}),{pathTo:z.pathTo,pathFrom:z.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,n,d,u),barXPosition:m,x:c.globals.isXNumeric?i:i+s,y:a}}}]),a}(Pa),Ta=function(t){h(a,t);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e,i){var a=this,s=this.w,r=new Mi(this.ctx),n=s.globals.comboCharts?e:s.config.chart.type,o=new ji(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=s.config.plotOptions.bar.horizontal;var l=new Pi(this.ctx,s);t=l.getLogSeries(t),this.series=t,this.yRatio=l.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var h=r.group({class:"apexcharts-".concat(n,"-series apexcharts-plot-series")}),c=function(e){a.isBoxPlot="boxPlot"===s.config.chart.type||"boxPlot"===s.config.series[e].type;var n,l,c,d,g=void 0,p=void 0,f=[],x=[],b=s.globals.comboCharts?i[e]:e,m=a.barHelpers.getGroupIndex(b).columnGroupIndex,y=r.group({class:"apexcharts-series",seriesName:v.escapeString(s.globals.seriesNames[b]),rel:e+1,"data:realIndex":b});a.ctx.series.addCollapsedClassToSeries(y,b),t[e].length>0&&(a.visibleI=a.visibleI+1);var w,k,A=0;a.yRatio.length>1&&(a.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],A=b);var C=a.barHelpers.initialPositions();p=C.y,w=C.barHeight,l=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,n=C.xDivision,c=C.zeroH,x.push(g+k/2);for(var S=r.group({class:"apexcharts-datalabels","data:realIndex":b}),L=r.group({class:"apexcharts-bar-goals-markers"}),M=function(i){var r=a.barHelpers.getStrokeWidth(e,i,b),h=null,v={indexes:{i:e,j:i,realIndex:b,translationsIndex:A},x:g,y:p,strokeWidth:r,elSeries:y};h=a.isHorizontal?a.drawHorizontalBoxPaths(u(u({},v),{},{yDivision:l,barHeight:w,zeroW:d})):a.drawVerticalBoxPaths(u(u({},v),{},{xDivision:n,barWidth:k,zeroH:c})),p=h.y,g=h.x;var C=a.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:h.barYPosition,goalX:h.goalX,goalY:h.goalY,barHeight:w,barWidth:k});C&&L.add(C),i>0&&x.push(g+k/2),f.push(p),h.pathTo.forEach((function(n,l){var c=!a.isBoxPlot&&a.candlestickOptions.wick.useFillColor?h.color[l]:s.globals.stroke.colors[e],d=o.fillPath({seriesNumber:b,dataPointIndex:i,color:h.color[l],value:t[e][i]});a.renderSeries({realIndex:b,pathFill:d,lineFill:c,j:i,i:e,pathFrom:h.pathFrom,pathTo:n,strokeWidth:r,elSeries:y,x:g,y:p,series:t,columnGroupIndex:m,barHeight:w,barWidth:k,elDataLabelsWrap:S,elGoalsMarkers:L,visibleSeries:a.visibleI,type:s.config.chart.type})}))},P=0;Pb.c&&(d=!1);var y=Math.min(b.o,b.c),w=Math.max(b.o,b.c),k=b.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[u][c]-o.globals.minX)/this.xRatio-s/2);var A=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(y=r,w=r):(y=r-y/x,w=r-w/x,m=r-b.h/x,v=r-b.l/x,k=r-b.m/x);var C=l.move(A,r),S=l.move(A+s/2,y);return o.globals.previousPaths.length>0&&(S=this.getPreviousPath(u,c,!0)),C=this.isBoxPlot?[l.move(A,y)+l.line(A+s/2,y)+l.line(A+s/2,m)+l.line(A+s/4,m)+l.line(A+s-s/4,m)+l.line(A+s/2,m)+l.line(A+s/2,y)+l.line(A+s,y)+l.line(A+s,k)+l.line(A,k)+l.line(A,y+n/2),l.move(A,k)+l.line(A+s,k)+l.line(A+s,w)+l.line(A+s/2,w)+l.line(A+s/2,v)+l.line(A+s-s/4,v)+l.line(A+s/4,v)+l.line(A+s/2,v)+l.line(A+s/2,w)+l.line(A,w)+l.line(A,k)+"z"]:[l.move(A,w)+l.line(A+s/2,w)+l.line(A+s/2,m)+l.line(A+s/2,w)+l.line(A+s,w)+l.line(A+s,y)+l.line(A+s/2,y)+l.line(A+s/2,v)+l.line(A+s/2,y)+l.line(A,y)+l.line(A,w-n/2)],S+=l.move(A,y),o.globals.isXNumeric||(i+=a),{pathTo:C,pathFrom:S,x:i,y:w,goalY:this.barHelpers.getGoalValues("y",null,r,h,c,e.translationsIndex),barXPosition:A,color:this.isBoxPlot?f:d?[g]:[p]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var i=t.y,a=t.yDivision,s=t.barHeight,r=t.zeroW,n=t.strokeWidth,o=this.w,l=new Mi(this.ctx),h=e.i,c=e.j,d=this.boxOptions.colors.lower;this.isBoxPlot&&(d=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,g=e.realIndex,p=this.getOHLCValue(g,c),f=r,x=r,b=Math.min(p.o,p.c),m=Math.max(p.o,p.c),v=p.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[g][c]-o.globals.minX)/this.invertedXRatio-s/2);var y=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(b=r,m=r):(b=r+b/u,m=r+m/u,f=r+p.h/u,x=r+p.l/u,v=r+p.m/u);var w=l.move(r,y),k=l.move(b,y+s/2);return o.globals.previousPaths.length>0&&(k=this.getPreviousPath(g,c,!0)),w=[l.move(b,y)+l.line(b,y+s/2)+l.line(f,y+s/2)+l.line(f,y+s/2-s/4)+l.line(f,y+s/2+s/4)+l.line(f,y+s/2)+l.line(b,y+s/2)+l.line(b,y+s)+l.line(v,y+s)+l.line(v,y)+l.line(b+n/2,y),l.move(v,y)+l.line(v,y+s)+l.line(m,y+s)+l.line(m,y+s/2)+l.line(x,y+s/2)+l.line(x,y+s-s/4)+l.line(x,y+s/4)+l.line(x,y+s/2)+l.line(m,y+s/2)+l.line(m,y)+l.line(v,y)+"z"],k+=l.move(b,y),o.globals.isXNumeric||(i+=a),{pathTo:w,pathFrom:k,x:m,y:i,goalX:this.barHelpers.getGoalValues("x",r,null,h,c),barYPosition:y,color:d}}},{key:"getOHLCValue",value:function(t,e){var i=this.w,a=new Pi(this.ctx,i),s=a.getLogValAtSeriesIndex(i.globals.seriesCandleH[t][e],t),r=a.getLogValAtSeriesIndex(i.globals.seriesCandleO[t][e],t),n=a.getLogValAtSeriesIndex(i.globals.seriesCandleM[t][e],t),o=a.getLogValAtSeriesIndex(i.globals.seriesCandleC[t][e],t),l=a.getLogValAtSeriesIndex(i.globals.seriesCandleL[t][e],t);return{o:this.isBoxPlot?s:r,h:this.isBoxPlot?r:s,m:n,l:this.isBoxPlot?o:l,c:this.isBoxPlot?l:o}}}]),a}(Pa),za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,a){var s=this.w,r=1,n=s.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,i);s.globals.hasNegs||a?r=s.config.plotOptions[t].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):(1-o.percent/100)*(1.25*n):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(r=1-o.percent/100,"treemap"===t&&(r=(1-o.percent/100)*(1.25*n)));var l=o.color,h=new v;if(s.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var c=h.shadeColor(-1*r,o.color);l=v.hexToRgba(v.isColorHex(c)?c:v.rgb2hex(c),s.config.fill.opacity)}else{var d=h.shadeColor(r,o.color);l=v.hexToRgba(v.isColorHex(d)?d:v.rgb2hex(d),s.config.fill.opacity)}return{color:l,colorProps:o}}},{key:"determineColor",value:function(t,e,i){var a=this.w,s=a.globals.series[e][i],r=a.config.plotOptions[t],n=r.colorScale.inverse?i:e;r.distributed&&"treemap"===a.config.chart.type&&(n=i);var o=a.globals.colors[n],l=null,h=Math.min.apply(Math,f(a.globals.series[e])),c=Math.max.apply(Math,f(a.globals.series[e]));r.distributed||"heatmap"!==t||(h=a.globals.minY,c=a.globals.maxY),void 0!==r.colorScale.min&&(h=r.colorScale.mina.globals.maxY?r.colorScale.max:a.globals.maxY);var d=Math.abs(c)+Math.abs(h),u=100*s/(0===d?d-1e-6:d);r.colorScale.ranges.length>0&&r.colorScale.ranges.map((function(t,e){if(s>=t.from&&s<=t.to){o=t.color,l=t.foreColor?t.foreColor:null,h=t.from,c=t.to;var i=Math.abs(c)+Math.abs(h);u=100*s/(0===i?i-1e-6:i)}}));return{color:o,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,a=t.y,s=t.i,r=t.j,n=t.colorProps,o=t.fontSize,l=this.w.config.dataLabels,h=new Mi(this.ctx),c=new qi(this.ctx),d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});var u=l.offsetX,g=l.offsetY,p=i+u,f=a+parseFloat(l.style.fontSize)/3+g;c.plotDataLabelsText({x:p,y:f,text:e,i:s,j:r,color:n.foreColor,parent:d,fontSize:o,dataLabelsConfig:l})}return d}},{key:"addListeners",value:function(t){var e=new Mi(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),Xa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w,this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new za(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return s(t,[{key:"draw",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var s=e.globals.gridWidth/e.globals.dataPoints,r=e.globals.gridHeight/e.globals.series.length,n=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var h=o?0:l.length-1;o?h=0;o?h++:h--){var c=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:v.escapeString(e.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(this.ctx.series.addCollapsedClassToSeries(c,h),e.config.chart.dropShadow.enabled){var d=e.config.chart.dropShadow;new Li(this.ctx).dropShadow(c,d,h)}for(var u=0,g=e.config.plotOptions.heatmap.shadeIntensity,p=0;p-1&&this.pieClicked(d),i.config.dataLabels.enabled){var w=m.x,k=m.y,A=100*g/this.fullAngle+"%";if(0!==g&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(h=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(h)>this.fullAngle&&(h-=this.fullAngle);var c=Math.PI*(h-90)/180,d=i.centerX+r*Math.cos(l),u=i.centerY+r*Math.sin(l),g=i.centerX+r*Math.cos(c),p=i.centerY+r*Math.sin(c),f=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,h),x=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),b=s>180?1:0,m=["M",d,u,"A",r,r,0,b,1,g,p];return e="donut"===i.chartType?[].concat(m,["L",f.x,f.y,"A",i.donutSize,i.donutSize,0,b,0,x.x,x.y,"L",d,u,"z"]).join(" "):"pie"===i.chartType||"polarArea"===i.chartType?[].concat(m,["L",i.centerX,i.centerY,"L",d,u]).join(" "):[].concat(m).join(" "),n.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new ta(this.ctx),a=new Mi(this.ctx),s=new Ra(this.ctx),r=a.group(),n=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),h=o.result.length;this.maxY=o.niceMax;for(var c=e.globals.radialSize,d=c/(h-1),u=0;u1&&t.total.show&&(s=t.total.color);var n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,r),a||"function"!=typeof t.total.formatter||(i=t.total.formatter(r));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,r):"",null!==n&&(n.textContent=e),null!==o&&(o.textContent=i),null!==n&&(n.style.fill=s)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,a=t.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,s,a,t);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,a=new Mi(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(0!==s.strokeWidth){for(var r=[],n=360/i.globals.series.length,o=0;o0&&(f=e.getPreviousPath(n));for(var x=0;x=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?s-=10:t.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,a=0;a0&&parseInt(s.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[a].paths[0]&&(i=e.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var a=[],s=0;s=360&&(u=360-Math.abs(this.startAngle)-.1);var g=i.drawPath({d:"",stroke:c,strokeWidth:n*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){var p=h.dropShadow;s.dropShadow(g,p)}l.add(g),g.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(g,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:d,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return a}},{key:"drawArcs",value:function(t){var e=this.w,i=new Mi(this.ctx),a=new ji(this.ctx),s=new Li(this.ctx),r=i.group(),n=this.getStrokeWidth(t);t.size=t.size-n/2;var o=e.config.plotOptions.radialBar.hollow.background,l=t.size-n*t.series.length-this.margin*t.series.length-n*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(t,r,l,o));var c=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:o||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var d=e.config.plotOptions.radialBar.hollow.dropShadow;s.dropShadow(c,d)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var g=null;if(this.radialDataLabels.show){var p=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");g=this.renderInnerDataLabels(p,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})}"back"===e.config.plotOptions.radialBar.hollow.position&&(r.add(c),g&&r.add(g));var f=!1;e.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var x=f?t.series.length-1:0;f?x>=0:x100?100:t.series[x])/100,A=Math.round(this.totalAngle*k)+this.startAngle,C=void 0;e.globals.dataChanged&&(w=this.startAngle,C=Math.round(this.totalAngle*v.negToZero(e.globals.previousPaths[x])/100)+w),Math.abs(A)+Math.abs(y)>360&&(A-=.01),Math.abs(C)+Math.abs(w)>360&&(C-=.01);var S=A-y,L=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[x]:e.config.stroke.dashArray,M=i.drawPath({d:"",stroke:m,strokeWidth:n,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+x,strokeDashArray:L});if(Mi.setAttrs(M.node,{"data:angle":S,"data:value":t.series[x]}),e.config.chart.dropShadow.enabled){var P=e.config.chart.dropShadow;s.dropShadow(M,P,x)}if(s.setSelectionFilter(M,0,x),this.addListeners(M,this.radialDataLabels),b.add(M),M.attr({index:0,j:x}),this.barLabels.enabled){var I=v.polarToCartesian(t.centerX,t.centerY,t.size,y),T=this.barLabels.formatter(e.globals.seriesNames[x],{seriesIndex:x,w:e}),z=["apexcharts-radialbar-label"];this.barLabels.onClick||z.push("apexcharts-no-click");var X=this.barLabels.useSeriesColors?e.globals.colors[x]:e.config.chart.foreColor;X||(X=e.config.chart.foreColor);var R=I.x+this.barLabels.offsetX,Y=I.y+this.barLabels.offsetY,E=i.drawText({x:R,y:Y,text:T,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:X,cssClass:z.join(" ")});E.on("click",this.onBarLabelClick),E.attr({rel:x+1}),0!==y&&E.attr({"transform-origin":"".concat(R," ").concat(Y),transform:"rotate(".concat(y," 0 0)")}),b.add(E)}var H=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(H=e.config.chart.animations.speed),e.globals.dataChanged&&(H=e.config.chart.animations.dynamicAnimation.speed),this.animDur=H/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(M,{centerX:t.centerX,centerY:t.centerY,endAngle:A,startAngle:y,prevEndAngle:C,prevStartAngle:w,size:t.size,i:x,totalItems:2,animBeginArr:this.animBeginArr,dur:H,shouldSetPrevPaths:!0})}return{g:r,elHollow:c,dataLabels:g}}},{key:"drawHollow",value:function(t){var e=new Mi(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,a){var s=this.w,r=new ji(this.ctx),n=v.randomId(),o=s.config.plotOptions.radialBar.hollow.image;if(s.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:o,patternID:"pattern".concat(s.globals.cuid).concat(n)}),a="url(#pattern".concat(s.globals.cuid).concat(n,")");else{var l=s.config.plotOptions.radialBar.hollow.imageWidth,h=s.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===h){var c=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-e.width/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+s.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(c)}else{var d=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-l/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-h/2+s.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,h)}));e.add(d)}}return a}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,i=this.barLabels.onClick,a=this.w;i&&i(a.globals.seriesNames[e],{w:a,seriesIndex:e})}}]),r}(Ya),Oa=function(t){h(a,t);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var s=a.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),r=0;r0&&(this.visibleI=this.visibleI+1);var x=0,b=0,m=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[g][0],m=g);var y=this.barHelpers.initialPositions();d=y.y,h=y.zeroW,c=y.x,b=y.barWidth,x=y.barHeight,n=y.xDivision,o=y.yDivision,l=y.zeroH;for(var w=a.group({class:"apexcharts-datalabels","data:realIndex":g}),k=a.group({class:"apexcharts-rangebar-goals-markers"}),A=0;A0}));return this.isHorizontal?(a=u.config.plotOptions.bar.rangeBarGroupRows?r+h*b:r+o*this.visibleI+h*b,m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(a=(o=d.barHeight/g.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+g.indexOf(p))+h*b)):(b>-1&&!u.globals.timescaleLabels.length&&(s=u.config.plotOptions.bar.rangeBarGroupRows?n+c*b:n+l*this.visibleI+c*b),m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(s=(l=d.barWidth/g.length)*this.visibleI+c*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+g.indexOf(p))+c*b)),{barYPosition:a,barXPosition:s,barHeight:o,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.xDivision,s=t.barWidth,r=t.barXPosition,n=t.zeroH,o=this.w,l=e.i,h=e.j,c=e.realIndex,d=e.translationsIndex,u=this.yRatio[d],g=this.getRangeValue(c,h),p=Math.min(g.start,g.end),f=Math.max(g.start,g.end);void 0===this.series[l][h]||null===this.series[l][h]?p=n:(p=n-p/u,f=n-f/u);var x=Math.abs(f-p),b=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:s,y1:p,y2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:c,i:c,j:h,w:o});if(o.globals.isXNumeric){var m=this.getBarXForNumericXAxis({x:i,j:h,realIndex:c,barWidth:s});i=m.x,r=m.barXPosition}else i+=a;return{pathTo:b.pathTo,pathFrom:b.pathFrom,barHeight:x,x:i,y:g.start<0&&g.end<0?p:f,goalY:this.barHelpers.getGoalValues("y",null,n,l,h,d),barXPosition:r}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,a=t.y1,s=t.y2,r=t.yDivision,n=t.barHeight,o=t.barYPosition,l=t.zeroW,h=this.w,c=e.realIndex,d=e.j,u=this.preventBarOverflow(l+a/this.invertedYRatio),g=this.preventBarOverflow(l+s/this.invertedYRatio),p=this.getRangeValue(c,d),f=Math.abs(g-u),x=this.barHelpers.getBarpaths({barYPosition:o,barHeight:n,x1:u,x2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:c,realIndex:c,j:d,w:h});return h.globals.isXNumeric||(i+=r),{pathTo:x.pathTo,pathFrom:x.pathFrom,barWidth:f,x:p.start<0&&p.end<0?u:g,goalX:this.barHelpers.getGoalValues("x",l,null,c,d),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}}]),a}(Pa),Fa=function(){function t(e){i(this,t),this.w=e.w,this.lineCtx=e}return s(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new Pi(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,a=t.x,s=t.y,r=t.i,n=t.j,o=t.prevY,l=this.w,h=[],c=[];if(0===n){var d=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(d=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),h.push(d),c.push(v.isNumber(e[r][0])?o+l.config.markers.offsetY:null),h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null)}else h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null);return{x:h,y:c}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,a=t.realIndex,s=this.w,r=0;r0&&parseInt(n.realIndex,10)===parseInt(a,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,e=s.globals.previousPaths[r].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[r].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[r].paths[1]&&(e=s.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e,i,a,s=t.i,r=t.realIndex,n=t.series,o=t.prevY,l=t.lineYPosition,h=t.translationsIndex,c=this.w,d=c.config.chart.stacked&&!c.globals.comboCharts||c.config.chart.stacked&&c.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[r])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[r])||void 0===i?void 0:i.type));if(void 0!==(null===(a=n[s])||void 0===a?void 0:a[0]))o=(l=d&&s>0?this.lineCtx.prevSeriesY[s-1][0]:this.lineCtx.zeroY)-n[s][0]/this.lineCtx.yRatio[h]+2*(this.lineCtx.isReversed?n[s][0]/this.lineCtx.yRatio[h]:0);else if(d&&s>0&&void 0===n[s][0])for(var u=s-1;u>=0;u--)if(null!==n[u][0]&&void 0!==n[u][0]){o=l=this.lineCtx.prevSeriesY[u][0];break}return{prevY:o,lineYPosition:l}}}]),t}(),Da=function(t){for(var e,i,a,s,r=function(t){for(var e=[],i=t[0],a=t[1],s=e[0]=Wa(i,a),r=1,n=t.length-1;r9&&(s=3*a/Math.sqrt(s),r[l]=s*e,r[l+1]=s*i);for(var h=0;h<=n;h++)s=(t[Math.min(n,h+1)][0]-t[Math.max(0,h-1)][0])/(6*(1+r[h]*r[h])),o.push([s||0,r[h]*s||0]);return o},_a=function(t){var e=Da(t),i=t[1],a=t[0],s=[],r=e[1],n=e[0];s.push(a,[a[0]+n[0],a[1]+n[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(var o=2,l=e.length;o1&&a[1].length<6){var s=a[0].length;a[1]=[2*a[0][s-2]-a[0][s-4],2*a[0][s-1]-a[0][s-3]].concat(a[1])}a[0]=a[0].slice(-2)}return a};function Wa(t,e){return(e[1]-t[1])/(e[0]-t[0])}var Ba=function(){function t(e,a,s){i(this,t),this.ctx=e,this.w=e.w,this.xyRatios=a,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||s,this.scatter=new Ui(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Fa(this),this.markers=new Vi(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return s(t,[{key:"draw",value:function(t,e,i,a){var s,r=this.w,n=new Mi(this.ctx),o=r.globals.comboCharts?e:r.config.chart.type,l=n.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),h=new Pi(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=h.getLogSeries(t),this.yRatio=h.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var c=[],d=0;d1?g:0;this._initSerieVariables(t,d,g);var f=[],x=[],b=[],m=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,g),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(m=(r.globals.seriesX[g][0]-r.globals.minX)/this.xRatio),b.push(m);var v,y=m,w=void 0,k=y,A=this.zeroY,C=this.zeroY;A=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:t,prevY:A,lineYPosition:0,translationsIndex:p}).prevY,"monotoneCubic"===r.config.stroke.curve&&null===t[d][0]?f.push(null):f.push(A),v=A;"rangeArea"===o&&(w=C=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:a,prevY:C,lineYPosition:0,translationsIndex:p}).prevY,x.push(null!==f[0]?C:null));var S=this._calculatePathsFrom({type:o,series:t,i:d,realIndex:g,translationsIndex:p,prevX:k,prevY:A,prevY2:C}),L=[f[0]],M=[x[0]],P={type:o,series:t,realIndex:g,translationsIndex:p,i:d,x:m,y:1,pX:y,pY:v,pathsFrom:S,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:b,yArrj:f,y2Arrj:x,seriesRangeEnd:a},I=this._iterateOverDataPoints(u(u({},P),{},{iterations:"rangeArea"===o?t[d].length-1:void 0,isRangeStart:!0}));if("rangeArea"===o){for(var T=this._calculatePathsFrom({series:a,i:d,realIndex:g,prevX:k,prevY:C}),z=this._iterateOverDataPoints(u(u({},P),{},{series:a,xArrj:[m],yArrj:L,y2Arrj:M,pY:w,areaPaths:I.areaPaths,pathsFrom:T,iterations:a[d].length-1,isRangeStart:!1})),X=I.linePaths.length/2,R=0;R=0;Y--)l.add(c[Y]);else for(var E=0;E1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[r]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",zIndex:void 0!==a.config.series[i].zIndex?a.config.series[i].zIndex:i,seriesName:v.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i});var n=t[e].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,a,s,r=t.type,n=t.series,o=t.i,l=t.realIndex,h=t.translationsIndex,c=t.prevX,d=t.prevY,u=t.prevY2,g=this.w,p=new Mi(this.ctx);if(null===n[o][0]){for(var f=0;f0){var x=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:l});a=x.pathFromLine,s=x.pathFromArea}return{prevX:c,prevY:d,linePath:e,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(t){var e=t.type,i=t.realIndex,a=t.i,s=t.paths,r=this.w,n=new Mi(this.ctx),o=new ji(this.ctx);this.prevSeriesY.push(s.yArrj),r.globals.seriesXvalues[i]=s.xArrj,r.globals.seriesYvalues[i]=s.yArrj;var l=r.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var h=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-l.count-1],c=n.drawRect(h,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(c.node);var d=n.drawRect(0,0,h,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(d.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var g={i:a,realIndex:i,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var p=o.fillPath({seriesNumber:i}),f=0;f0&&"rangeArea"!==e){var A=n.renderPaths(w);A.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&A.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(A),A.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),k.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,i,a=this,s=t.type,r=t.series,n=t.iterations,o=t.realIndex,l=t.translationsIndex,h=t.i,c=t.x,d=t.y,u=t.pX,g=t.pY,p=t.pathsFrom,f=t.linePaths,x=t.areaPaths,b=t.seriesIndex,m=t.lineYPosition,y=t.xArrj,w=t.yArrj,k=t.y2Arrj,A=t.isRangeStart,C=t.seriesRangeEnd,S=this.w,L=new Mi(this.ctx),M=this.yRatio,P=p.prevY,I=p.linePath,T=p.areaPath,z=p.pathFromLine,X=p.pathFromArea,R=v.isNumber(S.globals.minYArr[o])?S.globals.minYArr[o]:S.globals.minY;n||(n=S.globals.dataPoints>1?S.globals.dataPoints-1:S.globals.dataPoints);var Y=function(t,e){return e-t/M[l]+2*(a.isReversed?t/M[l]:0)},E=d,H=S.config.chart.stacked&&!S.globals.comboCharts||S.config.chart.stacked&&S.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[o])||void 0===i?void 0:i.type)),O=S.config.stroke.curve;Array.isArray(O)&&(O=Array.isArray(b)?O[b[h]]:O[h]);for(var F,D=0,_=0;_0&&S.globals.collapsedSeries.length0;e--){if(!(S.globals.collapsedSeriesIndices.indexOf((null==b?void 0:b[e])||e)>-1))return e;e--}return 0}(h-1)][_+1]}else m=this.zeroY;else m=this.zeroY;N?d=Y(R,m):(d=Y(r[h][_+1],m),"rangeArea"===s&&(E=Y(C[h][_+1],m))),y.push(c),!N||"smooth"!==S.config.stroke.curve&&"monotoneCubic"!==S.config.stroke.curve?(w.push(d),k.push(E)):(w.push(null),k.push(null));var B=this.lineHelpers.calculatePoints({series:r,x:c,y:d,realIndex:o,i:h,j:_,prevY:P}),G=this._createPaths({type:s,series:r,i:h,realIndex:o,j:_,x:c,y:d,y2:E,xArrj:y,yArrj:w,y2Arrj:k,pX:u,pY:g,pathState:D,segmentStartX:F,linePath:I,areaPath:T,linePaths:f,areaPaths:x,curve:O,isRangeStart:A});x=G.areaPaths,f=G.linePaths,u=G.pX,g=G.pY,D=G.pathState,F=G.segmentStartX,T=G.areaPath,I=G.linePath,!this.appendPathFrom||S.globals.hasNullValues||"monotoneCubic"===O&&"rangeArea"===s||(z+=L.line(c,this.areaBottomY),X+=L.line(c,this.areaBottomY)),this.handleNullDataPoints(r,B,h,_,o),this._handleMarkersAndLabels({type:s,pointsPos:B,i:h,j:_,realIndex:o,isRangeStart:A})}return{yArrj:w,xArrj:y,pathFromArea:X,areaPaths:x,pathFromLine:z,linePaths:f,linePath:I,areaPath:T}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,i=t.pointsPos,a=t.isRangeStart,s=t.i,r=t.j,n=t.realIndex,o=this.w,l=new qi(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var h=this.markers.plotChartMarkers(i,n,r+1);null!==h&&this.elPointsMain.add(h)}var c=l.drawDataLabel({type:e,isRangeStart:a,pos:i,i:n,j:r+1});null!==c&&this.elDataLabelsWrap.add(c)}},{key:"_createPaths",value:function(t){var e=t.type,i=t.series,a=t.i;t.realIndex;var s,r=t.j,n=t.x,o=t.y,l=t.xArrj,h=t.yArrj,c=t.y2,d=t.y2Arrj,u=t.pX,g=t.pY,p=t.pathState,f=t.segmentStartX,x=t.linePath,b=t.areaPath,m=t.linePaths,v=t.areaPaths,y=t.curve,w=t.isRangeStart,k=new Mi(this.ctx),A=this.areaBottomY,C="rangeArea"===e,S="rangeArea"===e&&w;switch(y){case"monotoneCubic":var L=w?h:d;switch(p){case 0:if(null===L[r+1])break;p=1;case 1:if(!(C?l.length===i[a].length:r===i[a].length-2))break;case 2:var M=w?l:l.slice().reverse(),P=w?L:L.slice().reverse(),I=(s=P,M.map((function(t,e){return[t,s[e]]})).filter((function(t){return null!==t[1]}))),T=I.length>1?_a(I):I,z=[];C&&(S?v=I:z=v.reverse());var X=0,R=0;if(function(t,e){for(var i=function(t){var e=[],i=0;return t.forEach((function(t){null!==t?i++:i>0&&(e.push(i),i=0)})),i>0&&e.push(i),e}(t),a=[],s=0,r=0;s4?(e+="C".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]),e+=", ".concat(a[4],", ").concat(a[5])):s>2&&(e+="S".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]))}return e}(t),i=R,a=(R+=t.length)-1;S?x=k.move(I[i][0],I[i][1])+e:C?x=k.move(z[i][0],z[i][1])+k.line(I[i][0],I[i][1])+e+k.line(z[a][0],z[a][1]):(x=k.move(I[i][0],I[i][1])+e,b=x+k.line(I[a][0],A)+k.line(I[i][0],A)+"z",v.push(b)),m.push(x)})),C&&X>1&&!S){var Y=m.slice(X).reverse();m.splice(X),Y.forEach((function(t){return m.push(t)}))}p=0}break;case"smooth":var E=.35*(n-u);if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.curve(n,o,n,o,n,c)+k.move(n,c)),b+=k.curve(n,o,n,o,n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o;break;default:var F=function(t,e,i){var a=[];switch(t){case"stepline":a=k.line(e,null,"H")+k.line(null,i,"V");break;case"linestep":a=k.line(null,i,"V")+k.line(e,null,"H");break;case"straight":a=k.line(e,i)}return a};if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.line(n,c)),b+=k.line(n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o}return{linePaths:m,areaPaths:v,pX:u,pY:g,pathState:p,segmentStartX:f,linePath:x,areaPath:b}}},{key:"handleNullDataPoints",value:function(t,e,i,a,s){var r=this.w;if(null===t[i][a]&&r.config.markers.showNullDataPoints||1===t[i].length){var n=this.strokeWidth-r.config.markers.strokeWidth/2;n>0||(n=0);var o=this.markers.plotChartMarkers(e,s,a+1,n,!0);null!==o&&this.elPointsMain.add(o)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,a,s){this.xoffset=e,this.yoffset=i,this.height=s,this.width=a,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],a=this.xoffset,s=this.yoffset,n=r(t)/this.height,o=r(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var a=e/this.height,s=this.width-a;i=new t(this.xoffset+a,this.yoffset,s,this.height)}else{var r=e/this.width,n=this.height-r;i=new t(this.xoffset,this.yoffset+r,this.width,n)}return i}}function e(e,a,s,n,o){n=void 0===n?0:n,o=void 0===o?0:o;var l=i(function(t,e){var i,a=[],s=e/r(t);for(i=0;i=n}(e,l=t[0],o)?(e.push(l),i(t.slice(1),e,s,n)):(h=s.cutArea(r(e),n),n.push(s.getCoordinates(e)),i(t,[],h,n)),n;n.push(s.getCoordinates(e))}function a(t,e){var i=Math.min.apply(Math,t),a=Math.max.apply(Math,t),s=r(t);return Math.max(Math.pow(e,2)*a/Math.pow(s,2),Math.pow(s,2)/(Math.pow(e,2)*i))}function s(t){return t&&t.constructor===Array}function r(t){var e,i=0;for(e=0;er-a&&l.width<=n-s){var h=o.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(h.x," ").concat(h.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,i,a,s,r){var n=new Mi(this.ctx),o=n.getTextRects(t,e).width+this.w.config.stroke.width+5>s-i&&r-a>s-i?r-a:s-i,l=n.getTextBasedOnMaxWidth({text:t,maxWidth:o,fontSize:e});return t.length!==l.length&&o/e<5?"":l}},{key:"animateTreemap",value:function(t,e,i,a){var s=new y(this.ctx);s.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,(function(){s.animationCompleted(t)}))}}]),t}(),ja=86400,Va=10/ja,Ua=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return s(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new zi(this.ctx),r=(e-t)/864e5;this.determineInterval(r),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,r5e4&&(a.globals.disableZoomOut=!0);var n=s.getTimeUnitsfromTimestamp(t,e,this.utc),o=a.globals.gridWidth/r,l=o/24,h=l/60,c=h/60,d=Math.floor(24*r),g=Math.floor(1440*r),p=Math.floor(r*ja),f=Math.floor(r),x=Math.floor(r/30),b=Math.floor(r/365),m={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},v={firstVal:m,currentMillisecond:m.minMillisecond,currentSecond:m.minSecond,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:l,minutesWidthOnXAxis:h,secondsWidthOnXAxis:c,numberOfSeconds:p,numberOfMinutes:g,numberOfHours:d,numberOfDays:f,numberOfMonths:x,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var y=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?u(u({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?u(u({},e),{},{value:t.value}):"minute"===t.unit?u(u({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?u(u({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return y.filter((function(t){var e=1,s=Math.ceil(a.globals.gridWidth/120),r=t.value;void 0!==a.config.xaxis.tickAmount&&(s=a.config.xaxis.tickAmount),y.length>s&&(e=Math.floor(y.length/s));var n=!1,o=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(n=!0);break;case"half_year":e=7,"year"===t.unit&&(n=!0);break;case"months":e=1,"year"===t.unit&&(n=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(n=!0),30===r&&(o=!0);break;case"months_days":e=10,"month"===t.unit&&(n=!0),30===r&&(o=!0);break;case"week_days":e=8,"month"===t.unit&&(n=!0);break;case"days":e=1,"month"===t.unit&&(n=!0);break;case"hours":"day"===t.unit&&(n=!0);break;case"minutes_fives":case"seconds_fives":r%5!=0&&(o=!0);break;case"seconds_tens":r%10!=0&&(o=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!o)return!0}else if((r%e==0||n)&&!o)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,a=this.formatDates(t),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new pa(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.daysWidthOnXAxis,r=t.numberOfYears,n=e.minYear,o=0,l=new zi(this.ctx),h="year";if(e.minDate>1||e.minMonth>0){var c=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(l.determineDaysOfYear(e.minYear)-c+1)*s,n=e.minYear+1,this.timeScaleArray.push({position:o,value:n,unit:h,year:n,month:v.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:o,value:n,unit:h,year:a,month:v.monthMod(i+1)});for(var d=n,u=o,g=0;g1){l=(h.determineDaysOfMonths(a+1,e.minYear)-i+1)*r,o=v.monthMod(a+1);var u=s+d,g=v.monthMod(o),p=o;0===o&&(c="year",p=u,g=1,u+=d+=1),this.timeScaleArray.push({position:l,value:p,unit:c,year:u,month:g})}else this.timeScaleArray.push({position:l,value:o,unit:c,year:s,month:v.monthMod(a)});for(var f=o+1,x=l,b=0,m=1;bn.determineDaysOfMonths(e+1,i)?(h=1,o="month",u=e+=1,e):e},d=(24-e.minHour)*s,u=l,g=c(h,i,a);0===e.minHour&&1===e.minDate?(d=0,u=v.monthMod(e.minMonth),o="month",h=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(d=0,l=e.minDate,u=l,g=c(h=l,i,a)),this.timeScaleArray.push({position:d,value:u,unit:o,year:this._getYear(a,g,0),month:v.monthMod(g),day:h});for(var p=d,f=0;fo.determineDaysOfMonths(e+1,s)&&(f=1,e+=1),{month:e,date:f}},c=function(t,e){return t>o.determineDaysOfMonths(e+1,s)?e+=1:e},d=60-(e.minMinute+e.minSecond/60),u=d*r,g=e.minHour+1,p=g;60===d&&(u=0,p=g=e.minHour);var f=i;p>=24&&(p=0,l="day",g=f+=1);var x=h(f,a).month;x=c(f,x),this.timeScaleArray.push({position:u,value:g,unit:l,day:f,hour:p,year:s,month:v.monthMod(x)}),p++;for(var b=u,m=0;m=24)p=0,l="day",x=h(f+=1,x).month,x=c(f,x);var y=this._getYear(s,x,0);b=60*r+b;var w=0===p?f:p;this.timeScaleArray.push({position:b,value:w,unit:l,hour:p,day:f,year:y,month:v.monthMod(x)}),p++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.minutesWidthOnXAxis,h=t.secondsWidthOnXAxis,c=t.numberOfMinutes,d=a+1,u=r,g=n,p=o,f=s,x=(60-i-e/1e3)*h,b=0;b=60&&(d=0,24===(f+=1)&&(f=0)),this.timeScaleArray.push({position:x,value:d,unit:"minute",hour:f,minute:d,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,d++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.secondsWidthOnXAxis,h=t.numberOfSeconds,c=i+1,d=a,u=r,g=n,p=o,f=s,x=(1e3-e)/1e3*l,b=0;b=60&&(c=0,++d>=60&&(d=0,24===++f&&(f=0))),this.timeScaleArray.push({position:x,value:c,unit:"second",hour:f,minute:d,second:c,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,c++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var a=t.value.toString(),s=new zi(e.ctx),r=e.createRawDateString(t,a),n=s.getDate(s.parseDate(r));if(e.utc||(n=s.getDate(s.parseDateWithTimezone(r))),void 0===i.config.xaxis.labels.format){var o="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(o=l.year),"month"===t.unit&&(o=l.month),"day"===t.unit&&(o=l.day),"hour"===t.unit&&(o=l.hour),"minute"===t.unit&&(o=l.minute),"second"===t.unit&&(o=l.second),a=s.formatDate(n,o)}else a=s.formatDate(n,i.config.xaxis.labels.format);return{dateString:r,position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,a=new Mi(this.ctx),s=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(s=!0,e=a.getTextRects(t[0].value).width);var r=0,n=t.map((function(n,o){if(o>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=s?e:a.getTextRects(t[r].value).width,h=t[r].position;return n.position>h+l+10?(r=o,n):null}return n}));return n=n.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),qa=function(){function t(e,a){i(this,t),this.ctx=a,this.w=a.w,this.el=e}return s(t,[{key:"setupElements",value:function(){var t=this.w,e=t.globals,i=t.config,a=i.chart.type;e.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(a),e.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(a),e.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(a)&&i.plotOptions.bar.horizontal,e.chartClass=".apexcharts".concat(e.chartID),e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),Mi.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas ".concat(e.chartClass.substring(1))}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=window.SVG().addTo(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(i.chart.offsetX,", ").concat(i.chart.offsetY,")")}),e.dom.Paper.node.style.background="dark"!==i.theme.mode||i.chart.background?"light"!==i.theme.mode||i.chart.background?i.chart.background:"#fff":"#424242",this.setSVGDimensions(),e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject"),Mi.setAttrs(e.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap),e.dom.Paper.node.appendChild(e.dom.elLegendForeign),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,a=this.ctx,s=i.config,r=i.globals,n={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},o=s.chart.type||"line",l=null,h=0;r.series.forEach((function(e,a){var s=t[a].type||o;n[s]?("rangeArea"===s?(n[s].series.push(r.seriesRangeStart[a]),n[s].seriesRangeEnd.push(r.seriesRangeEnd[a])):n[s].series.push(e),n[s].i.push(a),"column"!==s&&"bar"!==s||(i.globals.columnSeries=n.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(s)?l=s:"bar"===s?(n.column.series.push(e),n.column.i.push(a)):console.warn("You have specified an unrecognized series type (".concat(s,").")),o!==s&&"scatter"!==s&&h++})),h>0&&(l&&console.warn("Chart or series type ".concat(l," cannot appear with other chart or series types.")),n.column.series.length>0&&s.plotOptions.bar.horizontal&&(h-=n.column.series.length,n.column={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||(r.comboCharts=h>0);var c=new Ba(a,e),d=new Ta(a,e);a.pie=new Ya(a);var u=new Ha(a);a.rangeBar=new Oa(a,e);var g=new Ea(a),p=[];if(r.comboCharts){var x,b,m=new Pi(a);if(n.area.series.length>0)(x=p).push.apply(x,f(m.drawSeriesByGroup(n.area,r.areaGroups,"area",c)));if(n.column.series.length>0)if(s.chart.stacked){var v=new Ia(a,e);p.push(v.draw(n.column.series,n.column.i))}else a.bar=new Pa(a,e),p.push(a.bar.draw(n.column.series,n.column.i));if(n.rangeArea.series.length>0&&p.push(c.draw(n.rangeArea.series,"rangeArea",n.rangeArea.i,n.rangeArea.seriesRangeEnd)),n.line.series.length>0)(b=p).push.apply(b,f(m.drawSeriesByGroup(n.line,r.lineGroups,"line",c)));if(n.candlestick.series.length>0&&p.push(d.draw(n.candlestick.series,"candlestick",n.candlestick.i)),n.boxPlot.series.length>0&&p.push(d.draw(n.boxPlot.series,"boxPlot",n.boxPlot.i)),n.rangeBar.series.length>0&&p.push(a.rangeBar.draw(n.rangeBar.series,n.rangeBar.i)),n.scatter.series.length>0){var y=new Ba(a,e,!0);p.push(y.draw(n.scatter.series,"scatter",n.scatter.i))}if(n.bubble.series.length>0){var w=new Ba(a,e,!0);p.push(w.draw(n.bubble.series,"bubble",n.bubble.i))}}else switch(s.chart.type){case"line":p=c.draw(r.series,"line");break;case"area":p=c.draw(r.series,"area");break;case"bar":if(s.chart.stacked)p=new Ia(a,e).draw(r.series);else a.bar=new Pa(a,e),p=a.bar.draw(r.series);break;case"candlestick":p=new Ta(a,e).draw(r.series,"candlestick");break;case"boxPlot":p=new Ta(a,e).draw(r.series,s.chart.type);break;case"rangeBar":p=a.rangeBar.draw(r.series);break;case"rangeArea":p=c.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":p=new Xa(a,e).draw(r.series);break;case"treemap":p=new Ga(a,e).draw(r.series);break;case"pie":case"donut":case"polarArea":p=a.pie.draw(r.series);break;case"radialBar":p=u.draw(r.series);break;case"radar":p=g.draw(r.series);break;default:p=c.draw(r.series)}return p}},{key:"setSVGDimensions",value:function(){var t=this.w,e=t.globals,i=t.config;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto",e.svgWidth=i.chart.width,e.svgHeight=i.chart.height;var a=v.getDimensions(this.el),s=i.chart.width.toString().split(/[0-9]+/g).pop();"%"===s?v.isNumber(a[0])&&(0===a[0].width&&(a=v.getDimensions(this.el.parentNode)),e.svgWidth=a[0]*parseInt(i.chart.width,10)/100):"px"!==s&&""!==s||(e.svgWidth=parseInt(i.chart.width,10));var r=String(i.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===r){var n=v.getDimensions(this.el.parentNode);e.svgHeight=n[1]*parseInt(i.chart.height,10)/100}else e.svgHeight=parseInt(i.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Mi.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==r){var o=i.chart.sparkline.enabled?0:e.axisCharts?i.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(e.svgHeight+o,"px")}e.dom.elWrap.style.width="".concat(e.svgWidth,"px"),e.dom.elWrap.style.height="".concat(e.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i=t.translateX;Mi.setAttrs(t.dom.elGraphical.node,{transform:"translate(".concat(i,", ").concat(e,")")})}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,a=t.config.chart.sparkline.enabled?1:15;a+=t.config.grid.padding.bottom,["top","bottom"].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(i=new xa(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var s=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*t.globals.radialSize;if(s&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var n=v.getBoundingClientRect(s);r=n.bottom;var o=n.bottom-n.top;r=Math.max(2.05*t.globals.radialSize,o)}var l=Math.ceil(r+e.translateY+i+a);e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).includes("%")||(e.dom.elWrap.style.height="".concat(l,"px"),Mi.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(l,"px"))}},{key:"coreCalculations",value:function(){new ea(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(){return[]}))},i=new Bi,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=e(),a.seriesYvalues=e()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var t=this.w,e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new na(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new na(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Ua(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new Pi(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var i=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];i.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){return t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){return t.updateSourceChart(i)})})),e.config.chart.events.selection=function(t,e){i.forEach((function(t){ApexCharts.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:e.xaxis.min,max:e.xaxis.max}},!1,!1,!1,!1)}))}}}}]),t}(),Za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"_updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(n){var o=[e.ctx];s&&(o=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(o=[e.ctx],e.ctx.w.globals.isExecCalled=!1),o.forEach((function(s,l){var h=s.w;if(h.globals.shouldAnimate=a,i||(h.globals.resized=!0,h.globals.dataChanged=!0,a&&s.series.getPreviousPaths()),t&&"object"===b(t)&&(s.config=new Wi(t),t=Pi.extendArrayProps(s.config,t,h),s.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,h.config=v.extend(h.config,t),r&&(h.globals.lastXAxis=t.xaxis?v.clone(t.xaxis):[],h.globals.lastYAxis=t.yaxis?v.clone(t.yaxis):[],h.globals.initialConfig=v.extend({},h.config),h.globals.initialSeries=v.clone(h.config.series),t.series))){for(var c=0;c2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(s){var r,n=i.w;return n.globals.shouldAnimate=e,n.globals.dataChanged=!0,e&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?(0===(r=t.map((function(t,e){return i._extendSeries(t,e)}))).length&&(r=[{data:[]}]),n.config.series=r):n.config.series=t.slice(),a&&(n.globals.initialConfig.series=v.clone(n.config.series),n.globals.initialSeries=v.clone(n.config.series)),i.ctx.update().then((function(){s(i.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var i=this.w,a=i.config.series[e];return u(u({},i.config.series[e]),{},{name:t.name?t.name:null==a?void 0:a.name,color:t.color?t.color:null==a?void 0:a.color,type:t.type?t.type:null==a?void 0:a.type,group:t.group?t.group:null==a?void 0:a.group,hidden:void 0!==t.hidden?t.hidden:null==a?void 0:a.hidden,data:t.data?t.data:null==a?void 0:a.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(e,"'], ").concat(s," circle[j='").concat(e,"'], ").concat(s," rect[j='").concat(e,"']")):void 0===e&&(a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(t,"']")),"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),a?(new Mi(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new Ni(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;t&&t.xaxis&&(a=t.xaxis),t&&t.yaxis&&(s=t.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;var r=function(t){void 0!==s[t]&&(i.config.yaxis[t].min=s[t].min,i.config.yaxis[t].max=s[t].max)};i.config.yaxis.map((function(t,a){i.globals.zoomed||void 0!==s[a]?r(a):void 0!==e.ctx.opts.yaxis[a]&&(t.min=e.ctx.opts.yaxis[a].min,t.max=e.ctx.opts.yaxis[a].max)}))}}]),t}();!function(){function t(){for(var t=arguments.length>0&&arguments[0]!==h?arguments[0]:[],s=arguments.length>1?arguments[1]:h,r=arguments.length>2?arguments[2]:h,n=arguments.length>3?arguments[3]:h,o=arguments.length>4?arguments[4]:h,l=arguments.length>5?arguments[5]:h,h=arguments.length>6?arguments[6]:h,c=t.slice(s,r||h),d=n.slice(o,l||h),u=0,g={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};;){if(c[u]=e.call(g,c[u]),d[u]=e.call(p,d[u]),c[u][0]!=d[u][0]||"M"==c[u][0]||"A"==c[u][0]&&(c[u][4]!=d[u][4]||c[u][5]!=d[u][5])?(Array.prototype.splice.apply(c,[u,1].concat(a.call(g,c[u]))),Array.prototype.splice.apply(d,[u,1].concat(a.call(p,d[u])))):(c[u]=i.call(g,c[u]),d[u]=i.call(p,d[u])),++u==c.length&&u==d.length)break;u==c.length&&c.push(["C",g.pos[0],g.pos[1],g.pos[0],g.pos[1],g.pos[0],g.pos[1]]),u==d.length&&d.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]])}return{start:c,dest:d}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function i(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function a(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var i,a,s,r,n,o,l,h,c,d,u,g,p,f,x,b,m,v,y,w,k,A,C,S,L,M,P=Math.abs(e[1]),I=Math.abs(e[2]),T=e[3]%360,z=e[4],X=e[5],R=e[6],Y=e[7],E=new bt(t),H=new bt(R,Y),O=[];if(0===P||0===I||E.x===H.x&&E.y===H.y)return[["C",E.x,E.y,H.x,H.y,H.x,H.y]];i=new bt((E.x-H.x)/2,(E.y-H.y)/2).transform((new vt).rotate(T)),a=i.x*i.x/(P*P)+i.y*i.y/(I*I),a>1&&(P*=a=Math.sqrt(a),I*=a);s=(new vt).rotate(T).scale(1/P,1/I).rotate(-T),E=E.transform(s),H=H.transform(s),r=[H.x-E.x,H.y-E.y],o=r[0]*r[0]+r[1]*r[1],n=Math.sqrt(o),r[0]/=n,r[1]/=n,l=o<4?Math.sqrt(1-o/4):0,z===X&&(l*=-1);h=new bt((H.x+E.x)/2+l*-r[1],(H.y+E.y)/2+l*r[0]),c=new bt(E.x-h.x,E.y-h.y),d=new bt(H.x-h.x,H.y-h.y),u=Math.acos(c.x/Math.sqrt(c.x*c.x+c.y*c.y)),c.y<0&&(u*=-1);g=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(g*=-1);X&&u>g&&(g+=2*Math.PI);!X&&u0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(!1===e)return!1;for(var i=e,a=t.length;i(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class Ja{constructor(t){t.remember("_draggable",this),this.el=t,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(t){t?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(t){const e=!t.type.indexOf("mouse");if(e&&1!==t.which&&0!==t.buttons)return;if(this.el.dispatch("beforedrag",{event:t,handler:this}).defaultPrevented)return;t.preventDefault(),t.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point($a(t));const i=(e?"mouseup":"touchend")+".drag";zt(window,(e?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),zt(window,i,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:t,handler:this,box:this.box})}drag(t){const{box:e,lastClick:i}=this,a=this.el.point($a(t)),s=a.x-i.x,r=a.y-i.y;if(!s&&!r)return e;const n=e.x+s,o=e.y+r;this.box=new kt(n,o,e.w,e.h),this.lastClick=a,this.el.dispatch("dragmove",{event:t,handler:this,box:this.box}).defaultPrevented||this.move(n,o)}move(t,e){"svg"===this.el.type?gi.prototype.move.call(this.el,t,e):this.el.move(t,e)}endDrag(t){this.drag(t),this.el.fire("dragend",{event:t,handler:this,box:this.box}),Xt(window,"mousemove.drag"),Xt(window,"touchmove.drag"),Xt(window,"mouseup.drag"),Xt(window,"touchend.drag"),this.init(!0)}} +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).ApexCharts=e()}(this,(function(){"use strict";function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=Array(e);i=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,n=!0,o=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return n=t.done,t},e:function(t){o=!0,r=t},f:function(){try{n||null==i.return||i.return()}finally{if(o)throw r}}}}function n(t){var i=c();return function(){var a,s=l(t);if(i){var r=l(this).constructor;a=Reflect.construct(s,arguments,r)}else a=s.apply(this,arguments);return function(t,i){if(i&&("object"==typeof i||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return e(t)}(this,a)}}function o(t,e,i){return(e=x(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function d(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function u(t){for(var e=1;e>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((a-r)*s)+r)+256*(Math.round((a-n)*s)+n)+(Math.round((a-o)*s)+o)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,i){return t.isColorHex(i)?this.shadeHexColor(e,i):this.shadeRGBColor(e,i)}}],[{key:"bind",value:function(t,e){return function(){return t.apply(e,arguments)}}},{key:"isObject",value:function(t){return t&&"object"===b(t)&&!Array.isArray(t)&&null!=t}},{key:"is",value:function(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}},{key:"listToArray",value:function(t){var e,i=[];for(e=0;e1&&void 0!==arguments[1]?arguments[1]:2;return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(t){var e=String(t).split(/[eE]/);if(1===e.length)return e[0];var i="",a=t<0?"-":"",s=e[0].replace(".",""),r=Number(e[1])+1;if(r<0){for(i=a+"0.";r++;)i+="0";return i+s.replace(/^-/,"")}for(r-=s.length;r--;)i+="0";return s+i}},{key:"elementExists",value:function(t){return!(!t||!t.isConnected)}},{key:"getDimensions",value:function(t){var e=getComputedStyle(t,null),i=t.clientHeight,a=t.clientWidth;return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),[a-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),i]}},{key:"getBoundingClientRect",value:function(t){var e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}},{key:"getLargestStringFromArr",value:function(t){return t.reduce((function(t,e){return Array.isArray(e)&&(e=e.reduce((function(t,e){return t.length>e.length?t:e}))),t.length>e.length?t:e}),0)}},{key:"hexToRgba",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"#999999",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.6;"#"!==t.substring(0,1)&&(t="#999999");var i=t.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var a=0;a1&&void 0!==arguments[1]?arguments[1]:"x",i=t.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,e)}},{key:"negToZero",value:function(t){return t<0?0:t}},{key:"moveIndexInArray",value:function(t,e,i){if(i>=t.length)for(var a=i-t.length+1;a--;)t.push(void 0);return t.splice(i,0,t.splice(e,1)[0]),t}},{key:"extractNumber",value:function(t){return parseFloat(t.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}},{key:"setELstyles",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t.style.key=e[i])}},{key:"preciseAddition",value:function(t,e){var i=(String(t).split(".")[1]||"").length,a=(String(e).split(".")[1]||"").length,s=Math.pow(10,Math.max(i,a));return(Math.round(t*s)+Math.round(e*s))/s}},{key:"isNumber",value:function(t){return!isNaN(t)&&parseFloat(Number(t))===t&&!isNaN(parseInt(t,10))}},{key:"isFloat",value:function(t){return Number(t)===t&&t%1!=0}},{key:"isMsEdge",value:function(){var t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}},{key:"getGCD",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));for(t=Math.round(Math.abs(t)*a),e=Math.round(Math.abs(e)*a);e;){var s=e;e=t%e,t=s}return t/a}},{key:"getPrimeFactors",value:function(t){for(var e=[],i=2;t>=2;)t%i==0?(e.push(i),t/=i):i++;return e}},{key:"mod",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:7,a=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*a))%(e=Math.round(Math.abs(e)*a))/a}}]),t}(),y=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"animateLine",value:function(t,e,i,a){t.attr(e).animate(a).attr(i)}},{key:"animateMarker",value:function(t,e,i,a){t.attr({opacity:0}).animate(e).attr({opacity:1}).after((function(){a()}))}},{key:"animateRect",value:function(t,e,i,a,s){t.attr(e).animate(a).attr(i).after((function(){return s()}))}},{key:"animatePathsGradually",value:function(t){var e=t.el,i=t.realIndex,a=t.j,s=t.fill,r=t.pathFrom,n=t.pathTo,o=t.speed,l=t.delay,h=this.w,c=0;h.config.chart.animations.animateGradually.enabled&&(c=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&"bar"!==h.config.chart.type&&(c=0),this.morphSVG(e,i,a,"line"!==h.config.chart.type||h.globals.comboCharts?s:"stroke",r,n,o,l*c)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach((function(t){var e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")}))}},{key:"animationCompleted",value:function(t){var e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}},{key:"morphSVG",value:function(t,e,i,a,s,r,n,o){var l=this,h=this.w;s||(s=t.attr("pathFrom")),r||(r=t.attr("pathTo"));var c=function(t){return"radar"===h.config.chart.type&&(n=1),"M 0 ".concat(h.globals.gridHeight)};(!s||s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s=c()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=c()),h.globals.shouldAnimate||(n=1),t.plot(s).animate(1,o).plot(s).animate(n,o).plot(r).after((function(){v.isNumber(i)?i===h.globals.series[h.globals.maxValsInArrayIndex].length-2&&h.globals.shouldAnimate&&l.animationCompleted(t):"none"!==a&&h.globals.shouldAnimate&&(!h.globals.comboCharts&&e===h.globals.series.length-1||h.globals.comboCharts)&&l.animationCompleted(t),l.showDelayedElements()}))}}]),t}();const w={},k=[];function A(t,e){if(Array.isArray(t))for(const i of t)A(i,e);else if("object"!=typeof t)S(Object.getOwnPropertyNames(e)),w[t]=Object.assign(w[t]||{},e);else for(const e in t)A(e,t[e])}function C(t){return w[t]||{}}function S(t){k.push(...t)}function L(t,e){let i;const a=t.length,s=[];for(i=0;iz.has(t.nodeName),R=(t,e,i={})=>{const a={...e};for(const t in a)a[t].valueOf()===i[t]&&delete a[t];Object.keys(a).length?t.node.setAttribute("data-svgjs",JSON.stringify(a)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},E="http://www.w3.org/2000/svg",Y="http://www.w3.org/2000/xmlns/",H="http://www.w3.org/1999/xlink",O={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function F(){return O.window}let D=class{};const _={},N="___SYMBOL___ROOT___";function W(t,e=E){return O.document.createElementNS(e,t)}function B(t,e=!1){if(t instanceof D)return t;if("object"==typeof t)return U(t);if(null==t)return new _[N];if("string"==typeof t&&"<"!==t.charAt(0))return U(O.document.querySelector(t));const i=e?O.document.createElement("div"):W("svg");return i.innerHTML=t,t=U(i.firstChild),i.removeChild(i.firstChild),t}function G(t,e){return e&&(e instanceof O.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:W(t)}function V(t){if(!t)return null;if(t.instance instanceof D)return t.instance;if("#document-fragment"===t.nodeName)return new _.Fragment(t);let e=P(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":_[e]||(e="Dom"),new _[e](t)}let U=V;function q(t,e=t.name,i=!1){return _[e]=t,i&&(_[N]=t),S(Object.getOwnPropertyNames(t.prototype)),t}let Z=1e3;function $(t){return"Svgjs"+P(t)+Z++}function J(t){for(let e=t.children.length-1;e>=0;e--)J(t.children[e]);return t.id?(t.id=$(t.nodeName),t):t}function Q(t,e){let i,a;for(a=(t=Array.isArray(t)?t:[t]).length-1;a>=0;a--)for(i in e)t[a].prototype[i]=e[i]}function K(t){return function(...e){const i=e[e.length-1];return!i||i.constructor!==Object||i instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(i)}}A("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=B(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=B(t)).before(this),this},insertAfter:function(t){return(t=B(t)).after(this),this}});const tt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,et=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,it=/rgb\((\d+),(\d+),(\d+)\)/,at=/(#[a-z_][a-z0-9\-_]*)/i,st=/\)\s*,?\s*/,rt=/\s/g,nt=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,ot=/^rgb\(/,lt=/^(\s+)?$/,ht=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,ct=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,dt=/[\s,]+/,ut=/[MLHVCSQTAZ]/i;function gt(t){const e=Math.round(t),i=Math.max(0,Math.min(255,e)).toString(16);return 1===i.length?"0"+i:i}function pt(t,e){for(let i=e.length;i--;)if(null==t[e[i]])return!1;return!0}function ft(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}A("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(dt)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),A("Dom",{css:function(t,e){const i={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);i[e[0]]=e[1]})),i;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;i[e]=this.node.style.getPropertyValue(t)}return i}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||lt.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||lt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),A("Dom",{data:function(t,e,i){if(null==t)return this.data(L(function(t,e){let i;const a=t.length,s=[];for(i=0;i0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const i of t)e[i]=this.data(i);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===i||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),A("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class xt{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof xt||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:i,round:a,sin:s,PI:r}=Math;if("vibrant"===t){const t=24*i()+57,e=38*i()+45,a=360*i();return new xt(t,e,a,"lch")}if("sine"===t){const t=a(80*s(2*r*(e=null==e?i():e)/.5+.01)+150),n=a(50*s(2*r*e/.5+4.6)+200),o=a(100*s(2*r*e/.5+2.3)+150);return new xt(t,n,o)}if("pastel"===t){const t=8*i()+86,e=17*i()+9,a=360*i();return new xt(t,e,a,"lch")}if("dark"===t){const t=10+10*i(),e=50*i()+86,a=360*i();return new xt(t,e,a,"lch")}if("rgb"===t){const t=255*i(),e=255*i(),a=255*i();return new xt(t,e,a)}if("lab"===t){const t=100*i(),e=256*i()-128,a=256*i()-128;return new xt(t,e,a,"lab")}if("grey"===t){const t=255*i();return new xt(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(nt.test(t)||ot.test(t))}cmyk(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.min(1-a,1-s,1-r);if(1===n)return new xt(0,0,0,1,"cmyk");return new xt((1-a-n)/(1-n),(1-s-n)/(1-n),(1-r-n)/(1-n),n,"cmyk")}hsl(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=Math.max(a,s,r),o=Math.min(a,s,r),l=(n+o)/2,h=n===o,c=n-o;return new xt(360*(h?0:n===a?((s-r)/c+(s.5?c/(2-n-o):c/(n+o)),100*l,"hsl")}init(t=0,e=0,i=0,a=0,s="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)s="string"==typeof a?a:s,a="string"==typeof a?0:a,Object.assign(this,{_a:t,_b:e,_c:i,_d:a,space:s});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const i=function(t,e){const i=pt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:pt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:pt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:pt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:pt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:pt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return i.space=e||i.space,i}(t,e);Object.assign(this,i)}else if("string"==typeof t)if(ot.test(t)){const e=t.replace(rt,""),[i,a,s]=it.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}else{if(!nt.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,i,a,s]=et.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:i,_b:a,_c:s,_d:0,space:"rgb"})}}const{_a:r,_b:n,_c:o,_d:l}=this,h="rgb"===this.space?{r:r,g:n,b:o}:"xyz"===this.space?{x:r,y:n,z:o}:"hsl"===this.space?{h:r,s:n,l:o}:"lab"===this.space?{l:r,a:n,b:o}:"lch"===this.space?{l:r,c:n,h:o}:"cmyk"===this.space?{c:r,m:n,y:o,k:l}:{};Object.assign(this,h)}lab(){const{x:t,y:e,z:i}=this.xyz();return new xt(116*e-16,500*(t-e),200*(e-i),"lab")}lch(){const{l:t,a:e,b:i}=this.lab(),a=Math.sqrt(e**2+i**2);let s=180*Math.atan2(i,e)/Math.PI;s<0&&(s*=-1,s=360-s);return new xt(t,a,s,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:i}=this;if("lab"===this.space||"lch"===this.space){let{l:a,a:s,b:r}=this;if("lch"===this.space){const{c:t,h:e}=this,i=Math.PI/180;s=t*Math.cos(i*e),r=t*Math.sin(i*e)}const n=(a+16)/116,o=s/500+n,l=n-r/200,h=16/116,c=.008856,d=7.787;t=.95047*(o**3>c?o**3:(o-h)/d),e=1*(n**3>c?n**3:(n-h)/d),i=1.08883*(l**3>c?l**3:(l-h)/d)}const a=3.2406*t+-1.5372*e+-.4986*i,s=-.9689*t+1.8758*e+.0415*i,r=.0557*t+-.204*e+1.057*i,n=Math.pow,o=.0031308,l=a>o?1.055*n(a,1/2.4)-.055:12.92*a,h=s>o?1.055*n(s,1/2.4)-.055:12.92*s,c=r>o?1.055*n(r,1/2.4)-.055:12.92*r;return new xt(255*l,255*h,255*c)}if("hsl"===this.space){let{h:t,s:e,l:i}=this;if(t/=360,e/=100,i/=100,0===e){i*=255;return new xt(i,i,i)}const a=i<.5?i*(1+e):i+e-i*e,s=2*i-a,r=255*ft(s,a,t+1/3),n=255*ft(s,a,t),o=255*ft(s,a,t-1/3);return new xt(r,n,o)}if("cmyk"===this.space){const{c:t,m:e,y:i,k:a}=this,s=255*(1-Math.min(1,t*(1-a)+a)),r=255*(1-Math.min(1,e*(1-a)+a)),n=255*(1-Math.min(1,i*(1-a)+a));return new xt(s,r,n)}return this;var t}toArray(){const{_a:t,_b:e,_c:i,_d:a,space:s}=this;return[t,e,i,a,s]}toHex(){const[t,e,i]=this._clamped().map(gt);return`#${t}${e}${i}`}toRgb(){const[t,e,i]=this._clamped();return`rgb(${t},${e},${i})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:i}=this.rgb(),[a,s,r]=[t,e,i].map((t=>t/255)),n=a>.04045?Math.pow((a+.055)/1.055,2.4):a/12.92,o=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,l=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,h=(.4124*n+.3576*o+.1805*l)/.95047,c=(.2126*n+.7152*o+.0722*l)/1,d=(.0193*n+.1192*o+.9505*l)/1.08883,u=h>.008856?Math.pow(h,1/3):7.787*h+16/116,g=c>.008856?Math.pow(c,1/3):7.787*c+16/116,p=d>.008856?Math.pow(d,1/3):7.787*d+16/116;return new xt(u,g,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:i}=this.rgb(),{max:a,min:s,round:r}=Math;return[t,e,i].map((t=>a(0,s(r(t),255))))}}class bt{constructor(...t){this.init(...t)}clone(){return new bt(this)}init(t,e){const i=0,a=0,s=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==s.x?i:s.x,this.y=null==s.y?a:s.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){vt.isMatrixLike(t)||(t=new vt(t));const{x:e,y:i}=this;return this.x=t.a*e+t.c*i+t.e,this.y=t.b*e+t.d*i+t.f,this}}function mt(t,e,i){return Math.abs(e-t)<(i||1e-6)}class vt{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,i=t.flip&&(e||"x"===t.flip)?-1:1,a=t.flip&&(e||"y"===t.flip)?-1:1,s=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,r=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,n=t.scale&&t.scale.length?t.scale[0]*i:isFinite(t.scale)?t.scale*i:isFinite(t.scaleX)?t.scaleX*i:i,o=t.scale&&t.scale.length?t.scale[1]*a:isFinite(t.scale)?t.scale*a:isFinite(t.scaleY)?t.scaleY*a:a,l=t.shear||0,h=t.rotate||t.theta||0,c=new bt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),d=c.x,u=c.y,g=new bt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=g.x,f=g.y,x=new bt(t.translate||t.tx||t.translateX,t.ty||t.translateY),b=x.x,m=x.y,v=new bt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:n,scaleY:o,skewX:s,skewY:r,shear:l,theta:h,rx:v.x,ry:v.y,tx:b,ty:m,ox:d,oy:u,px:p,py:f}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,i){const a=t.a*e.a+t.c*e.b,s=t.b*e.a+t.d*e.b,r=t.a*e.c+t.c*e.d,n=t.b*e.c+t.d*e.d,o=t.e+t.a*e.e+t.c*e.f,l=t.f+t.b*e.e+t.d*e.f;return i.a=a,i.b=s,i.c=r,i.d=n,i.e=o,i.f=l,i}around(t,e,i){return this.clone().aroundO(t,e,i)}aroundO(t,e,i){const a=t||0,s=e||0;return this.translateO(-a,-s).lmultiplyO(i).translateO(a,s)}clone(){return new vt(this)}decompose(t=0,e=0){const i=this.a,a=this.b,s=this.c,r=this.d,n=this.e,o=this.f,l=i*r-a*s,h=l>0?1:-1,c=h*Math.sqrt(i*i+a*a),d=Math.atan2(h*a,h*i),u=180/Math.PI*d,g=Math.cos(d),p=Math.sin(d),f=(i*s+a*r)/l,x=s*c/(f*i-a)||r*c/(f*a+i);return{scaleX:c,scaleY:x,shear:f,rotate:u,translateX:n-t+t*g*c+e*(f*g*c-p*x),translateY:o-e+t*p*c+e*(f*p*c+g*x),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new vt(t);return mt(this.a,e.a)&&mt(this.b,e.b)&&mt(this.c,e.c)&&mt(this.d,e.d)&&mt(this.e,e.e)&&mt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=vt.fromArray([1,0,0,1,0,0]);return t=t instanceof Gt?t.matrixify():"string"==typeof t?vt.fromArray(t.split(dt).map(parseFloat)):Array.isArray(t)?vt.fromArray(t):"object"==typeof t&&vt.isMatrixLike(t)?t:"object"==typeof t?(new vt).transform(t):6===arguments.length?vt.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,i=this.c,a=this.d,s=this.e,r=this.f,n=t*a-e*i;if(!n)throw new Error("Cannot invert "+this);const o=a/n,l=-e/n,h=-i/n,c=t/n,d=-(o*s+h*r),u=-(l*s+c*r);return this.a=o,this.b=l,this.c=h,this.d=c,this.e=d,this.f=u,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof vt?t:new vt(t);return vt.matrixMultiply(this,e,this)}rotate(t,e,i){return this.clone().rotateO(t,e,i)}rotateO(t,e=0,i=0){t=M(t);const a=Math.cos(t),s=Math.sin(t),{a:r,b:n,c:o,d:l,e:h,f:c}=this;return this.a=r*a-n*s,this.b=n*a+r*s,this.c=o*a-l*s,this.d=l*a+o*s,this.e=h*a-c*s+i*s-e*a+e,this.f=c*a+h*s-e*s-i*a+i,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t);const{a:s,b:r,c:n,d:o,e:l,f:h}=this;return this.a=s*t,this.b=r*e,this.c=n*t,this.d=o*e,this.e=l*t-i*t+i,this.f=h*e-a*e+a,this}shear(t,e,i){return this.clone().shearO(t,e,i)}shearO(t,e=0,i=0){const{a:a,b:s,c:r,d:n,e:o,f:l}=this;return this.a=a+s*t,this.c=r+n*t,this.e=o+l*t-i*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,i=0,a=0){3===arguments.length&&(a=i,i=e,e=t),t=M(t),e=M(e);const s=Math.tan(t),r=Math.tan(e),{a:n,b:o,c:l,d:h,e:c,f:d}=this;return this.a=n+o*s,this.b=o+n*r,this.c=l+h*s,this.d=h+l*r,this.e=c+d*s-a*s,this.f=d+c*r-i*r,this}skewX(t,e,i){return this.skew(t,0,e,i)}skewY(t,e,i){return this.skew(0,t,e,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(vt.isMatrixLike(t)){return new vt(t).multiplyO(this)}const e=vt.formatTransforms(t),{x:i,y:a}=new bt(e.ox,e.oy).transform(this),s=(new vt).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-i,-a).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(i,a);if(isFinite(e.px)||isFinite(e.py)){const t=new bt(i,a).transform(s),r=isFinite(e.px)?e.px-t.x:0,n=isFinite(e.py)?e.py-t.y:0;s.translateO(r,n)}return s.translateO(e.tx,e.ty),s}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function yt(){if(!yt.nodes){const t=B().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;yt.nodes={svg:t,path:e}}if(!yt.nodes.svg.node.parentNode){const t=O.document.body||O.document.documentElement;yt.nodes.svg.addTo(t)}return yt.nodes}function wt(t){return!(t.width||t.height||t.x||t.y)}q(vt,"Matrix");class kt{constructor(...t){this.init(...t)}addOffset(){return this.x+=O.window.pageXOffset,this.y+=O.window.pageYOffset,new kt(this)}init(t){return t="string"==typeof t?t.split(dt).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return wt(this)}merge(t){const e=Math.min(this.x,t.x),i=Math.min(this.y,t.y),a=Math.max(this.x+this.width,t.x+t.width)-e,s=Math.max(this.y+this.height,t.y+t.height)-i;return new kt(e,i,a,s)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof vt||(t=new vt(t));let e=1/0,i=-1/0,a=1/0,s=-1/0;return[new bt(this.x,this.y),new bt(this.x2,this.y),new bt(this.x,this.y2),new bt(this.x2,this.y2)].forEach((function(r){r=r.transform(t),e=Math.min(e,r.x),i=Math.max(i,r.x),a=Math.min(a,r.y),s=Math.max(s,r.y)})),new kt(e,a,i-e,s-a)}}function At(t,e,i){let a;try{if(a=e(t.node),wt(a)&&((s=t.node)!==O.document&&!(O.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===O.document}).call(O.document.documentElement,s)))throw new Error("Element not in the dom")}catch(e){a=i(t)}var s;return a}A({viewbox:{viewbox(t,e,i,a){return null==t?new kt(this.attr("viewBox")):this.attr("viewBox",new kt(t,e,i,a))},zoom(t,e){let{width:i,height:a}=this.attr(["width","height"]);if((i||a)&&"string"!=typeof i&&"string"!=typeof a||(i=this.node.clientWidth,a=this.node.clientHeight),!i||!a)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const s=this.viewbox(),r=i/s.width,n=a/s.height,o=Math.min(r,n);if(null==t)return o;let l=o/t;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new bt(i/2/r+s.x,a/2/n+s.y);const h=new kt(s).transform(new vt({scale:l,origin:e}));return this.viewbox(h)}}}),q(kt,"Box");class Ct extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}Q([Ct],{each(t,...e){return"function"==typeof t?this.map(((e,i,a)=>t.call(e,e,i,a))):this.map((i=>i[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const St=["toArray","constructor","each"];function Lt(t,e){return new Ct(L((e||O.document).querySelectorAll(t),(function(t){return V(t)})))}Ct.extend=function(t){t=t.reduce(((t,e)=>(St.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),Q([Ct],t)};let Mt=0;const Pt={};function It(t){let e=t.getEventHolder();return e===O.window&&(e=Pt),e.events||(e.events={}),e.events}function Tt(t){return t.getEventTarget()}function zt(t,e,i,a,s){const r=i.bind(a||t),n=B(t),o=It(n),l=Tt(n);e=Array.isArray(e)?e:e.split(dt),i._svgjsListenerId||(i._svgjsListenerId=++Mt),e.forEach((function(t){const e=t.split(".")[0],a=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][a]=o[e][a]||{},o[e][a][i._svgjsListenerId]=r,l.addEventListener(e,r,s||!1)}))}function Xt(t,e,i,a){const s=B(t),r=It(s),n=Tt(s);("function"!=typeof i||(i=i._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(dt)).forEach((function(t){const e=t&&t.split(".")[0],o=t&&t.split(".")[1];let l,h;if(i)r[e]&&r[e][o||"*"]&&(n.removeEventListener(e,r[e][o||"*"][i],a||!1),delete r[e][o||"*"][i]);else if(e&&o){if(r[e]&&r[e][o]){for(h in r[e][o])Xt(n,[e,o].join("."),h);delete r[e][o]}}else if(o)for(t in r)for(l in r[t])o===l&&Xt(n,[t,o].join("."));else if(e){if(r[e]){for(l in r[e])Xt(n,[e,l].join("."));delete r[e]}}else{for(t in r)Xt(n,t);!function(t){let e=t.getEventHolder();e===O.window&&(e=Pt),e.events&&(e.events={})}(s)}}))}class Rt extends D{addEventListener(){}dispatch(t,e,i){return function(t,e,i,a){const s=Tt(t);return e instanceof O.window.Event||(e=new O.window.CustomEvent(e,{detail:i,cancelable:!0,...a})),s.dispatchEvent(e),e}(this,t,e,i)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const i=e[t.type];for(const e in i)for(const a in i[e])i[e][a](t);return!t.defaultPrevented}fire(t,e,i){return this.dispatch(t,e,i),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,i){return Xt(this,t,e,i),this}on(t,e,i,a){return zt(this,t,e,i,a),this}removeEventListener(){}}function Et(){}q(Rt,"EventTarget");const Yt=400,Ht=">",Ot=0,Ft={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Dt extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(dt).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class _t{constructor(...t){this.init(...t)}convert(t){return new _t(this.value,t)}divide(t){return t=new _t(t),new _t(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(tt))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof _t&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new _t(t),new _t(this-t,this.unit||t.unit)}plus(t){return t=new _t(t),new _t(this+t,this.unit||t.unit)}times(t){return t=new _t(t),new _t(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Nt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Wt=[];class Bt extends Rt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=B(t)).removeNamespace&&this.node instanceof O.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return B(t).put(this,e)}children(){return new Ct(L(this.node.children,(function(t){return V(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let i=this.node.cloneNode(t);return e&&(i=J(i)),new this.constructor(i)}each(t,e){const i=this.children();let a,s;for(a=0,s=i.length;a=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=$(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return V(this.node.lastChild)}matches(t){const e=this.node,i=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return i&&i.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=V(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=V(e.node.parentNode));return e}put(t,e){return t=B(t),this.add(t,e),t}putIn(t,e){return B(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=B(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const i=10**t,a=this.attr(e);for(const t in a)"number"==typeof a[t]&&(a[t]=Math.round(a[t]*i)/i);return this.attr(a),this}svg(t,e){return this.xml(t,e,E)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const i=e.index(this);return e.put(t,i).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let i=this;if(null!=t){if(i=V(i.node.cloneNode(!0)),e){const e=t(i);if(i=e||i,!1===e)return""}i.each((function(){const e=t(this),i=e||this;!1===e?this.remove():e&&this!==i&&this.replace(i)}),!0)}return e?i.node.outerHTML:i.node.innerHTML}e=null!=e&&e;const a=W("wrapper",i),s=O.document.createDocumentFragment();a.innerHTML=t;for(let t=a.children.length;t--;)s.appendChild(a.firstElementChild);const r=this.parent();return e?this.replace(s)&&r:this.add(s)}}Q(Bt,{attr:function(t,e,i){if(null==t){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=ht.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?Ft[t]:ht.test(e)?parseFloat(e):e;"number"==typeof(e=Wt.reduce(((e,i)=>i(t,e,this)),e))?e=new _t(e):Nt.has(t)&&xt.isColor(e)?e=new xt(e):e.constructor===Array&&(e=new Dt(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof i?this.node.setAttributeNS(i,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return Lt(t,this.node)},findOne:function(t){return V(this.node.querySelector(t))}}),q(Bt,"Dom");class Gt extends Bt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new _t(t).plus(this.x()))}dy(t=0){return this.y(new _t(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=B(t));const i=new Ct;let a=this;for(;(a=a.parent())&&a.node!==O.document&&"#document-fragment"!==a.nodeName&&(i.push(a),e||a.node!==t.node)&&(!e||!a.matches(t));)if(a.node===this.root().node)return null;return i}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(at);return e?B(e[1]):null}root(){const t=this.parent(function(t){return _[t]}(N));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const i=I(this,t,e);return this.width(new _t(i.width)).height(new _t(i.height))}width(t){return this.attr("width",t)}writeDataToDom(){return R(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}Q(Gt,{bbox:function(){const t=At(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(yt().svg).show(),i=e.node.getBBox();return e.remove(),i}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new kt(t)},rbox:function(t){const e=At(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),i=new kt(e);return t?i.transform(t.screenCTM().inverseO()):i.addOffset()},inside:function(t,e){const i=this.bbox();return t>i.x&&e>i.y&&t=0;i--)null!=e[jt[t][i]]&&this.attr(jt.prefix(t,jt[t][i]),e[jt[t][i]]);return this},A(["Element","Runner"],e)})),A(["Element","Runner"],{matrix:function(t,e,i,a,s,r){return null==t?new vt(this):this.attr("transform",new vt(t,e,i,a,s,r))},rotate:function(t,e,i){return this.transform({rotate:t,ox:e,oy:i},!0)},skew:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:i},!0):this.transform({skew:[t,e],ox:i,oy:a},!0)},shear:function(t,e,i){return this.transform({shear:t,ox:e,oy:i},!0)},scale:function(t,e,i,a){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:i},!0):this.transform({scale:[t,e],ox:i,oy:a},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),A("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new _t(t)):this.rx(t).ry(e)}}),A("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new bt(this.node.getPointAtLength(t))}}),A(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}});A("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),A("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){const t=(this.attr("transform")||"").split(st).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(dt).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(vt.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new vt);return t},toParent:function(t,e){if(this===t)return this;if(X(this.node))return this.addTo(t,e);const i=this.screenCTM(),a=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(a.multiply(i)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new vt(this).decompose();return null==t?e:e[t]}vt.isMatrixLike(t)||(t={...t,origin:T(t,this)});const i=new vt(!0===e?this:e||!1).transform(t);return this.attr("transform",i)}});class Vt extends Gt{flatten(){return this.each((function(){if(this instanceof Vt)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(i,a){return a[a.length-i-1].toParent(t,e)})),this.remove()}}q(Vt,"Container");class Ut extends Vt{constructor(t,e=t){super(G("defs",t),e)}flatten(){return this}ungroup(){return this}}q(Ut,"Defs");class qt extends Gt{}function Zt(t){return this.attr("rx",t)}function $t(t){return this.attr("ry",t)}function Jt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Qt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Kt(t){return this.attr("cx",t)}function te(t){return this.attr("cy",t)}function ee(t){return null==t?2*this.rx():this.rx(new _t(t).divide(2))}function ie(t){return null==t?2*this.ry():this.ry(new _t(t).divide(2))}q(qt,"Shape");var ae=Object.freeze({__proto__:null,cx:Kt,cy:te,height:ie,rx:Zt,ry:$t,width:ee,x:Jt,y:Qt});class se extends qt{constructor(t,e=t){super(G("ellipse",t),e)}size(t,e){const i=I(this,t,e);return this.rx(new _t(i.width).divide(2)).ry(new _t(i.height).divide(2))}}Q(se,ae),A("Container",{ellipse:K((function(t=0,e=t){return this.put(new se).size(t,e).move(0,0)}))}),q(se,"Ellipse");class re extends Bt{constructor(t=O.document.createDocumentFragment()){super(t)}xml(t,e,i){if("boolean"==typeof t&&(i=e,e=t,t=null),null==t||"function"==typeof t){const t=new Bt(W("wrapper",i));return t.add(this.node.cloneNode(!0)),t.xml(!1,i)}return super.xml(t,!1,i)}}function ne(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new _t(t),fy:new _t(e)}):this.attr({x1:new _t(t),y1:new _t(e)})}function oe(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new _t(t),cy:new _t(e)}):this.attr({x2:new _t(t),y2:new _t(e)})}q(re,"Fragment");var le=Object.freeze({__proto__:null,from:ne,to:oe});class he extends Vt{constructor(t,e){super(G(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,i){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}Q(he,le),A({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:K((function(t,e){return this.put(new he(t)).update(e)}))}}),q(he,"Gradient");class ce extends Vt{constructor(t,e=t){super(G("pattern",t),e)}attr(t,e,i){return"transform"===t&&(t="patternTransform"),super.attr(t,e,i)}bbox(){return new kt}targets(){return Lt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}A({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:K((function(t,e,i){return this.put(new ce).update(i).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),q(ce,"Pattern");let de=class extends qt{constructor(t,e=t){super(G("image",t),e)}load(t,e){if(!t)return this;const i=new O.window.Image;return zt(i,"load",(function(t){const a=this.parent(ce);0===this.width()&&0===this.height()&&this.size(i.width,i.height),a instanceof ce&&0===a.width()&&0===a.height()&&a.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),zt(i,"load error",(function(){Xt(i)})),this.attr("href",i.src=t,H)}};var ue;ue=function(t,e,i){return"fill"!==t&&"stroke"!==t||ct.test(e)&&(e=i.root().defs().image(e)),e instanceof de&&(e=i.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Wt.push(ue),A({Container:{image:K((function(t,e){return this.put(new de).size(0,0).load(t,e)}))}}),q(de,"Image");class ge extends Dt{bbox(){let t=-1/0,e=-1/0,i=1/0,a=1/0;return this.forEach((function(s){t=Math.max(s[0],t),e=Math.max(s[1],e),i=Math.min(s[0],i),a=Math.min(s[1],a)})),new kt(i,a,t-i,e-a)}move(t,e){const i=this.bbox();if(t-=i.x,e-=i.y,!isNaN(t)&&!isNaN(e))for(let i=this.length-1;i>=0;i--)this[i]=[this[i][0]+t,this[i][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(dt).map(parseFloat)).length%2!=0&&t.pop();for(let i=0,a=t.length;i=0;i--)a.width&&(this[i][0]=(this[i][0]-a.x)*t/a.width+a.x),a.height&&(this[i][1]=(this[i][1]-a.y)*e/a.height+a.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,i=this.length;e":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,i,a){return function(s){return s<0?t>0?e/t*s:i>0?a/i*s:0:s>1?i<1?(1-a)/(1-i)*s+(a-i)/(1-i):t<1?(1-e)/(1-t)*s+(e-t)/(1-t):1:3*s*(1-s)**2*e+3*s**2*(1-s)*a+s**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let i=t;return"none"===e?--i:"both"===e&&++i,(a,s=!1)=>{let r=Math.floor(a*t);const n=a*r%1==0;return"start"!==e&&"both"!==e||++r,s&&n&&--r,a>=0&&r<0&&(r=0),a<=1&&r>i&&(r=i),r/i}}};class ye{done(){return!1}}class we extends ye{constructor(t=Ht){super(),this.ease=ve[t]||t}step(t,e,i){return"number"!=typeof t?i<1?t:e:t+(e-t)*this.ease(i)}}class ke extends ye{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,i,a){return this.stepper(t,e,i,a)}}function Ae(){const t=(this._duration||500)/1e3,e=this._overshoot||0,i=Math.PI,a=Math.log(e/100+1e-10),s=-a/Math.sqrt(i*i+a*a),r=3.9/(s*t);this.d=2*s*r,this.k=r*r}Q(class extends ke{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;i>100&&(i=16),i/=1e3;const s=a.velocity||0,r=-this.d*s-this.k*(t-e),n=t+s*i+r*i*i/2;return a.velocity=s+r*i,a.done=Math.abs(e-n)+Math.abs(s)<.002,a.done?e:n}},{duration:me("_duration",Ae),overshoot:me("_overshoot",Ae)});Q(class extends ke{constructor(t=.1,e=.01,i=0,a=1e3){super(),this.p(t).i(e).d(i).windup(a)}step(t,e,i,a){if("string"==typeof t)return t;if(a.done=i===1/0,i===1/0)return e;if(0===i)return t;const s=e-t;let r=(a.integral||0)+s*i;const n=(s-(a.error||0))/i,o=this._windup;return!1!==o&&(r=Math.max(-o,Math.min(r,o))),a.error=s,a.integral=r,a.done=Math.abs(s)<.001,a.done?e:t+(this.P*s+this.I*r+this.D*n)}},{windup:me("_windup"),p:me("P"),i:me("I"),d:me("D")});const Ce={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Se={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Le="mlhvqtcsaz".split("");for(let t=0,e=Le.length;t=0;a--)i=this[a][0],"M"===i||"L"===i||"T"===i?(this[a][1]+=t,this[a][2]+=e):"H"===i?this[a][1]+=t:"V"===i?this[a][1]+=e:"C"===i||"S"===i||"Q"===i?(this[a][1]+=t,this[a][2]+=e,this[a][3]+=t,this[a][4]+=e,"C"===i&&(this[a][5]+=t,this[a][6]+=e)):"A"===i&&(this[a][6]+=t,this[a][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let i=0,a="";const s={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new bt,p:new bt};for(;s.lastToken=a,a=t.charAt(i++);)if(s.inSegment||!Pe(s,a))if("."!==a)if(isNaN(parseInt(a)))if(Re.has(a))s.inNumber&&Ie(s,!1);else if("-"!==a&&"+"!==a)if("E"!==a.toUpperCase()){if(ut.test(a)){if(s.inNumber)Ie(s,!1);else{if(!Me(s))throw new Error("parser Error");Te(s)}--i}}else s.number+=a,s.hasExponent=!0;else{if(s.inNumber&&!Xe(s)){Ie(s,!1),--i;continue}s.number+=a,s.inNumber=!0}else{if("0"===s.number||ze(s)){s.inNumber=!0,s.number=a,Ie(s,!0);continue}s.inNumber=!0,s.number+=a}else{if(s.pointSeen||s.hasExponent){Ie(s,!1),--i;continue}s.inNumber=!0,s.pointSeen=!0,s.number+=a}return s.inNumber&&Ie(s,!1),s.inSegment&&Me(s)&&Te(s),s.segments}(t)}size(t,e){const i=this.bbox();let a,s;for(i.width=0===i.width?1:i.width,i.height=0===i.height?1:i.height,a=this.length-1;a>=0;a--)s=this[a][0],"M"===s||"L"===s||"T"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y):"H"===s?this[a][1]=(this[a][1]-i.x)*t/i.width+i.x:"V"===s?this[a][1]=(this[a][1]-i.y)*e/i.height+i.y:"C"===s||"S"===s||"Q"===s?(this[a][1]=(this[a][1]-i.x)*t/i.width+i.x,this[a][2]=(this[a][2]-i.y)*e/i.height+i.y,this[a][3]=(this[a][3]-i.x)*t/i.width+i.x,this[a][4]=(this[a][4]-i.y)*e/i.height+i.y,"C"===s&&(this[a][5]=(this[a][5]-i.x)*t/i.width+i.x,this[a][6]=(this[a][6]-i.y)*e/i.height+i.y)):"A"===s&&(this[a][1]=this[a][1]*t/i.width,this[a][2]=this[a][2]*e/i.height,this[a][6]=(this[a][6]-i.x)*t/i.width+i.x,this[a][7]=(this[a][7]-i.y)*e/i.height+i.y);return this}toString(){return function(t){let e="";for(let i=0,a=t.length;i{const e=typeof t;return"number"===e?_t:"string"===e?xt.isColor(t)?xt:dt.test(t)?ut.test(t)?Ee:Dt:tt.test(t)?_t:Oe:Ne.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Dt:"object"===e?_e:Oe};class He{constructor(t){this._stepper=t||new we("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Ye(t));let e=new this._type(t);return this._type===xt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===_e&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Oe{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Fe{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Fe.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Fe.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const De=(t,e)=>t[0]e[0]?1:0;class _e{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let i=0,a=e.length;it.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const i=e.shift(),a=e.shift(),s=e.shift(),r=e.splice(0,s);t[i]=new a(r)}return t}}const Ne=[Oe,Fe,_e];class We extends qt{constructor(t,e=t){super(G("path",t),e)}array(){return this._array||(this._array=new Ee(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Ee(t))}size(t,e){const i=I(this,t,e);return this.attr("d",this.array().size(i.width,i.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}We.prototype.MorphArray=Ee,A({Container:{path:K((function(t){return this.put(new We).plot(t||new Ee)}))}}),q(We,"Path");var Be=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new ge(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new ge(t))},size:function(t,e){const i=I(this,t,e);return this.attr("points",this.array().size(i.width,i.height))}});class Ge extends qt{constructor(t,e=t){super(G("polygon",t),e)}}A({Container:{polygon:K((function(t){return this.put(new Ge).plot(t||new ge)}))}}),Q(Ge,fe),Q(Ge,Be),q(Ge,"Polygon");class je extends qt{constructor(t,e=t){super(G("polyline",t),e)}}A({Container:{polyline:K((function(t){return this.put(new je).plot(t||new ge)}))}}),Q(je,fe),Q(je,Be),q(je,"Polyline");class Ve extends qt{constructor(t,e=t){super(G("rect",t),e)}}Q(Ve,{rx:Zt,ry:$t}),A({Container:{rect:K((function(t,e){return this.put(new Ve).size(t,e)}))}}),q(Ve,"Rect");class Ue{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const qe={nextDraw:null,frames:new Ue,timeouts:new Ue,immediates:new Ue,timer:()=>O.window.performance||O.window.Date,transforms:[],frame(t){const e=qe.frames.push({run:t});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},timeout(t,e){e=e||0;const i=qe.timer().now()+e,a=qe.timeouts.push({run:t,time:i});return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),a},immediate(t){const e=qe.immediates.push(t);return null===qe.nextDraw&&(qe.nextDraw=O.window.requestAnimationFrame(qe._draw)),e},cancelFrame(t){null!=t&&qe.frames.remove(t)},clearTimeout(t){null!=t&&qe.timeouts.remove(t)},cancelImmediate(t){null!=t&&qe.immediates.remove(t)},_draw(t){let e=null;const i=qe.timeouts.last();for(;(e=qe.timeouts.shift())&&(t>=e.time?e.run():qe.timeouts.push(e),e!==i););let a=null;const s=qe.frames.last();for(;a!==s&&(a=qe.frames.shift());)a.run(t);let r=null;for(;r=qe.immediates.shift();)r();qe.nextDraw=qe.timeouts.first()||qe.frames.first()?O.window.requestAnimationFrame(qe._draw):null}},Ze=function(t){const e=t.start,i=t.runner.duration();return{start:e,duration:i,end:e+i,runner:t.runner}},$e=function(){const t=O.window;return(t.performance||t.Date).now()};class Je extends Rt{constructor(t=$e){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const i=Math.abs(e);return this.speed(t?-i:i)}schedule(t,e,i){if(null==t)return this._runners.map(Ze);let a=0;const s=this.getEndTime();if(e=e||0,null==i||"last"===i||"after"===i)a=s;else if("absolute"===i||"start"===i)a=e,e=0;else if("now"===i)a=this._time;else if("relative"===i){const i=this.getRunnerInfoById(t.id);i&&(a=i.start+e,e=0)}else{if("with-last"!==i)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();a=t?t.start:this._time}}t.unschedule(),t.timeline(this);const r=t.persist(),n={persist:null===r?this._persist:r,start:a+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(n),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return qe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=qe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let i=e-this._lastSourceTime;t&&(i=0);const a=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=a,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],i=e.runner;this._time-e.start<=0&&i.reset()}let s=!1;for(let t=0,e=this._runners.length;t0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}A({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Je,this._timeline):(this._timeline=t,this)}}});class Qe extends Rt{constructor(t){super(),this.id=Qe.id++,t="function"==typeof(t=null==t?Yt:t)?new ke(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ke,this._stepper=this._isDeclarative?t:new we,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new vt,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,i){let a=1,s=!1,r=0;return e=e??Ot,i=i||"last","object"!=typeof(t=t??Yt)||t instanceof ye||(e=t.delay??e,i=t.when??i,s=t.swing||s,a=t.times??a,r=t.wait??r,t=t.duration??Yt),{duration:t,delay:e,swing:s,times:a,wait:r,when:i}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,i){const a=Qe.sanitise(t,e,i),s=new Qe(a.duration);return this._timeline&&s.timeline(this._timeline),this._element&&s.element(this._element),s.loop(a).schedule(a.delay,a.when)}clearTransform(){return this.transforms=new vt,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new we(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,i){return"object"==typeof t&&(e=t.swing,i=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=i||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),i=(this._time-t*e)/this._duration;return Math.min(t+i,this._times)}const i=t%1,a=e*Math.floor(t)+this._duration*i;return this.time(a)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,i=this._duration,a=this._wait,s=this._times,r=this._swing,n=this._reverse;let o;if(null==t){const t=function(t){const e=r*Math.floor(t%(2*(a+i))/(a+i)),s=e&&!n||!e&&n,o=Math.pow(-1,s)*(t%(a+i))/i+s;return Math.max(Math.min(o,1),0)},l=s*(a+i)-a;return o=e<=0?Math.round(t(1e-5)):e=0;this._lastPosition=e;const a=this.duration(),s=this._lastTime<=0&&this._time>0,r=this._lastTime=a;this._lastTime=this._time,s&&this.fire("start",this);const n=this._isDeclarative;this.done=!n&&!r&&this._time>=a,this._reseted=!1;let o=!1;return(i||n)&&(this._initialise(i),this.transforms=new vt,o=this._run(n?t:e),this.fire("step",this)),this.done=this.done||o&&n,r&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,i=this._queue.length;et.lmultiplyO(e),ei=t=>t.transforms;function ii(){const t=this._transformationRunners.runners.map(ei).reduce(ti,new vt);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class ai{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Ke).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const i=this.ids.indexOf(t+1);return this.ids.splice(i,1,t+1),this.runners.splice(i,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;ee.id<=t.id)).map(ei).reduce(ti,new vt)},_addRunner(t){this._transformationRunners.add(t),qe.cancelImmediate(this._frameId),this._frameId=qe.immediate(ii.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new ai).add(new Ke(new vt(this))))}}});Q(Qe,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,i){if("string"==typeof e)return this.styleAttr(t,{[e]:i});let a=e;if(this._tryRetarget(t,a))return this;let s=new He(this._stepper).to(a),r=Object.keys(a);return this.queue((function(){s=s.from(this.element()[t](r))}),(function(e){return this.element()[t](s.at(e).valueOf()),s.done()}),(function(e){const i=Object.keys(e),n=(o=r,i.filter((t=>!o.includes(t))));var o;if(n.length){const e=this.element()[t](n),i=new _e(s.from()).valueOf();Object.assign(i,e),s.from(i)}const l=new _e(s.to()).valueOf();Object.assign(l,e),s.to(l),r=i,a=e})),this._rememberMorpher(t,s),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let i=new He(this._stepper).to(new _t(t));return this.queue((function(){i=i.from(this.element().zoom())}),(function(t){return this.element().zoom(i.at(t),e),i.done()}),(function(t,a){e=a,i.to(t)})),this._rememberMorpher("zoom",i),this},transform(t,e,i){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const a=vt.isMatrixLike(t);i=null!=t.affine?t.affine:null!=i?i:!a;const s=new He(this._stepper).type(i?Fe:vt);let r,n,o,l,h;return this.queue((function(){n=n||this.element(),r=r||T(t,n),h=new vt(e?void 0:n),n._addRunner(this),e||n._clearTransformRunnersBefore(this)}),(function(c){e||this.clearTransform();const{x:d,y:u}=new bt(r).transform(n._currentTransform(this));let g=new vt({...t,origin:[d,u]}),p=this._isDeclarative&&o?o:h;if(i){g=g.decompose(d,u),p=p.decompose(d,u);const t=g.rotate,e=p.rotate,i=[t-360,t,t+360],a=i.map((t=>Math.abs(t-e))),s=Math.min(...a),r=a.indexOf(s);g.rotate=i[r]}e&&(a||(g.rotate=t.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),s.from(p),s.to(g);const f=s.at(c);return l=f.rotate,o=new vt(f),this.addTransform(o),n._addRunner(this),s.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(r=T(e,n)),t={...e,origin:r}}),!0),this._isDeclarative&&this._rememberMorpher("transform",s),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new _t(e),this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);let a=null;return this.queue((function(){a=this.element()[t](),i.from(a),i.to(a+e)}),(function(e){return this.element()[t](i.at(e)),i.done()}),(function(t){i.to(a+new _t(t))})),this._rememberMorpher(t,i),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const i=new He(this._stepper).to(e);return this.queue((function(){i.from(this.element()[t]())}),(function(e){return this.element()[t](i.at(e)),i.done()})),this._rememberMorpher(t,i),this},_queueNumber(t,e){return this._queueObject(t,new _t(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let i;return t&&e||(i=this._element.bbox()),t||(t=i.width/i.height*e),e||(e=i.height/i.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,i,a){if(4===arguments.length)return this.plot([t,e,i,a]);if(this._tryRetarget("plot",t))return this;const s=new He(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){s.from(this._element.array())}),(function(t){return this._element.plot(s.at(t)),s.done()})),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,i,a){return this._queueObject("viewbox",new kt(t,e,i,a))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Q(Qe,{rx:Zt,ry:$t,from:ne,to:oe}),q(Qe,"Runner");class si extends Vt{constructor(t,e=t){super(G("svg",t),e),this.namespace()}defs(){return this.isRoot()?V(this.node.querySelector("defs"))||this.put(new Ut):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof O.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:E,version:"1.1"}).attr("xmlns:xlink",H,Y):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Y).attr("xmlns:svgjs",null,Y)}root(){return this.isRoot()?this:super.root()}}A({Container:{nested:K((function(){return this.put(new si)}))}}),q(si,"Svg",!0);let ri=class extends Vt{constructor(t,e=t){super(G("symbol",t),e)}};A({Container:{symbol:K((function(){return this.put(new ri)}))}}),q(ri,"Symbol");var ni=Object.freeze({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,i=this.bbox()){return this.cx(t,i).cy(e,i)},cx:function(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,i=this.bbox()){return this.x(t,i).y(e,i)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(O.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}});class oi extends qt{constructor(t,e=t){super(G("text",t),e),this.dom.leading=this.dom.leading??new _t(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new _t(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const i=this.dom.leading;this.each((function(a){if(X(this.node))return;const s=O.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=i*new _t(s);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=r:(this.attr("dy",a?r+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new _t(t.leading||1.3),this}writeDataToDom(){return R(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let i=0;t="";for(let a=0,s=e.length;a{let a;try{a=i.node instanceof F().SVGSVGElement?new kt(i.attr(["x","y","width","height"])):i.bbox()}catch(t){return}const s=new vt(i),r=s.translate(t,e).transform(s.inverse()),n=new bt(a.x,a.y).transform(r);i.move(n.x,n.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,i=this.bbox()){const a=t-i.x,s=e-i.y;return this.dmove(a,s)},size:function(t,e,i=this.bbox()){const a=I(this,t,e,i),s=a.width/i.width,r=a.height/i.height;return this.children().forEach((t=>{const e=new bt(i).transform(new vt(t).inverse());t.scale(s,r,e.x,e.y)})),this},width:function(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}});class gi extends Vt{constructor(t,e=t){super(G("g",t),e)}}Q(gi,ui),A({Container:{group:K((function(){return this.put(new gi)}))}}),q(gi,"G");class pi extends Vt{constructor(t,e=t){super(G("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,H)}}Q(pi,ui),A({Container:{link:K((function(t){return this.put(new pi).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const i=e.index(t);return e.add(this,i),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new pi,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),q(pi,"A");class fi extends Vt{constructor(t,e=t){super(G("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Lt("svg [mask*="+this.id()+"]")}}A({Container:{mask:K((function(){return this.defs().put(new fi)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof fi?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),q(fi,"Mask");class xi extends Gt{constructor(t,e=t){super(G("stop",t),e)}update(t){return("number"==typeof t||t instanceof _t)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new _t(t.offset)),this}}A({Gradient:{stop:function(t,e,i){return this.put(new xi).update(t,e,i)}}}),q(xi,"Stop");class bi extends Gt{constructor(t,e=t){super(G("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,i={}){return this.rule("@font-face",{fontFamily:t,src:e,...i})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let i=t+"{";for(const t in e)i+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return i+="}",i}(t,e))}}A("Dom",{style(t,e){return this.put(new bi).rule(t,e)},fontface(t,e,i){return this.put(new bi).font(t,e,i)}}),q(bi,"Style");class mi extends oi{constructor(t,e=t){super(G("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let i=null;return e&&(i=e.plot(t)),null==t?i:this}track(){return this.reference("href")}}A({Container:{textPath:K((function(t,e){return t instanceof oi||(t=this.text(t)),t.path(e)}))},Text:{path:K((function(t,e=!0){const i=new mi;let a;if(t instanceof We||(t=this.defs().path(t)),i.attr("href","#"+t,H),e)for(;a=this.node.firstChild;)i.node.appendChild(a);return this.put(i)})),textPath(){return this.findOne("textPath")}},Path:{text:K((function(t){return t instanceof oi||(t=(new oi).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Lt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),mi.prototype.MorphArray=Ee,q(mi,"TextPath");class vi extends qt{constructor(t,e=t){super(G("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,H)}}A({Container:{use:K((function(t,e){return this.put(new vi).use(t,e)}))}}),q(vi,"Use");const yi=B;Q([si,ri,de,ce,be],C("viewbox")),Q([xe,je,Ge,We],C("marker")),Q(oi,C("Text")),Q(We,C("Path")),Q(Ut,C("Defs")),Q([oi,li],C("Tspan")),Q([Ve,se,he,Qe],C("radius")),Q(Rt,C("EventTarget")),Q(Bt,C("Dom")),Q(Gt,C("Element")),Q(qt,C("Shape")),Q([Vt,re],C("Container")),Q(he,C("Gradient")),Q(Qe,C("Runner")),Ct.extend([...new Set(k)]),function(t=[]){Ne.push(...[].concat(t))}([_t,xt,kt,vt,Dt,ge,Ee,bt]),Q(Ne,{to(t){return(new He).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,i,a,s){return this.fromArray(t.map((function(t,r){return a.step(t,e[r],i,s[r],s)})))}});class wi extends Gt{constructor(t){super(G("filter",t),t),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(t,e){return!(t=super.put(t,e)).attr("in")&&this.$autoSetIn&&t.attr("in",this.$source),t.attr("result")||t.attr("result",t.id()),t}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return Lt('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class ki extends Gt{constructor(t,e){super(t,e),this.result(this.id())}in(t){if(null==t){const t=this.attr("in");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in",t)}result(t){return this.attr("result",t)}toString(){return this.result()}}const Ai=t=>function(...e){for(let i=t.length;i--;)null!=e[i]&&this.attr(t[i],e[i])},Ci={blend:Ai(["in","in2","mode"]),colorMatrix:Ai(["type","values"]),composite:Ai(["in","in2","operator"]),convolveMatrix:function(t){t=new Dt(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Ai(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Ai(["in","dx","dy","stdDeviation"]),flood:Ai(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,H)},morphology:Ai(["operator","radius"]),offset:Ai(["dx","dy"]),specularLighting:Ai(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Ai([]),turbulence:Ai(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach((t=>{const e=P(t),i=Ci[t];wi[e+"Effect"]=class extends ki{constructor(t){super(G("fe"+e,t),t)}update(t){return i.apply(this,t),this}},wi.prototype[t]=K((function(t,...i){const a=new wi[e+"Effect"];return null==t?this.put(a):("function"==typeof t?t.call(a,a):i.unshift(t),this.put(a).update(i))}))})),Q(wi,{merge(t){const e=this.put(new wi.MergeEffect);if("function"==typeof t)return t.call(e,e),e;return(t instanceof Array?t:[...arguments]).forEach((t=>{t instanceof wi.MergeNode?e.put(t):e.mergeNode(t)})),e},componentTransfer(t={}){const e=this.put(new wi.ComponentTransferEffect);if("function"==typeof t)return t.call(e,e),e;if(!(t.r||t.g||t.b||t.a)){t={r:t,g:t,b:t,a:t}}for(const i in t)e.add(new(wi["Func"+i.toUpperCase()])(t[i]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach((t=>{const e=P(t);wi[e]=class extends ki{constructor(t){super(G("fe"+e,t),t)}}}));["funcR","funcG","funcB","funcA"].forEach((function(t){const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.ComponentTransferEffect.prototype[t]=i}));["distantLight","pointLight","spotLight"].forEach((t=>{const e=wi[P(t)],i=K((function(){return this.put(new e)}));wi.DiffuseLightingEffect.prototype[t]=i,wi.SpecularLightingEffect.prototype[t]=i})),Q(wi.MergeEffect,{mergeNode(t){return this.put(new wi.MergeNode).attr("in",t)}}),Q(Ut,{filter:function(t){const e=this.put(new wi);return"function"==typeof t&&t.call(e,e),e}}),Q(Vt,{filter:function(t){return this.defs().filter(t)}}),Q(Gt,{filterWith:function(t){const e=t instanceof wi?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const Si={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,i,a){return this.parent()&&this.parent().diffuseLighting(t,i,a).in(this)},displacementMap:function(t,e,i,a){return this.parent()&&this.parent().displacementMap(this,t,e,i,a)},dropShadow:function(t,e,i){return this.parent()&&this.parent().dropShadow(this,t,e,i).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){return t=t instanceof Array?t:[...t],this.parent()&&this.parent().merge(this,...t)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,i,a,s){return this.parent()&&this.parent().specularLighting(t,i,a,s).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,i,a,s){return this.parent()&&this.parent().turbulence(t,e,i,a,s).in(this)}};Q(ki,Si),Q(wi.MergeEffect,{in:function(t){return t instanceof wi.MergeNode?this.add(t,0):this.add((new wi.MergeNode).in(t),0),this}}),Q([wi.CompositeEffect,wi.BlendEffect,wi.DisplacementMapEffect],{in2:function(t){if(null==t){const t=this.attr("in2");return this.parent()&&this.parent().find(`[result="${t}"]`)[0]||t}return this.attr("in2",t)}}),wi.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var Li=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getDefaultFilter",value:function(t,e){var i=this.w;t.unfilter(!0),(new wi).size("120%","180%","-5%","-40%"),i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}},{key:"applyFilter",value:function(t,e,i){var a,s=this,r=this.w;if(t.unfilter(!0),"none"!==i){var n,o,l=r.config.chart.dropShadow,h="lighten"===i?2:.3;if(t.filterWith((function(t){t.colorMatrix({type:"matrix",values:"\n ".concat(h," 0 0 0 0\n 0 ").concat(h," 0 0 0\n 0 0 ").concat(h," 0 0\n 0 0 0 1 0\n "),in:"SourceGraphic",result:"brightness"}),l.enabled&&s.addShadow(t,e,l,"brightness")})),!l.noUserSpaceOnUse)null===(n=t.filterer())||void 0===n||null===(o=n.node)||void 0===o||o.setAttribute("filterUnits","userSpaceOnUse");this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node)}else this.getDefaultFilter(t,e)}},{key:"addShadow",value:function(t,e,i,a){var s,r=this.w,n=i.blur,o=i.top,l=i.left,h=i.color,c=i.opacity;if(h=Array.isArray(h)?h[e]:h,(null===(s=r.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:a,dx:l,dy:o,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:n,result:"blur"}),t.flood({"flood-color":h,"flood-opacity":c,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",a])}},{key:"dropShadow",value:function(t,e){var i,a,s,r=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.w;if(t.unfilter(!0),v.isMsEdge()&&"radialBar"===o.config.chart.type)return t;if((null===(i=o.config.chart.dropShadow.enabledOnSeries)||void 0===i?void 0:i.length)>0&&-1===(null===(s=o.config.chart.dropShadow.enabledOnSeries)||void 0===s?void 0:s.indexOf(n)))return t;return t.filterWith((function(t){r.addShadow(t,n,e,"SourceGraphic")})),e.noUserSpaceOnUse||t.filterer().node.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null===(a=t.filterer())||void 0===a?void 0:a.node),t}},{key:"setSelectionFilter",value:function(t,e,i){var a=this.w;if(void 0!==a.globals.selectedDataPoints[e]&&a.globals.selectedDataPoints[e].indexOf(i)>-1){t.node.setAttribute("selected",!0);var s=a.config.states.active.filter;"none"!==s&&this.applyFilter(t,e,s.type)}}},{key:"_scaleFilterSize",value:function(t){if(t){!function(e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}}]),t}(),Mi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"roundPathCorners",value:function(t,e){function i(t,e,i){var s=e.x-t.x,r=e.y-t.y,n=Math.sqrt(s*s+r*r);return a(t,e,Math.min(1,i/n))}function a(t,e,i){return{x:t.x+(e.x-t.x)*i,y:t.y+(e.y-t.y)*i}}function s(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function r(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var n=t.split(/[,\s]/).reduce((function(t,e){var i=e.match("([a-zA-Z])(.+)");return i?(t.push(i[1]),t.push(i[2])):t.push(e),t}),[]).reduce((function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t}),[]),o=[];if(n.length>1){var l=r(n[0]),h=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(h=["L",l.x,l.y],n[n.length-1]=h),o.push(n[0]);for(var c=1;c2&&"L"==u[0]&&g.length>2&&"L"==g[0]){var p,f,x=r(d),b=r(u),m=r(g);p=i(b,x,e),f=i(b,m,e),s(u,p),u.origPoint=b,o.push(u);var v=a(p,b,.5),y=a(b,f,.5),w=["C",v.x,v.y,y.x,y.y,f.x,f.y];w.origPoint=b,o.push(w)}else o.push(u)}if(h){var k=r(o[o.length-1]);o.push(["Z"]),s(o[0],k)}}else o=n;return o.reduce((function(t,e){return t+e.join(" ")+" "}),"")}},{key:"drawLine",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"#a8a8a8",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:a,stroke:s,"stroke-dasharray":r,"stroke-width":n,"stroke-linecap":o})}},{key:"drawRect",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"#fefefe",n=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:null,l=arguments.length>8&&void 0!==arguments[8]?arguments[8]:null,h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:0,c=this.w.globals.dom.Paper.rect();return c.attr({x:t,y:e,width:i>0?i:0,height:a>0?a:0,rx:s,ry:s,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":h}),c.node.setAttribute("fill",r),c}},{key:"drawPolygon",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#e1e1e1",i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(t).attr({fill:a,stroke:e,"stroke-width":i})}},{key:"drawCircle",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t<0&&(t=0);var i=this.w.globals.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}},{key:"drawPath",value:function(t){var e=t.d,i=void 0===e?"":e,a=t.stroke,s=void 0===a?"#a8a8a8":a,r=t.strokeWidth,n=void 0===r?1:r,o=t.fill,l=t.fillOpacity,h=void 0===l?1:l,c=t.strokeOpacity,d=void 0===c?1:c,u=t.classes,g=t.strokeLinecap,p=void 0===g?null:g,f=t.strokeDashArray,x=void 0===f?0:f,b=this.w;return null===p&&(p=b.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(b.globals.gridHeight)),b.globals.dom.Paper.path(i).attr({fill:o,"fill-opacity":h,stroke:s,"stroke-opacity":d,"stroke-linecap":p,"stroke-width":n,"stroke-dasharray":x,class:u})}},{key:"group",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w.globals.dom.Paper.group();return null!==t&&e.attr(t),e}},{key:"move",value:function(t,e){var i=["M",t,e].join(" ");return i}},{key:"line",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=null;return null===i?a=[" L",t,e].join(" "):"H"===i?a=[" H",t].join(" "):"V"===i&&(a=[" V",e].join(" ")),a}},{key:"curve",value:function(t,e,i,a,s,r){var n=["C",t,e,i,a,s,r].join(" ");return n}},{key:"quadraticCurve",value:function(t,e,i,a){return["Q",t,e,i,a].join(" ")}},{key:"arc",value:function(t,e,i,a,s,r,n){var o="A";arguments.length>7&&void 0!==arguments[7]&&arguments[7]&&(o="a");var l=[o,t,e,i,a,s,r,n].join(" ");return l}},{key:"renderPaths",value:function(t){var e,i=t.j,a=t.realIndex,s=t.pathFrom,r=t.pathTo,n=t.stroke,o=t.strokeWidth,l=t.strokeLinecap,h=t.fill,c=t.animationDelay,d=t.initialSpeed,g=t.dataChangeSpeed,p=t.className,f=t.chartType,x=t.shouldClipToGrid,b=void 0===x||x,m=t.bindEventsOnPaths,v=void 0===m||m,w=t.drawShadow,k=void 0===w||w,A=this.w,C=new Li(this.ctx),S=new y(this.ctx),L=this.w.config.chart.animations.enabled,M=L&&this.w.config.chart.animations.dynamicAnimation.enabled,P=!!(L&&!A.globals.resized||M&&A.globals.dataChanged&&A.globals.shouldAnimate);P?e=s:(e=r,A.globals.animationEnded=!0);var I=A.config.stroke.dashArray,T=0;T=Array.isArray(I)?I[a]:A.config.stroke.dashArray;var z=this.drawPath({d:e,stroke:n,strokeWidth:o,fill:h,fillOpacity:1,classes:p,strokeLinecap:l,strokeDashArray:T});z.attr("index",a),b&&("bar"===f&&!A.globals.isHorizontal||A.globals.comboCharts?z.attr({"clip-path":"url(#gridRectBarMask".concat(A.globals.cuid,")")}):z.attr({"clip-path":"url(#gridRectMask".concat(A.globals.cuid,")")})),A.config.chart.dropShadow.enabled&&k&&C.dropShadow(z,A.config.chart.dropShadow,a),v&&(z.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,z)),z.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,z)),z.node.addEventListener("mousedown",this.pathMouseDown.bind(this,z))),z.attr({pathTo:r,pathFrom:s});var X={el:z,j:i,realIndex:a,pathFrom:s,pathTo:r,fill:h,strokeWidth:o,delay:c};return!L||A.globals.resized||A.globals.dataChanged?!A.globals.resized&&A.globals.dataChanged||S.showDelayedElements():S.animatePathsGradually(u(u({},X),{},{speed:d})),A.globals.dataChanged&&M&&P&&S.animatePathsGradually(u(u({},X),{},{speed:g})),z}},{key:"drawPattern",value:function(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"#a8a8a8",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return this.w.globals.dom.Paper.pattern(e,i,(function(r){"horizontalLines"===t?r.line(0,0,i,0).stroke({color:a,width:s+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:a,width:s+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:a,width:s}):"squares"===t?r.rect(e,i).fill("none").stroke({color:a,width:s}):"circles"===t&&r.circle(e).fill("none").stroke({color:a,width:s})}))}},{key:"drawGradient",value:function(t,e,i,a,s){var r,n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],h=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,c=this.w;e.length<9&&0===e.indexOf("#")&&(e=v.hexToRgba(e,a)),i.length<9&&0===i.indexOf("#")&&(i=v.hexToRgba(i,s));var d=0,u=1,g=1,p=null;null!==o&&(d=void 0!==o[0]?o[0]/100:0,u=void 0!==o[1]?o[1]/100:1,g=void 0!==o[2]?o[2]/100:1,p=void 0!==o[3]?o[3]/100:null);var f=!("donut"!==c.config.chart.type&&"pie"!==c.config.chart.type&&"polarArea"!==c.config.chart.type&&"bubble"!==c.config.chart.type);if(r=l&&0!==l.length?c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){(Array.isArray(l[h])?l[h]:l).forEach((function(e){t.stop(e.offset/100,e.color,e.opacity)}))})):c.globals.dom.Paper.gradient(f?"radial":"linear",(function(t){t.stop(d,e,a),t.stop(u,i,s),t.stop(g,i,s),null!==p&&t.stop(p,e,a)})),f){var x=c.globals.gridWidth/2,b=c.globals.gridHeight/2;"bubble"!==c.config.chart.type?r.attr({gradientUnits:"userSpaceOnUse",cx:x,cy:b,r:n}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?r.from(0,0).to(0,1):"diagonal"===t?r.from(0,0).to(1,1):"horizontal"===t?r.from(0,1).to(1,1):"diagonal2"===t&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(t){var e=t.text,i=t.maxWidth,a=t.fontSize,s=t.fontFamily,r=this.getTextRects(e,a,s),n=r.width/e.length,o=Math.floor(i/n);return i-1){var o=i.globals.selectedDataPoints[s].indexOf(r);i.globals.selectedDataPoints[s].splice(o,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var l=i.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),h=i.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),c=function(t){Array.prototype.forEach.call(t,(function(t){t.node.setAttribute("selected","false"),a.getDefaultFilter(t,s)}))};c(l),c(h)}t.node.setAttribute("selected","true"),n="true",void 0===i.globals.selectedDataPoints[s]&&(i.globals.selectedDataPoints[s]=[]),i.globals.selectedDataPoints[s].push(r)}if("true"===n){var d=i.config.states.active.filter;if("none"!==d)a.applyFilter(t,s,d.type);else if("none"!==i.config.states.hover.filter&&!i.globals.isTouchDevice){var u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}}else if("none"!==i.config.states.active.filter.type)if("none"===i.config.states.hover.filter.type||i.globals.isTouchDevice)a.getDefaultFilter(t,s);else{u=i.config.states.hover.filter;a.applyFilter(t,s,u.type)}"function"==typeof i.config.chart.events.dataPointSelection&&i.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}),e&&this.ctx.events.fireEvent("dataPointSelection",[e,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:s,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(t){var e={};return t&&"function"==typeof t.getBBox&&(e=t.getBBox()),{x:e.x+e.width/2,y:e.y+e.height/2}}},{key:"getTextRects",value:function(t,e,i,a){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],r=this.w,n=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:i,foreColor:"#fff",opacity:0});a&&n.attr("transform",a),r.globals.dom.Paper.add(n);var o=n.bbox();return s||(o=n.node.getBoundingClientRect()),n.remove(),{width:o.width,height:o.height}}},{key:"placeTextWithEllipsis",value:function(t,e,i){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=i/1.1)){for(var a=e.length-3;a>0;a-=3)if(t.getSubStringLength(0,a)<=i/1.1)return void(t.textContent=e.substring(0,a)+"...");t.textContent="."}}}],[{key:"setAttrs",value:function(t,e){for(var i in e)e.hasOwnProperty(i)&&t.setAttribute(i,e[i])}}]),t}(),Pi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getStackedSeriesTotals",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.w,i=[];if(0===e.globals.series.length)return i;for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:null;return null===t?this.w.config.series.reduce((function(t,e){return t+e}),0):this.w.globals.series[t].reduce((function(t,e){return t+e}),0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var t=this,e=this.w,i=[];return e.globals.seriesGroups.forEach((function(a){var s=[];e.config.series.forEach((function(t,i){a.indexOf(e.globals.seriesNames[i])>-1&&s.push(i)}));var r=e.globals.series.map((function(t,e){return-1===s.indexOf(e)?e:-1})).filter((function(t){return-1!==t}));i.push(t.getStackedSeriesTotals(r))})),i}},{key:"setSeriesYAxisMappings",value:function(){var t=this.w.globals,e=this.w.config,i=[],a=[],s=[],r=t.series.length>e.yaxis.length||e.yaxis.some((function(t){return Array.isArray(t.seriesName)}));e.series.forEach((function(t,e){s.push(e),a.push(null)})),e.yaxis.forEach((function(t,e){i[e]=[]}));var n=[];e.yaxis.forEach((function(t,a){var o=!1;if(t.seriesName){var l=[];Array.isArray(t.seriesName)?l=t.seriesName:l.push(t.seriesName),l.forEach((function(t){e.series.forEach((function(e,n){if(e.name===t){var l=n;a===n||r?!r||s.indexOf(n)>-1?i[a].push([a,n]):console.warn("Series '"+e.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[n].push([n,a]),l=a),o=!0,-1!==(l=s.indexOf(l))&&s.splice(l,1)}}))}))}o||n.push(a)})),i=i.map((function(t,e){var i=[];return t.forEach((function(t){a[t[1]]=t[0],i.push(t[1])})),i}));for(var o=e.yaxis.length-1,l=0;l0&&void 0!==arguments[0]?arguments[0]:null;return 0===(null===t?this.w.config.series.filter((function(t){return null!==t})):this.w.config.series[t].data.filter((function(t){return null!==t}))).length}},{key:"seriesHaveSameValues",value:function(t){return this.w.globals.series[t].every((function(t,e,i){return t===i[0]}))}},{key:"getCategoryLabels",value:function(t){var e=this.w,i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map((function(t,i){return e.config.xaxis.labels.formatter(t-e.globals.minX+1)}))),i}},{key:"getLargestSeries",value:function(){var t=this.w;t.globals.maxValsInArrayIndex=t.globals.series.map((function(t){return t.length})).indexOf(Math.max.apply(Math,t.globals.series.map((function(t){return t.length}))))}},{key:"getLargestMarkerSize",value:function(){var t=this.w,e=0;return t.globals.markers.size.forEach((function(t){e=Math.max(e,t)})),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach((function(t){e=Math.max(e,t.size)})),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}},{key:"getSeriesTotals",value:function(){var t=this.w;t.globals.seriesTotals=t.globals.series.map((function(t,e){var i=0;if(Array.isArray(t))for(var a=0;at&&i.globals.seriesX[s][n]0){var g=function(t,e){var i=s.config.yaxis[s.globals.seriesYAxisReverseMap[e]],r=t<0?-1:1;return t=Math.abs(t),i.logarithmic&&(t=a.getBaseLog(i.logBase,t)),-r*t/n[e]};if(r.isMultipleYAxis){l=[];for(var p=0;p0&&e.forEach((function(e){var n=[],o=[];t.i.forEach((function(i,a){s.config.series[i].group===e&&(n.push(t.series[a]),o.push(i))})),n.length>0&&r.push(a.draw(n,i,o))})),r}}],[{key:"checkComboSeries",value:function(t,e){var i=!1,a=0,s=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach((function(t){"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||a++,void 0!==t.type&&t.type!==e&&s++})),s>0&&(i=!0),{comboBarCount:a,comboCharts:i}}},{key:"extendArrayProps",value:function(t,e,i){var a,s,r,n,o,l;(null!==(a=e)&&void 0!==a&&a.yaxis&&(e=t.extendYAxis(e,i)),null!==(s=e)&&void 0!==s&&s.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),null!==(r=e)&&void 0!==r&&null!==(n=r.annotations)&&void 0!==n&&n.xaxis&&(e=t.extendXAxisAnnotations(e)),null!==(o=e)&&void 0!==o&&null!==(l=o.annotations)&&void 0!==l&&l.points&&(e=t.extendPointAnnotations(e)));return e}}]),t}(),Ii=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e}return s(t,[{key:"setOrientations",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.w;if("vertical"===t.label.orientation){var a=null!==e?e:0,s=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(a,"']"));if(null!==s){var r=s.getBoundingClientRect();s.setAttribute("x",parseFloat(s.getAttribute("x"))-r.height+4);var n="top"===t.label.position?r.width:-r.width;s.setAttribute("y",parseFloat(s.getAttribute("y"))+n);var o=this.annoCtx.graphics.rotateAroundCenter(s),l=o.x,h=o.y;s.setAttribute("transform","rotate(-90 ".concat(l," ").concat(h,")"))}}}},{key:"addBackgroundToAnno",value:function(t,e){var i=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;var a=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),s=t.getBoundingClientRect(),r=e.label.style.padding,n=r.left,o=r.right,l=r.top,h=r.bottom;if("vertical"===e.label.orientation){var c=[n,o,l,h];l=c[0],h=c[1],n=c[2],o=c[3]}var d=s.left-a.left-n,u=s.top-a.top-l,g=this.annoCtx.graphics.drawRect(d-i.globals.barPadForNumericAxis,u,s.width+n+o,s.height+l+h,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&g.node.classList.add(e.id),g}},{key:"annotationsBackground",value:function(){var t=this,e=this.w,i=function(i,a,s){var r=e.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(a,"']"));if(r){var n=r.parentNode,o=t.addBackgroundToAnno(r,i);o&&(n.insertBefore(o.node,r),i.label.mouseEnter&&o.node.addEventListener("mouseenter",i.label.mouseEnter.bind(t,i)),i.label.mouseLeave&&o.node.addEventListener("mouseleave",i.label.mouseLeave.bind(t,i)),i.label.click&&o.node.addEventListener("click",i.label.click.bind(t,i)))}};e.config.annotations.xaxis.forEach((function(t,e){return i(t,e,"xaxis")})),e.config.annotations.yaxis.forEach((function(t,e){return i(t,e,"yaxis")})),e.config.annotations.points.forEach((function(t,e){return i(t,e,"point")}))}},{key:"getY1Y2",value:function(t,e){var i,a=this.w,s="y1"===t?e.y:e.y2,r=!1;if(this.annoCtx.invertAxis){var n=a.config.xaxis.convertedCatToNumeric?a.globals.categoryLabels:a.globals.labels,o=n.indexOf(s),l=a.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(o+1,")"));i=l?parseFloat(l.getAttribute("y")):(a.globals.gridHeight/n.length-1)*(o+1)-a.globals.barHeight,void 0!==e.seriesIndex&&a.globals.barHeight&&(i-=a.globals.barHeight/2*(a.globals.series.length-1)-a.globals.barHeight*e.seriesIndex)}else{var h,c=a.globals.seriesYAxisMap[e.yAxisIndex][0],d=a.config.yaxis[e.yAxisIndex].logarithmic?new Pi(this.annoCtx.ctx).getLogVal(a.config.yaxis[e.yAxisIndex].logBase,s,c)/a.globals.yLogRatio[c]:(s-a.globals.minYArr[c])/(a.globals.yRange[c]/a.globals.gridHeight);i=a.globals.gridHeight-Math.min(Math.max(d,0),a.globals.gridHeight),r=d>a.globals.gridHeight||d<0,!e.marker||void 0!==e.y&&null!==e.y||(i=0),null!==(h=a.config.yaxis[e.yAxisIndex])&&void 0!==h&&h.reversed&&(i=d)}return"string"==typeof s&&s.includes("px")&&(i=parseFloat(s)),{yP:i,clipped:r}}},{key:"getX1X2",value:function(t,e){var i=this.w,a="x1"===t?e.x:e.x2,s=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,r=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,n=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,o=!1,l=this.annoCtx.inversedReversedAxis?(r-a)/(n/i.globals.gridWidth):(a-s)/(n/i.globals.gridWidth);return"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||i.config.chart.sparkline.enabled||(l=this.getStringX(a)),"string"==typeof a&&a.includes("px")&&(l=parseFloat(a)),null==a&&e.marker&&(l=i.globals.gridWidth),void 0!==e.seriesIndex&&i.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=i.globals.barWidth/2*(i.globals.series.length-1)-i.globals.barWidth*e.seriesIndex),l>i.globals.gridWidth?(l=i.globals.gridWidth,o=!0):l<0&&(l=0,o=!0),{x:l,clipped:o}}},{key:"getStringX",value:function(t){var e=this.w,i=t;e.config.xaxis.convertedCatToNumeric&&e.globals.categoryLabels.length&&(t=e.globals.categoryLabels.indexOf(t)+1);var a=e.globals.labels.map((function(t){return Array.isArray(t)?t.join(" "):t})).indexOf(t),s=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(a+1,")"));return s&&(i=parseFloat(s.getAttribute("x"))),i}}]),t}(),Ti=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addXaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=this.helpers.getX1X2("x1",t),n=r.x,o=r.clipped,l=!0,h=t.label.text,c=t.strokeDashArray;if(v.isNumber(n)){if(null===t.x2||void 0===t.x2){if(!o){var d=this.annoCtx.graphics.drawLine(n+t.offsetX,0+t.offsetY,n+t.offsetX,s.globals.gridHeight+t.offsetY,t.borderColor,c,t.borderWidth);e.appendChild(d.node),t.id&&d.node.classList.add(t.id)}}else{var u=this.helpers.getX1X2("x2",t);if(a=u.x,l=u.clipped,!o||!l){if(a12?u-12:0===u?12:u;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(g))).replace(/(^|[^\\])h/g,"$1"+g);var p=a?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(p))).replace(/(^|[^\\])m/g,"$1"+p);var x=a?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(x))).replace(/(^|[^\\])s/g,"$1"+x);var b=a?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10);var m=u<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));var v=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+v)).replace(/(^|[^\\])t/g,"$1"+v.charAt(0));var y=-t.getTimezoneOffset(),w=a||!y?"Z":y>0?"+":"-";if(!a){var k=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(k)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var A=(a?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(n[0],"g"),n[A])).replace(new RegExp(o[0],"g"),o[A])).replace(new RegExp(s[0],"g"),s[c])).replace(new RegExp(r[0],"g"),r[c])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var a=this.w;void 0!==a.config.xaxis.min&&(t=a.config.xaxis.min),void 0!==a.config.xaxis.max&&(e=a.config.xaxis.max);var s=this.getDate(t),r=this.getDate(e),n=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(n[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var a=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&a++,a}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=v.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),Xi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return s(t,[{key:"xLabelFormat",value:function(t,e,i,a){var s=this.w;if("datetime"===s.config.xaxis.type&&void 0===s.config.xaxis.labels.formatter&&void 0===s.config.tooltip.x.formatter){var r=new zi(this.ctx);return r.formatDate(r.getDate(e),s.config.tooltip.x.format)}return t(e,i,a)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,i){var a=this.w;if(v.isNumber(t))if(0!==a.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:a.globals.yValueDecimal);else{var s=t.toFixed(0);t=t==s?s:t.toFixed(1)}return t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(v.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(v.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var i=e.globals.maxX-e.globals.minX;return i>0&&i<100?t.toFixed(1):t.toFixed(0)}if(e.globals.isBarHorizontal)if(e.globals.maxY-e.globals.minYArr<4)return t.toFixed(1);return t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,a){void 0!==i.labels.formatter?e.globals.yLabelFormatters[a]=i.labels.formatter:e.globals.yLabelFormatters[a]=function(s){return e.globals.xyCharts?Array.isArray(s)?s.map((function(e){return t.defaultYFormatter(e,i,a)})):t.defaultYFormatter(s,i,a):s}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),Ri=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"getLabel",value:function(t,e,i,a){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[],r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",n=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],o=this.w,l=void 0===t[a]?"":t[a],h=l,c=o.globals.xLabelFormatter,d=o.config.xaxis.labels.formatter,u=!1,g=new Xi(this.ctx),p=l;n&&(h=g.xLabelFormat(c,l,p,{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o}),void 0!==d&&(h=d(l,t[a],{i:a,dateFormatter:new zi(this.ctx).formatDate,w:o})));var f,x;e.length>0?(f=e[a].unit,x=null,e.forEach((function(t){"month"===t.unit?x="year":"day"===t.unit?x="month":"hour"===t.unit?x="day":"minute"===t.unit&&(x="hour")})),u=x===f,i=e[a].position,h=e[a].value):"datetime"===o.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var b=new Mi(this.ctx),m={};m=o.globals.rotateXLabels&&n?b.getTextRects(h,parseInt(r,10),null,"rotate(".concat(o.config.xaxis.labels.rotate," 0 0)"),!1):b.getTextRects(h,parseInt(r,10));var v=!o.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||s.indexOf(h)>=0&&v)&&(h=""),{x:i,text:h,textRect:m,isBold:u}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var a=this.w,s=a.config.xaxis.tickAmount;return"dataPoints"===s&&(s=Math.round(a.globals.gridWidth/120)),s>i||t%Math.round(i/(s+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,a,s){var r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&a.length>0){var n=s[s.length-1];e.xa.length||a.some((function(t){return Array.isArray(t.seriesName)}))?t:i.seriesYAxisReverseMap[t]}},{key:"isYAxisHidden",value:function(t){var e=this.w,i=e.config.yaxis[t];if(!i.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!i.showForNullSeries){var a=e.globals.seriesYAxisMap[t],s=new Pi(this.ctx);return a.every((function(t){return s.isSeriesNull(t)}))}return!1}},{key:"getYAxisForeColor",value:function(t,e){var i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&this.ctx.theme.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1),t}},{key:"drawYAxisTicks",value:function(t,e,i,a,s,r,n){var o=this.w,l=new Mi(this.ctx),h=o.globals.translateY+o.config.yaxis[s].labels.offsetY;if(o.globals.isBarHorizontal?h=0:"heatmap"===o.config.chart.type&&(h+=r/2),a.show&&e>0){!0===o.config.yaxis[s].opposite&&(t+=a.width);for(var c=e;c>=0;c--){var d=l.drawLine(t+i.offsetX-a.width+a.offsetX,h+a.offsetY,t+i.offsetX+a.offsetX,h+a.offsetY,a.color);n.add(d),h+=r}}}}]),t}(),Ei=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx),this.axesUtils=new Ri(this.annoCtx)}return s(t,[{key:"addYaxisAnnotation",value:function(t,e,i){var a,s=this.w,r=t.strokeDashArray,n=this.helpers.getY1Y2("y1",t),o=n.yP,l=n.clipped,h=!0,c=!1,d=t.label.text;if(null===t.y2||void 0===t.y2){if(!l){c=!0;var u=this.annoCtx.graphics.drawLine(0+t.offsetX,o+t.offsetY,this._getYAxisAnnotationWidth(t),o+t.offsetY,t.borderColor,r,t.borderWidth);e.appendChild(u.node),t.id&&u.node.classList.add(t.id)}}else{if(a=(n=this.helpers.getY1Y2("y2",t)).yP,h=n.clipped,a>o){var g=o;o=a,a=g}if(!l||!h){c=!0;var p=this.annoCtx.graphics.drawRect(0+t.offsetX,a+t.offsetY,this._getYAxisAnnotationWidth(t),o-a,0,t.fillColor,t.opacity,1,t.borderColor,r);p.node.classList.add("apexcharts-annotation-rect"),p.attr("clip-path","url(#gridRectMask".concat(s.globals.cuid,")")),e.appendChild(p.node),t.id&&p.node.classList.add(t.id)}}if(c){var f="right"===t.label.position?s.globals.gridWidth:"center"===t.label.position?s.globals.gridWidth/2:0,x=this.annoCtx.graphics.drawText({x:f+t.label.offsetX,y:(null!=a?a:o)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});x.attr({rel:i}),e.appendChild(x.node)}}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;e.globals.gridWidth;return(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.forEach((function(e,a){e.yAxisIndex=t.axesUtils.translateYAxisIndex(e.yAxisIndex),t.axesUtils.isYAxisHidden(e.yAxisIndex)&&t.axesUtils.yAxisAllSeriesCollapsed(e.yAxisIndex)||t.addYaxisAnnotation(e,i.node,a)})),i}}]),t}(),Yi=function(){function t(e){i(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Ii(this.annoCtx)}return s(t,[{key:"addPointAnnotation",value:function(t,e,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)){var a=this.helpers.getX1X2("x1",t),s=a.x,r=a.clipped,n=(a=this.helpers.getY1Y2("y1",t)).yP,o=a.clipped;if(v.isNumber(s)&&!o&&!r){var l={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},h=this.annoCtx.graphics.drawMarker(s+t.marker.offsetX,n+t.marker.offsetY,l);e.appendChild(h.node);var c=t.label.text?t.label.text:"",d=this.annoCtx.graphics.drawText({x:s+t.label.offsetX,y:n+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:c,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(d.attr({rel:i}),e.appendChild(d.node),t.customSVG.SVG){var u=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});u.attr({transform:"translate(".concat(s+t.customSVG.offsetX,", ").concat(n+t.customSVG.offsetY,")")}),u.node.innerHTML=t.customSVG.SVG,e.appendChild(u.node)}if(t.image.path){var g=t.image.width?t.image.width:20,p=t.image.height?t.image.height:20;h=this.annoCtx.addImage({x:s+t.image.offsetX-g/2,y:n+t.image.offsetY-p/2,width:g,height:p,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&h.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&h.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&h.node.addEventListener("click",t.click.bind(this,t))}}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,a){t.addPointAnnotation(e,i.node,a)})),i}}]),t}();var Hi={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},Oi=function(){function t(){i(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return s(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[Hi],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),Fi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.graphics=new Mi(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Ii(this),this.xAxisAnnotations=new Ti(this),this.yAxisAnnotations=new Ei(this),this.pointsAnnotations=new Yi(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return s(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),a=this.pointsAnnotations.drawPointAnnotations(),s=t.config.chart.animations.enabled,r=[e,i,a],n=[i.node,e.node,a.node],o=0;o<3;o++)t.globals.dom.elGraphical.add(r[o]),!s||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&n[o].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:n[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,a=t.y,s=t.text,r=t.textAnchor,n=t.foreColor,o=t.fontSize,l=t.fontFamily,h=t.fontWeight,c=t.cssClass,d=t.backgroundColor,u=t.borderWidth,g=t.strokeDashArray,p=t.borderRadius,f=t.borderColor,x=t.appendTo,b=void 0===x?".apexcharts-svg":x,m=t.paddingLeft,v=void 0===m?4:m,y=t.paddingRight,w=void 0===y?4:y,k=t.paddingBottom,A=void 0===k?2:k,C=t.paddingTop,S=void 0===C?2:C,L=this.w,M=this.graphics.drawText({x:i,y:a,text:s,textAnchor:r||"start",fontSize:o||"12px",fontWeight:h||"regular",fontFamily:l||L.config.chart.fontFamily,foreColor:n||L.config.chart.foreColor,cssClass:c}),P=L.globals.dom.baseEl.querySelector(b);P&&P.appendChild(M.node);var I=M.bbox();if(s){var T=this.graphics.drawRect(I.x-v,I.y-S,I.width+v+w,I.height+A+S,p,d||"transparent",1,u,f,g);P.insertBefore(T.node,M.node)}}},{key:"addImage",value:function(t,e){var i=this.w,a=t.path,s=t.x,r=void 0===s?0:s,n=t.y,o=void 0===n?0:n,l=t.width,h=void 0===l?20:l,c=t.height,d=void 0===c?20:c,u=t.appendTo,g=void 0===u?".apexcharts-svg":u,p=i.globals.dom.Paper.image(a);p.size(h,d).move(r,o);var f=i.globals.dom.baseEl.querySelector(g);return f&&f.appendChild(p.node),p}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,a=t.context,s=t.type,r=t.contextMethod,n=a,o=n.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations")),h=l.childNodes.length+1,c=new Oi,d=Object.assign({},"xaxis"===s?c.xAxisAnnotation:"yaxis"===s?c.yAxisAnnotation:c.pointAnnotation),u=v.extend(d,e);switch(s){case"xaxis":this.addXaxisAnnotation(u,l,h);break;case"yaxis":this.addYaxisAnnotation(u,l,h);break;case"point":this.addPointAnnotation(u,l,h)}var g=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(s,"-annotations .apexcharts-").concat(s,"-annotation-label[rel='").concat(h,"']")),p=this.helpers.addBackgroundToAnno(g,u);return p&&l.insertBefore(p.node,g),i&&o.globals.memory.methodsToExec.push({context:n,id:u.id?u.id:v.randomId(),method:r,label:"addAnnotation",params:e}),a}},{key:"clearAnnotations",value:function(t){for(var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),a=e.globals.memory.methodsToExec.length-1;a>=0;a--)"addText"!==e.globals.memory.methodsToExec[a].label&&"addAnnotation"!==e.globals.memory.methodsToExec[a].label||e.globals.memory.methodsToExec.splice(a,1);i=v.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,a=i.globals.dom.baseEl.querySelectorAll(".".concat(e));a&&(i.globals.memory.methodsToExec.map((function(t,a){t.id===e&&i.globals.memory.methodsToExec.splice(a,1)})),Array.prototype.forEach.call(a,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),Di=function(t){var e,i=t.isTimeline,a=t.ctx,s=t.seriesIndex,r=t.dataPointIndex,n=t.y1,o=t.y2,l=t.w,h=l.globals.seriesRangeStart[s][r],c=l.globals.seriesRangeEnd[s][r],d=l.globals.labels[r],u=l.config.series[s].name?l.config.series[s].name:"",g=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,f={w:l,seriesIndex:s,dataPointIndex:r,start:h,end:c};("function"==typeof p&&(u=p(u,f)),null!==(e=l.config.series[s].data[r])&&void 0!==e&&e.x&&(d=l.config.series[s].data[r].x),i)||"datetime"===l.config.xaxis.type&&(d=new Xi(a).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(a).formatDate,w:l}));"function"==typeof g&&(d=g(d,f)),Number.isFinite(n)&&Number.isFinite(o)&&(h=n,c=o);var x="",b="",m=l.globals.colors[s];if(void 0===l.config.tooltip.x.formatter)if("datetime"===l.config.xaxis.type){var v=new zi(a);x=v.formatDate(v.getDate(h),l.config.tooltip.x.format),b=v.formatDate(v.getDate(c),l.config.tooltip.x.format)}else x=h,b=c;else x=l.config.tooltip.x.formatter(h),b=l.config.tooltip.x.formatter(c);return{start:h,end:c,startVal:x,endVal:b,ylabel:d,color:m,seriesName:u}},_i=function(t){var e=t.color,i=t.seriesName,a=t.ylabel,s=t.start,r=t.end,n=t.seriesIndex,o=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(n);s=l.yLbFormatter(s),r=l.yLbFormatter(r);var h=l.yLbFormatter(t.w.globals.series[n][o]),c='\n '.concat(s,'\n - \n ').concat(r,"\n ");return'
'+(i||"")+'
'+a+": "+(t.w.globals.comboCharts?"rangeArea"===t.w.config.series[n].type||"rangeBar"===t.w.config.series[n].type?c:"".concat(h,""):c)+"
"},Ni=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){this.hideYAxis();return v.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(t,e){var i=e.w.config.series[e.seriesIndex].name;return null!==t?i+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),u(u({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,a=e.dataPointIndex,s=e.w;return t._getBoxTooltip(s,i,a,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,a=e.dataPointIndex,s=e.w,r=function(){var t=s.globals.seriesRangeStart[i][a];return s.globals.seriesRangeEnd[i][a]-t};return s.globals.comboCharts?"rangeBar"===s.config.series[i].type||"rangeArea"===s.config.series[i].type?r():t:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=Di(u(u({},t),{},{isTimeline:!0})),i=e.color,a=e.seriesName,s=e.ylabel,r=e.startVal,n=e.endVal;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t):function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,i;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(i=t.plotOptions.bar)&&void 0!==i&&i.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=Di(t),i=e.color,a=e.seriesName,s=e.ylabel,r=e.start,n=e.end;return _i(u(u({},t),{},{color:i,seriesName:a,ylabel:s,start:r,end:n}))}(t)}}}}},{key:"brush",value:function(t){return v.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return u(u({},t),{},{plotOptions:u(u({},t.plotOptions),{},{bar:u(u({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return v.isNumber(t)?Math.floor(t):t};var a=t.xaxis.labels.formatter,s=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(s=i.map((function(t){return Array.isArray(t)?t:String(t)}))),s&&s.length&&(t.xaxis.labels.formatter=function(t){return v.isNumber(t)?a(s[Math.floor(t)-1]):a(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(t,e,i,a,s){var r=t.globals.seriesCandleO[e][i],n=t.globals.seriesCandleH[e][i],o=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],h=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==s?'
\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][i],"\n
"):'
')+"
".concat(a[0],': ')+r+"
"+"
".concat(a[1],': ')+n+"
"+(o?"
".concat(a[2],': ')+o+"
":"")+"
".concat(a[3],': ')+l+"
"+"
".concat(a[4],': ')+h+"
"}}]),t}(),Wi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(t){var e=t.responsiveOverride,i=this.opts,a=new Oi,s=new Ni(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=a.init(),n={};if(i&&"object"===b(i)){var o,l,h,c,d,u,g,p,f,x,m={};m=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?s[i.chart.type]():s.line(),null!==(o=i.plotOptions)&&void 0!==o&&null!==(l=o.bar)&&void 0!==l&&l.isFunnel&&(m=s.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(m=s.stackedBars()),null!==(h=i.chart.brush)&&void 0!==h&&h.enabled&&(m=s.brush(m)),null!==(c=i.plotOptions)&&void 0!==c&&null!==(d=c.line)&&void 0!==d&&d.isSlopeChart&&(m=s.slope()),i.chart.stacked&&"100%"===i.chart.stackType&&(i=s.stacked100(i)),null!==(u=i.plotOptions)&&void 0!==u&&null!==(g=u.bar)&&void 0!==g&&g.isDumbbell&&(i=s.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},e||(i.xaxis.convertedCatToNumeric=!1),(null!==(p=(i=this.checkForCatToNumericXAxis(this.chartType,m,i)).chart.sparkline)&&void 0!==p&&p.enabled||null!==(f=window.Apex.chart)&&void 0!==f&&null!==(x=f.sparkline)&&void 0!==x&&x.enabled)&&(m=s.sparkline(m)),n=v.extend(r,m)}var y=v.extend(n,window.Apex);return r=v.extend(y,i),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var a,s,r=new Ni(i),n=("bar"===t||"boxPlot"===t)&&(null===(a=i.plotOptions)||void 0===a||null===(s=a.bar)||void 0===s?void 0:s.horizontal),o="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,l="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,h=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return n||o||!l||"between"===h||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new Oi;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=v.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[v.extend(i.yAxis,t.yaxis)]:t.yaxis=v.extendArray(t.yaxis,i.yAxis);var a=!1;t.yaxis.forEach((function(t){t.logarithmic&&(a=!0)}));var s=t.series;return e&&!s&&(s=e.config.series),a&&s.length!==t.yaxis.length&&s.length&&(t.yaxis=s.map((function(e,a){if(e.name||(s[a].name="series-".concat(a+1)),t.yaxis[a])return t.yaxis[a].seriesName=s[a].name,t.yaxis[a];var r=v.extend(i.yAxis,t.yaxis[0]);return r.show=!1,r}))),a&&s.length>1&&s.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.yaxis=v.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new Oi;return t.annotations.xaxis=v.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new Oi;return t.annotations.points=v.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),Bi=function(){function t(){i(this,t)}return s(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:t.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=v.extend({},t),e.initialSeries=v.clone(t.series),e.lastXAxis=v.clone(e.initialConfig.xaxis),e.lastYAxis=v.clone(e.initialConfig.yaxis),e}}]),t}(),Gi=function(){function t(e){i(this,t),this.opts=e}return s(t,[{key:"init",value:function(){var t=new Wi(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new Bi).init(t)}}}]),t}(),ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return s(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,a=parseInt(e.globals.gridWidth,10),s=parseInt(e.globals.gridHeight,10),r=a>s?a:s,n=t.image,o=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=r+1,l=r):(o=t.width,l=t.height);var h=document.createElementNS(e.globals.SVGNS,"pattern");Mi.setAttrs(h,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var c=document.createElementNS(e.globals.SVGNS,"image");h.appendChild(c),c.setAttributeNS(window.SVG.xlink,"href",n),Mi.setAttrs(c,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),c.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(h)}},{key:"getSeriesIndex",value:function(t){var e=this.w,i=e.config.chart.type;return("bar"===i||"rangeBar"===i)&&e.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(t,e){var i,a=this.w,s=null,n=null,o=r(t);try{for(o.s();!(i=o.n()).done;){var l=i.value;l>=e.threshold?(null===s||l>s)&&(s=l):(null===n||l-1?x=v.getOpacityFromRGBA(c):m=v.hexToRgba(v.rgb2hex(c),x),t.opacity&&(x=t.opacity),"pattern"===p&&(n=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:n,fillColor:c,fillOpacity:x,defaultColor:m})),b){var y=f(l.fill.gradient.colorStops)||[],w=l.fill.gradient.type;h&&(y[this.seriesIndex]=this.computeColorStops(s.globals.series[this.seriesIndex],l.plotOptions.line.colors),w="vertical"),o=this.handleGradientFill({type:w,fillConfig:t.fillConfig,fillColor:c,fillOpacity:x,colorStops:y,i:this.seriesIndex})}if("image"===p){var k=l.fill.image.src,A=t.patternID?t.patternID:"",C="pattern".concat(s.globals.cuid).concat(t.seriesNumber+1).concat(A);-1===this.patternIDs.indexOf(C)&&(this.clippedImgArea({opacity:x,image:Array.isArray(k)?t.seriesNumber-1&&(p=v.getOpacityFromRGBA(g));var f=void 0===o.gradient.opacityTo?a:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[n]:o.gradient.opacityTo;if(void 0===o.gradient.gradientToColors||0===o.gradient.gradientToColors.length)d="dark"===o.gradient.shade?c.shadeColor(-1*parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i):c.shadeColor(parseFloat(o.gradient.shadeIntensity),i.indexOf("rgb")>-1?v.rgb2hex(i):i);else if(o.gradient.gradientToColors[l.seriesNumber]){var x=o.gradient.gradientToColors[l.seriesNumber];d=x,x.indexOf("rgba")>-1&&(f=v.getOpacityFromRGBA(x))}else d=i;if(o.gradient.gradientFrom&&(g=o.gradient.gradientFrom),o.gradient.gradientTo&&(d=o.gradient.gradientTo),o.gradient.inverseColors){var b=g;g=d,d=b}return g.indexOf("rgb")>-1&&(g=v.rgb2hex(g)),d.indexOf("rgb")>-1&&(d=v.rgb2hex(d)),h.drawGradient(e,g,d,p,f,l.size,o.gradient.stops,r,n)}}]),t}(),Vi=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],r=this.w,n=e,o=t,l=null,h=new Mi(this.ctx),c=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(o.x))for(var d=0;d0:r.config.markers.size>0)||s||c){p||(f+=" w".concat(v.randomId()));var x=this.getMarkerConfig({cssClass:f,seriesIndex:e,dataPointIndex:g});if(r.config.series[n].data[g]&&(r.config.series[n].data[g].fillColor&&(x.pointFillColor=r.config.series[n].data[g].fillColor),r.config.series[n].data[g].strokeColor&&(x.pointStrokeColor=r.config.series[n].data[g].strokeColor)),void 0!==a&&(x.pSize=a),(o.x[d]<-r.globals.markers.largestSize||o.x[d]>r.globals.gridWidth+r.globals.markers.largestSize||o.y[d]<-r.globals.markers.largestSize||o.y[d]>r.globals.gridHeight+r.globals.markers.largestSize)&&(x.pSize=0),!p)(r.globals.markers.size[e]>0||s||c)&&!l&&(l=h.group({class:s||c?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),(u=h.drawMarker(o.x[d],o.y[d],x)).attr("rel",g),u.attr("j",g),u.attr("index",e),u.node.setAttribute("default-marker-size",x.pSize),new Li(this.ctx).setSelectionFilter(u,e,g),this.addEvents(u),l&&l.add(u)}else void 0===r.globals.pointsArray[e]&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([o.x[d],o.y[d]])}return l}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,i=t.seriesIndex,a=t.dataPointIndex,s=void 0===a?null:a,r=t.radius,n=void 0===r?null:r,o=t.size,l=void 0===o?null:o,h=t.strokeWidth,c=void 0===h?null:h,d=this.w,u=this.getMarkerStyle(i),g=null===l?d.globals.markers.size[i]:l,p=d.config.markers;return null!==s&&p.discrete.length&&p.discrete.map((function(t){t.seriesIndex===i&&t.dataPointIndex===s&&(u.pointStrokeColor=t.strokeColor,u.pointFillColor=t.fillColor,g=t.size,u.pointShape=t.shape)})),{pSize:null===n?g:n,pRadius:null!==n?n:p.radius,pointStrokeWidth:null!==c?c:Array.isArray(p.strokeWidth)?p.strokeWidth[i]:p.strokeWidth,pointStrokeColor:u.pointStrokeColor,pointFillColor:u.pointFillColor,shape:u.pointShape||(Array.isArray(p.shape)?p.shape[i]:p.shape),class:e,pointStrokeOpacity:Array.isArray(p.strokeOpacity)?p.strokeOpacity[i]:p.strokeOpacity,pointStrokeDashArray:Array.isArray(p.strokeDashArray)?p.strokeDashArray[i]:p.strokeDashArray,pointFillOpacity:Array.isArray(p.fillOpacity)?p.fillOpacity[i]:p.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(t){var e=this.w,i=new Mi(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,a=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(a)?a[t]:a,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),Ui=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return s(t,[{key:"draw",value:function(t,e,i){var a=this.w,s=new Mi(this.ctx),r=i.realIndex,n=i.pointsPos,o=i.zRatio,l=i.elParent,h=s.group({class:"apexcharts-series-markers apexcharts-series-".concat(a.config.chart.type)});if(h.attr("clip-path","url(#gridRectMarkerMask".concat(a.globals.cuid,")")),Array.isArray(n.x))for(var c=0;cp.maxBubbleRadius&&(g=p.maxBubbleRadius)}var f=n.x[c],x=n.y[c];if(g=g||0,null!==x&&void 0!==a.globals.series[r][d]||(u=!1),u){var b=this.drawPoint(f,x,g,r,d,e);h.add(b)}l.add(h)}}},{key:"drawPoint",value:function(t,e,i,a,s,r){var n=this.w,o=a,l=new y(this.ctx),h=new Li(this.ctx),c=new ji(this.ctx),d=new Vi(this.ctx),u=new Mi(this.ctx),g=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:s,radius:"bubble"===n.config.chart.type||n.globals.comboCharts&&n.config.series[a]&&"bubble"===n.config.series[a].type?i:null}),p=c.fillPath({seriesNumber:a,dataPointIndex:s,color:g.pointFillColor,patternUnits:"objectBoundingBox",value:n.globals.series[a][r]}),f=u.drawMarker(t,e,g);if(n.config.series[o].data[s]&&n.config.series[o].data[s].fillColor&&(p=n.config.series[o].data[s].fillColor),f.attr({fill:p}),n.config.chart.dropShadow.enabled){var x=n.config.chart.dropShadow;h.dropShadow(f,x,a)}if(!this.initialAnim||n.globals.dataChanged||n.globals.resized)n.globals.animationEnded=!0;else{var b=n.config.chart.animations.speed;l.animateMarker(f,b,n.globals.easing,(function(){window.setTimeout((function(){l.animationCompleted(f)}),100)}))}return f.attr({rel:s,j:s,index:a,"default-marker-size":g.pSize}),h.setSelectionFilter(f,a,s),d.addEvents(f),f.node.classList.add("apexcharts-marker"),f}},{key:"centerTextInBubble",value:function(t){var e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}]),t}(),qi=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"dataLabelsCorrection",value:function(t,e,i,a,s,r,n){var o=this.w,l=!1,h=new Mi(this.ctx).getTextRects(i,n),c=h.width,d=h.height;e<0&&(e=0),e>o.globals.gridHeight+d&&(e=o.globals.gridHeight+d/2),void 0===o.globals.dataLabelsRects[a]&&(o.globals.dataLabelsRects[a]=[]),o.globals.dataLabelsRects[a].push({x:t,y:e,width:c,height:d});var u=o.globals.dataLabelsRects[a].length-2,g=void 0!==o.globals.lastDrawnDataLabelsIndexes[a]?o.globals.lastDrawnDataLabelsIndexes[a][o.globals.lastDrawnDataLabelsIndexes[a].length-1]:0;if(void 0!==o.globals.dataLabelsRects[a][u]){var p=o.globals.dataLabelsRects[a][g];(t>p.x+p.width||e>p.y+p.height||e+de.globals.gridWidth+b.textRects.width+30)&&(o="");var m=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(m=e.globals.dataLabels.style.colors[n]),"function"==typeof m&&(m=m({series:e.globals.series,seriesIndex:r,dataPointIndex:n,w:e})),u&&(m=u);var v=d.offsetX,y=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(v=0,y=0),e.globals.isSlopeChart&&(0!==n&&(v=-2*d.offsetX+5),0!==n&&n!==e.config.series[r].data.length-1&&(v=0)),b.drawnextLabel){if((x=i.drawText({width:100,height:parseInt(d.style.fontSize,10),x:a+v,y:s+y,foreColor:m,textAnchor:l||d.textAnchor,text:o,fontSize:h||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"})).attr({class:f||"apexcharts-datalabel",cx:a,cy:s}),d.dropShadow.enabled){var w=d.dropShadow;new Li(this.ctx).dropShadow(x,w)}c.add(x),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(n)}return x}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,a=i.config.dataLabels.background,s=a.padding,r=a.padding/2,n=e.width,o=e.height,l=new Mi(this.ctx).drawRect(e.x-s,e.y-r/2,n+2*s,o+r,a.borderRadius,"transparent"!==i.config.chart.background&&i.config.chart.background?i.config.chart.background:"#fff",a.opacity,a.borderWidth,a.borderColor);a.dropShadow.enabled&&new Li(this.ctx).dropShadow(l,a.dropShadow);return l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w,s=v.clone(a.globals.initialSeries);a.globals.previousPaths=[],i?(a.globals.collapsedSeries=[],a.globals.ancillaryCollapsedSeries=[],a.globals.collapsedSeriesIndices=[],a.globals.ancillaryCollapsedSeriesIndices=[]):s=this.emptyCollapsedSeries(s),a.config.series=s,t&&(e&&(a.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(s,a.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i-1&&(t[i].data=[]);return t}},{key:"highlightSeries",value:function(t){var e=this.w,i=this.getSeriesByName(t),a=parseInt(null==i?void 0:i.getAttribute("data:realIndex"),10),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),r=null,n=null,o=null;if(e.globals.axisCharts||"radialBar"===e.config.chart.type)if(e.globals.axisCharts){r=e.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),n=e.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']"));var l=e.globals.seriesYAxisReverseMap[a];o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(l,"']"))}else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']"));else r=e.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var h=0;h=t.from&&(r0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,a=0;if(i.config.series.length>1)for(var s=i.config.series.map((function(t,a){return t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(a)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(i.config.series[a].type)>-1)?a:-1})),r="asc"===t?0:s.length-1;"asc"===t?r=0;"asc"===t?r++:r--)if(-1!==s[r]){a=s[r];break}return a}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,a){for(var s=e[i].childNodes,r={type:a,paths:[],realIndex:e[i].getAttribute("data:realIndex")},n=0;n0)for(var a=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),a=[],s=function(t){var e=function(e){return i[t].getAttribute(e)},s={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};a.push({rect:s,color:i[t].getAttribute("color")})},r=0;r0?t:[]}));return t}}]),t}(),$i=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new Zi(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,a=this.w.globals,s="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,r=0;r=5?this.twoDSeries.push(v.parseNumber(t[e].data[r][4])):this.twoDSeries.push(v.parseNumber(t[e].data[r][1])),a.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var n=new Date(t[e].data[r][0]);n=new Date(n).getTime(),this.twoDSeriesX.push(n)}else this.twoDSeriesX.push(t[e].data[r][0]);for(var o=0;o-1&&(r=this.activeSeriesIndex);for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,s=this.w.globals,r=new zi(i),n=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();s.isRangeBar="rangeBar"===a.chart.type&&s.isBarHorizontal,s.hasXaxisGroups="category"===a.xaxis.type&&a.xaxis.group.groups.length>0,s.hasXaxisGroups&&(s.groups=a.xaxis.group.groups),t.forEach((function(t,e){void 0!==t.name?s.seriesNames.push(t.name):s.seriesNames.push("series-"+parseInt(e+1,10))})),this.coreUtils.setSeriesYAxisMappings();var o=[],l=f(new Set(a.series.map((function(t){return t.group}))));a.series.forEach((function(t,e){var i=l.indexOf(t.group);o[i]||(o[i]=[]),o[i].push(s.seriesNames[e])})),s.seriesGroups=o;for(var h=function(){for(var t=0;t0&&(this.twoDSeriesX=n,s.seriesX.push(this.twoDSeriesX))),s.labels.push(this.twoDSeriesX);var d=t[c].data.map((function(t){return v.parseNumber(t)}));s.series.push(d)}s.seriesZ.push(this.threeDSeries),void 0!==t[c].color?s.seriesColors.push(t[c].color):s.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var a=0;a0)i.labels=e.xaxis.categories;else if(e.labels.length>0)i.labels=e.labels.slice();else if(this.fallbackToCategory){if(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric)new Ni(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t)}else this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,a=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var s=i.series.map((function(t,e){return t.data.filter((function(t,e,i){return i.findIndex((function(e){return e.x===t.x}))===e}))})),r=s.reduce((function(t,e,i,a){return a[t].length>e.length?t:i}),0),n=0;n0&&s==i.length&&e.push(a)})),t.globals.ignoreYAxisIndexes=e.map((function(t){return t}))}}]),t}(),Ji=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),a=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",a*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+a)}},{key:"getSvgString",value:function(){var t=this;return new Promise((function(e){var i=t.w,a=i.config.chart.toolbar.export.width,s=i.config.chart.toolbar.export.scale||a/i.globals.svgWidth;s||(s=1);var r=t.w.globals.dom.Paper.svg(),n=t.w.globals.dom.Paper.node.cloneNode(!0);1!==s&&t.scaleSvgNode(n,s),t.convertImagesToBase64(n).then((function(){r=(new XMLSerializer).serializeToString(n),e(r.replace(/ /g," "))}))}))}},{key:"convertImagesToBase64",value:function(t){var e=this,i=t.getElementsByTagName("image"),a=Array.from(i).map((function(t){var i=t.getAttributeNS("http://www.w3.org/1999/xlink","href");return i&&!i.startsWith("data:")?e.getBase64FromUrl(i).then((function(e){t.setAttributeNS("http://www.w3.org/1999/xlink","href",e)})).catch((function(t){console.error("Error converting image to base64:",t)})):Promise.resolve()}));return Promise.all(a)}},{key:"getBase64FromUrl",value:function(t){return new Promise((function(e,i){var a=new Image;a.crossOrigin="Anonymous",a.onload=function(){var t=document.createElement("canvas");t.width=a.width,t.height=a.height,t.getContext("2d").drawImage(a,0,0),e(t.toDataURL())},a.onerror=i,a.src=t}))}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(a,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var t=this;return new Promise((function(e){t.cleanup(),t.getSvgString().then((function(t){var i=new Blob([t],{type:"image/svg+xml;charset=utf-8"});e(URL.createObjectURL(i))}))}))}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var a=e.w,s=t?t.scale||t.width/a.globals.svgWidth:1;e.cleanup();var r=document.createElement("canvas");r.width=a.globals.svgWidth*s,r.height=parseInt(a.globals.dom.elWrap.style.height,10)*s;var n="transparent"!==a.config.chart.background&&a.config.chart.background?a.config.chart.background:"#fff",o=r.getContext("2d");o.fillStyle=n,o.fillRect(0,0,r.width*s,r.height*s),e.getSvgString().then((function(t){var e="data:image/svg+xml,"+encodeURIComponent(t),a=new Image;a.crossOrigin="anonymous",a.onload=function(){if(o.drawImage(a,0,0),r.msToBlob){var t=r.msToBlob();i({blob:t})}else{var e=r.toDataURL("image/png");i({imgURI:e})}},a.src=e}))}))}},{key:"exportToSVG",value:function(){var t=this;this.svgUrl().then((function(e){t.triggerDownload(e,t.w.config.chart.toolbar.export.svg.filename,".svg")}))}},{key:"exportToPng",value:function(){var t=this,e=this.w.config.chart.toolbar.export.scale,i=this.w.config.chart.toolbar.export.width,a=e?{scale:e}:i?{width:i}:void 0;this.dataURI(a).then((function(e){var i=e.imgURI,a=e.blob;a?navigator.msSaveOrOpenBlob(a,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,a=t.fileName,s=t.columnDelimiter,r=void 0===s?",":s,n=t.lineDelimiter,o=void 0===n?"\n":n,l=this.w;i||(i=l.config.series);var h=[],c=[],d="",u=l.globals.series.map((function(t,e){return-1===l.globals.collapsedSeriesIndices.indexOf(e)?t:[]})),g=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.categoryFormatter?l.config.chart.toolbar.export.csv.categoryFormatter(t):"datetime"===l.config.xaxis.type&&String(t).length>=10?new Date(t).toDateString():v.isNumber(t)?t:t.split(r).join("")},p=function(t){return"function"==typeof l.config.chart.toolbar.export.csv.valueFormatter?l.config.chart.toolbar.export.csv.valueFormatter(t):t},x=Math.max.apply(Math,f(i.map((function(t){return t.data?t.data.length:0})))),b=new $i(this.ctx),m=new Ri(this.ctx),y=function(t){var i="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var a=l.globals.yLabelFormatters[0],s=new Zi(e.ctx).getActiveConfigSeriesIndex();i=a(l.globals.labels[t],{seriesIndex:s,dataPointIndex:t,w:l})}else i=m.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?i=l.config.xaxis.categories[t]:l.config.labels.length&&(i=l.config.labels[t]))}else i=l.config.labels[t];return null===i?"nullvalue":(Array.isArray(i)&&(i=i.join(" ")),v.isNumber(i)?i:i.split(r).join(""))},w=function(t,e){if(h.length&&0===e&&c.push(h.join(r)),t.data){t.data=t.data.length&&t.data||f(Array(x)).map((function(){return""}));for(var a=0;a0&&!s.globals.isBarHorizontal&&(this.xaxisLabels=s.globals.timescaleLabels.slice()),s.config.xaxis.overwriteCategories&&(this.xaxisLabels=s.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===s.config.xaxis.position?this.offY=0:this.offY=s.globals.gridHeight,this.offY=this.offY+s.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.xaxisBorderWidth=s.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=s.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=s.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=s.config.xaxis.axisBorder.height,this.yaxis=s.config.yaxis[0]}return s(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new Mi(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),a=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});i.add(a);for(var s=[],r=0;r6&&void 0!==arguments[6]?arguments[6]:{},h=[],c=[],d=this.w,u=l.xaxisFontSize||this.xaxisFontSize,g=l.xaxisFontFamily||this.xaxisFontFamily,p=l.xaxisForeColors||this.xaxisForeColors,f=l.fontWeight||d.config.xaxis.labels.style.fontWeight,x=l.cssClass||d.config.xaxis.labels.style.cssClass,b=d.globals.padHorizontal,m=a.length,v="category"===d.config.xaxis.type?d.globals.dataPoints:m;if(0===v&&m>v&&(v=m),s){var y=v>1?v-1:v;n=d.globals.gridWidth/Math.min(y,m-1),b=b+r(0,n)/2+d.config.xaxis.labels.offsetX}else n=d.globals.gridWidth/v,b=b+r(0,n)+d.config.xaxis.labels.offsetX;for(var w=function(s){var l=b-r(s,n)/2+d.config.xaxis.labels.offsetX;0===s&&1===m&&n/2===b&&1===v&&(l=d.globals.gridWidth/2);var y=o.axesUtils.getLabel(a,d.globals.timescaleLabels,l,s,h,u,t),w=28;d.globals.rotateXLabels&&t&&(w=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(w+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(u)+(d.globals.xAxisLabelsHeight-d.globals.xAxisGroupLabelsHeight)+(d.globals.rotateXLabels?10:0)),y=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(s,y,m):o.axesUtils.checkForOverflowingLabels(s,y,m,h,c);if(d.config.xaxis.labels.show){var k=e.drawText({x:y.x,y:o.offY+d.config.xaxis.labels.offsetY+w-("top"===d.config.xaxis.position?d.globals.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:"middle",fontWeight:y.isBold?600:f,fontSize:u,fontFamily:g,foreColor:Array.isArray(p)?t&&d.config.xaxis.convertedCatToNumeric?p[d.globals.minX+s-1]:p[s]:p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(i.add(k),k.on("click",(function(t){if("function"==typeof d.config.chart.events.xAxisLabelClick){var e=Object.assign({},d,{labelIndex:s});d.config.chart.events.xAxisLabelClick(t,o.ctx,e)}})),t){var A=document.createElementNS(d.globals.SVGNS,"title");A.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,k.node.appendChild(A),""!==y.text&&(h.push(y.text),c.push(y))}}sa.globals.gridWidth)){var r=this.offY+a.config.xaxis.axisTicks.offsetY;if(e=e+r+a.config.xaxis.axisTicks.height,"top"===a.config.xaxis.position&&(e=r-a.config.xaxis.axisTicks.height),a.config.xaxis.axisTicks.show){var n=new Mi(this.ctx).drawLine(t+a.config.xaxis.axisTicks.offsetX,r+a.config.xaxis.offsetY,s+a.config.xaxis.axisTicks.offsetX,e+a.config.xaxis.offsetY,a.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,a=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var s=0;s0){var h=s[s.length-1].getBBox(),c=s[0].getBBox();h.x<-20&&s[s.length-1].parentNode.removeChild(s[s.length-1]),c.x+c.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&s[0].parentNode.removeChild(s[0]);for(var d=0;d0&&(this.xaxisLabels=a.globals.timescaleLabels.slice())}return s(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new Mi(this.ctx);t||(t=i.group({class:"apexcharts-grid"}));var a=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),s=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(s),t.add(a),t}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var t=this.renderGrid();return this.drawGridArea(t.el),t}return null}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new Mi(this.ctx),a=Array.isArray(t.config.stroke.width)?Math.max.apply(Math,f(t.config.stroke.width)):t.config.stroke.width,s=function(t){var i=document.createElementNS(e.SVGNS,"clipPath");return i.setAttribute("id",t),i};e.dom.elGridRectMask=s("gridRectMask".concat(e.cuid)),e.dom.elGridRectBarMask=s("gridRectBarMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=s("gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=s("forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=s("nonForecastMask".concat(e.cuid));var r=0,n=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),n=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(0,0,e.gridWidth,e.gridHeight,0,"#fff"),e.dom.elGridRectBar=i.drawRect(-a/2-r-2,-a/2-2,e.gridWidth+a+n+r+4,e.gridHeight+a+4,0,"#fff");var o=t.globals.markers.largestSize;e.dom.elGridRectMarker=i.drawRect(-o,-o,e.gridWidth+2*o,e.gridHeight+2*o,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectBarMask.appendChild(e.dom.elGridRectBar.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var l=e.dom.baseEl.querySelector("defs");l.appendChild(e.dom.elGridRectMask),l.appendChild(e.dom.elGridRectBarMask),l.appendChild(e.dom.elGridRectMarkerMask),l.appendChild(e.dom.elForecastMask),l.appendChild(e.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,a=t.y1,s=t.x2,r=t.y2,n=t.xCount,o=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===n-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:i,y1:a,x2:s,y2:r,xCount:n,parent:o});var h=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var c=l.globals.groups;if(c){for(var d=0,u=0;d0&&"datetime"!==t.config.xaxis.type&&(s=e.yAxisScale[a].result.length-1);this._drawXYLines({xCount:s,tickAmount:r})}else s=r,r=e.xTickAmount,this._drawInvertedXYLines({xCount:s,tickAmount:r});return this.drawGridBands(s,r),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:e.gridWidth/s}}},{key:"drawGridBands",value:function(t,e){var i,a,s=this,r=this.w;if((null===(i=r.config.grid.row.colors)||void 0===i?void 0:i.length)>0&&function(t,i,a,n,o,l){for(var h=0,c=0;h=r.config.grid[t].colors.length&&(c=0),s._drawGridBandRect({c:c,x1:a,y1:n,x2:o,y2:l,type:t}),n+=r.globals.gridHeight/e}("row",e,0,0,r.globals.gridWidth,r.globals.gridHeight/e),(null===(a=r.config.grid.column.colors)||void 0===a?void 0:a.length)>0){var n=r.globals.isBarHorizontal||"on"!==r.config.xaxis.tickPlacement||"category"!==r.config.xaxis.type&&!r.config.xaxis.convertedCatToNumeric?t:t-1;r.globals.isXNumeric&&(n=r.globals.xAxisScale.result.length-1);for(var o=r.globals.padHorizontal,l=r.globals.padHorizontal+r.globals.gridWidth/n,h=r.globals.gridHeight,c=0,d=0;c=r.config.grid.column.colors.length&&(d=0),"datetime"===r.config.xaxis.type)o=this.xaxisLabels[c].position,l=((null===(u=this.xaxisLabels[c+1])||void 0===u?void 0:u.position)||r.globals.gridWidth)-this.xaxisLabels[c].position;this._drawGridBandRect({c:d,x1:o,y1:0,x2:l,y2:h,type:"column"}),o+=r.globals.gridWidth/n}}}}]),t}(),ta=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new Pi(this.ctx)}return s(t,[{key:"niceScale",value:function(t,e){var i,a,s,r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=1e-11,l=this.w,h=l.globals;h.isBarHorizontal?(i=l.config.xaxis,a=Math.max((h.svgWidth-100)/25,2)):(i=l.config.yaxis[n],a=Math.max((h.svgHeight-100)/15,2)),v.isNumber(a)||(a=10),s=void 0!==i.min&&null!==i.min,r=void 0!==i.max&&null!==i.min;var c=void 0!==i.stepSize&&null!==i.stepSize,d=void 0!==i.tickAmount&&null!==i.tickAmount,u=d?i.tickAmount:h.niceScaleDefaultTicks[Math.min(Math.round(a/2),h.niceScaleDefaultTicks.length-1)];if(h.isMultipleYAxis&&!d&&h.multiAxisTickAmount>0&&(u=h.multiAxisTickAmount,d=!0),u="dataPoints"===u?h.dataPoints-1:Math.abs(Math.round(u)),(t===Number.MIN_VALUE&&0===e||!v.isNumber(t)&&!v.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=v.isNumber(i.min)?i.min:0,e=v.isNumber(i.max)?i.max:t+u,h.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var g=e;e=t,t=g}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);var p=[];u<1&&(u=1);var f=u,x=Math.abs(e-t);!s&&t>0&&t/x<.15&&(t=0,s=!0),!r&&e<0&&-e/x<.15&&(e=0,r=!0);var b=(x=Math.abs(e-t))/f,m=b,y=Math.floor(Math.log10(m)),w=Math.pow(10,y),k=Math.ceil(m/w);if(b=m=(k=h.niceScaleAllowedMagMsd[0===h.yValueDecimal?0:1][k])*w,h.isBarHorizontal&&i.stepSize&&"datetime"!==i.type?(b=i.stepSize,c=!0):c&&(b=i.stepSize),c&&i.forceNiceScale){var A=Math.floor(Math.log10(b));b*=Math.pow(10,y-A)}if(s&&r){var C=x/f;if(d)if(c)if(0!=v.mod(x,b)){var S=v.getGCD(b,C);b=C/S<10?S:C}else 0==v.mod(b,C)?b=C:(C=b,d=!1);else b=C;else if(c)0==v.mod(x,b)?C=b:b=C;else if(0==v.mod(x,b))C=b;else{C=x/(f=Math.ceil(x/b));var L=v.getGCD(x,b);x/La&&(t=e-b*u,t+=b*Math.floor((M-t)/b))}else if(s)if(d)e=t+b*f;else{var P=e;e=b*Math.ceil(e/b),Math.abs(e-t)/v.getGCD(x,b)>a&&(e=t+b*u,e+=b*Math.ceil((P-e)/b))}}else if(h.isMultipleYAxis&&d){var I=b*Math.floor(t/b),T=I+b*f;T0&&t16&&v.getPrimeFactors(f).length<2&&f++,!d&&i.forceNiceScale&&0===h.yValueDecimal&&f>x&&(f=x,b=Math.round(x/f)),f>a&&(!d&&!c||i.forceNiceScale)){var z=v.getPrimeFactors(f),X=z.length-1,R=f;t:for(var E=0;EN);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,r=Math.abs(e-t),n=[];if(t===e)return{result:n=[t],niceMin:n[0],niceMax:n[n.length-1]};"dataPoints"===(i=this._adjustTicksForSmallRange(i,a,r))&&(i=this.w.globals.dataPoints-1),s||(s=r/i),s=Math.round(10*(s+Number.EPSILON))/10,i===Number.MAX_VALUE&&(i=5,s=1);for(var o=t;i>=0;)n.push(o),o=v.preciseAddition(o,s),i-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,i){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));for(var a=[],s=Math.ceil(Math.log(e)/Math.log(i)+1),r=Math.floor(Math.log(t)/Math.log(i));r5?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase):this.logarithmicScale(e,i,r.logBase)):i!==-Number.MAX_VALUE&&v.isNumber(i)&&e!==Number.MAX_VALUE&&v.isNumber(e)?(a.allSeriesCollapsed=!1,a.yAxisScale[t]=this.niceScale(e,i,t)):a.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}},{key:"setXScale",value:function(t,e){var i=this.w,a=i.globals,s=Math.abs(e-t);if(e!==-Number.MAX_VALUE&&v.isNumber(e)){var r=a.xTickAmount+1;s<10&&s>1&&(r=s),a.xAxisScale=this.linearScale(t,e,r,0,i.config.xaxis.stepSize)}else a.xAxisScale=this.linearScale(0,10,10);return a.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var t=this,e=this.w.config,i=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var a=i.seriesYAxisMap,s=i.minYArr,r=i.maxYArr;i.allSeriesCollapsed=!0,i.barGroups=[],a.forEach((function(a,n){var o=[];a.forEach((function(t){var i=e.series[t].group;o.indexOf(i)<0&&o.push(i)})),a.length>0?function(){var l,h,c=Number.MAX_VALUE,d=-Number.MAX_VALUE,u=c,g=d;if(e.chart.stacked)!function(){var t=new Array(i.dataPoints).fill(0),s=[],r=[],p=[];o.forEach((function(){s.push(t.map((function(){return Number.MIN_VALUE}))),r.push(t.map((function(){return Number.MIN_VALUE}))),p.push(t.map((function(){return Number.MIN_VALUE})))}));for(var f=function(t){!l&&e.series[a[t]].type&&(l=e.series[a[t]].type);var c=a[t];h=e.series[c].group?e.series[c].group:"axis-".concat(n),!(i.collapsedSeriesIndices.indexOf(c)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(c)<0)||(i.allSeriesCollapsed=!1,o.forEach((function(t,a){if(e.series[c].group===t)for(var n=0;n=0?r[a][n]+=o:p[a][n]+=o,s[a][n]+=o,u=Math.min(u,o),g=Math.max(g,o)}}))),"bar"!==l&&"column"!==l||i.barGroups.push(h)},x=0;x1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w.config,r=this.w.globals,n=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===a&&(a=t+1);var l=r.series,h=l,c=l;"candlestick"===s.chart.type?(h=r.seriesCandleL,c=r.seriesCandleH):"boxPlot"===s.chart.type?(h=r.seriesCandleO,c=r.seriesCandleC):r.isRangeData&&(h=r.seriesRangeStart,c=r.seriesRangeEnd);var d=!1;if(r.seriesX.length>=a){var u,g=null===(u=r.brushSource)||void 0===u?void 0:u.w.config.chart.brush;(s.chart.zoom.enabled&&s.chart.zoom.autoScaleYaxis||null!=g&&g.enabled&&null!=g&&g.autoScaleYaxis)&&(d=!0)}for(var p=t;px&&r.seriesX[p][b]>s.xaxis.max;b--);}for(var m=x;m<=b&&mh[p][m]&&h[p][m]<0&&(o=h[p][m])}else r.hasNullValues=!0}"bar"!==f&&"column"!==f||(o<0&&n<0&&(n=0,i=Math.max(i,0)),o===Number.MIN_VALUE&&(o=0,e=Math.min(e,0)))}return"rangeBar"===s.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&(o=e),"bar"===s.chart.type&&(o<0&&n<0&&(n=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:n,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i,a=Number.MAX_VALUE;if(t.isMultipleYAxis){a=Number.MAX_VALUE;for(var s=0;st.dataPoints&&0!==t.dataPoints&&(a=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(t.series.length>1&&(a=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric){var s=t.maxX-t.minX;s<30&&(a=s-1)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var r=[],n=t.minX-1;n0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,a-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var s=e-a[i-1];s>0&&(t.minXDiff=Math.min(s,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var i=e.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map((function(t){return t}))]);var a={},s={};i.forEach((function(i){a[i]=[],s[i]=[],t.w.config.series.map((function(t,a){return i.indexOf(e.seriesNames[a])>-1?a:null})).filter((function(t){return null!==t})).forEach((function(r){for(var n=0;n0?a[i][n]+=parseFloat(e.series[r][n])+1e-4:s[i][n]+=parseFloat(e.series[r][n]))}}))})),Object.entries(a).forEach((function(t){var i=p(t,1)[0];a[i].forEach((function(t,r){e.maxY=Math.max(e.maxY,a[i][r]),e.minY=Math.min(e.minY,s[i][r])}))}))}}}]),t}(),ia=function(){function t(e,a){i(this,t),this.ctx=e,this.elgrid=a,this.w=e.w;var s=this.w;this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.axisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===s.config.chart.type&&s.config.plotOptions.bar.horizontal,this.xAxisoffX="bottom"===s.config.xaxis.position?s.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Ri(e)}return s(t,[{key:"drawYaxis",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.yaxis[t].labels.style,s=a.fontSize,r=a.fontFamily,n=a.fontWeight,o=i.group({class:"apexcharts-yaxis",rel:t,transform:"translate(".concat(e.globals.translateYAxisX[t],", 0)")});if(this.axesUtils.isYAxisHidden(t))return o;var l=i.group({class:"apexcharts-yaxis-texts-g"});o.add(l);var h=e.globals.yAxisScale[t].result.length-1,c=e.globals.gridHeight/h,d=e.globals.yLabelFormatters[t],u=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){var g=e.globals.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?g=0:"heatmap"===e.config.chart.type&&(g-=c/2),g+=parseInt(s,10)/3;for(var p=h;p>=0;p--){var f=d(u[p],p,e),x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(x*=-1);var b=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),m=this.axesUtils.getYAxisForeColor(a.colors,t),y=Array.isArray(m)?m[p]:m,w=v.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-label tspan"))).map((function(t){return t.textContent})),k=i.drawText({x:x,y:g,text:w.includes(f)&&!e.config.yaxis[t].labels.showDuplicates?"":f,textAnchor:b,fontSize:s,fontFamily:r,fontWeight:n,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(a.cssClass)});l.add(k),this.addTooltip(k,f),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(i,k,firstLabel,e.config.yaxis[t].labels.rotate),g+=c}}return this.addYAxisTitle(i,o,t),this.addAxisBorder(i,o,t,h,c),o}},{key:"getTextAnchor",value:function(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}},{key:"addTooltip",value:function(t,e){var i=document.createElementNS(this.w.globals.SVGNS,"title");i.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(i)}},{key:"rotateLabel",value:function(t,e,i,a){var s=t.rotateAroundCenter(i.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(".concat(a," ").concat(s.x," ").concat(r.y,")"))}},{key:"addYAxisTitle",value:function(t,e,i){var a=this.w;if(void 0!==a.config.yaxis[i].title.text){var s=t.group({class:"apexcharts-yaxis-title"}),r=a.config.yaxis[i].opposite?a.globals.translateYAxisX[i]:0,n=t.drawText({x:r,y:a.globals.gridHeight/2+a.globals.translateY+a.config.yaxis[i].title.offsetY,text:a.config.yaxis[i].title.text,textAnchor:"end",foreColor:a.config.yaxis[i].title.style.color,fontSize:a.config.yaxis[i].title.style.fontSize,fontWeight:a.config.yaxis[i].title.style.fontWeight,fontFamily:a.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(a.config.yaxis[i].title.style.cssClass)});s.add(n),e.add(s)}}},{key:"addAxisBorder",value:function(t,e,i,a,s){var r=this.w,n=r.config.yaxis[i].axisBorder,o=31+n.offsetX;if(r.config.yaxis[i].opposite&&(o=-31-n.offsetX),n.show){var l=t.drawLine(o,r.globals.translateY+n.offsetY-2,o,r.globals.gridHeight+r.globals.translateY+n.offsetY+2,n.color,0,n.width);e.add(l)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,a,n,r.config.yaxis[i].axisTicks,i,s,e)}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),s=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});a.add(s);var r=e.globals.yAxisScale[t].result.length-1,n=e.globals.gridWidth/r+.1,o=n+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,h=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),c=e.globals.timescaleLabels;if(c.length>0&&(this.xaxisLabels=c.slice(),r=(h=c.slice()).length),e.config.xaxis.labels.show)for(var d=c.length?0:r;c.length?d=0;c.length?d++:d--){var u=l(h[d],d,e),g=e.globals.gridWidth+e.globals.padHorizontal-(o-n+e.config.xaxis.labels.offsetX);if(c.length){var p=this.axesUtils.getLabel(h,c,g,d,this.drawnLabels,this.xaxisFontSize);g=p.x,u=p.text,this.drawnLabels.push(p.text),0===d&&e.globals.skipFirstTimelinelabel&&(u=""),d===h.length-1&&e.globals.skipLastTimelinelabel&&(u="")}var f=i.drawText({x:g,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:u,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(e.config.xaxis.labels.style.cssClass)});s.add(f),f.tspan(u),this.addTooltip(f,u),o+=n}return this.inversedYAxisTitleText(a),this.inversedYAxisBorder(a),a}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new Mi(this.ctx),a=e.config.xaxis.axisBorder;if(a.show){var s=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(s-=15);var r=i.drawLine(e.globals.padHorizontal+s+a.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,a.color,0,a.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new Mi(this.ctx);if(void 0!==e.config.xaxis.title.text){var a=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),s=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(e.config.xaxis.title.style.cssClass)});a.add(s),t.add(a)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g")),r=s?s.getBoundingClientRect():{width:0,height:0},n=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text")),o=n?n.getBoundingClientRect():{width:0,height:0};if(n){var l=this.xPaddingForYAxisTitle(t,r,o,e);n.setAttribute("x",l.xPos-(e?10:0));var h=a.rotateAroundCenter(n);n.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(h.x," ").concat(h.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,a){var s=this.w,r=0,n=10;return void 0===s.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(a?r=e.width+s.config.yaxis[t].title.offsetX+i.width/2+n/2:(r=-1*e.width+s.config.yaxis[t].title.offsetX+n/2+i.width/2,s.globals.isBarHorizontal&&(n=25,r=-1*e.width-s.config.yaxis[t].title.offsetX-n)),{xPos:r,padd:n})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,a=0,s=0,r=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach((function(o,l){var h=i.globals.ignoreYAxisIndexes.includes(l)||!o.show||o.floating||0===t[l].width,c=t[l].width+e[l].width;o.opposite?i.globals.isBarHorizontal?(s=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=s-o.labels.offsetX):(s=i.globals.gridWidth+i.globals.translateX+n,h||(n+=c+20),i.globals.translateYAxisX[l]=s-o.labels.offsetX+20):(a=i.globals.translateX-r,h||(r+=c+20),i.globals.translateYAxisX[l]=a+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w;v.listToArray(t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((function(e,i){var a=t.config.yaxis[i];if(a&&!a.floating&&void 0!==a.labels.align){var s=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=v.listToArray(t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"))),n=s.getBoundingClientRect();r.forEach((function(t){t.setAttribute("text-anchor",a.labels.align)})),"left"!==a.labels.align||a.opposite?"center"===a.labels.align?s.setAttribute("transform","translate(".concat(n.width/2*(a.opposite?1:-1),", 0)")):"right"===a.labels.align&&a.opposite&&s.setAttribute("transform","translate(".concat(n.width,", 0)")):s.setAttribute("transform","translate(-".concat(n.width,", 0)"))}}))}}]),t}(),aa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.documentEvent=v.bind(this.documentEvent,this)}return s(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var a=i.globals.events[t].indexOf(e);-1!==a&&i.globals.events[t].splice(a,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var a=i.globals.events[t],s=a.length,r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var a=v.extend(Hi,i);this.w.globals.locale=a.options}}]),t}(),ra=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawAxis",value:function(t,e){var i,a,s=this,r=this.w.globals,n=this.w.config,o=new Qi(this.ctx,e),l=new ia(this.ctx,e);r.axisCharts&&"radar"!==t&&(r.isBarHorizontal?(a=l.drawYaxisInversed(0),i=o.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(a)):(i=o.drawXaxis(),r.dom.elGraphical.add(i),n.yaxis.map((function(t,e){if(-1===r.ignoreYAxisIndexes.indexOf(e)&&(a=l.drawYaxis(e),r.dom.Paper.add(a),"back"===s.w.config.grid.position)){var i=r.dom.Paper.children()[1];i.remove(),r.dom.Paper.add(i)}}))))}}]),t}(),na=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Li(this.ctx),a=t.config.xaxis.crosshairs.fill.gradient,s=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,n=a.colorFrom,o=a.colorTo,l=a.opacityFrom,h=a.opacityTo,c=a.stops,d=s.enabled,u=s.left,g=s.top,p=s.blur,f=s.color,x=s.opacity,b=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(b=e.drawGradient("vertical",n,o,l,h,null,c,null));var m=e.drawRect();1===t.config.xaxis.crosshairs.width&&(m=e.drawLine());var y=t.globals.gridHeight;(!v.isNumber(y)||y<0)&&(y=0);var w=t.config.xaxis.crosshairs.width;(!v.isNumber(w)||w<0)&&(w=0),m.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:w,height:y,fill:b,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),d&&(m=i.dropShadow(m,{left:u,top:g,blur:p,color:f,opacity:x})),t.globals.dom.elGraphical.add(m)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new Mi(this.ctx),i=t.config.yaxis[0].crosshairs,a=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var s=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);s.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(s)}var r=e.drawLine(-a,0,t.globals.gridWidth+a,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(r)}}]),t}(),oa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,a=i.config;if(0!==a.responsive.length){var s=a.responsive.slice();s.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var r=new Wi({}),n=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=s[0].breakpoint,n=window.innerWidth>0?window.innerWidth:screen.width;if(n>a){var o=v.clone(i.globals.initialConfig);o.series=v.clone(i.config.series);var l=Pi.extendArrayProps(r,o,i);t=v.extend(l,t),t=v.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var h=0;h0&&"function"==typeof t[0]?(this.isColorFn=!0,i.config.series.map((function(a,s){var r=t[s]||t[0];return"function"==typeof r?r({value:i.globals.axisCharts?i.globals.series[s][0]||0:i.globals.series[s],seriesIndex:s,dataPointIndex:s,w:e.w}):r}))):t:this.predefined()}},{key:"applySeriesColors",value:function(t,e){t.forEach((function(t,i){t&&(e[i]=t)}))}},{key:"getMonochromeColors",value:function(t,e,i){var a=t.color,s=t.shadeIntensity,r=t.shadeTo,n=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,o=1/(n/s),l=0;return Array.from({length:n},(function(){var t="dark"===r?i.shadeColor(-1*l,a):i.shadeColor(l,a);return l+=o,t}))}},{key:"applyColorTypes",value:function(t,e){var i=this,a=this.w;t.forEach((function(t){a.globals[t].colors=void 0===a.config[t].colors?i.isColorFn?a.config.colors:e:a.config[t].colors.slice(),i.pushExtraColors(a.globals[t].colors)}))}},{key:"applyDataLabelsColors",value:function(t){var e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#424242":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(t){var e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}},{key:"pushExtraColors",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=e||a.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===a.config.chart.type&&a.config.plotOptions.heatmap&&a.config.plotOptions.heatmap.colorScale.inverse),i&&a.globals.series.length&&(s=a.globals.series[a.globals.maxValsInArrayIndex].length*a.globals.series.length),t.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var t=this,e=this.w,i=[];e.config.series.forEach((function(s,r){s.data.forEach((function(s,n){var o;o=e.globals.series[r][n],a=e.config.dataLabels.formatter(o,{ctx:t.dCtx.ctx,seriesIndex:r,dataPointIndex:n,w:e}),i.push(a)}))}));var a=v.getLargestStringFromArr(i),s=new Mi(this.dCtx.ctx),r=e.config.dataLabels.style,n=s.getTextRects(a,parseInt(r.fontSize),r.fontFamily);return{width:1.05*n.width,height:n.height}}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var a=e.map((function(t,e){return Array.isArray(t)?t.length:1})),s=Math.max.apply(Math,f(a));i=e[a.indexOf(s)]}return i}}]),t}(),da=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var a=this.getxAxisTimeScaleLabelsCoords();t={width:a.width,height:a.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var s=e.globals.xLabelFormatter,r=v.getLargestStringFromArr(i),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);e.globals.isBarHorizontal&&(n=r=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var o=new Xi(this.dCtx.ctx),l=r;r=o.xLabelFormat(s,r,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),n=o.xLabelFormat(s,n,l,{i:void 0,dateFormatter:new zi(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(n=r="1");var h=new Mi(this.dCtx.ctx),c=h.getTextRects(r,e.config.xaxis.labels.style.fontSize),d=c;if(r!==n&&(d=h.getTextRects(n,e.config.xaxis.labels.style.fontSize)),(t={width:c.width>=d.width?c.width:d.width,height:c.height>=d.height?c.height:d.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return h.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};c=u(r),r!==n&&(d=u(n)),t.height=(c.height>d.height?c.height:d.height)/1.5,t.width=c.width>d.width?c.width:d.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var i,a=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,s=e.globals.groups.map((function(t){return t.title})),r=v.getLargestStringFromArr(s),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),o=new Mi(this.dCtx.ctx),l=o.getTextRects(r,a),h=l;return r!==n&&(h=o.getTextRects(n,a)),i={width:l.width>=h.width?l.width:h.width,height:l.height>=h.height?l.height:h.height},e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var a=new Mi(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,i=a.height}return{width:e,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(t){return t.value})),a=i.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new Mi(this.dCtx.ctx).getTextRects(a,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,a=i.globals,s=i.config,r=s.xaxis.type,n=t.width;a.skipLastTimelinelabel=!1,a.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,o){s.yaxis.length>1&&function(t){return-1!==a.collapsedSeriesIndices.indexOf(t)}(o)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var o=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+n/1.75-e.dCtx.yAxisWidthRight,h=o.position-n/1.75+e.dCtx.yAxisWidthLeft,c="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>a.svgWidth-a.translateX-c&&(a.skipLastTimelinelabel=!0),h<-(t.show&&!t.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type?10:n/1.75)&&(a.skipFirstTimelinelabel=!0)}else"datetime"===r?e.dCtx.gridPad.right(null===(a=String(c(e,o)))||void 0===a?void 0:a.length)?t:e}),d),g=u=c(u,o);if(void 0!==u&&0!==u.length||(u=l.niceMax),e.globals.isBarHorizontal){a=0;var p=e.globals.labels.slice();u=v.getLargestStringFromArr(p),u=c(u,{seriesIndex:n,dataPointIndex:-1,w:e}),g=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,p)}var f=new Mi(t.dCtx.ctx),x="rotate(".concat(r.labels.rotate," 0 0)"),b=f.getTextRects(u,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1),m=b;u!==g&&(m=f.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,x,!1)),i.push({width:(h>m.width||h>b.width?h:m.width>b.width?m.width:b.width)+a,height:m.height>b.height?m.height:b.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,a){if(e.show&&void 0!==e.title.text){var s=new Mi(t.dCtx.ctx),r="rotate(".concat(e.title.rotate," 0 0)"),n=s.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);i.push({width:n.width,height:n.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,a=0,s=t.globals.yAxisScale.length>1?10:0,r=new Ri(this.dCtx.ctx),n=function(n,o){var l=t.config.yaxis[o].floating,h=0;n.width>0&&!l?(h=n.width+s,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(o)&&(h=h-n.width-s)):h=l||r.isYAxisHidden(o)?0:5,t.config.yaxis[o].opposite?a+=h:i+=h,e+=h};return t.globals.yLabelsCoords.map((function(t,e){n(t,e)})),t.globals.yTitleCoords.map((function(t,e){n(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=a,e}}]),t}(),ga=function(){function t(e){i(this,t),this.w=e.w,this.dCtx=e}return s(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w,i=e.config,a=e.globals;if(a.noData||a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.series.length)return 0;var s=function(t){return["bar","rangeBar","candlestick","boxPlot"].includes(t)},r=i.chart.type,n=0,o=s(r)?i.series.length:1;a.comboBarCount>0&&(o=a.comboBarCount),a.collapsedSeries.forEach((function(t){s(t.type)&&(o-=1)})),i.chart.stacked&&(o=1);var l=s(r)||a.comboBarCount>0,h=Math.abs(a.initialMaxX-a.initialMinX);if(l&&a.isXNumeric&&!a.isBarHorizontal&&o>0&&0!==h){h<=3&&(h=a.dataPoints);var c=h/t,d=a.minXDiff&&a.minXDiff/c>0?a.minXDiff/c:0;d>t/2&&(d/=2),(n=d*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(n=1),a.barPadForNumericAxis=n}return n}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,a=this.dCtx.isSparkline||!i.axisCharts?0:10;["title","subtitle"].forEach((function(s){void 0!==e.config[s].text?a+=e.config[s].margin:a+=t.dCtx.isSparkline||!i.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||i.axisCharts||(a+=10);var s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight-=s.height+r.height+a,i.translateY+=s.height+r.height+a}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,a=new Ri(this.dCtx.ctx);i.config.yaxis.forEach((function(s,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||s.floating||a.isYAxisHidden(r)||(s.opposite&&(i.globals.translateX-=e[r].width+t[r].width+parseInt(s.labels.style.fontSize,10)/1.2+12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),pa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new ca(this),this.dimYAxis=new ua(this),this.dimXAxis=new da(this),this.dimGrid=new ga(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return s(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,i=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var a=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,f(e.config.stroke.width)):e.config.stroke.width;this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var i=p(e,2),a=i[0],s=i[1];t.gridPad[a]=Math.max(s,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(a/2,this.gridPad.top),this.gridPad.bottom=Math.max(a/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var s=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*s,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(s>0?s:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,a=this.dimYAxis.getyAxisLabelsCoords(),s=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:a[i].width,index:i}),e.globals.yTitleCoords.push({width:s[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o,n),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,h=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var c=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,h=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,h=0,c=0),this.isSparkline||"treemap"===e.config.chart.type||this.dimXAxis.additionalPaddingXLabels(r);var d=function(){i.translateX=l+t.datalabelsCoords.width,i.gridHeight=i.svgHeight-t.lgRect.height-h-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l-2*t.datalabelsCoords.width};switch("top"===e.config.xaxis.position&&(c=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=c,d();break;case"top":i.translateY=this.lgRect.height+c,d();break;case"left":i.translateY=c,i.translateX=this.lgRect.width+l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width;break;case"right":i.translateY=c,i.translateX=l+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-h-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,a),new ia(this.ctx).setYAxisXPosition(a,s)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,a=0;t.config.legend.show&&!t.config.legend.floating&&(a=20);var s="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[s].offsetY,n=i.plotOptions[s].offsetX;if(!i.legend.show||i.legend.floating){e.gridHeight=e.svgHeight;var o=e.dom.elWrap.getBoundingClientRect().width;return e.gridWidth=Math.min(o,e.gridHeight),e.translateY=r,void(e.translateX=n+(e.svgWidth-e.gridWidth)/2)}switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=r-10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+r+10,e.translateX=n+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-a,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+this.lgRect.width+a;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-a-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=n+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,i){var a=this.w,s=a.globals.hasXaxisGroups?2:1,r=i.height+t.height+e.height,n=a.globals.isMultiLineX?1.2:a.globals.LINE_HEIGHT_RATIO,o=a.globals.rotateXLabels?22:10,l=a.globals.rotateXLabels&&"bottom"===a.config.legend.position?10:0;this.xAxisHeight=r*n+s*o+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>a.config.xaxis.labels.maxHeight&&(this.xAxisHeight=a.config.xaxis.labels.maxHeight),a.config.xaxis.labels.minHeight&&this.xAxisHeightc&&(this.yAxisWidth=c)}}]),t}(),fa=function(){function t(e){i(this,t),this.w=e.w,this.lgCtx=e}return s(t,[{key:"getLegendStyles",value:function(){var t,e,i,a=document.createElement("style");a.setAttribute("type","text/css");var s=(null===(t=this.lgCtx.ctx)||void 0===t||null===(e=t.opts)||void 0===e||null===(i=e.chart)||void 0===i?void 0:i.nonce)||this.w.config.chart.nonce;s&&a.setAttribute("nonce",s);var r=document.createTextNode("\n .apexcharts-flip-y {\n transform: scaleY(-1) translateY(-100%);\n transform-origin: top;\n transform-box: fill-box;\n }\n .apexcharts-flip-x {\n transform: scaleX(-1);\n transform-origin: center;\n transform-box: fill-box;\n }\n .apexcharts-legend {\n display: flex;\n overflow: auto;\n padding: 0 10px;\n }\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n flex-wrap: wrap\n }\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n flex-direction: column;\n bottom: 0;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n justify-content: flex-start;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n justify-content: center;\n }\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n justify-content: flex-end;\n }\n .apexcharts-legend-series {\n cursor: pointer;\n line-height: normal;\n display: flex;\n align-items: center;\n }\n .apexcharts-legend-text {\n position: relative;\n font-size: 14px;\n }\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\n pointer-events: none;\n }\n .apexcharts-legend-marker {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n margin-right: 1px;\n }\n\n .apexcharts-legend-series.apexcharts-no-click {\n cursor: auto;\n }\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n display: none !important;\n }\n .apexcharts-inactive-legend {\n opacity: 0.45;\n }\n\n ");return a.appendChild(r),a}},{key:"getLegendDimensions",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(t,e){var i=this,a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;var s=null,r=null;if(a.globals.risingSeries=[],a.globals.axisCharts?(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),r=parseInt(s.getAttribute("data:realIndex"),10)):(s=a.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),r=parseInt(s.getAttribute("rel"),10)-1),e)[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,r)}));else this.hideSeries({seriesEl:s,realIndex:r})}else{var n=a.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(t+1,"'] path")),o=a.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=a.config.plotOptions.pie.donut.labels;new Mi(this.lgCtx.ctx).pathMouseDown(n,null),this.lgCtx.ctx.pie.printDataLabelsInner(n.node,l)}n.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(t){var e=t.realIndex,i=this.w,a=i.globals,s=v.clone(i.config.series);if(a.axisCharts){var r=i.config.yaxis[a.seriesYAxisReverseMap[e]],n={index:e,data:s[e].data.slice(),type:s[e].type||i.config.chart.type};if(r&&r.show&&r.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(e)<0&&(a.ancillaryCollapsedSeries.push(n),a.ancillaryCollapsedSeriesIndices.push(e));else if(a.collapsedSeriesIndices.indexOf(e)<0){a.collapsedSeries.push(n),a.collapsedSeriesIndices.push(e);var o=a.risingSeries.indexOf(e);a.risingSeries.splice(o,1)}}else a.collapsedSeries.push({index:e,data:s[e]}),a.collapsedSeriesIndices.push(e);return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===i.config.series.length,this._getSeriesBasedOnCollapsedState(s)}},{key:"hideSeries",value:function(t){for(var e=t.seriesEl,i=t.realIndex,a=this.w,s=this.getSeriesAfterCollapsing({realIndex:i}),r=e.childNodes,n=0;n0){for(var r=0;r1;if(this.legendHelpers.appendToForeignObject(),(a||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(t){var e=t.i,i=t.fillcolor,a=this.w,s=document.createElement("span");s.classList.add("apexcharts-legend-marker");var r=a.config.legend.markers.shape||a.config.markers.shape,n=r;Array.isArray(r)&&(n=r[e]);var o=Array.isArray(a.config.legend.markers.size)?parseFloat(a.config.legend.markers.size[e]):parseFloat(a.config.legend.markers.size),l=Array.isArray(a.config.legend.markers.offsetX)?parseFloat(a.config.legend.markers.offsetX[e]):parseFloat(a.config.legend.markers.offsetX),h=Array.isArray(a.config.legend.markers.offsetY)?parseFloat(a.config.legend.markers.offsetY[e]):parseFloat(a.config.legend.markers.offsetY),c=Array.isArray(a.config.legend.markers.strokeWidth)?parseFloat(a.config.legend.markers.strokeWidth[e]):parseFloat(a.config.legend.markers.strokeWidth),d=s.style;if(d.height=2*(o+c)+"px",d.width=2*(o+c)+"px",d.left=l+"px",d.top=h+"px",a.config.legend.markers.customHTML)d.background="transparent",d.color=i[e],Array.isArray(a.config.legend.markers.customHTML)?a.config.legend.markers.customHTML[e]&&(s.innerHTML=a.config.legend.markers.customHTML[e]()):s.innerHTML=a.config.legend.markers.customHTML();else{var g=new Vi(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(n),seriesIndex:e,strokeWidth:c,size:o}),p=window.SVG().addTo(s).size("100%","100%"),f=new Mi(this.ctx).drawMarker(0,0,u(u({},g),{},{pointFillColor:Array.isArray(i)?i[e]:g.pointFillColor,shape:n}));a.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach((function(t){t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"})),p.add(f)}return s}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,a=e.globals.seriesNames,s=e.config.legend.markers.fillColors?e.config.legend.markers.fillColors.slice():e.globals.colors.slice();if("heatmap"===e.config.chart.type){var r=e.config.plotOptions.heatmap.colorScale.ranges;a=r.map((function(t){return t.name?t.name:t.from+" - "+t.to})),s=r.map((function(t){return t.color}))}else this.isBarsDistributed&&(a=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(a=e.config.legend.customLegendItems);for(var n=e.globals.legendFormatter,o=e.config.legend.inverseOrder,l=o?a.length-1:0;o?l>=0:l<=a.length-1;o?l--:l++){var h,c=n(a[l],{seriesIndex:l,w:e}),d=!1,u=!1;if(e.globals.collapsedSeries.length>0)for(var g=0;g0)for(var p=0;p0?l-10:0)+(h>0?h-10:0)}a.style.position="absolute",r=r+t+i.config.legend.offsetX,n=n+e+i.config.legend.offsetY,a.style.left=r+"px",a.style.top=n+"px","right"===i.config.legend.position&&(a.style.left="auto",a.style.right=25+i.config.legend.offsetX+"px");["width","height"].forEach((function(t){a.style[t]&&(a.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=new pa(this.ctx),i=e.dimHelpers.getTitleSubtitleCoords("title"),a=e.dimHelpers.getTitleSubtitleCoords("subtitle"),s=0;"top"===t.config.legend.position&&(s=i.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,s)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendDimensions(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var a=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,a,this.w]),new Zi(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new Zi(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,a="true"===t.target.getAttribute("data:collapsed"),s=this.w.config.chart.events.legendClick;"function"==typeof s&&s(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;"function"==typeof r&&t.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,a)}}}]),t}(),ba=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=a.globals.minX,this.maxX=a.globals.maxX}return s(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},a=i();if(a.setAttribute("class","apexcharts-toolbar"),a.style.top=e.config.chart.toolbar.offsetY+"px",a.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(a),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var s=0;s\n \n \n\n'),n("zoomOut",this.elZoomOut,'\n \n \n\n');var o=function(i){t.t[i]&&e.config.chart[i].enabled&&r.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'\n \n \n \n':'\n \n \n',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&e.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'\n \n \n \n \n \n \n \n',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),n("reset",this.elZoomReset,'\n \n \n'),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;lthis.wheelDelay&&(this.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){a-i.globals.lastWheelExecution>e.wheelDelay&&(e.executeMouseWheelZoom(t),i.globals.lastWheelExecution=a)}),this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(t){var e,i=this.w;this.minX=i.globals.isRangeBar?i.globals.minY:i.globals.minX,this.maxX=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;var a=null===(e=this.gridRect)||void 0===e?void 0:e.getBoundingClientRect();if(a){var s,r,n,o=(t.clientX-a.left)/a.width,l=this.minX,h=this.maxX,c=h-l;if(t.deltaY<0){var d=l+o*c;r=d-(s=.5*c)/2,n=d+s/2}else r=l-(s=1.5*c)/2,n=h+s/2;if(!i.globals.isRangeBar){r=Math.max(r,i.globals.initialMinX),n=Math.min(n,i.globals.initialMaxX);var u=.01*(i.globals.initialMaxX-i.globals.initialMinX);if(n-r0&&t.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(t,e,i,a,s){return"l"===s||"r"===s?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0)},updateHandle:function(t,e){return t.center(e[0],e[1])}}).resize().on("resizing",this.selectionDragging.bind(this,"resizing")))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(u(u({},t.globals.selection),{},{translateX:t.globals.translateX,translateY:t.globals.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,a=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i;t.globals.isRangeBar&&(i=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,a=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var s={x:i,y:0,width:a,height:t.globals.gridHeight,translateX:t.globals.translateX,translateY:t.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(s),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,a=t.width,s=t.height,r=t.translateX,n=void 0===r?0:r,o=t.translateY,l=void 0===o?0:o,h=this.w,c=this.zoomRect,d=this.selectionRect;if(this.dragged||null!==h.globals.selection){var u={transform:"translate("+n+", "+l+")"};h.globals.zoomEnabled&&this.dragged&&(a<0&&(a=1),c.attr({x:e,y:i,width:a,height:s,fill:h.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":h.config.chart.zoom.zoomedArea.fill.opacity,stroke:h.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":h.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":h.config.chart.zoom.zoomedArea.stroke.opacity}),Mi.setAttrs(c.node,u)),h.globals.selectionEnabled&&(d.attr({x:e,y:i,width:a>0?a:0,height:s>0?s:0,fill:h.config.chart.selection.fill.color,"fill-opacity":h.config.chart.selection.fill.opacity,stroke:h.config.chart.selection.stroke.color,"stroke-width":h.config.chart.selection.stroke.width,"stroke-dasharray":h.config.chart.selection.stroke.dashArray,"stroke-opacity":h.config.chart.selection.stroke.opacity}),Mi.setAttrs(d.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.gridRect.getBoundingClientRect(),n=s.startX-1,o=s.startY,l=!1,h=!1,c=s.clientX-r.left-n,d=s.clientY-r.top-o,g={translateX:a.globals.translateX,translateY:a.globals.translateY};return Math.abs(c+n)>a.globals.gridWidth?c=a.globals.gridWidth-n:s.clientX-r.left<0&&(c=n),n>s.clientX-r.left&&(l=!0,c=Math.abs(c)),o>s.clientY-r.top&&(h=!0,d=Math.abs(d)),g=u(u({},g="x"===i?{x:l?n-c:n,y:0,width:c,height:a.globals.gridHeight}:"y"===i?{x:0,y:h?o-d:o,width:a.globals.gridWidth,height:d}:{x:l?n-c:n,y:h?o-d:o,width:c,height:d}),{},{translateX:a.globals.translateX,translateY:a.globals.translateY}),s.drawSelectionRect(g),s.selectionDragging("resizing"),g}},{key:"selectionDragging",value:function(t,e){var i=this,a=this.w;if(e){e.preventDefault();var s=e.detail,r=s.handler,n=s.box,o=n.x,l=n.y;othis.constraints.x2&&(o=this.constraints.x2-n.w),n.y2>this.constraints.y2&&(l=this.constraints.y2-n.h),r.move(o,l);var h=this.xyRatios,c=this.selectionRect,d=0;"resizing"===t&&(d=30);var u=function(t){return parseFloat(c.node.getAttribute(t))},g={x:u("x"),y:u("y"),width:u("width"),height:u("height")};a.globals.selection=g,"function"==typeof a.config.chart.events.selection&&a.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,s,r,n=i.gridRect.getBoundingClientRect(),o=c.node.getBoundingClientRect();a.globals.isRangeBar?(t=a.globals.yAxisScale[0].niceMin+(o.left-n.left)*h.invertedYRatio,e=a.globals.yAxisScale[0].niceMin+(o.right-n.left)*h.invertedYRatio,s=0,r=1):(t=a.globals.xAxisScale.niceMin+(o.left-n.left)*h.xRatio,e=a.globals.xAxisScale.niceMin+(o.right-n.left)*h.xRatio,s=a.globals.yAxisScale[0].niceMin+(n.bottom-o.bottom)*h.yRatio[0],r=a.globals.yAxisScale[0].niceMax-(o.top-n.top)*h.yRatio[0]);var l={xaxis:{min:t,max:e},yaxis:{min:s,max:r}};a.config.chart.events.selection(i.ctx,l),a.config.chart.brush.enabled&&void 0!==a.config.chart.events.brushScrolled&&a.config.chart.events.brushScrolled(i.ctx,l)}),d))}}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,a=this.w,s=e,r=this.xyRatios,n=this.ctx.toolbar;if(s.startX>s.endX){var o=s.startX;s.startX=s.endX,s.endX=o}if(s.startY>s.endY){var l=s.startY;s.startY=s.endY,s.endY=l}var h=void 0,c=void 0;a.globals.isRangeBar?(h=a.globals.yAxisScale[0].niceMin+s.startX*r.invertedYRatio,c=a.globals.yAxisScale[0].niceMin+s.endX*r.invertedYRatio):(h=a.globals.xAxisScale.niceMin+s.startX*r.xRatio,c=a.globals.xAxisScale.niceMin+s.endX*r.xRatio);var d=[],u=[];if(a.config.yaxis.forEach((function(t,e){var i=a.globals.seriesYAxisMap[e][0];d.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.startY),u.push(a.globals.yAxisScale[e].niceMax-r.yRatio[i]*s.endY)})),s.dragged&&(s.dragX>10||s.dragY>10)&&h!==c)if(a.globals.zoomEnabled){var g=v.clone(a.globals.initialConfig.yaxis),p=v.clone(a.globals.initialConfig.xaxis);if(a.globals.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),c=Math.floor(c),h<1&&(h=1,c=a.globals.dataPoints),c-h<2&&(c=h+1)),"xy"!==i&&"x"!==i||(p={min:h,max:c}),"xy"!==i&&"y"!==i||g.forEach((function(t,e){g[e].min=u[e],g[e].max=d[e]})),n){var f=n.getBeforeZoomRange(p,g);f&&(p=f.xaxis?f.xaxis:p,g=f.yaxis?f.yaxis:g)}var x={xaxis:p};a.config.chart.group||(x.yaxis=g),s.ctx.updateHelpers._updateOptions(x,!1,s.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&n.zoomCallback(p,g)}else if(a.globals.selectionEnabled){var b,m=null;b={min:h,max:c},"xy"!==i&&"y"!==i||(m=v.clone(a.config.yaxis)).forEach((function(t,e){m[e].min=u[e],m[e].max=d[e]})),a.globals.selection=s.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(s.ctx,{xaxis:b,yaxis:m})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,a=e;if(void 0!==i.globals.lastClientPosition.x){var s=i.globals.lastClientPosition.x-a.clientX,r=i.globals.lastClientPosition.y-a.clientY;Math.abs(s)>Math.abs(r)&&s>0?this.moveDirection="left":Math.abs(s)>Math.abs(r)&&s<0?this.moveDirection="right":Math.abs(r)>Math.abs(s)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(s)&&r<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:a.clientX,y:a.clientY};var n=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||a.panScrolled(n,o)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,a=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+a,i=t.globals.maxX+a):"right"===this.moveDirection&&(e=t.globals.minX-a,i=t.globals.maxX-a),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,a=this.xyRatios,s=v.clone(i.globals.initialConfig.yaxis),r=a.xRatio,n=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(r=a.invertedYRatio,n=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(t=n+i.globals.gridWidth/15*r,e=o+i.globals.gridWidth/15*r):"right"===this.moveDirection&&(t=n-i.globals.gridWidth/15*r,e=o-i.globals.gridWidth/15*r),i.globals.isRangeBar||(ti.globals.initialMaxX)&&(t=n,e=o);var l={xaxis:{min:t,max:e}};i.config.chart.group||(l.yaxis=s),this.updateScrolledChart(l,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var a=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof a.config.chart.events.scrolled&&a.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),a}(ba),va=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return s(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,a=t.clientX,s=t.clientY,r=this.w,n=i.getBoundingClientRect(),o=n.width,l=n.height,h=o/(r.globals.dataPoints-1),c=l/r.globals.dataPoints,d=this.hasBars();!r.globals.comboCharts&&!d||r.config.xaxis.convertedCatToNumeric||(h=o/r.globals.dataPoints);var u=a-n.left-r.globals.barPadForNumericAxis,g=s-n.top;u<0||g<0||u>o||g>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var p=Math.round(u/h),f=Math.floor(g/c);d&&!r.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(u/h),p-=1);var x=null,b=null,m=r.globals.seriesXvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))})),y=r.globals.seriesYvalues.map((function(t){return t.filter((function(t){return v.isNumber(t)}))}));if(r.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),k=u*(w.width/o),A=g*(w.height/l);x=(b=this.closestInMultiArray(k,A,m,y)).index,p=b.j,null!==x&&(m=r.globals.seriesXvalues[x],p=(b=this.closestInArray(k,m)).index)}return r.globals.capturedSeriesIndex=null===x?-1:x,(!p||p<1)&&(p=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=f:r.globals.capturedDataPointIndex=p,{capturedSeries:x,j:r.globals.isBarHorizontal?f:p,hoverX:u,hoverY:g}}},{key:"closestInMultiArray",value:function(t,e,i,a){var s=this.w,r=0,n=null,o=-1;s.globals.series.length>1?r=this.getFirstActiveXArray(i):n=0;var l=i[r][0],h=Math.abs(t-l);if(i.forEach((function(e){e.forEach((function(e,i){var a=Math.abs(t-e);a<=h&&(h=a,o=i)}))})),-1!==o){var c=a[r][o],d=Math.abs(e-c);n=r,a.forEach((function(t,i){var a=Math.abs(e-t[o]);a<=d&&(d=a,n=i)}))}return{index:n,j:o}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,i=0,a=t.map((function(t,e){return t.length>0?e:-1})),s=0;s0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=f(t)).sort((function(t,e){var i=Number(t.getAttribute("data:realIndex")),a=Number(e.getAttribute("data:realIndex"));return ai?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{key:"getPathFromPoint",value:function(t,e){var i=Number(t.getAttribute("cx")),a=Number(t.getAttribute("cy")),s=t.getAttribute("shape");return new Mi(this.ctx).getMarkerPath(i,a,s,e)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s ').concat(i.attrs.name,""),e+="
".concat(i.val,"
")})),m.innerHTML=t+"",v.innerHTML=e+""};n?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?y():(m.innerHTML="",v.innerHTML=""):y()}else m.innerHTML="",v.innerHTML="";null!==p&&(a[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,a[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:"");if(n&&f[0]){if(l.config.tooltip.hideEmptySeries){var w=a[e].querySelector(".apexcharts-tooltip-marker"),k=a[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(c)?(w.style.display="none",k.style.display="none"):(w.style.display="block",k.style.display="block")}null==c||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1||Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)?f[0].parentNode.style.display="none":f[0].parentNode.style.display=l.config.tooltip.items.display}else Array.isArray(h.tConfig.enabledOnSeries)&&-1===h.tConfig.enabledOnSeries.indexOf(e)&&(f[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(t,e){var i=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(e));a&&(a.classList.add("apexcharts-active"),a.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",n="",o=null,l=null,h={series:a.globals.series,seriesIndex:e,dataPointIndex:i,w:a},c=a.globals.ttZFormatter;null===i?l=a.globals.series[e]:a.globals.isXNumeric&&"treemap"!==a.config.chart.type?(r=s[e][i],0===s[e].length&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=new $i(this.ctx).isFormatXY()?void 0!==a.config.series[e].data[i]?a.config.series[e].data[i].x:"":void 0!==a.globals.labels[i]?a.globals.labels[i]:"";var d=r;a.globals.isXNumeric&&"datetime"===a.config.xaxis.type?r=new Xi(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zi(this.ctx).formatDate,w:this.w}):r=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](d,h):a.globals.xLabelFormatter(d,h);return void 0!==a.config.tooltip.x.formatter&&(r=a.globals.ttKeyFormatter(d,h)),a.globals.seriesZ.length>0&&a.globals.seriesZ[e].length>0&&(o=c(a.globals.seriesZ[e][i],a)),n="function"==typeof a.config.xaxis.tooltip.formatter?a.globals.xaxisTooltipFormatter(d,h):r,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,a=t.y1,s=t.y2,r=t.w,n=this.ttCtx.getElTooltip(),o=r.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]),n.innerHTML=o({ctx:this.ctx,series:r.globals.series,seriesIndex:e,dataPointIndex:i,y1:a,y2:s,w:r})}}]),t}(),wa=function(){function t(e){i(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return s(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=t-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(null!==e&&(r=a.globals.gridWidth/n*e),null===s||a.globals.isBarHorizontal||(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=r;"tickWidth"!==a.config.xaxis.crosshairs.width&&"barWidth"!==a.config.xaxis.crosshairs.width||(o=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&Mi.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&Mi.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;if(t-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=e.globals.translateX;var s;s=new Mi(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=e.globals.translateY+a,r=i.yaxisTTEls[t].getBoundingClientRect().height,n=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(n-=26),s-=r/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=s+"px",i.yaxisTTEls[t].style.left=n+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),n=s.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(t)+o+5,h=parseFloat(e)+o/2;if(l>a.globals.gridWidth/2&&(l=l-n.ttWidth-o-10),l>a.globals.gridWidth-n.ttWidth-10&&(l=a.globals.gridWidth-n.ttWidth),l<-20&&(l=-20),a.config.tooltip.followCursor){var c=s.getElGrid().getBoundingClientRect();(l=s.e.clientX-c.left)>a.globals.gridWidth/2&&(l-=s.tooltipRect.ttWidth),(h=s.e.clientY+a.globals.translateY-c.top)>a.globals.gridHeight/2&&(h-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+h>a.globals.gridHeight&&(h=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(l)||(l+=a.globals.translateX,r.style.left=l+"px",r.style.top=h+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),r=0;r0){var g=u.getAttribute("shape"),p=l.getMarkerPath(s,r,g,1.5*c);u.setAttribute("d",p)}this.moveXCrosshairs(s),o.fixedTooltip||this.moveTooltip(s,r,c)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,a=i.w,s=0,r=0,n=a.globals.pointsArray,o=new Zi(this.ctx),l=new Mi(this.ctx);e=o.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var h=i.tooltipUtil.getHoverMarkerSize(e);n[e]&&(s=n[e][t][0],r=n[e][t][1]);var c=i.tooltipUtil.getAllMarkers();if(null!==c)for(var d=0;d0){var b=l.getMarkerPath(s,g,f,h);c[d].setAttribute("d",b)}else c[d].setAttribute("d","")}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,r||a.globals.gridHeight,h)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(r=new Zi(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"']"));n||"number"!=typeof e||(n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var o=n?parseFloat(n.getAttribute("cx")):0,l=n?parseFloat(n.getAttribute("cy")):0,h=n?parseFloat(n.getAttribute("barWidth")):0,c=a.getElGrid().getBoundingClientRect(),d=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!d&&(o-=s%2!=0?h/2:0),n&&d&&i.globals.comboCharts&&(o-=h/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[t-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[t]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?l-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?l=a.e.clientY-c.top-a.tooltipRect.ttHeight/2:l+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(l=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,l||i.globals.gridHeight)}}]),t}(),ka=function(){function t(e){i(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new wa(e)}return s(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new Mi(this.ctx),i=new Vi(this.ctx),a=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=f(a),t.config.chart.stacked&&a.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var s=0;s2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,s=this.w;"bubble"!==s.config.chart.type&&this.newPointSize(t,e);var r=e.getAttribute("cx"),n=e.getAttribute("cy");if(null!==i&&null!==a&&(r=i,n=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===s.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(r,n,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,a=this.ttCtx,s=t,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=e.config.markers.hover.size,o=0;o0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(t[e],i);t[e].setAttribute("d",a)}else t[e].setAttribute("d","M0,0")}}}]),t}(),Aa=function(){function t(e){i(this,t),this.w=e.w;var a=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!a.globals.isBarHorizontal&&"rangeBar"===a.config.chart.type&&a.config.plotOptions.bar.rangeBarGroupRows}return s(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,a=t.x,s=t.y,r=t.type,n=this.ttCtx,o=this.w;if(e.target.classList.contains("apexcharts-".concat(r,"-rect"))){var l=this.getAttr(e,"i"),h=this.getAttr(e,"j"),c=this.getAttr(e,"cx"),d=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),g=this.getAttr(e,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:h,shared:!1,e:e}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=h,a=c+n.tooltipRect.ttWidth/2+u,s=d+n.tooltipRect.ttHeight/2-g/2,n.tooltipPosition.moveXCrosshairs(c+u/2),a>o.globals.gridWidth/2&&(a=c-n.tooltipRect.ttWidth/2+u),n.w.config.tooltip.followCursor){var p=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-p.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),s=o.globals.clientY-p.top-(s>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=t.x,n=t.y,o=this.w,l=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var h=parseInt(s.paths.getAttribute("cx"),10),c=parseInt(s.paths.getAttribute("cy"),10),d=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),e=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=v.findAncestor(s.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:a}),"mouseup"===a.type&&l.markerClick(a,e,i),o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=i,r=h,n=c+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var g=l.getElGrid().getBoundingClientRect();n=l.e.clientY+o.globals.translateY-g.top}d<0&&(n=c),l.marker.enlargeCurrentPoint(i,s.paths,r,n)}return{x:r,y:n}}},{key:"handleBarTooltip",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=this.ttCtx,o=n.getElTooltip(),l=0,h=0,c=0,d=this.getBarTooltipXY({e:a,opt:s});if(null!==d.j||0!==d.barHeight||0!==d.barWidth){e=d.i;var u=d.j;if(r.globals.capturedSeriesIndex=e,r.globals.capturedDataPointIndex=u,r.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!r.config.tooltip.shared?(h=d.x,c=d.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[e]:r.config.stroke.width,l=h):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(c)&&(c=r.globals.svgHeight-n.tooltipRect.ttHeight),parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),h+n.tooltipRect.ttWidth>r.globals.gridWidth?h-=n.tooltipRect.ttWidth:h<0&&(h=0),n.w.config.tooltip.followCursor){var g=n.getElGrid().getBoundingClientRect();c=n.e.clientY-g.top}null===n.tooltip&&(n.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?n.tooltipPosition.moveXCrosshairs(l+i/2):n.tooltipPosition.moveXCrosshairs(l)),!n.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(c=c+r.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=h+r.globals.translateX+"px",o.style.top=c+"px")}}},{key:"getBarTooltipXY",value:function(t){var e=this,i=t.e,a=t.opt,s=this.w,r=null,n=this.ttCtx,o=0,l=0,h=0,c=0,d=0,u=i.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){var g=i.target,p=g.getBoundingClientRect(),f=a.elGrid.getBoundingClientRect(),x=p.height;d=p.height;var b=p.width,m=parseInt(g.getAttribute("cx"),10),v=parseInt(g.getAttribute("cy"),10);c=parseFloat(g.getAttribute("barWidth"));var y="touchmove"===i.type?i.touches[0].clientX:i.clientX;r=parseInt(g.getAttribute("j"),10),o=parseInt(g.parentNode.getAttribute("rel"),10)-1;var w=g.getAttribute("data-range-y1"),k=g.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(g.parentNode.getAttribute("data:realIndex"),10));var A=function(t){return s.globals.isXNumeric?m-b/2:e.isVerticalGroupedRangeBar?m+b/2:m-n.dataPointsDividedWidth+b/2},C=function(){return v-n.dataPointsDividedHeight+x/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:r,y1:w?parseInt(w,10):null,y2:k?parseInt(k,10):null,shared:!n.showOnIntersect&&s.config.tooltip.shared,e:i}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(l=y-f.left+15,h=C()):(l=A(),h=i.clientY-f.top-n.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((l=m)0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var a=this.ttCtx,s=this.w,r=s.globals,n=r.seriesYAxisMap[t];if(a.yaxisTooltips[t]&&n.length>0){var o=r.yLabelFormatters[t],l=a.getElGrid().getBoundingClientRect(),h=n[0],c=0;i.yRatio.length>1&&(c=h);var d=(e-l.top)*i.yRatio[c],u=r.maxYArr[h]-r.minYArr[h],g=r.minYArr[h]+(u-d);s.config.yaxis[t].reversed&&(g=r.maxYArr[h]-(u-d)),a.tooltipPosition.moveYCrosshairs(e-l.top),a.yaxisTooltipText[t].innerHTML=o(g),a.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),Sa=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w;var a=this.w;this.tConfig=a.config.tooltip,this.tooltipUtil=new va(this),this.tooltipLabels=new ya(this),this.tooltipPosition=new wa(this),this.marker=new ka(this),this.intersect=new Aa(this),this.axesTooltip=new Ca(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!a.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return s(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new Qi(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,a=[],s=this.getElTooltip(),r=function(r){var n=document.createElement("div");n.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(r)),n.style.order=i.config.tooltip.inverseOrder?t-r:r+1;var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[r],n.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var a=document.createElement("span");a.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(a),l.appendChild(e)})),n.appendChild(l),s.appendChild(n),a.push(n)},n=0;n0&&this.addPathsEventListeners(g,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(r=r+t.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+t.globals.svgHeight-s-10),e.style.left=r+"px",e.style.top=n+"px",{x:r,y:n,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(t){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,a=function(a){var s={paths:t[a],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[a].addEventListener(e,i.onSeriesHover.bind(i,s),{capture:!1,passive:!0})}))},s=0;s=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(t,e)}),20-a))}},{key:"seriesHover",value:function(t,e){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||0===s.globals.dataPoints)||(a.length?a.forEach((function(a){var s=i.getElTooltip(a),r={paths:t.paths,tooltipEl:s,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:a.w.globals.tooltip.ttItems};a.w.globals.minX===i.w.globals.minX&&a.w.globals.maxX===i.w.globals.maxX&&a.w.globals.tooltip.seriesHoverByContext({chartCtx:a,ttCtx:a.w.globals.tooltip,opt:r,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,a=t.opt,s=t.e,r=e.w,n=this.getElTooltip(e);if(n){if(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=s,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared)if(this.tConfig.onDatasetHover.highlightDataSeries)new Zi(e).toggleSeriesOnHover(s,s.target.parentNode);i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect})}}},{key:"axisChartsTooltips",value:function(t){var e,i,a=t.e,s=t.opt,r=this.w,n=s.elGrid.getBoundingClientRect(),o="touchmove"===a.type?a.touches[0].clientX:a.clientX,l="touchmove"===a.type?a.touches[0].clientY:a.clientY;if(this.clientY=l,this.clientX=o,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,ln.top+n.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var h=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(h)<0)return void this.handleMouseOut(s)}var c=this.getElTooltip(),d=this.getElXCrosshairs(),u=[];r.config.chart.group&&(u=this.ctx.getSyncedCharts());var g=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===a.type||"touchmove"===a.type||"mouseup"===a.type){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;null!==d&&d.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),g&&!this.showOnIntersect||u.length>1)this.handleStickyTooltip(a,o,l,s);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:e,y:i,type:r.config.chart.type});e=f.x,i=f.y,c.style.left=e+"px",c.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:e,y:i});if(this.yaxisTooltips.length)for(var x=0;xl.width)this.handleMouseOut(a);else if(null!==o)this.handleStickyCapturedSeries(t,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||s.globals.isBarHorizontal){var h=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,h,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,i,a){var s=this.w;if(!this.tConfig.shared&&null===s.globals.series[e][a])return void this.handleMouseOut(i);if(void 0!==s.globals.series[e][a])this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,a,i.ttItems):this.create(t,this,e,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var r=s.globals.series.findIndex((function(t,e){return!s.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,r,a,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new Mi(this.ctx),i=t.globals.dom.Paper.find(".apexcharts-bar-area"),a=0;a5&&void 0!==arguments[5]?arguments[5]:null,A=this.w,C=e;"mouseup"===t.type&&this.markerClick(t,i,a),null===k&&(k=this.tConfig.shared);var S=this.tooltipUtil.hasMarkers(i),L=this.tooltipUtil.getElBars();if(A.config.legend.tooltipHoverFormatter){var M=A.config.legend.tooltipHoverFormatter,P=Array.from(this.legendLabels);P.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var I=0;I0?C.marker.enlargePoints(a):C.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var Y=new Mi(this.ctx),H=A.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var O=0;O0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u-=h*k)),w){u=u+d.height/2-b/2-2}var C=e.globals.series[i][a]<0,S=o;switch(this.barCtx.isReversed&&(S=o+(C?c:-c)),f.position){case"center":g=w?C?S-c/2+v:S+c/2-v:C?S-c/2+d.height/2+v:S+c/2+d.height/2-v;break;case"bottom":g=w?C?S-c+v:S+c-v:C?S-c+d.height+b+v:S+c-d.height/2+b-v;break;case"top":g=w?C?S+v:S-v:C?S-d.height/2-v:S+d.height+v}if(this.barCtx.lastActiveBarSerieIndex===s&&x.enabled){var L=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:a}),p.fontSize);r=C?S-L.height/2-v-x.offsetY+18:S+L.height+v+x.offsetY-18;var M=A;n=y+(e.globals.isXNumeric?-h*e.globals.barGroups.length/2:e.globals.barGroups.length*h/2-(e.globals.barGroups.length-1)*h-M)+x.offsetX}return e.config.chart.stacked||(g<0?g=0+b:g+d.height/3>e.globals.gridHeight&&(g=e.globals.gridHeight-b)),{bcx:l,bcy:o,dataLabelsX:u,dataLabelsY:g,totalDataLabelsX:n,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,a=t.i,s=t.j,r=t.realIndex,n=t.bcy,o=t.barHeight,l=t.barWidth,h=t.textRects,c=t.dataLabelsX,d=t.strokeWidth,u=t.dataLabelsConfig,g=t.barDataLabelsConfig,p=t.barTotalDataLabelsConfig,f=t.offX,x=t.offY,b=e.globals.gridHeight/e.globals.dataPoints;l=Math.abs(l);var m,v,y=n-(this.barCtx.isRangeBar?0:b)+o/2+h.height/2+x-3,w="start",k=e.globals.series[a][s]<0,A=i;switch(this.barCtx.isReversed&&(A=i+(k?-l:l),w=k?"start":"end"),g.position){case"center":c=k?A+l/2-f:Math.max(h.width/2,A-l/2)+f;break;case"bottom":c=k?A+l-d-f:A-l+d+f;break;case"top":c=k?A-d-f:A-d+f}if(this.barCtx.lastActiveBarSerieIndex===r&&p.enabled){var C=new Mi(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:s}),u.fontSize);k?(m=A-d-f-p.offsetX,w="end"):m=A+f+p.offsetX+(this.barCtx.isReversed?-(l+d):d),v=y-h.height/2+C.height/2+p.offsetY+d}return e.config.chart.stacked||("start"===u.textAnchor?c-h.width<0?c=k?h.width+d:d:c+h.width>e.globals.gridWidth&&(c=k?e.globals.gridWidth-d:e.globals.gridWidth-h.width-d):"middle"===u.textAnchor?c-h.width/2<0?c=h.width/2+d:c+h.width/2>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width/2-d):"end"===u.textAnchor&&(c<1?c=h.width+d:c+1>e.globals.gridWidth&&(c=e.globals.gridWidth-h.width-d))),{bcx:i,bcy:n,dataLabelsX:c,dataLabelsY:y,totalDataLabelsX:m,totalDataLabelsY:v,totalDataLabelsAnchor:w}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.i,r=t.j,n=t.textRects,o=t.barHeight,l=t.barWidth,h=t.dataLabelsConfig,c=this.w,d="rotate(0)";"vertical"===c.config.plotOptions.bar.dataLabels.orientation&&(d="rotate(-90, ".concat(e,", ").concat(i,")"));var g=new qi(this.barCtx.ctx),p=new Mi(this.barCtx.ctx),f=h.formatter,x=null,b=c.globals.collapsedSeriesIndices.indexOf(s)>-1;if(h.enabled&&!b){x=p.group({class:"apexcharts-data-labels",transform:d});var m="";void 0!==a&&(m=f(a,u(u({},c),{},{seriesIndex:s,dataPointIndex:r,w:c}))),!a&&c.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(m="");var v=c.globals.series[s][r]<0,y=c.config.plotOptions.bar.dataLabels.position;if("vertical"===c.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(h.textAnchor=v?"end":"start"),"center"===y&&(h.textAnchor="middle"),"bottom"===y&&(h.textAnchor=v?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels)lMath.abs(l)&&(m=""):n.height/1.6>Math.abs(o)&&(m=""));var w=u({},h);this.barCtx.isHorizontal&&a<0&&("start"===h.textAnchor?w.textAnchor="end":"end"===h.textAnchor&&(w.textAnchor="start")),g.plotDataLabelsText({x:e,y:i,text:m,i:s,j:r,parent:x,dataLabelsConfig:w,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}},{key:"drawTotalDataLabels",value:function(t){var e=t.x,i=t.y,a=t.val,s=t.realIndex,r=t.textAnchor,n=t.barTotalDataLabelsConfig;this.w;var o,l=new Mi(this.barCtx.ctx);return n.enabled&&void 0!==e&&void 0!==i&&this.barCtx.lastActiveBarSerieIndex===s&&(o=l.drawText({x:e,y:i,foreColor:n.style.color,text:a,textAnchor:r,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),o}}]),t}(),Ma=function(){function t(e){i(this,t),this.w=e.w,this.barCtx=e}return s(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[i].length),e.globals.isXNumeric)for(var a=0;ae.globals.minX&&e.globals.seriesX[i][a]0&&(a=l.globals.minXDiff/d),(r=a/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),n=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),t=l.globals.padHorizontal+(a-r*this.barCtx.seriesLen)/2}return l.globals.barHeight=s,l.globals.barWidth=r,{x:t,y:e,yDivision:i,xDivision:a,barHeight:s,barWidth:r,zeroH:n,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]}))}},{key:"initializeStackedXYVars",value:function(t){t.w.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]}))}},{key:"getPathFillColor",value:function(t,e,i,a){var s,r,n,o,l=this.w,h=this.barCtx.ctx.fill,c=null,d=this.barCtx.barOptions.distributed?i:e;this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(a){t[e][i]>=a.from&&t[e][i]<=a.to&&(c=a.color)}));return h.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:a,dataPointIndex:i,color:c,value:t[e][i],fillConfig:null===(s=l.config.series[e].data[i])||void 0===s?void 0:s.fill,fillType:null!==(r=l.config.series[e].data[i])&&void 0!==r&&null!==(n=r.fill)&&void 0!==n&&n.type?null===(o=l.config.series[e].data[i])||void 0===o?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[a]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,i){var a=0,s=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"createBorderRadiusArr",value:function(t){var e,i=this.w,a=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,s=t.length,n=0|(null===(e=t[0])||void 0===e?void 0:e.length),o=Array.from({length:s},(function(){return Array(n).fill(a?"top":"none")}));if(a)return o;for(var l=0;l0?(h.push(u),d++):g<0&&(c.push(u),d++)}if(h.length>0&&0===c.length)if(1===h.length)o[h[0]][l]="both";else{var p,f=h[0],x=h[h.length-1],b=r(h);try{for(b.s();!(p=b.n()).done;){var m=p.value;o[m][l]=m===f?"bottom":m===x?"top":"none"}}catch(t){b.e(t)}finally{b.f()}}else if(c.length>0&&0===h.length)if(1===c.length)o[c[0]][l]="both";else{var v,y=Math.max.apply(Math,c),w=Math.min.apply(Math,c),k=r(c);try{for(k.s();!(v=k.n()).done;){var A=v.value;o[A][l]=A===y?"bottom":A===w?"top":"none"}}catch(t){k.e(t)}finally{k.f()}}else if(h.length>0&&c.length>0){var C,S=h[h.length-1],L=r(h);try{for(L.s();!(C=L.n()).done;){var M=C.value;o[M][l]=M===S?"top":"none"}}catch(t){L.e(t)}finally{L.f()}var P,I=Math.max.apply(Math,c),T=r(c);try{for(T.s();!(P=T.n()).done;){var z=P.value;o[z][l]=z===I?"bottom":"none"}}catch(t){T.e(t)}finally{T.f()}}else if(1===d){o[h[0]||c[0]][l]="both"}}return o}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,a=t.x1,s=t.x2,r=t.y1,n=t.y2,o=t.elSeries,l=this.w,h=new Mi(this.barCtx.ctx),c=new Zi(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var d=this.barCtx.barOptions.colors.backgroundBarColors[e],u=h.drawRect(void 0!==a?a:0,void 0!==r?r:0,void 0!==s?s:l.globals.gridWidth,void 0!==n?n:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,i=t.barWidth,a=t.barXPosition,s=t.y1,r=t.y2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.columnWidthOffset&&(x=a-g.config.series[c].data[u].columnWidthOffset/2,f=i+g.config.series[c].data[u].columnWidthOffset);var b=n/2,m=x+b,v=x+f-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001-b*y,r+=.001+b*y;var w=p.move(m,s),k=p.move(m,s),A=p.line(v,s);if(g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1)),w=w+p.line(m,r)+p.line(v,r)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(m,s)+A+A+A+A+A+p.line(m,s)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).yArrj.push(r-b*y),C.yArrjF.push(Math.abs(s-r+n*y)),C.yArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"getBarpaths",value:function(t){var e,i=t.barYPosition,a=t.barHeight,s=t.x1,r=t.x2,n=t.strokeWidth,o=t.isReversed,l=t.series,h=t.seriesGroup,c=t.realIndex,d=t.i,u=t.j,g=t.w,p=new Mi(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var f=i,x=a;null!==(e=g.config.series[c].data[u])&&void 0!==e&&e.barHeightOffset&&(f=i-g.config.series[c].data[u].barHeightOffset/2,x=a+g.config.series[c].data[u].barHeightOffset);var b=n/2,m=f+b,v=f+x-b,y=(l[d][u]>=0?1:-1)*(o?-1:1);s+=.001+b*y,r+=.001-b*y;var w=p.move(s,m),k=p.move(s,m);g.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,u,!1));var A=p.line(s,v);if(w=w+p.line(r,m)+p.line(r,v)+A+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),k=k+p.line(s,m)+A+A+A+A+A+p.line(s,m)+("around"===g.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[c][u]?" Z":" z"),"none"!==this.arrBorderRadius[c][u]&&(w=p.roundPathCorners(w,g.config.plotOptions.bar.borderRadius)),g.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[h]).xArrj.push(r+b*y),C.xArrjF.push(Math.abs(s-r-n*y)),C.xArrjVal.push(this.barCtx.series[d][u])}return{pathTo:w,pathFrom:k}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,a=0;a2&&void 0!==arguments[2])||arguments[2]?e:null;return null!=t&&(i=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(t,e,i){var a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?e:null;return null!=t&&(a=e-t/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(t,e,i,a,s,r){var n=this,l=this.w,h=[],c=function(a,s){var l;h.push((o(l={},t,"x"===t?n.getXForValue(a,e,!1):n.getYForValue(a,i,r,!1)),o(l,"attrs",s),l))};if(l.globals.seriesGoals[a]&&l.globals.seriesGoals[a][s]&&Array.isArray(l.globals.seriesGoals[a][s])&&l.globals.seriesGoals[a][s].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,g={strokeHeight:"x"===t?0:l.globals.markers.size[a],strokeWidth:"x"===t?l.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[a])?d[a][0]:d[a]};c(l.globals.seriesRangeStart[a][s],g),c(l.globals.seriesRangeEnd[a][s],u(u({},g),{},{strokeColor:Array.isArray(d[a])?d[a][1]:d[a]}))}return h}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,a=t.goalX,s=t.goalY,r=t.barWidth,n=t.barHeight,o=new Mi(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var h=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach((function(t){if(t.x>=-1&&t.x<=o.w.globals.gridWidth+1){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:n/2,a=i+e+n/2;h=o.drawLine(t.x,a-2*e,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(h)}})):Array.isArray(s)&&s.forEach((function(t){if(t.y>=-1&&t.y<=o.w.globals.gridHeight+1){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:r/2,a=e+i+r/2;h=o.drawLine(a-2*i,t.y,a,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(h)}})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,i=t.currPaths,a=t.color,s=this.w,r=e.x,n=e.x1,o=e.barYPosition,l=i.x,h=i.x1,c=i.barYPosition,d=o+i.barHeight,u=new Mi(this.barCtx.ctx),g=new v,p=u.move(n,d)+u.line(r,d)+u.line(l,c)+u.line(h,c)+u.line(n,d)+("around"===s.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[realIndex][j]?" Z":" z");return u.drawPath({d:p,fill:g.shadeColor(.5,v.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(t){var e,i=t.i,a=t.j,s=this.w,r=0,n=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map((function(t,e){return e})):(null===(e=s.globals.columnSeries)||void 0===e?void 0:e.i.map((function(t){return t})))||[]).forEach((function(t){var e=s.globals.seriesPercent[t][a];e&&r++,t-1})),a=this.barCtx.columnGroupIndices,s=a.indexOf(i);return s<0&&(a.push(i),s=a.length-1),{groupIndex:i,columnGroupIndex:s}}}]),t}(),Pa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w;var s=this.w;this.barOptions=s.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=s.config.stroke.width,this.isNullValue=!1,this.isRangeBar=s.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!s.globals.isBarHorizontal&&s.globals.seriesRange.length&&s.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=a,null!==this.xyRatios&&(this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.invertedXRatio=a.invertedXRatio,this.invertedYRatio=a.invertedYRatio,this.baseLineY=a.baseLineY,this.baseLineInvertedY=a.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var r=new Zi(this.ctx);this.lastActiveBarSerieIndex=r.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var n=r.getBarSeriesIndices(),o=new Pi(this.ctx);this.stackedSeriesTotals=o.getStackedSeriesTotals(this.w.config.series.map((function(t,e){return-1===n.indexOf(e)?e:-1})).filter((function(t){return-1!==t}))),this.barHelpers=new Ma(this)}return s(t,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx),s=new Pi(this.ctx,i);t=s.getLogSeries(t),this.series=t,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var n=0,o=0;n0&&(this.visibleI=this.visibleI+1);var w=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[b],this.translationsIndex=b);var A=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var C=this.barHelpers.initialPositions();p=C.y,w=C.barHeight,h=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,l=C.xDivision,c=C.zeroH,this.isHorizontal||x.push(g+k/2);var S=a.group({class:"apexcharts-datalabels","data:realIndex":b});i.globals.delayedElements.push({el:S.node}),S.node.classList.add("apexcharts-element-hidden");var L=a.group({class:"apexcharts-bar-goals-markers"}),M=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");for(var P=0;P0){var R=this.barHelpers.drawBarShadow({color:"string"==typeof X&&-1===(null==X?void 0:X.indexOf("url"))?X:v.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:T});if(M.add(R),i.config.chart.dropShadow.enabled)new Li(this.ctx).dropShadow(R,i.config.chart.dropShadow,b)}this.pathArr.push(T);var E=this.barHelpers.drawGoalLine({barXPosition:T.barXPosition,barYPosition:T.barYPosition,goalX:T.goalX,goalY:T.goalY,barHeight:w,barWidth:k});E&&L.add(E),p=T.y,g=T.x,P>0&&x.push(g+k/2),f.push(p),this.renderSeries({realIndex:b,pathFill:X,j:P,i:n,columnGroupIndex:m,pathFrom:T.pathFrom,pathTo:T.pathTo,strokeWidth:I,elSeries:y,x:g,y:p,series:t,barHeight:Math.abs(T.barHeight?T.barHeight:w),barWidth:Math.abs(T.barWidth?T.barWidth:k),elDataLabelsWrap:S,elGoalsMarkers:L,elBarShadows:M,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[b]=x,i.globals.seriesYvalues[b]=f,r.add(y)}return r}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,a=t.lineFill,s=t.j,r=t.i,n=t.columnGroupIndex,o=t.pathFrom,l=t.pathTo,h=t.strokeWidth,c=t.elSeries,d=t.x,u=t.y,g=t.y1,p=t.y2,f=t.series,x=t.barHeight,b=t.barWidth,m=t.barXPosition,v=t.barYPosition,y=t.elDataLabelsWrap,w=t.elGoalsMarkers,k=t.elBarShadows,A=t.visibleSeries,C=t.type,S=t.classes,L=this.w,M=new Mi(this.ctx);if(!a){var P="function"==typeof L.globals.stroke.colors[e]?function(t){var e,i=L.config.stroke.colors;return Array.isArray(i)&&i.length>0&&((e=i[t])||(e=""),"function"==typeof e)?e({value:L.globals.series[t][s],dataPointIndex:s,w:L}):e}(e):L.globals.stroke.colors[e];a=this.barOptions.distributed?L.globals.stroke.colors[s]:P}L.config.series[r].data[s]&&L.config.series[r].data[s].strokeColor&&(a=L.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var I=s/L.config.chart.animations.animateGradually.delay*(L.config.chart.animations.speed/L.globals.dataPoints)/2.4,T=M.renderPaths({i:r,j:s,realIndex:e,pathFrom:o,pathTo:l,stroke:a,strokeWidth:h,strokeLineCap:L.config.stroke.lineCap,fill:i,animationDelay:I,initialSpeed:L.config.chart.animations.speed,dataChangeSpeed:L.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(C,"-area ").concat(S),chartType:C});T.attr("clip-path","url(#gridRectBarMask".concat(L.globals.cuid,")"));var z=L.config.forecastDataPoints;z.count>0&&s>=L.globals.dataPoints-z.count&&(T.node.setAttribute("stroke-dasharray",z.dashArray),T.node.setAttribute("stroke-width",z.strokeWidth),T.node.setAttribute("fill-opacity",z.fillOpacity)),void 0!==g&&void 0!==p&&(T.attr("data-range-y1",g),T.attr("data-range-y2",p)),new Li(this.ctx).setSelectionFilter(T,e,s),c.add(T);var X=new La(this).handleBarDataLabels({x:d,y:u,y1:g,y2:p,i:r,j:s,series:f,realIndex:e,columnGroupIndex:n,barHeight:x,barWidth:b,barXPosition:m,barYPosition:v,renderedPath:T,visibleSeries:A});return null!==X.dataLabels&&y.add(X.dataLabels),X.totalDataLabels&&y.add(X.totalDataLabels),c.add(y),w&&c.add(w),k&&c.add(k),c}},{key:"drawBarPaths",value:function(t){var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.yDivision,h=t.elSeries,c=this.w,d=i.i,u=i.j;if(c.globals.isXNumeric)e=(o=(c.globals.seriesX[d][u]-c.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var g=0,p=0;c.globals.seriesPercent.forEach((function(t,e){t[u]&&g++,e0&&(a=this.seriesLen*a/g),e=o+a*this.visibleI,e-=a*p}else e=o+a*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[d][u],r)-r)/2),n=this.barHelpers.getXForValue(this.series[d][u],r);var f=this.barHelpers.getBarpaths({barYPosition:e,barHeight:a,x1:r,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:d,j:u,w:c});return c.globals.isXNumeric||(o+=l),this.barHelpers.barBackground({j:u,i:d,y1:e-a*this.visibleI,y2:a*this.seriesLen,elSeries:h}),{pathTo:f.pathTo,pathFrom:f.pathFrom,x1:r,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",r,null,d,u),barYPosition:e,barHeight:a}}},{key:"drawColumnPaths",value:function(t){var e,i=t.indexes,a=t.x,s=t.y,r=t.xDivision,n=t.barWidth,o=t.zeroH,l=t.strokeWidth,h=t.elSeries,c=this.w,d=i.realIndex,u=i.translationsIndex,g=i.i,p=i.j,f=i.bc;if(c.globals.isXNumeric){var x=this.getBarXForNumericXAxis({x:a,j:p,realIndex:d,barWidth:n});a=x.x,e=x.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var b=this.barHelpers.getZeroValueEncounters({i:g,j:p}),m=b.nonZeroColumns,v=b.zeroEncounters;m>0&&(n=this.seriesLen*n/m),e=a+n*this.visibleI,e-=n*v}else e=a+n*this.visibleI;s=this.barHelpers.getYForValue(this.series[g][p],o,u);var y=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:n,y1:o,y2:s,strokeWidth:l,isReversed:this.isReversed,series:this.series,realIndex:d,i:g,j:p,w:c});return c.globals.isXNumeric||(a+=r),this.barHelpers.barBackground({bc:f,j:p,i:g,x1:e-l/2-n*this.visibleI,x2:n*this.seriesLen+l/2,elSeries:h}),{pathTo:y.pathTo,pathFrom:y.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,g,p,u),barXPosition:e,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,i=t.barWidth,a=t.realIndex,s=t.j,r=this.w,n=a;return r.globals.seriesX[a].length||(n=r.globals.maxValsInArrayIndex),v.isNumber(r.globals.seriesX[n][s])&&(e=(r.globals.seriesX[n][s]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:e+i*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var i,a=this.w,s=0;s0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==a.globals.previousPaths[s].paths[e]&&(i=a.globals.previousPaths[s].paths[e].d)}return i}}]),t}(),Ia=function(t){h(a,t);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this,a=this.w;this.graphics=new Mi(this.ctx),this.bar=new Pa(this.ctx,this.xyRatios);var s=new Pi(this.ctx,a);t=s.getLogSeries(t),this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===a.config.chart.stackType&&(t=a.globals.comboCharts?e.map((function(t){return a.globals.seriesPercent[t]})):a.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);for(var r=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),n=0,o=0,l=function(s,l){var h=void 0,c=void 0,d=void 0,g=void 0,p=a.globals.comboCharts?e[s]:s,f=i.barHelpers.getGroupIndex(p),x=f.groupIndex,b=f.columnGroupIndex;i.groupCtx=i[a.globals.seriesGroups[x]];var m=[],y=[],w=0;i.yRatio.length>1&&(i.yaxisIndex=a.globals.seriesYAxisReverseMap[p][0],w=p),i.isReversed=a.config.yaxis[i.yaxisIndex]&&a.config.yaxis[i.yaxisIndex].reversed;var k=i.graphics.group({class:"apexcharts-series",seriesName:v.escapeString(a.globals.seriesNames[p]),rel:s+1,"data:realIndex":p});i.ctx.series.addCollapsedClassToSeries(k,p);var A=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":p}),C=i.graphics.group({class:"apexcharts-bar-goals-markers"}),S=0,L=0,M=i.initialPositions(n,o,h,c,d,g,w);o=M.y,S=M.barHeight,c=M.yDivision,g=M.zeroW,n=M.x,L=M.barWidth,h=M.xDivision,d=M.zeroH,a.globals.barHeight=S,a.globals.barWidth=L,i.barHelpers.initializeStackedXYVars(i),1===i.groupCtx.prevY.length&&i.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(i.groupCtx.prevY[0]=i.groupCtx.prevY[0].map((function(){return d})),i.groupCtx.prevYF[0]=i.groupCtx.prevYF[0].map((function(){return 0})));for(var P=0;P0||"top"===i.barHelpers.arrBorderRadius[p][P]&&a.globals.series[p][P]<0)&&(E=Y),k=i.renderSeries({realIndex:p,pathFill:R,j:P,i:s,columnGroupIndex:b,pathFrom:z.pathFrom,pathTo:z.pathTo,strokeWidth:I,elSeries:k,x:n,y:o,series:t,barHeight:S,barWidth:L,elDataLabelsWrap:A,elGoalsMarkers:C,type:"bar",visibleSeries:b,classes:E})}a.globals.seriesXvalues[p]=m,a.globals.seriesYvalues[p]=y,i.groupCtx.prevY.push(i.groupCtx.yArrj),i.groupCtx.prevYF.push(i.groupCtx.yArrjF),i.groupCtx.prevYVal.push(i.groupCtx.yArrjVal),i.groupCtx.prevX.push(i.groupCtx.xArrj),i.groupCtx.prevXF.push(i.groupCtx.xArrjF),i.groupCtx.prevXVal.push(i.groupCtx.xArrjVal),r.add(k)},h=0,c=0;h1?l=(i=h.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(d).indexOf("%")?l=parseInt(d,10):l*=parseInt(d,10)/100,s=this.isReversed?this.baseLineY[n]:h.globals.gridHeight-this.baseLineY[n],t=h.globals.padHorizontal+(i-l)/2}var u=h.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:i,barHeight:o/u,barWidth:l/u,zeroH:s,zeroW:r}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,a=t.barHeight,s=t.strokeWidth,r=t.zeroW,n=t.x,o=t.y,l=t.columnGroupIndex,h=t.seriesGroup,c=t.yDivision,d=t.elSeries,u=this.w,g=o+l*a,p=i.i,f=i.j,x=i.realIndex,b=i.translationsIndex,m=0,v=0;v0){var w=r;this.groupCtx.prevXVal[y-1][f]<0?w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[y-1][f]:this.groupCtx.prevXVal[y-1][f]>=0&&(w=this.series[p][f]>=0?this.groupCtx.prevX[y-1][f]:this.groupCtx.prevX[y-1][f]-m+2*(this.isReversed?m:0)),e=w}else e=r;n=null===this.series[p][f]?e:e+this.series[p][f]/this.invertedYRatio-2*(this.isReversed?this.series[p][f]/this.invertedYRatio:0);var k=this.barHelpers.getBarpaths({barYPosition:g,barHeight:a,x1:e,x2:n,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,seriesGroup:h,i:p,j:f,w:u});return this.barHelpers.barBackground({j:f,i:p,y1:g,y2:a,elSeries:d}),o+=c,{pathTo:k.pathTo,pathFrom:k.pathFrom,goalX:this.barHelpers.getGoalValues("x",r,null,p,f,b),barXPosition:e,barYPosition:g,x:n,y:o}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.y,s=t.xDivision,r=t.barWidth,n=t.zeroH,o=t.columnGroupIndex,l=t.seriesGroup,h=t.elSeries,c=this.w,d=e.i,u=e.j,g=e.bc,p=e.realIndex,f=e.translationsIndex;if(c.globals.isXNumeric){var x=c.globals.seriesX[p][u];x||(x=0),i=(x-c.globals.minX)/this.xRatio-r/2*c.globals.barGroups.length}for(var b,m=i+o*r,v=0,y=0;y0&&!c.globals.isXNumeric||w>0&&c.globals.isXNumeric&&c.globals.seriesX[p-1][u]===c.globals.seriesX[p][u]){var k,A,C,S=Math.min(this.yRatio.length+1,p+1);if(void 0!==this.groupCtx.prevY[w-1]&&this.groupCtx.prevY[w-1].length)for(var L=1;L=0?C-v+2*(this.isReversed?v:0):C;break}if((null===(T=this.groupCtx.prevYVal[w-P])||void 0===T?void 0:T[u])>=0){A=this.series[d][u]>=0?C:C+v-2*(this.isReversed?v:0);break}}void 0===A&&(A=c.globals.gridHeight),b=null!==(k=this.groupCtx.prevYF[0])&&void 0!==k&&k.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,w).every((function(t){return t.every((function(t){return isNaN(t)}))}))?n:A}else b=n;a=this.series[d][u]?b-this.series[d][u]/this.yRatio[f]+2*(this.isReversed?this.series[d][u]/this.yRatio[f]:0):b;var z=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:r,y1:b,y2:a,yRatio:this.yRatio[f],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:d,j:u,w:c});return this.barHelpers.barBackground({bc:g,j:u,i:d,x1:m,x2:r,elSeries:h}),{pathTo:z.pathTo,pathFrom:z.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,n,d,u),barXPosition:m,x:c.globals.isXNumeric?i:i+s,y:a}}}]),a}(Pa),Ta=function(t){h(a,t);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e,i){var a=this,s=this.w,r=new Mi(this.ctx),n=s.globals.comboCharts?e:s.config.chart.type,o=new ji(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=s.config.plotOptions.bar.horizontal;var l=new Pi(this.ctx,s);t=l.getLogSeries(t),this.series=t,this.yRatio=l.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var h=r.group({class:"apexcharts-".concat(n,"-series apexcharts-plot-series")}),c=function(e){a.isBoxPlot="boxPlot"===s.config.chart.type||"boxPlot"===s.config.series[e].type;var n,l,c,d,g=void 0,p=void 0,f=[],x=[],b=s.globals.comboCharts?i[e]:e,m=a.barHelpers.getGroupIndex(b).columnGroupIndex,y=r.group({class:"apexcharts-series",seriesName:v.escapeString(s.globals.seriesNames[b]),rel:e+1,"data:realIndex":b});a.ctx.series.addCollapsedClassToSeries(y,b),t[e].length>0&&(a.visibleI=a.visibleI+1);var w,k,A=0;a.yRatio.length>1&&(a.yaxisIndex=s.globals.seriesYAxisReverseMap[b][0],A=b);var C=a.barHelpers.initialPositions();p=C.y,w=C.barHeight,l=C.yDivision,d=C.zeroW,g=C.x,k=C.barWidth,n=C.xDivision,c=C.zeroH,x.push(g+k/2);for(var S=r.group({class:"apexcharts-datalabels","data:realIndex":b}),L=r.group({class:"apexcharts-bar-goals-markers"}),M=function(i){var r=a.barHelpers.getStrokeWidth(e,i,b),h=null,v={indexes:{i:e,j:i,realIndex:b,translationsIndex:A},x:g,y:p,strokeWidth:r,elSeries:y};h=a.isHorizontal?a.drawHorizontalBoxPaths(u(u({},v),{},{yDivision:l,barHeight:w,zeroW:d})):a.drawVerticalBoxPaths(u(u({},v),{},{xDivision:n,barWidth:k,zeroH:c})),p=h.y,g=h.x;var C=a.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:h.barYPosition,goalX:h.goalX,goalY:h.goalY,barHeight:w,barWidth:k});C&&L.add(C),i>0&&x.push(g+k/2),f.push(p),h.pathTo.forEach((function(n,l){var c=!a.isBoxPlot&&a.candlestickOptions.wick.useFillColor?h.color[l]:s.globals.stroke.colors[e],d=o.fillPath({seriesNumber:b,dataPointIndex:i,color:h.color[l],value:t[e][i]});a.renderSeries({realIndex:b,pathFill:d,lineFill:c,j:i,i:e,pathFrom:h.pathFrom,pathTo:n,strokeWidth:r,elSeries:y,x:g,y:p,series:t,columnGroupIndex:m,barHeight:w,barWidth:k,elDataLabelsWrap:S,elGoalsMarkers:L,visibleSeries:a.visibleI,type:s.config.chart.type})}))},P=0;Pb.c&&(d=!1);var y=Math.min(b.o,b.c),w=Math.max(b.o,b.c),k=b.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[x][c]-o.globals.minX)/this.xRatio-s/2);var A=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(y=r,w=r):(y=r-y/f,w=r-w/f,m=r-b.h/f,v=r-b.l/f,k=r-b.m/f);var C=l.move(A,r),S=l.move(A+s/2,y);return o.globals.previousPaths.length>0&&(S=this.getPreviousPath(x,c,!0)),C=this.isBoxPlot?[l.move(A,y)+l.line(A+s/2,y)+l.line(A+s/2,m)+l.line(A+s/4,m)+l.line(A+s-s/4,m)+l.line(A+s/2,m)+l.line(A+s/2,y)+l.line(A+s,y)+l.line(A+s,k)+l.line(A,k)+l.line(A,y+n/2),l.move(A,k)+l.line(A+s,k)+l.line(A+s,w)+l.line(A+s/2,w)+l.line(A+s/2,v)+l.line(A+s-s/4,v)+l.line(A+s/4,v)+l.line(A+s/2,v)+l.line(A+s/2,w)+l.line(A,w)+l.line(A,k)+"z"]:[l.move(A,w)+l.line(A+s/2,w)+l.line(A+s/2,m)+l.line(A+s/2,w)+l.line(A+s,w)+l.line(A+s,y)+l.line(A+s/2,y)+l.line(A+s/2,v)+l.line(A+s/2,y)+l.line(A,y)+l.line(A,w-n/2)],S+=l.move(A,y),o.globals.isXNumeric||(i+=a),{pathTo:C,pathFrom:S,x:i,y:w,goalY:this.barHelpers.getGoalValues("y",null,r,h,c,e.translationsIndex),barXPosition:A,color:this.isBoxPlot?p:d?[u]:[g]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var i=t.y,a=t.yDivision,s=t.barHeight,r=t.zeroW,n=t.strokeWidth,o=this.w,l=new Mi(this.ctx),h=e.i,c=e.j,d=this.boxOptions.colors.lower;this.isBoxPlot&&(d=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,g=e.realIndex,p=this.getOHLCValue(g,c),f=r,x=r,b=Math.min(p.o,p.c),m=Math.max(p.o,p.c),v=p.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[g][c]-o.globals.minX)/this.invertedXRatio-s/2);var y=i+s*this.visibleI;void 0===this.series[h][c]||null===this.series[h][c]?(b=r,m=r):(b=r+b/u,m=r+m/u,f=r+p.h/u,x=r+p.l/u,v=r+p.m/u);var w=l.move(r,y),k=l.move(b,y+s/2);return o.globals.previousPaths.length>0&&(k=this.getPreviousPath(g,c,!0)),w=[l.move(b,y)+l.line(b,y+s/2)+l.line(f,y+s/2)+l.line(f,y+s/2-s/4)+l.line(f,y+s/2+s/4)+l.line(f,y+s/2)+l.line(b,y+s/2)+l.line(b,y+s)+l.line(v,y+s)+l.line(v,y)+l.line(b+n/2,y),l.move(v,y)+l.line(v,y+s)+l.line(m,y+s)+l.line(m,y+s/2)+l.line(x,y+s/2)+l.line(x,y+s-s/4)+l.line(x,y+s/4)+l.line(x,y+s/2)+l.line(m,y+s/2)+l.line(m,y)+l.line(v,y)+"z"],k+=l.move(b,y),o.globals.isXNumeric||(i+=a),{pathTo:w,pathFrom:k,x:m,y:i,goalX:this.barHelpers.getGoalValues("x",r,null,h,c),barYPosition:y,color:d}}},{key:"getOHLCValue",value:function(t,e){var i=this.w;return{o:this.isBoxPlot?i.globals.seriesCandleH[t][e]:i.globals.seriesCandleO[t][e],h:this.isBoxPlot?i.globals.seriesCandleO[t][e]:i.globals.seriesCandleH[t][e],m:i.globals.seriesCandleM[t][e],l:this.isBoxPlot?i.globals.seriesCandleC[t][e]:i.globals.seriesCandleL[t][e],c:this.isBoxPlot?i.globals.seriesCandleL[t][e]:i.globals.seriesCandleC[t][e]}}}]),a}(Pa),za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,a){var s=this.w,r=1,n=s.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,i);s.globals.hasNegs||a?r=s.config.plotOptions[t].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):(1-o.percent/100)*(1.25*n):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(r=1-o.percent/100,"treemap"===t&&(r=(1-o.percent/100)*(1.25*n)));var l=o.color,h=new v;if(s.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){var c=h.shadeColor(-1*r,o.color);l=v.hexToRgba(v.isColorHex(c)?c:v.rgb2hex(c),s.config.fill.opacity)}else{var d=h.shadeColor(r,o.color);l=v.hexToRgba(v.isColorHex(d)?d:v.rgb2hex(d),s.config.fill.opacity)}return{color:l,colorProps:o}}},{key:"determineColor",value:function(t,e,i){var a=this.w,s=a.globals.series[e][i],r=a.config.plotOptions[t],n=r.colorScale.inverse?i:e;r.distributed&&"treemap"===a.config.chart.type&&(n=i);var o=a.globals.colors[n],l=null,h=Math.min.apply(Math,f(a.globals.series[e])),c=Math.max.apply(Math,f(a.globals.series[e]));r.distributed||"heatmap"!==t||(h=a.globals.minY,c=a.globals.maxY),void 0!==r.colorScale.min&&(h=r.colorScale.mina.globals.maxY?r.colorScale.max:a.globals.maxY);var d=Math.abs(c)+Math.abs(h),u=100*s/(0===d?d-1e-6:d);r.colorScale.ranges.length>0&&r.colorScale.ranges.map((function(t,e){if(s>=t.from&&s<=t.to){o=t.color,l=t.foreColor?t.foreColor:null,h=t.from,c=t.to;var i=Math.abs(c)+Math.abs(h);u=100*s/(0===i?i-1e-6:i)}}));return{color:o,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,a=t.y,s=t.i,r=t.j,n=t.colorProps,o=t.fontSize,l=this.w.config.dataLabels,h=new Mi(this.ctx),c=new qi(this.ctx),d=null;if(l.enabled){d=h.group({class:"apexcharts-data-labels"});var u=l.offsetX,g=l.offsetY,p=i+u,f=a+parseFloat(l.style.fontSize)/3+g;c.plotDataLabelsText({x:p,y:f,text:e,i:s,j:r,color:n.foreColor,parent:d,fontSize:o,dataLabelsConfig:l})}return d}},{key:"addListeners",value:function(t){var e=new Mi(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),Xa=function(){function t(e,a){i(this,t),this.ctx=e,this.w=e.w,this.xRatio=a.xRatio,this.yRatio=a.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new za(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return s(t,[{key:"draw",value:function(t){var e=this.w,i=new Mi(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var s=e.globals.gridWidth/e.globals.dataPoints,r=e.globals.gridHeight/e.globals.series.length,n=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var h=o?0:l.length-1;o?h=0;o?h++:h--){var c=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:v.escapeString(e.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});if(this.ctx.series.addCollapsedClassToSeries(c,h),e.config.chart.dropShadow.enabled){var d=e.config.chart.dropShadow;new Li(this.ctx).dropShadow(c,d,h)}for(var u=0,g=e.config.plotOptions.heatmap.shadeIntensity,p=0;p-1&&this.pieClicked(d),i.config.dataLabels.enabled){var w=m.x,k=m.y,A=100*g/this.fullAngle+"%";if(0!==g&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(h=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(h)>this.fullAngle&&(h-=this.fullAngle);var c=Math.PI*(h-90)/180,d=i.centerX+r*Math.cos(l),u=i.centerY+r*Math.sin(l),g=i.centerX+r*Math.cos(c),p=i.centerY+r*Math.sin(c),f=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,h),x=v.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),b=s>180?1:0,m=["M",d,u,"A",r,r,0,b,1,g,p];return e="donut"===i.chartType?[].concat(m,["L",f.x,f.y,"A",i.donutSize,i.donutSize,0,b,0,x.x,x.y,"L",d,u,"z"]).join(" "):"pie"===i.chartType||"polarArea"===i.chartType?[].concat(m,["L",i.centerX,i.centerY,"L",d,u]).join(" "):[].concat(m).join(" "),n.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new ta(this.ctx),a=new Mi(this.ctx),s=new Ra(this.ctx),r=a.group(),n=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),h=o.result.length;this.maxY=o.niceMax;for(var c=e.globals.radialSize,d=c/(h-1),u=0;u1&&t.total.show&&(s=t.total.color);var n=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,r),a||"function"!=typeof t.total.formatter||(i=t.total.formatter(r));var l=e===t.total.label;e=this.donutDataLabels.total.label?t.name.formatter(e,l,r):"",null!==n&&(n.textContent=e),null!==o&&(o.textContent=i),null!==n&&(n.style.fill=s)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,a=t.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,s,a,t);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,a=new Mi(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(0!==s.strokeWidth){for(var r=[],n=360/i.globals.series.length,o=0;o0&&(f=e.getPreviousPath(n));for(var x=0;x=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?s-=10:t.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,a=0;a0&&parseInt(s.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[a].paths[0]&&(i=e.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var a=[],s=0;s=360&&(u=360-Math.abs(this.startAngle)-.1);var g=i.drawPath({d:"",stroke:c,strokeWidth:n*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){var p=h.dropShadow;s.dropShadow(g,p)}l.add(g),g.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(g,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:d,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return a}},{key:"drawArcs",value:function(t){var e=this.w,i=new Mi(this.ctx),a=new ji(this.ctx),s=new Li(this.ctx),r=i.group(),n=this.getStrokeWidth(t);t.size=t.size-n/2;var o=e.config.plotOptions.radialBar.hollow.background,l=t.size-n*t.series.length-this.margin*t.series.length-n*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(t,r,l,o));var c=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:o||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var d=e.config.plotOptions.radialBar.hollow.dropShadow;s.dropShadow(c,d)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var g=null;if(this.radialDataLabels.show){var p=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group");g=this.renderInnerDataLabels(p,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})}"back"===e.config.plotOptions.radialBar.hollow.position&&(r.add(c),g&&r.add(g));var f=!1;e.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var x=f?t.series.length-1:0;f?x>=0:x100?100:t.series[x])/100,A=Math.round(this.totalAngle*k)+this.startAngle,C=void 0;e.globals.dataChanged&&(w=this.startAngle,C=Math.round(this.totalAngle*v.negToZero(e.globals.previousPaths[x])/100)+w),Math.abs(A)+Math.abs(y)>360&&(A-=.01),Math.abs(C)+Math.abs(w)>360&&(C-=.01);var S=A-y,L=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[x]:e.config.stroke.dashArray,M=i.drawPath({d:"",stroke:m,strokeWidth:n,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+x,strokeDashArray:L});if(Mi.setAttrs(M.node,{"data:angle":S,"data:value":t.series[x]}),e.config.chart.dropShadow.enabled){var P=e.config.chart.dropShadow;s.dropShadow(M,P,x)}if(s.setSelectionFilter(M,0,x),this.addListeners(M,this.radialDataLabels),b.add(M),M.attr({index:0,j:x}),this.barLabels.enabled){var I=v.polarToCartesian(t.centerX,t.centerY,t.size,y),T=this.barLabels.formatter(e.globals.seriesNames[x],{seriesIndex:x,w:e}),z=["apexcharts-radialbar-label"];this.barLabels.onClick||z.push("apexcharts-no-click");var X=this.barLabels.useSeriesColors?e.globals.colors[x]:e.config.chart.foreColor;X||(X=e.config.chart.foreColor);var R=I.x+this.barLabels.offsetX,E=I.y+this.barLabels.offsetY,Y=i.drawText({x:R,y:E,text:T,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:X,cssClass:z.join(" ")});Y.on("click",this.onBarLabelClick),Y.attr({rel:x+1}),0!==y&&Y.attr({"transform-origin":"".concat(R," ").concat(E),transform:"rotate(".concat(y," 0 0)")}),b.add(Y)}var H=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(H=e.config.chart.animations.speed),e.globals.dataChanged&&(H=e.config.chart.animations.dynamicAnimation.speed),this.animDur=H/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(M,{centerX:t.centerX,centerY:t.centerY,endAngle:A,startAngle:y,prevEndAngle:C,prevStartAngle:w,size:t.size,i:x,totalItems:2,animBeginArr:this.animBeginArr,dur:H,shouldSetPrevPaths:!0})}return{g:r,elHollow:c,dataLabels:g}}},{key:"drawHollow",value:function(t){var e=new Mi(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,a){var s=this.w,r=new ji(this.ctx),n=v.randomId(),o=s.config.plotOptions.radialBar.hollow.image;if(s.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:o,patternID:"pattern".concat(s.globals.cuid).concat(n)}),a="url(#pattern".concat(s.globals.cuid).concat(n,")");else{var l=s.config.plotOptions.radialBar.hollow.imageWidth,h=s.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===h){var c=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-e.width/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+s.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(c)}else{var d=s.globals.dom.Paper.image(o,(function(e){this.move(t.centerX-l/2+s.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-h/2+s.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,h)}));e.add(d)}}return a}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,i=this.barLabels.onClick,a=this.w;i&&i(a.globals.seriesNames[e],{w:a,seriesIndex:e})}}]),r}(Ea),Oa=function(t){h(a,t);var e=n(a);function a(){return i(this,a),e.apply(this,arguments)}return s(a,[{key:"draw",value:function(t,e){var i=this.w,a=new Mi(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var s=a.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),r=0;r0&&(this.visibleI=this.visibleI+1);var x=0,b=0,m=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[g][0],m=g);var y=this.barHelpers.initialPositions();d=y.y,h=y.zeroW,c=y.x,b=y.barWidth,x=y.barHeight,n=y.xDivision,o=y.yDivision,l=y.zeroH;for(var w=a.group({class:"apexcharts-datalabels","data:realIndex":g}),k=a.group({class:"apexcharts-rangebar-goals-markers"}),A=0;A0}));return this.isHorizontal?(a=u.config.plotOptions.bar.rangeBarGroupRows?r+h*b:r+o*this.visibleI+h*b,m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(a=(o=d.barHeight/g.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+g.indexOf(p))+h*b)):(b>-1&&!u.globals.timescaleLabels.length&&(s=u.config.plotOptions.bar.rangeBarGroupRows?n+c*b:n+l*this.visibleI+c*b),m>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(g=u.globals.seriesRange[e][m].overlaps).indexOf(p)>-1&&(s=(l=d.barWidth/g.length)*this.visibleI+c*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+g.indexOf(p))+c*b)),{barYPosition:a,barXPosition:s,barHeight:o,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x,a=t.xDivision,s=t.barWidth,r=t.barXPosition,n=t.zeroH,o=this.w,l=e.i,h=e.j,c=e.realIndex,d=e.translationsIndex,u=this.yRatio[d],g=this.getRangeValue(c,h),p=Math.min(g.start,g.end),f=Math.max(g.start,g.end);void 0===this.series[l][h]||null===this.series[l][h]?p=n:(p=n-p/u,f=n-f/u);var x=Math.abs(f-p),b=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:s,y1:p,y2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:c,i:c,j:h,w:o});if(o.globals.isXNumeric){var m=this.getBarXForNumericXAxis({x:i,j:h,realIndex:c,barWidth:s});i=m.x,r=m.barXPosition}else i+=a;return{pathTo:b.pathTo,pathFrom:b.pathFrom,barHeight:x,x:i,y:g.start<0&&g.end<0?p:f,goalY:this.barHelpers.getGoalValues("y",null,n,l,h,d),barXPosition:r}}},{key:"preventBarOverflow",value:function(t){var e=this.w;return t<0&&(t=0),t>e.globals.gridWidth&&(t=e.globals.gridWidth),t}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,a=t.y1,s=t.y2,r=t.yDivision,n=t.barHeight,o=t.barYPosition,l=t.zeroW,h=this.w,c=e.realIndex,d=e.j,u=this.preventBarOverflow(l+a/this.invertedYRatio),g=this.preventBarOverflow(l+s/this.invertedYRatio),p=this.getRangeValue(c,d),f=Math.abs(g-u),x=this.barHelpers.getBarpaths({barYPosition:o,barHeight:n,x1:u,x2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:c,realIndex:c,j:d,w:h});return h.globals.isXNumeric||(i+=r),{pathTo:x.pathTo,pathFrom:x.pathFrom,barWidth:f,x:p.start<0&&p.end<0?u:g,goalX:this.barHelpers.getGoalValues("x",l,null,c,d),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}}]),a}(Pa),Fa=function(){function t(e){i(this,t),this.w=e.w,this.lineCtx=e}return s(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new Pi(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,a=t.x,s=t.y,r=t.i,n=t.j,o=t.prevY,l=this.w,h=[],c=[];if(0===n){var d=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(d=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),h.push(d),c.push(v.isNumber(e[r][0])?o+l.config.markers.offsetY:null),h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null)}else h.push(a+l.config.markers.offsetX),c.push(v.isNumber(e[r][n+1])?s+l.config.markers.offsetY:null);return{x:h,y:c}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,a=t.realIndex,s=this.w,r=0;r0&&parseInt(n.realIndex,10)===parseInt(a,10)&&("line"===n.type?(this.lineCtx.appendPathFrom=!1,e=s.globals.previousPaths[r].paths[0].d):"area"===n.type&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[r].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[r].paths[1]&&(e=s.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e,i,a,s=t.i,r=t.realIndex,n=t.series,o=t.prevY,l=t.lineYPosition,h=t.translationsIndex,c=this.w,d=c.config.chart.stacked&&!c.globals.comboCharts||c.config.chart.stacked&&c.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[r])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[r])||void 0===i?void 0:i.type));if(void 0!==(null===(a=n[s])||void 0===a?void 0:a[0]))o=(l=d&&s>0?this.lineCtx.prevSeriesY[s-1][0]:this.lineCtx.zeroY)-n[s][0]/this.lineCtx.yRatio[h]+2*(this.lineCtx.isReversed?n[s][0]/this.lineCtx.yRatio[h]:0);else if(d&&s>0&&void 0===n[s][0])for(var u=s-1;u>=0;u--)if(null!==n[u][0]&&void 0!==n[u][0]){o=l=this.lineCtx.prevSeriesY[u][0];break}return{prevY:o,lineYPosition:l}}}]),t}(),Da=function(t){for(var e,i,a,s,r=function(t){for(var e=[],i=t[0],a=t[1],s=e[0]=Wa(i,a),r=1,n=t.length-1;r9&&(s=3*a/Math.sqrt(s),r[l]=s*e,r[l+1]=s*i);for(var h=0;h<=n;h++)s=(t[Math.min(n,h+1)][0]-t[Math.max(0,h-1)][0])/(6*(1+r[h]*r[h])),o.push([s||0,r[h]*s||0]);return o},_a=function(t){var e=Da(t),i=t[1],a=t[0],s=[],r=e[1],n=e[0];s.push(a,[a[0]+n[0],a[1]+n[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(var o=2,l=e.length;o1&&a[1].length<6){var s=a[0].length;a[1]=[2*a[0][s-2]-a[0][s-4],2*a[0][s-1]-a[0][s-3]].concat(a[1])}a[0]=a[0].slice(-2)}return a};function Wa(t,e){return(e[1]-t[1])/(e[0]-t[0])}var Ba=function(){function t(e,a,s){i(this,t),this.ctx=e,this.w=e.w,this.xyRatios=a,this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||s,this.scatter=new Ui(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Fa(this),this.markers=new Vi(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return s(t,[{key:"draw",value:function(t,e,i,a){var s,r=this.w,n=new Mi(this.ctx),o=r.globals.comboCharts?e:r.config.chart.type,l=n.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),h=new Pi(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=h.getLogSeries(t),this.yRatio=h.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var c=[],d=0;d1?g:0;this._initSerieVariables(t,d,g);var f=[],x=[],b=[],m=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,g),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(m=(r.globals.seriesX[g][0]-r.globals.minX)/this.xRatio),b.push(m);var v,y=m,w=void 0,k=y,A=this.zeroY,C=this.zeroY;A=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:t,prevY:A,lineYPosition:0,translationsIndex:p}).prevY,"monotoneCubic"===r.config.stroke.curve&&null===t[d][0]?f.push(null):f.push(A),v=A;"rangeArea"===o&&(w=C=this.lineHelpers.determineFirstPrevY({i:d,realIndex:g,series:a,prevY:C,lineYPosition:0,translationsIndex:p}).prevY,x.push(null!==f[0]?C:null));var S=this._calculatePathsFrom({type:o,series:t,i:d,realIndex:g,translationsIndex:p,prevX:k,prevY:A,prevY2:C}),L=[f[0]],M=[x[0]],P={type:o,series:t,realIndex:g,translationsIndex:p,i:d,x:m,y:1,pX:y,pY:v,pathsFrom:S,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:b,yArrj:f,y2Arrj:x,seriesRangeEnd:a},I=this._iterateOverDataPoints(u(u({},P),{},{iterations:"rangeArea"===o?t[d].length-1:void 0,isRangeStart:!0}));if("rangeArea"===o){for(var T=this._calculatePathsFrom({series:a,i:d,realIndex:g,prevX:k,prevY:C}),z=this._iterateOverDataPoints(u(u({},P),{},{series:a,xArrj:[m],yArrj:L,y2Arrj:M,pY:w,areaPaths:I.areaPaths,pathsFrom:T,iterations:a[d].length-1,isRangeStart:!1})),X=I.linePaths.length/2,R=0;R=0;E--)l.add(c[E]);else for(var Y=0;Y1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[r]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||"end"===a.config.plotOptions.area.fillTo)&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",zIndex:void 0!==a.config.series[i].zIndex?a.config.series[i].zIndex:i,seriesName:v.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i});var n=t[e].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,a,s,r=t.type,n=t.series,o=t.i,l=t.realIndex,h=t.translationsIndex,c=t.prevX,d=t.prevY,u=t.prevY2,g=this.w,p=new Mi(this.ctx);if(null===n[o][0]){for(var f=0;f0){var x=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:l});a=x.pathFromLine,s=x.pathFromArea}return{prevX:c,prevY:d,linePath:e,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(t){var e=t.type,i=t.realIndex,a=t.i,s=t.paths,r=this.w,n=new Mi(this.ctx),o=new ji(this.ctx);this.prevSeriesY.push(s.yArrj),r.globals.seriesXvalues[i]=s.xArrj,r.globals.seriesYvalues[i]=s.yArrj;var l=r.config.forecastDataPoints;if(l.count>0&&"rangeArea"!==e){var h=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-l.count-1],c=n.drawRect(h,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(c.node);var d=n.drawRect(0,0,h,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(d.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var g={i:a,realIndex:i,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var p=o.fillPath({seriesNumber:i}),f=0;f0&&"rangeArea"!==e){var A=n.renderPaths(w);A.node.setAttribute("stroke-dasharray",l.dashArray),l.strokeWidth&&A.node.setAttribute("stroke-width",l.strokeWidth),this.elSeries.add(A),A.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),k.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,i,a=this,s=t.type,r=t.series,n=t.iterations,o=t.realIndex,l=t.translationsIndex,h=t.i,c=t.x,d=t.y,u=t.pX,g=t.pY,p=t.pathsFrom,f=t.linePaths,x=t.areaPaths,b=t.seriesIndex,m=t.lineYPosition,y=t.xArrj,w=t.yArrj,k=t.y2Arrj,A=t.isRangeStart,C=t.seriesRangeEnd,S=this.w,L=new Mi(this.ctx),M=this.yRatio,P=p.prevY,I=p.linePath,T=p.areaPath,z=p.pathFromLine,X=p.pathFromArea,R=v.isNumber(S.globals.minYArr[o])?S.globals.minYArr[o]:S.globals.minY;n||(n=S.globals.dataPoints>1?S.globals.dataPoints-1:S.globals.dataPoints);var E=function(t,e){return e-t/M[l]+2*(a.isReversed?t/M[l]:0)},Y=d,H=S.config.chart.stacked&&!S.globals.comboCharts||S.config.chart.stacked&&S.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[o])||void 0===e?void 0:e.type)||"column"===(null===(i=this.w.config.series[o])||void 0===i?void 0:i.type)),O=S.config.stroke.curve;Array.isArray(O)&&(O=Array.isArray(b)?O[b[h]]:O[h]);for(var F,D=0,_=0;_0&&S.globals.collapsedSeries.length0;e--){if(!(S.globals.collapsedSeriesIndices.indexOf((null==b?void 0:b[e])||e)>-1))return e;e--}return 0}(h-1)][_+1]}else m=this.zeroY;else m=this.zeroY;N?d=E(R,m):(d=E(r[h][_+1],m),"rangeArea"===s&&(Y=E(C[h][_+1],m))),y.push(c),!N||"smooth"!==S.config.stroke.curve&&"monotoneCubic"!==S.config.stroke.curve?(w.push(d),k.push(Y)):(w.push(null),k.push(null));var B=this.lineHelpers.calculatePoints({series:r,x:c,y:d,realIndex:o,i:h,j:_,prevY:P}),G=this._createPaths({type:s,series:r,i:h,realIndex:o,j:_,x:c,y:d,y2:Y,xArrj:y,yArrj:w,y2Arrj:k,pX:u,pY:g,pathState:D,segmentStartX:F,linePath:I,areaPath:T,linePaths:f,areaPaths:x,curve:O,isRangeStart:A});x=G.areaPaths,f=G.linePaths,u=G.pX,g=G.pY,D=G.pathState,F=G.segmentStartX,T=G.areaPath,I=G.linePath,!this.appendPathFrom||S.globals.hasNullValues||"monotoneCubic"===O&&"rangeArea"===s||(z+=L.line(c,this.areaBottomY),X+=L.line(c,this.areaBottomY)),this.handleNullDataPoints(r,B,h,_,o),this._handleMarkersAndLabels({type:s,pointsPos:B,i:h,j:_,realIndex:o,isRangeStart:A})}return{yArrj:w,xArrj:y,pathFromArea:X,areaPaths:x,pathFromLine:z,linePaths:f,linePath:I,areaPath:T}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,i=t.pointsPos,a=t.isRangeStart,s=t.i,r=t.j,n=t.realIndex,o=this.w,l=new qi(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var h=this.markers.plotChartMarkers(i,n,r+1);null!==h&&this.elPointsMain.add(h)}var c=l.drawDataLabel({type:e,isRangeStart:a,pos:i,i:n,j:r+1});null!==c&&this.elDataLabelsWrap.add(c)}},{key:"_createPaths",value:function(t){var e=t.type,i=t.series,a=t.i;t.realIndex;var s,r=t.j,n=t.x,o=t.y,l=t.xArrj,h=t.yArrj,c=t.y2,d=t.y2Arrj,u=t.pX,g=t.pY,p=t.pathState,f=t.segmentStartX,x=t.linePath,b=t.areaPath,m=t.linePaths,v=t.areaPaths,y=t.curve,w=t.isRangeStart,k=new Mi(this.ctx),A=this.areaBottomY,C="rangeArea"===e,S="rangeArea"===e&&w;switch(y){case"monotoneCubic":var L=w?h:d;switch(p){case 0:if(null===L[r+1])break;p=1;case 1:if(!(C?l.length===i[a].length:r===i[a].length-2))break;case 2:var M=w?l:l.slice().reverse(),P=w?L:L.slice().reverse(),I=(s=P,M.map((function(t,e){return[t,s[e]]})).filter((function(t){return null!==t[1]}))),T=I.length>1?_a(I):I,z=[];C&&(S?v=I:z=v.reverse());var X=0,R=0;if(function(t,e){for(var i=function(t){var e=[],i=0;return t.forEach((function(t){null!==t?i++:i>0&&(e.push(i),i=0)})),i>0&&e.push(i),e}(t),a=[],s=0,r=0;s4?(e+="C".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]),e+=", ".concat(a[4],", ").concat(a[5])):s>2&&(e+="S".concat(a[0],", ").concat(a[1]),e+=", ".concat(a[2],", ").concat(a[3]))}return e}(t),i=R,a=(R+=t.length)-1;S?x=k.move(I[i][0],I[i][1])+e:C?x=k.move(z[i][0],z[i][1])+k.line(I[i][0],I[i][1])+e+k.line(z[a][0],z[a][1]):(x=k.move(I[i][0],I[i][1])+e,b=x+k.line(I[a][0],A)+k.line(I[i][0],A)+"z",v.push(b)),m.push(x)})),C&&X>1&&!S){var E=m.slice(X).reverse();m.splice(X),E.forEach((function(t){return m.push(t)}))}p=0}break;case"smooth":var Y=.35*(n-u);if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.curve(n,o,n,o,n,c)+k.move(n,c)),b+=k.curve(n,o,n,o,n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o;break;default:var F=function(t,e,i){var a=[];switch(t){case"stepline":a=k.line(e,null,"H")+k.line(null,i,"V");break;case"linestep":a=k.line(null,i,"V")+k.line(e,null,"H");break;case"straight":a=k.line(e,i)}return a};if(null===i[a][r])p=0;else switch(p){case 0:if(f=u,x=S?k.move(u,d[r])+k.line(u,g):k.move(u,g),b=k.move(u,g),null===i[a][r+1]||void 0===i[a][r+1]){m.push(x),v.push(b);break}if(p=1,r=i[a].length-2&&(S&&(x+=k.line(n,c)),b+=k.line(n,A)+k.line(f,A)+"z",m.push(x),v.push(b),p=-1)}}u=n,g=o}return{linePaths:m,areaPaths:v,pX:u,pY:g,pathState:p,segmentStartX:f,linePath:x,areaPath:b}}},{key:"handleNullDataPoints",value:function(t,e,i,a,s){var r=this.w;if(null===t[i][a]&&r.config.markers.showNullDataPoints||1===t[i].length){var n=this.strokeWidth-r.config.markers.strokeWidth/2;n>0||(n=0);var o=this.markers.plotChartMarkers(e,s,a+1,n,!0);null!==o&&this.elPointsMain.add(o)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,a,s){this.xoffset=e,this.yoffset=i,this.height=s,this.width=a,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],a=this.xoffset,s=this.yoffset,n=r(t)/this.height,o=r(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var a=e/this.height,s=this.width-a;i=new t(this.xoffset+a,this.yoffset,s,this.height)}else{var r=e/this.width,n=this.height-r;i=new t(this.xoffset,this.yoffset+r,this.width,n)}return i}}function e(e,a,s,n,o){n=void 0===n?0:n,o=void 0===o?0:o;var l=i(function(t,e){var i,a=[],s=e/r(t);for(i=0;i=n}(e,l=t[0],o)?(e.push(l),i(t.slice(1),e,s,n)):(h=s.cutArea(r(e),n),n.push(s.getCoordinates(e)),i(t,[],h,n)),n;n.push(s.getCoordinates(e))}function a(t,e){var i=Math.min.apply(Math,t),a=Math.max.apply(Math,t),s=r(t);return Math.max(Math.pow(e,2)*a/Math.pow(s,2),Math.pow(s,2)/(Math.pow(e,2)*i))}function s(t){return t&&t.constructor===Array}function r(t){var e,i=0;for(e=0;er-a&&l.width<=n-s){var h=o.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(h.x," ").concat(h.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,i,a,s,r){var n=new Mi(this.ctx),o=n.getTextRects(t,e).width+this.w.config.stroke.width+5>s-i&&r-a>s-i?r-a:s-i,l=n.getTextBasedOnMaxWidth({text:t,maxWidth:o,fontSize:e});return t.length!==l.length&&o/e<5?"":l}},{key:"animateTreemap",value:function(t,e,i,a){var s=new y(this.ctx);s.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,(function(){s.animationCompleted(t)}))}}]),t}(),ja=86400,Va=10/ja,Ua=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return s(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new zi(this.ctx),r=(e-t)/864e5;this.determineInterval(r),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,r5e4&&(a.globals.disableZoomOut=!0);var n=s.getTimeUnitsfromTimestamp(t,e,this.utc),o=a.globals.gridWidth/r,l=o/24,h=l/60,c=h/60,d=Math.floor(24*r),g=Math.floor(1440*r),p=Math.floor(r*ja),f=Math.floor(r),x=Math.floor(r/30),b=Math.floor(r/365),m={minMillisecond:n.minMillisecond,minSecond:n.minSecond,minMinute:n.minMinute,minHour:n.minHour,minDate:n.minDate,minMonth:n.minMonth,minYear:n.minYear},v={firstVal:m,currentMillisecond:m.minMillisecond,currentSecond:m.minSecond,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:o,hoursWidthOnXAxis:l,minutesWidthOnXAxis:h,secondsWidthOnXAxis:c,numberOfSeconds:p,numberOfMinutes:g,numberOfHours:d,numberOfDays:f,numberOfMonths:x,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(v);break;case"months":case"half_year":this.generateMonthScale(v);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(v);break;case"hours":this.generateHourScale(v);break;case"minutes_fives":case"minutes":this.generateMinuteScale(v);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(v)}var y=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?u(u({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?u(u({},e),{},{value:t.value}):"minute"===t.unit?u(u({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?u(u({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return y.filter((function(t){var e=1,s=Math.ceil(a.globals.gridWidth/120),r=t.value;void 0!==a.config.xaxis.tickAmount&&(s=a.config.xaxis.tickAmount),y.length>s&&(e=Math.floor(y.length/s));var n=!1,o=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(n=!0);break;case"half_year":e=7,"year"===t.unit&&(n=!0);break;case"months":e=1,"year"===t.unit&&(n=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(n=!0),30===r&&(o=!0);break;case"months_days":e=10,"month"===t.unit&&(n=!0),30===r&&(o=!0);break;case"week_days":e=8,"month"===t.unit&&(n=!0);break;case"days":e=1,"month"===t.unit&&(n=!0);break;case"hours":"day"===t.unit&&(n=!0);break;case"minutes_fives":case"seconds_fives":r%5!=0&&(o=!0);break;case"seconds_tens":r%10!=0&&(o=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!o)return!0}else if((r%e==0||n)&&!o)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,a=this.formatDates(t),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new pa(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,a=t.currentYear,s=t.daysWidthOnXAxis,r=t.numberOfYears,n=e.minYear,o=0,l=new zi(this.ctx),h="year";if(e.minDate>1||e.minMonth>0){var c=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(l.determineDaysOfYear(e.minYear)-c+1)*s,n=e.minYear+1,this.timeScaleArray.push({position:o,value:n,unit:h,year:n,month:v.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:o,value:n,unit:h,year:a,month:v.monthMod(i+1)});for(var d=n,u=o,g=0;g1){l=(h.determineDaysOfMonths(a+1,e.minYear)-i+1)*r,o=v.monthMod(a+1);var u=s+d,g=v.monthMod(o),p=o;0===o&&(c="year",p=u,g=1,u+=d+=1),this.timeScaleArray.push({position:l,value:p,unit:c,year:u,month:g})}else this.timeScaleArray.push({position:l,value:o,unit:c,year:s,month:v.monthMod(a)});for(var f=o+1,x=l,b=0,m=1;bn.determineDaysOfMonths(e+1,i)?(h=1,o="month",u=e+=1,e):e},d=(24-e.minHour)*s,u=l,g=c(h,i,a);0===e.minHour&&1===e.minDate?(d=0,u=v.monthMod(e.minMonth),o="month",h=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(d=0,l=e.minDate,u=l,g=c(h=l,i,a)),this.timeScaleArray.push({position:d,value:u,unit:o,year:this._getYear(a,g,0),month:v.monthMod(g),day:h});for(var p=d,f=0;fo.determineDaysOfMonths(e+1,s)&&(f=1,e+=1),{month:e,date:f}},c=function(t,e){return t>o.determineDaysOfMonths(e+1,s)?e+=1:e},d=60-(e.minMinute+e.minSecond/60),u=d*r,g=e.minHour+1,p=g;60===d&&(u=0,p=g=e.minHour);var f=i;p>=24&&(p=0,l="day",g=f+=1);var x=h(f,a).month;x=c(f,x),this.timeScaleArray.push({position:u,value:g,unit:l,day:f,hour:p,year:s,month:v.monthMod(x)}),p++;for(var b=u,m=0;m=24)p=0,l="day",x=h(f+=1,x).month,x=c(f,x);var y=this._getYear(s,x,0);b=60*r+b;var w=0===p?f:p;this.timeScaleArray.push({position:b,value:w,unit:l,hour:p,day:f,year:y,month:v.monthMod(x)}),p++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.minutesWidthOnXAxis,h=t.secondsWidthOnXAxis,c=t.numberOfMinutes,d=a+1,u=r,g=n,p=o,f=s,x=(60-i-e/1e3)*h,b=0;b=60&&(d=0,24===(f+=1)&&(f=0)),this.timeScaleArray.push({position:x,value:d,unit:"minute",hour:f,minute:d,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,d++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,a=t.currentMinute,s=t.currentHour,r=t.currentDate,n=t.currentMonth,o=t.currentYear,l=t.secondsWidthOnXAxis,h=t.numberOfSeconds,c=i+1,d=a,u=r,g=n,p=o,f=s,x=(1e3-e)/1e3*l,b=0;b=60&&(c=0,++d>=60&&(d=0,24===++f&&(f=0))),this.timeScaleArray.push({position:x,value:c,unit:"second",hour:f,minute:d,second:c,day:u,year:this._getYear(p,g,0),month:v.monthMod(g)}),x+=l,c++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var a=t.value.toString(),s=new zi(e.ctx),r=e.createRawDateString(t,a),n=s.getDate(s.parseDate(r));if(e.utc||(n=s.getDate(s.parseDateWithTimezone(r))),void 0===i.config.xaxis.labels.format){var o="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(o=l.year),"month"===t.unit&&(o=l.month),"day"===t.unit&&(o=l.day),"hour"===t.unit&&(o=l.hour),"minute"===t.unit&&(o=l.minute),"second"===t.unit&&(o=l.second),a=s.formatDate(n,o)}else a=s.formatDate(n,i.config.xaxis.labels.format);return{dateString:r,position:t.position,value:a,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,a=new Mi(this.ctx),s=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(s=!0,e=a.getTextRects(t[0].value).width);var r=0,n=t.map((function(n,o){if(o>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=s?e:a.getTextRects(t[r].value).width,h=t[r].position;return n.position>h+l+10?(r=o,n):null}return n}));return n=n.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),qa=function(){function t(e,a){i(this,t),this.ctx=a,this.w=a.w,this.el=e}return s(t,[{key:"setupElements",value:function(){var t=this.w,e=t.globals,i=t.config,a=i.chart.type;e.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(a),e.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(a),e.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(a)&&i.plotOptions.bar.horizontal,e.chartClass=".apexcharts".concat(e.chartID),e.dom.baseEl=this.el,e.dom.elWrap=document.createElement("div"),Mi.setAttrs(e.dom.elWrap,{id:e.chartClass.substring(1),class:"apexcharts-canvas ".concat(e.chartClass.substring(1))}),this.el.appendChild(e.dom.elWrap),e.dom.Paper=window.SVG().addTo(e.dom.elWrap),e.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(i.chart.offsetX,", ").concat(i.chart.offsetY,")")}),e.dom.Paper.node.style.background="dark"!==i.theme.mode||i.chart.background?"light"!==i.theme.mode||i.chart.background?i.chart.background:"#fff":"#424242",this.setSVGDimensions(),e.dom.elLegendForeign=document.createElementNS(e.SVGNS,"foreignObject"),Mi.setAttrs(e.dom.elLegendForeign,{x:0,y:0,width:e.svgWidth,height:e.svgHeight}),e.dom.elLegendWrap=document.createElement("div"),e.dom.elLegendWrap.classList.add("apexcharts-legend"),e.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),e.dom.elLegendForeign.appendChild(e.dom.elLegendWrap),e.dom.Paper.node.appendChild(e.dom.elLegendForeign),e.dom.elGraphical=e.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),e.dom.elDefs=e.dom.Paper.defs(),e.dom.Paper.add(e.dom.elGraphical),e.dom.elGraphical.add(e.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,a=this.ctx,s=i.config,r=i.globals,n={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},o=s.chart.type||"line",l=null,h=0;r.series.forEach((function(e,a){var s=t[a].type||o;n[s]?("rangeArea"===s?(n[s].series.push(r.seriesRangeStart[a]),n[s].seriesRangeEnd.push(r.seriesRangeEnd[a])):n[s].series.push(e),n[s].i.push(a),"column"!==s&&"bar"!==s||(i.globals.columnSeries=n.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(s)?l=s:"bar"===s?(n.column.series.push(e),n.column.i.push(a)):console.warn("You have specified an unrecognized series type (".concat(s,").")),o!==s&&"scatter"!==s&&h++})),h>0&&(l&&console.warn("Chart or series type ".concat(l," cannot appear with other chart or series types.")),n.column.series.length>0&&s.plotOptions.bar.horizontal&&(h-=n.column.series.length,n.column={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||(r.comboCharts=h>0);var c=new Ba(a,e),d=new Ta(a,e);a.pie=new Ea(a);var u=new Ha(a);a.rangeBar=new Oa(a,e);var g=new Ya(a),p=[];if(r.comboCharts){var x,b,m=new Pi(a);if(n.area.series.length>0)(x=p).push.apply(x,f(m.drawSeriesByGroup(n.area,r.areaGroups,"area",c)));if(n.column.series.length>0)if(s.chart.stacked){var v=new Ia(a,e);p.push(v.draw(n.column.series,n.column.i))}else a.bar=new Pa(a,e),p.push(a.bar.draw(n.column.series,n.column.i));if(n.rangeArea.series.length>0&&p.push(c.draw(n.rangeArea.series,"rangeArea",n.rangeArea.i,n.rangeArea.seriesRangeEnd)),n.line.series.length>0)(b=p).push.apply(b,f(m.drawSeriesByGroup(n.line,r.lineGroups,"line",c)));if(n.candlestick.series.length>0&&p.push(d.draw(n.candlestick.series,"candlestick",n.candlestick.i)),n.boxPlot.series.length>0&&p.push(d.draw(n.boxPlot.series,"boxPlot",n.boxPlot.i)),n.rangeBar.series.length>0&&p.push(a.rangeBar.draw(n.rangeBar.series,n.rangeBar.i)),n.scatter.series.length>0){var y=new Ba(a,e,!0);p.push(y.draw(n.scatter.series,"scatter",n.scatter.i))}if(n.bubble.series.length>0){var w=new Ba(a,e,!0);p.push(w.draw(n.bubble.series,"bubble",n.bubble.i))}}else switch(s.chart.type){case"line":p=c.draw(r.series,"line");break;case"area":p=c.draw(r.series,"area");break;case"bar":if(s.chart.stacked)p=new Ia(a,e).draw(r.series);else a.bar=new Pa(a,e),p=a.bar.draw(r.series);break;case"candlestick":p=new Ta(a,e).draw(r.series,"candlestick");break;case"boxPlot":p=new Ta(a,e).draw(r.series,s.chart.type);break;case"rangeBar":p=a.rangeBar.draw(r.series);break;case"rangeArea":p=c.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":p=new Xa(a,e).draw(r.series);break;case"treemap":p=new Ga(a,e).draw(r.series);break;case"pie":case"donut":case"polarArea":p=a.pie.draw(r.series);break;case"radialBar":p=u.draw(r.series);break;case"radar":p=g.draw(r.series);break;default:p=c.draw(r.series)}return p}},{key:"setSVGDimensions",value:function(){var t=this.w,e=t.globals,i=t.config;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto",e.svgWidth=i.chart.width,e.svgHeight=i.chart.height;var a=v.getDimensions(this.el),s=i.chart.width.toString().split(/[0-9]+/g).pop();"%"===s?v.isNumber(a[0])&&(0===a[0].width&&(a=v.getDimensions(this.el.parentNode)),e.svgWidth=a[0]*parseInt(i.chart.width,10)/100):"px"!==s&&""!==s||(e.svgWidth=parseInt(i.chart.width,10));var r=String(i.chart.height).toString().split(/[0-9]+/g).pop();if("auto"!==e.svgHeight&&""!==e.svgHeight)if("%"===r){var n=v.getDimensions(this.el.parentNode);e.svgHeight=n[1]*parseInt(i.chart.height,10)/100}else e.svgHeight=parseInt(i.chart.height,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),Mi.setAttrs(e.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==r){var o=i.chart.sparkline.enabled?0:e.axisCharts?i.chart.parentHeightOffset:0;e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(e.svgHeight+o,"px")}e.dom.elWrap.style.width="".concat(e.svgWidth,"px"),e.dom.elWrap.style.height="".concat(e.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i=t.translateX;Mi.setAttrs(t.dom.elGraphical.node,{transform:"translate(".concat(i,", ").concat(e,")")})}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,a=t.config.chart.sparkline.enabled?1:15;a+=t.config.grid.padding.bottom,["top","bottom"].includes(t.config.legend.position)&&t.config.legend.show&&!t.config.legend.floating&&(i=new xa(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var s=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*t.globals.radialSize;if(s&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var n=v.getBoundingClientRect(s);r=n.bottom;var o=n.bottom-n.top;r=Math.max(2.05*t.globals.radialSize,o)}var l=Math.ceil(r+e.translateY+i+a);e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).includes("%")||(e.dom.elWrap.style.height="".concat(l,"px"),Mi.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(l,"px"))}},{key:"coreCalculations",value:function(){new ea(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(){return[]}))},i=new Bi,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=e(),a.seriesYvalues=e()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var t=this.w,e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new na(this.ctx).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new na(this.ctx).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new Ua(this.ctx);var i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new Pi(this.ctx).getCalculatedRatios()}return e}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var i=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];i.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){return t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){return t.updateSourceChart(i)})})),e.config.chart.events.selection=function(t,e){i.forEach((function(t){ApexCharts.getChartByID(t).ctx.updateHelpers._updateOptions({xaxis:{min:e.xaxis.min,max:e.xaxis.max}},!1,!1,!1,!1)}))}}}}]),t}(),Za=function(){function t(e){i(this,t),this.ctx=e,this.w=e.w}return s(t,[{key:"_updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(n){var o=[e.ctx];s&&(o=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(o=[e.ctx],e.ctx.w.globals.isExecCalled=!1),o.forEach((function(s,l){var h=s.w;if(h.globals.shouldAnimate=a,i||(h.globals.resized=!0,h.globals.dataChanged=!0,a&&s.series.getPreviousPaths()),t&&"object"===b(t)&&(s.config=new Wi(t),t=Pi.extendArrayProps(s.config,t,h),s.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,h.config=v.extend(h.config,t),r&&(h.globals.lastXAxis=t.xaxis?v.clone(t.xaxis):[],h.globals.lastYAxis=t.yaxis?v.clone(t.yaxis):[],h.globals.initialConfig=v.extend({},h.config),h.globals.initialSeries=v.clone(h.config.series),t.series))){for(var c=0;c2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(s){var r,n=i.w;return n.globals.shouldAnimate=e,n.globals.dataChanged=!0,e&&i.ctx.series.getPreviousPaths(),n.globals.axisCharts?(0===(r=t.map((function(t,e){return i._extendSeries(t,e)}))).length&&(r=[{data:[]}]),n.config.series=r):n.config.series=t.slice(),a&&(n.globals.initialConfig.series=v.clone(n.config.series),n.globals.initialSeries=v.clone(n.config.series)),i.ctx.update().then((function(){s(i.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var i=this.w,a=i.config.series[e];return u(u({},i.config.series[e]),{},{name:t.name?t.name:null==a?void 0:a.name,color:t.color?t.color:null==a?void 0:a.color,type:t.type?t.type:null==a?void 0:a.type,group:t.group?t.group:null==a?void 0:a.group,hidden:void 0!==t.hidden?t.hidden:null==a?void 0:a.hidden,data:t.data?t.data:null==a?void 0:a.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(e,"'], ").concat(s," circle[j='").concat(e,"'], ").concat(s," rect[j='").concat(e,"']")):void 0===e&&(a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(t,"']")),"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),a?(new Mi(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new Ni(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;t&&t.xaxis&&(a=t.xaxis),t&&t.yaxis&&(s=t.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;var r=function(t){void 0!==s[t]&&(i.config.yaxis[t].min=s[t].min,i.config.yaxis[t].max=s[t].max)};i.config.yaxis.map((function(t,a){i.globals.zoomed||void 0!==s[a]?r(a):void 0!==e.ctx.opts.yaxis[a]&&(t.min=e.ctx.opts.yaxis[a].min,t.max=e.ctx.opts.yaxis[a].max)}))}}]),t}();!function(){function t(){for(var t=arguments.length>0&&arguments[0]!==h?arguments[0]:[],s=arguments.length>1?arguments[1]:h,r=arguments.length>2?arguments[2]:h,n=arguments.length>3?arguments[3]:h,o=arguments.length>4?arguments[4]:h,l=arguments.length>5?arguments[5]:h,h=arguments.length>6?arguments[6]:h,c=t.slice(s,r||h),d=n.slice(o,l||h),u=0,g={pos:[0,0],start:[0,0]},p={pos:[0,0],start:[0,0]};;){if(c[u]=e.call(g,c[u]),d[u]=e.call(p,d[u]),c[u][0]!=d[u][0]||"M"==c[u][0]||"A"==c[u][0]&&(c[u][4]!=d[u][4]||c[u][5]!=d[u][5])?(Array.prototype.splice.apply(c,[u,1].concat(a.call(g,c[u]))),Array.prototype.splice.apply(d,[u,1].concat(a.call(p,d[u])))):(c[u]=i.call(g,c[u]),d[u]=i.call(p,d[u])),++u==c.length&&u==d.length)break;u==c.length&&c.push(["C",g.pos[0],g.pos[1],g.pos[0],g.pos[1],g.pos[0],g.pos[1]]),u==d.length&&d.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]])}return{start:c,dest:d}}function e(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function i(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function a(t){var e=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],e;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":e=function(t,e){var i,a,s,r,n,o,l,h,c,d,u,g,p,f,x,b,m,v,y,w,k,A,C,S,L,M,P=Math.abs(e[1]),I=Math.abs(e[2]),T=e[3]%360,z=e[4],X=e[5],R=e[6],E=e[7],Y=new bt(t),H=new bt(R,E),O=[];if(0===P||0===I||Y.x===H.x&&Y.y===H.y)return[["C",Y.x,Y.y,H.x,H.y,H.x,H.y]];i=new bt((Y.x-H.x)/2,(Y.y-H.y)/2).transform((new vt).rotate(T)),a=i.x*i.x/(P*P)+i.y*i.y/(I*I),a>1&&(P*=a=Math.sqrt(a),I*=a);s=(new vt).rotate(T).scale(1/P,1/I).rotate(-T),Y=Y.transform(s),H=H.transform(s),r=[H.x-Y.x,H.y-Y.y],o=r[0]*r[0]+r[1]*r[1],n=Math.sqrt(o),r[0]/=n,r[1]/=n,l=o<4?Math.sqrt(1-o/4):0,z===X&&(l*=-1);h=new bt((H.x+Y.x)/2+l*-r[1],(H.y+Y.y)/2+l*r[0]),c=new bt(Y.x-h.x,Y.y-h.y),d=new bt(H.x-h.x,H.y-h.y),u=Math.acos(c.x/Math.sqrt(c.x*c.x+c.y*c.y)),c.y<0&&(u*=-1);g=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(g*=-1);X&&u>g&&(g+=2*Math.PI);!X&&u0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1?arguments[1]:void 0;if(!1===e)return!1;for(var i=e,a=t.length;i(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class Ja{constructor(t){t.remember("_draggable",this),this.el=t,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(t){t?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(t){const e=!t.type.indexOf("mouse");if(e&&1!==t.which&&0!==t.buttons)return;if(this.el.dispatch("beforedrag",{event:t,handler:this}).defaultPrevented)return;t.preventDefault(),t.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point($a(t));const i=(e?"mouseup":"touchend")+".drag";zt(window,(e?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),zt(window,i,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:t,handler:this,box:this.box})}drag(t){const{box:e,lastClick:i}=this,a=this.el.point($a(t)),s=a.x-i.x,r=a.y-i.y;if(!s&&!r)return e;const n=e.x+s,o=e.y+r;this.box=new kt(n,o,e.w,e.h),this.lastClick=a,this.el.dispatch("dragmove",{event:t,handler:this,box:this.box}).defaultPrevented||this.move(n,o)}move(t,e){"svg"===this.el.type?gi.prototype.move.call(this.el,t,e):this.el.move(t,e)}endDrag(t){this.drag(t),this.el.fire("dragend",{event:t,handler:this,box:this.box}),Xt(window,"mousemove.drag"),Xt(window,"touchmove.drag"),Xt(window,"mouseup.drag"),Xt(window,"touchend.drag"),this.init(!0)}} /*! * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse * @version 4.0.1 @@ -17,13 +17,13 @@ function Qa(t,e,i,a=null){return function(s){s.preventDefault(),s.stopPropagation();var r=s.pageX||s.touches[0].pageX,n=s.pageY||s.touches[0].pageY;e.fire(t,{x:r,y:n,event:s,index:a,points:i})}}function Ka([t,e],{a:i,b:a,c:s,d:r,e:n,f:o}){return[t*i+e*s+n,t*a+e*r+o]}Q(Gt,{draggable(t=!0){return(this.remember("_draggable")||new Ja(this)).init(t),this}});let ts=class{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",Qa(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",Qa("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>Ka(t,e))),this.rotationPoint=Ka(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}};const es=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ts?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this}; /*! * @svgdotjs/svg.resize.js - An extension for svg.js which allows to resize elements which are selected - * @version 2.0.2 + * @version 2.0.4 * https://github.com/svgdotjs/svg.resize.js * * @copyright [object Object] * @license MIT * - * BUILT: Mon Jul 01 2024 15:05:58 GMT+0200 (Central European Summer Time) + * BUILT: Fri Sep 13 2024 12:43:14 GMT+0200 (Central European Summer Time) */ /*! * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse @@ -35,4 +35,4 @@ function Qa(t,e,i,a=null){return function(s){s.preventDefault(),s.stopPropagatio * * BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time) */ -function is(t,e,i,a=null){return function(s){s.preventDefault(),s.stopPropagation();var r=s.pageX||s.touches[0].pageX,n=s.pageY||s.touches[0].pageY;e.fire(t,{x:r,y:n,event:s,index:a,points:i})}}function as([t,e],{a:i,b:a,c:s,d:r,e:n,f:o}){return[t*i+e*s+n,t*a+e*r+o]}Q(Gt,{select:es(ts)}),Q([Ge,je,xe],{pointSelect:es(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",Qa("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>Ka(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class ss{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",is(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",is("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>as(t,e))),this.rotationPoint=as(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const rs=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ss?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this};Q(Gt,{select:rs(ss)}),Q([Ge,je,xe],{pointSelect:rs(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",is("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>as(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const ns=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),os=t=>{let e=1/0,i=1/0,a=-1/0,s=-1/0;for(let r=0;r{const s=t-e[0],r=(a-e[1])*i;return[s*i+e[0],r+e[1]]}));return os(a)}(this.box,s,r)}this.el.dispatch("resize",{box:new kt(l),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.move(l.x,l.y).size(l.width,l.height)}movePoint(t){this.lastEvent=t;const{x:e,y:i}=this.snapToGrid(this.el.point(ns(t))),a=this.el.array().slice();a[this.index]=[e,i],this.el.dispatch("resize",{box:os(a),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.plot(a)}rotate(t){this.lastEvent=t;const e=this.el.point(ns(t)),i=this.box.cx,a=this.box.cy,s=this.startPoint.x-i,r=this.startPoint.y-a,n=e.x-i,o=e.y-a,l=Math.sqrt(s*s+r*r)*Math.sqrt(n*n+o*o);if(0===l)return;let h=Math.acos((s*n+r*o)/l)/Math.PI*180;e.xdiv {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}';var h=(null===(l=t.opts.chart)||void 0===l?void 0:l.nonce)||t.w.config.chart.nonce;h&&o.setAttribute("nonce",h),r?s.prepend(o):n.head.appendChild(o)}var c=t.create(t.w.config.series,{});if(!c)return e(t);t.mount(c).then((function(){"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(c)})).catch((function(t){i(t)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var i=this,a=this.w;new hs(this).initModules();var s=this.w.globals;if(s.noData=!1,s.animationEnded=!1,!v.elementExists(this.el))return s.animationEnded=!0,this.destroy(),null;(this.responsive.checkResponsiveConfig(e),a.config.xaxis.convertedCatToNumeric)&&new Ni(a.config).convertCatToNumericXaxis(a.config,this.ctx);if(this.core.setupElements(),"treemap"===a.config.chart.type&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),0===s.svgWidth)return s.animationEnded=!0,null;var r=t;t.forEach((function(t,e){t.hidden&&(r=i.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}))}));var n=Pi.checkComboSeries(r,a.config.chart.type);s.comboCharts=n.comboCharts,s.comboBarCount=n.comboBarCount;var o=r.every((function(t){return t.data&&0===t.data.length}));(0===r.length||o&&s.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(r),this.theme.init(),new Vi(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),s.noData&&s.collapsedSeries.length!==s.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),s.axisCharts&&(this.core.coreCalculations(),"category"!==a.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new Pi(this).getLargestMarkerSize(),this.dimensions.plotCoords();var l=this.core.xySettings();this.grid.createGridMask();var h=this.core.plotChartType(r,l),c=new qi(this);return c.bringForward(),a.config.dataLabels.background.enabled&&c.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:h,xyRatios:l,dimensions:{plot:{left:a.globals.translateX,top:a.globals.translateY,width:a.globals.gridWidth,height:a.globals.gridHeight}}}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise((function(s,r){if(null===i.el)return r(new Error("Not enough data to display or target element not found"));(null===e||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new Ki(i);var n,o,l=i.grid.drawGrid();(i.annotations=new Fi(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position)&&(l&&a.globals.dom.elGraphical.add(l.el),null!=l&&null!==(n=l.elGridBorders)&&void 0!==n&&n.node&&a.globals.dom.elGraphical.add(l.elGridBorders));if(Array.isArray(e.elGraph))for(var h=0;h0&&a.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),s(i)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,e){var i=ds.get(e);i&&(i.disconnect(),ds.delete(e))}(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,i){e.id===v.escapeString(t)&&Apex._chartInstances.splice(i,1)})),new cs(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w;return n.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,i){return e.updateHelpers._extendSeries(t,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,a,s,r)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,e,i)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(t,e,a)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(t,e,a)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(t,e,a)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;e&&(i=e),i.annotations.removeAnnotation(i,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Ji(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ji(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var e=v.escapeString(t);if(Apex._chartInstances){var i=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i2?s-2:0),n=2;n{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",Qa("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>Ka(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class ss{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.createHandle.call(this,this.selection,t,e,i,a),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",is(a,this.el,this.handlePoints,e))}))}createHandleFn(t){t.polyline()}updateHandleFn(t,e,i,a){const s=a.at(i-1),r=a[(i+1)%a.length],n=e,o=[n[0]-s[0],n[1]-s[1]],l=[n[0]-r[0],n[1]-r[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[n[0]-10*d[0],n[1]-10*d[1]],p=[n[0]-10*u[0],n[1]-10*u[1]];t.plot([g,n,p])}updateResizeHandles(){this.handlePoints.forEach(((t,e,i)=>{const a=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,i,a)}))}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const i=this.getPoint("t");t.get(0).plot(i[0],i[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",is("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map((t=>as(t,e))),this.rotationPoint=as(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[t,i],[s,i],[e,i],[e,r],[e,a],[s,a],[t,a],[t,r]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const rs=t=>function(e=!0,i={}){"object"==typeof e&&(i=e,e=!0);let a=this.remember("_"+t.name);return a||(e.prototype instanceof ss?(a=new e(this),e=!0):a=new t(this),this.remember("_"+t.name,a)),a.active(e,i),this};Q(Gt,{select:rs(ss)}),Q([Ge,je,xe],{pointSelect:rs(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new gi,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=F();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach(((t,e,i)=>{this.createHandle.call(this,this.selection,t,e,i),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",is("point",this.el,this.points,e))}))}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach(((t,e,i)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,i)}))}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map((e=>as(e,t)))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const ns=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),os=t=>{let e=1/0,i=1/0,a=-1/0,s=-1/0;for(let r=0;r{const s=t-e[0],r=(a-e[1])*i;return[s*i+e[0],r+e[1]]}));return os(a)}(this.box,s,r)}this.el.dispatch("resize",{box:new kt(l),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.size(l.width,l.height).move(l.x,l.y)}movePoint(t){this.lastEvent=t;const{x:e,y:i}=this.snapToGrid(this.el.point(ns(t))),a=this.el.array().slice();a[this.index]=[e,i],this.el.dispatch("resize",{box:os(a),angle:0,eventType:this.eventType,event:t,handler:this}).defaultPrevented||this.el.plot(a)}rotate(t){this.lastEvent=t;const e=this.startPoint,i=this.el.point(ns(t)),{cx:a,cy:s}=this.box,r=e.x-a,n=e.y-s,o=i.x-a,l=i.y-s,h=Math.sqrt(r*r+n*n)*Math.sqrt(o*o+l*l);if(0===h)return;let c=Math.acos((r*o+n*l)/h)/Math.PI*180;if(!c)return;i.xdiv {\n margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n font-weight: 600;\n color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n font-weight: 700;\n display: block;\n margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n opacity: 0;\n pointer-events: none;\n color: #373d3f;\n font-size: 13px;\n text-align: center;\n border-radius: 2px;\n position: absolute;\n z-index: 10;\n background: #eceff1;\n border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n padding: 9px 10px;\n transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n left: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n background: rgba(0, 0, 0, .7);\n border: 1px solid rgba(0, 0, 0, .5);\n color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n top: 50%;\n border: solid transparent;\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n border-color: transparent;\n border-width: 6px;\n margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n border-color: transparent;\n border-width: 7px;\n margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n pointer-events: none;\n opacity: 0;\n transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n opacity: 1;\n transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n opacity: 0\n}\n\n.apexcharts-selection-rect {\n cursor: move\n}\n\n.svg_select_shape {\n stroke-width: 1;\n stroke-dasharray: 10 10;\n stroke: black;\n stroke-opacity: 0.1;\n pointer-events: none;\n fill: none;\n}\n\n.svg_select_handle {\n stroke-width: 3;\n stroke: black;\n fill: none;\n}\n\n.svg_select_handle_r {\n cursor: e-resize;\n}\n\n.svg_select_handle_l {\n cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n cursor: pointer;\n width: 20px;\n height: 20px;\n line-height: 24px;\n color: #6e8192;\n text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n fill: #444;\n transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n position: relative\n}\n\n.apexcharts-reset-icon {\n margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n transform: scale(.62);\n position: relative;\n left: 1px;\n top: 0\n}\n\n.apexcharts-pan-icon svg {\n fill: #fff;\n stroke: #6e8192;\n stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n stroke: #333\n}\n\n.apexcharts-toolbar {\n position: absolute;\n z-index: 11;\n max-width: 176px;\n text-align: right;\n border-radius: 3px;\n padding: 0 6px 2px;\n display: flex;\n justify-content: space-between;\n align-items: center\n}\n\n.apexcharts-menu {\n background: #fff;\n position: absolute;\n top: 100%;\n border: 1px solid #ddd;\n border-radius: 3px;\n padding: 3px;\n right: 10px;\n opacity: 0;\n min-width: 110px;\n transition: .15s ease all;\n pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n opacity: 1;\n pointer-events: all;\n transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n padding: 6px 7px;\n font-size: 12px;\n cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n background: rgba(0, 0, 0, .7);\n color: #fff\n}\n\n@media screen and (min-width:768px) {\n .apexcharts-canvas:hover .apexcharts-toolbar {\n opacity: 1\n }\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n opacity: 1;\n transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n cursor: default;\n pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n opacity: 0;\n animation-name: opaque;\n animation-duration: .3s;\n animation-fill-mode: forwards;\n animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n transition: .15s ease all\n}\n\n.resize-triggers {\n animation: 1ms resizeanim;\n visibility: hidden;\n opacity: 0;\n height: 100%;\n width: 100%;\n overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n content: " ";\n display: block;\n position: absolute;\n top: 0;\n left: 0\n}\n\n.resize-triggers>div {\n height: 100%;\n width: 100%;\n background: #eee;\n overflow: auto\n}\n\n.contract-trigger:before {\n overflow: hidden;\n width: 200%;\n height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n pointer-events: none\n}';var h=(null===(l=t.opts.chart)||void 0===l?void 0:l.nonce)||t.w.config.chart.nonce;h&&o.setAttribute("nonce",h),r?s.prepend(o):n.head.appendChild(o)}var c=t.create(t.w.config.series,{});if(!c)return e(t);t.mount(c).then((function(){"function"==typeof t.w.config.chart.events.mounted&&t.w.config.chart.events.mounted(t,t.w),t.events.fireEvent("mounted",[t,t.w]),e(c)})).catch((function(t){i(t)}))}else i(new Error("Element not found"))}))}},{key:"create",value:function(t,e){var i=this,a=this.w;new hs(this).initModules();var s=this.w.globals;if(s.noData=!1,s.animationEnded=!1,!v.elementExists(this.el))return s.animationEnded=!0,this.destroy(),null;(this.responsive.checkResponsiveConfig(e),a.config.xaxis.convertedCatToNumeric)&&new Ni(a.config).convertCatToNumericXaxis(a.config,this.ctx);if(this.core.setupElements(),"treemap"===a.config.chart.type&&(a.config.grid.show=!1,a.config.yaxis[0].show=!1),0===s.svgWidth)return s.animationEnded=!0,null;var r=t;t.forEach((function(t,e){t.hidden&&(r=i.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}))}));var n=Pi.checkComboSeries(r,a.config.chart.type);s.comboCharts=n.comboCharts,s.comboBarCount=n.comboBarCount;var o=r.every((function(t){return t.data&&0===t.data.length}));(0===r.length||o&&s.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(r),this.theme.init(),new Vi(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),s.noData&&s.collapsedSeries.length!==s.series.length&&!a.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),s.axisCharts&&(this.core.coreCalculations(),"category"!==a.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=a.globals.minX,this.ctx.toolbar.maxX=a.globals.maxX),this.formatters.heatmapLabelFormatters(),new Pi(this).getLargestMarkerSize(),this.dimensions.plotCoords();var l=this.core.xySettings();this.grid.createGridMask();var h=this.core.plotChartType(r,l),c=new qi(this);return c.bringForward(),a.config.dataLabels.background.enabled&&c.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:h,xyRatios:l,dimensions:{plot:{left:a.globals.translateX,top:a.globals.translateY,width:a.globals.gridWidth,height:a.globals.gridHeight}}}}},{key:"mount",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=this,a=i.w;return new Promise((function(s,r){if(null===i.el)return r(new Error("Not enough data to display or target element not found"));(null===e||a.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new Ki(i);var n,o,l=i.grid.drawGrid();(i.annotations=new Fi(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),"back"===a.config.grid.position)&&(l&&a.globals.dom.elGraphical.add(l.el),null!=l&&null!==(n=l.elGridBorders)&&void 0!==n&&n.node&&a.globals.dom.elGraphical.add(l.elGridBorders));if(Array.isArray(e.elGraph))for(var h=0;h0&&a.globals.memory.methodsToExec.forEach((function(t){t.method(t.params,!1,t.context)})),a.globals.axisCharts||a.globals.noData||i.core.resizeNonAxisCharts(),s(i)}))}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(t,e){var i=ds.get(e);i&&(i.disconnect(),ds.delete(e))}(this.el.parentNode,this.parentResizeHandler);var t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((function(e,i){e.id===v.escapeString(t)&&Apex._chartInstances.splice(i,1)})),new cs(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],n=this.w;return n.globals.selection=void 0,t.series&&(this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((function(t,i){return e.updateHelpers._extendSeries(t,i)}))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,i,a,s,r)}},{key:"updateSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,i)}},{key:"appendSeries",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=this.w.config.series.slice();return a.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(a,e,i)}},{key:"appendData",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var a=i.w.config.series.slice(),s=0;s0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.series.resetSeries(t,e)}},{key:"addEventListener",value:function(t,e){this.events.addEventListener(t,e)}},{key:"removeEventListener",value:function(t,e){this.events.removeEventListener(t,e)}},{key:"addXaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addXaxisAnnotationExternal(t,e,a)}},{key:"addYaxisAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addYaxisAnnotationExternal(t,e,a)}},{key:"addPointAnnotation",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=this;i&&(a=i),a.annotations.addPointAnnotationExternal(t,e,a)}},{key:"clearAnnotations",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,e=this;t&&(e=t),e.annotations.clearAnnotations(e)}},{key:"removeAnnotation",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,i=this;e&&(i=e),i.annotations.removeAnnotation(i,t)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}},{key:"getHighestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).highestY}},{key:"getLowestValueInSeries",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new ea(this.ctx).getMinYMaxY(t).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}},{key:"zoomX",value:function(t,e){this.ctx.toolbar.zoomUpdateOptions(t,e)}},{key:"setLocale",value:function(t){this.localization.setCurrentLocaleValues(t)}},{key:"dataURI",value:function(t){return new Ji(this.ctx).dataURI(t)}},{key:"exportToCSV",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Ji(this.ctx).exportToCSV(t)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var t=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout((function(){t.w.globals.resized=!0,t.w.globals.dataChanged=!1,t.ctx.update()}),150)}},{key:"_windowResizeHandler",value:function(){var t=this.w.config.chart.redrawOnWindowResize;"function"==typeof t&&(t=t()),t&&this._windowResize()}}],[{key:"getChartByID",value:function(t){var e=v.escapeString(t);if(Apex._chartInstances){var i=Apex._chartInstances.filter((function(t){return t.id===e}))[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),i=0;i2?s-2:0),n=2;n= 4.21.0": +browserslist@^4.0.0, browserslist@^4.16.0, browserslist@^4.16.6, browserslist@^4.21.10, browserslist@^4.22.2, browserslist@^4.23.1: version "4.23.3" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz" integrity sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA== @@ -2318,16 +2301,15 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001646: resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001649.tgz" integrity sha512-fJegqZZ0ZX8HOWr6rcafGr72+xcgJKI9oWfDW5DrD7ExUtgZC7a7R7ZYmZqplh7XDocFdGeIFn7roAxhOeYrPQ== -chalk@^2.3.0: - version "2.4.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== +chalk@3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz" + integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" + ansi-styles "^4.1.0" + supports-color "^7.1.0" -chalk@^2.4.2: +chalk@^2.3.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -2336,23 +2318,7 @@ chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0.0: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^4.1.0: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chalk@^4.1.2: +chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2: version "4.1.2" resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -2360,20 +2326,12 @@ chalk@^4.1.2: ansi-styles "^4.1.0" supports-color "^7.1.0" -chalk@3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - char-regex@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz" integrity sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw== -chokidar@^3.3.0, chokidar@3.5.2: +chokidar@3.5.2: version "3.5.2" resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz" integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== @@ -2468,16 +2426,16 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - color-name@1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + colord@^2.9.1: version "2.9.1" resolved "https://registry.npmjs.org/colord/-/colord-2.9.1.tgz" @@ -2500,12 +2458,7 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" -commander@^2.12.1: - version "2.20.3" - resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commander@^2.20.0: +commander@^2.12.1, commander@^2.20.0: version "2.20.3" resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -2596,7 +2549,7 @@ create-jest@^29.7.0: cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.6" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.6.tgz#8a58fe78f00dcd70c370451759dfbfaf03e8ee9f" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== dependencies: path-key "^3.1.0" @@ -2754,6 +2707,13 @@ data-urls@^3.0.2: whatwg-mimetype "^3.0.0" whatwg-url "^11.0.0" +debug@4, debug@4.3.4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: + version "4.3.4" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + debug@^3.2.7: version "3.2.7" resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" @@ -2761,13 +2721,6 @@ debug@^3.2.7: dependencies: ms "^2.1.1" -debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@4, debug@4.3.4: - version "4.3.4" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - debug@^4.3.5: version "4.3.5" resolved "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz" @@ -2834,7 +2787,7 @@ detect-newline@^3.0.0: resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz" integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== -devtools-protocol@*, devtools-protocol@0.0.1299070: +devtools-protocol@0.0.1299070: version "0.0.1299070" resolved "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1299070.tgz" integrity sha512-+qtL3eX50qsJ7c+qVyagqi7AWMoQCBGNfoyJZMwm/NSXVqLYbuitrWEEIzxfUmTNy7//Xe8yhMmQ+elj3uAqSg== @@ -2934,7 +2887,7 @@ end-of-stream@^1.1.0: enhanced-resolve@^5.17.1: version "5.17.1" - resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== dependencies: graceful-fs "^4.2.4" @@ -3009,7 +2962,7 @@ es-abstract@^1.19.0, es-abstract@^1.20.4: es-module-lexer@^1.2.1: version "1.5.4" - resolved "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz" + resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.5.4.tgz#a8efec3a3da991e60efa6b633a7cad6ab8d26b78" integrity sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw== es-set-tostringtag@^2.0.1: @@ -3138,14 +3091,6 @@ eslint-plugin-promise@4.2.1: resolved "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz" integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw== -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - eslint-scope@5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" @@ -3154,6 +3099,14 @@ eslint-scope@5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" +eslint-scope@^7.1.1: + version "7.1.1" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz" + integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== + dependencies: + esrecurse "^4.3.0" + estraverse "^5.2.0" + eslint-visitor-keys@^1.0.0: version "1.3.0" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz" @@ -3175,7 +3128,7 @@ eslint-webpack-plugin@4.0.0: normalize-path "^3.0.0" schema-utils "^4.0.0" -"eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8", "eslint@^6.0.0 || ^7.0.0 || >=8.0.0", eslint@^8.0.0, eslint@>=7.0.0, eslint@8.36.0: +eslint@8.36.0: version "8.36.0" resolved "https://registry.npmjs.org/eslint/-/eslint-8.36.0.tgz" integrity sha512-Y956lmS7vDqomxlaaQAHVmeb4tNMp2FWIvU/RnU5BD3IKMD/MJPr76xdyr68P8tV1iNMvN2mRK0yy3c+UjL+bw== @@ -3254,22 +3207,12 @@ estraverse@^4.1.1: resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== -estraverse@^5.1.0: - version "5.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -estraverse@^5.2.0: +estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== -estree-walker@^0.6.0: - version "0.6.1" - resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz" - integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== - -estree-walker@^0.6.1: +estree-walker@^0.6.0, estree-walker@^0.6.1: version "0.6.1" resolved "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz" integrity sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== @@ -3547,6 +3490,15 @@ fs-exists-sync@^0.1.0: resolved "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz" integrity sha512-cR/vflFyPZtrN6b38ZyWxpWdhlXrzZEBawlpBQMq7033xVY7/kg0GDMBK5jg8lDYQckdJ5x/YC88lM3C7VMsLg== +fs-extra@8.1.0, fs-extra@^8.1.0: + version "8.1.0" + resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz" + integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^4.0.0" + universalify "^0.1.0" + fs-extra@^11.2.0: version "11.2.0" resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz" @@ -3556,20 +3508,16 @@ fs-extra@^11.2.0: jsonfile "^6.0.1" universalify "^2.0.0" -fs-extra@^8.1.0, fs-extra@8.1.0: - version "8.1.0" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" - fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= +fsevents@^2.3.2, fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" @@ -3651,6 +3599,13 @@ get-uri@^6.0.1: debug "^4.3.4" fs-extra "^11.2.0" +glob-parent@6.0.1: + version "6.0.1" + resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.1.tgz" + integrity sha512-kEVjS71mQazDBHKcsq4E9u/vUzaLcw1A8EtUeydawvIWQCJM0qQ08G1H7/XTjFUulla6XQiDOG6MXSaG0HDKog== + dependencies: + is-glob "^4.0.1" + glob-parent@^6.0.2: version "6.0.2" resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" @@ -3665,19 +3620,12 @@ glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob-parent@6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.1.tgz" - integrity sha512-kEVjS71mQazDBHKcsq4E9u/vUzaLcw1A8EtUeydawvIWQCJM0qQ08G1H7/XTjFUulla6XQiDOG6MXSaG0HDKog== - dependencies: - is-glob "^4.0.1" - glob-to-regexp@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@7.1.7: +glob@7.1.7, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: version "7.1.7" resolved "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz" integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== @@ -3735,7 +3683,7 @@ gopd@^1.0.1: graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.11" - resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== grapheme-splitter@^1.0.4: @@ -3832,15 +3780,7 @@ http-proxy-agent@^5.0.0: agent-base "6" debug "4" -http-proxy-agent@^7.0.0: - version "7.0.2" - resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz" - integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== - dependencies: - agent-base "^7.1.0" - debug "^4.3.4" - -http-proxy-agent@^7.0.1: +http-proxy-agent@^7.0.0, http-proxy-agent@^7.0.1: version "7.0.2" resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz" integrity sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig== @@ -3856,15 +3796,7 @@ https-proxy-agent@^5.0.1: agent-base "6" debug "4" -https-proxy-agent@^7.0.3: - version "7.0.5" - resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz" - integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw== - dependencies: - agent-base "^7.0.2" - debug "4" - -https-proxy-agent@^7.0.5: +https-proxy-agent@^7.0.3, https-proxy-agent@^7.0.5: version "7.0.5" resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz" integrity sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw== @@ -4545,7 +4477,7 @@ jest-resolve-dependencies@^29.7.0: jest-regex-util "^29.6.3" jest-snapshot "^29.7.0" -jest-resolve@*, jest-resolve@^29.7.0: +jest-resolve@^29.7.0: version "29.7.0" resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-29.7.0.tgz" integrity sha512-IOVhZSrg+UvVAshDSDtHyFCCBUl/Q3AAJv8iZ6ZjnZ74xzvwuzLXid9IIIPgTnY62SJjfuupMKZsZQRsCvxEgA== @@ -4710,7 +4642,7 @@ jest-worker@^27.3.1: jest-worker@^27.4.5: version "27.5.1" - resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0" integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== dependencies: "@types/node" "*" @@ -4856,7 +4788,7 @@ jsonfile@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz" integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= - dependencies: + optionalDependencies: graceful-fs "^4.1.6" jsonfile@^6.0.1: @@ -5092,7 +5024,7 @@ mrmime@^1.0.0: resolved "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz" integrity sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw== -ms@^2.1.1, ms@2.1.2: +ms@2.1.2, ms@^2.1.1: version "2.1.2" resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== @@ -5293,14 +5225,7 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-limit@^3.1.0: +p-limit@^3.0.2, p-limit@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== @@ -5516,21 +5441,14 @@ pkg-dir@^3.0.0: dependencies: find-up "^3.0.0" -pkg-dir@^4.1.0: +pkg-dir@^4.1.0, pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== dependencies: find-up "^4.0.0" -pkg-dir@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -pngjs@^3.4.0, pngjs@3.4.0: +pngjs@3.4.0, pngjs@^3.4.0: version "3.4.0" resolved "https://registry.npmjs.org/pngjs/-/pngjs-3.4.0.tgz" integrity sha512-NCrCHhWmnQklfH4MtJMRjZ2a8c80qXeMlQMv2uVp9ISJMTt562SbGd6n2oq0PaPgKm7Z6pL9E2UlLIhC+SHL3w== @@ -5807,7 +5725,7 @@ postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0, postcss-value-parser@^ resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^8.1.0, postcss@^8.4.21, postcss@^8.4.33, postcss@8.x: +postcss@^8.4.21, postcss@^8.4.33: version "8.4.35" resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.35.tgz" integrity sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA== @@ -5922,7 +5840,7 @@ puppeteer-core@22.12.1: devtools-protocol "0.0.1299070" ws "^8.17.1" -puppeteer@>=19, puppeteer@>=22.0.0, puppeteer@22.12.1: +puppeteer@22.12.1: version "22.12.1" resolved "https://registry.npmjs.org/puppeteer/-/puppeteer-22.12.1.tgz" integrity sha512-1GxY8dnEnHr1SLzdSDr0FCjM6JQfAh2E2I/EqzeF8a58DbGVk9oVjj4lFdqNoVbpgFSpAbz7VER9St7S1wDpNg== @@ -6106,14 +6024,7 @@ reusify@^1.0.4: resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rimraf@^3.0.0: - version "3.0.2" - resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -rimraf@^3.0.2: +rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== @@ -6171,9 +6082,9 @@ rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.6.0, rollup-pluginutils@^2.8.1, dependencies: estree-walker "^0.6.1" -rollup@^2.0.0||^3.0.0||^4.0.0, rollup@3.29.5: +rollup@3.29.5: version "3.29.5" - resolved "https://registry.npmjs.org/rollup/-/rollup-3.29.5.tgz" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.29.5.tgz#8a2e477a758b520fb78daf04bca4c522c1da8a54" integrity sha512-GVsDdsbJzzy4S/v3dqWPJ7EfvZJfCHiDqe80IyrF59LYuP+e6U1LJoUqeuqRbwAWoMNoXivMNeNAOf5E22VA1w== optionalDependencies: fsevents "~2.3.2" @@ -6232,18 +6143,9 @@ schema-utils@^2.0.1, schema-utils@^2.6.1: ajv "^6.12.4" ajv-keywords "^3.5.2" -schema-utils@^3.1.1: +schema-utils@^3.1.1, schema-utils@^3.2.0: version "3.3.0" - resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz" - integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== - dependencies: - "@types/json-schema" "^7.0.8" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - -schema-utils@^3.2.0: - version "3.3.0" - resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.3.0.tgz#f50a88877c3c01652a15b622ae9e9795df7a60fe" integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== dependencies: "@types/json-schema" "^7.0.8" @@ -6260,12 +6162,14 @@ schema-utils@^4.0.0: ajv-formats "^2.1.1" ajv-keywords "^5.0.0" -semver@^5.3.0: - version "5.7.2" - resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" - integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== +semver@7.6.0, semver@^7.5.4: + version "7.6.0" + resolved "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz" + integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== + dependencies: + lru-cache "^6.0.0" -semver@^5.6.0: +semver@^5.3.0, semver@^5.6.0: version "5.7.2" resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== @@ -6280,20 +6184,6 @@ semver@^7.5.3: resolved "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== -semver@^7.5.4: - version "7.6.0" - resolved "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz" - integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== - dependencies: - lru-cache "^6.0.0" - -semver@7.6.0: - version "7.6.0" - resolved "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz" - integrity sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg== - dependencies: - lru-cache "^6.0.0" - serialize-javascript@^6.0.1: version "6.0.2" resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz" @@ -6400,14 +6290,6 @@ source-map-js@^1.0.2: resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== -source-map-support@~0.5.20: - version "0.5.21" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - source-map-support@0.5.13: version "0.5.13" resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz" @@ -6416,6 +6298,14 @@ source-map-support@0.5.13: buffer-from "^1.0.0" source-map "^0.6.0" +source-map-support@~0.5.20: + version "0.5.21" + resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: version "0.6.1" resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" @@ -6611,7 +6501,7 @@ svg-inline-loader@0.8.2: object-assign "^4.0.1" simple-html-tokenizer "^0.1.1" -svgo@^2.7.0, svgo@2.8.0: +svgo@2.8.0, svgo@^2.7.0: version "2.8.0" resolved "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz" integrity sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg== @@ -6656,7 +6546,7 @@ tar-stream@^3.1.5: terser-webpack-plugin@^5.3.10: version "5.3.10" - resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz" + resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz#904f4c9193c6fd2a03f693a2150c62a92f40d199" integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== dependencies: "@jridgewell/trace-mapping" "^0.3.20" @@ -6665,6 +6555,16 @@ terser-webpack-plugin@^5.3.10: serialize-javascript "^6.0.1" terser "^5.26.0" +terser@5.16.6: + version "5.16.6" + resolved "https://registry.npmjs.org/terser/-/terser-5.16.6.tgz" + integrity sha512-IBZ+ZQIA9sMaXmRZCUMDjNH0D5AQQfdn4WUjHL0+1lF4TP1IHRJbrhb6fNaXWikrYQTSkb7SLxkeXAiy1p7mbg== + dependencies: + "@jridgewell/source-map" "^0.3.2" + acorn "^8.5.0" + commander "^2.20.0" + source-map-support "~0.5.20" + terser@^5.17.4: version "5.31.1" resolved "https://registry.npmjs.org/terser/-/terser-5.31.1.tgz" @@ -6677,7 +6577,7 @@ terser@^5.17.4: terser@^5.26.0: version "5.31.6" - resolved "https://registry.npmjs.org/terser/-/terser-5.31.6.tgz" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.6.tgz#c63858a0f0703988d0266a82fcbf2d7ba76422b1" integrity sha512-PQ4DAriWzKj+qgehQ7LK5bQqCFNMmlhjR2PFFLuqGCpuCAauxemVBWwWOxo3UIwWQx8+Pr61Df++r76wDmkQBg== dependencies: "@jridgewell/source-map" "^0.3.3" @@ -6685,16 +6585,6 @@ terser@^5.26.0: commander "^2.20.0" source-map-support "~0.5.20" -terser@5.16.6: - version "5.16.6" - resolved "https://registry.npmjs.org/terser/-/terser-5.16.6.tgz" - integrity sha512-IBZ+ZQIA9sMaXmRZCUMDjNH0D5AQQfdn4WUjHL0+1lF4TP1IHRJbrhb6fNaXWikrYQTSkb7SLxkeXAiy1p7mbg== - dependencies: - "@jridgewell/source-map" "^0.3.2" - acorn "^8.5.0" - commander "^2.20.0" - source-map-support "~0.5.20" - test-exclude@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" @@ -6785,12 +6675,7 @@ tslib@^1.13.0, tslib@^1.8.1: resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.1: - version "2.6.3" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz" - integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== - -tslib@^2.1.0: +tslib@^2.0.1, tslib@^2.1.0: version "2.6.3" resolved "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz" integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== @@ -6864,7 +6749,7 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -"typescript@>=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev", typescript@>=4.9.5, typescript@5.0.2: +typescript@5.0.2: version "5.0.2" resolved "https://registry.npmjs.org/typescript/-/typescript-5.0.2.tgz" integrity sha512-wVORMBGO/FAs/++blGNeAVdbNKtIh1rbBL2EyQ1+J9lClJ93KiiKe8PmFIVdXhHcyv44SL9oglmfeSsndo0jRw== @@ -7009,7 +6894,7 @@ walker@^1.0.7, walker@^1.0.8: watchpack@^2.4.1: version "2.4.2" - resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.2.tgz#2feeaed67412e7c33184e5a79ca738fbd38564da" integrity sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw== dependencies: glob-to-regexp "^0.4.1" @@ -7036,7 +6921,7 @@ webpack-bundle-analyzer@4.8.0: sirv "^1.0.7" ws "^7.3.1" -webpack-cli@5.0.1, webpack-cli@5.x.x: +webpack-cli@5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz" integrity sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A== @@ -7068,9 +6953,9 @@ webpack-sources@^3.2.3: resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@^5.0.0, webpack@^5.1.0, webpack@5.94.0, webpack@5.x.x: +webpack@5.94.0: version "5.94.0" - resolved "https://registry.npmjs.org/webpack/-/webpack-5.94.0.tgz" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.94.0.tgz#77a6089c716e7ab90c1c67574a28da518a20970f" integrity sha512-KcsGn50VT+06JH/iunZJedYGUJS5FGjow8wb9c0v5n1Om8O1g4L6LjtfxwlXIATopoQu+vOXXa7gYisWxCoPyg== dependencies: "@types/estree" "^1.0.5" @@ -7215,12 +7100,7 @@ ws@^7.3.1: resolved "https://registry.npmjs.org/ws/-/ws-7.5.10.tgz" integrity sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ== -ws@^8.11.0: - version "8.18.0" - resolved "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz" - integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== - -ws@^8.17.1: +ws@^8.11.0, ws@^8.17.1: version "8.18.0" resolved "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz" integrity sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw== @@ -7273,6 +7153,19 @@ yargs-parser@^21.1.1: resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== +yargs@17.7.2, yargs@^17.3.1: + version "17.7.2" + resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== + dependencies: + cliui "^8.0.1" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.3" + y18n "^5.0.5" + yargs-parser "^21.1.1" + yargs@^15.0.2: version "15.4.1" resolved "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz" @@ -7290,32 +7183,6 @@ yargs@^15.0.2: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^17.3.1: - version "17.7.2" - resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz" - integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - -yargs@17.7.2: - version "17.7.2" - resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz" - integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - yauzl@^2.10.0: version "2.10.0" resolved "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz"