{ "version": 3, "sources": ["angular:script/global:scripts.js"], "sourcesContent": ["/*!\n * ApexCharts v3.54.1\n * (c) 2018-2024 ApexCharts\n * Released under the MIT License.\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ApexCharts = factory());\n})(this, (function () { 'use strict';\n\n function _arrayLikeToArray(r, a) {\n (null == a || a > r.length) && (a = r.length);\n for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];\n return n;\n }\n function _arrayWithHoles(r) {\n if (Array.isArray(r)) return r;\n }\n function _arrayWithoutHoles(r) {\n if (Array.isArray(r)) return _arrayLikeToArray(r);\n }\n function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n }\n function _classCallCheck(a, n) {\n if (!(a instanceof n)) throw new TypeError(\"Cannot call a class as a function\");\n }\n function _defineProperties(e, r) {\n for (var t = 0; t < r.length; t++) {\n var o = r[t];\n o.enumerable = o.enumerable || !1, o.configurable = !0, \"value\" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o);\n }\n }\n function _createClass(e, r, t) {\n return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, \"prototype\", {\n writable: !1\n }), e;\n }\n function _createForOfIteratorHelper(r, e) {\n var t = \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (!t) {\n if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && \"number\" == typeof r.length) {\n t && (r = t);\n var n = 0,\n F = function () {};\n return {\n s: F,\n n: function () {\n return n >= r.length ? {\n done: !0\n } : {\n done: !1,\n value: r[n++]\n };\n },\n e: function (r) {\n throw r;\n },\n f: F\n };\n }\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.\");\n }\n var o,\n a = !0,\n u = !1;\n return {\n s: function () {\n t = t.call(r);\n },\n n: function () {\n var r = t.next();\n return a = r.done, r;\n },\n e: function (r) {\n u = !0, o = r;\n },\n f: function () {\n try {\n a || null == t.return || t.return();\n } finally {\n if (u) throw o;\n }\n }\n };\n }\n function _createSuper(t) {\n var r = _isNativeReflectConstruct();\n return function () {\n var e,\n o = _getPrototypeOf(t);\n if (r) {\n var s = _getPrototypeOf(this).constructor;\n e = Reflect.construct(o, arguments, s);\n } else e = o.apply(this, arguments);\n return _possibleConstructorReturn(this, e);\n };\n }\n function _defineProperty(e, r, t) {\n return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n }\n function _getPrototypeOf(t) {\n return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) {\n return t.__proto__ || Object.getPrototypeOf(t);\n }, _getPrototypeOf(t);\n }\n function _inherits(t, e) {\n if (\"function\" != typeof e && null !== e) throw new TypeError(\"Super expression must either be null or a function\");\n t.prototype = Object.create(e && e.prototype, {\n constructor: {\n value: t,\n writable: !0,\n configurable: !0\n }\n }), Object.defineProperty(t, \"prototype\", {\n writable: !1\n }), e && _setPrototypeOf(t, e);\n }\n function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function () {\n return !!t;\n })();\n }\n function _iterableToArray(r) {\n if (\"undefined\" != typeof Symbol && null != r[Symbol.iterator] || null != r[\"@@iterator\"]) return Array.from(r);\n }\n function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n }\n function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n function ownKeys(e, r) {\n var t = Object.keys(e);\n if (Object.getOwnPropertySymbols) {\n var o = Object.getOwnPropertySymbols(e);\n r && (o = o.filter(function (r) {\n return Object.getOwnPropertyDescriptor(e, r).enumerable;\n })), t.push.apply(t, o);\n }\n return t;\n }\n function _objectSpread2(e) {\n for (var r = 1; r < arguments.length; r++) {\n var t = null != arguments[r] ? arguments[r] : {};\n r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {\n _defineProperty(e, r, t[r]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {\n Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));\n });\n }\n return e;\n }\n function _possibleConstructorReturn(t, e) {\n if (e && (\"object\" == typeof e || \"function\" == typeof e)) return e;\n if (void 0 !== e) throw new TypeError(\"Derived constructors may only return object or undefined\");\n return _assertThisInitialized(t);\n }\n function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n }\n function _slicedToArray(r, e) {\n return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();\n }\n function _toConsumableArray(r) {\n return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();\n }\n function _toPrimitive(t, r) {\n if (\"object\" != typeof t || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != typeof i) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n }\n function _toPropertyKey(t) {\n var i = _toPrimitive(t, \"string\");\n return \"symbol\" == typeof i ? i : i + \"\";\n }\n function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n }\n function _unsupportedIterableToArray(r, a) {\n if (r) {\n if (\"string\" == typeof r) return _arrayLikeToArray(r, a);\n var t = {}.toString.call(r).slice(8, -1);\n return \"Object\" === t && r.constructor && (t = r.constructor.name), \"Map\" === t || \"Set\" === t ? Array.from(r) : \"Arguments\" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;\n }\n }\n\n /*\n ** Generic functions which are not dependent on ApexCharts\n */\n var Utils$1 = /*#__PURE__*/function () {\n function Utils() {\n _classCallCheck(this, Utils);\n }\n _createClass(Utils, [{\n key: \"shadeRGBColor\",\n value: function shadeRGBColor(percent, color) {\n var f = color.split(','),\n t = percent < 0 ? 0 : 255,\n p = percent < 0 ? percent * -1 : percent,\n R = parseInt(f[0].slice(4), 10),\n G = parseInt(f[1], 10),\n B = parseInt(f[2], 10);\n return 'rgb(' + (Math.round((t - R) * p) + R) + ',' + (Math.round((t - G) * p) + G) + ',' + (Math.round((t - B) * p) + B) + ')';\n }\n }, {\n key: \"shadeHexColor\",\n value: function shadeHexColor(percent, color) {\n var f = parseInt(color.slice(1), 16),\n t = percent < 0 ? 0 : 255,\n p = percent < 0 ? percent * -1 : percent,\n R = f >> 16,\n G = f >> 8 & 0x00ff,\n B = f & 0x0000ff;\n return '#' + (0x1000000 + (Math.round((t - R) * p) + R) * 0x10000 + (Math.round((t - G) * p) + G) * 0x100 + (Math.round((t - B) * p) + B)).toString(16).slice(1);\n }\n\n // beautiful color shading blending code\n // http://stackoverflow.com/questions/5560248/programmatically-lighten-or-darken-a-hex-color-or-rgb-and-blend-colors\n }, {\n key: \"shadeColor\",\n value: function shadeColor(p, color) {\n if (Utils.isColorHex(color)) {\n return this.shadeHexColor(p, color);\n } else {\n return this.shadeRGBColor(p, color);\n }\n }\n }], [{\n key: \"bind\",\n value: function bind(fn, me) {\n return function () {\n return fn.apply(me, arguments);\n };\n }\n }, {\n key: \"isObject\",\n value: function isObject(item) {\n return item && _typeof(item) === 'object' && !Array.isArray(item) && item != null;\n }\n\n // Type checking that works across different window objects\n }, {\n key: \"is\",\n value: function is(type, val) {\n return Object.prototype.toString.call(val) === '[object ' + type + ']';\n }\n }, {\n key: \"listToArray\",\n value: function listToArray(list) {\n var i,\n array = [];\n for (i = 0; i < list.length; i++) {\n array[i] = list[i];\n }\n return array;\n }\n\n // to extend defaults with user options\n // credit: http://stackoverflow.com/questions/27936772/deep-object-merging-in-es6-es7#answer-34749873\n }, {\n key: \"extend\",\n value: function extend(target, source) {\n var _this = this;\n if (typeof Object.assign !== 'function') {\n (function () {\n Object.assign = function (target) {\n\n // We must check against these specific cases.\n if (target === undefined || target === null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n var output = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var _source = arguments[index];\n if (_source !== undefined && _source !== null) {\n for (var nextKey in _source) {\n if (_source.hasOwnProperty(nextKey)) {\n output[nextKey] = _source[nextKey];\n }\n }\n }\n }\n return output;\n };\n })();\n }\n var output = Object.assign({}, target);\n if (this.isObject(target) && this.isObject(source)) {\n Object.keys(source).forEach(function (key) {\n if (_this.isObject(source[key])) {\n if (!(key in target)) {\n Object.assign(output, _defineProperty({}, key, source[key]));\n } else {\n output[key] = _this.extend(target[key], source[key]);\n }\n } else {\n Object.assign(output, _defineProperty({}, key, source[key]));\n }\n });\n }\n return output;\n }\n }, {\n key: \"extendArray\",\n value: function extendArray(arrToExtend, resultArr) {\n var extendedArr = [];\n arrToExtend.map(function (item) {\n extendedArr.push(Utils.extend(resultArr, item));\n });\n arrToExtend = extendedArr;\n return arrToExtend;\n }\n\n // If month counter exceeds 12, it starts again from 1\n }, {\n key: \"monthMod\",\n value: function monthMod(month) {\n return month % 12;\n }\n }, {\n key: \"clone\",\n value: function clone(source) {\n if (Utils.is('Array', source)) {\n var cloneResult = [];\n for (var i = 0; i < source.length; i++) {\n cloneResult[i] = this.clone(source[i]);\n }\n return cloneResult;\n } else if (Utils.is('Null', source)) {\n // fixes an issue where null values were converted to {}\n return null;\n } else if (Utils.is('Date', source)) {\n return source;\n } else if (_typeof(source) === 'object') {\n var _cloneResult = {};\n for (var prop in source) {\n if (source.hasOwnProperty(prop)) {\n _cloneResult[prop] = this.clone(source[prop]);\n }\n }\n return _cloneResult;\n } else {\n return source;\n }\n }\n }, {\n key: \"log10\",\n value: function log10(x) {\n return Math.log(x) / Math.LN10;\n }\n }, {\n key: \"roundToBase10\",\n value: function roundToBase10(x) {\n return Math.pow(10, Math.floor(Math.log10(x)));\n }\n }, {\n key: \"roundToBase\",\n value: function roundToBase(x, base) {\n return Math.pow(base, Math.floor(Math.log(x) / Math.log(base)));\n }\n }, {\n key: \"parseNumber\",\n value: function parseNumber(val) {\n if (val === null) return val;\n return parseFloat(val);\n }\n }, {\n key: \"stripNumber\",\n value: function stripNumber(num) {\n var precision = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;\n return Number.isInteger(num) ? num : parseFloat(num.toPrecision(precision));\n }\n }, {\n key: \"randomId\",\n value: function randomId() {\n return (Math.random() + 1).toString(36).substring(4);\n }\n }, {\n key: \"noExponents\",\n value: function noExponents(val) {\n var data = String(val).split(/[eE]/);\n if (data.length === 1) return data[0];\n var z = '',\n sign = val < 0 ? '-' : '',\n str = data[0].replace('.', ''),\n mag = Number(data[1]) + 1;\n if (mag < 0) {\n z = sign + '0.';\n while (mag++) {\n z += '0';\n }\n return z + str.replace(/^-/, '');\n }\n mag -= str.length;\n while (mag--) {\n z += '0';\n }\n return str + z;\n }\n }, {\n key: \"getDimensions\",\n value: function getDimensions(el) {\n var computedStyle = getComputedStyle(el, null);\n var elementHeight = el.clientHeight;\n var elementWidth = el.clientWidth;\n elementHeight -= parseFloat(computedStyle.paddingTop) + parseFloat(computedStyle.paddingBottom);\n elementWidth -= parseFloat(computedStyle.paddingLeft) + parseFloat(computedStyle.paddingRight);\n return [elementWidth, elementHeight];\n }\n }, {\n key: \"getBoundingClientRect\",\n value: function getBoundingClientRect(element) {\n var rect = element.getBoundingClientRect();\n return {\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n width: element.clientWidth,\n height: element.clientHeight,\n x: rect.left,\n y: rect.top\n };\n }\n }, {\n key: \"getLargestStringFromArr\",\n value: function getLargestStringFromArr(arr) {\n return arr.reduce(function (a, b) {\n if (Array.isArray(b)) {\n b = b.reduce(function (aa, bb) {\n return aa.length > bb.length ? aa : bb;\n });\n }\n return a.length > b.length ? a : b;\n }, 0);\n }\n\n // http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb#answer-12342275\n }, {\n key: \"hexToRgba\",\n value: function hexToRgba() {\n var hex = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '#999999';\n var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.6;\n if (hex.substring(0, 1) !== '#') {\n hex = '#999999';\n }\n var h = hex.replace('#', '');\n h = h.match(new RegExp('(.{' + h.length / 3 + '})', 'g'));\n for (var i = 0; i < h.length; i++) {\n h[i] = parseInt(h[i].length === 1 ? h[i] + h[i] : h[i], 16);\n }\n if (typeof opacity !== 'undefined') h.push(opacity);\n return 'rgba(' + h.join(',') + ')';\n }\n }, {\n key: \"getOpacityFromRGBA\",\n value: function getOpacityFromRGBA(rgba) {\n return parseFloat(rgba.replace(/^.*,(.+)\\)/, '$1'));\n }\n }, {\n key: \"rgb2hex\",\n value: function rgb2hex(rgb) {\n rgb = rgb.match(/^rgba?[\\s+]?\\([\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?,[\\s+]?(\\d+)[\\s+]?/i);\n return rgb && rgb.length === 4 ? '#' + ('0' + parseInt(rgb[1], 10).toString(16)).slice(-2) + ('0' + parseInt(rgb[2], 10).toString(16)).slice(-2) + ('0' + parseInt(rgb[3], 10).toString(16)).slice(-2) : '';\n }\n }, {\n key: \"isColorHex\",\n value: function isColorHex(color) {\n return /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(color);\n }\n }, {\n key: \"getPolygonPos\",\n value: function getPolygonPos(size, dataPointsLen) {\n var dotsArray = [];\n var angle = Math.PI * 2 / dataPointsLen;\n for (var i = 0; i < dataPointsLen; i++) {\n var curPos = {};\n curPos.x = size * Math.sin(i * angle);\n curPos.y = -size * Math.cos(i * angle);\n dotsArray.push(curPos);\n }\n return dotsArray;\n }\n }, {\n key: \"polarToCartesian\",\n value: function polarToCartesian(centerX, centerY, radius, angleInDegrees) {\n var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;\n return {\n x: centerX + radius * Math.cos(angleInRadians),\n y: centerY + radius * Math.sin(angleInRadians)\n };\n }\n }, {\n key: \"escapeString\",\n value: function escapeString(str) {\n var escapeWith = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'x';\n var newStr = str.toString().slice();\n newStr = newStr.replace(/[` ~!@#$%^&*()|+\\=?;:'\",.<>{}[\\]\\\\/]/gi, escapeWith);\n return newStr;\n }\n }, {\n key: \"negToZero\",\n value: function negToZero(val) {\n return val < 0 ? 0 : val;\n }\n }, {\n key: \"moveIndexInArray\",\n value: function moveIndexInArray(arr, old_index, new_index) {\n if (new_index >= arr.length) {\n var k = new_index - arr.length + 1;\n while (k--) {\n arr.push(undefined);\n }\n }\n arr.splice(new_index, 0, arr.splice(old_index, 1)[0]);\n return arr;\n }\n }, {\n key: \"extractNumber\",\n value: function extractNumber(s) {\n return parseFloat(s.replace(/[^\\d.]*/g, ''));\n }\n }, {\n key: \"findAncestor\",\n value: function findAncestor(el, cls) {\n while ((el = el.parentElement) && !el.classList.contains(cls)) {\n }\n return el;\n }\n }, {\n key: \"setELstyles\",\n value: function setELstyles(el, styles) {\n for (var key in styles) {\n if (styles.hasOwnProperty(key)) {\n el.style.key = styles[key];\n }\n }\n }\n // prevents JS prevision errors when adding\n }, {\n key: \"preciseAddition\",\n value: function preciseAddition(a, b) {\n var aDecimals = (String(a).split('.')[1] || '').length;\n var bDecimals = (String(b).split('.')[1] || '').length;\n var factor = Math.pow(10, Math.max(aDecimals, bDecimals));\n return (Math.round(a * factor) + Math.round(b * factor)) / factor;\n }\n }, {\n key: \"isNumber\",\n value: function isNumber(value) {\n return !isNaN(value) && parseFloat(Number(value)) === value && !isNaN(parseInt(value, 10));\n }\n }, {\n key: \"isFloat\",\n value: function isFloat(n) {\n return Number(n) === n && n % 1 !== 0;\n }\n }, {\n key: \"isSafari\",\n value: function isSafari() {\n return /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n }\n }, {\n key: \"isFirefox\",\n value: function isFirefox() {\n return navigator.userAgent.toLowerCase().indexOf('firefox') > -1;\n }\n }, {\n key: \"isMsEdge\",\n value: function isMsEdge() {\n var ua = window.navigator.userAgent;\n var edge = ua.indexOf('Edge/');\n if (edge > 0) {\n // Edge (IE 12+) => return version number\n return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10);\n }\n\n // other browser\n return false;\n }\n //\n // Find the Greatest Common Divisor of two numbers\n //\n }, {\n key: \"getGCD\",\n value: function getGCD(a, b) {\n var p = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 7;\n var big = Math.pow(10, p - Math.floor(Math.log10(Math.max(a, b))));\n a = Math.round(Math.abs(a) * big);\n b = Math.round(Math.abs(b) * big);\n while (b) {\n var t = b;\n b = a % b;\n a = t;\n }\n return a / big;\n }\n }, {\n key: \"getPrimeFactors\",\n value: function getPrimeFactors(n) {\n var factors = [];\n var divisor = 2;\n while (n >= 2) {\n if (n % divisor == 0) {\n factors.push(divisor);\n n = n / divisor;\n } else {\n divisor++;\n }\n }\n return factors;\n }\n }, {\n key: \"mod\",\n value: function mod(a, b) {\n var p = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 7;\n var big = Math.pow(10, p - Math.floor(Math.log10(Math.max(a, b))));\n a = Math.round(Math.abs(a) * big);\n b = Math.round(Math.abs(b) * big);\n return a % b / big;\n }\n }]);\n return Utils;\n }();\n\n /**\n * ApexCharts Animation Class.\n *\n * @module Animations\n **/\n var Animations = /*#__PURE__*/function () {\n function Animations(ctx) {\n _classCallCheck(this, Animations);\n this.ctx = ctx;\n this.w = ctx.w;\n this.setEasingFunctions();\n }\n _createClass(Animations, [{\n key: \"setEasingFunctions\",\n value: function setEasingFunctions() {\n var easing;\n if (this.w.globals.easing) return;\n var userDefinedEasing = this.w.config.chart.animations.easing;\n switch (userDefinedEasing) {\n case 'linear':\n {\n easing = '-';\n break;\n }\n case 'easein':\n {\n easing = '<';\n break;\n }\n case 'easeout':\n {\n easing = '>';\n break;\n }\n case 'easeinout':\n {\n easing = '<>';\n break;\n }\n case 'swing':\n {\n easing = function easing(pos) {\n var s = 1.70158;\n var ret = (pos -= 1) * pos * ((s + 1) * pos + s) + 1;\n return ret;\n };\n break;\n }\n case 'bounce':\n {\n easing = function easing(pos) {\n var ret = '';\n if (pos < 1 / 2.75) {\n ret = 7.5625 * pos * pos;\n } else if (pos < 2 / 2.75) {\n ret = 7.5625 * (pos -= 1.5 / 2.75) * pos + 0.75;\n } else if (pos < 2.5 / 2.75) {\n ret = 7.5625 * (pos -= 2.25 / 2.75) * pos + 0.9375;\n } else {\n ret = 7.5625 * (pos -= 2.625 / 2.75) * pos + 0.984375;\n }\n return ret;\n };\n break;\n }\n case 'elastic':\n {\n easing = function easing(pos) {\n if (pos === !!pos) return pos;\n return Math.pow(2, -10 * pos) * Math.sin((pos - 0.075) * (2 * Math.PI) / 0.3) + 1;\n };\n break;\n }\n default:\n {\n easing = '<>';\n }\n }\n this.w.globals.easing = easing;\n }\n }, {\n key: \"animateLine\",\n value: function animateLine(el, from, to, speed) {\n el.attr(from).animate(speed).attr(to);\n }\n\n /*\n ** Animate radius of a circle element\n */\n }, {\n key: \"animateMarker\",\n value: function animateMarker(el, speed, easing, cb) {\n el.attr({\n opacity: 0\n }).animate(speed, easing).attr({\n opacity: 1\n }).afterAll(function () {\n cb();\n });\n }\n\n /*\n ** Animate rect properties\n */\n }, {\n key: \"animateRect\",\n value: function animateRect(el, from, to, speed, fn) {\n el.attr(from).animate(speed).attr(to).afterAll(function () {\n return fn();\n });\n }\n }, {\n key: \"animatePathsGradually\",\n value: function animatePathsGradually(params) {\n var el = params.el,\n realIndex = params.realIndex,\n j = params.j,\n fill = params.fill,\n pathFrom = params.pathFrom,\n pathTo = params.pathTo,\n speed = params.speed,\n delay = params.delay;\n var me = this;\n var w = this.w;\n var delayFactor = 0;\n if (w.config.chart.animations.animateGradually.enabled) {\n delayFactor = w.config.chart.animations.animateGradually.delay;\n }\n if (w.config.chart.animations.dynamicAnimation.enabled && w.globals.dataChanged && w.config.chart.type !== 'bar') {\n // disabled due to this bug - https://github.com/apexcharts/vue-apexcharts/issues/75\n delayFactor = 0;\n }\n me.morphSVG(el, realIndex, j, w.config.chart.type === 'line' && !w.globals.comboCharts ? 'stroke' : fill, pathFrom, pathTo, speed, delay * delayFactor);\n }\n }, {\n key: \"showDelayedElements\",\n value: function showDelayedElements() {\n this.w.globals.delayedElements.forEach(function (d) {\n var ele = d.el;\n ele.classList.remove('apexcharts-element-hidden');\n ele.classList.add('apexcharts-hidden-element-shown');\n });\n }\n }, {\n key: \"animationCompleted\",\n value: function animationCompleted(el) {\n var w = this.w;\n if (w.globals.animationEnded) return;\n w.globals.animationEnded = true;\n this.showDelayedElements();\n if (typeof w.config.chart.events.animationEnd === 'function') {\n w.config.chart.events.animationEnd(this.ctx, {\n el: el,\n w: w\n });\n }\n }\n\n // SVG.js animation for morphing one path to another\n }, {\n key: \"morphSVG\",\n value: function morphSVG(el, realIndex, j, fill, pathFrom, pathTo, speed, delay) {\n var _this = this;\n var w = this.w;\n if (!pathFrom) {\n pathFrom = el.attr('pathFrom');\n }\n if (!pathTo) {\n pathTo = el.attr('pathTo');\n }\n var disableAnimationForCorrupPath = function disableAnimationForCorrupPath(path) {\n if (w.config.chart.type === 'radar') {\n // radar chart drops the path to bottom and hence a corrup path looks ugly\n // therefore, disable animation for such a case\n speed = 1;\n }\n return \"M 0 \".concat(w.globals.gridHeight);\n };\n if (!pathFrom || pathFrom.indexOf('undefined') > -1 || pathFrom.indexOf('NaN') > -1) {\n pathFrom = disableAnimationForCorrupPath();\n }\n if (!pathTo || pathTo.indexOf('undefined') > -1 || pathTo.indexOf('NaN') > -1) {\n pathTo = disableAnimationForCorrupPath();\n }\n if (!w.globals.shouldAnimate) {\n speed = 1;\n }\n el.plot(pathFrom).animate(1, w.globals.easing, delay).plot(pathFrom).animate(speed, w.globals.easing, delay).plot(pathTo).afterAll(function () {\n // a flag to indicate that the original mount function can return true now as animation finished here\n\n if (Utils$1.isNumber(j)) {\n if (j === w.globals.series[w.globals.maxValsInArrayIndex].length - 2 && w.globals.shouldAnimate) {\n _this.animationCompleted(el);\n }\n } else if (fill !== 'none' && w.globals.shouldAnimate) {\n if (!w.globals.comboCharts && realIndex === w.globals.series.length - 1 || w.globals.comboCharts) {\n _this.animationCompleted(el);\n }\n }\n _this.showDelayedElements();\n });\n }\n }]);\n return Animations;\n }();\n\n /**\n * ApexCharts Filters Class for setting hover/active states on the paths.\n *\n * @module Formatters\n **/\n var Filters = /*#__PURE__*/function () {\n function Filters(ctx) {\n _classCallCheck(this, Filters);\n this.ctx = ctx;\n this.w = ctx.w;\n }\n\n // create a re-usable filter which can be appended other filter effects and applied to multiple elements\n _createClass(Filters, [{\n key: \"getDefaultFilter\",\n value: function getDefaultFilter(el, i) {\n var w = this.w;\n el.unfilter(true);\n var filter = new window.SVG.Filter();\n filter.size('120%', '180%', '-5%', '-40%');\n if (w.config.states.normal.filter !== 'none') {\n this.applyFilter(el, i, w.config.states.normal.filter.type, w.config.states.normal.filter.value);\n } else {\n if (w.config.chart.dropShadow.enabled) {\n this.dropShadow(el, w.config.chart.dropShadow, i);\n }\n }\n }\n }, {\n key: \"addNormalFilter\",\n value: function addNormalFilter(el, i) {\n var w = this.w;\n\n // revert shadow if it was there\n // but, ignore marker as marker don't have dropshadow yet\n if (w.config.chart.dropShadow.enabled && !el.node.classList.contains('apexcharts-marker')) {\n this.dropShadow(el, w.config.chart.dropShadow, i);\n }\n }\n\n // appends dropShadow to the filter object which can be chained with other filter effects\n }, {\n key: \"addLightenFilter\",\n value: function addLightenFilter(el, i, attrs) {\n var _this = this;\n var w = this.w;\n var intensity = attrs.intensity;\n el.unfilter(true);\n var filter = new window.SVG.Filter();\n el.filter(function (add) {\n var shadowAttr = w.config.chart.dropShadow;\n if (shadowAttr.enabled) {\n filter = _this.addShadow(add, i, shadowAttr);\n } else {\n filter = add;\n }\n filter.componentTransfer({\n rgb: {\n type: 'linear',\n slope: 1.5,\n intercept: intensity\n }\n });\n });\n el.filterer.node.setAttribute('filterUnits', 'userSpaceOnUse');\n this._scaleFilterSize(el.filterer.node);\n }\n\n // appends dropShadow to the filter object which can be chained with other filter effects\n }, {\n key: \"addDarkenFilter\",\n value: function addDarkenFilter(el, i, attrs) {\n var _this2 = this;\n var w = this.w;\n var intensity = attrs.intensity;\n el.unfilter(true);\n var filter = new window.SVG.Filter();\n el.filter(function (add) {\n var shadowAttr = w.config.chart.dropShadow;\n if (shadowAttr.enabled) {\n filter = _this2.addShadow(add, i, shadowAttr);\n } else {\n filter = add;\n }\n filter.componentTransfer({\n rgb: {\n type: 'linear',\n slope: intensity\n }\n });\n });\n el.filterer.node.setAttribute('filterUnits', 'userSpaceOnUse');\n this._scaleFilterSize(el.filterer.node);\n }\n }, {\n key: \"applyFilter\",\n value: function applyFilter(el, i, filter) {\n var intensity = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0.5;\n switch (filter) {\n case 'none':\n {\n this.addNormalFilter(el, i);\n break;\n }\n case 'lighten':\n {\n this.addLightenFilter(el, i, {\n intensity: intensity\n });\n break;\n }\n case 'darken':\n {\n this.addDarkenFilter(el, i, {\n intensity: intensity\n });\n break;\n }\n }\n }\n\n // appends dropShadow to the filter object which can be chained with other filter effects\n }, {\n key: \"addShadow\",\n value: function addShadow(add, i, attrs) {\n var _w$config$chart$dropS;\n var w = this.w;\n var blur = attrs.blur,\n top = attrs.top,\n left = attrs.left,\n color = attrs.color,\n opacity = attrs.opacity;\n if (((_w$config$chart$dropS = w.config.chart.dropShadow.enabledOnSeries) === null || _w$config$chart$dropS === void 0 ? void 0 : _w$config$chart$dropS.length) > 0) {\n if (w.config.chart.dropShadow.enabledOnSeries.indexOf(i) === -1) {\n return add;\n }\n }\n var shadowBlur = add.flood(Array.isArray(color) ? color[i] : color, opacity).composite(add.sourceAlpha, 'in').offset(left, top).gaussianBlur(blur).merge(add.source);\n return add.blend(add.source, shadowBlur);\n }\n\n // directly adds dropShadow to the element and returns the same element.\n // the only way it is different from the addShadow() function is that addShadow is chainable to other filters, while this function discards all filters and add dropShadow\n }, {\n key: \"dropShadow\",\n value: function dropShadow(el, attrs) {\n var _w$config$chart$dropS2;\n var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var top = attrs.top,\n left = attrs.left,\n blur = attrs.blur,\n color = attrs.color,\n opacity = attrs.opacity,\n noUserSpaceOnUse = attrs.noUserSpaceOnUse;\n var w = this.w;\n el.unfilter(true);\n if (Utils$1.isMsEdge() && w.config.chart.type === 'radialBar') {\n // in radialbar charts, dropshadow is clipping actual drawing in IE\n return el;\n }\n if (((_w$config$chart$dropS2 = w.config.chart.dropShadow.enabledOnSeries) === null || _w$config$chart$dropS2 === void 0 ? void 0 : _w$config$chart$dropS2.length) > 0) {\n var _w$config$chart$dropS3;\n if (((_w$config$chart$dropS3 = w.config.chart.dropShadow.enabledOnSeries) === null || _w$config$chart$dropS3 === void 0 ? void 0 : _w$config$chart$dropS3.indexOf(i)) === -1) {\n return el;\n }\n }\n color = Array.isArray(color) ? color[i] : color;\n el.filter(function (add) {\n var shadowBlur = null;\n if (Utils$1.isSafari() || Utils$1.isFirefox() || Utils$1.isMsEdge()) {\n // safari/firefox/IE have some alternative way to use this filter\n shadowBlur = add.flood(color, opacity).composite(add.sourceAlpha, 'in').offset(left, top).gaussianBlur(blur);\n } else {\n shadowBlur = add.flood(color, opacity).composite(add.sourceAlpha, 'in').offset(left, top).gaussianBlur(blur).merge(add.source);\n }\n add.blend(add.source, shadowBlur);\n });\n if (!noUserSpaceOnUse) {\n el.filterer.node.setAttribute('filterUnits', 'userSpaceOnUse');\n }\n this._scaleFilterSize(el.filterer.node);\n return el;\n }\n }, {\n key: \"setSelectionFilter\",\n value: function setSelectionFilter(el, realIndex, dataPointIndex) {\n var w = this.w;\n if (typeof w.globals.selectedDataPoints[realIndex] !== 'undefined') {\n if (w.globals.selectedDataPoints[realIndex].indexOf(dataPointIndex) > -1) {\n el.node.setAttribute('selected', true);\n var activeFilter = w.config.states.active.filter;\n if (activeFilter !== 'none') {\n this.applyFilter(el, realIndex, activeFilter.type, activeFilter.value);\n }\n }\n }\n }\n }, {\n key: \"_scaleFilterSize\",\n value: function _scaleFilterSize(el) {\n var setAttributes = function setAttributes(attrs) {\n for (var key in attrs) {\n if (attrs.hasOwnProperty(key)) {\n el.setAttribute(key, attrs[key]);\n }\n }\n };\n setAttributes({\n width: '200%',\n height: '200%',\n x: '-50%',\n y: '-50%'\n });\n }\n }]);\n return Filters;\n }();\n\n /**\n * ApexCharts Graphics Class for all drawing operations.\n *\n * @module Graphics\n **/\n var Graphics = /*#__PURE__*/function () {\n function Graphics(ctx) {\n _classCallCheck(this, Graphics);\n this.ctx = ctx;\n this.w = ctx.w;\n }\n\n /*****************************************************************************\n * *\n * SVG Path Rounding Function *\n * Copyright (C) 2014 Yona Appletree *\n * *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); *\n * you may not use this file except in compliance with the License. *\n * You may obtain a copy of the License at *\n * *\n * http://www.apache.org/licenses/LICENSE-2.0 *\n * *\n * Unless required by applicable law or agreed to in writing, software *\n * distributed under the License is distributed on an \"AS IS\" BASIS, *\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *\n * See the License for the specific language governing permissions and *\n * limitations under the License. *\n * *\n *****************************************************************************/\n\n /**\n * SVG Path rounding function. Takes an input path string and outputs a path\n * string where all line-line corners have been rounded. Only supports absolute\n * commands at the moment.\n *\n * @param pathString The SVG input path\n * @param radius The amount to round the corners, either a value in the SVG\n * coordinate space, or, if useFractionalRadius is true, a value\n * from 0 to 1.\n * @returns A new SVG path string with the rounding\n */\n _createClass(Graphics, [{\n key: \"roundPathCorners\",\n value: function roundPathCorners(pathString, radius) {\n if (pathString.indexOf('NaN') > -1) pathString = '';\n function moveTowardsLength(movingPoint, targetPoint, amount) {\n var width = targetPoint.x - movingPoint.x;\n var height = targetPoint.y - movingPoint.y;\n var distance = Math.sqrt(width * width + height * height);\n return moveTowardsFractional(movingPoint, targetPoint, Math.min(1, amount / distance));\n }\n function moveTowardsFractional(movingPoint, targetPoint, fraction) {\n return {\n x: movingPoint.x + (targetPoint.x - movingPoint.x) * fraction,\n y: movingPoint.y + (targetPoint.y - movingPoint.y) * fraction\n };\n }\n\n // Adjusts the ending position of a command\n function adjustCommand(cmd, newPoint) {\n if (cmd.length > 2) {\n cmd[cmd.length - 2] = newPoint.x;\n cmd[cmd.length - 1] = newPoint.y;\n }\n }\n\n // Gives an {x, y} object for a command's ending position\n function pointForCommand(cmd) {\n return {\n x: parseFloat(cmd[cmd.length - 2]),\n y: parseFloat(cmd[cmd.length - 1])\n };\n }\n\n // Split apart the path, handing concatonated letters and numbers\n var pathParts = pathString.split(/[,\\s]/).reduce(function (parts, part) {\n var match = part.match('([a-zA-Z])(.+)');\n if (match) {\n parts.push(match[1]);\n parts.push(match[2]);\n } else {\n parts.push(part);\n }\n return parts;\n }, []);\n\n // Group the commands with their arguments for easier handling\n var commands = pathParts.reduce(function (commands, part) {\n if (parseFloat(part) == part && commands.length) {\n commands[commands.length - 1].push(part);\n } else {\n commands.push([part]);\n }\n return commands;\n }, []);\n\n // The resulting commands, also grouped\n var resultCommands = [];\n if (commands.length > 1) {\n var startPoint = pointForCommand(commands[0]);\n\n // Handle the close path case with a \"virtual\" closing line\n var virtualCloseLine = null;\n if (commands[commands.length - 1][0] == 'Z' && commands[0].length > 2) {\n virtualCloseLine = ['L', startPoint.x, startPoint.y];\n commands[commands.length - 1] = virtualCloseLine;\n }\n\n // We always use the first command (but it may be mutated)\n resultCommands.push(commands[0]);\n for (var cmdIndex = 1; cmdIndex < commands.length; cmdIndex++) {\n var prevCmd = resultCommands[resultCommands.length - 1];\n var curCmd = commands[cmdIndex];\n\n // Handle closing case\n var nextCmd = curCmd == virtualCloseLine ? commands[1] : commands[cmdIndex + 1];\n\n // Nasty logic to decide if this path is a candidite.\n if (nextCmd && prevCmd && prevCmd.length > 2 && curCmd[0] == 'L' && nextCmd.length > 2 && nextCmd[0] == 'L') {\n // Calc the points we're dealing with\n var prevPoint = pointForCommand(prevCmd);\n var curPoint = pointForCommand(curCmd);\n var nextPoint = pointForCommand(nextCmd);\n\n // The start and end of the cuve are just our point moved towards the previous and next points, respectivly\n var curveStart, curveEnd;\n curveStart = moveTowardsLength(curPoint, prevPoint, radius);\n curveEnd = moveTowardsLength(curPoint, nextPoint, radius);\n\n // Adjust the current command and add it\n adjustCommand(curCmd, curveStart);\n curCmd.origPoint = curPoint;\n resultCommands.push(curCmd);\n\n // The curve control points are halfway between the start/end of the curve and\n // the original point\n var startControl = moveTowardsFractional(curveStart, curPoint, 0.5);\n var endControl = moveTowardsFractional(curPoint, curveEnd, 0.5);\n\n // Create the curve\n var curveCmd = ['C', startControl.x, startControl.y, endControl.x, endControl.y, curveEnd.x, curveEnd.y];\n // Save the original point for fractional calculations\n curveCmd.origPoint = curPoint;\n resultCommands.push(curveCmd);\n } else {\n // Pass through commands that don't qualify\n resultCommands.push(curCmd);\n }\n }\n\n // Fix up the starting point and restore the close path if the path was orignally closed\n if (virtualCloseLine) {\n var newStartPoint = pointForCommand(resultCommands[resultCommands.length - 1]);\n resultCommands.push(['Z']);\n adjustCommand(resultCommands[0], newStartPoint);\n }\n } else {\n resultCommands = commands;\n }\n return resultCommands.reduce(function (str, c) {\n return str + c.join(' ') + ' ';\n }, '');\n }\n }, {\n key: \"drawLine\",\n value: function drawLine(x1, y1, x2, y2) {\n var lineColor = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : '#a8a8a8';\n var dashArray = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 0;\n var strokeWidth = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;\n var strokeLineCap = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 'butt';\n var w = this.w;\n var line = w.globals.dom.Paper.line().attr({\n x1: x1,\n y1: y1,\n x2: x2,\n y2: y2,\n stroke: lineColor,\n 'stroke-dasharray': dashArray,\n 'stroke-width': strokeWidth,\n 'stroke-linecap': strokeLineCap\n });\n return line;\n }\n }, {\n key: \"drawRect\",\n value: function drawRect() {\n var x1 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var y1 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var x2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var y2 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var radius = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n var color = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : '#fefefe';\n var opacity = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 1;\n var strokeWidth = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;\n var strokeColor = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : null;\n var strokeDashArray = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 0;\n var w = this.w;\n var rect = w.globals.dom.Paper.rect();\n rect.attr({\n x: x1,\n y: y1,\n width: x2 > 0 ? x2 : 0,\n height: y2 > 0 ? y2 : 0,\n rx: radius,\n ry: radius,\n opacity: opacity,\n 'stroke-width': strokeWidth !== null ? strokeWidth : 0,\n stroke: strokeColor !== null ? strokeColor : 'none',\n 'stroke-dasharray': strokeDashArray\n });\n\n // fix apexcharts.js#1410\n rect.node.setAttribute('fill', color);\n return rect;\n }\n }, {\n key: \"drawPolygon\",\n value: function drawPolygon(polygonString) {\n var stroke = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '#e1e1e1';\n var strokeWidth = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var fill = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'none';\n var w = this.w;\n var polygon = w.globals.dom.Paper.polygon(polygonString).attr({\n fill: fill,\n stroke: stroke,\n 'stroke-width': strokeWidth\n });\n return polygon;\n }\n }, {\n key: \"drawCircle\",\n value: function drawCircle(radius) {\n var attrs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var w = this.w;\n if (radius < 0) radius = 0;\n var c = w.globals.dom.Paper.circle(radius * 2);\n if (attrs !== null) {\n c.attr(attrs);\n }\n return c;\n }\n }, {\n key: \"drawPath\",\n value: function drawPath(_ref) {\n var _ref$d = _ref.d,\n d = _ref$d === void 0 ? '' : _ref$d,\n _ref$stroke = _ref.stroke,\n stroke = _ref$stroke === void 0 ? '#a8a8a8' : _ref$stroke,\n _ref$strokeWidth = _ref.strokeWidth,\n strokeWidth = _ref$strokeWidth === void 0 ? 1 : _ref$strokeWidth,\n fill = _ref.fill,\n _ref$fillOpacity = _ref.fillOpacity,\n fillOpacity = _ref$fillOpacity === void 0 ? 1 : _ref$fillOpacity,\n _ref$strokeOpacity = _ref.strokeOpacity,\n strokeOpacity = _ref$strokeOpacity === void 0 ? 1 : _ref$strokeOpacity,\n classes = _ref.classes,\n _ref$strokeLinecap = _ref.strokeLinecap,\n strokeLinecap = _ref$strokeLinecap === void 0 ? null : _ref$strokeLinecap,\n _ref$strokeDashArray = _ref.strokeDashArray,\n strokeDashArray = _ref$strokeDashArray === void 0 ? 0 : _ref$strokeDashArray;\n var w = this.w;\n if (strokeLinecap === null) {\n strokeLinecap = w.config.stroke.lineCap;\n }\n if (d.indexOf('undefined') > -1 || d.indexOf('NaN') > -1) {\n d = \"M 0 \".concat(w.globals.gridHeight);\n }\n var p = w.globals.dom.Paper.path(d).attr({\n fill: fill,\n 'fill-opacity': fillOpacity,\n stroke: stroke,\n 'stroke-opacity': strokeOpacity,\n 'stroke-linecap': strokeLinecap,\n 'stroke-width': strokeWidth,\n 'stroke-dasharray': strokeDashArray,\n class: classes\n });\n return p;\n }\n }, {\n key: \"group\",\n value: function group() {\n var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var w = this.w;\n var g = w.globals.dom.Paper.group();\n if (attrs !== null) {\n g.attr(attrs);\n }\n return g;\n }\n }, {\n key: \"move\",\n value: function move(x, y) {\n var move = ['M', x, y].join(' ');\n return move;\n }\n }, {\n key: \"line\",\n value: function line(x, y) {\n var hORv = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var line = null;\n if (hORv === null) {\n line = [' L', x, y].join(' ');\n } else if (hORv === 'H') {\n line = [' H', x].join(' ');\n } else if (hORv === 'V') {\n line = [' V', y].join(' ');\n }\n return line;\n }\n }, {\n key: \"curve\",\n value: function curve(x1, y1, x2, y2, x, y) {\n var curve = ['C', x1, y1, x2, y2, x, y].join(' ');\n return curve;\n }\n }, {\n key: \"quadraticCurve\",\n value: function quadraticCurve(x1, y1, x, y) {\n var curve = ['Q', x1, y1, x, y].join(' ');\n return curve;\n }\n }, {\n key: \"arc\",\n value: function arc(rx, ry, axisRotation, largeArcFlag, sweepFlag, x, y) {\n var relative = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : false;\n var coord = 'A';\n if (relative) coord = 'a';\n var arc = [coord, rx, ry, axisRotation, largeArcFlag, sweepFlag, x, y].join(' ');\n return arc;\n }\n\n /**\n * @memberof Graphics\n * @param {object}\n * i = series's index\n * realIndex = realIndex is series's actual index when it was drawn time. After several redraws, the iterating \"i\" may change in loops, but realIndex doesn't\n * pathFrom = existing pathFrom to animateTo\n * pathTo = new Path to which d attr will be animated from pathFrom to pathTo\n * stroke = line Color\n * strokeWidth = width of path Line\n * fill = it can be gradient, single color, pattern or image\n * animationDelay = how much to delay when starting animation (in milliseconds)\n * dataChangeSpeed = for dynamic animations, when data changes\n * className = class attribute to add\n * @return {object} svg.js path object\n **/\n }, {\n key: \"renderPaths\",\n value: function renderPaths(_ref2) {\n var j = _ref2.j,\n realIndex = _ref2.realIndex,\n pathFrom = _ref2.pathFrom,\n pathTo = _ref2.pathTo,\n stroke = _ref2.stroke,\n strokeWidth = _ref2.strokeWidth,\n strokeLinecap = _ref2.strokeLinecap,\n fill = _ref2.fill,\n animationDelay = _ref2.animationDelay,\n initialSpeed = _ref2.initialSpeed,\n dataChangeSpeed = _ref2.dataChangeSpeed,\n className = _ref2.className,\n chartType = _ref2.chartType,\n _ref2$shouldClipToGri = _ref2.shouldClipToGrid,\n shouldClipToGrid = _ref2$shouldClipToGri === void 0 ? true : _ref2$shouldClipToGri,\n _ref2$bindEventsOnPat = _ref2.bindEventsOnPaths,\n bindEventsOnPaths = _ref2$bindEventsOnPat === void 0 ? true : _ref2$bindEventsOnPat,\n _ref2$drawShadow = _ref2.drawShadow,\n drawShadow = _ref2$drawShadow === void 0 ? true : _ref2$drawShadow;\n var w = this.w;\n var filters = new Filters(this.ctx);\n var anim = new Animations(this.ctx);\n var initialAnim = this.w.config.chart.animations.enabled;\n var dynamicAnim = initialAnim && this.w.config.chart.animations.dynamicAnimation.enabled;\n var d;\n var shouldAnimate = !!(initialAnim && !w.globals.resized || dynamicAnim && w.globals.dataChanged && w.globals.shouldAnimate);\n if (shouldAnimate) {\n d = pathFrom;\n } else {\n d = pathTo;\n w.globals.animationEnded = true;\n }\n var strokeDashArrayOpt = w.config.stroke.dashArray;\n var strokeDashArray = 0;\n if (Array.isArray(strokeDashArrayOpt)) {\n strokeDashArray = strokeDashArrayOpt[realIndex];\n } else {\n strokeDashArray = w.config.stroke.dashArray;\n }\n var el = this.drawPath({\n d: d,\n stroke: stroke,\n strokeWidth: strokeWidth,\n fill: fill,\n fillOpacity: 1,\n classes: className,\n strokeLinecap: strokeLinecap,\n strokeDashArray: strokeDashArray\n });\n el.attr('index', realIndex);\n if (shouldClipToGrid) {\n if (chartType === 'bar' && !w.globals.isHorizontal || w.globals.comboCharts) {\n el.attr({\n 'clip-path': \"url(#gridRectBarMask\".concat(w.globals.cuid, \")\")\n });\n } else {\n el.attr({\n 'clip-path': \"url(#gridRectMask\".concat(w.globals.cuid, \")\")\n });\n }\n }\n\n // const defaultFilter = el.filterer\n\n if (w.config.states.normal.filter.type !== 'none') {\n filters.getDefaultFilter(el, realIndex);\n } else {\n if (w.config.chart.dropShadow.enabled && drawShadow) {\n var shadow = w.config.chart.dropShadow;\n filters.dropShadow(el, shadow, realIndex);\n }\n }\n if (bindEventsOnPaths) {\n el.node.addEventListener('mouseenter', this.pathMouseEnter.bind(this, el));\n el.node.addEventListener('mouseleave', this.pathMouseLeave.bind(this, el));\n el.node.addEventListener('mousedown', this.pathMouseDown.bind(this, el));\n }\n el.attr({\n pathTo: pathTo,\n pathFrom: pathFrom\n });\n var defaultAnimateOpts = {\n el: el,\n j: j,\n realIndex: realIndex,\n pathFrom: pathFrom,\n pathTo: pathTo,\n fill: fill,\n strokeWidth: strokeWidth,\n delay: animationDelay\n };\n if (initialAnim && !w.globals.resized && !w.globals.dataChanged) {\n anim.animatePathsGradually(_objectSpread2(_objectSpread2({}, defaultAnimateOpts), {}, {\n speed: initialSpeed\n }));\n } else {\n if (w.globals.resized || !w.globals.dataChanged) {\n anim.showDelayedElements();\n }\n }\n if (w.globals.dataChanged && dynamicAnim && shouldAnimate) {\n anim.animatePathsGradually(_objectSpread2(_objectSpread2({}, defaultAnimateOpts), {}, {\n speed: dataChangeSpeed\n }));\n }\n return el;\n }\n }, {\n key: \"drawPattern\",\n value: function drawPattern(style, width, height) {\n var stroke = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '#a8a8a8';\n var strokeWidth = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;\n var w = this.w;\n var p = w.globals.dom.Paper.pattern(width, height, function (add) {\n if (style === 'horizontalLines') {\n add.line(0, 0, height, 0).stroke({\n color: stroke,\n width: strokeWidth + 1\n });\n } else if (style === 'verticalLines') {\n add.line(0, 0, 0, width).stroke({\n color: stroke,\n width: strokeWidth + 1\n });\n } else if (style === 'slantedLines') {\n add.line(0, 0, width, height).stroke({\n color: stroke,\n width: strokeWidth\n });\n } else if (style === 'squares') {\n add.rect(width, height).fill('none').stroke({\n color: stroke,\n width: strokeWidth\n });\n } else if (style === 'circles') {\n add.circle(width).fill('none').stroke({\n color: stroke,\n width: strokeWidth\n });\n }\n });\n return p;\n }\n }, {\n key: \"drawGradient\",\n value: function drawGradient(style, gfrom, gto, opacityFrom, opacityTo) {\n var size = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : null;\n var stops = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : null;\n var colorStops = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : null;\n var i = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : 0;\n var w = this.w;\n var g;\n if (gfrom.length < 9 && gfrom.indexOf('#') === 0) {\n // if the hex contains alpha and is of 9 digit, skip the opacity\n gfrom = Utils$1.hexToRgba(gfrom, opacityFrom);\n }\n if (gto.length < 9 && gto.indexOf('#') === 0) {\n gto = Utils$1.hexToRgba(gto, opacityTo);\n }\n var stop1 = 0;\n var stop2 = 1;\n var stop3 = 1;\n var stop4 = null;\n if (stops !== null) {\n stop1 = typeof stops[0] !== 'undefined' ? stops[0] / 100 : 0;\n stop2 = typeof stops[1] !== 'undefined' ? stops[1] / 100 : 1;\n stop3 = typeof stops[2] !== 'undefined' ? stops[2] / 100 : 1;\n stop4 = typeof stops[3] !== 'undefined' ? stops[3] / 100 : null;\n }\n var radial = !!(w.config.chart.type === 'donut' || w.config.chart.type === 'pie' || w.config.chart.type === 'polarArea' || w.config.chart.type === 'bubble');\n if (colorStops === null || colorStops.length === 0) {\n g = w.globals.dom.Paper.gradient(radial ? 'radial' : 'linear', function (stop) {\n stop.at(stop1, gfrom, opacityFrom);\n stop.at(stop2, gto, opacityTo);\n stop.at(stop3, gto, opacityTo);\n if (stop4 !== null) {\n stop.at(stop4, gfrom, opacityFrom);\n }\n });\n } else {\n g = w.globals.dom.Paper.gradient(radial ? 'radial' : 'linear', function (stop) {\n var gradientStops = Array.isArray(colorStops[i]) ? colorStops[i] : colorStops;\n gradientStops.forEach(function (s) {\n stop.at(s.offset / 100, s.color, s.opacity);\n });\n });\n }\n if (!radial) {\n if (style === 'vertical') {\n g.from(0, 0).to(0, 1);\n } else if (style === 'diagonal') {\n g.from(0, 0).to(1, 1);\n } else if (style === 'horizontal') {\n g.from(0, 1).to(1, 1);\n } else if (style === 'diagonal2') {\n g.from(1, 0).to(0, 1);\n }\n } else {\n var offx = w.globals.gridWidth / 2;\n var offy = w.globals.gridHeight / 2;\n if (w.config.chart.type !== 'bubble') {\n g.attr({\n gradientUnits: 'userSpaceOnUse',\n cx: offx,\n cy: offy,\n r: size\n });\n } else {\n g.attr({\n cx: 0.5,\n cy: 0.5,\n r: 0.8,\n fx: 0.2,\n fy: 0.2\n });\n }\n }\n return g;\n }\n }, {\n key: \"getTextBasedOnMaxWidth\",\n value: function getTextBasedOnMaxWidth(_ref3) {\n var text = _ref3.text,\n maxWidth = _ref3.maxWidth,\n fontSize = _ref3.fontSize,\n fontFamily = _ref3.fontFamily;\n var tRects = this.getTextRects(text, fontSize, fontFamily);\n var wordWidth = tRects.width / text.length;\n var wordsBasedOnWidth = Math.floor(maxWidth / wordWidth);\n if (maxWidth < tRects.width) {\n return text.slice(0, wordsBasedOnWidth - 3) + '...';\n }\n return text;\n }\n }, {\n key: \"drawText\",\n value: function drawText(_ref4) {\n var _this = this;\n var x = _ref4.x,\n y = _ref4.y,\n text = _ref4.text,\n textAnchor = _ref4.textAnchor,\n fontSize = _ref4.fontSize,\n fontFamily = _ref4.fontFamily,\n fontWeight = _ref4.fontWeight,\n foreColor = _ref4.foreColor,\n opacity = _ref4.opacity,\n maxWidth = _ref4.maxWidth,\n _ref4$cssClass = _ref4.cssClass,\n cssClass = _ref4$cssClass === void 0 ? '' : _ref4$cssClass,\n _ref4$isPlainText = _ref4.isPlainText,\n isPlainText = _ref4$isPlainText === void 0 ? true : _ref4$isPlainText,\n _ref4$dominantBaselin = _ref4.dominantBaseline,\n dominantBaseline = _ref4$dominantBaselin === void 0 ? 'auto' : _ref4$dominantBaselin;\n var w = this.w;\n if (typeof text === 'undefined') text = '';\n var truncatedText = text;\n if (!textAnchor) {\n textAnchor = 'start';\n }\n if (!foreColor || !foreColor.length) {\n foreColor = w.config.chart.foreColor;\n }\n fontFamily = fontFamily || w.config.chart.fontFamily;\n fontSize = fontSize || '11px';\n fontWeight = fontWeight || 'regular';\n var commonProps = {\n maxWidth: maxWidth,\n fontSize: fontSize,\n fontFamily: fontFamily\n };\n var elText;\n if (Array.isArray(text)) {\n elText = w.globals.dom.Paper.text(function (add) {\n for (var i = 0; i < text.length; i++) {\n truncatedText = text[i];\n if (maxWidth) {\n truncatedText = _this.getTextBasedOnMaxWidth(_objectSpread2({\n text: text[i]\n }, commonProps));\n }\n i === 0 ? add.tspan(truncatedText) : add.tspan(truncatedText).newLine();\n }\n });\n } else {\n if (maxWidth) {\n truncatedText = this.getTextBasedOnMaxWidth(_objectSpread2({\n text: text\n }, commonProps));\n }\n elText = isPlainText ? w.globals.dom.Paper.plain(text) : w.globals.dom.Paper.text(function (add) {\n return add.tspan(truncatedText);\n });\n }\n elText.attr({\n x: x,\n y: y,\n 'text-anchor': textAnchor,\n 'dominant-baseline': dominantBaseline,\n 'font-size': fontSize,\n 'font-family': fontFamily,\n 'font-weight': fontWeight,\n fill: foreColor,\n class: 'apexcharts-text ' + cssClass\n });\n elText.node.style.fontFamily = fontFamily;\n elText.node.style.opacity = opacity;\n return elText;\n }\n }, {\n key: \"getMarkerPath\",\n value: function getMarkerPath(x, y, type, size) {\n var d = '';\n switch (type) {\n case 'cross':\n size = size / 1.4;\n d = \"M \".concat(x - size, \" \").concat(y - size, \" L \").concat(x + size, \" \").concat(y + size, \" M \").concat(x - size, \" \").concat(y + size, \" L \").concat(x + size, \" \").concat(y - size);\n break;\n case 'plus':\n size = size / 1.12;\n d = \"M \".concat(x - size, \" \").concat(y, \" L \").concat(x + size, \" \").concat(y, \" M \").concat(x, \" \").concat(y - size, \" L \").concat(x, \" \").concat(y + size);\n break;\n case 'star':\n case 'sparkle':\n var points = 5;\n size = size * 1.15;\n if (type === 'sparkle') {\n size = size / 1.1;\n points = 4;\n }\n var step = Math.PI / points;\n for (var i = 0; i <= 2 * points; i++) {\n var angle = i * step;\n var radius = i % 2 === 0 ? size : size / 2;\n var xPos = x + radius * Math.sin(angle);\n var yPos = y - radius * Math.cos(angle);\n d += (i === 0 ? 'M' : 'L') + xPos + ',' + yPos;\n }\n d += 'Z';\n break;\n case 'triangle':\n d = \"M \".concat(x, \" \").concat(y - size, \" \\n L \").concat(x + size, \" \").concat(y + size, \" \\n L \").concat(x - size, \" \").concat(y + size, \" \\n Z\");\n break;\n case 'square':\n case 'rect':\n size = size / 1.125;\n d = \"M \".concat(x - size, \" \").concat(y - size, \" \\n L \").concat(x + size, \" \").concat(y - size, \" \\n L \").concat(x + size, \" \").concat(y + size, \" \\n L \").concat(x - size, \" \").concat(y + size, \" \\n Z\");\n break;\n case 'diamond':\n size = size * 1.05;\n d = \"M \".concat(x, \" \").concat(y - size, \" \\n L \").concat(x + size, \" \").concat(y, \" \\n L \").concat(x, \" \").concat(y + size, \" \\n L \").concat(x - size, \" \").concat(y, \" \\n Z\");\n break;\n case 'line':\n size = size / 1.1;\n d = \"M \".concat(x - size, \" \").concat(y, \" \\n L \").concat(x + size, \" \").concat(y);\n break;\n case 'circle':\n default:\n size = size * 2;\n d = \"M \".concat(x, \", \").concat(y, \" \\n m -\").concat(size / 2, \", 0 \\n a \").concat(size / 2, \",\").concat(size / 2, \" 0 1,0 \").concat(size, \",0 \\n a \").concat(size / 2, \",\").concat(size / 2, \" 0 1,0 -\").concat(size, \",0\");\n break;\n }\n return d;\n }\n\n /**\n * @param {number} x - The x-coordinate of the marker\n * @param {number} y - The y-coordinate of the marker.\n * @param {number} size - The size of the marker\n * @param {Object} opts - The options for the marker.\n * @returns {Object} The created marker.\n */\n }, {\n key: \"drawMarkerShape\",\n value: function drawMarkerShape(x, y, type, size, opts) {\n var path = this.drawPath({\n d: this.getMarkerPath(x, y, type, size, opts),\n stroke: opts.pointStrokeColor,\n strokeDashArray: opts.pointStrokeDashArray,\n strokeWidth: opts.pointStrokeWidth,\n fill: opts.pointFillColor,\n fillOpacity: opts.pointFillOpacity,\n strokeOpacity: opts.pointStrokeOpacity\n });\n path.attr({\n cx: x,\n cy: y,\n shape: opts.shape,\n class: opts.class ? opts.class : ''\n });\n return path;\n }\n }, {\n key: \"drawMarker\",\n value: function drawMarker(x, y, opts) {\n x = x || 0;\n var size = opts.pSize || 0;\n if (!Utils$1.isNumber(y)) {\n size = 0;\n y = 0;\n }\n return this.drawMarkerShape(x, y, opts === null || opts === void 0 ? void 0 : opts.shape, size, _objectSpread2(_objectSpread2({}, opts), opts.shape === 'line' || opts.shape === 'plus' || opts.shape === 'cross' ? {\n pointStrokeColor: opts.pointFillColor,\n pointStrokeOpacity: opts.pointFillOpacity\n } : {}));\n }\n }, {\n key: \"pathMouseEnter\",\n value: function pathMouseEnter(path, e) {\n var w = this.w;\n var filters = new Filters(this.ctx);\n var i = parseInt(path.node.getAttribute('index'), 10);\n var j = parseInt(path.node.getAttribute('j'), 10);\n if (typeof w.config.chart.events.dataPointMouseEnter === 'function') {\n w.config.chart.events.dataPointMouseEnter(e, this.ctx, {\n seriesIndex: i,\n dataPointIndex: j,\n w: w\n });\n }\n this.ctx.events.fireEvent('dataPointMouseEnter', [e, this.ctx, {\n seriesIndex: i,\n dataPointIndex: j,\n w: w\n }]);\n if (w.config.states.active.filter.type !== 'none') {\n if (path.node.getAttribute('selected') === 'true') {\n return;\n }\n }\n if (w.config.states.hover.filter.type !== 'none') {\n if (!w.globals.isTouchDevice) {\n var hoverFilter = w.config.states.hover.filter;\n filters.applyFilter(path, i, hoverFilter.type, hoverFilter.value);\n }\n }\n }\n }, {\n key: \"pathMouseLeave\",\n value: function pathMouseLeave(path, e) {\n var w = this.w;\n var filters = new Filters(this.ctx);\n var i = parseInt(path.node.getAttribute('index'), 10);\n var j = parseInt(path.node.getAttribute('j'), 10);\n if (typeof w.config.chart.events.dataPointMouseLeave === 'function') {\n w.config.chart.events.dataPointMouseLeave(e, this.ctx, {\n seriesIndex: i,\n dataPointIndex: j,\n w: w\n });\n }\n this.ctx.events.fireEvent('dataPointMouseLeave', [e, this.ctx, {\n seriesIndex: i,\n dataPointIndex: j,\n w: w\n }]);\n if (w.config.states.active.filter.type !== 'none') {\n if (path.node.getAttribute('selected') === 'true') {\n return;\n }\n }\n if (w.config.states.hover.filter.type !== 'none') {\n filters.getDefaultFilter(path, i);\n }\n }\n }, {\n key: \"pathMouseDown\",\n value: function pathMouseDown(path, e) {\n var w = this.w;\n var filters = new Filters(this.ctx);\n var i = parseInt(path.node.getAttribute('index'), 10);\n var j = parseInt(path.node.getAttribute('j'), 10);\n var selected = 'false';\n if (path.node.getAttribute('selected') === 'true') {\n path.node.setAttribute('selected', 'false');\n if (w.globals.selectedDataPoints[i].indexOf(j) > -1) {\n var index = w.globals.selectedDataPoints[i].indexOf(j);\n w.globals.selectedDataPoints[i].splice(index, 1);\n }\n } else {\n if (!w.config.states.active.allowMultipleDataPointsSelection && w.globals.selectedDataPoints.length > 0) {\n w.globals.selectedDataPoints = [];\n var elPaths = w.globals.dom.Paper.select('.apexcharts-series path').members;\n var elCircles = w.globals.dom.Paper.select('.apexcharts-series circle, .apexcharts-series rect').members;\n var deSelect = function deSelect(els) {\n Array.prototype.forEach.call(els, function (el) {\n el.node.setAttribute('selected', 'false');\n filters.getDefaultFilter(el, i);\n });\n };\n deSelect(elPaths);\n deSelect(elCircles);\n }\n path.node.setAttribute('selected', 'true');\n selected = 'true';\n if (typeof w.globals.selectedDataPoints[i] === 'undefined') {\n w.globals.selectedDataPoints[i] = [];\n }\n w.globals.selectedDataPoints[i].push(j);\n }\n if (selected === 'true') {\n var activeFilter = w.config.states.active.filter;\n if (activeFilter !== 'none') {\n filters.applyFilter(path, i, activeFilter.type, activeFilter.value);\n } else {\n // Reapply the hover filter in case it was removed by `deselect`when there is no active filter and it is not a touch device\n if (w.config.states.hover.filter !== 'none') {\n if (!w.globals.isTouchDevice) {\n var hoverFilter = w.config.states.hover.filter;\n filters.applyFilter(path, i, hoverFilter.type, hoverFilter.value);\n }\n }\n }\n } else {\n // If the item was deselected, apply hover state filter if it is not a touch device\n if (w.config.states.active.filter.type !== 'none') {\n if (w.config.states.hover.filter.type !== 'none' && !w.globals.isTouchDevice) {\n var hoverFilter = w.config.states.hover.filter;\n filters.applyFilter(path, i, hoverFilter.type, hoverFilter.value);\n } else {\n filters.getDefaultFilter(path, i);\n }\n }\n }\n if (typeof w.config.chart.events.dataPointSelection === 'function') {\n w.config.chart.events.dataPointSelection(e, this.ctx, {\n selectedDataPoints: w.globals.selectedDataPoints,\n seriesIndex: i,\n dataPointIndex: j,\n w: w\n });\n }\n if (e) {\n this.ctx.events.fireEvent('dataPointSelection', [e, this.ctx, {\n selectedDataPoints: w.globals.selectedDataPoints,\n seriesIndex: i,\n dataPointIndex: j,\n w: w\n }]);\n }\n }\n }, {\n key: \"rotateAroundCenter\",\n value: function rotateAroundCenter(el) {\n var coord = {};\n if (el && typeof el.getBBox === 'function') {\n coord = el.getBBox();\n }\n var x = coord.x + coord.width / 2;\n var y = coord.y + coord.height / 2;\n return {\n x: x,\n y: y\n };\n }\n }, {\n key: \"getTextRects\",\n value: function getTextRects(text, fontSize, fontFamily, transform) {\n var useBBox = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n var w = this.w;\n var virtualText = this.drawText({\n x: -200,\n y: -200,\n text: text,\n textAnchor: 'start',\n fontSize: fontSize,\n fontFamily: fontFamily,\n foreColor: '#fff',\n opacity: 0\n });\n if (transform) {\n virtualText.attr('transform', transform);\n }\n w.globals.dom.Paper.add(virtualText);\n var rect = virtualText.bbox();\n if (!useBBox) {\n rect = virtualText.node.getBoundingClientRect();\n }\n virtualText.remove();\n return {\n width: rect.width,\n height: rect.height\n };\n }\n\n /**\n * append ... to long text\n * http://stackoverflow.com/questions/9241315/trimming-text-to-a-given-pixel-width-in-svg\n * @memberof Graphics\n **/\n }, {\n key: \"placeTextWithEllipsis\",\n value: function placeTextWithEllipsis(textObj, textString, width) {\n if (typeof textObj.getComputedTextLength !== 'function') return;\n textObj.textContent = textString;\n if (textString.length > 0) {\n // ellipsis is needed\n if (textObj.getComputedTextLength() >= width / 1.1) {\n for (var x = textString.length - 3; x > 0; x -= 3) {\n if (textObj.getSubStringLength(0, x) <= width / 1.1) {\n textObj.textContent = textString.substring(0, x) + '...';\n return;\n }\n }\n textObj.textContent = '.'; // can't place at all\n }\n }\n }\n }], [{\n key: \"setAttrs\",\n value: function setAttrs(el, attrs) {\n for (var key in attrs) {\n if (attrs.hasOwnProperty(key)) {\n el.setAttribute(key, attrs[key]);\n }\n }\n }\n }]);\n return Graphics;\n }();\n\n /*\n ** Util functions which are dependent on ApexCharts instance\n */\n var CoreUtils = /*#__PURE__*/function () {\n function CoreUtils(ctx) {\n _classCallCheck(this, CoreUtils);\n this.ctx = ctx;\n this.w = ctx.w;\n }\n _createClass(CoreUtils, [{\n key: \"getStackedSeriesTotals\",\n value:\n /**\n * @memberof CoreUtils\n * returns the sum of all individual values in a multiple stacked series\n * Eg. w.globals.series = [[32,33,43,12], [2,3,5,1]]\n * @return [34,36,48,13]\n **/\n function getStackedSeriesTotals() {\n var excludedSeriesIndices = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var w = this.w;\n var total = [];\n if (w.globals.series.length === 0) return total;\n for (var i = 0; i < w.globals.series[w.globals.maxValsInArrayIndex].length; i++) {\n var t = 0;\n for (var j = 0; j < w.globals.series.length; j++) {\n if (typeof w.globals.series[j][i] !== 'undefined' && excludedSeriesIndices.indexOf(j) === -1) {\n t += w.globals.series[j][i];\n }\n }\n total.push(t);\n }\n return total;\n }\n\n // get total of the all values inside all series\n }, {\n key: \"getSeriesTotalByIndex\",\n value: function getSeriesTotalByIndex() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n if (index === null) {\n // non-plot chart types - pie / donut / circle\n return this.w.config.series.reduce(function (acc, cur) {\n return acc + cur;\n }, 0);\n } else {\n // axis charts - supporting multiple series\n return this.w.globals.series[index].reduce(function (acc, cur) {\n return acc + cur;\n }, 0);\n }\n }\n\n /**\n * @memberof CoreUtils\n * returns the sum of values in a multiple stacked grouped charts\n * Eg. w.globals.series = [[32,33,43,12], [2,3,5,1], [43, 23, 34, 22]]\n * series 1 and 2 are in a group, while series 3 is in another group\n * @return [[34, 36, 48, 12], [43, 23, 34, 22]]\n **/\n }, {\n key: \"getStackedSeriesTotalsByGroups\",\n value: function getStackedSeriesTotalsByGroups() {\n var _this = this;\n var w = this.w;\n var total = [];\n w.globals.seriesGroups.forEach(function (sg) {\n var includedIndexes = [];\n w.config.series.forEach(function (s, si) {\n if (sg.indexOf(w.globals.seriesNames[si]) > -1) {\n includedIndexes.push(si);\n }\n });\n var excludedIndices = w.globals.series.map(function (_, fi) {\n return includedIndexes.indexOf(fi) === -1 ? fi : -1;\n }).filter(function (f) {\n return f !== -1;\n });\n total.push(_this.getStackedSeriesTotals(excludedIndices));\n });\n return total;\n }\n }, {\n key: \"setSeriesYAxisMappings\",\n value: function setSeriesYAxisMappings() {\n var gl = this.w.globals;\n var cnf = this.w.config;\n\n // The old config method to map multiple series to a y axis is to\n // include one yaxis config per series but set each yaxis seriesName to the\n // same series name. This relies on indexing equivalence to map series to\n // an axis: series[n] => yaxis[n]. This needs to be retained for compatibility.\n // But we introduce an alternative that explicitly configures yaxis elements\n // with the series that will be referenced to them (seriesName: []). This\n // only requires including the yaxis elements that will be seen on the chart.\n // Old way:\n // ya: s\n // 0: 0\n // 1: 1\n // 2: 1\n // 3: 1\n // 4: 1\n // Axes 0..4 are all scaled and all will be rendered unless the axes are\n // show: false. If the chart is stacked, it's assumed that series 1..4 are\n // the contributing series. This is not particularly intuitive.\n // New way:\n // ya: s\n // 0: [0]\n // 1: [1,2,3,4]\n // If the chart is stacked, it can be assumed that any axis with multiple\n // series is stacked.\n //\n // If this is an old chart and we are being backward compatible, it will be\n // expected that each series is associated with it's corresponding yaxis\n // through their indices, one-to-one.\n // If yaxis.seriesName matches series.name, we have indices yi and si.\n // A name match where yi != si is interpretted as yaxis[yi] and yaxis[si]\n // will both be scaled to fit the combined series[si] and series[yi].\n // Consider series named: S0,S1,S2 and yaxes A0,A1,A2.\n //\n // Example 1: A0 and A1 scaled the same.\n // A0.seriesName: S0\n // A1.seriesName: S0\n // A2.seriesName: S2\n // Then A1 <-> A0\n //\n // Example 2: A0, A1 and A2 all scaled the same.\n // A0.seriesName: S2\n // A1.seriesName: S0\n // A2.seriesName: S1\n // A0 <-> A2, A1 <-> A0, A2 <-> A1 --->>> A0 <-> A1 <-> A2\n\n var axisSeriesMap = [];\n var seriesYAxisReverseMap = [];\n var unassignedSeriesIndices = [];\n var seriesNameArrayStyle = gl.series.length > cnf.yaxis.length || cnf.yaxis.some(function (a) {\n return Array.isArray(a.seriesName);\n });\n cnf.series.forEach(function (s, i) {\n unassignedSeriesIndices.push(i);\n seriesYAxisReverseMap.push(null);\n });\n cnf.yaxis.forEach(function (yaxe, yi) {\n axisSeriesMap[yi] = [];\n });\n var unassignedYAxisIndices = [];\n\n // here, we loop through the yaxis array and find the item which has \"seriesName\" property\n cnf.yaxis.forEach(function (yaxe, yi) {\n var assigned = false;\n // Allow seriesName to be either a string (for backward compatibility),\n // in which case, handle multiple yaxes referencing the same series.\n // or an array of strings so that a yaxis can reference multiple series.\n // Feature request #4237\n if (yaxe.seriesName) {\n var seriesNames = [];\n if (Array.isArray(yaxe.seriesName)) {\n seriesNames = yaxe.seriesName;\n } else {\n seriesNames.push(yaxe.seriesName);\n }\n seriesNames.forEach(function (name) {\n cnf.series.forEach(function (s, si) {\n if (s.name === name) {\n var remove = si;\n if (yi === si || seriesNameArrayStyle) {\n // New style, don't allow series to be double referenced\n if (!seriesNameArrayStyle || unassignedSeriesIndices.indexOf(si) > -1) {\n axisSeriesMap[yi].push([yi, si]);\n } else {\n console.warn(\"Series '\" + s.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.');\n }\n } else {\n // The series index refers to the target yaxis and the current\n // yaxis index refers to the actual referenced series.\n axisSeriesMap[si].push([si, yi]);\n remove = yi;\n }\n assigned = true;\n remove = unassignedSeriesIndices.indexOf(remove);\n if (remove !== -1) {\n unassignedSeriesIndices.splice(remove, 1);\n }\n }\n });\n });\n }\n if (!assigned) {\n unassignedYAxisIndices.push(yi);\n }\n });\n axisSeriesMap = axisSeriesMap.map(function (yaxe, yi) {\n var ra = [];\n yaxe.forEach(function (sa) {\n seriesYAxisReverseMap[sa[1]] = sa[0];\n ra.push(sa[1]);\n });\n return ra;\n });\n\n // All series referenced directly by yaxes have been assigned to those axes.\n // Any series so far unassigned will be assigned to any yaxes that have yet\n // to reference series directly, one-for-one in order of appearance, with\n // all left-over series assigned to either the last unassigned yaxis, or the\n // last yaxis if all have assigned series. This captures the\n // default single and multiaxis config options which simply includes zero,\n // one or as many yaxes as there are series but do not reference them by name.\n var lastUnassignedYAxis = cnf.yaxis.length - 1;\n for (var i = 0; i < unassignedYAxisIndices.length; i++) {\n lastUnassignedYAxis = unassignedYAxisIndices[i];\n axisSeriesMap[lastUnassignedYAxis] = [];\n if (unassignedSeriesIndices) {\n var si = unassignedSeriesIndices[0];\n unassignedSeriesIndices.shift();\n axisSeriesMap[lastUnassignedYAxis].push(si);\n seriesYAxisReverseMap[si] = lastUnassignedYAxis;\n } else {\n break;\n }\n }\n unassignedSeriesIndices.forEach(function (i) {\n axisSeriesMap[lastUnassignedYAxis].push(i);\n seriesYAxisReverseMap[i] = lastUnassignedYAxis;\n });\n\n // For the old-style seriesName-as-string-only, leave the zero-length yaxis\n // array elements in for compatibility so that series.length == yaxes.length\n // for multi axis charts.\n gl.seriesYAxisMap = axisSeriesMap.map(function (x) {\n return x;\n });\n gl.seriesYAxisReverseMap = seriesYAxisReverseMap.map(function (x) {\n return x;\n });\n // Set default series group names\n gl.seriesYAxisMap.forEach(function (axisSeries, ai) {\n axisSeries.forEach(function (si) {\n // series may be bare until loaded in realtime\n if (cnf.series[si] && cnf.series[si].group === undefined) {\n // A series with no group defined will be named after the axis that\n // referenced it and thus form a group automatically.\n cnf.series[si].group = 'apexcharts-axis-'.concat(ai.toString());\n }\n });\n });\n }\n }, {\n key: \"isSeriesNull\",\n value: function isSeriesNull() {\n var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var r = [];\n if (index === null) {\n // non-plot chart types - pie / donut / circle\n r = this.w.config.series.filter(function (d) {\n return d !== null;\n });\n } else {\n // axis charts - supporting multiple series\n r = this.w.config.series[index].data.filter(function (d) {\n return d !== null;\n });\n }\n return r.length === 0;\n }\n }, {\n key: \"seriesHaveSameValues\",\n value: function seriesHaveSameValues(index) {\n return this.w.globals.series[index].every(function (val, i, arr) {\n return val === arr[0];\n });\n }\n }, {\n key: \"getCategoryLabels\",\n value: function getCategoryLabels(labels) {\n var w = this.w;\n var catLabels = labels.slice();\n if (w.config.xaxis.convertedCatToNumeric) {\n catLabels = labels.map(function (i, li) {\n return w.config.xaxis.labels.formatter(i - w.globals.minX + 1);\n });\n }\n return catLabels;\n }\n // maxValsInArrayIndex is the index of series[] which has the largest number of items\n }, {\n key: \"getLargestSeries\",\n value: function getLargestSeries() {\n var w = this.w;\n w.globals.maxValsInArrayIndex = w.globals.series.map(function (a) {\n return a.length;\n }).indexOf(Math.max.apply(Math, w.globals.series.map(function (a) {\n return a.length;\n })));\n }\n }, {\n key: \"getLargestMarkerSize\",\n value: function getLargestMarkerSize() {\n var w = this.w;\n var size = 0;\n w.globals.markers.size.forEach(function (m) {\n size = Math.max(size, m);\n });\n if (w.config.markers.discrete && w.config.markers.discrete.length) {\n w.config.markers.discrete.forEach(function (m) {\n size = Math.max(size, m.size);\n });\n }\n if (size > 0) {\n if (w.config.markers.hover.size > 0) {\n size = w.config.markers.hover.size;\n } else {\n size += w.config.markers.hover.sizeOffset;\n }\n }\n w.globals.markers.largestSize = size;\n return size;\n }\n\n /**\n * @memberof Core\n * returns the sum of all values in a series\n * Eg. w.globals.series = [[32,33,43,12], [2,3,5,1]]\n * @return [120, 11]\n **/\n }, {\n key: \"getSeriesTotals\",\n value: function getSeriesTotals() {\n var w = this.w;\n w.globals.seriesTotals = w.globals.series.map(function (ser, index) {\n var total = 0;\n if (Array.isArray(ser)) {\n for (var j = 0; j < ser.length; j++) {\n total += ser[j];\n }\n } else {\n // for pie/donuts/gauges\n total += ser;\n }\n return total;\n });\n }\n }, {\n key: \"getSeriesTotalsXRange\",\n value: function getSeriesTotalsXRange(minX, maxX) {\n var w = this.w;\n var seriesTotalsXRange = w.globals.series.map(function (ser, index) {\n var total = 0;\n for (var j = 0; j < ser.length; j++) {\n if (w.globals.seriesX[index][j] > minX && w.globals.seriesX[index][j] < maxX) {\n total += ser[j];\n }\n }\n return total;\n });\n return seriesTotalsXRange;\n }\n\n /**\n * @memberof CoreUtils\n * returns the percentage value of all individual values which can be used in a 100% stacked series\n * Eg. w.globals.series = [[32, 33, 43, 12], [2, 3, 5, 1]]\n * @return [[94.11, 91.66, 89.58, 92.30], [5.88, 8.33, 10.41, 7.7]]\n **/\n }, {\n key: \"getPercentSeries\",\n value: function getPercentSeries() {\n var w = this.w;\n w.globals.seriesPercent = w.globals.series.map(function (ser, index) {\n var seriesPercent = [];\n if (Array.isArray(ser)) {\n for (var j = 0; j < ser.length; j++) {\n var total = w.globals.stackedSeriesTotals[j];\n var percent = 0;\n if (total) {\n percent = 100 * ser[j] / total;\n }\n seriesPercent.push(percent);\n }\n } else {\n var _total = w.globals.seriesTotals.reduce(function (acc, val) {\n return acc + val;\n }, 0);\n var _percent = 100 * ser / _total;\n seriesPercent.push(_percent);\n }\n return seriesPercent;\n });\n }\n }, {\n key: \"getCalculatedRatios\",\n value: function getCalculatedRatios() {\n var _this2 = this;\n var w = this.w;\n var gl = w.globals;\n var yRatio = [];\n var invertedYRatio = 0;\n var xRatio = 0;\n var invertedXRatio = 0;\n var zRatio = 0;\n var baseLineY = [];\n var baseLineInvertedY = 0.1;\n var baseLineX = 0;\n gl.yRange = [];\n if (gl.isMultipleYAxis) {\n for (var i = 0; i < gl.minYArr.length; i++) {\n gl.yRange.push(Math.abs(gl.minYArr[i] - gl.maxYArr[i]));\n baseLineY.push(0);\n }\n } else {\n gl.yRange.push(Math.abs(gl.minY - gl.maxY));\n }\n gl.xRange = Math.abs(gl.maxX - gl.minX);\n gl.zRange = Math.abs(gl.maxZ - gl.minZ);\n\n // multiple y axis\n for (var _i = 0; _i < gl.yRange.length; _i++) {\n yRatio.push(gl.yRange[_i] / gl.gridHeight);\n }\n xRatio = gl.xRange / gl.gridWidth;\n invertedYRatio = gl.yRange / gl.gridWidth;\n invertedXRatio = gl.xRange / gl.gridHeight;\n zRatio = gl.zRange / gl.gridHeight * 16;\n if (!zRatio) {\n zRatio = 1;\n }\n if (gl.minY !== Number.MIN_VALUE && Math.abs(gl.minY) !== 0) {\n // Negative numbers present in series\n gl.hasNegs = true;\n }\n\n // Check we have a map as series may still to be added/updated.\n if (w.globals.seriesYAxisReverseMap.length > 0) {\n var scaleBaseLineYScale = function scaleBaseLineYScale(y, i) {\n var yAxis = w.config.yaxis[w.globals.seriesYAxisReverseMap[i]];\n var sign = y < 0 ? -1 : 1;\n y = Math.abs(y);\n if (yAxis.logarithmic) {\n y = _this2.getBaseLog(yAxis.logBase, y);\n }\n return -sign * y / yRatio[i];\n };\n if (gl.isMultipleYAxis) {\n baseLineY = [];\n // baseline variables is the 0 of the yaxis which will be needed when there are negatives\n for (var _i2 = 0; _i2 < yRatio.length; _i2++) {\n baseLineY.push(scaleBaseLineYScale(gl.minYArr[_i2], _i2));\n }\n } else {\n baseLineY = [];\n baseLineY.push(scaleBaseLineYScale(gl.minY, 0));\n if (gl.minY !== Number.MIN_VALUE && Math.abs(gl.minY) !== 0) {\n baseLineInvertedY = -gl.minY / invertedYRatio; // this is for bar chart\n baseLineX = gl.minX / xRatio;\n }\n }\n } else {\n baseLineY = [];\n baseLineY.push(0);\n baseLineInvertedY = 0;\n baseLineX = 0;\n }\n return {\n yRatio: yRatio,\n invertedYRatio: invertedYRatio,\n zRatio: zRatio,\n xRatio: xRatio,\n invertedXRatio: invertedXRatio,\n baseLineInvertedY: baseLineInvertedY,\n baseLineY: baseLineY,\n baseLineX: baseLineX\n };\n }\n }, {\n key: \"getLogSeries\",\n value: function getLogSeries(series) {\n var _this3 = this;\n var w = this.w;\n w.globals.seriesLog = series.map(function (s, i) {\n var yAxisIndex = w.globals.seriesYAxisReverseMap[i];\n if (w.config.yaxis[yAxisIndex] && w.config.yaxis[yAxisIndex].logarithmic) {\n return s.map(function (d) {\n if (d === null) return null;\n return _this3.getLogVal(w.config.yaxis[yAxisIndex].logBase, d, i);\n });\n } else {\n return s;\n }\n });\n return w.globals.invalidLogScale ? series : w.globals.seriesLog;\n }\n }, {\n key: \"getBaseLog\",\n value: function getBaseLog(base, value) {\n return Math.log(value) / Math.log(base);\n }\n }, {\n key: \"getLogVal\",\n value: function getLogVal(b, d, seriesIndex) {\n if (d <= 0) {\n return 0; // Should be Number.NEGATIVE_INFINITY\n }\n var w = this.w;\n var min_log_val = w.globals.minYArr[seriesIndex] === 0 ? -1 // make sure we dont calculate log of 0\n : this.getBaseLog(b, w.globals.minYArr[seriesIndex]);\n var max_log_val = w.globals.maxYArr[seriesIndex] === 0 ? 0 // make sure we dont calculate log of 0\n : this.getBaseLog(b, w.globals.maxYArr[seriesIndex]);\n var number_of_height_levels = max_log_val - min_log_val;\n if (d < 1) return d / number_of_height_levels;\n var log_height_value = this.getBaseLog(b, d) - min_log_val;\n return log_height_value / number_of_height_levels;\n }\n }, {\n key: \"getLogYRatios\",\n value: function getLogYRatios(yRatio) {\n var _this4 = this;\n var w = this.w;\n var gl = this.w.globals;\n gl.yLogRatio = yRatio.slice();\n gl.logYRange = gl.yRange.map(function (_, i) {\n var yAxisIndex = w.globals.seriesYAxisReverseMap[i];\n if (w.config.yaxis[yAxisIndex] && _this4.w.config.yaxis[yAxisIndex].logarithmic) {\n var maxY = -Number.MAX_VALUE;\n var minY = Number.MIN_VALUE;\n var range = 1;\n gl.seriesLog.forEach(function (s, si) {\n s.forEach(function (v) {\n if (w.config.yaxis[si] && w.config.yaxis[si].logarithmic) {\n maxY = Math.max(v, maxY);\n minY = Math.min(v, minY);\n }\n });\n });\n range = Math.pow(gl.yRange[i], Math.abs(minY - maxY) / gl.yRange[i]);\n gl.yLogRatio[i] = range / gl.gridHeight;\n return range;\n }\n });\n return gl.invalidLogScale ? yRatio.slice() : gl.yLogRatio;\n }\n\n // Some config objects can be array - and we need to extend them correctly\n }, {\n key: \"drawSeriesByGroup\",\n value:\n // Series of the same group and type can be stacked together distinct from\n // other series of the same type on the same axis.\n function drawSeriesByGroup(typeSeries, typeGroups, type, chartClass) {\n var w = this.w;\n var graph = [];\n if (typeSeries.series.length > 0) {\n // draw each group separately\n typeGroups.forEach(function (gn) {\n var gs = [];\n var gi = [];\n typeSeries.i.forEach(function (i, ii) {\n if (w.config.series[i].group === gn) {\n gs.push(typeSeries.series[ii]);\n gi.push(i);\n }\n });\n gs.length > 0 && graph.push(chartClass.draw(gs, type, gi));\n });\n }\n return graph;\n }\n }], [{\n key: \"checkComboSeries\",\n value: function checkComboSeries(series, chartType) {\n var comboCharts = false;\n var comboBarCount = 0;\n var comboCount = 0;\n if (chartType === undefined) {\n chartType = 'line';\n }\n\n // Check if user specified a type in series that may make us a combo chart.\n // The default type for chart is \"line\" and the default for series is the\n // chart type, therefore, if the types of all series match the chart type,\n // this should not be considered a combo chart.\n if (series.length && typeof series[0].type !== 'undefined') {\n series.forEach(function (s) {\n if (s.type === 'bar' || s.type === 'column' || s.type === 'candlestick' || s.type === 'boxPlot') {\n comboBarCount++;\n }\n if (typeof s.type !== 'undefined' && s.type !== chartType) {\n comboCount++;\n }\n });\n }\n if (comboCount > 0) {\n comboCharts = true;\n }\n return {\n comboBarCount: comboBarCount,\n comboCharts: comboCharts\n };\n }\n }, {\n key: \"extendArrayProps\",\n value: function extendArrayProps(configInstance, options, w) {\n var _options, _options2;\n if ((_options = options) !== null && _options !== void 0 && _options.yaxis) {\n options = configInstance.extendYAxis(options, w);\n }\n if ((_options2 = options) !== null && _options2 !== void 0 && _options2.annotations) {\n var _options3, _options3$annotations, _options4, _options4$annotations;\n if (options.annotations.yaxis) {\n options = configInstance.extendYAxisAnnotations(options);\n }\n if ((_options3 = options) !== null && _options3 !== void 0 && (_options3$annotations = _options3.annotations) !== null && _options3$annotations !== void 0 && _options3$annotations.xaxis) {\n options = configInstance.extendXAxisAnnotations(options);\n }\n if ((_options4 = options) !== null && _options4 !== void 0 && (_options4$annotations = _options4.annotations) !== null && _options4$annotations !== void 0 && _options4$annotations.points) {\n options = configInstance.extendPointAnnotations(options);\n }\n }\n return options;\n }\n }]);\n return CoreUtils;\n }();\n\n var Helpers$4 = /*#__PURE__*/function () {\n function Helpers(annoCtx) {\n _classCallCheck(this, Helpers);\n this.w = annoCtx.w;\n this.annoCtx = annoCtx;\n }\n _createClass(Helpers, [{\n key: \"setOrientations\",\n value: function setOrientations(anno) {\n var annoIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var w = this.w;\n if (anno.label.orientation === 'vertical') {\n var i = annoIndex !== null ? annoIndex : 0;\n var xAnno = w.globals.dom.baseEl.querySelector(\".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='\".concat(i, \"']\"));\n if (xAnno !== null) {\n var xAnnoCoord = xAnno.getBoundingClientRect();\n xAnno.setAttribute('x', parseFloat(xAnno.getAttribute('x')) - xAnnoCoord.height + 4);\n var yOffset = anno.label.position === 'top' ? xAnnoCoord.width : -xAnnoCoord.width;\n xAnno.setAttribute('y', parseFloat(xAnno.getAttribute('y')) + yOffset);\n var _this$annoCtx$graphic = this.annoCtx.graphics.rotateAroundCenter(xAnno),\n x = _this$annoCtx$graphic.x,\n y = _this$annoCtx$graphic.y;\n xAnno.setAttribute('transform', \"rotate(-90 \".concat(x, \" \").concat(y, \")\"));\n }\n }\n }\n }, {\n key: \"addBackgroundToAnno\",\n value: function addBackgroundToAnno(annoEl, anno) {\n var w = this.w;\n if (!annoEl || !anno.label.text || !String(anno.label.text).trim()) {\n return null;\n }\n var elGridRect = w.globals.dom.baseEl.querySelector('.apexcharts-grid').getBoundingClientRect();\n var coords = annoEl.getBoundingClientRect();\n var _anno$label$style$pad = anno.label.style.padding,\n pleft = _anno$label$style$pad.left,\n pright = _anno$label$style$pad.right,\n ptop = _anno$label$style$pad.top,\n pbottom = _anno$label$style$pad.bottom;\n if (anno.label.orientation === 'vertical') {\n var _ref = [pleft, pright, ptop, pbottom];\n ptop = _ref[0];\n pbottom = _ref[1];\n pleft = _ref[2];\n pright = _ref[3];\n }\n var x1 = coords.left - elGridRect.left - pleft;\n var y1 = coords.top - elGridRect.top - ptop;\n var elRect = this.annoCtx.graphics.drawRect(x1 - w.globals.barPadForNumericAxis, y1, coords.width + pleft + pright, coords.height + ptop + pbottom, anno.label.borderRadius, anno.label.style.background, 1, anno.label.borderWidth, anno.label.borderColor, 0);\n if (anno.id) {\n elRect.node.classList.add(anno.id);\n }\n return elRect;\n }\n }, {\n key: \"annotationsBackground\",\n value: function annotationsBackground() {\n var _this = this;\n var w = this.w;\n var add = function add(anno, i, type) {\n var annoLabel = w.globals.dom.baseEl.querySelector(\".apexcharts-\".concat(type, \"-annotations .apexcharts-\").concat(type, \"-annotation-label[rel='\").concat(i, \"']\"));\n if (annoLabel) {\n var parent = annoLabel.parentNode;\n var elRect = _this.addBackgroundToAnno(annoLabel, anno);\n if (elRect) {\n parent.insertBefore(elRect.node, annoLabel);\n if (anno.label.mouseEnter) {\n elRect.node.addEventListener('mouseenter', anno.label.mouseEnter.bind(_this, anno));\n }\n if (anno.label.mouseLeave) {\n elRect.node.addEventListener('mouseleave', anno.label.mouseLeave.bind(_this, anno));\n }\n if (anno.label.click) {\n elRect.node.addEventListener('click', anno.label.click.bind(_this, anno));\n }\n }\n }\n };\n w.config.annotations.xaxis.forEach(function (anno, i) {\n return add(anno, i, 'xaxis');\n });\n w.config.annotations.yaxis.forEach(function (anno, i) {\n return add(anno, i, 'yaxis');\n });\n w.config.annotations.points.forEach(function (anno, i) {\n return add(anno, i, 'point');\n });\n }\n }, {\n key: \"getY1Y2\",\n value: function getY1Y2(type, anno) {\n var w = this.w;\n var y = type === 'y1' ? anno.y : anno.y2;\n var yP;\n var clipped = false;\n if (this.annoCtx.invertAxis) {\n var labels = w.config.xaxis.convertedCatToNumeric ? w.globals.categoryLabels : w.globals.labels;\n var catIndex = labels.indexOf(y);\n var xLabel = w.globals.dom.baseEl.querySelector(\".apexcharts-yaxis-texts-g text:nth-child(\".concat(catIndex + 1, \")\"));\n yP = xLabel ? parseFloat(xLabel.getAttribute('y')) : (w.globals.gridHeight / labels.length - 1) * (catIndex + 1) - w.globals.barHeight;\n if (anno.seriesIndex !== undefined && w.globals.barHeight) {\n yP -= w.globals.barHeight / 2 * (w.globals.series.length - 1) - w.globals.barHeight * anno.seriesIndex;\n }\n } else {\n var _w$config$yaxis$anno$;\n var seriesIndex = w.globals.seriesYAxisMap[anno.yAxisIndex][0];\n var yPos = w.config.yaxis[anno.yAxisIndex].logarithmic ? new CoreUtils(this.annoCtx.ctx).getLogVal(w.config.yaxis[anno.yAxisIndex].logBase, y, seriesIndex) / w.globals.yLogRatio[seriesIndex] : (y - w.globals.minYArr[seriesIndex]) / (w.globals.yRange[seriesIndex] / w.globals.gridHeight);\n yP = w.globals.gridHeight - Math.min(Math.max(yPos, 0), w.globals.gridHeight);\n clipped = yPos > w.globals.gridHeight || yPos < 0;\n if (anno.marker && (anno.y === undefined || anno.y === null)) {\n yP = 0;\n }\n if ((_w$config$yaxis$anno$ = w.config.yaxis[anno.yAxisIndex]) !== null && _w$config$yaxis$anno$ !== void 0 && _w$config$yaxis$anno$.reversed) {\n yP = yPos;\n }\n }\n if (typeof y === 'string' && y.includes('px')) {\n yP = parseFloat(y);\n }\n return {\n yP: yP,\n clipped: clipped\n };\n }\n }, {\n key: \"getX1X2\",\n value: function getX1X2(type, anno) {\n var w = this.w;\n var x = type === 'x1' ? anno.x : anno.x2;\n var min = this.annoCtx.invertAxis ? w.globals.minY : w.globals.minX;\n var max = this.annoCtx.invertAxis ? w.globals.maxY : w.globals.maxX;\n var range = this.annoCtx.invertAxis ? w.globals.yRange[0] : w.globals.xRange;\n var clipped = false;\n var xP = this.annoCtx.inversedReversedAxis ? (max - x) / (range / w.globals.gridWidth) : (x - min) / (range / w.globals.gridWidth);\n if ((w.config.xaxis.type === 'category' || w.config.xaxis.convertedCatToNumeric) && !this.annoCtx.invertAxis && !w.globals.dataFormatXNumeric) {\n if (!w.config.chart.sparkline.enabled) {\n xP = this.getStringX(x);\n }\n }\n if (typeof x === 'string' && x.includes('px')) {\n xP = parseFloat(x);\n }\n if ((x === undefined || x === null) && anno.marker) {\n xP = w.globals.gridWidth;\n }\n if (anno.seriesIndex !== undefined && w.globals.barWidth && !this.annoCtx.invertAxis) {\n xP -= w.globals.barWidth / 2 * (w.globals.series.length - 1) - w.globals.barWidth * anno.seriesIndex;\n }\n if (xP > w.globals.gridWidth) {\n xP = w.globals.gridWidth;\n clipped = true;\n } else if (xP < 0) {\n xP = 0;\n clipped = true;\n }\n return {\n x: xP,\n clipped: clipped\n };\n }\n }, {\n key: \"getStringX\",\n value: function getStringX(x) {\n var w = this.w;\n var rX = x;\n if (w.config.xaxis.convertedCatToNumeric && w.globals.categoryLabels.length) {\n x = w.globals.categoryLabels.indexOf(x) + 1;\n }\n var catIndex = w.globals.labels.map(function (item) {\n return Array.isArray(item) ? item.join(' ') : item;\n }).indexOf(x);\n var xLabel = w.globals.dom.baseEl.querySelector(\".apexcharts-xaxis-texts-g text:nth-child(\".concat(catIndex + 1, \")\"));\n if (xLabel) {\n rX = parseFloat(xLabel.getAttribute('x'));\n }\n return rX;\n }\n }]);\n return Helpers;\n }();\n\n var XAnnotations = /*#__PURE__*/function () {\n function XAnnotations(annoCtx) {\n _classCallCheck(this, XAnnotations);\n this.w = annoCtx.w;\n this.annoCtx = annoCtx;\n this.invertAxis = this.annoCtx.invertAxis;\n this.helpers = new Helpers$4(this.annoCtx);\n }\n _createClass(XAnnotations, [{\n key: \"addXaxisAnnotation\",\n value: function addXaxisAnnotation(anno, parent, index) {\n var w = this.w;\n var result = this.helpers.getX1X2('x1', anno);\n var x1 = result.x;\n var clipX1 = result.clipped;\n var clipX2 = true;\n var x2;\n var text = anno.label.text;\n var strokeDashArray = anno.strokeDashArray;\n if (!Utils$1.isNumber(x1)) return;\n if (anno.x2 === null || typeof anno.x2 === 'undefined') {\n if (!clipX1) {\n var line = this.annoCtx.graphics.drawLine(x1 + anno.offsetX,\n // x1\n 0 + anno.offsetY,\n // y1\n x1 + anno.offsetX,\n // x2\n w.globals.gridHeight + anno.offsetY,\n // y2\n anno.borderColor,\n // lineColor\n strokeDashArray,\n //dashArray\n anno.borderWidth);\n parent.appendChild(line.node);\n if (anno.id) {\n line.node.classList.add(anno.id);\n }\n }\n } else {\n var _result = this.helpers.getX1X2('x2', anno);\n x2 = _result.x;\n clipX2 = _result.clipped;\n if (!(clipX1 && clipX2)) {\n if (x2 < x1) {\n var temp = x1;\n x1 = x2;\n x2 = temp;\n }\n var rect = this.annoCtx.graphics.drawRect(x1 + anno.offsetX,\n // x1\n 0 + anno.offsetY,\n // y1\n x2 - x1,\n // x2\n w.globals.gridHeight + anno.offsetY,\n // y2\n 0,\n // radius\n anno.fillColor,\n // color\n anno.opacity,\n // opacity,\n 1,\n // strokeWidth\n anno.borderColor,\n // strokeColor\n strokeDashArray // stokeDashArray\n );\n rect.node.classList.add('apexcharts-annotation-rect');\n rect.attr('clip-path', \"url(#gridRectMask\".concat(w.globals.cuid, \")\"));\n parent.appendChild(rect.node);\n if (anno.id) {\n rect.node.classList.add(anno.id);\n }\n }\n }\n if (!(clipX1 && clipX2)) {\n var textRects = this.annoCtx.graphics.getTextRects(text, parseFloat(anno.label.style.fontSize));\n var textY = anno.label.position === 'top' ? 4 : anno.label.position === 'center' ? w.globals.gridHeight / 2 + (anno.label.orientation === 'vertical' ? textRects.width / 2 : 0) : w.globals.gridHeight;\n var elText = this.annoCtx.graphics.drawText({\n x: x1 + anno.label.offsetX,\n y: textY + anno.label.offsetY - (anno.label.orientation === 'vertical' ? anno.label.position === 'top' ? textRects.width / 2 - 12 : -textRects.width / 2 : 0),\n text: text,\n textAnchor: anno.label.textAnchor,\n fontSize: anno.label.style.fontSize,\n fontFamily: anno.label.style.fontFamily,\n fontWeight: anno.label.style.fontWeight,\n foreColor: anno.label.style.color,\n cssClass: \"apexcharts-xaxis-annotation-label \".concat(anno.label.style.cssClass, \" \").concat(anno.id ? anno.id : '')\n });\n elText.attr({\n rel: index\n });\n parent.appendChild(elText.node);\n\n // after placing the annotations on svg, set any vertically placed annotations\n this.annoCtx.helpers.setOrientations(anno, index);\n }\n }\n }, {\n key: \"drawXAxisAnnotations\",\n value: function drawXAxisAnnotations() {\n var _this = this;\n var w = this.w;\n var elg = this.annoCtx.graphics.group({\n class: 'apexcharts-xaxis-annotations'\n });\n w.config.annotations.xaxis.map(function (anno, index) {\n _this.addXaxisAnnotation(anno, elg.node, index);\n });\n return elg;\n }\n }]);\n return XAnnotations;\n }();\n\n /**\n * DateTime Class to manipulate datetime values.\n *\n * @module DateTime\n **/\n var DateTime = /*#__PURE__*/function () {\n function DateTime(ctx) {\n _classCallCheck(this, DateTime);\n this.ctx = ctx;\n this.w = ctx.w;\n this.months31 = [1, 3, 5, 7, 8, 10, 12];\n this.months30 = [2, 4, 6, 9, 11];\n this.daysCntOfYear = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];\n }\n _createClass(DateTime, [{\n key: \"isValidDate\",\n value: function isValidDate(date) {\n if (typeof date === 'number') {\n return false; // don't test for timestamps\n }\n return !isNaN(this.parseDate(date));\n }\n }, {\n key: \"getTimeStamp\",\n value: function getTimeStamp(dateStr) {\n if (!Date.parse(dateStr)) {\n return dateStr;\n }\n var utc = this.w.config.xaxis.labels.datetimeUTC;\n return !utc ? new Date(dateStr).getTime() : new Date(new Date(dateStr).toISOString().substr(0, 25)).getTime();\n }\n }, {\n key: \"getDate\",\n value: function getDate(timestamp) {\n var utc = this.w.config.xaxis.labels.datetimeUTC;\n return utc ? new Date(new Date(timestamp).toUTCString()) : new Date(timestamp);\n }\n }, {\n key: \"parseDate\",\n value: function parseDate(dateStr) {\n var parsed = Date.parse(dateStr);\n if (!isNaN(parsed)) {\n return this.getTimeStamp(dateStr);\n }\n var output = Date.parse(dateStr.replace(/-/g, '/').replace(/[a-z]+/gi, ' '));\n output = this.getTimeStamp(output);\n return output;\n }\n\n // This fixes the difference of x-axis labels between chrome/safari\n // Fixes #1726, #1544, #1485, #1255\n }, {\n key: \"parseDateWithTimezone\",\n value: function parseDateWithTimezone(dateStr) {\n return Date.parse(dateStr.replace(/-/g, '/').replace(/[a-z]+/gi, ' '));\n }\n\n // http://stackoverflow.com/questions/14638018/current-time-formatting-with-javascript#answer-14638191\n }, {\n key: \"formatDate\",\n value: function formatDate(date, format) {\n var locale = this.w.globals.locale;\n var utc = this.w.config.xaxis.labels.datetimeUTC;\n var MMMM = ['\\x00'].concat(_toConsumableArray(locale.months));\n var MMM = ['\\x01'].concat(_toConsumableArray(locale.shortMonths));\n var dddd = ['\\x02'].concat(_toConsumableArray(locale.days));\n var ddd = ['\\x03'].concat(_toConsumableArray(locale.shortDays));\n function ii(i, len) {\n var s = i + '';\n len = len || 2;\n while (s.length < len) {\n s = '0' + s;\n }\n return s;\n }\n var y = utc ? date.getUTCFullYear() : date.getFullYear();\n format = format.replace(/(^|[^\\\\])yyyy+/g, '$1' + y);\n format = format.replace(/(^|[^\\\\])yy/g, '$1' + y.toString().substr(2, 2));\n format = format.replace(/(^|[^\\\\])y/g, '$1' + y);\n var M = (utc ? date.getUTCMonth() : date.getMonth()) + 1;\n format = format.replace(/(^|[^\\\\])MMMM+/g, '$1' + MMMM[0]);\n format = format.replace(/(^|[^\\\\])MMM/g, '$1' + MMM[0]);\n format = format.replace(/(^|[^\\\\])MM/g, '$1' + ii(M));\n format = format.replace(/(^|[^\\\\])M/g, '$1' + M);\n var d = utc ? date.getUTCDate() : date.getDate();\n format = format.replace(/(^|[^\\\\])dddd+/g, '$1' + dddd[0]);\n format = format.replace(/(^|[^\\\\])ddd/g, '$1' + ddd[0]);\n format = format.replace(/(^|[^\\\\])dd/g, '$1' + ii(d));\n format = format.replace(/(^|[^\\\\])d/g, '$1' + d);\n var H = utc ? date.getUTCHours() : date.getHours();\n format = format.replace(/(^|[^\\\\])HH+/g, '$1' + ii(H));\n format = format.replace(/(^|[^\\\\])H/g, '$1' + H);\n var h = H > 12 ? H - 12 : H === 0 ? 12 : H;\n format = format.replace(/(^|[^\\\\])hh+/g, '$1' + ii(h));\n format = format.replace(/(^|[^\\\\])h/g, '$1' + h);\n var m = utc ? date.getUTCMinutes() : date.getMinutes();\n format = format.replace(/(^|[^\\\\])mm+/g, '$1' + ii(m));\n format = format.replace(/(^|[^\\\\])m/g, '$1' + m);\n var s = utc ? date.getUTCSeconds() : date.getSeconds();\n format = format.replace(/(^|[^\\\\])ss+/g, '$1' + ii(s));\n format = format.replace(/(^|[^\\\\])s/g, '$1' + s);\n var f = utc ? date.getUTCMilliseconds() : date.getMilliseconds();\n format = format.replace(/(^|[^\\\\])fff+/g, '$1' + ii(f, 3));\n f = Math.round(f / 10);\n format = format.replace(/(^|[^\\\\])ff/g, '$1' + ii(f));\n f = Math.round(f / 10);\n format = format.replace(/(^|[^\\\\])f/g, '$1' + f);\n var T = H < 12 ? 'AM' : 'PM';\n format = format.replace(/(^|[^\\\\])TT+/g, '$1' + T);\n format = format.replace(/(^|[^\\\\])T/g, '$1' + T.charAt(0));\n var t = T.toLowerCase();\n format = format.replace(/(^|[^\\\\])tt+/g, '$1' + t);\n format = format.replace(/(^|[^\\\\])t/g, '$1' + t.charAt(0));\n var tz = -date.getTimezoneOffset();\n var K = utc || !tz ? 'Z' : tz > 0 ? '+' : '-';\n if (!utc) {\n tz = Math.abs(tz);\n var tzHrs = Math.floor(tz / 60);\n var tzMin = tz % 60;\n K += ii(tzHrs) + ':' + ii(tzMin);\n }\n format = format.replace(/(^|[^\\\\])K/g, '$1' + K);\n var day = (utc ? date.getUTCDay() : date.getDay()) + 1;\n format = format.replace(new RegExp(dddd[0], 'g'), dddd[day]);\n format = format.replace(new RegExp(ddd[0], 'g'), ddd[day]);\n format = format.replace(new RegExp(MMMM[0], 'g'), MMMM[M]);\n format = format.replace(new RegExp(MMM[0], 'g'), MMM[M]);\n format = format.replace(/\\\\(.)/g, '$1');\n return format;\n }\n }, {\n key: \"getTimeUnitsfromTimestamp\",\n value: function getTimeUnitsfromTimestamp(minX, maxX, utc) {\n var w = this.w;\n if (w.config.xaxis.min !== undefined) {\n minX = w.config.xaxis.min;\n }\n if (w.config.xaxis.max !== undefined) {\n maxX = w.config.xaxis.max;\n }\n var tsMin = this.getDate(minX);\n var tsMax = this.getDate(maxX);\n var minD = this.formatDate(tsMin, 'yyyy MM dd HH mm ss fff').split(' ');\n var maxD = this.formatDate(tsMax, 'yyyy MM dd HH mm ss fff').split(' ');\n return {\n minMillisecond: parseInt(minD[6], 10),\n maxMillisecond: parseInt(maxD[6], 10),\n minSecond: parseInt(minD[5], 10),\n maxSecond: parseInt(maxD[5], 10),\n minMinute: parseInt(minD[4], 10),\n maxMinute: parseInt(maxD[4], 10),\n minHour: parseInt(minD[3], 10),\n maxHour: parseInt(maxD[3], 10),\n minDate: parseInt(minD[2], 10),\n maxDate: parseInt(maxD[2], 10),\n minMonth: parseInt(minD[1], 10) - 1,\n maxMonth: parseInt(maxD[1], 10) - 1,\n minYear: parseInt(minD[0], 10),\n maxYear: parseInt(maxD[0], 10)\n };\n }\n }, {\n key: \"isLeapYear\",\n value: function isLeapYear(year) {\n return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;\n }\n }, {\n key: \"calculcateLastDaysOfMonth\",\n value: function calculcateLastDaysOfMonth(month, year, subtract) {\n var days = this.determineDaysOfMonths(month, year);\n\n // whatever days we get, subtract the number of days asked\n return days - subtract;\n }\n }, {\n key: \"determineDaysOfYear\",\n value: function determineDaysOfYear(year) {\n var days = 365;\n if (this.isLeapYear(year)) {\n days = 366;\n }\n return days;\n }\n }, {\n key: \"determineRemainingDaysOfYear\",\n value: function determineRemainingDaysOfYear(year, month, date) {\n var dayOfYear = this.daysCntOfYear[month] + date;\n if (month > 1 && this.isLeapYear()) dayOfYear++;\n return dayOfYear;\n }\n }, {\n key: \"determineDaysOfMonths\",\n value: function determineDaysOfMonths(month, year) {\n var days = 30;\n month = Utils$1.monthMod(month);\n switch (true) {\n case this.months30.indexOf(month) > -1:\n if (month === 2) {\n if (this.isLeapYear(year)) {\n days = 29;\n } else {\n days = 28;\n }\n }\n break;\n case this.months31.indexOf(month) > -1:\n days = 31;\n break;\n default:\n days = 31;\n break;\n }\n return days;\n }\n }]);\n return DateTime;\n }();\n\n /**\n * ApexCharts Formatter Class for setting value formatters for axes as well as tooltips.\n *\n * @module Formatters\n **/\n var Formatters = /*#__PURE__*/function () {\n function Formatters(ctx) {\n _classCallCheck(this, Formatters);\n this.ctx = ctx;\n this.w = ctx.w;\n this.tooltipKeyFormat = 'dd MMM';\n }\n _createClass(Formatters, [{\n key: \"xLabelFormat\",\n value: function xLabelFormat(fn, val, timestamp, opts) {\n var w = this.w;\n if (w.config.xaxis.type === 'datetime') {\n if (w.config.xaxis.labels.formatter === undefined) {\n // if user has not specified a custom formatter, use the default tooltip.x.format\n if (w.config.tooltip.x.formatter === undefined) {\n var datetimeObj = new DateTime(this.ctx);\n return datetimeObj.formatDate(datetimeObj.getDate(val), w.config.tooltip.x.format);\n }\n }\n }\n return fn(val, timestamp, opts);\n }\n }, {\n key: \"defaultGeneralFormatter\",\n value: function defaultGeneralFormatter(val) {\n if (Array.isArray(val)) {\n return val.map(function (v) {\n return v;\n });\n } else {\n return val;\n }\n }\n }, {\n key: \"defaultYFormatter\",\n value: function defaultYFormatter(v, yaxe, i) {\n var w = this.w;\n if (Utils$1.isNumber(v)) {\n if (w.globals.yValueDecimal !== 0) {\n v = v.toFixed(yaxe.decimalsInFloat !== undefined ? yaxe.decimalsInFloat : w.globals.yValueDecimal);\n } else {\n // We have an integer value but the label is not an integer. We can\n // deduce this is due to the number of ticks exceeding the even lower\n // integer range. Add an additional decimal place only in this case.\n var f = v.toFixed(0);\n // Do not change the == to ===\n v = v == f ? f : v.toFixed(1);\n }\n }\n return v;\n }\n }, {\n key: \"setLabelFormatters\",\n value: function setLabelFormatters() {\n var _this = this;\n var w = this.w;\n w.globals.xaxisTooltipFormatter = function (val) {\n return _this.defaultGeneralFormatter(val);\n };\n w.globals.ttKeyFormatter = function (val) {\n return _this.defaultGeneralFormatter(val);\n };\n w.globals.ttZFormatter = function (val) {\n return val;\n };\n w.globals.legendFormatter = function (val) {\n return _this.defaultGeneralFormatter(val);\n };\n\n // formatter function will always overwrite format property\n if (w.config.xaxis.labels.formatter !== undefined) {\n w.globals.xLabelFormatter = w.config.xaxis.labels.formatter;\n } else {\n w.globals.xLabelFormatter = function (val) {\n if (Utils$1.isNumber(val)) {\n if (!w.config.xaxis.convertedCatToNumeric && w.config.xaxis.type === 'numeric') {\n if (Utils$1.isNumber(w.config.xaxis.decimalsInFloat)) {\n return val.toFixed(w.config.xaxis.decimalsInFloat);\n } else {\n var diff = w.globals.maxX - w.globals.minX;\n if (diff > 0 && diff < 100) {\n return val.toFixed(1);\n }\n return val.toFixed(0);\n }\n }\n if (w.globals.isBarHorizontal) {\n var range = w.globals.maxY - w.globals.minYArr;\n if (range < 4) {\n return val.toFixed(1);\n }\n }\n return val.toFixed(0);\n }\n return val;\n };\n }\n if (typeof w.config.tooltip.x.formatter === 'function') {\n w.globals.ttKeyFormatter = w.config.tooltip.x.formatter;\n } else {\n w.globals.ttKeyFormatter = w.globals.xLabelFormatter;\n }\n if (typeof w.config.xaxis.tooltip.formatter === 'function') {\n w.globals.xaxisTooltipFormatter = w.config.xaxis.tooltip.formatter;\n }\n if (Array.isArray(w.config.tooltip.y)) {\n w.globals.ttVal = w.config.tooltip.y;\n } else {\n if (w.config.tooltip.y.formatter !== undefined) {\n w.globals.ttVal = w.config.tooltip.y;\n }\n }\n if (w.config.tooltip.z.formatter !== undefined) {\n w.globals.ttZFormatter = w.config.tooltip.z.formatter;\n }\n\n // legend formatter - if user wants to append any global values of series to legend text\n if (w.config.legend.formatter !== undefined) {\n w.globals.legendFormatter = w.config.legend.formatter;\n }\n\n // formatter function will always overwrite format property\n w.config.yaxis.forEach(function (yaxe, i) {\n if (yaxe.labels.formatter !== undefined) {\n w.globals.yLabelFormatters[i] = yaxe.labels.formatter;\n } else {\n w.globals.yLabelFormatters[i] = function (val) {\n if (!w.globals.xyCharts) return val;\n if (Array.isArray(val)) {\n return val.map(function (v) {\n return _this.defaultYFormatter(v, yaxe, i);\n });\n } else {\n return _this.defaultYFormatter(val, yaxe, i);\n }\n };\n }\n });\n return w.globals;\n }\n }, {\n key: \"heatmapLabelFormatters\",\n value: function heatmapLabelFormatters() {\n var w = this.w;\n if (w.config.chart.type === 'heatmap') {\n w.globals.yAxisScale[0].result = w.globals.seriesNames.slice();\n\n // get the longest string from the labels array and also apply label formatter to it\n var longest = w.globals.seriesNames.reduce(function (a, b) {\n return a.length > b.length ? a : b;\n }, 0);\n w.globals.yAxisScale[0].niceMax = longest;\n w.globals.yAxisScale[0].niceMin = longest;\n }\n }\n }]);\n return Formatters;\n }();\n\n var AxesUtils = /*#__PURE__*/function () {\n function AxesUtils(ctx) {\n _classCallCheck(this, AxesUtils);\n this.ctx = ctx;\n this.w = ctx.w;\n }\n\n // Based on the formatter function, get the label text and position\n _createClass(AxesUtils, [{\n key: \"getLabel\",\n value: function getLabel(labels, timescaleLabels, x, i) {\n var drawnLabels = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : [];\n var fontSize = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : '12px';\n var isLeafGroup = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : true;\n var w = this.w;\n var rawLabel = typeof labels[i] === 'undefined' ? '' : labels[i];\n var label = rawLabel;\n var xlbFormatter = w.globals.xLabelFormatter;\n var customFormatter = w.config.xaxis.labels.formatter;\n var isBold = false;\n var xFormat = new Formatters(this.ctx);\n var timestamp = rawLabel;\n if (isLeafGroup) {\n label = xFormat.xLabelFormat(xlbFormatter, rawLabel, timestamp, {\n i: i,\n dateFormatter: new DateTime(this.ctx).formatDate,\n w: w\n });\n if (customFormatter !== undefined) {\n label = customFormatter(rawLabel, labels[i], {\n i: i,\n dateFormatter: new DateTime(this.ctx).formatDate,\n w: w\n });\n }\n }\n var determineHighestUnit = function determineHighestUnit(unit) {\n var highestUnit = null;\n timescaleLabels.forEach(function (t) {\n if (t.unit === 'month') {\n highestUnit = 'year';\n } else if (t.unit === 'day') {\n highestUnit = 'month';\n } else if (t.unit === 'hour') {\n highestUnit = 'day';\n } else if (t.unit === 'minute') {\n highestUnit = 'hour';\n }\n });\n return highestUnit === unit;\n };\n if (timescaleLabels.length > 0) {\n isBold = determineHighestUnit(timescaleLabels[i].unit);\n x = timescaleLabels[i].position;\n label = timescaleLabels[i].value;\n } else {\n if (w.config.xaxis.type === 'datetime' && customFormatter === undefined) {\n label = '';\n }\n }\n if (typeof label === 'undefined') label = '';\n label = Array.isArray(label) ? label : label.toString();\n var graphics = new Graphics(this.ctx);\n var textRect = {};\n if (w.globals.rotateXLabels && isLeafGroup) {\n textRect = graphics.getTextRects(label, parseInt(fontSize, 10), null, \"rotate(\".concat(w.config.xaxis.labels.rotate, \" 0 0)\"), false);\n } else {\n textRect = graphics.getTextRects(label, parseInt(fontSize, 10));\n }\n var allowDuplicatesInTimeScale = !w.config.xaxis.labels.showDuplicates && this.ctx.timeScale;\n if (!Array.isArray(label) && (String(label) === 'NaN' || drawnLabels.indexOf(label) >= 0 && allowDuplicatesInTimeScale)) {\n label = '';\n }\n return {\n x: x,\n text: label,\n textRect: textRect,\n isBold: isBold\n };\n }\n }, {\n key: \"checkLabelBasedOnTickamount\",\n value: function checkLabelBasedOnTickamount(i, label, labelsLen) {\n var w = this.w;\n var ticks = w.config.xaxis.tickAmount;\n if (ticks === 'dataPoints') ticks = Math.round(w.globals.gridWidth / 120);\n if (ticks > labelsLen) return label;\n var tickMultiple = Math.round(labelsLen / (ticks + 1));\n if (i % tickMultiple === 0) {\n return label;\n } else {\n label.text = '';\n }\n return label;\n }\n }, {\n key: \"checkForOverflowingLabels\",\n value: function checkForOverflowingLabels(i, label, labelsLen, drawnLabels, drawnLabelsRects) {\n var w = this.w;\n if (i === 0) {\n // check if first label is being truncated\n if (w.globals.skipFirstTimelinelabel) {\n label.text = '';\n }\n }\n if (i === labelsLen - 1) {\n // check if last label is being truncated\n if (w.globals.skipLastTimelinelabel) {\n label.text = '';\n }\n }\n if (w.config.xaxis.labels.hideOverlappingLabels && drawnLabels.length > 0) {\n var prev = drawnLabelsRects[drawnLabelsRects.length - 1];\n if (label.x < prev.textRect.width / (w.globals.rotateXLabels ? Math.abs(w.config.xaxis.labels.rotate) / 12 : 1.01) + prev.x) {\n label.text = '';\n }\n }\n return label;\n }\n }, {\n key: \"checkForReversedLabels\",\n value: function checkForReversedLabels(i, labels) {\n var w = this.w;\n if (w.config.yaxis[i] && w.config.yaxis[i].reversed) {\n labels.reverse();\n }\n return labels;\n }\n }, {\n key: \"yAxisAllSeriesCollapsed\",\n value: function yAxisAllSeriesCollapsed(index) {\n var gl = this.w.globals;\n return !gl.seriesYAxisMap[index].some(function (si) {\n return gl.collapsedSeriesIndices.indexOf(si) === -1;\n });\n }\n\n // Method to translate annotation.yAxisIndex values from\n // seriesName-as-a-string values to seriesName-as-an-array values (old style\n // series mapping to new style).\n }, {\n key: \"translateYAxisIndex\",\n value: function translateYAxisIndex(index) {\n var w = this.w;\n var gl = w.globals;\n var yaxis = w.config.yaxis;\n var newStyle = gl.series.length > yaxis.length || yaxis.some(function (a) {\n return Array.isArray(a.seriesName);\n });\n if (newStyle) {\n return index;\n } else {\n return gl.seriesYAxisReverseMap[index];\n }\n }\n }, {\n key: \"isYAxisHidden\",\n value: function isYAxisHidden(index) {\n var w = this.w;\n var yaxis = w.config.yaxis[index];\n if (!yaxis.show || this.yAxisAllSeriesCollapsed(index)) {\n return true;\n }\n if (!yaxis.showForNullSeries) {\n var seriesIndices = w.globals.seriesYAxisMap[index];\n var coreUtils = new CoreUtils(this.ctx);\n return seriesIndices.every(function (si) {\n return coreUtils.isSeriesNull(si);\n });\n }\n return false;\n }\n\n // get the label color for y-axis\n // realIndex is the actual series index, while i is the tick Index\n }, {\n key: \"getYAxisForeColor\",\n value: function getYAxisForeColor(yColors, realIndex) {\n var w = this.w;\n if (Array.isArray(yColors) && w.globals.yAxisScale[realIndex]) {\n this.ctx.theme.pushExtraColors(yColors, w.globals.yAxisScale[realIndex].result.length, false);\n }\n return yColors;\n }\n }, {\n key: \"drawYAxisTicks\",\n value: function drawYAxisTicks(x, tickAmount, axisBorder, axisTicks, realIndex, labelsDivider, elYaxis) {\n var w = this.w;\n var graphics = new Graphics(this.ctx);\n\n // initial label position = 0;\n var tY = w.globals.translateY + w.config.yaxis[realIndex].labels.offsetY;\n if (w.globals.isBarHorizontal) {\n tY = 0;\n } else if (w.config.chart.type === 'heatmap') {\n tY += labelsDivider / 2;\n }\n if (axisTicks.show && tickAmount > 0) {\n if (w.config.yaxis[realIndex].opposite === true) x = x + axisTicks.width;\n for (var i = tickAmount; i >= 0; i--) {\n var elTick = graphics.drawLine(x + axisBorder.offsetX - axisTicks.width + axisTicks.offsetX, tY + axisTicks.offsetY, x + axisBorder.offsetX + axisTicks.offsetX, tY + axisTicks.offsetY, axisTicks.color);\n elYaxis.add(elTick);\n tY += labelsDivider;\n }\n }\n }\n }]);\n return AxesUtils;\n }();\n\n var YAnnotations = /*#__PURE__*/function () {\n function YAnnotations(annoCtx) {\n _classCallCheck(this, YAnnotations);\n this.w = annoCtx.w;\n this.annoCtx = annoCtx;\n this.helpers = new Helpers$4(this.annoCtx);\n this.axesUtils = new AxesUtils(this.annoCtx);\n }\n _createClass(YAnnotations, [{\n key: \"addYaxisAnnotation\",\n value: function addYaxisAnnotation(anno, parent, index) {\n var w = this.w;\n var strokeDashArray = anno.strokeDashArray;\n var result = this.helpers.getY1Y2('y1', anno);\n var y1 = result.yP;\n var clipY1 = result.clipped;\n var y2;\n var clipY2 = true;\n var drawn = false;\n var text = anno.label.text;\n if (anno.y2 === null || typeof anno.y2 === 'undefined') {\n if (!clipY1) {\n drawn = true;\n var line = this.annoCtx.graphics.drawLine(0 + anno.offsetX,\n // x1\n y1 + anno.offsetY,\n // y1\n this._getYAxisAnnotationWidth(anno),\n // x2\n y1 + anno.offsetY,\n // y2\n anno.borderColor,\n // lineColor\n strokeDashArray,\n // dashArray\n anno.borderWidth);\n parent.appendChild(line.node);\n if (anno.id) {\n line.node.classList.add(anno.id);\n }\n }\n } else {\n result = this.helpers.getY1Y2('y2', anno);\n y2 = result.yP;\n clipY2 = result.clipped;\n if (y2 > y1) {\n var temp = y1;\n y1 = y2;\n y2 = temp;\n }\n if (!(clipY1 && clipY2)) {\n drawn = true;\n var rect = this.annoCtx.graphics.drawRect(0 + anno.offsetX,\n // x1\n y2 + anno.offsetY,\n // y1\n this._getYAxisAnnotationWidth(anno),\n // x2\n y1 - y2,\n // y2\n 0,\n // radius\n anno.fillColor,\n // color\n anno.opacity,\n // opacity,\n 1,\n // strokeWidth\n anno.borderColor,\n // strokeColor\n strokeDashArray // stokeDashArray\n );\n rect.node.classList.add('apexcharts-annotation-rect');\n rect.attr('clip-path', \"url(#gridRectMask\".concat(w.globals.cuid, \")\"));\n parent.appendChild(rect.node);\n if (anno.id) {\n rect.node.classList.add(anno.id);\n }\n }\n }\n if (drawn) {\n var textX = anno.label.position === 'right' ? w.globals.gridWidth : anno.label.position === 'center' ? w.globals.gridWidth / 2 : 0;\n var elText = this.annoCtx.graphics.drawText({\n x: textX + anno.label.offsetX,\n y: (y2 != null ? y2 : y1) + anno.label.offsetY - 3,\n text: text,\n textAnchor: anno.label.textAnchor,\n fontSize: anno.label.style.fontSize,\n fontFamily: anno.label.style.fontFamily,\n fontWeight: anno.label.style.fontWeight,\n foreColor: anno.label.style.color,\n cssClass: \"apexcharts-yaxis-annotation-label \".concat(anno.label.style.cssClass, \" \").concat(anno.id ? anno.id : '')\n });\n elText.attr({\n rel: index\n });\n parent.appendChild(elText.node);\n }\n }\n }, {\n key: \"_getYAxisAnnotationWidth\",\n value: function _getYAxisAnnotationWidth(anno) {\n // issue apexcharts.js#2009\n var w = this.w;\n var width = w.globals.gridWidth;\n if (anno.width.indexOf('%') > -1) {\n width = w.globals.gridWidth * parseInt(anno.width, 10) / 100;\n } else {\n width = parseInt(anno.width, 10);\n }\n return width + anno.offsetX;\n }\n }, {\n key: \"drawYAxisAnnotations\",\n value: function drawYAxisAnnotations() {\n var _this = this;\n var w = this.w;\n var elg = this.annoCtx.graphics.group({\n class: 'apexcharts-yaxis-annotations'\n });\n w.config.annotations.yaxis.forEach(function (anno, index) {\n anno.yAxisIndex = _this.axesUtils.translateYAxisIndex(anno.yAxisIndex);\n if (!(_this.axesUtils.isYAxisHidden(anno.yAxisIndex) && _this.axesUtils.yAxisAllSeriesCollapsed(anno.yAxisIndex))) {\n _this.addYaxisAnnotation(anno, elg.node, index);\n }\n });\n return elg;\n }\n }]);\n return YAnnotations;\n }();\n\n var PointAnnotations = /*#__PURE__*/function () {\n function PointAnnotations(annoCtx) {\n _classCallCheck(this, PointAnnotations);\n this.w = annoCtx.w;\n this.annoCtx = annoCtx;\n this.helpers = new Helpers$4(this.annoCtx);\n }\n _createClass(PointAnnotations, [{\n key: \"addPointAnnotation\",\n value: function addPointAnnotation(anno, parent, index) {\n var w = this.w;\n if (w.globals.collapsedSeriesIndices.indexOf(anno.seriesIndex) > -1) {\n return;\n }\n var result = this.helpers.getX1X2('x1', anno);\n var x = result.x;\n var clipX = result.clipped;\n result = this.helpers.getY1Y2('y1', anno);\n var y = result.yP;\n var clipY = result.clipped;\n if (!Utils$1.isNumber(x)) return;\n if (!(clipY || clipX)) {\n var optsPoints = {\n pSize: anno.marker.size,\n pointStrokeWidth: anno.marker.strokeWidth,\n pointFillColor: anno.marker.fillColor,\n pointStrokeColor: anno.marker.strokeColor,\n shape: anno.marker.shape,\n pRadius: anno.marker.radius,\n class: \"apexcharts-point-annotation-marker \".concat(anno.marker.cssClass, \" \").concat(anno.id ? anno.id : '')\n };\n var point = this.annoCtx.graphics.drawMarker(x + anno.marker.offsetX, y + anno.marker.offsetY, optsPoints);\n parent.appendChild(point.node);\n var text = anno.label.text ? anno.label.text : '';\n var elText = this.annoCtx.graphics.drawText({\n x: x + anno.label.offsetX,\n y: y + anno.label.offsetY - anno.marker.size - parseFloat(anno.label.style.fontSize) / 1.6,\n text: text,\n textAnchor: anno.label.textAnchor,\n fontSize: anno.label.style.fontSize,\n fontFamily: anno.label.style.fontFamily,\n fontWeight: anno.label.style.fontWeight,\n foreColor: anno.label.style.color,\n cssClass: \"apexcharts-point-annotation-label \".concat(anno.label.style.cssClass, \" \").concat(anno.id ? anno.id : '')\n });\n elText.attr({\n rel: index\n });\n parent.appendChild(elText.node);\n\n // TODO: deprecate this as we will use custom\n if (anno.customSVG.SVG) {\n var g = this.annoCtx.graphics.group({\n class: 'apexcharts-point-annotations-custom-svg ' + anno.customSVG.cssClass\n });\n g.attr({\n transform: \"translate(\".concat(x + anno.customSVG.offsetX, \", \").concat(y + anno.customSVG.offsetY, \")\")\n });\n g.node.innerHTML = anno.customSVG.SVG;\n parent.appendChild(g.node);\n }\n if (anno.image.path) {\n var imgWidth = anno.image.width ? anno.image.width : 20;\n var imgHeight = anno.image.height ? anno.image.height : 20;\n point = this.annoCtx.addImage({\n x: x + anno.image.offsetX - imgWidth / 2,\n y: y + anno.image.offsetY - imgHeight / 2,\n width: imgWidth,\n height: imgHeight,\n path: anno.image.path,\n appendTo: '.apexcharts-point-annotations'\n });\n }\n if (anno.mouseEnter) {\n point.node.addEventListener('mouseenter', anno.mouseEnter.bind(this, anno));\n }\n if (anno.mouseLeave) {\n point.node.addEventListener('mouseleave', anno.mouseLeave.bind(this, anno));\n }\n if (anno.click) {\n point.node.addEventListener('click', anno.click.bind(this, anno));\n }\n }\n }\n }, {\n key: \"drawPointAnnotations\",\n value: function drawPointAnnotations() {\n var _this = this;\n var w = this.w;\n var elg = this.annoCtx.graphics.group({\n class: 'apexcharts-point-annotations'\n });\n w.config.annotations.points.map(function (anno, index) {\n _this.addPointAnnotation(anno, elg.node, index);\n });\n return elg;\n }\n }]);\n return PointAnnotations;\n }();\n\n const name = \"en\";\n const options = {\n \tmonths: [\n \t\t\"January\",\n \t\t\"February\",\n \t\t\"March\",\n \t\t\"April\",\n \t\t\"May\",\n \t\t\"June\",\n \t\t\"July\",\n \t\t\"August\",\n \t\t\"September\",\n \t\t\"October\",\n \t\t\"November\",\n \t\t\"December\"\n \t],\n \tshortMonths: [\n \t\t\"Jan\",\n \t\t\"Feb\",\n \t\t\"Mar\",\n \t\t\"Apr\",\n \t\t\"May\",\n \t\t\"Jun\",\n \t\t\"Jul\",\n \t\t\"Aug\",\n \t\t\"Sep\",\n \t\t\"Oct\",\n \t\t\"Nov\",\n \t\t\"Dec\"\n \t],\n \tdays: [\n \t\t\"Sunday\",\n \t\t\"Monday\",\n \t\t\"Tuesday\",\n \t\t\"Wednesday\",\n \t\t\"Thursday\",\n \t\t\"Friday\",\n \t\t\"Saturday\"\n \t],\n \tshortDays: [\n \t\t\"Sun\",\n \t\t\"Mon\",\n \t\t\"Tue\",\n \t\t\"Wed\",\n \t\t\"Thu\",\n \t\t\"Fri\",\n \t\t\"Sat\"\n \t],\n \ttoolbar: {\n \t\texportToSVG: \"Download SVG\",\n \t\texportToPNG: \"Download PNG\",\n \t\texportToCSV: \"Download CSV\",\n \t\tmenu: \"Menu\",\n \t\tselection: \"Selection\",\n \t\tselectionZoom: \"Selection Zoom\",\n \t\tzoomIn: \"Zoom In\",\n \t\tzoomOut: \"Zoom Out\",\n \t\tpan: \"Panning\",\n \t\treset: \"Reset Zoom\"\n \t}\n };\n var en = {\n \tname: name,\n \toptions: options\n };\n\n var Options = /*#__PURE__*/function () {\n function Options() {\n _classCallCheck(this, Options);\n this.yAxis = {\n show: true,\n showAlways: false,\n showForNullSeries: true,\n seriesName: undefined,\n opposite: false,\n reversed: false,\n logarithmic: false,\n logBase: 10,\n tickAmount: undefined,\n stepSize: undefined,\n forceNiceScale: false,\n max: undefined,\n min: undefined,\n floating: false,\n decimalsInFloat: undefined,\n labels: {\n show: true,\n showDuplicates: false,\n minWidth: 0,\n maxWidth: 160,\n offsetX: 0,\n offsetY: 0,\n align: undefined,\n rotate: 0,\n padding: 20,\n style: {\n colors: [],\n fontSize: '11px',\n fontWeight: 400,\n fontFamily: undefined,\n cssClass: ''\n },\n formatter: undefined\n },\n axisBorder: {\n show: false,\n color: '#e0e0e0',\n width: 1,\n offsetX: 0,\n offsetY: 0\n },\n axisTicks: {\n show: false,\n color: '#e0e0e0',\n width: 6,\n offsetX: 0,\n offsetY: 0\n },\n title: {\n text: undefined,\n rotate: -90,\n offsetY: 0,\n offsetX: 0,\n style: {\n color: undefined,\n fontSize: '11px',\n fontWeight: 900,\n fontFamily: undefined,\n cssClass: ''\n }\n },\n tooltip: {\n enabled: false,\n offsetX: 0\n },\n crosshairs: {\n show: true,\n position: 'front',\n stroke: {\n color: '#b6b6b6',\n width: 1,\n dashArray: 0\n }\n }\n };\n this.pointAnnotation = {\n id: undefined,\n x: 0,\n y: null,\n yAxisIndex: 0,\n seriesIndex: undefined,\n mouseEnter: undefined,\n mouseLeave: undefined,\n click: undefined,\n marker: {\n size: 4,\n fillColor: '#fff',\n strokeWidth: 2,\n strokeColor: '#333',\n shape: 'circle',\n offsetX: 0,\n offsetY: 0,\n // radius: 2, // DEPRECATED\n cssClass: ''\n },\n label: {\n borderColor: '#c2c2c2',\n borderWidth: 1,\n borderRadius: 2,\n text: undefined,\n textAnchor: 'middle',\n offsetX: 0,\n offsetY: 0,\n mouseEnter: undefined,\n mouseLeave: undefined,\n click: undefined,\n style: {\n background: '#fff',\n color: undefined,\n fontSize: '11px',\n fontFamily: undefined,\n fontWeight: 400,\n cssClass: '',\n padding: {\n left: 5,\n right: 5,\n top: 2,\n bottom: 2\n }\n }\n },\n customSVG: {\n // this will be deprecated in the next major version as it is going to be replaced with a better alternative below (image)\n SVG: undefined,\n cssClass: undefined,\n offsetX: 0,\n offsetY: 0\n },\n image: {\n path: undefined,\n width: 20,\n height: 20,\n offsetX: 0,\n offsetY: 0\n }\n };\n this.yAxisAnnotation = {\n id: undefined,\n y: 0,\n y2: null,\n strokeDashArray: 1,\n fillColor: '#c2c2c2',\n borderColor: '#c2c2c2',\n borderWidth: 1,\n opacity: 0.3,\n offsetX: 0,\n offsetY: 0,\n width: '100%',\n yAxisIndex: 0,\n label: {\n borderColor: '#c2c2c2',\n borderWidth: 1,\n borderRadius: 2,\n text: undefined,\n textAnchor: 'end',\n position: 'right',\n offsetX: 0,\n offsetY: -3,\n mouseEnter: undefined,\n mouseLeave: undefined,\n click: undefined,\n style: {\n background: '#fff',\n color: undefined,\n fontSize: '11px',\n fontFamily: undefined,\n fontWeight: 400,\n cssClass: '',\n padding: {\n left: 5,\n right: 5,\n top: 2,\n bottom: 2\n }\n }\n }\n };\n this.xAxisAnnotation = {\n id: undefined,\n x: 0,\n x2: null,\n strokeDashArray: 1,\n fillColor: '#c2c2c2',\n borderColor: '#c2c2c2',\n borderWidth: 1,\n opacity: 0.3,\n offsetX: 0,\n offsetY: 0,\n label: {\n borderColor: '#c2c2c2',\n borderWidth: 1,\n borderRadius: 2,\n text: undefined,\n textAnchor: 'middle',\n orientation: 'vertical',\n position: 'top',\n offsetX: 0,\n offsetY: 0,\n mouseEnter: undefined,\n mouseLeave: undefined,\n click: undefined,\n style: {\n background: '#fff',\n color: undefined,\n fontSize: '11px',\n fontFamily: undefined,\n fontWeight: 400,\n cssClass: '',\n padding: {\n left: 5,\n right: 5,\n top: 2,\n bottom: 2\n }\n }\n }\n };\n this.text = {\n x: 0,\n y: 0,\n text: '',\n textAnchor: 'start',\n foreColor: undefined,\n fontSize: '13px',\n fontFamily: undefined,\n fontWeight: 400,\n appendTo: '.apexcharts-annotations',\n backgroundColor: 'transparent',\n borderColor: '#c2c2c2',\n borderRadius: 0,\n borderWidth: 0,\n paddingLeft: 4,\n paddingRight: 4,\n paddingTop: 2,\n paddingBottom: 2\n };\n }\n _createClass(Options, [{\n key: \"init\",\n value: function init() {\n return {\n annotations: {\n yaxis: [this.yAxisAnnotation],\n xaxis: [this.xAxisAnnotation],\n points: [this.pointAnnotation],\n texts: [],\n images: [],\n shapes: []\n },\n chart: {\n animations: {\n enabled: true,\n easing: 'easeinout',\n // linear, easeout, easein, easeinout, swing, bounce, elastic\n speed: 800,\n animateGradually: {\n delay: 150,\n enabled: true\n },\n dynamicAnimation: {\n enabled: true,\n speed: 350\n }\n },\n background: '',\n locales: [en],\n defaultLocale: 'en',\n dropShadow: {\n enabled: false,\n enabledOnSeries: undefined,\n top: 2,\n left: 2,\n blur: 4,\n color: '#000',\n opacity: 0.35\n },\n events: {\n animationEnd: undefined,\n beforeMount: undefined,\n mounted: undefined,\n updated: undefined,\n click: undefined,\n mouseMove: undefined,\n mouseLeave: undefined,\n xAxisLabelClick: undefined,\n legendClick: undefined,\n markerClick: undefined,\n selection: undefined,\n dataPointSelection: undefined,\n dataPointMouseEnter: undefined,\n dataPointMouseLeave: undefined,\n beforeZoom: undefined,\n beforeResetZoom: undefined,\n zoomed: undefined,\n scrolled: undefined,\n brushScrolled: undefined\n },\n foreColor: '#373d3f',\n fontFamily: 'Helvetica, Arial, sans-serif',\n height: 'auto',\n parentHeightOffset: 15,\n redrawOnParentResize: true,\n redrawOnWindowResize: true,\n id: undefined,\n group: undefined,\n nonce: undefined,\n offsetX: 0,\n offsetY: 0,\n selection: {\n enabled: false,\n type: 'x',\n // selectedPoints: undefined, // default datapoints that should be selected automatically\n fill: {\n color: '#24292e',\n opacity: 0.1\n },\n stroke: {\n width: 1,\n color: '#24292e',\n opacity: 0.4,\n dashArray: 3\n },\n xaxis: {\n min: undefined,\n max: undefined\n },\n yaxis: {\n min: undefined,\n max: undefined\n }\n },\n sparkline: {\n enabled: false\n },\n brush: {\n enabled: false,\n autoScaleYaxis: true,\n target: undefined,\n targets: undefined\n },\n stacked: false,\n stackOnlyBar: true,\n // mixed chart with stacked bars and line series - incorrect line draw #907\n stackType: 'normal',\n toolbar: {\n show: true,\n offsetX: 0,\n offsetY: 0,\n tools: {\n download: true,\n selection: true,\n zoom: true,\n zoomin: true,\n zoomout: true,\n pan: true,\n reset: true,\n customIcons: []\n },\n export: {\n csv: {\n filename: undefined,\n columnDelimiter: ',',\n headerCategory: 'category',\n headerValue: 'value',\n categoryFormatter: undefined,\n valueFormatter: undefined\n },\n png: {\n filename: undefined\n },\n svg: {\n filename: undefined\n },\n scale: undefined,\n width: undefined\n },\n autoSelected: 'zoom' // accepts -> zoom, pan, selection\n },\n type: 'line',\n width: '100%',\n zoom: {\n enabled: true,\n type: 'x',\n autoScaleYaxis: false,\n allowMouseWheelZoom: true,\n zoomedArea: {\n fill: {\n color: '#90CAF9',\n opacity: 0.4\n },\n stroke: {\n color: '#0D47A1',\n opacity: 0.4,\n width: 1\n }\n }\n }\n },\n plotOptions: {\n line: {\n isSlopeChart: false\n },\n area: {\n fillTo: 'origin'\n },\n bar: {\n horizontal: false,\n columnWidth: '70%',\n // should be in percent 0 - 100\n barHeight: '70%',\n // should be in percent 0 - 100\n distributed: false,\n borderRadius: 0,\n borderRadiusApplication: 'around',\n // [around, end]\n borderRadiusWhenStacked: 'last',\n // [all, last]\n rangeBarOverlap: true,\n rangeBarGroupRows: false,\n hideZeroBarsWhenGrouped: false,\n isDumbbell: false,\n dumbbellColors: undefined,\n isFunnel: false,\n isFunnel3d: true,\n colors: {\n ranges: [],\n backgroundBarColors: [],\n backgroundBarOpacity: 1,\n backgroundBarRadius: 0\n },\n dataLabels: {\n position: 'top',\n // top, center, bottom\n maxItems: 100,\n hideOverflowingLabels: true,\n orientation: 'horizontal',\n total: {\n enabled: false,\n formatter: undefined,\n offsetX: 0,\n offsetY: 0,\n style: {\n color: '#373d3f',\n fontSize: '12px',\n fontFamily: undefined,\n fontWeight: 600\n }\n }\n }\n },\n bubble: {\n zScaling: true,\n minBubbleRadius: undefined,\n maxBubbleRadius: undefined\n },\n candlestick: {\n colors: {\n upward: '#00B746',\n downward: '#EF403C'\n },\n wick: {\n useFillColor: true\n }\n },\n boxPlot: {\n colors: {\n upper: '#00E396',\n lower: '#008FFB'\n }\n },\n heatmap: {\n radius: 2,\n enableShades: true,\n shadeIntensity: 0.5,\n reverseNegativeShade: false,\n distributed: false,\n useFillColorAsStroke: false,\n colorScale: {\n inverse: false,\n ranges: [],\n min: undefined,\n max: undefined\n }\n },\n treemap: {\n enableShades: true,\n shadeIntensity: 0.5,\n distributed: false,\n reverseNegativeShade: false,\n useFillColorAsStroke: false,\n borderRadius: 4,\n dataLabels: {\n format: 'scale' // scale | truncate\n },\n colorScale: {\n inverse: false,\n ranges: [],\n min: undefined,\n max: undefined\n }\n },\n radialBar: {\n inverseOrder: false,\n startAngle: 0,\n endAngle: 360,\n offsetX: 0,\n offsetY: 0,\n hollow: {\n margin: 5,\n size: '50%',\n background: 'transparent',\n image: undefined,\n imageWidth: 150,\n imageHeight: 150,\n imageOffsetX: 0,\n imageOffsetY: 0,\n imageClipped: true,\n position: 'front',\n dropShadow: {\n enabled: false,\n top: 0,\n left: 0,\n blur: 3,\n color: '#000',\n opacity: 0.5\n }\n },\n track: {\n show: true,\n startAngle: undefined,\n endAngle: undefined,\n background: '#f2f2f2',\n strokeWidth: '97%',\n opacity: 1,\n margin: 5,\n // margin is in pixels\n dropShadow: {\n enabled: false,\n top: 0,\n left: 0,\n blur: 3,\n color: '#000',\n opacity: 0.5\n }\n },\n dataLabels: {\n show: true,\n name: {\n show: true,\n fontSize: '16px',\n fontFamily: undefined,\n fontWeight: 600,\n color: undefined,\n offsetY: 0,\n formatter: function formatter(val) {\n return val;\n }\n },\n value: {\n show: true,\n fontSize: '14px',\n fontFamily: undefined,\n fontWeight: 400,\n color: undefined,\n offsetY: 16,\n formatter: function formatter(val) {\n return val + '%';\n }\n },\n total: {\n show: false,\n label: 'Total',\n fontSize: '16px',\n fontWeight: 600,\n fontFamily: undefined,\n color: undefined,\n formatter: function formatter(w) {\n return w.globals.seriesTotals.reduce(function (a, b) {\n return a + b;\n }, 0) / w.globals.series.length + '%';\n }\n }\n },\n barLabels: {\n enabled: false,\n offsetX: 0,\n offsetY: 0,\n useSeriesColors: true,\n fontFamily: undefined,\n fontWeight: 600,\n fontSize: '16px',\n formatter: function formatter(val) {\n return val;\n },\n onClick: undefined\n }\n },\n pie: {\n customScale: 1,\n offsetX: 0,\n offsetY: 0,\n startAngle: 0,\n endAngle: 360,\n expandOnClick: true,\n dataLabels: {\n // These are the percentage values which are displayed on slice\n offset: 0,\n // offset by which labels will move outside\n minAngleToShowLabel: 10\n },\n donut: {\n size: '65%',\n background: 'transparent',\n labels: {\n // These are the inner labels appearing inside donut\n show: false,\n name: {\n show: true,\n fontSize: '16px',\n fontFamily: undefined,\n fontWeight: 600,\n color: undefined,\n offsetY: -10,\n formatter: function formatter(val) {\n return val;\n }\n },\n value: {\n show: true,\n fontSize: '20px',\n fontFamily: undefined,\n fontWeight: 400,\n color: undefined,\n offsetY: 10,\n formatter: function formatter(val) {\n return val;\n }\n },\n total: {\n show: false,\n showAlways: false,\n label: 'Total',\n fontSize: '16px',\n fontWeight: 400,\n fontFamily: undefined,\n color: undefined,\n formatter: function formatter(w) {\n return w.globals.seriesTotals.reduce(function (a, b) {\n return a + b;\n }, 0);\n }\n }\n }\n }\n },\n polarArea: {\n rings: {\n strokeWidth: 1,\n strokeColor: '#e8e8e8'\n },\n spokes: {\n strokeWidth: 1,\n connectorColors: '#e8e8e8'\n }\n },\n radar: {\n size: undefined,\n offsetX: 0,\n offsetY: 0,\n polygons: {\n // strokeColor: '#e8e8e8', // should be deprecated in the minor version i.e 3.2\n strokeWidth: 1,\n strokeColors: '#e8e8e8',\n connectorColors: '#e8e8e8',\n fill: {\n colors: undefined\n }\n }\n }\n },\n colors: undefined,\n dataLabels: {\n enabled: true,\n enabledOnSeries: undefined,\n formatter: function formatter(val) {\n return val !== null ? val : '';\n },\n textAnchor: 'middle',\n distributed: false,\n offsetX: 0,\n offsetY: 0,\n style: {\n fontSize: '12px',\n fontFamily: undefined,\n fontWeight: 600,\n colors: undefined\n },\n background: {\n enabled: true,\n foreColor: '#fff',\n borderRadius: 2,\n padding: 4,\n opacity: 0.9,\n borderWidth: 1,\n borderColor: '#fff',\n dropShadow: {\n enabled: false,\n top: 1,\n left: 1,\n blur: 1,\n color: '#000',\n opacity: 0.45\n }\n },\n dropShadow: {\n enabled: false,\n top: 1,\n left: 1,\n blur: 1,\n color: '#000',\n opacity: 0.45\n }\n },\n fill: {\n type: 'solid',\n colors: undefined,\n // array of colors\n opacity: 0.85,\n gradient: {\n shade: 'dark',\n type: 'horizontal',\n shadeIntensity: 0.5,\n gradientToColors: undefined,\n inverseColors: true,\n opacityFrom: 1,\n opacityTo: 1,\n stops: [0, 50, 100],\n colorStops: []\n },\n image: {\n src: [],\n width: undefined,\n // optional\n height: undefined // optional\n },\n pattern: {\n style: 'squares',\n // String | Array of Strings\n width: 6,\n height: 6,\n strokeWidth: 2\n }\n },\n forecastDataPoints: {\n count: 0,\n fillOpacity: 0.5,\n strokeWidth: undefined,\n dashArray: 4\n },\n grid: {\n show: true,\n borderColor: '#e0e0e0',\n strokeDashArray: 0,\n position: 'back',\n xaxis: {\n lines: {\n show: false\n }\n },\n yaxis: {\n lines: {\n show: true\n }\n },\n row: {\n colors: undefined,\n // takes as array which will be repeated on rows\n opacity: 0.5\n },\n column: {\n colors: undefined,\n // takes an array which will be repeated on columns\n opacity: 0.5\n },\n padding: {\n top: 0,\n right: 10,\n bottom: 0,\n left: 12\n }\n },\n labels: [],\n legend: {\n show: true,\n showForSingleSeries: false,\n showForNullSeries: true,\n showForZeroSeries: true,\n floating: false,\n position: 'bottom',\n // whether to position legends in 1 of 4\n // direction - top, bottom, left, right\n horizontalAlign: 'center',\n // when position top/bottom, you can specify whether to align legends left, right or center\n inverseOrder: false,\n fontSize: '12px',\n fontFamily: undefined,\n fontWeight: 400,\n width: undefined,\n height: undefined,\n formatter: undefined,\n tooltipHoverFormatter: undefined,\n offsetX: -20,\n offsetY: 4,\n customLegendItems: [],\n labels: {\n colors: undefined,\n useSeriesColors: false\n },\n markers: {\n size: 7,\n fillColors: undefined,\n strokeWidth: 1,\n shape: undefined,\n offsetX: 0,\n offsetY: 0,\n customHTML: undefined,\n onClick: undefined\n },\n itemMargin: {\n horizontal: 5,\n vertical: 4\n },\n onItemClick: {\n toggleDataSeries: true\n },\n onItemHover: {\n highlightDataSeries: true\n }\n },\n markers: {\n discrete: [],\n size: 0,\n colors: undefined,\n strokeColors: '#fff',\n strokeWidth: 2,\n strokeOpacity: 0.9,\n strokeDashArray: 0,\n fillOpacity: 1,\n shape: 'circle',\n offsetX: 0,\n offsetY: 0,\n showNullDataPoints: true,\n onClick: undefined,\n onDblClick: undefined,\n hover: {\n size: undefined,\n sizeOffset: 3\n }\n },\n noData: {\n text: undefined,\n align: 'center',\n verticalAlign: 'middle',\n offsetX: 0,\n offsetY: 0,\n style: {\n color: undefined,\n fontSize: '14px',\n fontFamily: undefined\n }\n },\n responsive: [],\n // breakpoints should follow ascending order 400, then 700, then 1000\n series: undefined,\n states: {\n normal: {\n filter: {\n type: 'none',\n value: 0\n }\n },\n hover: {\n filter: {\n type: 'lighten',\n value: 0.1\n }\n },\n active: {\n allowMultipleDataPointsSelection: false,\n filter: {\n type: 'darken',\n value: 0.5\n }\n }\n },\n title: {\n text: undefined,\n align: 'left',\n margin: 5,\n offsetX: 0,\n offsetY: 0,\n floating: false,\n style: {\n fontSize: '14px',\n fontWeight: 900,\n fontFamily: undefined,\n color: undefined\n }\n },\n subtitle: {\n text: undefined,\n align: 'left',\n margin: 5,\n offsetX: 0,\n offsetY: 30,\n floating: false,\n style: {\n fontSize: '12px',\n fontWeight: 400,\n fontFamily: undefined,\n color: undefined\n }\n },\n stroke: {\n show: true,\n curve: 'smooth',\n // \"smooth\" / \"straight\" / \"monotoneCubic\" / \"stepline\" / \"linestep\"\n lineCap: 'butt',\n // round, butt , square\n width: 2,\n colors: undefined,\n // array of colors\n dashArray: 0,\n // single value or array of values\n fill: {\n type: 'solid',\n colors: undefined,\n // array of colors\n opacity: 0.85,\n gradient: {\n shade: 'dark',\n type: 'horizontal',\n shadeIntensity: 0.5,\n gradientToColors: undefined,\n inverseColors: true,\n opacityFrom: 1,\n opacityTo: 1,\n stops: [0, 50, 100],\n colorStops: []\n }\n }\n },\n tooltip: {\n enabled: true,\n enabledOnSeries: undefined,\n shared: true,\n hideEmptySeries: false,\n followCursor: false,\n // when disabled, the tooltip will show on top of the series instead of mouse position\n intersect: false,\n // when enabled, tooltip will only show when user directly hovers over point\n inverseOrder: false,\n custom: undefined,\n fillSeriesColor: false,\n theme: 'light',\n cssClass: '',\n style: {\n fontSize: '12px',\n fontFamily: undefined\n },\n onDatasetHover: {\n highlightDataSeries: false\n },\n x: {\n // x value\n show: true,\n format: 'dd MMM',\n // dd/MM, dd MMM yy, dd MMM yyyy\n formatter: undefined // a custom user supplied formatter function\n },\n y: {\n formatter: undefined,\n title: {\n formatter: function formatter(seriesName) {\n return seriesName ? seriesName + ': ' : '';\n }\n }\n },\n z: {\n formatter: undefined,\n title: 'Size: '\n },\n marker: {\n show: true,\n fillColors: undefined\n },\n items: {\n display: 'flex'\n },\n fixed: {\n enabled: false,\n position: 'topRight',\n // topRight, topLeft, bottomRight, bottomLeft\n offsetX: 0,\n offsetY: 0\n }\n },\n xaxis: {\n type: 'category',\n categories: [],\n convertedCatToNumeric: false,\n // internal property which should not be altered outside\n offsetX: 0,\n offsetY: 0,\n overwriteCategories: undefined,\n labels: {\n show: true,\n rotate: -45,\n rotateAlways: false,\n hideOverlappingLabels: true,\n trim: false,\n minHeight: undefined,\n maxHeight: 120,\n showDuplicates: true,\n style: {\n colors: [],\n fontSize: '12px',\n fontWeight: 400,\n fontFamily: undefined,\n cssClass: ''\n },\n offsetX: 0,\n offsetY: 0,\n format: undefined,\n formatter: undefined,\n // custom formatter function which will override format\n datetimeUTC: true,\n datetimeFormatter: {\n year: 'yyyy',\n month: \"MMM 'yy\",\n day: 'dd MMM',\n hour: 'HH:mm',\n minute: 'HH:mm:ss',\n second: 'HH:mm:ss'\n }\n },\n group: {\n groups: [],\n style: {\n colors: [],\n fontSize: '12px',\n fontWeight: 400,\n fontFamily: undefined,\n cssClass: ''\n }\n },\n axisBorder: {\n show: true,\n color: '#e0e0e0',\n width: '100%',\n height: 1,\n offsetX: 0,\n offsetY: 0\n },\n axisTicks: {\n show: true,\n color: '#e0e0e0',\n height: 6,\n offsetX: 0,\n offsetY: 0\n },\n stepSize: undefined,\n tickAmount: undefined,\n tickPlacement: 'on',\n min: undefined,\n max: undefined,\n range: undefined,\n floating: false,\n decimalsInFloat: undefined,\n position: 'bottom',\n title: {\n text: undefined,\n offsetX: 0,\n offsetY: 0,\n style: {\n color: undefined,\n fontSize: '12px',\n fontWeight: 900,\n fontFamily: undefined,\n cssClass: ''\n }\n },\n crosshairs: {\n show: true,\n width: 1,\n // tickWidth/barWidth or an integer\n position: 'back',\n opacity: 0.9,\n stroke: {\n color: '#b6b6b6',\n width: 1,\n dashArray: 3\n },\n fill: {\n type: 'solid',\n // solid, gradient\n color: '#B1B9C4',\n gradient: {\n colorFrom: '#D8E3F0',\n colorTo: '#BED1E6',\n stops: [0, 100],\n opacityFrom: 0.4,\n opacityTo: 0.5\n }\n },\n dropShadow: {\n enabled: false,\n left: 0,\n top: 0,\n blur: 1,\n opacity: 0.4\n }\n },\n tooltip: {\n enabled: true,\n offsetY: 0,\n formatter: undefined,\n style: {\n fontSize: '12px',\n fontFamily: undefined\n }\n }\n },\n yaxis: this.yAxis,\n theme: {\n mode: '',\n palette: 'palette1',\n // If defined, it will overwrite globals.colors variable\n monochrome: {\n // monochrome allows you to select just 1 color and fill out the rest with light/dark shade (intensity can be selected)\n enabled: false,\n color: '#008FFB',\n shadeTo: 'light',\n shadeIntensity: 0.65\n }\n }\n };\n }\n }]);\n return Options;\n }();\n\n /**\n * ApexCharts Annotations Class for drawing lines/rects on both xaxis and yaxis.\n *\n * @module Annotations\n **/\n var Annotations = /*#__PURE__*/function () {\n function Annotations(ctx) {\n _classCallCheck(this, Annotations);\n this.ctx = ctx;\n this.w = ctx.w;\n this.graphics = new Graphics(this.ctx);\n if (this.w.globals.isBarHorizontal) {\n this.invertAxis = true;\n }\n this.helpers = new Helpers$4(this);\n this.xAxisAnnotations = new XAnnotations(this);\n this.yAxisAnnotations = new YAnnotations(this);\n this.pointsAnnotations = new PointAnnotations(this);\n if (this.w.globals.isBarHorizontal && this.w.config.yaxis[0].reversed) {\n this.inversedReversedAxis = true;\n }\n this.xDivision = this.w.globals.gridWidth / this.w.globals.dataPoints;\n }\n _createClass(Annotations, [{\n key: \"drawAxesAnnotations\",\n value: function drawAxesAnnotations() {\n var w = this.w;\n if (w.globals.axisCharts && w.globals.dataPoints) {\n // w.globals.dataPoints check added to fix #1832\n var yAnnotations = this.yAxisAnnotations.drawYAxisAnnotations();\n var xAnnotations = this.xAxisAnnotations.drawXAxisAnnotations();\n var pointAnnotations = this.pointsAnnotations.drawPointAnnotations();\n var initialAnim = w.config.chart.animations.enabled;\n var annoArray = [yAnnotations, xAnnotations, pointAnnotations];\n var annoElArray = [xAnnotations.node, yAnnotations.node, pointAnnotations.node];\n for (var i = 0; i < 3; i++) {\n w.globals.dom.elGraphical.add(annoArray[i]);\n if (initialAnim && !w.globals.resized && !w.globals.dataChanged) {\n // fixes apexcharts/apexcharts.js#685\n if (w.config.chart.type !== 'scatter' && w.config.chart.type !== 'bubble' && w.globals.dataPoints > 1) {\n annoElArray[i].classList.add('apexcharts-element-hidden');\n }\n }\n w.globals.delayedElements.push({\n el: annoElArray[i],\n index: 0\n });\n }\n\n // background sizes needs to be calculated after text is drawn, so calling them last\n this.helpers.annotationsBackground();\n }\n }\n }, {\n key: \"drawImageAnnos\",\n value: function drawImageAnnos() {\n var _this = this;\n var w = this.w;\n w.config.annotations.images.map(function (s, index) {\n _this.addImage(s, index);\n });\n }\n }, {\n key: \"drawTextAnnos\",\n value: function drawTextAnnos() {\n var _this2 = this;\n var w = this.w;\n w.config.annotations.texts.map(function (t, index) {\n _this2.addText(t, index);\n });\n }\n }, {\n key: \"addXaxisAnnotation\",\n value: function addXaxisAnnotation(anno, parent, index) {\n this.xAxisAnnotations.addXaxisAnnotation(anno, parent, index);\n }\n }, {\n key: \"addYaxisAnnotation\",\n value: function addYaxisAnnotation(anno, parent, index) {\n this.yAxisAnnotations.addYaxisAnnotation(anno, parent, index);\n }\n }, {\n key: \"addPointAnnotation\",\n value: function addPointAnnotation(anno, parent, index) {\n this.pointsAnnotations.addPointAnnotation(anno, parent, index);\n }\n }, {\n key: \"addText\",\n value: function addText(params, index) {\n var x = params.x,\n y = params.y,\n text = params.text,\n textAnchor = params.textAnchor,\n foreColor = params.foreColor,\n fontSize = params.fontSize,\n fontFamily = params.fontFamily,\n fontWeight = params.fontWeight,\n cssClass = params.cssClass,\n backgroundColor = params.backgroundColor,\n borderWidth = params.borderWidth,\n strokeDashArray = params.strokeDashArray,\n borderRadius = params.borderRadius,\n borderColor = params.borderColor,\n _params$appendTo = params.appendTo,\n appendTo = _params$appendTo === void 0 ? '.apexcharts-svg' : _params$appendTo,\n _params$paddingLeft = params.paddingLeft,\n paddingLeft = _params$paddingLeft === void 0 ? 4 : _params$paddingLeft,\n _params$paddingRight = params.paddingRight,\n paddingRight = _params$paddingRight === void 0 ? 4 : _params$paddingRight,\n _params$paddingBottom = params.paddingBottom,\n paddingBottom = _params$paddingBottom === void 0 ? 2 : _params$paddingBottom,\n _params$paddingTop = params.paddingTop,\n paddingTop = _params$paddingTop === void 0 ? 2 : _params$paddingTop;\n var w = this.w;\n var elText = this.graphics.drawText({\n x: x,\n y: y,\n text: text,\n textAnchor: textAnchor || 'start',\n fontSize: fontSize || '12px',\n fontWeight: fontWeight || 'regular',\n fontFamily: fontFamily || w.config.chart.fontFamily,\n foreColor: foreColor || w.config.chart.foreColor,\n cssClass: 'apexcharts-text ' + cssClass ? cssClass : ''\n });\n var parent = w.globals.dom.baseEl.querySelector(appendTo);\n if (parent) {\n parent.appendChild(elText.node);\n }\n var textRect = elText.bbox();\n if (text) {\n var elRect = this.graphics.drawRect(textRect.x - paddingLeft, textRect.y - paddingTop, textRect.width + paddingLeft + paddingRight, textRect.height + paddingBottom + paddingTop, borderRadius, backgroundColor ? backgroundColor : 'transparent', 1, borderWidth, borderColor, strokeDashArray);\n parent.insertBefore(elRect.node, elText.node);\n }\n }\n }, {\n key: \"addImage\",\n value: function addImage(params, index) {\n var w = this.w;\n var path = params.path,\n _params$x = params.x,\n x = _params$x === void 0 ? 0 : _params$x,\n _params$y = params.y,\n y = _params$y === void 0 ? 0 : _params$y,\n _params$width = params.width,\n width = _params$width === void 0 ? 20 : _params$width,\n _params$height = params.height,\n height = _params$height === void 0 ? 20 : _params$height,\n _params$appendTo2 = params.appendTo,\n appendTo = _params$appendTo2 === void 0 ? '.apexcharts-svg' : _params$appendTo2;\n var img = w.globals.dom.Paper.image(path);\n img.size(width, height).move(x, y);\n var parent = w.globals.dom.baseEl.querySelector(appendTo);\n if (parent) {\n parent.appendChild(img.node);\n }\n return img;\n }\n\n // The addXaxisAnnotation method requires a parent class, and user calling this method externally on the chart instance may not specify parent, hence a different method\n }, {\n key: \"addXaxisAnnotationExternal\",\n value: function addXaxisAnnotationExternal(params, pushToMemory, context) {\n this.addAnnotationExternal({\n params: params,\n pushToMemory: pushToMemory,\n context: context,\n type: 'xaxis',\n contextMethod: context.addXaxisAnnotation\n });\n return context;\n }\n }, {\n key: \"addYaxisAnnotationExternal\",\n value: function addYaxisAnnotationExternal(params, pushToMemory, context) {\n this.addAnnotationExternal({\n params: params,\n pushToMemory: pushToMemory,\n context: context,\n type: 'yaxis',\n contextMethod: context.addYaxisAnnotation\n });\n return context;\n }\n }, {\n key: \"addPointAnnotationExternal\",\n value: function addPointAnnotationExternal(params, pushToMemory, context) {\n if (typeof this.invertAxis === 'undefined') {\n this.invertAxis = context.w.globals.isBarHorizontal;\n }\n this.addAnnotationExternal({\n params: params,\n pushToMemory: pushToMemory,\n context: context,\n type: 'point',\n contextMethod: context.addPointAnnotation\n });\n return context;\n }\n }, {\n key: \"addAnnotationExternal\",\n value: function addAnnotationExternal(_ref) {\n var params = _ref.params,\n pushToMemory = _ref.pushToMemory,\n context = _ref.context,\n type = _ref.type,\n contextMethod = _ref.contextMethod;\n var me = context;\n var w = me.w;\n var parent = w.globals.dom.baseEl.querySelector(\".apexcharts-\".concat(type, \"-annotations\"));\n var index = parent.childNodes.length + 1;\n var options = new Options();\n var axesAnno = Object.assign({}, type === 'xaxis' ? options.xAxisAnnotation : type === 'yaxis' ? options.yAxisAnnotation : options.pointAnnotation);\n var anno = Utils$1.extend(axesAnno, params);\n switch (type) {\n case 'xaxis':\n this.addXaxisAnnotation(anno, parent, index);\n break;\n case 'yaxis':\n this.addYaxisAnnotation(anno, parent, index);\n break;\n case 'point':\n this.addPointAnnotation(anno, parent, index);\n break;\n }\n\n // add background\n var axesAnnoLabel = w.globals.dom.baseEl.querySelector(\".apexcharts-\".concat(type, \"-annotations .apexcharts-\").concat(type, \"-annotation-label[rel='\").concat(index, \"']\"));\n var elRect = this.helpers.addBackgroundToAnno(axesAnnoLabel, anno);\n if (elRect) {\n parent.insertBefore(elRect.node, axesAnnoLabel);\n }\n if (pushToMemory) {\n w.globals.memory.methodsToExec.push({\n context: me,\n id: anno.id ? anno.id : Utils$1.randomId(),\n method: contextMethod,\n label: 'addAnnotation',\n params: params\n });\n }\n return context;\n }\n }, {\n key: \"clearAnnotations\",\n value: function clearAnnotations(ctx) {\n var w = ctx.w;\n var annos = w.globals.dom.baseEl.querySelectorAll('.apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations');\n\n // annotations added externally should be cleared out too\n for (var i = w.globals.memory.methodsToExec.length - 1; i >= 0; i--) {\n if (w.globals.memory.methodsToExec[i].label === 'addText' || w.globals.memory.methodsToExec[i].label === 'addAnnotation') {\n w.globals.memory.methodsToExec.splice(i, 1);\n }\n }\n annos = Utils$1.listToArray(annos);\n\n // delete the DOM elements\n Array.prototype.forEach.call(annos, function (a) {\n while (a.firstChild) {\n a.removeChild(a.firstChild);\n }\n });\n }\n }, {\n key: \"removeAnnotation\",\n value: function removeAnnotation(ctx, id) {\n var w = ctx.w;\n var annos = w.globals.dom.baseEl.querySelectorAll(\".\".concat(id));\n if (annos) {\n w.globals.memory.methodsToExec.map(function (m, i) {\n if (m.id === id) {\n w.globals.memory.methodsToExec.splice(i, 1);\n }\n });\n Array.prototype.forEach.call(annos, function (a) {\n a.parentElement.removeChild(a);\n });\n }\n }\n }]);\n return Annotations;\n }();\n\n /**\n * ApexCharts Default Class for setting default options for all chart types.\n *\n * @module Defaults\n **/\n\n var getRangeValues = function getRangeValues(_ref) {\n var _w$config$series$seri;\n var isTimeline = _ref.isTimeline,\n ctx = _ref.ctx,\n seriesIndex = _ref.seriesIndex,\n dataPointIndex = _ref.dataPointIndex,\n y1 = _ref.y1,\n y2 = _ref.y2,\n w = _ref.w;\n var start = w.globals.seriesRangeStart[seriesIndex][dataPointIndex];\n var end = w.globals.seriesRangeEnd[seriesIndex][dataPointIndex];\n var ylabel = w.globals.labels[dataPointIndex];\n var seriesName = w.config.series[seriesIndex].name ? w.config.series[seriesIndex].name : '';\n var yLbFormatter = w.globals.ttKeyFormatter;\n var yLbTitleFormatter = w.config.tooltip.y.title.formatter;\n var opts = {\n w: w,\n seriesIndex: seriesIndex,\n dataPointIndex: dataPointIndex,\n start: start,\n end: end\n };\n if (typeof yLbTitleFormatter === 'function') {\n seriesName = yLbTitleFormatter(seriesName, opts);\n }\n if ((_w$config$series$seri = w.config.series[seriesIndex].data[dataPointIndex]) !== null && _w$config$series$seri !== void 0 && _w$config$series$seri.x) {\n ylabel = w.config.series[seriesIndex].data[dataPointIndex].x;\n }\n if (!isTimeline) {\n if (w.config.xaxis.type === 'datetime') {\n var xFormat = new Formatters(ctx);\n ylabel = xFormat.xLabelFormat(w.globals.ttKeyFormatter, ylabel, ylabel, {\n i: undefined,\n dateFormatter: new DateTime(ctx).formatDate,\n w: w\n });\n }\n }\n if (typeof yLbFormatter === 'function') {\n ylabel = yLbFormatter(ylabel, opts);\n }\n if (Number.isFinite(y1) && Number.isFinite(y2)) {\n start = y1;\n end = y2;\n }\n var startVal = '';\n var endVal = '';\n var color = w.globals.colors[seriesIndex];\n if (w.config.tooltip.x.formatter === undefined) {\n if (w.config.xaxis.type === 'datetime') {\n var datetimeObj = new DateTime(ctx);\n startVal = datetimeObj.formatDate(datetimeObj.getDate(start), w.config.tooltip.x.format);\n endVal = datetimeObj.formatDate(datetimeObj.getDate(end), w.config.tooltip.x.format);\n } else {\n startVal = start;\n endVal = end;\n }\n } else {\n startVal = w.config.tooltip.x.formatter(start);\n endVal = w.config.tooltip.x.formatter(end);\n }\n return {\n start: start,\n end: end,\n startVal: startVal,\n endVal: endVal,\n ylabel: ylabel,\n color: color,\n seriesName: seriesName\n };\n };\n var buildRangeTooltipHTML = function buildRangeTooltipHTML(opts) {\n var color = opts.color,\n seriesName = opts.seriesName,\n ylabel = opts.ylabel,\n start = opts.start,\n end = opts.end,\n seriesIndex = opts.seriesIndex,\n dataPointIndex = opts.dataPointIndex;\n var formatter = opts.ctx.tooltip.tooltipLabels.getFormatters(seriesIndex);\n start = formatter.yLbFormatter(start);\n end = formatter.yLbFormatter(end);\n var val = formatter.yLbFormatter(opts.w.globals.series[seriesIndex][dataPointIndex]);\n var valueHTML = '';\n var rangeValues = \"\\n \".concat(start, \"\\n - \\n \").concat(end, \"\\n \");\n if (opts.w.globals.comboCharts) {\n if (opts.w.config.series[seriesIndex].type === 'rangeArea' || opts.w.config.series[seriesIndex].type === 'rangeBar') {\n valueHTML = rangeValues;\n } else {\n valueHTML = \"\".concat(val, \"\");\n }\n } else {\n valueHTML = rangeValues;\n }\n return '
';\n };\n var Defaults = /*#__PURE__*/function () {\n function Defaults(opts) {\n _classCallCheck(this, Defaults);\n this.opts = opts;\n }\n _createClass(Defaults, [{\n key: \"hideYAxis\",\n value: function hideYAxis() {\n this.opts.yaxis[0].show = false;\n this.opts.yaxis[0].title.text = '';\n this.opts.yaxis[0].axisBorder.show = false;\n this.opts.yaxis[0].axisTicks.show = false;\n this.opts.yaxis[0].floating = true;\n }\n }, {\n key: \"line\",\n value: function line() {\n return {\n chart: {\n animations: {\n easing: 'swing'\n }\n },\n dataLabels: {\n enabled: false\n },\n stroke: {\n width: 5,\n curve: 'straight'\n },\n markers: {\n size: 0,\n hover: {\n sizeOffset: 6\n }\n },\n xaxis: {\n crosshairs: {\n width: 1\n }\n }\n };\n }\n }, {\n key: \"sparkline\",\n value: function sparkline(defaults) {\n this.hideYAxis();\n var ret = {\n grid: {\n show: false,\n padding: {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n }\n },\n legend: {\n show: false\n },\n xaxis: {\n labels: {\n show: false\n },\n tooltip: {\n enabled: false\n },\n axisBorder: {\n show: false\n },\n axisTicks: {\n show: false\n }\n },\n chart: {\n toolbar: {\n show: false\n },\n zoom: {\n enabled: false\n }\n },\n dataLabels: {\n enabled: false\n }\n };\n return Utils$1.extend(defaults, ret);\n }\n }, {\n key: \"slope\",\n value: function slope() {\n this.hideYAxis();\n return {\n chart: {\n toolbar: {\n show: false\n },\n zoom: {\n enabled: false\n }\n },\n dataLabels: {\n enabled: true,\n formatter: function formatter(val, opts) {\n var seriesName = opts.w.config.series[opts.seriesIndex].name;\n return val !== null ? seriesName + ': ' + val : '';\n },\n background: {\n enabled: false\n },\n offsetX: -5\n },\n grid: {\n xaxis: {\n lines: {\n show: true\n }\n },\n yaxis: {\n lines: {\n show: false\n }\n }\n },\n xaxis: {\n position: 'top',\n labels: {\n style: {\n fontSize: 14,\n fontWeight: 900\n }\n },\n tooltip: {\n enabled: false\n },\n crosshairs: {\n show: false\n }\n },\n markers: {\n size: 8,\n hover: {\n sizeOffset: 1\n }\n },\n legend: {\n show: false\n },\n tooltip: {\n shared: false,\n intersect: true,\n followCursor: true\n },\n stroke: {\n width: 5,\n curve: 'straight'\n }\n };\n }\n }, {\n key: \"bar\",\n value: function bar() {\n return {\n chart: {\n stacked: false,\n animations: {\n easing: 'swing'\n }\n },\n plotOptions: {\n bar: {\n dataLabels: {\n position: 'center'\n }\n }\n },\n dataLabels: {\n style: {\n colors: ['#fff']\n },\n background: {\n enabled: false\n }\n },\n stroke: {\n width: 0,\n lineCap: 'round'\n },\n fill: {\n opacity: 0.85\n },\n legend: {\n markers: {\n shape: 'square'\n }\n },\n tooltip: {\n shared: false,\n intersect: true\n },\n xaxis: {\n tooltip: {\n enabled: false\n },\n tickPlacement: 'between',\n crosshairs: {\n width: 'barWidth',\n position: 'back',\n fill: {\n type: 'gradient'\n },\n dropShadow: {\n enabled: false\n },\n stroke: {\n width: 0\n }\n }\n }\n };\n }\n }, {\n key: \"funnel\",\n value: function funnel() {\n this.hideYAxis();\n return _objectSpread2(_objectSpread2({}, this.bar()), {}, {\n chart: {\n animations: {\n easing: 'linear',\n speed: 800,\n animateGradually: {\n enabled: false\n }\n }\n },\n plotOptions: {\n bar: {\n horizontal: true,\n borderRadiusApplication: 'around',\n borderRadius: 0,\n dataLabels: {\n position: 'center'\n }\n }\n },\n grid: {\n show: false,\n padding: {\n left: 0,\n right: 0\n }\n },\n xaxis: {\n labels: {\n show: false\n },\n tooltip: {\n enabled: false\n },\n axisBorder: {\n show: false\n },\n axisTicks: {\n show: false\n }\n }\n });\n }\n }, {\n key: \"candlestick\",\n value: function candlestick() {\n var _this = this;\n return {\n stroke: {\n width: 1,\n colors: ['#333']\n },\n fill: {\n opacity: 1\n },\n dataLabels: {\n enabled: false\n },\n tooltip: {\n shared: true,\n custom: function custom(_ref2) {\n var seriesIndex = _ref2.seriesIndex,\n dataPointIndex = _ref2.dataPointIndex,\n w = _ref2.w;\n return _this._getBoxTooltip(w, seriesIndex, dataPointIndex, ['Open', 'High', '', 'Low', 'Close'], 'candlestick');\n }\n },\n states: {\n active: {\n filter: {\n type: 'none'\n }\n }\n },\n xaxis: {\n crosshairs: {\n width: 1\n }\n }\n };\n }\n }, {\n key: \"boxPlot\",\n value: function boxPlot() {\n var _this2 = this;\n return {\n chart: {\n animations: {\n dynamicAnimation: {\n enabled: false\n }\n }\n },\n stroke: {\n width: 1,\n colors: ['#24292e']\n },\n dataLabels: {\n enabled: false\n },\n tooltip: {\n shared: true,\n custom: function custom(_ref3) {\n var seriesIndex = _ref3.seriesIndex,\n dataPointIndex = _ref3.dataPointIndex,\n w = _ref3.w;\n return _this2._getBoxTooltip(w, seriesIndex, dataPointIndex, ['Minimum', 'Q1', 'Median', 'Q3', 'Maximum'], 'boxPlot');\n }\n },\n markers: {\n size: 7,\n strokeWidth: 1,\n strokeColors: '#111'\n },\n xaxis: {\n crosshairs: {\n width: 1\n }\n }\n };\n }\n }, {\n key: \"rangeBar\",\n value: function rangeBar() {\n var handleTimelineTooltip = function handleTimelineTooltip(opts) {\n var _getRangeValues = getRangeValues(_objectSpread2(_objectSpread2({}, opts), {}, {\n isTimeline: true\n })),\n color = _getRangeValues.color,\n seriesName = _getRangeValues.seriesName,\n ylabel = _getRangeValues.ylabel,\n startVal = _getRangeValues.startVal,\n endVal = _getRangeValues.endVal;\n return buildRangeTooltipHTML(_objectSpread2(_objectSpread2({}, opts), {}, {\n color: color,\n seriesName: seriesName,\n ylabel: ylabel,\n start: startVal,\n end: endVal\n }));\n };\n var handleRangeColumnTooltip = function handleRangeColumnTooltip(opts) {\n var _getRangeValues2 = getRangeValues(opts),\n color = _getRangeValues2.color,\n seriesName = _getRangeValues2.seriesName,\n ylabel = _getRangeValues2.ylabel,\n start = _getRangeValues2.start,\n end = _getRangeValues2.end;\n return buildRangeTooltipHTML(_objectSpread2(_objectSpread2({}, opts), {}, {\n color: color,\n seriesName: seriesName,\n ylabel: ylabel,\n start: start,\n end: end\n }));\n };\n return {\n chart: {\n animations: {\n animateGradually: false\n }\n },\n stroke: {\n width: 0,\n lineCap: 'square'\n },\n plotOptions: {\n bar: {\n borderRadius: 0,\n dataLabels: {\n position: 'center'\n }\n }\n },\n dataLabels: {\n enabled: false,\n formatter: function formatter(val, _ref4) {\n _ref4.ctx;\n var seriesIndex = _ref4.seriesIndex,\n dataPointIndex = _ref4.dataPointIndex,\n w = _ref4.w;\n var getVal = function getVal() {\n var start = w.globals.seriesRangeStart[seriesIndex][dataPointIndex];\n var end = w.globals.seriesRangeEnd[seriesIndex][dataPointIndex];\n return end - start;\n };\n if (w.globals.comboCharts) {\n if (w.config.series[seriesIndex].type === 'rangeBar' || w.config.series[seriesIndex].type === 'rangeArea') {\n return getVal();\n } else {\n return val;\n }\n } else {\n return getVal();\n }\n },\n background: {\n enabled: false\n },\n style: {\n colors: ['#fff']\n }\n },\n markers: {\n size: 10\n },\n tooltip: {\n shared: false,\n followCursor: true,\n custom: function custom(opts) {\n if (opts.w.config.plotOptions && opts.w.config.plotOptions.bar && opts.w.config.plotOptions.bar.horizontal) {\n return handleTimelineTooltip(opts);\n } else {\n return handleRangeColumnTooltip(opts);\n }\n }\n },\n xaxis: {\n tickPlacement: 'between',\n tooltip: {\n enabled: false\n },\n crosshairs: {\n stroke: {\n width: 0\n }\n }\n }\n };\n }\n }, {\n key: \"dumbbell\",\n value: function dumbbell(opts) {\n var _opts$plotOptions$bar, _opts$plotOptions$bar2;\n if (!((_opts$plotOptions$bar = opts.plotOptions.bar) !== null && _opts$plotOptions$bar !== void 0 && _opts$plotOptions$bar.barHeight)) {\n opts.plotOptions.bar.barHeight = 2;\n }\n if (!((_opts$plotOptions$bar2 = opts.plotOptions.bar) !== null && _opts$plotOptions$bar2 !== void 0 && _opts$plotOptions$bar2.columnWidth)) {\n opts.plotOptions.bar.columnWidth = 2;\n }\n return opts;\n }\n }, {\n key: \"area\",\n value: function area() {\n return {\n stroke: {\n width: 4,\n fill: {\n type: 'solid',\n gradient: {\n inverseColors: false,\n shade: 'light',\n type: 'vertical',\n opacityFrom: 0.65,\n opacityTo: 0.5,\n stops: [0, 100, 100]\n }\n }\n },\n fill: {\n type: 'gradient',\n gradient: {\n inverseColors: false,\n shade: 'light',\n type: 'vertical',\n opacityFrom: 0.65,\n opacityTo: 0.5,\n stops: [0, 100, 100]\n }\n },\n markers: {\n size: 0,\n hover: {\n sizeOffset: 6\n }\n },\n tooltip: {\n followCursor: false\n }\n };\n }\n }, {\n key: \"rangeArea\",\n value: function rangeArea() {\n var handleRangeAreaTooltip = function handleRangeAreaTooltip(opts) {\n var _getRangeValues3 = getRangeValues(opts),\n color = _getRangeValues3.color,\n seriesName = _getRangeValues3.seriesName,\n ylabel = _getRangeValues3.ylabel,\n start = _getRangeValues3.start,\n end = _getRangeValues3.end;\n return buildRangeTooltipHTML(_objectSpread2(_objectSpread2({}, opts), {}, {\n color: color,\n seriesName: seriesName,\n ylabel: ylabel,\n start: start,\n end: end\n }));\n };\n return {\n stroke: {\n curve: 'straight',\n width: 0\n },\n fill: {\n type: 'solid',\n opacity: 0.6\n },\n markers: {\n size: 0\n },\n states: {\n hover: {\n filter: {\n type: 'none'\n }\n },\n active: {\n filter: {\n type: 'none'\n }\n }\n },\n tooltip: {\n intersect: false,\n shared: true,\n followCursor: true,\n custom: function custom(opts) {\n return handleRangeAreaTooltip(opts);\n }\n }\n };\n }\n }, {\n key: \"brush\",\n value: function brush(defaults) {\n var ret = {\n chart: {\n toolbar: {\n autoSelected: 'selection',\n show: false\n },\n zoom: {\n enabled: false\n }\n },\n dataLabels: {\n enabled: false\n },\n stroke: {\n width: 1\n },\n tooltip: {\n enabled: false\n },\n xaxis: {\n tooltip: {\n enabled: false\n }\n }\n };\n return Utils$1.extend(defaults, ret);\n }\n }, {\n key: \"stacked100\",\n value: function stacked100(opts) {\n opts.dataLabels = opts.dataLabels || {};\n opts.dataLabels.formatter = opts.dataLabels.formatter || undefined;\n var existingDataLabelFormatter = opts.dataLabels.formatter;\n opts.yaxis.forEach(function (yaxe, index) {\n opts.yaxis[index].min = 0;\n opts.yaxis[index].max = 100;\n });\n var isBar = opts.chart.type === 'bar';\n if (isBar) {\n opts.dataLabels.formatter = existingDataLabelFormatter || function (val) {\n if (typeof val === 'number') {\n return val ? val.toFixed(0) + '%' : val;\n }\n return val;\n };\n }\n return opts;\n }\n }, {\n key: \"stackedBars\",\n value: function stackedBars() {\n var barDefaults = this.bar();\n return _objectSpread2(_objectSpread2({}, barDefaults), {}, {\n plotOptions: _objectSpread2(_objectSpread2({}, barDefaults.plotOptions), {}, {\n bar: _objectSpread2(_objectSpread2({}, barDefaults.plotOptions.bar), {}, {\n borderRadiusApplication: 'end',\n borderRadiusWhenStacked: 'last'\n })\n })\n });\n }\n\n // This function removes the left and right spacing in chart for line/area/scatter if xaxis type = category for those charts by converting xaxis = numeric. Numeric/Datetime xaxis prevents the unnecessary spacing in the left/right of the chart area\n }, {\n key: \"convertCatToNumeric\",\n value: function convertCatToNumeric(opts) {\n opts.xaxis.convertedCatToNumeric = true;\n return opts;\n }\n }, {\n key: \"convertCatToNumericXaxis\",\n value: function convertCatToNumericXaxis(opts, ctx, cats) {\n opts.xaxis.type = 'numeric';\n opts.xaxis.labels = opts.xaxis.labels || {};\n opts.xaxis.labels.formatter = opts.xaxis.labels.formatter || function (val) {\n return Utils$1.isNumber(val) ? Math.floor(val) : val;\n };\n var defaultFormatter = opts.xaxis.labels.formatter;\n var labels = opts.xaxis.categories && opts.xaxis.categories.length ? opts.xaxis.categories : opts.labels;\n if (cats && cats.length) {\n labels = cats.map(function (c) {\n return Array.isArray(c) ? c : String(c);\n });\n }\n if (labels && labels.length) {\n opts.xaxis.labels.formatter = function (val) {\n return Utils$1.isNumber(val) ? defaultFormatter(labels[Math.floor(val) - 1]) : defaultFormatter(val);\n };\n }\n opts.xaxis.categories = [];\n opts.labels = [];\n opts.xaxis.tickAmount = opts.xaxis.tickAmount || 'dataPoints';\n return opts;\n }\n }, {\n key: \"bubble\",\n value: function bubble() {\n return {\n dataLabels: {\n style: {\n colors: ['#fff']\n }\n },\n tooltip: {\n shared: false,\n intersect: true\n },\n xaxis: {\n crosshairs: {\n width: 0\n }\n },\n fill: {\n type: 'solid',\n gradient: {\n shade: 'light',\n inverse: true,\n shadeIntensity: 0.55,\n opacityFrom: 0.4,\n opacityTo: 0.8\n }\n }\n };\n }\n }, {\n key: \"scatter\",\n value: function scatter() {\n return {\n dataLabels: {\n enabled: false\n },\n tooltip: {\n shared: false,\n intersect: true\n },\n markers: {\n size: 6,\n strokeWidth: 1,\n hover: {\n sizeOffset: 2\n }\n }\n };\n }\n }, {\n key: \"heatmap\",\n value: function heatmap() {\n return {\n chart: {\n stacked: false\n },\n fill: {\n opacity: 1\n },\n dataLabels: {\n style: {\n colors: ['#fff']\n }\n },\n stroke: {\n colors: ['#fff']\n },\n tooltip: {\n followCursor: true,\n marker: {\n show: false\n },\n x: {\n show: false\n }\n },\n legend: {\n position: 'top',\n markers: {\n shape: 'square'\n }\n },\n grid: {\n padding: {\n right: 20\n }\n }\n };\n }\n }, {\n key: \"treemap\",\n value: function treemap() {\n return {\n chart: {\n zoom: {\n enabled: false\n }\n },\n dataLabels: {\n style: {\n fontSize: 14,\n fontWeight: 600,\n colors: ['#fff']\n }\n },\n stroke: {\n show: true,\n width: 2,\n colors: ['#fff']\n },\n legend: {\n show: false\n },\n fill: {\n opacity: 1,\n gradient: {\n stops: [0, 100]\n }\n },\n tooltip: {\n followCursor: true,\n x: {\n show: false\n }\n },\n grid: {\n padding: {\n left: 0,\n right: 0\n }\n },\n xaxis: {\n crosshairs: {\n show: false\n },\n tooltip: {\n enabled: false\n }\n }\n };\n }\n }, {\n key: \"pie\",\n value: function pie() {\n return {\n chart: {\n toolbar: {\n show: false\n }\n },\n plotOptions: {\n pie: {\n donut: {\n labels: {\n show: false\n }\n }\n }\n },\n dataLabels: {\n formatter: function formatter(val) {\n return val.toFixed(1) + '%';\n },\n style: {\n colors: ['#fff']\n },\n background: {\n enabled: false\n },\n dropShadow: {\n enabled: true\n }\n },\n stroke: {\n colors: ['#fff']\n },\n fill: {\n opacity: 1,\n gradient: {\n shade: 'light',\n stops: [0, 100]\n }\n },\n tooltip: {\n theme: 'dark',\n fillSeriesColor: true\n },\n legend: {\n position: 'right'\n },\n grid: {\n padding: {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n }\n }\n };\n }\n }, {\n key: \"donut\",\n value: function donut() {\n return {\n chart: {\n toolbar: {\n show: false\n }\n },\n dataLabels: {\n formatter: function formatter(val) {\n return val.toFixed(1) + '%';\n },\n style: {\n colors: ['#fff']\n },\n background: {\n enabled: false\n },\n dropShadow: {\n enabled: true\n }\n },\n stroke: {\n colors: ['#fff']\n },\n fill: {\n opacity: 1,\n gradient: {\n shade: 'light',\n shadeIntensity: 0.35,\n stops: [80, 100],\n opacityFrom: 1,\n opacityTo: 1\n }\n },\n tooltip: {\n theme: 'dark',\n fillSeriesColor: true\n },\n legend: {\n position: 'right'\n },\n grid: {\n padding: {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n }\n }\n };\n }\n }, {\n key: \"polarArea\",\n value: function polarArea() {\n return {\n chart: {\n toolbar: {\n show: false\n }\n },\n dataLabels: {\n formatter: function formatter(val) {\n return val.toFixed(1) + '%';\n },\n enabled: false\n },\n stroke: {\n show: true,\n width: 2\n },\n fill: {\n opacity: 0.7\n },\n tooltip: {\n theme: 'dark',\n fillSeriesColor: true\n },\n legend: {\n position: 'right'\n },\n grid: {\n padding: {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n }\n }\n };\n }\n }, {\n key: \"radar\",\n value: function radar() {\n this.opts.yaxis[0].labels.offsetY = this.opts.yaxis[0].labels.offsetY ? this.opts.yaxis[0].labels.offsetY : 6;\n return {\n dataLabels: {\n enabled: false,\n style: {\n fontSize: '11px'\n }\n },\n stroke: {\n width: 2\n },\n markers: {\n size: 5,\n strokeWidth: 1,\n strokeOpacity: 1\n },\n fill: {\n opacity: 0.2\n },\n tooltip: {\n shared: false,\n intersect: true,\n followCursor: true\n },\n grid: {\n show: false,\n padding: {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n }\n },\n xaxis: {\n labels: {\n formatter: function formatter(val) {\n return val;\n },\n style: {\n colors: ['#a8a8a8'],\n fontSize: '11px'\n }\n },\n tooltip: {\n enabled: false\n },\n crosshairs: {\n show: false\n }\n }\n };\n }\n }, {\n key: \"radialBar\",\n value: function radialBar() {\n return {\n chart: {\n animations: {\n dynamicAnimation: {\n enabled: true,\n speed: 800\n }\n },\n toolbar: {\n show: false\n }\n },\n fill: {\n gradient: {\n shade: 'dark',\n shadeIntensity: 0.4,\n inverseColors: false,\n type: 'diagonal2',\n opacityFrom: 1,\n opacityTo: 1,\n stops: [70, 98, 100]\n }\n },\n legend: {\n show: false,\n position: 'right'\n },\n tooltip: {\n enabled: false,\n fillSeriesColor: true\n },\n grid: {\n padding: {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n }\n }\n };\n }\n }, {\n key: \"_getBoxTooltip\",\n value: function _getBoxTooltip(w, seriesIndex, dataPointIndex, labels, chartType) {\n var o = w.globals.seriesCandleO[seriesIndex][dataPointIndex];\n var h = w.globals.seriesCandleH[seriesIndex][dataPointIndex];\n var m = w.globals.seriesCandleM[seriesIndex][dataPointIndex];\n var l = w.globals.seriesCandleL[seriesIndex][dataPointIndex];\n var c = w.globals.seriesCandleC[seriesIndex][dataPointIndex];\n if (w.config.series[seriesIndex].type && w.config.series[seriesIndex].type !== chartType) {\n return \"