/*!
 * ApexCharts v5.10.4
 * (c) 2018-2026 ApexCharts
 */
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).ApexCharts=e()}(this,function(){"use strict";var t=Object.defineProperty,e=Object.defineProperties,s=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,r=(e,s,i)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[s]=i,n=(t,e)=>{for(var s in e||(e={}))a.call(e,s)&&r(t,s,e[s]);if(i)for(var s of i(e))o.call(e,s)&&r(t,s,e[s]);return t},l=(t,i)=>e(t,s(i)),h=(t,e,s)=>r(t,"symbol"!=typeof e?e+"":e,s);class c{static isSSR(){return"undefined"==typeof window||"undefined"==typeof document}static isBrowser(){return!this.isSSR()}static hasAPI(t){return!this.isSSR()&&void 0!==window[t]}static getApex(){return"undefined"!=typeof window&&window.Apex?window.Apex:"undefined"!=typeof global&&global.Apex?global.Apex:{}}}class d{constructor(t,e=null){this.nodeName=t,this.namespaceURI=e,this.attributes=new Map,this.children=[],this.textContent="",this.style={},this.classList=new g,this.parentNode=null,this._ssrWidth=void 0,this._ssrHeight=void 0,this._ssrMode=void 0}setAttribute(t,e){this.attributes.set(t,e)}getAttribute(t){return this.attributes.get(t)}removeAttribute(t){this.attributes.delete(t)}hasAttribute(t){return this.attributes.has(t)}appendChild(t){if(t&&t!==this){if(t.parentNode&&t.parentNode!==this)t.parentNode.removeChild(t);else if(t.parentNode===this){const e=this.children.indexOf(t);-1!==e&&this.children.splice(e,1)}t.parentNode=this,this.children.push(t)}return t}removeChild(t){const e=this.children.indexOf(t);return-1!==e&&(this.children.splice(e,1),t.parentNode=null),t}insertBefore(t,e){if(!e)return this.appendChild(t);if(t.parentNode&&t.parentNode!==this)t.parentNode.removeChild(t);else if(t.parentNode===this){const e=this.children.indexOf(t);-1!==e&&this.children.splice(e,1)}const s=this.children.indexOf(e);return-1!==s&&(t.parentNode=this,this.children.splice(s,0,t)),t}cloneNode(t=!1){const e=new d(this.nodeName,this.namespaceURI);return e.textContent=this.textContent,this.attributes.forEach((t,s)=>{e.attributes.set(s,t)}),Object.assign(e.style,this.style),t&&this.children.forEach(t=>{t.cloneNode&&e.appendChild(t.cloneNode(!0))}),e}getBoundingClientRect(){return{width:this._ssrWidth||0,height:this._ssrHeight||0,top:0,left:0,right:this._ssrWidth||0,bottom:this._ssrHeight||0,x:0,y:0}}getRootNode(){let t=this;for(;t.parentNode;)t=t.parentNode;return t}querySelector(){return null}querySelectorAll(){return[]}getElementsByClassName(){return[]}addEventListener(){}removeEventListener(){}get childNodes(){return this.children}toString(){let t="";if(this.attributes.forEach((e,s)=>{t+=` ${s}="${e}"`}),0===this.children.length&&!this.textContent)return`<${this.nodeName}${t}/>`;const e=this.children.map(t=>t.toString()).join("");return`<${this.nodeName}${t}>${this.textContent}${e}</${this.nodeName}>`}get innerHTML(){return this.children.map(t=>t.toString()).join("")}set innerHTML(t){this.children=[],this.textContent=t}get outerHTML(){return this.toString()}get isConnected(){return!0}}class g{constructor(){this.classes=new Set}add(...t){t.forEach(t=>this.classes.add(t))}remove(...t){t.forEach(t=>this.classes.delete(t))}contains(t){return this.classes.has(t)}toggle(t,e){return!0===e?(this.classes.add(t),!0):!1===e||this.classes.has(t)?(this.classes.delete(t),!1):(this.classes.add(t),!0)}toString(){return Array.from(this.classes).join(" ")}}class p{constructor(){this.SVGNS="http://www.w3.org/2000/svg",this.XLINKNS="http://www.w3.org/1999/xlink"}createElementNS(t,e){return new d(e,t)}createTextNode(t){const e={nodeName:"#text",nodeType:3,textContent:t,toString:()=>e.textContent};return e}querySelector(){return null}querySelectorAll(){return[]}getComputedStyle(){return{}}getBoundingClientRect(t){return t&&t.getBoundingClientRect?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}createXMLSerializer(){return{serializeToString:t=>t.toString?t.toString():""}}createDOMParser(){return{parseFromString(t,e){const s=new d("root");return s.innerHTML=t,{documentElement:s}}}}}let x=null,u=null,f=null;class b{static init(){c.isSSR()&&!x&&(x=new p)}static createElement(t){return c.isSSR()?(x||this.init(),x.createElementNS(null,t)):document.createElement(t)}static createElementNS(t,e){return c.isSSR()?(x||this.init(),x.createElementNS(t,e)):document.createElementNS(t,e)}static createTextNode(t){return c.isSSR()?(x||this.init(),x.createTextNode(t)):document.createTextNode(t)}static querySelector(t){return c.isSSR()?null:document.querySelector(t)}static querySelectorAll(t){return c.isSSR()?[]:document.querySelectorAll(t)}static getComputedStyle(t){return c.isSSR()?{}:window.getComputedStyle(t)}static getBoundingClientRect(t){return c.isSSR()?(x||this.init(),x.getBoundingClientRect(t)):t?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return c.isSSR()?(x||this.init(),u||(u=x.createXMLSerializer()),u):(u||(u=new XMLSerializer),u)}static getDOMParser(){return c.isSSR()?(x||this.init(),f||(f=x.createDOMParser()),f):(f||(f=new DOMParser),f)}static addWindowEventListener(t,e,s){c.isBrowser()&&window.addEventListener(t,e,s)}static removeWindowEventListener(t,e,s){c.isBrowser()&&window.removeEventListener(t,e,s)}static requestAnimationFrame(t){return c.isBrowser()?window.requestAnimationFrame(t):(t(0),null)}static cancelAnimationFrame(t){c.isBrowser()&&t&&window.cancelAnimationFrame(t)}static elementExists(t){return!!t&&(c.isSSR()?!0===t._ssrMode||void 0!==t.nodeName:!!t.getRootNode&&(t.getRootNode({composed:!0})===document||t.isConnected))}static getWindow(){return c.isBrowser()?window:null}static getDocument(){return c.isBrowser()?document:null}static _getShim(){return x}static _resetShim(){x=null,u=null,f=null}}let m=class t{static isObject(t){return t&&"object"==typeof t&&!Array.isArray(t)}static is(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}static isSafari(){return c.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(t,e){const s=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach(i=>{this.isObject(e[i])?i in t?s[i]=this.extend(t[i],e[i]):Object.assign(s,{[i]:e[i]}):Object.assign(s,{[i]:e[i]})}),s}static extendArray(e,s){const i=[];return e.map(e=>{i.push(t.extend(s,e))}),e=i}static monthMod(t){return t%12}static clone(t,e=new WeakMap,s=!1){if(null===t||"object"!=typeof t)return t;if(e.has(t))return e.get(t);let i;if(Array.isArray(t))if(s)i=t.slice();else{i=[],e.set(t,i);for(let s=0;s<t.length;s++)i[s]=this.clone(t[s],e,!1)}else if(t instanceof Date)i=new Date(t.getTime());else if(s)i=Object.assign({},t);else{i={},e.set(t,i);for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(i[s]=this.clone(t[s],e,!1))}return i}static shallowClone(t){return null===t||"object"!=typeof t?t:Array.isArray(t)?t.slice():Object.assign({},t)}static shallowEqual(t,e){if(t===e)return!0;if(!t||!e)return!1;if("object"!=typeof t||"object"!=typeof e)return t===e;const s=Object.keys(t),i=Object.keys(e);if(s.length!==i.length)return!1;for(const i of s)if(t[i]!==e[i])return!1;return!0}static log10(t){return Math.log(t)/Math.LN10}static roundToBase10(t){return Math.pow(10,Math.floor(Math.log10(t)))}static roundToBase(t,e){return Math.pow(e,Math.floor(Math.log(t)/Math.log(e)))}static parseNumber(t){return"number"==typeof t||null===t?t:parseFloat(t)}static stripNumber(t,e=2){return Number.isInteger(t)?t:parseFloat(t.toPrecision(e))}static randomId(){return(Math.random()+1).toString(36).substring(4)}static noExponents(t){return t.toString().includes("e")?Math.round(t):t}static elementExists(t){return!(!t||!t.isConnected)}static isInShadowDOM(e){if(!e||!e.getRootNode)return!1;const s=e.getRootNode();return s&&s!==document&&t.is("ShadowRoot",s)}static getShadowRootHost(e){if(!t.isInShadowDOM(e))return null;return e.getRootNode().host||null}static getDimensions(t){if(!t)return[0,0];if(c.isSSR())return[t._ssrWidth||400,t._ssrHeight||300];const e=t.getRootNode&&t.getRootNode();if(e&&e!==document&&e.host){const t=e.host.getBoundingClientRect();return[t.width,t.height]}let s;try{s=getComputedStyle(t,null)}catch(e){return[t.clientWidth||0,t.clientHeight||0]}let i=t.clientHeight,a=t.clientWidth;return i-=parseFloat(s.paddingTop)+parseFloat(s.paddingBottom),a-=parseFloat(s.paddingLeft)+parseFloat(s.paddingRight),[a,i]}static getBoundingClientRect(t){if(!t)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(c.isSSR())return b.getBoundingClientRect(t);const e=t.getBoundingClientRect();return{top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:t.clientWidth,height:t.clientHeight,x:e.left,y:e.top}}static getLargestStringFromArr(t){return t.reduce((t,e)=>(Array.isArray(e)&&(e=e.reduce((t,e)=>t.length>e.length?t:e)),t.length>e.length?t:e),0)}static hexToRgba(t="#999999",e=.6){"#"!==t.substring(0,1)&&(t="#999999");const s=t.replace("#",""),i=s.match(new RegExp("(.{"+s.length/3+"})","g"))||[];for(let t=0;t<i.length;t++)i[t]=parseInt(1===i[t].length?i[t]+i[t]:i[t],16);return void 0!==e&&i.push(e),"rgba("+i.join(",")+")"}static getOpacityFromRGBA(t){return parseFloat(t.replace(/^.*,(.+)\)/,"$1"))}static rgb2hex(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""}shadeRGBColor(t,e){const s=e.split(","),i=t<0?0:255,a=t<0?-1*t:t,o=parseInt(s[0].slice(4),10),r=parseInt(s[1],10),n=parseInt(s[2],10);return"rgb("+(Math.round((i-o)*a)+o)+","+(Math.round((i-r)*a)+r)+","+(Math.round((i-n)*a)+n)+")"}shadeHexColor(t,e){const s=parseInt(e.slice(1),16),i=t<0?0:255,a=t<0?-1*t:t,o=s>>16,r=s>>8&255,n=255&s;return"#"+(16777216+65536*(Math.round((i-o)*a)+o)+256*(Math.round((i-r)*a)+r)+(Math.round((i-n)*a)+n)).toString(16).slice(1)}shadeColor(e,s){return t.isColorHex(s)?this.shadeHexColor(e,s):this.shadeRGBColor(e,s)}static isColorHex(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(t)}static isCSSVariable(t){if("string"!=typeof t)return!1;const e=t.trim();return e.startsWith("var(")&&e.endsWith(")")}static getThemeColor(e){if(!t.isCSSVariable(e))return e;if(c.isSSR())return e;const s=document.createElement("div");let i;s.style.cssText="position:fixed; left: -9999px; visibility:hidden;",s.style.color=e,document.body.appendChild(s);try{i=window.getComputedStyle(s).color}finally{s.parentNode&&s.parentNode.removeChild(s)}return i}static applyOpacityToColor(t,e){const s=Number(e);if(!Number.isFinite(s))return t;if(s<=0)return"transparent";if(s>=1)return t;return`color-mix(in srgb, ${t} ${Math.round(100*s)}%, transparent)`}static getPolygonPos(t,e){const s=[],i=2*Math.PI/e;for(let a=0;a<e;a++){const e={};e.x=t*Math.sin(a*i),e.y=-t*Math.cos(a*i),s.push(e)}return s}static polarToCartesian(t,e,s,i){const a=(i-90)*Math.PI/180;return{x:t+s*Math.cos(a),y:e+s*Math.sin(a)}}static escapeString(t,e="x"){let s=t.toString().slice();return s=s.replace(/[` ~!@#$%^&*()|+=?;:'",.<>{}[\]\\/]/gi,e),s}static negToZero(t){return t<0?0:t}static moveIndexInArray(t,e,s){if(s>=t.length){let e=s-t.length+1;for(;e--;)t.push(void 0)}return t.splice(s,0,t.splice(e,1)[0]),t}static extractNumber(t){return parseFloat(t.replace(/[^\d.]*/g,""))}static findAncestor(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}static setELstyles(t,e){for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t.style.key=e[s])}static preciseAddition(t,e){const s=(String(t).split(".")[1]||"").length,i=(String(e).split(".")[1]||"").length,a=Math.pow(10,Math.max(s,i));return(Math.round(t*a)+Math.round(e*a))/a}static isNumber(t){return!isNaN(t)&&parseFloat(String(Number(t)))===t&&!isNaN(parseInt(t,10))}static isFloat(t){return Number(t)===t&&t%1!=0}static isMsEdge(){if(c.isSSR())return!1;const t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0&&parseInt(t.substring(e+5,t.indexOf(".",e)),10)}static getGCD(t,e,s=7){let i=Math.pow(10,s-Math.floor(Math.log10(Math.max(t,e))));for(i>1?(t=Math.round(Math.abs(t)*i),e=Math.round(Math.abs(e)*i)):i=1;e;){const s=e;e=t%e,t=s}return t/i}static getPrimeFactors(t){const e=[];let s=2;for(;t>=2;)t%s==0?(e.push(s),t/=s):s++;return e}static mod(t,e,s=7){const i=Math.pow(10,s-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*i))%(e=Math.round(Math.abs(e)*i))/i}};class y{constructor(t){this.w=t,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}isValidDate(t){return"number"!=typeof t&&!isNaN(this.parseDate(t))}getTimeStamp(t){if(!Date.parse(t))return t;return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toISOString().substr(0,25)).getTime():new Date(t).getTime()}getDate(t){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toUTCString()):new Date(t)}parseDate(t){const e=Date.parse(t);if(!isNaN(e))return this.getTimeStamp(t);let s=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return s=this.getTimeStamp(s),s}parseDateWithTimezone(t){return Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "))}formatDate(t,e){const s=this.w.globals.locale,i=this.w.config.xaxis.labels.datetimeUTC,a=["\0",...s.months],o=["\x01",...s.shortMonths],r=["\x02",...s.days],n=["\x03",...s.shortDays];function l(t,e=2){let s=t+"";for(;s.length<e;)s="0"+s;return s}const h=i?t.getUTCFullYear():t.getFullYear();e=(e=(e=e.replace(/(^|[^\\])yyyy+/g,"$1"+h)).replace(/(^|[^\\])yy/g,"$1"+h.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+h);const c=(i?t.getUTCMonth():t.getMonth())+1;e=(e=(e=(e=e.replace(/(^|[^\\])MMMM+/g,"$1"+a[0])).replace(/(^|[^\\])MMM/g,"$1"+o[0])).replace(/(^|[^\\])MM/g,"$1"+l(c))).replace(/(^|[^\\])M/g,"$1"+c);const d=i?t.getUTCDate():t.getDate();e=(e=(e=(e=e.replace(/(^|[^\\])dddd+/g,"$1"+r[0])).replace(/(^|[^\\])ddd/g,"$1"+n[0])).replace(/(^|[^\\])dd/g,"$1"+l(d))).replace(/(^|[^\\])d/g,"$1"+d);const g=i?t.getUTCHours():t.getHours(),p=g>12?g-12:0===g?12:g;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(g))).replace(/(^|[^\\])H/g,"$1"+g)).replace(/(^|[^\\])hh+/g,"$1"+l(p))).replace(/(^|[^\\])h/g,"$1"+p);const x=i?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(x))).replace(/(^|[^\\])m/g,"$1"+x);const u=i?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(u))).replace(/(^|[^\\])s/g,"$1"+u);let f=i?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(f,3)),f=Math.round(f/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(f)),f=Math.round(f/10);const b=g<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+f)).replace(/(^|[^\\])TT+/g,"$1"+b)).replace(/(^|[^\\])T/g,"$1"+b.charAt(0));const m=b.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+m)).replace(/(^|[^\\])t/g,"$1"+m.charAt(0));let y=-t.getTimezoneOffset(),w=i||!y?"Z":y>0?"+":"-";if(!i){y=Math.abs(y);const t=y%60;w+=l(Math.floor(y/60))+":"+l(t)}e=e.replace(/(^|[^\\])K/g,"$1"+w);const v=(i?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(r[0],"g"),r[v])).replace(new RegExp(n[0],"g"),n[v])).replace(new RegExp(a[0],"g"),a[c])).replace(new RegExp(o[0],"g"),o[c])).replace(/\\(.)/g,"$1")}getTimeUnitsfromTimestamp(t,e){const s=this.w;void 0!==s.config.xaxis.min&&(t=s.config.xaxis.min),void 0!==s.config.xaxis.max&&(e=s.config.xaxis.max);const i=this.getDate(t),a=this.getDate(e),o=this.formatDate(i,"yyyy MM dd HH mm ss fff").split(" "),r=this.formatDate(a,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(o[6],10),maxMillisecond:parseInt(r[6],10),minSecond:parseInt(o[5],10),maxSecond:parseInt(r[5],10),minMinute:parseInt(o[4],10),maxMinute:parseInt(r[4],10),minHour:parseInt(o[3],10),maxHour:parseInt(r[3],10),minDate:parseInt(o[2],10),maxDate:parseInt(r[2],10),minMonth:parseInt(o[1],10)-1,maxMonth:parseInt(r[1],10)-1,minYear:parseInt(o[0],10),maxYear:parseInt(r[0],10)}}isLeapYear(t){return t%4==0&&t%100!=0||t%400==0}calculcateLastDaysOfMonth(t,e,s){return this.determineDaysOfMonths(t,e)-s}determineDaysOfYear(t){let e=365;return this.isLeapYear(t)&&(e=366),e}determineRemainingDaysOfYear(t,e,s){let i=this.daysCntOfYear[e]+s;return e>1&&this.isLeapYear(t)&&i++,i}determineDaysOfMonths(t,e){let s=30;switch(t=m.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(s=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:s=31}return s}}class w{constructor(t){this.w=t,this.tooltipKeyFormat="dd MMM"}xLabelFormat(t,e,s,i){const a=this.w;if("datetime"===a.config.xaxis.type&&void 0===a.config.xaxis.labels.formatter&&void 0===a.config.tooltip.x.formatter){const t=new y(this.w);return t.formatDate(t.getDate(e),a.config.tooltip.x.format)}return t(e,s,i)}defaultGeneralFormatter(t){return Array.isArray(t)?t.map(t=>t):t}defaultYFormatter(t,e){const s=this.w;if(m.isNumber(t))if(0!==s.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:s.globals.yValueDecimal);else{const e=t.toFixed(0);t=Number(e)===t?e:t.toFixed(1)}return t}setLabelFormatters(){const t=this.w,e=t.formatters;return e.xaxisTooltipFormatter=t=>this.defaultGeneralFormatter(t),e.ttKeyFormatter=t=>this.defaultGeneralFormatter(t),e.ttZFormatter=t=>t,e.legendFormatter=t=>this.defaultGeneralFormatter(t),void 0!==t.config.xaxis.labels.formatter?e.xLabelFormatter=t.config.xaxis.labels.formatter:e.xLabelFormatter=e=>{if(m.isNumber(e)){if(!t.config.xaxis.convertedCatToNumeric&&"numeric"===t.config.xaxis.type){if(m.isNumber(t.config.xaxis.decimalsInFloat))return e.toFixed(t.config.xaxis.decimalsInFloat);{const s=t.globals.maxX-t.globals.minX;return s>0&&s<100?e.toFixed(1):e.toFixed(0)}}if(t.globals.isBarHorizontal){if(t.globals.maxY-t.globals.minYArr<4)return e.toFixed(1)}return e.toFixed(0)}return e},"function"==typeof t.config.tooltip.x.formatter?e.ttKeyFormatter=t.config.tooltip.x.formatter:e.ttKeyFormatter=e.xLabelFormatter,"function"==typeof t.config.xaxis.tooltip.formatter&&(e.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||void 0!==t.config.tooltip.y.formatter)&&(e.ttVal=t.config.tooltip.y),void 0!==t.config.tooltip.z.formatter&&(e.ttZFormatter=t.config.tooltip.z.formatter),void 0!==t.config.legend.formatter&&(e.legendFormatter=t.config.legend.formatter),e.yLabelFormatters=[],t.config.yaxis.forEach((s,i)=>{void 0!==s.labels.formatter?e.yLabelFormatters[i]=s.labels.formatter:e.yLabelFormatters[i]=e=>t.globals.xyCharts?Array.isArray(e)?e.map(t=>this.defaultYFormatter(t,s)):this.defaultYFormatter(e,s):e}),t.globals}heatmapLabelFormatters(){const t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.seriesData.seriesNames.slice();const e=t.seriesData.seriesNames.reduce((t,e)=>t.length>e.length?t:e,0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}const v=({isTimeline:t,seriesIndex:e,dataPointIndex:s,y1:i,y2:a,w:o})=>{var r;let n=o.rangeData.seriesRangeStart[e][s],l=o.rangeData.seriesRangeEnd[e][s],h=o.labelData.labels[s],c=o.config.series[e].name?o.config.series[e].name:"";const d=o.formatters.ttKeyFormatter,g=o.config.tooltip.y.title.formatter,p={w:o,seriesIndex:e,dataPointIndex:s,start:n,end:l};if("function"==typeof g&&(c=g(c,p)),(null==(r=o.config.series[e].data[s])?void 0:r.x)&&(h=o.config.series[e].data[s].x),!t&&"datetime"===o.config.xaxis.type){h=new w(o).xLabelFormat(o.formatters.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new y(o).formatDate,w:o})}"function"==typeof d&&(h=d(h,p)),Number.isFinite(i)&&Number.isFinite(a)&&(n=i,l=a);let x="",u="";const f=o.globals.colors[e];if(void 0===o.config.tooltip.x.formatter)if("datetime"===o.config.xaxis.type){const t=new y(o);x=t.formatDate(t.getDate(n),o.config.tooltip.x.format),u=t.formatDate(t.getDate(l),o.config.tooltip.x.format)}else x=n,u=l;else x=o.config.tooltip.x.formatter(n),u=o.config.tooltip.x.formatter(l);return{start:n,end:l,startVal:x,endVal:u,ylabel:h,color:f,seriesName:c}},A=t=>{let{color:e,seriesName:s,ylabel:i,start:a,end:o,seriesIndex:r,dataPointIndex:n}=t;const l=t.w.globals.tooltip.tooltipLabels.getFormatters(r);a=l.yLbFormatter(a),o=l.yLbFormatter(o);const h=l.yLbFormatter(t.w.seriesData.series[r][n]);let c="";const d=`<span class="value start-value">\n  ${a}\n  </span> <span class="separator">-</span> <span class="value end-value">\n  ${o}\n  </span>`;return c=t.w.globals.comboCharts?"rangeArea"===t.w.config.series[r].type||"rangeBar"===t.w.config.series[r].type?d:`<span>${h}</span>`:d,'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(s||"")+'</span></div><div> <span class="category">'+i+": </span> "+c+" </div></div>"};class C{constructor(t){this.opts=t}hideYAxis(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}line(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}sparkline(t){this.hideYAxis();return m.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(t,e){const s=e.w.config.series[e.seriesIndex].name;return null!==t?s+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}bar(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"square"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}funnel(){return this.hideYAxis(),l(n({},this.bar()),{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,t,e,["Open","High","","Low","Close"],"candlestick")},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}boxPlot(){return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,t,e,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}rangeBar(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter(t,{seriesIndex:e,dataPointIndex:s,w:i}){const a=()=>{const t=i.rangeData.seriesRangeStart[e][s];return i.rangeData.seriesRangeEnd[e][s]-t};return i.globals.comboCharts?"rangeBar"===i.config.series[e].type||"rangeArea"===i.config.series[e].type?a():t:a()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:t=>t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?(t=>{const{color:e,seriesName:s,ylabel:i,startVal:a,endVal:o}=v(l(n({},t),{isTimeline:!0}));return A(l(n({},t),{color:e,seriesName:s,ylabel:i,start:a,end:o}))})(t):(t=>{const{color:e,seriesName:s,ylabel:i,start:a,end:o}=v(t);return A(l(n({},t),{color:e,seriesName:s,ylabel:i,start:a,end:o}))})(t)},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(t){var e,s;return(null==(e=t.plotOptions.bar)?void 0:e.barHeight)||(t.plotOptions.bar.barHeight=2),(null==(s=t.plotOptions.bar)?void 0:s.columnWidth)||(t.plotOptions.bar.columnWidth=2),t}area(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}rangeArea(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:t=>(t=>{const{color:e,seriesName:s,ylabel:i,start:a,end:o}=v(t);return A(l(n({},t),{color:e,seriesName:s,ylabel:i,start:a,end:o}))})(t)}}}brush(t){return m.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}stacked100(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;const e=t.dataLabels.formatter;t.yaxis.forEach((e,s)=>{t.yaxis[s].min=0,t.yaxis[s].max=100});return"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}stackedBars(){const t=this.bar();return l(n({},t),{plotOptions:l(n({},t.plotOptions),{bar:l(n({},t.plotOptions.bar),{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}convertCatToNumeric(t){return t.xaxis.convertedCatToNumeric=!0,t}convertCatToNumericXaxis(t,e){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return m.isNumber(t)?Math.floor(t):t};const s=t.xaxis.labels.formatter;let i=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return e&&e.length&&(i=e.map(t=>Array.isArray(t)?t:String(t))),i&&i.length&&(t.xaxis.labels.formatter=function(t){return m.isNumber(t)?s(i[Math.floor(t)-1]):s(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}bubble(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}scatter(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}heatmap(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}treemap(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:t=>t.toFixed(1)+"%",style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}donut(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:t=>t.toFixed(1)+"%",style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}polarArea(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:t=>t.toFixed(1)+"%",enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}radar(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:t=>t,style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}radialBar(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}_getBoxTooltip(t,e,s,i,a){const o=t.candleData.seriesCandleO[e][s],r=t.candleData.seriesCandleH[e][s],n=t.candleData.seriesCandleM[e][s],l=t.candleData.seriesCandleL[e][s],h=t.candleData.seriesCandleC[e][s],c=t.config.series[e];return c.type&&c.type!==a?`<div class="apexcharts-custom-tooltip">\n          ${c.name?c.name:"series-"+(e+1)}: <strong>${t.seriesData.series[e][s]}</strong>\n        </div>`:`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div>${i[0]}: <span class="value">`+o+`</span></div><div>${i[1]}: <span class="value">`+r+"</span></div>"+(n?`<div>${i[2]}: <span class="value">`+n+"</span></div>":"")+`<div>${i[3]}: <span class="value">`+l+`</span></div><div>${i[4]}: <span class="value">`+h+"</span></div></div>"}}const S={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}};class k{constructor(){this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}init(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[S],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0,keyDown:void 0,keyUp:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,injectStyleSheet:!0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}},accessibility:{enabled:!0,description:void 0,announcements:{enabled:!0},keyboard:{enabled:!0,navigation:{enabled:!0,wrapAround:!1}}},dataReducer:{enabled:!1,algorithm:"lttb",targetPoints:250,threshold:500}},parsing:{x:void 0,y:void 0},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:"#000",borderWidth:1,borderRadius:2,style:{background:"rgba(0, 0, 0, 0.6)",color:"#fff",fontSize:"12px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:6,right:6,top:2,bottom:2}}}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:t=>t},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:t=>t+"%"},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:t=>t.globals.seriesTotals.reduce((t,e)=>t+e,0)/t.seriesData.series.length+"%"}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:t=>t,onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:t=>t},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:t=>t},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:t=>t.globals.seriesTotals.reduce((t,e)=>t+e,0)}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:t=>null!==t?t:"",textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",backgroundColor:void 0,borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:t=>t?t+": ":""}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65},accessibility:{colorBlindMode:""}}}}}class D{constructor(t){this.opts=t}init({responsiveOverride:t}){var e,s,i,a,o,r,n,l,h,d;let g=this.opts;const p=new k,x=new C(g);this.chartType=g.chart.type,g=this.extendYAxis(g),g=this.extendAnnotations(g);let u=p.init(),f={};if(g&&"object"==typeof g){let p={};p=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(g.chart.type)?x[g.chart.type]():x.line(),(null==(s=null==(e=g.plotOptions)?void 0:e.bar)?void 0:s.isFunnel)&&(p=x.funnel()),g.chart.stacked&&"bar"===g.chart.type&&(p=x.stackedBars()),(null==(i=g.chart.brush)?void 0:i.enabled)&&(p=x.brush(p)),(null==(o=null==(a=g.plotOptions)?void 0:a.line)?void 0:o.isSlopeChart)&&(p=x.slope()),g.chart.stacked&&"100%"===g.chart.stackType&&(g=x.stacked100(g)),(null==(n=null==(r=g.plotOptions)?void 0:r.bar)?void 0:n.isDumbbell)&&(g=x.dumbbell(g)),this.checkForDarkTheme(c.getApex()),this.checkForDarkTheme(g),g.xaxis=g.xaxis||c.getApex().xaxis||{},t||(g.xaxis.convertedCatToNumeric=!1),g=this.checkForCatToNumericXAxis(this.chartType,p,g),((null==(l=g.chart.sparkline)?void 0:l.enabled)||(null==(d=null==(h=c.getApex().chart)?void 0:h.sparkline)?void 0:d.enabled))&&(p=x.sparkline(p)),f=m.extend(u,p)}const b=m.extend(f,c.getApex());return u=m.extend(b,g),u=this.handleUserInputErrors(u),u}checkForCatToNumericXAxis(t,e,s){var i,a;const o=new C(s),r=("bar"===t||"boxPlot"===t)&&(null==(a=null==(i=s.plotOptions)?void 0:i.bar)?void 0:a.horizontal),n="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,l="datetime"!==s.xaxis.type&&"numeric"!==s.xaxis.type,h=s.xaxis.tickPlacement?s.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return r||n||!l||"between"===h||(s=o.convertCatToNumeric(s)),s}extendYAxis(t,e){const s=new k;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={});const i=c.getApex();t.yaxis.constructor!==Array&&i.yaxis&&i.yaxis.constructor!==Array&&(t.yaxis=m.extend(t.yaxis,i.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[m.extend(s.yAxis,t.yaxis)]:t.yaxis=m.extendArray(t.yaxis,s.yAxis);let a=!1;t.yaxis.forEach(t=>{t.logarithmic&&(a=!0)});let o=t.series;return e&&!o&&(o=e.config.series),a&&o.length!==t.yaxis.length&&o.length&&(t.yaxis=o.map((e,i)=>{if(e.name||(o[i].name=`series-${i+1}`),t.yaxis[i])return t.yaxis[i].seriesName=o[i].name,t.yaxis[i];{const e=m.extend(s.yAxis,t.yaxis[0]);return e.show=!1,e}})),a&&o.length>1&&(o.length,t.yaxis.length),t}extendAnnotations(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t)}extendYAxisAnnotations(t){const e=new k;return t.annotations.yaxis=m.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}extendXAxisAnnotations(t){const e=new k;return t.annotations.xaxis=m.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}extendPointAnnotations(t){const e=new k;return t.annotations.points=m.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}checkForDarkTheme(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}handleUserInputErrors(t){const e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(e.yaxis[0].reversed=!1),e}}const L=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],P=[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24];class M{initGlobalVars(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.dataWasParsed=!1,t.originalSeries=null,t.maxValsInArrayIndex=0,t.yValueDecimal=0,t.allSeriesHasEqualX=!0,t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0,t.disableZoomIn=!1,t.disableZoomOut=!1,t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.rotateXLabels=!1,t.overlappingXLabels=!1,t.radialSize=0,t.barHeight=0,t.barWidth=0,t.animationEnded=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.lastWheelExecution=0,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.lastDrawnDataLabelsIndexes=[],t.textRectsCache=new Map,t.domCache=new Map,t.dimensionCache={},t.cachedSelectors={},t.seriesNS||this._attachNamespaces(t)}_attachNamespaces(t){const e=(e,s,i=s)=>{Object.defineProperty(e,i,{get:()=>t[s],set(e){t[s]=e},enumerable:!0,configurable:!0})},s={};e(s,"series","data");for(const t of["seriesNames","seriesX","seriesZ","seriesXvalues","seriesYvalues","seriesGoals","seriesLog","seriesColors","seriesPercent","seriesTotals","stackedSeriesTotals","seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC","seriesRangeStart","seriesRangeEnd","seriesRange","seriesYAxisMap","seriesYAxisReverseMap","seriesGroups","barGroups","lineGroups","areaGroups","originalSeries","collapsedSeries","collapsedSeriesIndices","ancillaryCollapsedSeries","ancillaryCollapsedSeriesIndices","allSeriesCollapsed","risingSeries","previousPaths","ignoreYAxisIndexes","labels","categoryLabels","timescaleLabels","groups"])e(s,t);Object.defineProperty(t,"seriesNS",{value:s,writable:!1,enumerable:!1,configurable:!0});const i={};for(const t of["minX","maxX","initialMinX","initialMaxX","minY","maxY","minYArr","maxYArr","minZ","maxZ","minDate","maxDate","minXDiff","xRange","yRange","zRange","xAxisScale","yAxisScale","xAxisTicksPositions","xTickAmount","multiAxisTickAmount","dataPoints","maxValsInArrayIndex","isXNumeric","isMultipleYAxis","isMultiLineX","isDataXYZ","dataFormatXNumeric","allSeriesHasEqualX","hasNullValues","dataWasParsed","hasXaxisGroups","hasSeriesGroups","skipFirstTimelinelabel","skipLastTimelinelabel","yValueDecimal","invalidLogScale","noLabelsProvided"])e(i,t);Object.defineProperty(t,"axes",{value:i,writable:!1,enumerable:!1,configurable:!0});const a={};for(const t of["svgWidth","svgHeight","gridWidth","gridHeight","translateX","translateY","translateXAxisX","translateXAxisY","translateYAxisX","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yAxisLabelsWidth","yAxisWidths","yLabelsCoords","yTitleCoords","padHorizontal","barPadForNumericAxis","rotateXLabels","scaleX","scaleY","radialSize","defaultLabels","overlappingXLabels"])e(a,t);Object.defineProperty(t,"layout",{value:a,writable:!1,enumerable:!1,configurable:!0});const o={};for(const t of["domCache","dimensionCache","cachedSelectors","textRectsCache","pointsArray","dataLabelsRects","lastDrawnDataLabelsIndexes","delayedElements","resizeTimer","selectionResizeTimer","resizeObserver"])e(o,t);Object.defineProperty(t,"cache",{value:o,writable:!1,enumerable:!1,configurable:!0})}globalVars(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},LINE_HEIGHT_RATIO:1.618,axisCharts:!0,isSlopeChart:t.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,invalidLogScale:!1,hasNullValues:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],svgWidth:0,svgHeight:0,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:L,niceScaleDefaultTicks:P,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}init(t){const e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=m.extend({},t),e.initialSeries=m.clone(t.series),e.lastXAxis=m.clone(e.initialConfig.xaxis),e.lastYAxis=m.clone(e.initialConfig.yaxis),e}}class I{constructor(t){this.opts=t}init(){const t=new D(this.opts).init({responsiveOverride:!1}),e=(new M).init(t),s={config:t,globals:e,dom:{},interact:{zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,zoomed:!1,selection:void 0,visibleXRange:void 0,selectedDataPoints:[],mousedown:!1,clientX:null,clientY:null,lastClientPosition:{},lastWheelExecution:0,capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:!!c.isBrowser()&&("ontouchstart"in window||navigator.maxTouchPoints>0)},formatters:{xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,legendFormatter:void 0},candleData:{seriesCandleO:[],seriesCandleH:[],seriesCandleM:[],seriesCandleL:[],seriesCandleC:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,noLabelsProvided:!1,dataWasParsed:!1},seriesData:{series:[],seriesNames:[],seriesX:[],seriesZ:[],seriesColors:[],seriesGoals:[],stackedSeriesTotals:[],stackedSeriesTotalsByGroups:[]},layout:{gridHeight:0,gridWidth:0,translateX:0,translateY:0,translateXAxisX:0,translateXAxisY:0,rotateXLabels:!1,xAxisHeight:0,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yLabelsCoords:[],yTitleCoords:[]}};Object.defineProperty(e,"dom",{get:()=>s.dom,set(t){s.dom=t},enumerable:!1,configurable:!0});for(const t of["xLabelFormatter","yLabelFormatters","xaxisTooltipFormatter","ttKeyFormatter","ttVal","ttZFormatter","legendFormatter"])Object.defineProperty(e,t,{get:()=>s.formatters[t],set(e){s.formatters[t]=e},enumerable:!1,configurable:!0});for(const t of["zoomEnabled","panEnabled","selectionEnabled","zoomed","selection","visibleXRange","selectedDataPoints","mousedown","clientX","clientY","lastClientPosition","lastWheelExecution","capturedSeriesIndex","capturedDataPointIndex","disableZoomIn","disableZoomOut","isTouchDevice"])Object.defineProperty(e,t,{get:()=>s.interact[t],set(e){s.interact[t]=e},enumerable:!1,configurable:!0});for(const t of["gridHeight","gridWidth","translateX","translateY","translateXAxisX","translateXAxisY","rotateXLabels","xAxisHeight","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yLabelsCoords","yTitleCoords"])Object.defineProperty(e,t,{get:()=>s.layout[t],set(e){s.layout[t]=e},enumerable:!1,configurable:!0});for(const t of["series","seriesNames","seriesX","seriesZ","seriesColors","seriesGoals","stackedSeriesTotals","stackedSeriesTotalsByGroups"])Object.defineProperty(e,t,{get:()=>s.seriesData[t],set(e){s.seriesData[t]=e},enumerable:!1,configurable:!0});for(const t of["isXNumeric","dataFormatXNumeric","isDataXYZ","isRangeData","isRangeBar","isMultiLineX","noLabelsProvided","dataWasParsed"])Object.defineProperty(e,t,{get:()=>s.axisFlags[t],set(e){s.axisFlags[t]=e},enumerable:!1,configurable:!0});for(const t of["labels","categoryLabels","timescaleLabels","hasXaxisGroups","groups","seriesGroups"])Object.defineProperty(e,t,{get:()=>s.labelData[t],set(e){s.labelData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesRangeStart","seriesRangeEnd","seriesRange"])Object.defineProperty(e,t,{get:()=>s.rangeData[t],set(e){s.rangeData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC"])Object.defineProperty(e,t,{get:()=>s.candleData[t],set(e){s.candleData[t]=e},enumerable:!1,configurable:!0});return s}}class E{constructor(t){this.w=t}static checkComboSeries(t,e){let s=!1,i=0,a=0;return void 0===e&&(e="line"),t.length&&void 0!==t[0].type&&t.forEach(t=>{"bar"!==t.type&&"column"!==t.type&&"candlestick"!==t.type&&"boxPlot"!==t.type||i++,void 0!==t.type&&t.type!==e&&a++}),a>0&&(s=!0),{comboBarCount:i,comboCharts:s}}getStackedSeriesTotals(t=[]){const e=this.w,s=[];if(0===e.seriesData.series.length)return s;for(let i=0;i<e.seriesData.series[e.globals.maxValsInArrayIndex].length;i++){let a=0;for(let s=0;s<e.seriesData.series.length;s++)void 0!==e.seriesData.series[s][i]&&-1===t.indexOf(s)&&(a+=e.seriesData.series[s][i]);s.push(a)}return s}getSeriesTotalByIndex(t=null){return null===t?this.w.config.series.reduce((t,e)=>t+e,0):this.w.seriesData.series[t].reduce((t,e)=>t+e,0)}getStackedSeriesTotalsByGroups(){const t=this.w,e=[];return t.labelData.seriesGroups.forEach(s=>{const i=[];t.config.series.forEach((e,a)=>{s.indexOf(t.seriesData.seriesNames[a])>-1&&i.push(a)});const a=t.seriesData.series.map((t,e)=>-1===i.indexOf(e)?e:-1).filter(t=>-1!==t);e.push(this.getStackedSeriesTotals(a))}),e}setSeriesYAxisMappings(){const t=this.w.globals,e=this.w.config;let s=[];const i=[],a=[],o=this.w.seriesData.series.length>e.yaxis.length||e.yaxis.some(t=>Array.isArray(t.seriesName));e.series.forEach((t,e)=>{a.push(e),i.push(null)}),e.yaxis.forEach((t,e)=>{s[e]=[]});const r=[];e.yaxis.forEach((t,i)=>{let n=!1;if(t.seriesName){let r=[];Array.isArray(t.seriesName)?r=t.seriesName:r.push(t.seriesName),r.forEach(t=>{e.series.forEach((e,r)=>{if(e.name===t){let t=r;i===r||o?(!o||a.indexOf(r)>-1)&&s[i].push([i,r]):(s[r].push([r,i]),t=i),n=!0,t=a.indexOf(t),-1!==t&&a.splice(t,1)}})})}n||r.push(i)}),s=s.map(t=>{const e=[];return t.forEach(t=>{i[t[1]]=t[0],e.push(t[1])}),e});let n=e.yaxis.length-1;for(let t=0;t<r.length&&(n=r[t],s[n]=[],a);t++){const t=a[0];a.shift(),s[n].push(t),i[t]=n}a.forEach(t=>{s[n].push(t),i[t]=n}),t.seriesYAxisMap=s.map(t=>t),t.seriesYAxisReverseMap=i.map(t=>t),t.seriesYAxisMap.forEach((t,s)=>{t.forEach(t=>{if(e.series[t]&&void 0===e.series[t].group){e.series[t].group="apexcharts-axis-".concat(s.toString())}})})}isSeriesNull(t=null){let e=[];return e=null===t?this.w.config.series.filter(t=>null!==t):this.w.config.series[t].data.filter(t=>null!==t),0===e.length}seriesHaveSameValues(t){return this.w.seriesData.series[t].every((t,e,s)=>t===s[0])}getCategoryLabels(t){const e=this.w;let s=t.slice();return e.config.xaxis.convertedCatToNumeric&&(s=t.map(t=>e.config.xaxis.labels.formatter(t-e.globals.minX+1))),s}getLargestSeries(){const t=this.w;t.globals.maxValsInArrayIndex=t.seriesData.series.map(t=>t.length).indexOf(Math.max.apply(Math,t.seriesData.series.map(t=>t.length)))}getLargestMarkerSize(){const t=this.w;let e=0;return t.globals.markers.size.forEach(t=>{e=Math.max(e,t)}),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach(t=>{e=Math.max(e,t.size)}),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}getSeriesTotals(){const t=this.w;t.globals.seriesTotals=t.seriesData.series.map(t=>{let e=0;if(Array.isArray(t))for(let s=0;s<t.length;s++)e+=t[s];else e+=t;return e})}getSeriesTotalsXRange(t,e){const s=this.w;return s.seriesData.series.map((i,a)=>{let o=0;for(let r=0;r<i.length;r++)s.seriesData.seriesX[a][r]>t&&s.seriesData.seriesX[a][r]<e&&(o+=i[r]);return o})}getPercentSeries(){const t=this.w;t.globals.seriesPercent=t.seriesData.series.map(e=>{const s=[];if(Array.isArray(e))for(let i=0;i<e.length;i++){const a=t.seriesData.stackedSeriesTotals[i];let o=0;a&&(o=100*e[i]/a),s.push(o)}else{const i=100*e/t.globals.seriesTotals.reduce((t,e)=>t+e,0);s.push(i)}return s})}getCalculatedRatios(){const t=this.w,e=t.globals,s=[];let i=0,a=0,o=0,r=0,n=[],l=.1,h=0;if(e.yRange=[],e.isMultipleYAxis)for(let t=0;t<e.minYArr.length;t++)e.yRange.push(Math.abs(e.minYArr[t]-e.maxYArr[t])),n.push(0);else e.yRange.push(Math.abs(e.minY-e.maxY));e.xRange=Math.abs(e.maxX-e.minX),e.zRange=Math.abs(e.maxZ-e.minZ);for(let t=0;t<e.yRange.length;t++)s.push(e.yRange[t]/this.w.layout.gridHeight);if(a=e.xRange/this.w.layout.gridWidth,i=e.yRange/this.w.layout.gridWidth,o=e.xRange/this.w.layout.gridHeight,r=e.zRange/this.w.layout.gridHeight*16,r||(r=1),e.minY!==Number.MIN_VALUE&&0!==Math.abs(e.minY)){e.hasNegs=!0}if(t.globals.seriesYAxisReverseMap.length>0){const o=(e,i)=>{const a=t.config.yaxis[t.globals.seriesYAxisReverseMap[i]],o=e<0?-1:1;return e=Math.abs(e),a.logarithmic&&(e=this.getBaseLog(a.logBase,e)),-o*e/s[i]};if(e.isMultipleYAxis){n=[];for(let t=0;t<s.length;t++)n.push(o(e.minYArr[t],t))}else n=[],n.push(o(e.minY,0)),e.minY!==Number.MIN_VALUE&&0!==Math.abs(e.minY)&&(l=-e.minY/i,h=e.minX/a)}else n=[],n.push(0),l=0,h=0;return{yRatio:s,invertedYRatio:i,zRatio:r,xRatio:a,invertedXRatio:o,baseLineInvertedY:l,baseLineY:n,baseLineX:h}}getLogSeries(t){const e=this.w;return e.globals.seriesLog=t.map((t,s)=>{const i=e.globals.seriesYAxisReverseMap[s];return e.config.yaxis[i]&&e.config.yaxis[i].logarithmic?t.map(t=>null===t?null:this.getLogVal(e.config.yaxis[i].logBase,t,s)):t}),e.globals.invalidLogScale?t:e.globals.seriesLog}getLogValAtSeriesIndex(t,e){if(null===t)return null;const s=this.w,i=s.globals.seriesYAxisReverseMap[e];return s.config.yaxis[i]&&s.config.yaxis[i].logarithmic?this.getLogVal(s.config.yaxis[i].logBase,t,e):t}getBaseLog(t,e){return Math.log(e)/Math.log(t)}getLogVal(t,e,s){if(e<=0)return 0;const i=this.w,a=0===i.globals.minYArr[s]?-1:this.getBaseLog(t,i.globals.minYArr[s]),o=(0===i.globals.maxYArr[s]?0:this.getBaseLog(t,i.globals.maxYArr[s]))-a;if(e<1)return e/o;return(this.getBaseLog(t,e)-a)/o}getLogYRatios(t){const e=this.w,s=this.w.globals,i=s;return i.yLogRatio=t.slice(),i.logYRange=s.yRange.map((t,a)=>{const o=e.globals.seriesYAxisReverseMap[a];if(e.config.yaxis[o]&&this.w.config.yaxis[o].logarithmic){let t=-Number.MAX_VALUE,o=Number.MIN_VALUE,r=1;return s.seriesLog.forEach((s,i)=>{s.forEach(s=>{e.config.yaxis[i]&&e.config.yaxis[i].logarithmic&&(t=Math.max(s,t),o=Math.min(s,o))})}),r=Math.pow(s.yRange[a],Math.abs(o-t)/s.yRange[a]),i.yLogRatio[a]=r/this.w.layout.gridHeight,r}}),i.invalidLogScale?t.slice():i.yLogRatio}static extendArrayProps(t,e,s){var i,a;return(null==e?void 0:e.yaxis)&&(e=t.extendYAxis(e,s)),(null==e?void 0:e.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),(null==(i=null==e?void 0:e.annotations)?void 0:i.xaxis)&&(e=t.extendXAxisAnnotations(e)),(null==(a=null==e?void 0:e.annotations)?void 0:a.points)&&(e=t.extendPointAnnotations(e))),e}drawSeriesByGroup(t,e,s,i){const a=this.w,o=[];return t.series.length>0&&e.forEach(e=>{const r=[],n=[];t.i.forEach((s,i)=>{a.config.series[s].group===e&&(r.push(t.series[i]),n.push(s))}),r.length>0&&o.push(i.draw(r,s,n))}),o}}class F{constructor(t,e){this.w=t,this.ctx=e}animateLine(t,e,s,i){t.attr(e).animate(i).attr(s)}animateMarker(t,e,s,i){t.attr({opacity:0}).animate(e).attr({opacity:1}).after(()=>{i()})}animateRect(t,e,s,i,a){t.attr(e).animate(i).attr(s).after(()=>a())}animatePathsGradually(t){const{el:e,realIndex:s,j:i,fill:a,pathFrom:o,pathTo:r,speed:n,delay:l}=t,h=this.w;let c=0;h.config.chart.animations.animateGradually.enabled&&(c=h.config.chart.animations.animateGradually.delay),h.config.chart.animations.dynamicAnimation.enabled&&h.globals.dataChanged&&"bar"!==h.config.chart.type&&(c=0),this.morphSVG(e,s,i,"line"!==h.config.chart.type||h.globals.comboCharts?a:"stroke",o,r,n,l*c)}showDelayedElements(){this.w.globals.delayedElements.forEach(t=>{const e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")})}animationCompleted(t){const e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),"function"==typeof e.config.chart.events.animationEnd&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}morphSVG(t,e,s,i,a,o,r,n){const l=this.w;a||(a=t.attr("pathFrom")),o||(o=t.attr("pathTo"));const h=()=>("radar"===l.config.chart.type&&(r=1),`M 0 ${l.layout.gridHeight}`);(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=h()),(!o.trim()||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=h()),l.globals.shouldAnimate||(r=1),t.plot(a).animate(1,n).plot(a).animate(r,n).plot(o).after(()=>{m.isNumber(s)?s===l.seriesData.series[l.globals.maxValsInArrayIndex].length-2&&l.globals.shouldAnimate&&this.animationCompleted(t):"none"!==i&&l.globals.shouldAnimate&&(!l.globals.comboCharts&&e===l.seriesData.series.length-1||l.globals.comboCharts)&&this.animationCompleted(t),this.showDelayedElements()})}}class X{constructor(t){this.w=t}getDefaultFilter(t,e){const s=this.w;t.unfilter&&t.unfilter(!0),s.config.chart.dropShadow.enabled&&this.dropShadow(t,s.config.chart.dropShadow,e)}applyFilter(t,e,s){var i,a,o;const r=this.w;if(t.unfilter&&t.unfilter(!0),"none"===s)return void this.getDefaultFilter(t,e);const n=r.config.chart.dropShadow,l="lighten"===s?2:.3;t.filterWith&&(t.filterWith(t=>{t.colorMatrix({type:"matrix",values:`\n            ${l} 0 0 0 0\n            0 ${l} 0 0 0\n            0 0 ${l} 0 0\n            0 0 0 1 0\n          `,in:"SourceGraphic",result:"brightness"}),n.enabled&&this.addShadow(t,e,n,"brightness")}),n.noUserSpaceOnUse||null==(a=null==(i=t.filterer())?void 0:i.node)||a.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null==(o=t.filterer())?void 0:o.node))}addShadow(t,e,s,i){var a;const o=this.w;let{blur:r,top:n,left:l,color:h,opacity:c}=s;if(h=Array.isArray(h)?h[e]:h,(null==(a=o.config.chart.dropShadow.enabledOnSeries)?void 0:a.length)>0&&-1===o.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:i,dx:l,dy:n,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:r,result:"blur"}),t.flood({"flood-color":h,"flood-opacity":c,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",i])}dropShadow(t,e,s=0){var i,a,o,r,n;const l=this.w;return t.unfilter&&t.unfilter(!0),m.isMsEdge()&&"radialBar"===l.config.chart.type||(null==(i=l.config.chart.dropShadow.enabledOnSeries)?void 0:i.length)>0&&-1===(null==(a=l.config.chart.dropShadow.enabledOnSeries)?void 0:a.indexOf(s))||t.filterWith&&(t.filterWith(t=>{this.addShadow(t,s,e,"SourceGraphic")}),e.noUserSpaceOnUse||null==(r=null==(o=t.filterer())?void 0:o.node)||r.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null==(n=t.filterer())?void 0:n.node)),t}setSelectionFilter(t,e,s){const i=this.w;if(void 0!==i.interact.selectedDataPoints[e]&&i.interact.selectedDataPoints[e].indexOf(s)>-1){t.node.setAttribute("selected",!0);const s=i.config.states.active.filter;"none"!==s&&this.applyFilter(t,e,s.type)}}_scaleFilterSize(t){if(!t)return;(e=>{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.setAttribute(s,e[s])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}class T{constructor(t,e=null){this.w=t,this.ctx=e}roundPathCorners(t,e){function s(t,e,s){var a=e.x-t.x,o=e.y-t.y,r=Math.sqrt(a*a+o*o);return i(t,e,Math.min(1,s/r))}function i(t,e,s){return{x:t.x+(e.x-t.x)*s,y:t.y+(e.y-t.y)*s}}function a(t,e){t.length>2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function o(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var r=t.split(/[,\s]/).reduce(function(t,e){var s=e.match(/^([a-zA-Z])(.+)/);return s?(t.push(s[1]),t.push(s[2])):t.push(e),t},[]).reduce(function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t},[]),n=[];if(r.length>1){var l=o(r[0]),h=null;"Z"==r[r.length-1][0]&&r[0].length>2&&(h=["L",l.x,l.y],r[r.length-1]=h),n.push(r[0]);for(var c=1;c<r.length;c++){var d=n[n.length-1],g=r[c],p=g==h?r[1]:r[c+1];if(p&&d&&d.length>2&&"L"==g[0]&&p.length>2&&"L"==p[0]){var x,u,f=o(d),b=o(g),m=o(p);x=s(b,f,e),u=s(b,m,e),a(g,x),g.origPoint=b,n.push(g);var y=i(x,b,.5),w=i(b,u,.5),v=["C",y.x,y.y,w.x,w.y,u.x,u.y];v.origPoint=b,n.push(v)}else n.push(g)}if(h){var A=o(n[n.length-1]);n.push(["Z"]),a(n[0],A)}}else n=r;return n.reduce(function(t,e){return t+e.join(" ")+" "},"")}drawLine(t,e,s,i,a="#a8a8a8",o=0,r=null,n="butt"){return this.w.dom.Paper.line().attr({x1:t,y1:e,x2:s,y2:i,stroke:a,"stroke-dasharray":o,"stroke-width":r,"stroke-linecap":n})}drawRect(t=0,e=0,s=0,i=0,a=0,o="#fefefe",r=1,n=null,l=null,h=0){const c=this.w.dom.Paper.rect();return c.attr({x:t,y:e,width:s>0?s:0,height:i>0?i:0,rx:a,ry:a,opacity:r,"stroke-width":null!==n?n:0,stroke:null!==l?l:"none","stroke-dasharray":h}),c.node.setAttribute("fill",o),c}drawPolygon(t,e="#e1e1e1",s=1,i="none"){return this.w.dom.Paper.polygon(t).attr({fill:i,stroke:e,"stroke-width":s})}drawCircle(t,e=null){t<0&&(t=0);const s=this.w.dom.Paper.circle(2*t);return null!==e&&s.attr(e),s}drawPath({d:t="",stroke:e="#a8a8a8",strokeWidth:s=1,fill:i,fillOpacity:a=1,strokeOpacity:o=1,classes:r,strokeLinecap:n=null,strokeDashArray:l=0}){const h=this.w;null===n&&(n=h.config.stroke.lineCap),(t.indexOf("undefined")>-1||t.indexOf("NaN")>-1)&&(t=`M 0 ${h.layout.gridHeight}`);return h.dom.Paper.path(t).attr({fill:i,"fill-opacity":a,stroke:e,"stroke-opacity":o,"stroke-linecap":n,"stroke-width":s,"stroke-dasharray":l,class:r})}group(t=null){const e=this.w.dom.Paper.group();return null!==t&&e.attr(t),e}move(t,e){return["M",t,e].join(" ")}line(t,e,s=null){return"H"===s?[" H",t].join(" "):"V"===s?[" V",e].join(" "):[" L",t,e].join(" ")}curve(t,e,s,i,a,o){return["C",t,e,s,i,a,o].join(" ")}quadraticCurve(t,e,s,i){return["Q",t,e,s,i].join(" ")}arc(t,e,s,i,a,o,r,n=!1){let l="A";n&&(l="a");return[l,t,e,s,i,a,o,r].join(" ")}renderPaths({j:t,realIndex:e,pathFrom:s,pathTo:i,stroke:a,strokeWidth:o,strokeLinecap:r,fill:h,animationDelay:c,initialSpeed:d,dataChangeSpeed:g,className:p,chartType:x,shouldClipToGrid:u=!0,bindEventsOnPaths:f=!0,drawShadow:b=!0}){const m=this.w,y=new X(this.w),w=new F(this.w,void 0),v=this.w.config.chart.animations.enabled,A=v&&this.w.config.chart.animations.dynamicAnimation.enabled;if(s&&s.startsWith("M 0 0")&&i){const t=i.match(/^M\s+[\d.-]+\s+[\d.-]+/);t&&(s=s.replace(/^M\s+0\s+0/,t[0]))}let C;const S=!!(v&&!m.globals.resized||A&&m.globals.dataChanged&&m.globals.shouldAnimate);S?C=s:(C=i,m.globals.animationEnded=!0);const k=m.config.stroke.dashArray;let D=0;D=Array.isArray(k)?k[e]:m.config.stroke.dashArray;const L=this.drawPath({d:C,stroke:a,strokeWidth:o,fill:h,fillOpacity:1,classes:p,strokeLinecap:r,strokeDashArray:D});L.attr("index",e),u&&("bar"===x&&!m.globals.isBarHorizontal||m.globals.comboCharts?L.attr({"clip-path":`url(#gridRectBarMask${m.globals.cuid})`}):L.attr({"clip-path":`url(#gridRectMask${m.globals.cuid})`})),m.config.chart.dropShadow.enabled&&b&&y.dropShadow(L,m.config.chart.dropShadow,e),f&&(L.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,L)),L.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,L)),L.node.addEventListener("mousedown",this.pathMouseDown.bind(this,L))),L.attr({pathTo:i,pathFrom:s});const P={el:L,j:t,realIndex:e,pathFrom:s,pathTo:i,fill:h,strokeWidth:o,delay:c};return!v||m.globals.resized||m.globals.dataChanged?!m.globals.resized&&m.globals.dataChanged||w.showDelayedElements():w.animatePathsGradually(l(n({},P),{speed:d})),m.globals.dataChanged&&A&&S&&w.animatePathsGradually(l(n({},P),{speed:g})),L}drawPattern(t,e,s,i="#a8a8a8",a=0){return this.w.dom.Paper.pattern(e,s,o=>{"horizontalLines"===t?o.line(0,0,s,0).stroke({color:i,width:a+1}):"verticalLines"===t?o.line(0,0,0,e).stroke({color:i,width:a+1}):"slantedLines"===t?o.line(0,0,e,s).stroke({color:i,width:a}):"squares"===t?o.rect(e,s).fill("none").stroke({color:i,width:a}):"circles"===t&&o.circle(e).fill("none").stroke({color:i,width:a})})}drawGradient(t,e,s,i,a,o=null,r=null,n=[],l=0){const h=this.w;let c;e.length<9&&0===e.indexOf("#")&&(e=m.hexToRgba(e,i)),s.length<9&&0===s.indexOf("#")&&(s=m.hexToRgba(s,a));let d=0,g=1,p=1,x=null;null!==r&&(d=void 0!==r[0]?r[0]/100:0,g=void 0!==r[1]?r[1]/100:1,p=void 0!==r[2]?r[2]/100:1,x=void 0!==r[3]?r[3]/100:null);const u=!("donut"!==h.config.chart.type&&"pie"!==h.config.chart.type&&"polarArea"!==h.config.chart.type&&"bubble"!==h.config.chart.type);if(c=n&&0!==n.length?h.dom.Paper.gradient(u?"radial":"linear",t=>{(Array.isArray(n[l])?n[l]:n).forEach(e=>{t.stop(e.offset/100,e.color,e.opacity)})}):h.dom.Paper.gradient(u?"radial":"linear",t=>{t.stop(d,e,i),t.stop(g,s,a),t.stop(p,s,a),null!==x&&t.stop(x,e,i)}),u){const t=h.layout.gridWidth/2,e=h.layout.gridHeight/2;"bubble"!==h.config.chart.type?c.attr({gradientUnits:"userSpaceOnUse",cx:t,cy:e,r:o}):c.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?c.from(0,0).to(0,1):"diagonal"===t?c.from(0,0).to(1,1):"horizontal"===t?c.from(0,1).to(1,1):"diagonal2"===t&&c.from(1,0).to(0,1);return c}getTextBasedOnMaxWidth({text:t,maxWidth:e,fontSize:s,fontFamily:i}){const a=this.getTextRects(t,s,i,""),o=a.width/t.length,r=Math.floor(e/o);return e<a.width?t.slice(0,r-3)+"...":t}drawText({x:t,y:e,text:s,textAnchor:i,fontSize:a,fontFamily:o,fontWeight:r,foreColor:l,opacity:h,maxWidth:c,cssClass:d="",isPlainText:g=!0,dominantBaseline:p="auto"}){const x=this.w;void 0===s&&(s="");let u=s;i||(i="start"),l&&l.length||(l=x.config.chart.foreColor),o=o||x.config.chart.fontFamily,r=r||"regular";const f={maxWidth:c,fontSize:a=a||"11px",fontFamily:o};let b;return Array.isArray(s)?b=x.dom.Paper.text(t=>{for(let e=0;e<s.length;e++)u=s[e],c&&(u=this.getTextBasedOnMaxWidth(n({text:s[e]},f))),0===e?t.tspan(u):t.tspan(u).newLine()}):(c&&(u=this.getTextBasedOnMaxWidth(n({text:s},f))),b=g?x.dom.Paper.plain(s):x.dom.Paper.text(t=>t.tspan(u))),b.attr({x:t,y:e,"text-anchor":i,"dominant-baseline":p,"font-size":a,"font-family":o,"font-weight":r,fill:l,class:"apexcharts-text "+d}),b.node.style.fontFamily=o,b.node.style.opacity=h,b}getMarkerPath(t,e,s,i){let a="";switch(s){case"cross":a=`M ${t-(i/=1.4)} ${e-i} L ${t+i} ${e+i}  M ${t-i} ${e+i} L ${t+i} ${e-i}`;break;case"plus":a=`M ${t-(i/=1.12)} ${e} L ${t+i} ${e}  M ${t} ${e-i} L ${t} ${e+i}`;break;case"star":case"sparkle":{let o=5;i*=1.15,"sparkle"===s&&(i/=1.1,o=4);const r=Math.PI/o;for(let s=0;s<=2*o;s++){const o=s*r,n=s%2==0?i:i/2;a+=(0===s?"M":"L")+(t+n*Math.sin(o))+","+(e-n*Math.cos(o))}a+="Z";break}case"triangle":a=`M ${t} ${e-i} \n             L ${t+i} ${e+i} \n             L ${t-i} ${e+i} \n             Z`;break;case"square":case"rect":a=`M ${t-(i/=1.125)} ${e-i} \n           L ${t+i} ${e-i} \n           L ${t+i} ${e+i} \n           L ${t-i} ${e+i} \n           Z`;break;case"diamond":a=`M ${t} ${e-(i*=1.05)} \n             L ${t+i} ${e} \n             L ${t} ${e+i} \n             L ${t-i} ${e} \n            Z`;break;case"line":a=`M ${t-(i/=1.1)} ${e} \n           L ${t+i} ${e}`;break;default:a=`M ${t}, ${e} \n           m -${(i*=2)/2}, 0 \n           a ${i/2},${i/2} 0 1,0 ${i},0 \n           a ${i/2},${i/2} 0 1,0 -${i},0`}return a}drawMarkerShape(t,e,s,i,a){const o=this.drawPath({d:this.getMarkerPath(t,e,s,i),stroke:a.pointStrokeColor,strokeDashArray:a.pointStrokeDashArray,strokeWidth:a.pointStrokeWidth,fill:a.pointFillColor,fillOpacity:a.pointFillOpacity,strokeOpacity:a.pointStrokeOpacity});return o.attr({cx:t,cy:e,shape:a.shape,class:a.class?a.class:""}),o}drawMarker(t,e,s){t=t||0;let i=s.pSize||0;return m.isNumber(e)||(i=0,e=0),this.drawMarkerShape(t,e,null==s?void 0:s.shape,i,n(n({},s),"line"===s.shape||"plus"===s.shape||"cross"===s.shape?{pointStrokeColor:s.pointFillColor,pointStrokeOpacity:s.pointFillOpacity}:{}))}pathMouseEnter(t,e){var s,i;const a=this.w,o=new X(this.w),r=parseInt(null!=(s=t.node.getAttribute("index"))?s:"",10),n=parseInt(null!=(i=t.node.getAttribute("j"))?i:"",10);if(!(isNaN(r)||isNaN(n)||("function"==typeof a.config.chart.events.dataPointMouseEnter&&a.config.chart.events.dataPointMouseEnter(e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}),T._fireEvent(a,"dataPointMouseEnter",[e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}]),"none"!==a.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||"none"===a.config.states.hover.filter.type||a.interact.isTouchDevice))){const e=a.config.states.hover.filter;o.applyFilter(t,r,e.type)}}pathMouseLeave(t,e){var s,i;const a=this.w,o=new X(this.w),r=parseInt(null!=(s=t.node.getAttribute("index"))?s:"",10),n=parseInt(null!=(i=t.node.getAttribute("j"))?i:"",10);isNaN(r)||isNaN(n)||("function"==typeof a.config.chart.events.dataPointMouseLeave&&a.config.chart.events.dataPointMouseLeave(e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}),T._fireEvent(a,"dataPointMouseLeave",[e,this.ctx,{seriesIndex:r,dataPointIndex:n,w:a}]),"none"!==a.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||"none"!==a.config.states.hover.filter.type&&o.getDefaultFilter(t,r))}pathMouseDown(t,e){var s,i;const a=this.w,o=new X(this.w),r=parseInt(null!=(s=t.node.getAttribute("index"))?s:"",10),n=parseInt(null!=(i=t.node.getAttribute("j"))?i:"",10);if(isNaN(r)||isNaN(n))return;let l="false";if("true"===t.node.getAttribute("selected")){t.node.setAttribute("selected","false");const e=a.interact.selectedDataPoints[r].indexOf(n);e>-1&&a.interact.selectedDataPoints[r].splice(e,1)}else{if(!a.config.states.active.allowMultipleDataPointsSelection&&a.interact.selectedDataPoints.length>0){a.interact.selectedDataPoints=[];const t=a.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),e=a.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),s=t=>{Array.prototype.forEach.call(t,t=>{t.node.setAttribute("selected","false"),o.getDefaultFilter(t,r)})};s(t),s(e)}t.node.setAttribute("selected","true"),l="true",void 0===a.interact.selectedDataPoints[r]&&(a.interact.selectedDataPoints[r]=[]),a.interact.selectedDataPoints[r].push(n)}if("true"===l){const e=a.config.states.active.filter;if("none"!==e)o.applyFilter(t,r,e.type);else if("none"!==a.config.states.hover.filter&&!a.interact.isTouchDevice){const e=a.config.states.hover.filter;o.applyFilter(t,r,e.type)}}else if("none"!==a.config.states.active.filter.type)if("none"===a.config.states.hover.filter.type||a.interact.isTouchDevice)o.getDefaultFilter(t,r);else{const e=a.config.states.hover.filter;o.applyFilter(t,r,e.type)}"function"==typeof a.config.chart.events.dataPointSelection&&a.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:r,dataPointIndex:n,w:a}),e&&T._fireEvent(a,"dataPointSelection",[e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:r,dataPointIndex:n,w:a}])}rotateAroundCenter(t){let e={};t&&"function"==typeof t.getBBox&&(e=t.getBBox());return{x:e.x+e.width/2,y:e.y+e.height/2}}setupEventDelegation(t,e){let s=null;t.node.addEventListener("mouseover",i=>{const a=T._findDelegateTarget(i.target,t.node,e);a&&a!==s&&(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=a,a.instance&&this.pathMouseEnter(a.instance,i))}),t.node.addEventListener("mouseout",i=>{if(!s)return;(i.relatedTarget?T._findDelegateTarget(i.relatedTarget,t.node,e):null)!==s&&(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=null)}),t.node.addEventListener("mousedown",s=>{const i=T._findDelegateTarget(s.target,t.node,e);i&&i.instance&&this.pathMouseDown(i.instance,s)})}static _fireEvent(t,e,s){const i=t.globals.events;if(!i||!Object.prototype.hasOwnProperty.call(i,e))return;const a=i[e];for(let t=0;t<a.length;t++)a[t].apply(null,s)}static _findDelegateTarget(t,e,s){for(;t&&t!==e&&t!==document;){if(t.matches&&t.matches(s))return t;t=t.parentNode}return null}static setAttrs(t,e){for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.setAttribute(s,e[s])}getTextRects(t,e,s,i,a=!0){const o=this.w,r=[t,e,s,i,a].join("\0"),n=o.globals.textRectsCache;if(n&&n.has(r))return n.get(r);const l=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:s,foreColor:"#fff",opacity:0});i&&l.attr("transform",i),o.dom.Paper.add(l);let h=l.bbox();a||(h=l.node.getBoundingClientRect()),l.remove();const c={width:h.width,height:h.height};return n&&n.set(r,c),c}placeTextWithEllipsis(t,e,s){if("function"==typeof t.getComputedTextLength&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=s/1.1)){for(let i=e.length-3;i>0;i-=3)if(t.getSubStringLength(0,i)<=s/1.1)return void(t.textContent=e.substring(0,i)+"...");t.textContent="."}}}const z="http://www.w3.org/2000/svg";class R{constructor(t,e){"object"==typeof t?(this.x=t.x,this.y=t.y):(this.x=t||0,this.y=e||0)}transform(t){return t.apply(this)}clone(){return new R(this.x,this.y)}}class Y{constructor(t,e,s,i,a,o){this.a=null!=t?t:1,this.b=null!=e?e:0,this.c=null!=s?s:0,this.d=null!=i?i:1,this.e=null!=a?a:0,this.f=null!=o?o:0}rotate(t){const e=t*Math.PI/180,s=Math.cos(e),i=Math.sin(e);return this.multiply(new Y(s,i,-i,s,0,0))}scale(t,e){return this.multiply(new Y(t,0,0,null!=e?e:t,0,0))}multiply(t){return new Y(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)}apply(t){return new R(this.a*t.x+this.c*t.y+this.e,this.b*t.x+this.d*t.y+this.f)}}class B{constructor(t,e,s,i){this.x=t,this.y=e,this.w=s,this.h=i,this.width=s,this.height=i,this.x2=t+s,this.y2=e+i}}class H{constructor(t){this.w=t,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(t){const e=this.w,s=e.config,i=parseInt(String(e.layout.gridWidth),10),a=parseInt(String(e.layout.gridHeight),10),o=i>a?i:a,r=t.image;let n=0,l=0;void 0===t.width&&void 0===t.height?void 0!==s.fill.image.width&&void 0!==s.fill.image.height?(n=s.fill.image.width+1,l=s.fill.image.height):(n=o+1,l=o):(n=t.width,l=t.height);const h=b.createElementNS(z,"pattern");T.setAttrs(h,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:n+"px",height:l+"px"});const d=b.createElementNS(z,"image");h.appendChild(d);const g=c.isBrowser()?window.SVG:global.SVG;d.setAttributeNS(g.xlink,"href",r),T.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:n+"px",height:l+"px"}),d.style.opacity=t.opacity,e.dom.elDefs.node.appendChild(h)}getSeriesIndex(t){const e=this.w,s=e.config.chart.type;return("bar"===s||"rangeBar"===s)&&e.config.plotOptions.bar.distributed||"heatmap"===s||"treemap"===s?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.seriesData.series.length,this.seriesIndex}computeColorStops(t,e){const s=this.w;let i=null,a=null;for(const s of t)s>=e.threshold?(null===i||s>i)&&(i=s):(null===a||s<a)&&(a=s);null===i&&(i=e.threshold),null===a&&(a=e.threshold);let o=i-e.threshold+(e.threshold-a);0===o&&(o=1);let r=100-(e.threshold-a)/o*100;return r=Math.max(0,Math.min(r,100)),[{offset:r,color:e.colorAboveThreshold,opacity:s.config.fill.opacity},{offset:0,color:e.colorBelowThreshold,opacity:s.config.fill.opacity}]}fillPath(t){var e,s,i,a;const o=this.w;this.opts=t;const r=this.w.config;let n,l,h;this.seriesIndex=this.getSeriesIndex(t);const c=r.plotOptions.line.colors.colorAboveThreshold&&r.plotOptions.line.colors.colorBelowThreshold;let d=this.getFillColors()[this.seriesIndex];void 0!==o.seriesData.seriesColors[this.seriesIndex]&&(d=o.seriesData.seriesColors[this.seriesIndex]),"function"==typeof d&&(d=d({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:o}));const g=t.fillType?t.fillType:this.getFillType(this.seriesIndex);let p=Array.isArray(r.fill.opacity)?r.fill.opacity[this.seriesIndex]:r.fill.opacity;const x="gradient"===g||c;t.color&&(d=t.color);const u=o.config.series[this.seriesIndex];(null==(s=null==(e=null==u?void 0:u.data)?void 0:e[t.dataPointIndex])?void 0:s.fillColor)&&(d=null==(a=null==(i=null==u?void 0:u.data)?void 0:i[t.dataPointIndex])?void 0:a.fillColor),d||(d="#fff"),void 0!==t.opacity&&null!==t.opacity&&(p=t.opacity);let f=d;m.isCSSVariable(d)?f=m.applyOpacityToColor(d,p):-1===d.indexOf("rgb")?-1===d.indexOf("#")?f=d:d.length<9&&(f=m.hexToRgba(d,p)):d.indexOf("rgba")>-1?p=m.getOpacityFromRGBA(d):f=m.hexToRgba(m.rgb2hex(d),p);const b=m.isCSSVariable(d)?m.getThemeColor(d):d;if("pattern"===g&&(l=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:l,fillColor:b,defaultColor:f})),x){const e=r.fill.gradient.colorStops?[...r.fill.gradient.colorStops]:[];let s=r.fill.gradient.type;c&&(e[this.seriesIndex]=this.computeColorStops(o.seriesData.series[this.seriesIndex],r.plotOptions.line.colors),s="vertical"),h=this.handleGradientFill({type:s,fillConfig:t.fillConfig,fillColor:b,fillOpacity:p,colorStops:e,i:this.seriesIndex})}if("image"===g){const e=r.fill.image.src,s=t.patternID?t.patternID:"",i=`pattern${o.globals.cuid}${t.seriesNumber+1}${s}`;-1===this.patternIDs.indexOf(i)&&(this.clippedImgArea({opacity:p,image:Array.isArray(e)?t.seriesNumber<e.length?e[t.seriesNumber]:e[0]:e,width:t.width?t.width:void 0,height:t.height?t.height:void 0,patternUnits:t.patternUnits,patternID:i}),this.patternIDs.push(i)),n=`url(#${i})`}else n=x?h:"pattern"===g?l:f;return t.solid&&(n=f),n}getFillType(t){const e=this.w;return Array.isArray(e.config.fill.type)?e.config.fill.type[t]:e.config.fill.type}getFillColors(){const t=this.w,e=t.config,s=this.opts;let i=[];return t.globals.comboCharts?"line"===t.config.series[this.seriesIndex].type?Array.isArray(t.globals.stroke.colors)?i=t.globals.stroke.colors:i.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?i=t.globals.fill.colors:i.push(t.globals.fill.colors):"line"===e.chart.type?Array.isArray(t.globals.stroke.colors)?i=t.globals.stroke.colors:i.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?i=t.globals.fill.colors:i.push(t.globals.fill.colors),void 0!==s.fillColors&&(i=[],Array.isArray(s.fillColors)?i=s.fillColors.slice():i.push(s.fillColors)),i}handlePatternFill({fillConfig:t,patternFill:e,fillColor:s,defaultColor:i}){let a=this.w.config.fill;t&&(a=t);const o=this.opts,r=new T(this.w),n=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,l=s;if(Array.isArray(a.pattern.style))if(void 0!==a.pattern.style[o.seriesNumber]){e=r.drawPattern(a.pattern.style[o.seriesNumber],a.pattern.width,a.pattern.height,l,n)}else e=i;else e=r.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,l,n);return e}handleGradientFill({type:t,fillColor:e,fillOpacity:s,fillConfig:i,colorStops:a,i:o}){let r=this.w.config.fill;i&&(r=n(n({},r),i));const l=this.opts,h=new T(this.w),c=new m;t=t||r.gradient.type;let d,g=e,p=void 0===r.gradient.opacityFrom?s:Array.isArray(r.gradient.opacityFrom)?r.gradient.opacityFrom[o]:r.gradient.opacityFrom;g.indexOf("rgba")>-1&&(p=m.getOpacityFromRGBA(g));let x=void 0===r.gradient.opacityTo?s:Array.isArray(r.gradient.opacityTo)?r.gradient.opacityTo[o]:r.gradient.opacityTo;if(void 0===r.gradient.gradientToColors||0===r.gradient.gradientToColors.length)d="dark"===r.gradient.shade?c.shadeColor(-1*parseFloat(r.gradient.shadeIntensity),e.indexOf("rgb")>-1?m.rgb2hex(e):e):c.shadeColor(parseFloat(r.gradient.shadeIntensity),e.indexOf("rgb")>-1?m.rgb2hex(e):e);else if(r.gradient.gradientToColors[l.seriesNumber]){const t=r.gradient.gradientToColors[l.seriesNumber];d=t,t.indexOf("rgba")>-1&&(x=m.getOpacityFromRGBA(t))}else d=e;if(r.gradient.gradientFrom&&(g=r.gradient.gradientFrom),r.gradient.gradientTo&&(d=r.gradient.gradientTo),r.gradient.inverseColors){const t=g;g=d,d=t}return g.indexOf("rgb")>-1&&(g=m.rgb2hex(g)),d.indexOf("rgb")>-1&&(d=m.rgb2hex(d)),h.drawGradient(t,g,d,p,x,l.size,r.gradient.stops,a,o)}}class N{constructor(t,e){this.w=t,this.ctx=e,this._filters=new X(this.w),this._graphics=new T(this.w,this.ctx)}setGlobalMarkerSize(){const t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length<t.seriesData.series.length+1)for(let e=0;e<=t.seriesData.series.length;e++)void 0===t.globals.markers.size[e]&&t.globals.markers.size.push(t.globals.markers.size[0])}else t.globals.markers.size=t.config.series.map(()=>t.config.markers.size)}plotChartMarkers({pointsPos:t,seriesIndex:e,j:s,pSize:i,alwaysDrawMarker:a=!1,isVirtualPoint:o=!1}){const r=this.w,n=e,l=t;let h=null;const c=new T(this.w),d=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(l.x))for(let t=0;t<l.x.length;t++){let g,p=s,x=!m.isNumber(l.y[t]);0===r.globals.markers.largestSize&&r.globals.hasNullValues&&null!==r.seriesData.series[n][s+1]&&!o&&(x=!0),1===s&&0===t&&(p=0),1===s&&1===t&&(p=1);let u="apexcharts-marker";"line"!==r.config.chart.type&&"area"!==r.config.chart.type||r.globals.comboCharts||r.config.tooltip.intersect||(u+=" no-pointer-events");if((Array.isArray(r.config.markers.size)?r.globals.markers.size[e]>0:r.config.markers.size>0)||a||d){x||(u+=` w${m.randomId()}`);const s=this.getMarkerConfig({cssClass:u,seriesIndex:e,dataPointIndex:p}),o=r.config.series[n];if(o.data[p]&&(o.data[p].fillColor&&(s.pointFillColor=o.data[p].fillColor),o.data[p].strokeColor&&(s.pointStrokeColor=o.data[p].strokeColor)),void 0!==i&&(s.pSize=i),(l.x[t]<-r.globals.markers.largestSize||l.x[t]>r.layout.gridWidth+r.globals.markers.largestSize||l.y[t]<-r.globals.markers.largestSize||l.y[t]>r.layout.gridHeight+r.globals.markers.largestSize)&&(s.pSize=0),!x){(r.globals.markers.size[e]>0||a||d)&&!h&&(h=c.group({class:a||d?"":"apexcharts-series-markers"}),h.attr("clip-path",`url(#gridRectMarkerMask${r.globals.cuid})`),this.setupMarkerDelegation(h)),g=c.drawMarker(l.x[t],l.y[t],s),g.attr("rel",p),g.attr("j",p),g.attr("index",e),g.node.setAttribute("default-marker-size",s.pSize),this._filters.setSelectionFilter(g,e,p),h&&h.add(g)}}else void 0===r.globals.pointsArray[e]&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([l.x[t],l.y[t]])}return h}getMarkerConfig({cssClass:t,seriesIndex:e,dataPointIndex:s=null,radius:i=null,size:a=null,strokeWidth:o=null}){const r=this.w,n=this.getMarkerStyle(e);let l=null===a?r.globals.markers.size[e]:a;const h=r.config.markers;return null!==s&&h.discrete.length&&h.discrete.map(t=>{t.seriesIndex===e&&t.dataPointIndex===s&&(n.pointStrokeColor=t.strokeColor,n.pointFillColor=t.fillColor,l=t.size,n.pointShape=t.shape)}),{pSize:null===i?l:i,pRadius:null!==i?i:h.radius,pointStrokeWidth:null!==o?o:Array.isArray(h.strokeWidth)?h.strokeWidth[e]:h.strokeWidth,pointStrokeColor:n.pointStrokeColor,pointFillColor:n.pointFillColor,shape:n.pointShape||(Array.isArray(h.shape)?h.shape[e]:h.shape),class:t,pointStrokeOpacity:Array.isArray(h.strokeOpacity)?h.strokeOpacity[e]:h.strokeOpacity,pointStrokeDashArray:Array.isArray(h.strokeDashArray)?h.strokeDashArray[e]:h.strokeDashArray,pointFillOpacity:Array.isArray(h.fillOpacity)?h.fillOpacity[e]:h.fillOpacity,seriesIndex:e}}setupMarkerDelegation(t){const e=this.w,s=".apexcharts-marker";this._graphics.setupEventDelegation(t,s),t.node.addEventListener("click",i=>{if(e.config.markers.onClick){T._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onClick(i)}}),t.node.addEventListener("dblclick",i=>{if(e.config.markers.onDblClick){T._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onDblClick(i)}}),t.node.addEventListener("touchstart",e=>{const i=T._findDelegateTarget(e.target,t.node,s);i&&i.instance&&this._graphics.pathMouseDown(i.instance,e)},{passive:!0})}addEvents(t){const e=this.w;t.node.addEventListener("mouseenter",this._graphics.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",this._graphics.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",this._graphics.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",this._graphics.pathMouseDown.bind(this.ctx,t),{passive:!0})}getMarkerStyle(t){const e=this.w,s=e.globals.markers.colors,i=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(i)?i[t]:i,pointFillColor:Array.isArray(s)?s[t]:s}}}class O{constructor(t,e){this.ctx=e,this.w=t,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new F(this.w),this.filters=new X(this.w),this.fill=new H(this.w),this.markers=new N(this.w,this.ctx),this.graphics=new T(this.w)}draw(t,e,s){const i=this.w,a=this.graphics,o=s.realIndex,r=s.pointsPos,n=s.zRatio,l=s.elParent,h=a.group({class:`apexcharts-series-markers apexcharts-series-${i.config.chart.type}`});if(h.attr("clip-path",`url(#gridRectMarkerMask${i.globals.cuid})`),this.markers.setupMarkerDelegation(h),Array.isArray(r.x))for(let t=0;t<r.x.length;t++){let s=e+1,a=!0;0===e&&0===t&&(s=0),0===e&&1===t&&(s=1);let c=i.globals.markers.size[o];if(n!==1/0){const t=i.config.plotOptions.bubble;c=i.seriesData.seriesZ[o][s],t.zScaling&&(c/=n),t.minBubbleRadius&&c<t.minBubbleRadius&&(c=t.minBubbleRadius),t.maxBubbleRadius&&c>t.maxBubbleRadius&&(c=t.maxBubbleRadius)}const d=r.x[t],g=r.y[t];if(c=c||0,null!==g&&void 0!==i.seriesData.series[o][s]||(a=!1),a){const t=this.drawPoint(d,g,c,o,s,e);h.add(t)}l.add(h)}}drawPoint(t,e,s,i,a,o){const r=this.w,n=i,l=this.anim,h=this.filters,c=this.fill,d=this.markers,g=this.graphics,p=d.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:n,dataPointIndex:a,radius:"bubble"===r.config.chart.type||r.globals.comboCharts&&r.config.series[i]&&"bubble"===r.config.series[i].type?s:null});let x=c.fillPath({seriesNumber:i,dataPointIndex:a,color:p.pointFillColor,patternUnits:"objectBoundingBox",value:r.seriesData.series[i][o]});const u=g.drawMarker(t,e,p),f=r.config.series[n];if(f.data[a]&&f.data[a].fillColor&&(x=f.data[a].fillColor),u.attr({fill:x}),r.config.chart.dropShadow.enabled){const t=r.config.chart.dropShadow;h.dropShadow(u,t,i)}if(!this.initialAnim||r.globals.dataChanged||r.globals.resized)r.globals.animationEnded=!0;else{const t=r.config.chart.animations.speed;l.animateMarker(u,t,r.globals.easing,()=>{window.setTimeout(()=>{l.animationCompleted(u)},100)})}return u.attr({rel:a,j:a,index:i,"default-marker-size":p.pSize}),h.setSelectionFilter(u,i,a),u.node.classList.add("apexcharts-marker"),u}centerTextInBubble(t){const e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}class W{constructor(t,e=null){this.w=t,this.ctx=e}dataLabelsCorrection(t,e,s,i,a,o,r){const n=this.w;let l=!1;const h=new T(this.w).getTextRects(s,r),c=h.width,d=h.height;e<0&&(e=0),e>n.layout.gridHeight+d&&(e=n.layout.gridHeight+d/2),void 0===n.globals.dataLabelsRects[i]&&(n.globals.dataLabelsRects[i]=[]),n.globals.dataLabelsRects[i].push({x:t,y:e,width:c,height:d});const g=n.globals.dataLabelsRects[i].length-2,p=void 0!==n.globals.lastDrawnDataLabelsIndexes[i]?n.globals.lastDrawnDataLabelsIndexes[i][n.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(void 0!==n.globals.dataLabelsRects[i][g]){const s=n.globals.dataLabelsRects[i][p];(t>s.x+s.width||e>s.y+s.height||e+d<s.y||t+c<s.x)&&(l=!0)}return(0===a||o)&&(l=!0),{x:t,y:e,textRects:h,drawnextLabel:l}}drawDataLabel({type:t,pos:e,i:s,j:i,isRangeStart:a,strokeWidth:o=2}){const r=this.w,n=new T(this.w),l=r.config.dataLabels;let h=0,c=0,d=i,g=null;if(-1!==r.globals.collapsedSeriesIndices.indexOf(s)||!l.enabled||!Array.isArray(e.x))return g;g=n.group({class:"apexcharts-data-labels"});for(let n=0;n<e.x.length;n++)if(h=e.x[n]+l.offsetX,c=e.y[n]+l.offsetY+o,!isNaN(h)){1===i&&0===n&&(d=0),1===i&&1===n&&(d=1);let o=r.seriesData.series[s][d];"rangeArea"===t&&(o=a?r.rangeData.seriesRangeStart[s][d]:r.rangeData.seriesRangeEnd[s][d]);let l="";const p=t=>r.config.dataLabels.formatter(t,{seriesIndex:s,dataPointIndex:d,w:r});if("bubble"===r.config.chart.type){o=r.seriesData.seriesZ[s][d],l=p(o),c=e.y[n];c=new O(this.w,this.ctx).centerTextInBubble(c).y}else void 0!==o&&(l=p(o));let x=r.config.dataLabels.textAnchor;r.globals.isSlopeChart&&(x=0===d?"end":d===r.config.series[s].data.length-1?"start":"middle"),this.plotDataLabelsText({x:h,y:c,text:l,i:s,j:d,parent:g,offsetCorrection:!0,dataLabelsConfig:r.config.dataLabels,textAnchor:x})}return g}plotDataLabelsText(t){const e=this.w,s=new T(this.w);let{x:i,y:a,i:o,j:r,text:n,textAnchor:l,fontSize:h,parent:c,dataLabelsConfig:d,color:g,alwaysDrawDataLabel:p,offsetCorrection:x,className:u}=t,f=null;if(Array.isArray(e.config.dataLabels.enabledOnSeries)&&e.config.dataLabels.enabledOnSeries.indexOf(o)<0)return f;let b={x:i,y:a,drawnextLabel:!0,textRects:null};x&&(b=this.dataLabelsCorrection(i,a,n,o,r,p,parseInt(d.style.fontSize,10).toString())),e.interact.zoomed||(i=b.x,a=b.y),b.textRects&&(i<-20-b.textRects.width||i>e.layout.gridWidth+b.textRects.width+30)&&(n="");let m=e.globals.dataLabels.style.colors[o];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(m=e.globals.dataLabels.style.colors[r]),"function"==typeof m&&(m=m({series:e.seriesData.series,seriesIndex:o,dataPointIndex:r,w:e})),g&&(m=g);let y=d.offsetX,w=d.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(y=0,w=0),e.globals.isSlopeChart&&(0!==r&&(y=-2*d.offsetX+5),0!==r&&r!==e.config.series[o].data.length-1&&(y=0)),b.drawnextLabel){if("middle"===l&&i===e.layout.gridWidth&&(l="end"),f=s.drawText({x:i+y,y:a+w,foreColor:m,textAnchor:l||d.textAnchor,text:n,fontSize:h||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"}),f.attr({class:u||"apexcharts-datalabel",cx:i,cy:a}),d.dropShadow.enabled){const t=d.dropShadow;new X(this.w).dropShadow(f,t)}c.add(f),void 0===e.globals.lastDrawnDataLabelsIndexes[o]&&(e.globals.lastDrawnDataLabelsIndexes[o]=[]),e.globals.lastDrawnDataLabelsIndexes[o].push(r)}return f}addBackgroundToDataLabel(t,e){const s=this.w,i=s.config.dataLabels.background,a=i.padding,o=i.padding/2,r=e.width,n=e.height,l=new T(this.w).drawRect(e.x-a,e.y-o/2,r+2*a,n+o,i.borderRadius,"transparent"!==s.config.chart.background&&s.config.chart.background?s.config.chart.background:"#fff",i.opacity,i.borderWidth,i.borderColor);if(i.dropShadow.enabled){new X(this.w).dropShadow(l,i.dropShadow)}return l}dataLabelsBackground(){var t;const e=this.w;if("bubble"===e.config.chart.type)return;const s=e.dom.baseEl.querySelectorAll(".apexcharts-datalabels text");for(let i=0;i<s.length;i++){const a=s[i],o=a.getBBox();let r=null;if(o.width&&o.height&&(r=this.addBackgroundToDataLabel(a,o)),r){null==(t=a.parentNode)||t.insertBefore(r.node,a);const s=e.config.dataLabels.background.backgroundColor||a.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?r.animate().attr({fill:s}):r.attr({fill:s}),a.setAttribute("fill",e.config.dataLabels.background.foreColor)}}}bringForward(){const t=this.w,e=t.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),s=t.dom.baseEl.querySelector(".apexcharts-plot-series:last-child");for(let t=0;t<e.length;t++)s&&s.insertBefore(e[t],s.nextSibling)}}class _{static invalidateAll(t){t&&t.globals&&(t.globals.cachedSelectors&&(t.globals.cachedSelectors={}),t.globals.domCache&&t.globals.domCache.clear(),t.globals.dimensionCache={})}static invalidateDimensions(t){t&&t.globals&&(t.globals.dimensionCache={})}static invalidateSelectors(t){t&&t.globals&&t.globals.cachedSelectors&&(t.globals.cachedSelectors={})}static getCachedSelector(t,e,s){return t&&t.globals?(t.globals.cachedSelectors||(t.globals.cachedSelectors={}),t.globals.cachedSelectors[e]||(t.globals.cachedSelectors[e]=s()),t.globals.cachedSelectors[e]):s()}static getCachedDimension(t,e,s,i=1e3){if(!t||!t.globals)return s();t.globals.dimensionCache||(t.globals.dimensionCache={});const a=t.globals.dimensionCache[e],o=Date.now();if(a&&a.lastUpdate&&o-a.lastUpdate<i)return a.value;const r=s();return t.globals.dimensionCache[e]={value:r,lastUpdate:o},r}static cacheDOMElement(t,e,s){t&&t.globals&&(t.globals.domCache||(t.globals.domCache=new Map),t.globals.domCache.set(e,s))}static getCachedDOMElement(t,e){return t&&t.globals&&t.globals.domCache&&t.globals.domCache.get(e)||null}}class G{constructor(t,{theme:e=null,timeScale:s=null}={}){this.w=t,this.theme=e,this.timeScale=s}getLabel(t,e,s,i,a=[],o="12px",r=!0){const n=this.w,l=void 0===t[i]?"":t[i];let h=l;const c=n.formatters.xLabelFormatter,d=n.config.xaxis.labels.formatter;let g=!1;const p=new w(this.w),x=l;r&&(h=p.xLabelFormat(c,l,x,{i:i,dateFormatter:new y(this.w).formatDate,w:n}),void 0!==d&&(h=d(l,t[i],{i:i,dateFormatter:new y(this.w).formatDate,w:n})));e.length>0?(g=(t=>{let s=null;return e.forEach(t=>{"month"===t.unit?s="year":"day"===t.unit?s="month":"hour"===t.unit?s="day":"minute"===t.unit&&(s="hour")}),s===t})(e[i].unit),s=e[i].position,h=e[i].value):"datetime"===n.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();const u=new T(this.w);let f={};f=n.layout.rotateXLabels&&r?u.getTextRects(h,parseInt(o,10).toString(),null,`rotate(${n.config.xaxis.labels.rotate} 0 0)`,!1):u.getTextRects(h,parseInt(o,10).toString());const b=!n.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||a.indexOf(h)>=0&&b)&&(h=""),{x:s,text:h,textRect:f,isBold:g}}checkLabelBasedOnTickamount(t,e,s){const i=this.w;let a=i.config.xaxis.tickAmount;if("dataPoints"===a&&(a=Math.round(i.layout.gridWidth/120)),a>s)return e;return t%Math.round(s/(a+1))===0||(e.text=""),e}checkForOverflowingLabels(t,e,s,i,a){const o=this.w;if(0===t&&o.globals.skipFirstTimelinelabel&&(e.text=""),t===s-1&&o.globals.skipLastTimelinelabel&&(e.text=""),o.config.xaxis.labels.hideOverlappingLabels&&i.length>0){const t=a[a.length-1];if(o.config.xaxis.labels.trim&&"datetime"!==o.config.xaxis.type)return e;e.x<t.textRect.width/(o.layout.rotateXLabels?Math.abs(o.config.xaxis.labels.rotate)/12:1.01)+t.x&&(e.text="")}return e}checkForReversedLabels(t,e){const s=this.w;return s.config.yaxis[t]&&s.config.yaxis[t].reversed&&e.reverse(),e}yAxisAllSeriesCollapsed(t){const e=this.w.globals;return!e.seriesYAxisMap[t].some(t=>-1===e.collapsedSeriesIndices.indexOf(t))}translateYAxisIndex(t){const e=this.w,s=e.globals,i=e.config.yaxis;return e.seriesData.series.length>i.length||i.some(t=>Array.isArray(t.seriesName))?t:s.seriesYAxisReverseMap[t]}isYAxisHidden(t){const e=this.w,s=e.config.yaxis[t];if(!s.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!s.showForNullSeries){const s=e.globals.seriesYAxisMap[t],i=new E(this.w);return s.every(t=>i.isSeriesNull(t))}return!1}getYAxisForeColor(t,e){var s;const i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&(null==(s=this.theme)||s.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1)),t}drawYAxisTicks(t,e,s,i,a,o,r){const n=this.w,l=new T(this.w);let h=n.layout.translateY+n.config.yaxis[a].labels.offsetY;if(n.globals.isBarHorizontal?h=0:"heatmap"===n.config.chart.type&&(h+=o/2),i.show&&e>0){!0===n.config.yaxis[a].opposite&&(t+=i.width);for(let a=e;a>=0;a--){const e=l.drawLine(t+s.offsetX-i.width+i.offsetX,h+i.offsetY,t+s.offsetX+i.offsetX,h+i.offsetY,i.color);r.add(e),h+=o}}}}class ${constructor(t,e,s){this.w=t,this.ctx=e,this.elgrid=s,this.axesUtils=new G(t,{theme:e.theme,timeScale:e.timeScale}),this.xaxisLabels=t.labelData.labels.slice(),t.labelData.timescaleLabels.length>0&&!t.globals.isBarHorizontal&&(this.xaxisLabels=t.labelData.timescaleLabels.slice()),t.config.xaxis.overwriteCategories&&(this.xaxisLabels=t.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===t.config.xaxis.position?this.offY=0:this.offY=t.layout.gridHeight,this.offY=this.offY+t.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===t.config.chart.type&&t.config.plotOptions.bar.horizontal,this.xaxisFontSize=t.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=t.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=t.config.xaxis.labels.style.colors,this.xaxisBorderWidth=t.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=t.config.yaxis[0].axisBorder.width.toString()),String(this.xaxisBorderWidth).indexOf("%")>-1?this.xaxisBorderWidth=t.layout.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=t.config.xaxis.axisBorder.height,this.yaxis=t.config.yaxis[0]}drawXaxis(){const t=this.w,e=new T(this.w),s=e.group({class:"apexcharts-xaxis",transform:`translate(${t.config.xaxis.offsetX}, ${t.config.xaxis.offsetY})`}),i=e.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${t.layout.translateXAxisX}, ${t.layout.translateXAxisY})`});s.add(i);let a=[];for(let t=0;t<this.xaxisLabels.length;t++)a.push(this.xaxisLabels[t]);if(this.drawXAxisLabelAndGroup(!0,e,i,a,t.axisFlags.isXNumeric,(t,e)=>e),t.labelData.hasXaxisGroups){const s=t.labelData.groups;a=[];for(let t=0;t<s.length;t++)a.push(s[t].title);const o={};t.config.xaxis.group.style&&(o.xaxisFontSize=t.config.xaxis.group.style.fontSize,o.xaxisFontFamily=t.config.xaxis.group.style.fontFamily,o.xaxisForeColors=t.config.xaxis.group.style.colors,o.fontWeight=t.config.xaxis.group.style.fontWeight,o.cssClass=t.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,e,i,a,!1,(t,e)=>s[t].cols*e,o)}if(void 0!==t.config.xaxis.title.text){const i=e.group({class:"apexcharts-xaxis-title"}),a=e.drawText({x:t.layout.gridWidth/2+t.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+("bottom"===t.config.xaxis.position?t.layout.xAxisLabelsHeight:-t.layout.xAxisLabelsHeight-10)+t.config.xaxis.title.offsetY,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});i.add(a),s.add(i)}if(t.config.xaxis.axisBorder.show){const i=t.globals.barPadForNumericAxis,a=e.drawLine(t.globals.padHorizontal+t.config.xaxis.axisBorder.offsetX-i,this.offY,this.xaxisBorderWidth+i,this.offY,t.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(a):s.add(a)}return s}drawXAxisLabelAndGroup(t,e,s,i,a,o,r={}){const n=[],l=[],h=this.w,c=r.xaxisFontSize||this.xaxisFontSize,d=r.xaxisFontFamily||this.xaxisFontFamily,g=r.xaxisForeColors||this.xaxisForeColors,p=r.fontWeight||h.config.xaxis.labels.style.fontWeight,x=r.cssClass||h.config.xaxis.labels.style.cssClass;let u,f=h.globals.padHorizontal;const m=i.length;let y="category"===h.config.xaxis.type?h.globals.dataPoints:m;if(0===y&&m>y&&(y=m),a){const t=Math.max(Number(h.config.xaxis.tickAmount)||1,y>1?y-1:y);u=h.layout.gridWidth/Math.min(t,m-1),f=f+o(0,u)/2+h.config.xaxis.labels.offsetX}else u=h.layout.gridWidth/y,f=f+o(0,u)+h.config.xaxis.labels.offsetX;for(let a=0;a<=m-1;a++){let r=f-o(a,u)/2+h.config.xaxis.labels.offsetX;0===a&&1===m&&u/2===f&&1===y&&(r=h.layout.gridWidth/2);let w=this.axesUtils.getLabel(i,h.labelData.timescaleLabels,r,a,n,c,t),v=28;h.layout.rotateXLabels&&t&&(v=22),h.config.xaxis.title.text&&"top"===h.config.xaxis.position&&(v+=parseFloat(h.config.xaxis.title.style.fontSize)+2),t||(v=v+parseFloat(c)+(h.layout.xAxisLabelsHeight-h.layout.xAxisGroupLabelsHeight)+(h.layout.rotateXLabels?10:0));w=void 0!==h.config.xaxis.tickAmount&&"dataPoints"!==h.config.xaxis.tickAmount&&"datetime"!==h.config.xaxis.type?this.axesUtils.checkLabelBasedOnTickamount(a,w,m):this.axesUtils.checkForOverflowingLabels(a,w,m,n,l);const A=()=>t&&h.config.xaxis.convertedCatToNumeric?g[h.globals.minX+a-1]:g[a];if(h.config.xaxis.labels.show){const i=e.drawText({x:w.x,y:this.offY+h.config.xaxis.labels.offsetY+v-("top"===h.config.xaxis.position?h.layout.xAxisHeight+h.config.xaxis.axisTicks.height-2:0),text:w.text,textAnchor:"middle",fontWeight:w.isBold?600:p,fontSize:c,fontFamily:d,foreColor:Array.isArray(g)?A():g,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(s.add(i),i.on("click",t=>{if("function"==typeof h.config.chart.events.xAxisLabelClick){const e=Object.assign({},h,{labelIndex:a});h.config.chart.events.xAxisLabelClick(t,this.ctx,e)}}),t){const t=b.createElementNS(z,"title");t.textContent=Array.isArray(w.text)?w.text.join(" "):w.text,i.node.appendChild(t),""!==w.text&&(n.push(w.text),l.push(w))}}a<m-1&&(f+=o(a+1,u))}}drawXaxisInversed(t){const e=this.w,s=new T(this.w),i=e.config.yaxis[0].opposite?e.globals.translateYAxisX[t]:0,a=s.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),o=s.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+i+", 0)"});a.add(o);const r=[];if(e.config.yaxis[t].show)for(let t=0;t<this.xaxisLabels.length;t++)r.push(this.xaxisLabels[t]);const n=e.layout.gridHeight/r.length;let l=-n/2.2;const h=e.formatters.yLabelFormatters[0],c=e.config.yaxis[0].labels;if(c.show)for(let i=0;i<=r.length-1;i++){let a=void 0===r[i]?"":r[i];a=h(a,{seriesIndex:t,dataPointIndex:i,w:e});const d=this.axesUtils.getYAxisForeColor(c.style.colors,t),g=()=>Array.isArray(d)?d[i]:d;let p=0;Array.isArray(a)&&(p=a.length/2*parseInt(c.style.fontSize,10));let x=c.offsetX-15,u="end";this.yaxis.opposite&&(u="start"),"left"===e.config.yaxis[0].labels.align?(x=c.offsetX,u="start"):"center"===e.config.yaxis[0].labels.align?(x=c.offsetX,u="middle"):"right"===e.config.yaxis[0].labels.align&&(u="end");const f=s.drawText({x:x,y:l+n+c.offsetY-p,text:a,textAnchor:u,foreColor:g(),fontSize:c.style.fontSize,fontFamily:c.style.fontFamily,fontWeight:c.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+c.style.cssClass,maxWidth:c.maxWidth});o.add(f),f.on("click",t=>{if("function"==typeof e.config.chart.events.xAxisLabelClick){const s=Object.assign({},e,{labelIndex:i});e.config.chart.events.xAxisLabelClick(t,this.ctx,s)}});const m=b.createElementNS(z,"title");if(m.textContent=Array.isArray(a)?a.join(" "):a,f.node.appendChild(m),0!==e.config.yaxis[t].labels.rotate){const i=s.rotateAroundCenter(f.node);f.node.setAttribute("transform",`rotate(${e.config.yaxis[t].labels.rotate} 0 ${i.y})`)}l+=n}if(void 0!==e.config.yaxis[0].title.text){const t=s.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+i+", 0)"}),o=s.drawText({x:e.config.yaxis[0].title.offsetX,y:e.layout.gridHeight/2+e.config.yaxis[0].title.offsetY,text:e.config.yaxis[0].title.text,textAnchor:"middle",foreColor:e.config.yaxis[0].title.style.color,fontSize:e.config.yaxis[0].title.style.fontSize,fontWeight:e.config.yaxis[0].title.style.fontWeight,fontFamily:e.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+e.config.yaxis[0].title.style.cssClass});t.add(o),a.add(t)}let d=0;this.isCategoryBarHorizontal&&e.config.yaxis[0].opposite&&(d=e.layout.gridWidth);const g=e.config.xaxis.axisBorder;if(g.show){const t=s.drawLine(e.globals.padHorizontal+g.offsetX+d,1+g.offsetY,e.globals.padHorizontal+g.offsetX+d,e.layout.gridHeight+g.offsetY,g.color,0);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(t):a.add(t)}return e.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(d,r.length,e.config.yaxis[0].axisBorder,e.config.yaxis[0].axisTicks,0,n,a),a}drawXaxisTicks(t,e,s){const i=this.w,a=t;if(t<0||t-2>i.layout.gridWidth)return;const o=this.offY+i.config.xaxis.axisTicks.offsetY;if(e=e+o+i.config.xaxis.axisTicks.height,"top"===i.config.xaxis.position&&(e=o-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){const r=new T(this.w).drawLine(t+i.config.xaxis.axisTicks.offsetX,o+i.config.xaxis.offsetY,a+i.config.xaxis.axisTicks.offsetX,e+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);s.add(r),r.node.classList.add("apexcharts-xaxis-tick")}}getXAxisTicksPositions(){const t=this.w,e=[],s=this.xaxisLabels.length;let i=t.globals.padHorizontal;if(t.labelData.timescaleLabels.length>0)for(let t=0;t<s;t++)i=this.xaxisLabels[t].position,e.push(i);else{const a=s;for(let s=0;s<a;s++){let s=a;t.axisFlags.isXNumeric&&"bar"!==t.config.chart.type&&(s-=1),i+=t.layout.gridWidth/s,e.push(i)}}return e}xAxisLabelCorrections(){var t,e,s;const i=this.w,a=new T(this.w),o=i.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),r=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),n=i.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),l=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(i.layout.rotateXLabels||i.config.xaxis.labels.rotateAlways)for(let t=0;t<r.length;t++){const e=a.rotateAroundCenter(r[t]);e.y=e.y-1,e.x=e.x+1,r[t].setAttribute("transform",`rotate(${i.config.xaxis.labels.rotate} ${e.x} ${e.y})`),r[t].setAttribute("text-anchor","end"),null==o||o.setAttribute("transform","translate(0, -10)");const s=r[t].childNodes;i.config.xaxis.labels.trim&&Array.prototype.forEach.call(s,t=>{a.placeTextWithEllipsis(t,t.textContent,i.layout.xAxisLabelsHeight-("bottom"===i.config.legend.position?20:10))})}else{const t=i.layout.gridWidth/(i.labelData.labels.length+1);for(let e=0;e<r.length;e++){const s=r[e].childNodes;i.config.xaxis.labels.trim&&"datetime"!==i.config.xaxis.type&&Array.prototype.forEach.call(s,e=>{a.placeTextWithEllipsis(e,e.textContent,t)})}}if(n.length>0){const o=n[n.length-1].getBBox(),r=n[0].getBBox();o.x<-20&&(null==(t=n[n.length-1].parentNode)||t.removeChild(n[n.length-1])),r.x+r.width>i.layout.gridWidth&&!i.globals.isBarHorizontal&&(null==(e=n[0].parentNode)||e.removeChild(n[0]));for(let t=0;t<l.length;t++)a.placeTextWithEllipsis(l[t],null!=(s=l[t].textContent)?s:"",i.config.yaxis[0].labels.maxWidth-(i.config.yaxis[0].title.text?2*parseFloat(i.config.yaxis[0].title.style.fontSize):0)-15)}}}class j{constructor(t,e){this.w=t,this.ctx=e,this.xaxisLabels=t.labelData.labels.slice(),this.axesUtils=new G(e.w,{theme:e.theme,timeScale:e.timeScale}),this.isRangeBar=t.rangeData.seriesRange.length&&t.globals.isBarHorizontal,t.labelData.timescaleLabels.length>0&&(this.xaxisLabels=t.labelData.timescaleLabels.slice())}drawGridArea(t=null){const e=this.w,s=new T(this.w);t||(t=s.group({class:"apexcharts-grid"}));const i=s.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.layout.gridHeight,"transparent"),a=s.drawLine(e.globals.padHorizontal,e.layout.gridHeight,e.layout.gridWidth,e.layout.gridHeight,"transparent");return t.add(a),t.add(i),t}drawGrid(){if(this.w.globals.axisCharts){const t=this.renderGrid();return this.drawGridArea(t.el),t}return null}createGridMask(){const t=this.w,e=t.globals,s=new T(this.w),i=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,a=t=>{const e=b.createElementNS(z,"clipPath");return e.setAttribute("id",t),e};t.dom.elGridRectMask=a(`gridRectMask${e.cuid}`),t.dom.elGridRectBarMask=a(`gridRectBarMask${e.cuid}`),t.dom.elGridRectMarkerMask=a(`gridRectMarkerMask${e.cuid}`),t.dom.elForecastMask=a(`forecastMask${e.cuid}`),t.dom.elNonForecastMask=a(`nonForecastMask${e.cuid}`);let o=0,r=0;(["bar","rangeBar","candlestick","boxPlot"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.axisFlags.isXNumeric&&!t.globals.isBarHorizontal&&(o=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),r=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),t.dom.elGridRect=s.drawRect(-i/2-2,-i/2-2,t.layout.gridWidth+i+4,t.layout.gridHeight+i+4,0,"#fff"),t.dom.elGridRectBar=s.drawRect(-i/2-o-2,-i/2-2,t.layout.gridWidth+i+r+o+4,t.layout.gridHeight+i+4,0,"#fff");const n=t.globals.markers.largestSize;t.dom.elGridRectMarker=s.drawRect(Math.min(-i/2-o-2,-n),-n,t.layout.gridWidth+Math.max(i+r+o+4,2*n),t.layout.gridHeight+2*n,0,"#fff"),t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node),t.dom.elGridRectBarMask.appendChild(t.dom.elGridRectBar.node),t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node);const l=t.dom.elDefs.node;l.appendChild(t.dom.elGridRectMask),l.appendChild(t.dom.elGridRectBarMask),l.appendChild(t.dom.elGridRectMarkerMask),l.appendChild(t.dom.elForecastMask),l.appendChild(t.dom.elNonForecastMask)}_drawGridLines({i:t,x1:e,y1:s,x2:i,y2:a,xCount:o,parent:r}){const n=this.w;if(!(0===t&&n.globals.skipFirstTimelinelabel||t===o-1&&n.globals.skipLastTimelinelabel&&!n.config.xaxis.labels.formatter||"radar"===n.config.chart.type)){n.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:e,y1:s,x2:i,y2:a,xCount:o,parent:r});let l=0;if(n.labelData.hasXaxisGroups&&"between"===n.config.xaxis.tickPlacement){const e=n.labelData.groups;if(e){let s=0;for(let i=0;s<t&&i<e.length;i++)s+=e[i].cols;s===t&&(l=.6*n.layout.xAxisLabelsHeight)}}new $(this.w,this.ctx).drawXaxisTicks(e,l,n.dom.elGraphical)}}_drawGridLine({i:t,x1:e,y1:s,x2:i,y2:a,xCount:o,parent:r}){const n=this.w,l=r.node.classList.contains("apexcharts-gridlines-horizontal"),h=n.globals.barPadForNumericAxis,c=0===s&&0===a||0===e&&0===i||s===n.layout.gridHeight&&a===n.layout.gridHeight||n.globals.isBarHorizontal&&(0===t||t===o-1),d=new T(this.w).drawLine(e-(l?h:0),s,i+(l?h:0),a,n.config.grid.borderColor,n.config.grid.strokeDashArray);d.node.classList.add("apexcharts-gridline"),c&&n.config.grid.show?this.elGridBorders.add(d):r.add(d)}_drawGridBandRect({c:t,x1:e,y1:s,x2:i,y2:a,type:o}){const r=this.w,n=new T(this.w),l=r.globals.barPadForNumericAxis,h=r.config.grid[o].colors[t],c=n.drawRect(e-("row"===o?l:0),s,i+("row"===o?2*l:0),a,0,h,r.config.grid[o].opacity);this.elg.add(c),c.attr("clip-path",`url(#gridRectMask${r.globals.cuid})`),c.node.classList.add(`apexcharts-grid-${o}`)}_drawXYLines({xCount:t,tickAmount:e}){var s;const i=this.w,a=({xC:e,x1:s,y1:i,x2:a,y2:o})=>{for(let r=0;r<e;r++)s=this.xaxisLabels[r].position,a=this.xaxisLabels[r].position,this._drawGridLines({i:r,x1:s,y1:i,x2:a,y2:o,xCount:t,parent:this.elgridLinesV})},o=({xC:e,x1:s,y1:a,x2:o,y2:r})=>{for(let n=0;n<e+(i.axisFlags.isXNumeric?0:1);n++)0===n&&1===e&&1===i.globals.dataPoints&&(o=s=i.layout.gridWidth/2),this._drawGridLines({i:n,x1:s,y1:a,x2:o,y2:r,xCount:t,parent:this.elgridLinesV}),o=s+=i.layout.gridWidth/(i.axisFlags.isXNumeric?e-1:e)};if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show){const e=i.globals.padHorizontal,r=0;let n;const l=i.layout.gridHeight;i.labelData.timescaleLabels.length?a({xC:t,x1:e,y1:r,x2:n,y2:l}):(i.axisFlags.isXNumeric&&(t=null==(s=i.globals.xAxisScale)?void 0:s.result.length),o({xC:t,x1:e,y1:r,x2:n,y2:l}))}if(i.config.grid.yaxis.lines.show){const t=0;let s=0,a=0;const o=i.layout.gridWidth;let r=e+1;this.isRangeBar&&(r=i.labelData.labels.length);for(let n=0;n<r+(this.isRangeBar?1:0);n++)this._drawGridLine({i:n,xCount:r+(this.isRangeBar?1:0),x1:t,y1:s,x2:o,y2:a,parent:this.elgridLinesH}),s+=i.layout.gridHeight/(this.isRangeBar?r:e),a=s}}_drawInvertedXYLines({xCount:t}){const e=this.w;if(e.config.grid.xaxis.lines.show||e.config.xaxis.axisTicks.show){let s=e.globals.padHorizontal;const i=0;let a;const o=e.layout.gridHeight;for(let r=0;r<t+1;r++){e.config.grid.xaxis.lines.show&&this._drawGridLine({i:r,xCount:t+1,x1:s,y1:i,x2:a,y2:o,parent:this.elgridLinesV});new $(this.w,this.ctx).drawXaxisTicks(s,0,e.dom.elGraphical),s+=e.layout.gridWidth/t,a=s}}if(e.config.grid.yaxis.lines.show){const t=0;let s=0,i=0;const a=e.layout.gridWidth;for(let o=0;o<e.globals.dataPoints+1;o++)this._drawGridLine({i:o,xCount:e.globals.dataPoints+1,x1:t,y1:s,x2:a,y2:i,parent:this.elgridLinesH}),s+=e.layout.gridHeight/e.globals.dataPoints,i=s}}renderGrid(){var t,e,s;const i=this.w,a=i.globals,o=new T(this.w);this.elg=o.group({class:"apexcharts-grid"}),this.elgridLinesH=o.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=o.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=o.group({class:"apexcharts-grid-borders"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),i.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());let r=0;for(;r<a.seriesYAxisMap.length&&a.ignoreYAxisIndexes.includes(r);)r++;r===a.seriesYAxisMap.length&&(r=0);let n,l=a.yAxisScale[r].result.length-1;return!a.isBarHorizontal||this.isRangeBar?(n=this.xaxisLabels.length,this.isRangeBar&&(l=i.labelData.labels.length,i.config.xaxis.tickAmount&&i.config.xaxis.labels.formatter&&(n=i.config.xaxis.tickAmount),(null==(s=null==(e=null==(t=a.yAxisScale)?void 0:t[r])?void 0:e.result)?void 0:s.length)>0&&"datetime"!==i.config.xaxis.type&&(n=a.yAxisScale[r].result.length-1)),this._drawXYLines({xCount:n,tickAmount:l})):(n=l,l=a.xTickAmount,this._drawInvertedXYLines({xCount:n,tickAmount:l})),this.drawGridBands(n,l),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:i.layout.gridWidth/n}}drawGridBands(t,e){var s,i,a,o,r;const n=this.w,l=(t,s,i,a,o,r)=>{for(let l=0,h=0;l<s;l++,h++)h>=n.config.grid[t].colors.length&&(h=0),this._drawGridBandRect({c:h,x1:i,y1:a,x2:o,y2:r,type:t}),a+=n.layout.gridHeight/e};if((null==(s=n.config.grid.row.colors)?void 0:s.length)>0&&l("row",e,0,0,n.layout.gridWidth,n.layout.gridHeight/e),(null==(i=n.config.grid.column.colors)?void 0:i.length)>0){let e=n.globals.isBarHorizontal||"on"!==n.config.xaxis.tickPlacement||"category"!==n.config.xaxis.type&&!n.config.xaxis.convertedCatToNumeric?t:t-1;n.axisFlags.isXNumeric&&(e=(null!=(o=null==(a=n.globals.xAxisScale)?void 0:a.result.length)?o:1)-1);let s=n.globals.padHorizontal;const i=0;let l=n.globals.padHorizontal+n.layout.gridWidth/e;const h=n.layout.gridHeight;for(let a=0,o=0;a<t;a++,o++)o>=n.config.grid.column.colors.length&&(o=0),"datetime"===n.config.xaxis.type&&(s=this.xaxisLabels[a].position,l=((null==(r=this.xaxisLabels[a+1])?void 0:r.position)||n.layout.gridWidth)-this.xaxisLabels[a].position),this._drawGridBandRect({c:o,x1:s,y1:i,x2:l,y2:h,type:"column"}),s+=n.layout.gridWidth/e}}}class V{constructor(t){this.w=t,this.coreUtils=new E(this.w)}niceScale(t,e,s=0){const i=1e-11,a=this.w,o=a.globals;let r,n,l,h;o.isBarHorizontal?(r=a.config.xaxis,n=Math.max((o.svgWidth-100)/25,2)):(r=a.config.yaxis[s],n=Math.max((o.svgHeight-100)/15,2)),m.isNumber(n)||(n=10),l=void 0!==r.min&&null!==r.min,h=void 0!==r.max&&null!==r.min;let c=void 0!==r.stepSize&&null!==r.stepSize,d=void 0!==r.tickAmount&&null!==r.tickAmount,g=d?r.tickAmount:P[Math.min(Math.round(n/2),P.length-1)];if(o.isMultipleYAxis&&!d&&o.multiAxisTickAmount>0&&(g=o.multiAxisTickAmount,d=!0),g="dataPoints"===g?o.dataPoints-1:Math.abs(Math.round(g)),(t===Number.MIN_VALUE&&0===e||!m.isNumber(t)&&!m.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=m.isNumber(r.min)?r.min:0,e=m.isNumber(r.max)?r.max:t+g,o.allSeriesCollapsed=!1),t>e){const s=e;e=t,t=s}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);const p=[];g<1&&(g=1);let x=g,u=Math.abs(e-t);!l&&t>0&&t/u<.15&&(t=0,l=!0),!h&&e<0&&-e/u<.15&&(e=0,h=!0),u=Math.abs(e-t);let f=u/x,b=f;const y=Math.floor(Math.log10(b)),w=Math.pow(10,y);let v=Math.ceil(b/w);if(v=L[0===o.yValueDecimal?0:1][v],b=v*w,f=b,o.isBarHorizontal&&r.stepSize&&"datetime"!==r.type?(f=r.stepSize,c=!0):c&&(f=r.stepSize),c&&r.forceNiceScale){const t=Math.floor(Math.log10(f));f*=Math.pow(10,y-t)}if(l&&h){let t=u/x;if(d)if(c)if(0!=m.mod(u,f)){const e=m.getGCD(f,t);f=t/e<10?e:t}else 0==m.mod(f,t)?f=t:(t=f,d=!1);else f=t;else if(c)0==m.mod(u,f)?t=f:f=t;else if(0==m.mod(u,f))t=f;else{x=Math.ceil(u/f),t=u/x;const e=m.getGCD(u,f);u/e<n&&(t=e),f=t}x=Math.round(u/f)}else{if(l||h){if(h)if(d)t=e-f*x;else{const s=t;t=f*Math.floor(t/f),Math.abs(e-t)/m.getGCD(u,f)>n&&(t=e-f*g,t+=f*Math.floor((s-t)/f))}else if(l)if(d)e=t+f*x;else{const s=e;e=f*Math.ceil(e/f),Math.abs(e-t)/m.getGCD(u,f)>n&&(e=t+f*g,e+=f*Math.ceil((s-e)/f))}}else if(o.isMultipleYAxis&&d){const s=f*Math.floor(t/f);let i=s+f*x;i<e&&(f*=2),i=e,e=(t=s)+f*x,u=Math.abs(e-t),t>0&&t<Math.abs(i-e)&&(t=0,e=f*x),e<0&&-e<Math.abs(s-t)&&(e=0,t=-f*x)}else t=f*Math.floor(t/f),e=f*Math.ceil(e/f);u=Math.abs(e-t),f=m.getGCD(u,f),x=Math.round(u/f)}if(d||l||h||(x=Math.ceil((u-i)/(f+i)),x>16&&m.getPrimeFactors(x).length<2&&x++),!d&&r.forceNiceScale&&0===o.yValueDecimal&&x>u&&(x=u,f=Math.round(u/x)),x>n&&(!d&&!c||r.forceNiceScale)){const t=m.getPrimeFactors(x),e=t.length-1;let s=x;t:for(var A=0;A<e;A++)for(var C=0;C<=e-A;C++){const i=Math.min(C+A,e);let a=s,o=1;for(var S=C;S<=i;S++)o*=t[S];if(a/=o,a<n){s=a;break t}}f=s===x?u:u/s,x=Math.round(u/f)}o.isMultipleYAxis&&0==o.multiAxisTickAmount&&o.ignoreYAxisIndexes.indexOf(s)<0&&(o.multiAxisTickAmount=x);let k=t-f;const D=f*i;do{k+=f,p.push(m.stripNumber(k,7))}while(e-k>D);return{result:p,niceMin:p[0],niceMax:p[p.length-1]}}linearScale(t,e,s=10,i=0,a=void 0){const o=Math.abs(e-t);let r=[];if(t===e)return r=[t],{result:r,niceMin:r[0],niceMax:r[r.length-1]};"dataPoints"===(s=this._adjustTicksForSmallRange(s,i,o))&&(s=this.w.globals.dataPoints-1);const n=s;a||(a=o/n);if(0!==a&&isFinite(a)){const t=Math.floor(Math.log10(Math.abs(a))),e=Math.max(2,2-t),s=Math.pow(10,e);a=Math.round((a+Number.EPSILON)*s)/s}let l=s===Number.MAX_VALUE?5:n;s===Number.MAX_VALUE&&(a=1);let h=t;for(;l>=0;)r.push(h),h=m.preciseAddition(h,a),l-=1;return{result:r,niceMin:r[0],niceMax:r[r.length-1]}}logarithmicScaleNice(t,e,s){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));const i=[],a=Math.ceil(Math.log(e)/Math.log(s)+1);for(let e=Math.floor(Math.log(t)/Math.log(s));e<a;e++)i.push(Math.pow(s,e));return{result:i,niceMin:i[0],niceMax:i[i.length-1]}}logarithmicScale(t,e,s){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));const i=[],a=Math.log(e)/Math.log(s),o=Math.log(t)/Math.log(s),r=a-o,n=Math.round(r),l=r/n;for(let t=0,e=o;t<n;t++,e+=l)i.push(Math.pow(s,e));return i.push(Math.pow(s,a)),{result:i,niceMin:t,niceMax:e}}_adjustTicksForSmallRange(t,e,s){let i=t;if(void 0!==e&&this.w.config.yaxis[e].labels.formatter&&void 0===this.w.config.yaxis[e].tickAmount){const t=Number(this.w.config.yaxis[e].labels.formatter(1));m.isNumber(t)&&0===this.w.globals.yValueDecimal&&(i=Math.ceil(s))}return i<t?i:t}setYScaleForIndex(t,e,s){const i=this.w.globals,a=this.w.config,o=i.isBarHorizontal?a.xaxis:a.yaxis[t];void 0===i.yAxisScale[t]&&(i.yAxisScale[t]=[]);const r=Math.abs(s-e);o.logarithmic&&r<=5&&(i.invalidLogScale=!0),o.logarithmic&&r>5?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=o.forceNiceScale?this.logarithmicScaleNice(e,s,o.logBase):this.logarithmicScale(e,s,o.logBase)):s!==-Number.MAX_VALUE&&m.isNumber(s)&&e!==Number.MAX_VALUE&&m.isNumber(e)?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=this.niceScale(e,s,t)):i.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}setXScale(t,e){const s=this.w,i=s.globals;if(e!==-Number.MAX_VALUE&&m.isNumber(e)){const a=i.xTickAmount;i.xAxisScale=this.linearScale(t,e,a,0,void 0===s.config.xaxis.max?s.config.xaxis.stepSize:void 0)}else i.xAxisScale=this.linearScale(0,10,10);return i.xAxisScale}scaleMultipleYAxes(){const t=this.w.config,e=this.w.globals;this.coreUtils.setSeriesYAxisMappings();const s=e.seriesYAxisMap,i=e.minYArr,a=e.maxYArr;e.allSeriesCollapsed=!0,e.barGroups=[],s.forEach((s,o)=>{const r=[];if(s.forEach(e=>{var s;const i=null==(s=t.series[e])?void 0:s.group;r.indexOf(i)<0&&r.push(i)}),s.length>0){let n,l,h=Number.MAX_VALUE,c=-Number.MAX_VALUE,d=h,g=c;if(t.chart.stacked){const i=new Array(e.dataPoints).fill(0),a=[],p=[],x=[];r.forEach(()=>{a.push(i.map(()=>Number.MIN_VALUE)),p.push(i.map(()=>Number.MIN_VALUE)),x.push(i.map(()=>Number.MIN_VALUE))});for(let i=0;i<s.length;i++){!n&&t.series[s[i]].type&&(n=t.series[s[i]].type);const h=s[i];l=t.series[h].group?t.series[h].group:"axis-".concat(o.toString());!(e.collapsedSeriesIndices.indexOf(h)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(h)<0)||(e.allSeriesCollapsed=!1,r.forEach((e,s)=>{if(t.series[h].group===e)for(let t=0;t<this.w.seriesData.series[h].length;t++){const e=this.w.seriesData.series[h][t];e>=0?p[s][t]+=e:x[s][t]+=e,a[s][t]+=e,d=Math.min(d,e),g=Math.max(g,e)}})),"bar"!==n&&"column"!==n||e.barGroups.push(l)}n||(n=t.chart.type),"bar"===n||"column"===n?r.forEach((t,e)=>{h=Math.min(h,Math.min.apply(null,x[e])),c=Math.max(c,Math.max.apply(null,p[e]))}):(r.forEach((t,e)=>{d=Math.min(d,Math.min.apply(null,a[e])),g=Math.max(g,Math.max.apply(null,a[e]))}),h=d,c=g),h===Number.MIN_VALUE&&c===Number.MIN_VALUE&&(c=-Number.MAX_VALUE)}else for(let t=0;t<s.length;t++){const o=s[t];h=Math.min(h,i[o]),c=Math.max(c,a[o]);!(e.collapsedSeriesIndices.indexOf(o)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(o)<0)||(e.allSeriesCollapsed=!1)}void 0!==t.yaxis[o].min&&(h="function"==typeof t.yaxis[o].min?t.yaxis[o].min(h):t.yaxis[o].min),void 0!==t.yaxis[o].max&&(c="function"==typeof t.yaxis[o].max?t.yaxis[o].max(c):t.yaxis[o].max),e.barGroups=e.barGroups.filter((t,e,s)=>s.indexOf(t)===e),this.setYScaleForIndex(o,h,c),s.forEach(t=>{i[t]=e.yAxisScale[o].niceMin,a[t]=e.yAxisScale[o].niceMax})}else this.setYScaleForIndex(o,0,-Number.MAX_VALUE)})}}class U{constructor(t){this.w=t,this.scales=new V(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}getMinYMaxY(t,e=Number.MAX_VALUE,s=-Number.MAX_VALUE,i=null){var a,o,r,n,l;const h=this.w.config,c=this.w.globals;let d=-Number.MAX_VALUE,g=Number.MIN_VALUE;null===i&&(i=t+1);const p=this.w.seriesData.series;let x=p,u=p;"candlestick"===h.chart.type?(x=this.w.candleData.seriesCandleL,u=this.w.candleData.seriesCandleH):"boxPlot"===h.chart.type?(x=this.w.candleData.seriesCandleO,u=this.w.candleData.seriesCandleC):this.w.axisFlags.isRangeData&&(x=this.w.rangeData.seriesRangeStart,u=this.w.rangeData.seriesRangeEnd);let f=!1;if(this.w.seriesData.seriesX.length>=i){const t=null==(a=c.brushSource)?void 0:a.w.config.chart.brush;(h.chart.zoom.enabled&&h.chart.zoom.autoScaleYaxis||(null==t?void 0:t.enabled)&&(null==t?void 0:t.autoScaleYaxis))&&(f=!0)}for(let a=t;a<i;a++){c.dataPoints=Math.max(c.dataPoints,p[a].length);const t=h.series[a].type;this.w.labelData.categoryLabels.length&&(c.dataPoints=this.w.labelData.categoryLabels.filter(t=>void 0!==t).length),this.w.labelData.labels.length&&"datetime"!==h.xaxis.type&&0!==this.w.seriesData.series.reduce((t,e)=>t+e.length,0)&&(c.dataPoints=Math.max(c.dataPoints,this.w.labelData.labels.length));let i=0,b=p[a].length-1;if(f){if(h.xaxis.min)for(;i<b&&this.w.seriesData.seriesX[a][i]<h.xaxis.min;i++);if(h.xaxis.max)for(;b>i&&this.w.seriesData.seriesX[a][b]>h.xaxis.max;b--);}for(let h=i;h<=b&&h<this.w.seriesData.series[a].length;h++){let i=p[a][h];if(null!==i&&m.isNumber(i)){switch(void 0!==(null==(o=u[a])?void 0:o[h])&&(d=Math.max(d,u[a][h]),e=Math.min(e,u[a][h])),void 0!==(null==(r=x[a])?void 0:r[h])&&(e=Math.min(e,x[a][h]),s=Math.max(s,x[a][h])),t){case"candlestick":void 0!==this.w.candleData.seriesCandleC[a][h]&&(d=Math.max(d,this.w.candleData.seriesCandleH[a][h]),e=Math.min(e,this.w.candleData.seriesCandleL[a][h]));break;case"boxPlot":void 0!==this.w.candleData.seriesCandleC[a][h]&&(d=Math.max(d,this.w.candleData.seriesCandleC[a][h]),e=Math.min(e,this.w.candleData.seriesCandleO[a][h]))}t&&"candlestick"!==t&&"boxPlot"!==t&&"rangeArea"!==t&&"rangeBar"!==t&&(d=Math.max(d,this.w.seriesData.series[a][h]),e=Math.min(e,this.w.seriesData.series[a][h])),this.w.seriesData.seriesGoals[a]&&this.w.seriesData.seriesGoals[a][h]&&Array.isArray(this.w.seriesData.seriesGoals[a][h])&&this.w.seriesData.seriesGoals[a][h].forEach(t=>{d=Math.max(d,t.value),e=Math.min(e,t.value)}),s=d,i=m.noExponents(i),m.isFloat(i)&&(c.yValueDecimal=Math.max(c.yValueDecimal,i.toString().split(".")[1].length)),g>(null==(n=x[a])?void 0:n[h])&&(null==(l=x[a])?void 0:l[h])<0&&(g=x[a][h])}else c.hasNullValues=!0}"bar"!==t&&"column"!==t||(g<0&&d<0&&(d=0,s=Math.max(s,0)),g===Number.MIN_VALUE&&(g=0,e=Math.min(e,0)))}return"rangeBar"===h.chart.type&&this.w.rangeData.seriesRangeStart.length&&c.isBarHorizontal&&(g=e),"bar"===h.chart.type&&(g<0&&d<0&&(d=0),g===Number.MIN_VALUE&&(g=0)),{minY:g,maxY:d,lowestY:e,highestY:s}}setYRange(){const t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;let s,i=Number.MAX_VALUE;if(t.isMultipleYAxis){i=Number.MAX_VALUE;for(let e=0;e<this.w.seriesData.series.length;e++)s=this.getMinYMaxY(e),t.minYArr[e]=s.lowestY,t.maxYArr[e]=s.highestY,i=Math.min(i,s.lowestY)}if(s=this.getMinYMaxY(0,i,void 0,this.w.seriesData.series.length),"bar"===e.chart.type?(t.minY=s.minY,t.maxY=s.maxY):(t.minY=s.lowestY,t.maxY=s.highestY),i=s.lowestY,e.chart.stacked&&this._setStackedMinMax(),"line"===e.chart.type||"area"===e.chart.type||"scatter"===e.chart.type||"candlestick"===e.chart.type||"boxPlot"===e.chart.type||"rangeBar"===e.chart.type&&!t.isBarHorizontal?t.minY===Number.MIN_VALUE&&i!==-Number.MAX_VALUE&&i!==t.maxY&&(t.minY=i):t.minY=t.minY!==Number.MIN_VALUE?Math.min(s.minY,t.minY):s.minY,e.yaxis.forEach((e,s)=>{void 0!==e.max&&("number"==typeof e.max?t.maxYArr[s]=e.max:"function"==typeof e.max&&(t.maxYArr[s]=e.max(t.isMultipleYAxis?t.maxYArr[s]:t.maxY)),t.maxY=t.maxYArr[s]),void 0!==e.min&&("number"==typeof e.min?t.minYArr[s]=e.min:"function"==typeof e.min&&(t.minYArr[s]=e.min(t.isMultipleYAxis?t.minYArr[s]===Number.MIN_VALUE?0:t.minYArr[s]:t.minY)),t.minY=t.minYArr[s])}),t.isBarHorizontal){["min","max"].forEach(s=>{void 0!==e.xaxis[s]&&"number"==typeof e.xaxis[s]&&("min"===s?t.minY=e.xaxis[s]:t.maxY=e.xaxis[s])})}return t.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),t.minY=i):(this.scales.setYScaleForIndex(0,t.minY,t.maxY),t.minY=t.yAxisScale[0].niceMin,t.maxY=t.yAxisScale[0].niceMax,t.minYArr[0]=t.minY,t.maxYArr[0]=t.maxY),t.barGroups=[],t.lineGroups=[],t.areaGroups=[],e.series.forEach(s=>{const i=s;switch(i.type||e.chart.type){case"bar":case"column":t.barGroups.push(i.group);break;case"line":t.lineGroups.push(i.group);break;case"area":t.areaGroups.push(i.group)}}),t.barGroups=t.barGroups.filter((t,e,s)=>s.indexOf(t)===e),t.lineGroups=t.lineGroups.filter((t,e,s)=>s.indexOf(t)===e),t.areaGroups=t.areaGroups.filter((t,e,s)=>s.indexOf(t)===e),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}setXRange(){const t=this.w.globals,e=this.w.config,s="numeric"===e.xaxis.type||"datetime"===e.xaxis.type||"category"===e.xaxis.type&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric,i=()=>{for(let e=0;e<this.w.seriesData.series.length;e++)if(this.w.labelData.labels[e])for(let s=0;s<this.w.labelData.labels[e].length;s++)null!==this.w.labelData.labels[e][s]&&m.isNumber(this.w.labelData.labels[e][s])&&(t.maxX=Math.max(t.maxX,this.w.labelData.labels[e][s]),t.initialMaxX=Math.max(t.maxX,this.w.labelData.labels[e][s]),t.minX=Math.min(t.minX,this.w.labelData.labels[e][s]),t.initialMinX=Math.min(t.minX,this.w.labelData.labels[e][s]))};if(this.w.axisFlags.isXNumeric&&i(),this.w.axisFlags.noLabelsProvided&&0===e.xaxis.categories.length&&(t.maxX=this.w.labelData.labels[this.w.labelData.labels.length-1],t.initialMaxX=this.w.labelData.labels[this.w.labelData.labels.length-1],t.minX=1,t.initialMinX=1),this.w.axisFlags.isXNumeric||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.dataFormatXNumeric){let i=10;if(void 0===e.xaxis.tickAmount)i=Math.round(t.svgWidth/150),"numeric"===e.xaxis.type&&t.dataPoints<30&&(i=t.dataPoints-1),i>t.dataPoints&&0!==t.dataPoints&&(i=t.dataPoints-1);else if("dataPoints"===e.xaxis.tickAmount){if(this.w.seriesData.series.length>1&&(i=this.w.seriesData.series[t.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){const e=Math.round(t.maxX-t.minX);e<30&&(i=e)}}else i=e.xaxis.tickAmount;if(t.xTickAmount=i,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!this.w.axisFlags.dataFormatXNumeric){const e=[];for(let s=t.minX-1;s<t.maxX;s++)e.push(s+1);t.xAxisScale={result:e,niceMin:e[0],niceMax:e[e.length-1]}}else t.xAxisScale=this.scales.setXScale(t.minX,t.maxX);else t.xAxisScale=this.scales.linearScale(0,i,i,0,e.xaxis.stepSize),this.w.axisFlags.noLabelsProvided&&this.w.labelData.labels.length>0&&(t.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,i-1,0,e.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());s&&(this.w.labelData.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&this.w.labelData.labels.length&&(t.xTickAmount=this.w.labelData.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}setZRange(){const t=this.w.globals;if(this.w.axisFlags.isDataXYZ)for(let e=0;e<this.w.seriesData.series.length;e++)if(void 0!==this.w.seriesData.seriesZ[e])for(let s=0;s<this.w.seriesData.seriesZ[e].length;s++)null!==this.w.seriesData.seriesZ[e][s]&&m.isNumber(this.w.seriesData.seriesZ[e][s])&&(t.maxZ=Math.max(t.maxZ,this.w.seriesData.seriesZ[e][s]),t.minZ=Math.min(t.minZ,this.w.seriesData.seriesZ[e][s]))}_handleSingleDataPoint(){const t=this.w.globals,e=this.w.config;if(t.minX===t.maxX){const s=new y(this.w);if("datetime"===e.xaxis.type){const i=s.getDate(t.minX);e.xaxis.labels.datetimeUTC?i.setUTCDate(i.getUTCDate()-2):i.setDate(i.getDate()-2),t.minX=new Date(i).getTime();const a=s.getDate(t.maxX);e.xaxis.labels.datetimeUTC?a.setUTCDate(a.getUTCDate()+2):a.setDate(a.getDate()+2),t.maxX=new Date(a).getTime()}else("numeric"===e.xaxis.type||"category"===e.xaxis.type&&!this.w.axisFlags.noLabelsProvided)&&(t.minX=t.minX-2,t.initialMinX=t.minX,t.maxX=t.maxX+2,t.initialMaxX=t.maxX)}}_getMinXDiff(){const t=this.w.globals;this.w.axisFlags.isXNumeric&&this.w.seriesData.seriesX.forEach(e=>{if(e.length){1===e.length&&e.push(this.w.seriesData.seriesX[t.maxValsInArrayIndex][this.w.seriesData.seriesX[t.maxValsInArrayIndex].length-1]);const s=e.slice();s.sort((t,e)=>t-e),s.forEach((e,i)=>{if(i>0){const a=e-s[i-1];a>0&&(t.minXDiff=Math.min(a,t.minXDiff))}}),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}})}_setStackedMinMax(){const t=this.w.globals;if(!this.w.seriesData.series.length)return;let e=this.w.labelData.seriesGroups;e.length||(e=[this.w.seriesData.seriesNames.map(t=>t)]);const s={},i={};e.forEach(e=>{s[e]=[],i[e]=[];this.w.config.series.map((t,s)=>e.indexOf(this.w.seriesData.seriesNames[s])>-1?s:null).filter(t=>null!==t).forEach(a=>{var o,r,n,l;for(let h=0;h<this.w.seriesData.series[t.maxValsInArrayIndex].length;h++){void 0===s[e][h]&&(s[e][h]=0,i[e][h]=0);(this.w.config.chart.stacked&&!t.comboCharts||this.w.config.chart.stacked&&t.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(r=null==(o=this.w.config.series)?void 0:o[a])?void 0:r.type)||"column"===(null==(l=null==(n=this.w.config.series)?void 0:n[a])?void 0:l.type)))&&null!==this.w.seriesData.series[a][h]&&m.isNumber(this.w.seriesData.series[a][h])&&(this.w.seriesData.series[a][h]>0?s[e][h]+=parseFloat(String(this.w.seriesData.series[a][h]))+1e-4:i[e][h]+=parseFloat(String(this.w.seriesData.series[a][h])))}})}),Object.entries(s).forEach(([e])=>{s[e].forEach((a,o)=>{t.maxY=Math.max(t.maxY,s[e][o]),t.minY=Math.min(t.minY,i[e][o])})})}}class q{constructor(t,{theme:e=null,timeScale:s=null}={},i){this.w=t,this.elgrid=i,this.xaxisFontSize=t.config.xaxis.labels.style.fontSize,this.axisFontFamily=t.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=t.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===t.config.chart.type&&t.config.plotOptions.bar.horizontal,this.xAxisoffX="bottom"===t.config.xaxis.position?t.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new G(t,{theme:e,timeScale:s})}drawYaxis(t){const e=this.w,s=new T(this.w),i=e.config.yaxis[t].labels.style,{fontSize:a,fontFamily:o,fontWeight:r}=i,n=s.group({class:"apexcharts-yaxis",rel:t,transform:`translate(${e.globals.translateYAxisX[t]}, 0)`});if(this.axesUtils.isYAxisHidden(t))return n;const l=s.group({class:"apexcharts-yaxis-texts-g"});n.add(l);const h=e.globals.yAxisScale[t].result.length-1,c=e.layout.gridHeight/h,d=e.formatters.yLabelFormatters[t],g=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());if(e.config.yaxis[t].labels.show){let n=e.layout.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?n=0:"heatmap"===e.config.chart.type&&(n-=c/2),n+=parseInt(a,10)/3;let p=null;for(let x=h;x>=0;x--){const h=d(g[x],x,e);let u=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(u*=-1);const f=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),b=this.axesUtils.getYAxisForeColor(i.colors,t),m=Array.isArray(b)?b[x]:b,y=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-label tspan`)).map(t=>t.textContent),w=s.drawText({x:u,y:n,text:y.includes(h)&&!e.config.yaxis[t].labels.showDuplicates?"":h,textAnchor:f,fontSize:a,fontFamily:o,fontWeight:r,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:m,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${i.cssClass}`});l.add(w),this.addTooltip(w,h),null===p&&(p=w),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(s,w,p,e.config.yaxis[t].labels.rotate),n+=c}}return this.addYAxisTitle(s,n,t),this.addAxisBorder(s,n,t,h,c),n}getTextAnchor(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}addTooltip(t,e){const s=b.createElementNS(z,"title");s.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(s)}rotateLabel(t,e,s,i){const a=t.rotateAroundCenter(s.node),o=t.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(${i} ${a.x} ${o.y})`)}addYAxisTitle(t,e,s){const i=this.w;if(void 0!==i.config.yaxis[s].title.text){const a=t.group({class:"apexcharts-yaxis-title"}),o=i.config.yaxis[s].opposite?i.globals.translateYAxisX[s]:0,r=t.drawText({x:o,y:i.layout.gridHeight/2+i.layout.translateY+i.config.yaxis[s].title.offsetY,text:i.config.yaxis[s].title.text,textAnchor:"end",foreColor:i.config.yaxis[s].title.style.color,fontSize:i.config.yaxis[s].title.style.fontSize,fontWeight:i.config.yaxis[s].title.style.fontWeight,fontFamily:i.config.yaxis[s].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text ${i.config.yaxis[s].title.style.cssClass}`});a.add(r),e.add(a)}}addAxisBorder(t,e,s,i,a){const o=this.w,r=o.config.yaxis[s].axisBorder;let n=31+r.offsetX;if(o.config.yaxis[s].opposite&&(n=-31-r.offsetX),r.show){const s=t.drawLine(n,o.layout.translateY+r.offsetY-2,n,o.layout.gridHeight+o.layout.translateY+r.offsetY+2,r.color,0,r.width);e.add(s)}o.config.yaxis[s].axisTicks.show&&this.axesUtils.drawYAxisTicks(n,i,r,o.config.yaxis[s].axisTicks,s,a,e)}drawYaxisInversed(t){const e=this.w,s=new T(this.w),i=s.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),a=s.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${e.layout.translateXAxisX}, ${e.layout.translateXAxisY})`});i.add(a);let o=e.globals.yAxisScale[t].result.length-1;const r=e.layout.gridWidth/o+.1;let n=r+e.config.xaxis.labels.offsetX;const l=e.formatters.xLabelFormatter;let h=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());const c=e.labelData.timescaleLabels;if(c.length>0&&(this.xaxisLabels=c.slice(),h=c.slice(),o=h.length),e.config.xaxis.labels.show)for(let i=c.length?0:o;c.length?i<c.length:i>=0;c.length?i++:i--){let o=null==l?void 0:l(h[i],i,e),d=e.layout.gridWidth+e.globals.padHorizontal-(n-r+e.config.xaxis.labels.offsetX);if(c.length){const t=this.axesUtils.getLabel(h,c,d,i,this.drawnLabels,this.xaxisFontSize);d=t.x,o=t.text,this.drawnLabels.push(t.text),0===i&&e.globals.skipFirstTimelinelabel&&(o=""),i===h.length-1&&e.globals.skipLastTimelinelabel&&(o="")}const g=s.drawText({x:d,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.layout.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:o,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.axisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:`apexcharts-xaxis-label ${e.config.xaxis.labels.style.cssClass}`});a.add(g),this.addTooltip(g,o),n+=r}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}inversedYAxisBorder(t){const e=this.w,s=new T(this.w),i=e.config.xaxis.axisBorder;if(i.show){let a=0;"bar"===e.config.chart.type&&e.axisFlags.isXNumeric&&(a-=15);const o=s.drawLine(e.globals.padHorizontal+a+i.offsetX,this.xAxisoffX,e.layout.gridWidth,this.xAxisoffX,i.color,0,i.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(o):t.add(o)}}inversedYAxisTitleText(t){const e=this.w,s=new T(this.w);if(void 0!==e.config.xaxis.title.text){const i=s.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),a=s.drawText({x:e.layout.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:`apexcharts-xaxis-title-text ${e.config.xaxis.title.style.cssClass}`});i.add(a),t.add(i)}}yAxisTitleRotate(t,e){const s=this.w,i=new T(this.w),a=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),o=a?a.getBoundingClientRect():{width:0,height:0},r=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-title text`),n=r?r.getBoundingClientRect():{width:0,height:0};if(r){const a=this.xPaddingForYAxisTitle(t,o,n,e);r.setAttribute("x",String(a.xPos-(e?10:0)));const l=i.rotateAroundCenter(r);r.setAttribute("transform",`rotate(${e?-1*s.config.yaxis[t].title.rotate:s.config.yaxis[t].title.rotate} ${l.x} ${l.y})`)}}xPaddingForYAxisTitle(t,e,s,i){const a=this.w;let o=0,r=10;return void 0===a.config.yaxis[t].title.text||t<0?{xPos:o,padd:0}:(i?o=e.width+a.config.yaxis[t].title.offsetX+s.width/2+r/2:(o=-1*e.width+a.config.yaxis[t].title.offsetX+r/2+s.width/2,a.globals.isBarHorizontal&&(r=25,o=-1*e.width-a.config.yaxis[t].title.offsetX-r)),{xPos:o,padd:r})}setYAxisXPosition(t,e){const s=this.w;let i=0,a=0,o=18,r=1;s.config.yaxis.length>1&&(this.multipleYs=!0),s.config.yaxis.forEach((n,l)=>{const h=s.globals.ignoreYAxisIndexes.includes(l)||!n.show||n.floating||0===t[l].width,c=t[l].width+e[l].width;n.opposite?s.globals.isBarHorizontal?(a=s.layout.gridWidth+s.layout.translateX-1,s.globals.translateYAxisX[l]=a-n.labels.offsetX):(a=s.layout.gridWidth+s.layout.translateX+r,h||(r+=c+20),s.globals.translateYAxisX[l]=a-n.labels.offsetX+20):(i=s.layout.translateX-o,h||(o+=c+20),s.globals.translateYAxisX[l]=i+n.labels.offsetX)})}setYAxisTextAlignments(){const t=this.w;Array.from(t.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((e,s)=>{const i=t.config.yaxis[s];if(i&&!i.floating&&void 0!==i.labels.align){const e=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${s}'] .apexcharts-yaxis-texts-g`),a=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${s}'] .apexcharts-yaxis-label`)),o=e.getBoundingClientRect();a.forEach(t=>{t.setAttribute("text-anchor",i.labels.align)}),"left"!==i.labels.align||i.opposite?"center"===i.labels.align?e.setAttribute("transform",`translate(${o.width/2*(i.opposite?1:-1)}, 0)`):"right"===i.labels.align&&i.opposite&&e.setAttribute("transform",`translate(${o.width}, 0)`):e.setAttribute("transform",`translate(-${o.width}, 0)`)}})}}class Z{constructor(t,e){this.w=t,this.ctx=e,this.documentEvent=this.documentEvent.bind(this)}addEventListener(t,e){const s=this.w;Object.prototype.hasOwnProperty.call(s.globals.events,t)?s.globals.events[t].push(e):s.globals.events[t]=[e]}removeEventListener(t,e){const s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;const i=s.globals.events[t].indexOf(e);-1!==i&&s.globals.events[t].splice(i,1)}fireEvent(t,e){const s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;e&&e.length||(e=[]);const i=s.globals.events[t],a=i.length;for(let t=0;t<a;t++)i[t].apply(null,e)}setupEventHandlers(){const t=this.w,e=this.ctx,s=t.dom.baseEl.querySelector(t.globals.chartClass);this.ctx.eventList.forEach(i=>{null==s||s.addEventListener(i,s=>{const i=null===s.target.getAttribute("i")&&-1!==t.interact.capturedSeriesIndex?t.interact.capturedSeriesIndex:s.target.getAttribute("i"),a=null===s.target.getAttribute("j")&&-1!==t.interact.capturedDataPointIndex?t.interact.capturedDataPointIndex:s.target.getAttribute("j"),o=Object.assign({},t,{seriesIndex:t.globals.axisCharts?i:0,dataPointIndex:a});"keydown"===s.type?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&(e.ctx.keyboardNavigation&&e.ctx.keyboardNavigation.handleKey(s),"function"==typeof t.config.chart.events.keyDown&&t.config.chart.events.keyDown(s,e,o),e.ctx.events.fireEvent("keydown",[s,e,o])):"keyup"===s.type?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&("function"==typeof t.config.chart.events.keyUp&&t.config.chart.events.keyUp(s,e,o),e.ctx.events.fireEvent("keyup",[s,e,o])):"mousemove"===s.type||"touchmove"===s.type?"function"==typeof t.config.chart.events.mouseMove&&t.config.chart.events.mouseMove(s,e,o):"mouseleave"===s.type||"touchleave"===s.type?"function"==typeof t.config.chart.events.mouseLeave&&t.config.chart.events.mouseLeave(s,e,o):("mouseup"===s.type&&1===s.which||"touchend"===s.type)&&("function"==typeof t.config.chart.events.click&&t.config.chart.events.click(s,e,o),e.ctx.events.fireEvent("click",[s,e,o]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(e=>{t.dom.baseEl.addEventListener(e,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(t){const e=this.w,s=t.target.className;if("click"===t.type){const t=e.dom.baseEl.querySelector(".apexcharts-menu");t&&t.classList.contains("apexcharts-menu-open")&&"apexcharts-menu-icon"!==s&&t.classList.remove("apexcharts-menu-open")}e.interact.clientX="touchmove"===t.type?t.touches[0].clientX:t.clientX,e.interact.clientY="touchmove"===t.type?t.touches[0].clientY:t.clientY}}class K{constructor(t){this.w=t}setCurrentLocaleValues(t){let e=this.w.config.chart.locales;const s=c.getApex();s.chart&&s.chart.locales&&s.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(s.chart.locales));const i=e.filter(e=>e.name===t)[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");{const t=m.extend(S,i);this.w.globals.locale=t.options}}}class J{constructor(t,e){this.w=t,this.ctx=e}drawAxis(t,e){const s=this.w.globals,i=this.w.config,a=new $(this.w,this.ctx,e),o=new q(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},e);if(s.axisCharts&&"radar"!==t){let t,e;s.isBarHorizontal?(e=o.drawYaxisInversed(0),t=a.drawXaxisInversed(0),this.w.dom.elGraphical.add(t),this.w.dom.elGraphical.add(e)):(t=a.drawXaxis(),this.w.dom.elGraphical.add(t),i.yaxis.map((t,i)=>{if(-1===s.ignoreYAxisIndexes.indexOf(i)&&(e=o.drawYaxis(i),this.w.dom.Paper.add(e),"back"===this.w.config.grid.position)){const t=this.w.dom.Paper.children()[1];t&&(t.remove(),this.w.dom.Paper.add(t))}}))}}}class Q{constructor(t){this.w=t}drawXCrosshairs(){const t=this.w,e=new T(this.w),s=new X(this.w),i=t.config.xaxis.crosshairs.fill.gradient,a=t.config.xaxis.crosshairs.dropShadow,o=t.config.xaxis.crosshairs.fill.type,r=i.colorFrom,n=i.colorTo,l=i.opacityFrom,h=i.opacityTo,c=i.stops,d=a.enabled,g=a.left,p=a.top,x=a.blur,u=a.color,f=a.opacity;let b=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===o&&(b=e.drawGradient("vertical",r,n,l,h,null,c,[]));let i=e.drawRect();1===t.config.xaxis.crosshairs.width&&(i=e.drawLine(0,0,0,0));let a=t.layout.gridHeight;(!m.isNumber(a)||a<0)&&(a=0);let y=t.config.xaxis.crosshairs.width;(!m.isNumber(y)||Number(y)<0)&&(y=0),i.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:a,width:y,height:a,fill:b,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),d&&(i=s.dropShadow(i,{left:g,top:p,blur:x,color:u,opacity:f})),t.dom.elGraphical.add(i)}}drawYCrosshairs(){const t=this.w,e=new T(this.w),s=t.config.yaxis[0].crosshairs,i=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){const a=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,s.stroke.dashArray,s.stroke.width);a.attr({class:"apexcharts-ycrosshairs"}),t.dom.elGraphical.add(a)}const a=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,0,0);a.attr({class:"apexcharts-ycrosshairs-hidden"}),t.dom.elGraphical.add(a)}}class tt{constructor(t){this.w=t}checkResponsiveConfig(t){const e=this.w,s=e.config;if(0===s.responsive.length)return;const i=s.responsive.slice();i.sort((t,e)=>t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0).reverse();const a=new D({}),o=(t={})=>{const s=i[0].breakpoint,o=c.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(o>s){const s=m.clone(e.globals.initialConfig);s.series=m.clone(e.config.series);const i=E.extendArrayProps(a,s,e);t=m.extend(i,t),t=m.extend(e.config,t),this.overrideResponsiveOptions(t)}else for(let s=0;s<i.length;s++)o<i[s].breakpoint&&(t=E.extendArrayProps(a,i[s].options,e),t=m.extend(e.config,t),this.overrideResponsiveOptions(t))};if(t){let s=E.extendArrayProps(a,t,e);s=m.extend(e.config,s),s=m.extend(s,t),o(s)}else o({})}overrideResponsiveOptions(t){const e=new D(t).init({responsiveOverride:!0});this.w.config=e}}class et{constructor(t,{toggleDataSeries:e,revertDefaultAxisMinMax:s,updateSeries:i}={}){this.w=t,this._toggleDataSeries=e||null,this._revertDefaultAxisMinMax=s||null,this._updateSeries=i||null,this.legendInactiveClass="legend-mouseover-inactive"}clearSeriesCache(){const t=this.w;t.globals.cachedSelectors&&(delete t.globals.cachedSelectors.allSeriesEls,delete t.globals.cachedSelectors.highlightSeriesEls)}getAllSeriesEls(){const t=this.w,e="allSeriesEls";return t.globals.cachedSelectors[e]||(t.globals.cachedSelectors[e]=t.dom.baseEl.getElementsByClassName("apexcharts-series")),t.globals.cachedSelectors[e]}getSeriesByName(t){return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${m.escapeString(t)}']`)}isSeriesHidden(t){var e;const s=this.getSeriesByName(t),i=parseInt(null!=(e=s.getAttribute("data:realIndex"))?e:"0",10);return{isHidden:s.classList.contains("apexcharts-series-collapsed"),realIndex:i}}addCollapsedClassToSeries(t,e){et.addCollapsedClassToSeries(this.w,t,e)}static addCollapsedClassToSeries(t,e,s){function i(t){for(let i=0;i<t.length;i++)t[i].index===s&&e.node.classList.add("apexcharts-series-collapsed")}i(t.globals.collapsedSeries),i(t.globals.ancillaryCollapsedSeries)}toggleSeries(t){var e;const s=this.isSeriesHidden(t);return null==(e=this._toggleDataSeries)||e.call(this,s.realIndex,s.isHidden),s.isHidden}showSeries(t){var e;const s=this.isSeriesHidden(t);s.isHidden&&(null==(e=this._toggleDataSeries)||e.call(this,s.realIndex,!0))}hideSeries(t){var e;const s=this.isSeriesHidden(t);s.isHidden||null==(e=this._toggleDataSeries)||e.call(this,s.realIndex,!1)}resetSeries(t=!0,e=!0,s=!0){var i,a;const o=this.w;this.clearSeriesCache();let r=m.clone(o.globals.initialSeries);o.globals.previousPaths=[],s?(o.globals.collapsedSeries=[],o.globals.ancillaryCollapsedSeries=[],o.globals.collapsedSeriesIndices=[],o.globals.ancillaryCollapsedSeriesIndices=[]):r=this.emptyCollapsedSeries(r),o.config.series=r,t&&(e&&(o.interact.zoomed=!1,null==(i=this._revertDefaultAxisMinMax)||i.call(this)),null==(a=this._updateSeries)||a.call(this,r,o.config.chart.animations.dynamicAnimation.enabled))}emptyCollapsedSeries(t){const e=this.w;for(let s=0;s<t.length;s++)e.globals.collapsedSeriesIndices.indexOf(s)>-1&&(t[s].data=[]);return t}highlightSeries(t){var e;const s=this.w,i=this.getSeriesByName(t),a=parseInt(null!=(e=null==i?void 0:i.getAttribute("data:realIndex"))?e:"",10),o="highlightSeriesEls";let r=s.globals.cachedSelectors[o];r||(r=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),s.globals.cachedSelectors[o]=r);let n=null,l=null,h=null;if(s.globals.axisCharts||"radialBar"===s.config.chart.type)if(s.globals.axisCharts){n=s.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${a}']`),l=s.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${a}']`);const t=s.globals.seriesYAxisReverseMap[a];h=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}']`)}else n=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}']`);else n=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}'] path`);for(let t=0;t<r.length;t++){r[t].classList.add(this.legendInactiveClass)}if(n){if(!s.globals.axisCharts){const t=n.parentNode;null==t||t.classList.remove(this.legendInactiveClass)}n.classList.remove(this.legendInactiveClass),null!==l&&l.classList.remove(this.legendInactiveClass),null!==h&&h.classList.remove(this.legendInactiveClass)}else for(let t=0;t<r.length;t++){r[t].classList.remove(this.legendInactiveClass)}}toggleSeriesOnHover(t,e){const s=this.w;e||(e=t.target);const i=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if("mousemove"===t.type){const t=parseInt(e.getAttribute("rel"),10)-1;this.highlightSeries(s.seriesData.seriesNames[t])}else if("mouseout"===t.type)for(let t=0;t<i.length;t++)i[t].classList.remove(this.legendInactiveClass)}highlightRangeInSeries(t,e){const s=this.w,i=s.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),a=t=>{for(let e=0;e<i.length;e++){const s=i[e].classList[t];"function"==typeof s&&s.call(i[e].classList,this.legendInactiveClass)}},o=(t,e)=>{for(let s=0;s<i.length;s++){const a=Number(i[s].getAttribute("val"));a>=t.from&&(a<t.to||t.to===e&&a===e)&&i[s].classList.remove(this.legendInactiveClass)}};if("mousemove"===t.type){const t=parseInt(e.getAttribute("rel"),10)-1;a("add");const i=s.config.plotOptions.heatmap.colorScale.ranges;o(i[t],i.reduce((t,e)=>Math.max(t,e.to),0))}else"mouseout"===t.type&&a("remove")}getActiveConfigSeriesIndex(t="asc",e=[]){const s=this.w;let i=0;if(s.config.series.length>1){const a=s.config.series.map((t,i)=>t.data&&t.data.length>0&&-1===s.globals.collapsedSeriesIndices.indexOf(i)&&(!s.globals.comboCharts||0===e.length||e.length&&e.indexOf(s.config.series[i].type)>-1)?i:-1);for(let e="asc"===t?0:a.length-1;"asc"===t?e<a.length:e>=0;"asc"===t?e++:e--)if(-1!==a[e]){i=a[e];break}}return i}getBarSeriesIndices(){return this.w.globals.comboCharts?this.w.config.series.map((t,e)=>"bar"===t.type||"column"===t.type?e:-1).filter(t=>-1!==t):this.w.config.series.map((t,e)=>e)}getPreviousPaths(){var t,e,s,i;const a=this.w;function o(t,e,s){const i=t[e].childNodes,o={type:s,paths:[],realIndex:t[e].getAttribute("data:realIndex")};for(let t=0;t<i.length;t++)if(i[t].hasAttribute("pathTo")){const e=i[t].getAttribute("pathTo");o.paths.push({d:e})}a.globals.previousPaths.push(o)}a.globals.previousPaths=[];["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(t=>{const e=(s=t,a.dom.baseEl.querySelectorAll(`.apexcharts-${s}-series .apexcharts-series`));var s;for(let s=0;s<e.length;s++)o(e,s,t)});const r=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series`);if(r.length>0)for(let o=0;o<r.length;o++){const r=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series[data\\:realIndex='${o}'] rect`),n=[];for(let a=0;a<r.length;a++){const o=t=>r[a].getAttribute(t),l={x:parseFloat(null!=(t=o("x"))?t:"0"),y:parseFloat(null!=(e=o("y"))?e:"0"),width:parseFloat(null!=(s=o("width"))?s:"0"),height:parseFloat(null!=(i=o("height"))?i:"0")};n.push({rect:l,color:r[a].getAttribute("color")})}a.globals.previousPaths.push(n)}a.globals.axisCharts||(a.globals.previousPaths=a.seriesData.series)}clearPreviousPaths(){const t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1}handleNoData(){const t=this.w,e=t.config.noData,s=new T(this.w);let i=t.globals.svgWidth/2,a=t.globals.svgHeight/2,o="middle";if(t.globals.noData=!0,t.globals.animationEnded=!0,"left"===e.align?(i=10,o="start"):"right"===e.align&&(i=t.globals.svgWidth-10,o="end"),"top"===e.verticalAlign?a=50:"bottom"===e.verticalAlign&&(a=t.globals.svgHeight-50),i+=e.offsetX,a=a+parseInt(e.style.fontSize,10)+2+e.offsetY,void 0!==e.text&&""!==e.text){const r=s.drawText({x:i,y:a,text:e.text,textAnchor:o,fontSize:e.style.fontSize,fontFamily:e.style.fontFamily,foreColor:e.style.color,opacity:1,cssClass:"apexcharts-text-nodata"});t.dom.Paper.add(r)}}setNullSeriesToZeroValues(t){const e=this.w;for(let s=0;s<t.length;s++)if(0===t[s].length)for(let i=0;i<t[e.globals.maxValsInArrayIndex].length;i++)t[s].push(0);return t}hasAllSeriesEqualX(){let t=!0;const e=this.w,s=this.filteredSeriesX();for(let e=0;e<s.length-1;e++)if(s[e][0]!==s[e+1][0]){t=!1;break}return e.globals.allSeriesHasEqualX=t,t}filteredSeriesX(){return this.w.seriesData.seriesX.map(t=>t.length>0?t:[])}}class st{constructor(t){this.w=t,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}checkHeatmapDistributed(){const{chart:t,plotOptions:e}=this.w.config;return"treemap"===t.type&&e.treemap&&e.treemap.distributed||"heatmap"===t.type&&e.heatmap&&e.heatmap.distributed}checkBarDistributed(){const{chart:t,plotOptions:e}=this.w.config;return e.bar&&e.bar.distributed&&("bar"===t.type||"rangeBar"===t.type)}init(){this.setDefaultColors()}setDefaultColors(){var t;const e=this.w,s=new m;e.dom.elWrap.classList.add(`apexcharts-theme-${e.config.theme.mode||"light"}`);const i=null==(t=e.config.theme.accessibility)?void 0:t.colorBlindMode;if(i){e.globals.colors=this.getColorBlindColors(i),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors);const t=e.globals.colors.slice();return this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],t),this.applyDataLabelsColors(t),this.applyRadarPolygonsColors(),this.applyMarkersColors(t),void("highContrast"===i&&e.dom.elWrap.classList.add("apexcharts-high-contrast"))}const a=[...e.config.colors||e.config.fill.colors||[]];e.globals.colors=this.getColors(a),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors),e.config.theme.monochrome.enabled&&(e.globals.colors=this.getMonochromeColors(e.config.theme.monochrome,e.seriesData.series,s));const o=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],o),this.applyDataLabelsColors(o),this.applyRadarPolygonsColors(),this.applyMarkersColors(o)}getColors(t){const e=this.w;return t&&0!==t.length?Array.isArray(t)&&t.length>0&&"function"==typeof t[0]?(this.isColorFn=!0,e.config.series.map((s,i)=>{const a=t[i]||t[0];return"function"==typeof a?a({value:e.globals.axisCharts?e.seriesData.series[i][0]||0:e.seriesData.series[i],seriesIndex:i,dataPointIndex:i,w:this.w}):a})):t:this.predefined()}applySeriesColors(t,e){t.forEach((t,s)=>{t&&(e[s]=t)})}getMonochromeColors(t,e,s){const{color:i,shadeIntensity:a,shadeTo:o}=t,r=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,n=1/(r/a);let l=0;return Array.from({length:r},()=>{const t="dark"===o?s.shadeColor(-1*l,i):s.shadeColor(l,i);return l+=n,t})}applyColorTypes(t,e){const s=this.w;t.forEach(t=>{s.globals[t].colors=void 0===s.config[t].colors?this.isColorFn?s.config.colors:e:s.config[t].colors.slice(),this.pushExtraColors(s.globals[t].colors)})}applyDataLabelsColors(t){const e=this.w;e.globals.dataLabels.style.colors=void 0===e.config.dataLabels.style.colors?t:e.config.dataLabels.style.colors.slice(),this.pushExtraColors(e.globals.dataLabels.style.colors,50)}applyRadarPolygonsColors(){const t=this.w;t.globals.radarPolygons.fill.colors=void 0===t.config.plotOptions.radar.polygons.fill.colors?["dark"===t.config.theme.mode?"#343A3F":"none"]:t.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(t.globals.radarPolygons.fill.colors,20)}applyMarkersColors(t){const e=this.w;e.globals.markers.colors=void 0===e.config.markers.colors?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}pushExtraColors(t,e,s=null){const i=this.w;let a=e||i.seriesData.series.length;if(null===s&&(s=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===i.config.chart.type&&i.config.plotOptions.heatmap&&i.config.plotOptions.heatmap.colorScale.inverse),s&&i.seriesData.series.length&&(a=i.seriesData.series[i.globals.maxValsInArrayIndex].length*i.seriesData.series.length),t.length<a){const e=a-t.length;for(let s=0;s<e;s++)t.push(t[s])}}getColorBlindColors(t){const e={palette1:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"],palette2:["#3F51B5","#03A9F4","#4CAF50","#F9CE1D","#FF9800"],palette3:["#33B2DF","#546E7A","#D4526E","#13D8AA","#A5978B"],palette4:["#4ECDC4","#C7F464","#81D4FA","#FD6A6A","#546E7A"],palette5:["#2B908F","#F9A3A4","#90EE7E","#FA4443","#69D2E7"],palette6:["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"],palette7:["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"],palette8:["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"],palette9:["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"],palette10:["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]};return({deuteranopia:e.cvdDeuteranopia,protanopia:e.cvdProtanopia,tritanopia:e.cvdTritanopia,highContrast:e.highContrast}[t]||e.palette1).slice()}updateThemeOptions(t){t.chart=t.chart||{},t.tooltip=t.tooltip||{};const e=t.theme.mode,s="dark"===e?"palette4":"light"===e?"palette1":t.theme.palette||"palette1",i="dark"===e?"#f6f7f8":"light"===e?"#373d3f":t.chart.foreColor||"#373d3f";return t.tooltip.theme=e||"light",t.chart.foreColor=i,t.theme.palette=s,t}predefined(){const t={palette1:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"],palette2:["#3F51B5","#03A9F4","#4CAF50","#F9CE1D","#FF9800"],palette3:["#33B2DF","#546E7A","#D4526E","#13D8AA","#A5978B"],palette4:["#4ECDC4","#C7F464","#81D4FA","#FD6A6A","#546E7A"],palette5:["#2B908F","#F9A3A4","#90EE7E","#FA4443","#69D2E7"],palette6:["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"],palette7:["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"],palette8:["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"],palette9:["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"],palette10:["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]};return t[this.w.config.theme.palette]||t.palette1}}class it{constructor(t){this.w=t}draw(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}drawTitleSubtitle(t){const e=this.w,s="title"===t?e.config.title:e.config.subtitle;let i=e.globals.svgWidth/2,a=s.offsetY,o="middle";if("left"===s.align?(i=10,o="start"):"right"===s.align&&(i=e.globals.svgWidth-10,o="end"),i+=s.offsetX,a=a+parseInt(s.style.fontSize,10)+s.margin/2,void 0!==s.text){const r=new T(this.w).drawText({x:i,y:a,text:s.text,textAnchor:o,fontSize:s.style.fontSize,fontFamily:s.style.fontFamily,fontWeight:s.style.fontWeight,foreColor:s.style.color,opacity:1});r.node.setAttribute("class",`apexcharts-${t}-text`),e.dom.Paper.add(r)}}}let at=class{constructor(t){this.w=t.w,this.dCtx=t}getTitleSubtitleCoords(t){const e=this.w;let s=0,i=0;const a="title"===t?e.config.title.floating:e.config.subtitle.floating,o=e.dom.baseEl.querySelector(`.apexcharts-${t}-text`);if(null!==o&&!a){const t=o.getBoundingClientRect();s=t.width,i=e.globals.axisCharts?t.height+5:t.height}return{width:s,height:i}}getLegendsRect(){const t=this.w,e=t.dom.elLegendWrap;t.config.legend.height||"top"!==t.config.legend.position&&"bottom"!==t.config.legend.position||e&&(e.style.maxHeight=t.globals.svgHeight/2+"px");const s=Object.assign({},m.getBoundingClientRect(e));return null!==e&&!t.config.legend.floating&&t.config.legend.show?this.dCtx.lgRect={x:s.x,y:s.y,height:s.height,width:0===s.height?0:s.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},"left"!==t.config.legend.position&&"right"!==t.config.legend.position||1.5*this.dCtx.lgRect.width>t.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}getDatalabelsRect(){const t=this.w,e=[];t.config.series.forEach((s,i)=>{s.data.forEach((s,a)=>{const o=(r=t.seriesData.series[i][a],t.config.dataLabels.formatter(r,{seriesIndex:i,dataPointIndex:a,w:t}));var r;e.push(o)})});const s=m.getLargestStringFromArr(e),i=new T(this.w),a=t.config.dataLabels.style,o=i.getTextRects(s,parseInt(a.fontSize).toString(),a.fontFamily);return{width:1.05*o.width,height:o.height}}getLargestStringFromMultiArr(t,e){let s=t;if(this.w.axisFlags.isMultiLineX){const t=e.map(t=>Array.isArray(t)?t.length:1),i=Math.max(...t);s=e[t.indexOf(i)]}return s}};class ot{constructor(t){this.w=t.w,this.dCtx=t}getxAxisLabelsCoords(){const t=this.w;let e,s=t.labelData.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&0===s.length&&(s=t.labelData.categoryLabels),t.labelData.timescaleLabels.length>0){const s=this.getxAxisTimeScaleLabelsCoords();e={width:s.width,height:s.height},t.layout.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==t.config.legend.position&&"right"!==t.config.legend.position||t.config.legend.floating?0:this.dCtx.lgRect.width;const i=t.formatters.xLabelFormatter;let a=m.getLargestStringFromArr(s),o=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,s);t.globals.isBarHorizontal&&(a=t.globals.yAxisScale[0].result.reduce((t,e)=>t.length>e.length?t:e,0),o=a);const r=new w(this.w),n=a;a=r.xLabelFormat(i,a,n,{i:void 0,dateFormatter:new y(this.w).formatDate,w:t}),o=r.xLabelFormat(i,o,n,{i:void 0,dateFormatter:new y(this.w).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&void 0===a||""===String(a).trim())&&(a="1",o=a);const l=new T(this.w);let h=l.getTextRects(a,t.config.xaxis.labels.style.fontSize),c=h;if(a!==o&&(c=l.getTextRects(o,t.config.xaxis.labels.style.fontSize)),e={width:h.width>=c.width?h.width:c.width,height:h.height>=c.height?h.height:c.height},e.width*s.length>t.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==t.config.xaxis.labels.rotate||t.config.xaxis.labels.rotateAlways){if(!t.globals.isBarHorizontal){t.layout.rotateXLabels=!0;const s=e=>l.getTextRects(e,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,`rotate(${t.config.xaxis.labels.rotate} 0 0)`,!1);h=s(a),a!==o&&(c=s(o)),e.height=(h.height>c.height?h.height:c.height)/1.5,e.width=h.width>c.width?h.width:c.width}}else t.layout.rotateXLabels=!1}return t.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}getxAxisGroupLabelsCoords(){var t;const e=this.w;if(!e.labelData.hasXaxisGroups)return{width:0,height:0};const s=(null==(t=e.config.xaxis.group.style)?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,i=e.labelData.groups.map(t=>t.title);let a;const o=m.getLargestStringFromArr(i),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(o,i),n=new T(this.w),l=n.getTextRects(o,s);let h=l;return o!==r&&(h=n.getTextRects(r,s)),a={width:l.width>=h.width?l.width:h.width,height:l.height>=h.height?l.height:h.height},e.config.xaxis.labels.show||(a={width:0,height:0}),{width:a.width,height:a.height}}getxAxisTitleCoords(){const t=this.w;let e=0,s=0;if(void 0!==t.config.xaxis.title.text){const i=new T(this.w).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=i.width,s=i.height}return{width:e,height:s}}getxAxisTimeScaleLabelsCoords(){const t=this.w;this.dCtx.timescaleLabels=t.labelData.timescaleLabels.slice();const e=this.dCtx.timescaleLabels.map(t=>t.value),s=e.reduce((t,e)=>void 0===t?0:t.length>e.length?t:e,0),i=new T(this.w).getTextRects(s,t.config.xaxis.labels.style.fontSize);return 1.05*i.width*e.length>t.layout.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),i}additionalPaddingXLabels(t){const e=this.w,s=e.globals,i=e.config,a=i.xaxis.type,o=t.width;s.skipLastTimelinelabel=!1,s.skipFirstTimelinelabel=!1;const r=e.config.yaxis[0].opposite&&e.globals.isBarHorizontal,n=t=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){const a=this.dCtx.timescaleLabels[0],r=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+o/1.75-this.dCtx.yAxisWidthRight,n=a.position-o/1.75+this.dCtx.yAxisWidthLeft,l="right"===e.config.legend.position&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;r>s.svgWidth-e.layout.translateX-l&&(s.skipLastTimelinelabel=!0),n<-(t.show&&!t.floating||"bar"!==i.chart.type&&"candlestick"!==i.chart.type&&"rangeBar"!==i.chart.type&&"boxPlot"!==i.chart.type?10:o/1.75)&&(s.skipFirstTimelinelabel=!0)}else"datetime"===a?this.dCtx.gridPad.right<o&&!e.layout.rotateXLabels&&(s.skipLastTimelinelabel=!0):"datetime"!==a&&this.dCtx.gridPad.right<o/2-this.dCtx.yAxisWidthRight&&!e.layout.rotateXLabels&&!e.config.xaxis.labels.trim&&(this.dCtx.xPadRight=o/2+1)},l=(t,e)=>{i.yaxis.length>1&&(t=>-1!==s.collapsedSeriesIndices.indexOf(t))(e)||n(t)};i.yaxis.forEach((t,e)=>{r?(this.dCtx.gridPad.left<o&&(this.dCtx.xPadLeft=o/2+1),this.dCtx.xPadRight=o/2+1):l(t,e)})}}class rt{constructor(t){this.w=t.w,this.dCtx=t}getyAxisLabelsCoords(){const t=this.w,e=[];let s=10;const i=new G(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});return t.config.yaxis.map((a,o)=>{const r={seriesIndex:o,dataPointIndex:-1,w:t},n=t.globals.yAxisScale[o];let l=0;if(!i.isYAxisHidden(o)&&a.labels.show&&void 0!==a.labels.minWidth&&(l=a.labels.minWidth),!i.isYAxisHidden(o)&&a.labels.show&&n.result.length){const i=t.formatters.yLabelFormatters[o],h=n.niceMin===Number.MIN_VALUE?0:n.niceMin;let c=n.result.reduce((t,e)=>{var s,a;return(null==(s=String(i(t,r)))?void 0:s.length)>(null==(a=String(i(e,r)))?void 0:a.length)?t:e},h);c=i(c,r);let d=c;if(void 0!==c&&0!==c.length||(c=n.niceMax),1===String(c).length&&(c+=".0",d=c),t.globals.isBarHorizontal){s=0;const e=t.labelData.labels.slice();c=m.getLargestStringFromArr(e),c=i(c,{seriesIndex:o,dataPointIndex:-1,w:t}),d=this.dCtx.dimHelpers.getLargestStringFromMultiArr(c,e)}const g=new T(this.w),p="rotate(".concat(a.labels.rotate," 0 0)"),x=g.getTextRects(c,a.labels.style.fontSize,a.labels.style.fontFamily,p,!1);let u=x;c!==d&&(u=g.getTextRects(d,a.labels.style.fontSize,a.labels.style.fontFamily,p,!1)),e.push({width:(l>u.width||l>x.width?l:u.width>x.width?u.width:x.width)+s,height:u.height>x.height?u.height:x.height})}else e.push({width:0,height:0})}),e}getyAxisTitleCoords(){const t=this.w,e=[];return t.config.yaxis.map(t=>{if(t.show&&void 0!==t.title.text){const s=new T(this.w),i="rotate(".concat(t.title.rotate," 0 0)"),a=s.getTextRects(t.title.text,t.title.style.fontSize,t.title.style.fontFamily,i,!1);e.push({width:a.width,height:a.height})}else e.push({width:0,height:0})}),e}getTotalYAxisWidth(){const t=this.w;let e=0,s=0,i=0;const a=t.globals.yAxisScale.length>1?10:0,o=new G(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),r=(r,n)=>{const l=t.config.yaxis[n].floating;let h=0;r.width>0&&!l?(h=r.width+a,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(n)&&(h=h-r.width-a)):h=l||o.isYAxisHidden(n)?0:5,t.config.yaxis[n].opposite?i+=h:s+=h,e+=h};return t.layout.yLabelsCoords.map((t,e)=>{r(t,e)}),t.layout.yTitleCoords.map((t,e)=>{r(t,e)}),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.layout.yLabelsCoords[0].width+t.layout.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=s,this.dCtx.yAxisWidthRight=i,e}}class nt{constructor(t){this.w=t.w,this.dCtx=t}gridPadForColumnsInNumericAxis(t){const{w:e}=this,{config:s,globals:i}=e;if(i.noData||i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.series.length)return 0;const a=t=>["bar","rangeBar","candlestick","boxPlot"].includes(t),o=s.chart.type;let r=0,n=a(o)?s.series.length:1;i.comboBarCount>0&&(n=i.comboBarCount),i.collapsedSeries.forEach(t=>{a(t.type)&&(n-=1)}),s.chart.stacked&&(n=1);const l=a(o)||i.comboBarCount>0;let h=Math.abs(i.initialMaxX-i.initialMinX);if(l&&e.axisFlags.isXNumeric&&!i.isBarHorizontal&&n>0&&0!==h){h<=3&&(h=i.dataPoints);const e=h/t;let a=i.minXDiff&&i.minXDiff/e>0?i.minXDiff/e:0;a>t/2&&(a/=2),r=a*parseInt(s.plotOptions.bar.columnWidth,10)/100,r<1&&(r=1),i.barPadForNumericAxis=r}return r}gridPadFortitleSubtitle(){const{w:t}=this,{globals:e}=t;let s=this.dCtx.isSparkline||!e.axisCharts?0:10;["title","subtitle"].forEach(i=>{void 0!==t.config[i].text?s+=t.config[i].margin:s+=this.dCtx.isSparkline||!e.axisCharts?0:5}),!t.config.legend.show||"bottom"!==t.config.legend.position||t.config.legend.floating||e.axisCharts||(s+=10);const i=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),a=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");t.layout.gridHeight-=i.height+a.height+s,t.layout.translateY+=i.height+a.height+s}setGridXPosForDualYAxis(t,e){const{w:s}=this,i=new G(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});s.config.yaxis.forEach((a,o)=>{-1!==s.globals.ignoreYAxisIndexes.indexOf(o)||a.floating||i.isYAxisHidden(o)||(a.opposite&&(s.layout.translateX-=e[o].width+t[o].width+parseInt(a.labels.style.fontSize,10)/1.2+12),s.layout.translateX<2&&(s.layout.translateX=2))})}}class lt{constructor(t,e){this.w=t,this.ctx=e,this.theme=e.theme,this.timeScale=e.timeScale,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new at(this),this.dimYAxis=new rt(this),this.dimXAxis=new ot(this),this.dimGrid=new nt(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0,this.datalabelsCoords={width:0,height:0},this.xAxisWidth=0,this.timescaleLabels=[]}plotCoords(){const t=this.w,e=t.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};const s=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width;this.isSparkline&&((t.config.markers.discrete.length>0||t.config.markers.size>0)&&Object.entries(this.gridPad).forEach(([t,e])=>{this.gridPad[t]=Math.max(e,this.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(s/2,this.gridPad.top),this.gridPad.bottom=Math.max(s/2,this.gridPad.bottom)),e.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),t.layout.gridHeight=t.layout.gridHeight-this.gridPad.top-this.gridPad.bottom,t.layout.gridWidth=t.layout.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;const i=this.dimGrid.gridPadForColumnsInNumericAxis(t.layout.gridWidth);return t.layout.gridWidth=t.layout.gridWidth-2*i,t.layout.translateX=t.layout.translateX+this.gridPad.left+this.xPadLeft+(i>0?i:0),t.layout.translateY=t.layout.translateY+this.gridPad.top,{layout:{gridHeight:t.layout.gridHeight,gridWidth:t.layout.gridWidth,translateX:t.layout.translateX,translateY:t.layout.translateY,translateXAxisX:t.layout.translateXAxisX,translateXAxisY:t.layout.translateXAxisY,rotateXLabels:t.layout.rotateXLabels,xAxisHeight:t.layout.xAxisHeight,xAxisLabelsHeight:t.layout.xAxisLabelsHeight,xAxisGroupLabelsHeight:t.layout.xAxisGroupLabelsHeight,xAxisLabelsWidth:t.layout.xAxisLabelsWidth,yLabelsCoords:t.layout.yLabelsCoords,yTitleCoords:t.layout.yTitleCoords}}}setDimensionsForAxisCharts(){const t=this.w,e=t.globals,s=this.dimYAxis.getyAxisLabelsCoords(),i=this.dimYAxis.getyAxisTitleCoords();e.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),t.layout.yLabelsCoords=[],t.layout.yTitleCoords=[],t.config.yaxis.map((e,a)=>{t.layout.yLabelsCoords.push({width:s[a].width,index:a}),t.layout.yTitleCoords.push({width:i[a].width,index:a})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();const a=this.dimXAxis.getxAxisLabelsCoords(),o=this.dimXAxis.getxAxisGroupLabelsCoords(),r=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(a,r,o),t.layout.translateXAxisY=t.layout.rotateXLabels?this.xAxisHeight/8:-4,t.layout.translateXAxisX=t.layout.rotateXLabels&&t.axisFlags.isXNumeric&&t.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,t.globals.isBarHorizontal&&(t.layout.rotateXLabels=!1,t.layout.translateXAxisY=parseInt(t.config.xaxis.labels.style.fontSize,10)/1.5*-1),t.layout.translateXAxisY=t.layout.translateXAxisY+t.config.xaxis.labels.offsetY,t.layout.translateXAxisX=t.layout.translateXAxisX+t.config.xaxis.labels.offsetX;let n=this.yAxisWidth,l=this.xAxisHeight;t.layout.xAxisLabelsHeight=this.xAxisHeight-r.height,t.layout.xAxisGroupLabelsHeight=t.layout.xAxisLabelsHeight-a.height,t.layout.xAxisLabelsWidth=this.xAxisWidth,t.layout.xAxisHeight=this.xAxisHeight;let h=10;("radar"===t.config.chart.type||this.isSparkline)&&(n=0,l=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===t.config.chart.type)&&(n=0,l=0,h=0),this.isSparkline||"treemap"===t.config.chart.type||this.dimXAxis.additionalPaddingXLabels(a);const c=()=>{t.layout.translateX=n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-this.lgRect.height-l-(this.isSparkline||"treemap"===t.config.chart.type?0:t.layout.rotateXLabels?10:15),t.layout.gridWidth=e.svgWidth-n-2*this.datalabelsCoords.width};switch("top"===t.config.xaxis.position&&(h=t.layout.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":t.layout.translateY=h,c();break;case"top":t.layout.translateY=this.lgRect.height+h,c();break;case"left":t.layout.translateY=h,t.layout.translateX=this.lgRect.width+n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-l-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-n-2*this.datalabelsCoords.width;break;case"right":t.layout.translateY=h,t.layout.translateX=n+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-l-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-n-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(i,s);new q(this.w,{theme:this.theme,timeScale:this.timeScale}).setYAxisXPosition(s,i)}setDimensionsForNonAxisCharts(){const t=this.w,e=t.globals,s=t.config;let i=0;t.config.legend.show&&!t.config.legend.floating&&(i=20);const a="pie"===s.chart.type||"polarArea"===s.chart.type||"donut"===s.chart.type?"pie":"radialBar",o=s.plotOptions[a].offsetY,r=s.plotOptions[a].offsetX;if(!s.legend.show||s.legend.floating){t.layout.gridHeight=e.svgHeight;const s=t.dom.elWrap.getBoundingClientRect().width;return t.layout.gridWidth=Math.min(s,t.layout.gridHeight),t.layout.translateY=o,void(t.layout.translateX=r+(e.svgWidth-t.layout.gridWidth)/2)}switch(s.legend.position){case"bottom":t.layout.gridHeight=e.svgHeight-this.lgRect.height,t.layout.gridWidth=e.svgWidth,t.layout.translateY=o-10,t.layout.translateX=r+(e.svgWidth-t.layout.gridWidth)/2;break;case"top":t.layout.gridHeight=e.svgHeight-this.lgRect.height,t.layout.gridWidth=e.svgWidth,t.layout.translateY=this.lgRect.height+o+10,t.layout.translateX=r+(e.svgWidth-t.layout.gridWidth)/2;break;case"left":t.layout.gridWidth=e.svgWidth-this.lgRect.width-i,t.layout.gridHeight="auto"!==s.chart.height?e.svgHeight:t.layout.gridWidth,t.layout.translateY=o,t.layout.translateX=r+this.lgRect.width+i;break;case"right":t.layout.gridWidth=e.svgWidth-this.lgRect.width-i-5,t.layout.gridHeight="auto"!==s.chart.height?e.svgHeight:t.layout.gridWidth,t.layout.translateY=o,t.layout.translateX=r+10;break;default:throw new Error("Legend position not supported")}}conditionalChecksForAxisCoords(t,e,s){const i=this.w,a=i.labelData.hasXaxisGroups?2:1,o=s.height+t.height+e.height,r=i.axisFlags.isMultiLineX?1.2:1.618,n=i.layout.rotateXLabels?22:10,l=i.layout.rotateXLabels&&"bottom"===i.config.legend.position?10:0;this.xAxisHeight=o*r+a*n+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeight<i.config.xaxis.labels.minHeight&&(this.xAxisHeight=i.config.xaxis.labels.minHeight),i.config.xaxis.floating&&(this.xAxisHeight=0);let h=0,c=0;i.config.yaxis.forEach(t=>{h+=t.labels.minWidth,c+=t.labels.maxWidth}),this.yAxisWidth<h&&(this.yAxisWidth=h),this.yAxisWidth>c&&(this.yAxisWidth=c)}}const ht=86400,ct=10/ht;class dt{constructor(t,e){this.w=t,this.ctx=e,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}calculateTimeScaleTicks(t,e){const s=this.w;if(s.globals.allSeriesCollapsed)return s.labelData.labels=[],s.labelData.timescaleLabels=[],[];const i=new y(this.w),a=(e-t)/864e5;this.determineInterval(a),s.interact.disableZoomIn=!1,s.interact.disableZoomOut=!1,a<ct?s.interact.disableZoomIn=!0:a>5e4&&(s.interact.disableZoomOut=!0);const o=i.getTimeUnitsfromTimestamp(t,e),r=s.layout.gridWidth/a,h=r/24,c=h/60,d=c/60,g=Math.floor(24*a),p=Math.floor(1440*a),x=Math.floor(a*ht),u=Math.floor(a),f=Math.floor(a/30),b=Math.floor(a/365),m={minMillisecond:o.minMillisecond,minSecond:o.minSecond,minMinute:o.minMinute,minHour:o.minHour,minDate:o.minDate,minMonth:o.minMonth,minYear:o.minYear},w={firstVal:m,currentMillisecond:m.minMillisecond,currentSecond:m.minSecond,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:r,hoursWidthOnXAxis:h,minutesWidthOnXAxis:c,secondsWidthOnXAxis:d,numberOfSeconds:x,numberOfMinutes:p,numberOfHours:g,numberOfDays:u,numberOfMonths:f,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(w);break;case"months":case"half_year":this.generateMonthScale(w);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(w);break;case"hours":this.generateHourScale(w);break;case"minutes_fives":case"minutes":this.generateMinuteScale(w);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(w)}const v=this.timeScaleArray.map(t=>{const e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?l(n({},e),{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?l(n({},e),{value:t.value}):"minute"===t.unit?l(n({},e),{value:t.value,minute:t.value}):"second"===t.unit?l(n({},e),{value:t.value,minute:t.minute,second:t.second}):t});return v.filter(t=>{let e=1,i=Math.ceil(s.layout.gridWidth/120);const a=t.value;void 0!==s.config.xaxis.tickAmount&&(i=s.config.xaxis.tickAmount),v.length>i&&(e=Math.floor(v.length/i));let o=!1,r=!1;switch(this.tickInterval){case"years":"year"===t.unit&&(o=!0);break;case"half_year":e=7,"year"===t.unit&&(o=!0);break;case"months":e=1,"year"===t.unit&&(o=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(o=!0),30===a&&(r=!0);break;case"months_days":e=10,"month"===t.unit&&(o=!0),30===a&&(r=!0);break;case"week_days":e=8,"month"===t.unit&&(o=!0);break;case"days":e=1,"month"===t.unit&&(o=!0);break;case"hours":"day"===t.unit&&(o=!0);break;case"minutes_fives":case"seconds_fives":a%5!=0&&(r=!0);break;case"seconds_tens":a%10!=0&&(r=!0)}if("hours"===this.tickInterval||"minutes_fives"===this.tickInterval||"seconds_tens"===this.tickInterval||"seconds_fives"===this.tickInterval){if(!r)return!0}else if((a%e===0||o)&&!r)return!0})}recalcDimensionsBasedOnFormat(t){const e=this.w,s=this.formatDates(t),i=this.removeOverlappingTS(s);e.labelData.timescaleLabels=i.slice();const a=new lt(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(a.layout)}determineInterval(t){const e=24*t,s=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case s>15:this.tickInterval="minutes_fives";break;case s>5:this.tickInterval="minutes";break;case s>1:this.tickInterval="seconds_tens";break;case 60*s>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}generateYearScale({firstVal:t,currentMonth:e,currentYear:s,daysWidthOnXAxis:i,numberOfYears:a}){let o=t.minYear,r=0;const n=new y(this.w),l="year";if(t.minDate>1||t.minMonth>0){const e=n.determineRemainingDaysOfYear(t.minYear,t.minMonth,t.minDate);r=(n.determineDaysOfYear(t.minYear)-e+1)*i,o=t.minYear+1,this.timeScaleArray.push({position:r,value:o,unit:l,year:o,month:1})}else 1===t.minDate&&0===t.minMonth&&this.timeScaleArray.push({position:r,value:o,unit:l,year:s,month:m.monthMod(e+1)});let h=o,c=r;for(let t=0;t<a;t++)h++,c=n.determineDaysOfYear(h-1)*i+c,this.timeScaleArray.push({position:c,value:h,unit:l,year:h,month:1})}generateMonthScale({firstVal:t,currentMonthDate:e,currentMonth:s,currentYear:i,daysWidthOnXAxis:a,numberOfMonths:o}){let r=s,n=0;const l=new y(this.w);let h="month",c=0;if(t.minDate>1){n=(l.determineDaysOfMonths(s+1,t.minYear)-e+1)*a,r=m.monthMod(s+1);let o=i+c,d=m.monthMod(r),g=r;0===r&&(h="year",g=o,d=1,c+=1,o+=c),this.timeScaleArray.push({position:n,value:g,unit:h,year:o,month:d})}else this.timeScaleArray.push({position:n,value:r,unit:h,year:i,month:m.monthMod(s)});let d=r+1,g=n;for(let t=0,e=1;t<o;t++,e++){d=m.monthMod(d),0===d?(h="year",c+=1):h="month";const t=this._getYear(i,d,c);g=l.determineDaysOfMonths(d,t)*a+g;const e=0===d?t:d;this.timeScaleArray.push({position:g,value:e,unit:h,year:t,month:0===d?1:d}),d++}}generateDayScale({firstVal:t,currentMonth:e,currentYear:s,hoursWidthOnXAxis:i,numberOfDays:a}){const o=new y(this.w);let r="day",n=t.minDate+1,l=n;const h=(t,e,s)=>t>o.determineDaysOfMonths(e+1,s)?(l=1,r="month",d=e+=1,e):e;let c=(24-t.minHour)*i,d=n,g=h(l,e,s);0===t.minHour&&1===t.minDate?(c=0,d=m.monthMod(t.minMonth),r="month",l=t.minDate):1!==t.minDate&&0===t.minHour&&0===t.minMinute&&(c=0,n=t.minDate,l=n,d=n,g=h(l,e,s),1!==d&&(r="day")),this.timeScaleArray.push({position:c,value:d,unit:r,year:this._getYear(s,g,0),month:m.monthMod(g),day:l});let p=c;for(let t=0;t<a;t++){l+=1,r="day",g=h(l,g,this._getYear(s,g,0));const t=this._getYear(s,g,0);p=24*i+p;const e=1===l?m.monthMod(g):l;this.timeScaleArray.push({position:p,value:e,unit:r,year:t,month:m.monthMod(g),day:e})}}generateHourScale({firstVal:t,currentDate:e,currentMonth:s,currentYear:i,minutesWidthOnXAxis:a,numberOfHours:o}){const r=new y(this.w);let n="hour";const l=(t,e)=>(t>r.determineDaysOfMonths(e+1,i)&&(x=1,e+=1),{month:e,date:x}),h=(t,e)=>t>r.determineDaysOfMonths(e+1,i)?e+=1:e,c=60-(t.minMinute+t.minSecond/60);let d=c*a,g=t.minHour+1,p=g;60===c&&(d=0,g=t.minHour,p=g);let x=e;p>=24&&(p=0,x+=1,n="day",g=x);let u=l(x,s).month;u=h(x,u),"day"===n&&(g=x),this.timeScaleArray.push({position:d,value:g,unit:n,day:x,hour:p,year:i,month:m.monthMod(u)}),p++;let f=d;for(let t=0;t<o;t++){if(n="hour",p>=24){p=0,x+=1,n="day";u=l(x,u).month,u=h(x,u)}const t=this._getYear(i,u,0);f=60*a+f;const e=0===p?x:p;this.timeScaleArray.push({position:f,value:e,unit:n,hour:p,day:x,year:t,month:m.monthMod(u)}),p++}}generateMinuteScale({currentMillisecond:t,currentSecond:e,currentMinute:s,currentHour:i,currentDate:a,currentMonth:o,currentYear:r,minutesWidthOnXAxis:n,secondsWidthOnXAxis:l,numberOfMinutes:h}){const c=new y(this.w);let d=(60-e-t/1e3)*l,g=s+1;0===e&&0===t&&(d=0,g=s);let p=a,x=o;const u=r;let f=i,b=d;for(let t=0;t<h;t++){if(g>=60&&(g=0,f+=1,24===f)){f=0,p+=1;p>c.determineDaysOfMonths(x+1,this._getYear(u,x,0))&&(p=1,x+=1)}this.timeScaleArray.push({position:b,value:g,unit:"minute",hour:f,minute:g,day:p,year:this._getYear(u,x,0),month:m.monthMod(x)}),b+=n,g++}}generateSecondScale({currentMillisecond:t,currentSecond:e,currentMinute:s,currentHour:i,currentDate:a,currentMonth:o,currentYear:r,secondsWidthOnXAxis:n,numberOfSeconds:l}){let h=(1e3-t)/1e3*n,c=e+1;0===t&&(h=0,c=e);let d=s;const g=a,p=o,x=r;let u=i,f=h;for(let t=0;t<l;t++)c>=60&&(d++,c=0,d>=60&&(u++,d=0,24===u&&(u=0))),this.timeScaleArray.push({position:f,value:c,unit:"second",hour:u,minute:d,second:c,day:g,year:this._getYear(x,p,0),month:m.monthMod(p)}),f+=n,c++}createRawDateString(t,e){let s=t.year;return 0===t.month&&(t.month=1),s+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?s+="-"+("0"+e).slice(-2):s+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?s+="T"+("0"+e).slice(-2):s+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?s+=":"+("0"+e).slice(-2):s+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?s+=":"+("0"+e).slice(-2):s+=":00",this.utc&&(s+=".000Z"),s}formatDates(t){const e=this.w;return t.map(t=>{let s=t.value.toString();const i=new y(this.w),a=this.createRawDateString(t,s);let o=i.getDate(i.parseDate(a));if(this.utc||(o=i.getDate(i.parseDateWithTimezone(a))),void 0===e.config.xaxis.labels.format){let a="dd MMM";const r=e.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(a=r.year),"month"===t.unit&&(a=r.month),"day"===t.unit&&(a=r.day),"hour"===t.unit&&(a=r.hour),"minute"===t.unit&&(a=r.minute),"second"===t.unit&&(a=r.second),s=i.formatDate(o,a)}else s=i.formatDate(o,e.config.xaxis.labels.format);return{dateString:a,position:t.position,value:s,unit:t.unit,year:t.year,month:t.month}})}removeOverlappingTS(t){const e=new T(this.w);let s,i=!1;t.length>0&&t[0].value&&t.every(e=>e.value.length===t[0].value.length)&&(i=!0,s=e.getTextRects(t[0].value,this.w.config.xaxis.labels.style.fontSize).width);let a=0,o=t.map((o,r)=>{if(r>0&&this.w.config.xaxis.labels.hideOverlappingLabels){const n=i?s:e.getTextRects(t[a].value,this.w.config.xaxis.labels.style.fontSize).width,l=t[a].position;return o.position>l+n+10?(a=r,o):null}return o});return o=o.filter(t=>null!==t),o}_getYear(t,e,s){return t+Math.floor(e/12)+s}}const gt="__apexcharts_registry__";function pt(){return globalThis[gt]}function xt(t){const e=pt()[t];if(!e)throw new Error(`ApexCharts: chart type "${t}" is not registered. Import it via ApexCharts.use() or use the full apexcharts bundle.`);return e}globalThis[gt]||(globalThis[gt]={});class ut{constructor(t,e,s){this.w=e,this.ctx=s,this.el=t}setupElements(){const{globals:t,config:e}=this.w,s=e.chart.type,i=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"],a=[...i,"radar","heatmap","treemap"];t.axisCharts=a.includes(s),t.xyCharts=i.includes(s),t.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(s)&&e.plotOptions.bar.horizontal,t.chartClass=`.apexcharts${t.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=b.createElementNS("http://www.w3.org/1999/xhtml","div"),T.setAttrs(this.w.dom.elWrap,{id:t.chartClass.substring(1),class:`apexcharts-canvas ${t.chartClass.substring(1)}`}),this.el.appendChild(this.w.dom.elWrap);const o=c.isBrowser()?window.SVG:global.SVG;if(this.w.dom.Paper=o().addTo(this.w.dom.elWrap),this.w.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:`translate(${e.chart.offsetX}, ${e.chart.offsetY})`}),this.w.dom.Paper.node.style.background="dark"!==e.theme.mode||e.chart.background?"light"!==e.theme.mode||e.chart.background?e.chart.background:"#fff":"#343A3F",this.setSVGDimensions(),this.w.dom.elLegendForeign=b.createElementNS(z,"foreignObject"),T.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:t.svgWidth,height:t.svgHeight}),this.w.dom.elLegendWrap=b.createElementNS("http://www.w3.org/1999/xhtml","div"),this.w.dom.elLegendWrap.classList.add("apexcharts-legend"),this.w.dom.elWrap.appendChild(this.w.dom.elLegendWrap),this.w.dom.Paper.node.appendChild(this.w.dom.elLegendForeign),e.chart.accessibility.enabled){const t=this.getAccessibleChartLabel(),s=e.chart.accessibility.keyboard.enabled&&e.chart.accessibility.keyboard.navigation.enabled?"application":"img";if(this.w.dom.Paper.attr({role:s,"aria-label":t}),e.chart.accessibility.description){const t=b.createElementNS(z,"desc");t.textContent=e.chart.accessibility.description,this.w.dom.Paper.node.insertBefore(t,this.w.dom.elLegendForeign.nextSibling)}}this.w.dom.elGraphical=this.w.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),this.w.dom.elDefs=this.w.dom.Paper.defs(),this.w.dom.Paper.add(this.w.dom.elGraphical),this.w.dom.elGraphical.add(this.w.dom.elDefs)}plotChartType(t,e){const{w:s,ctx:i}=this,{config:a,globals:o}=s,r={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},n=a.chart.type||"line";let l=null,h=0;this.w.seriesData.series.forEach((e,i)=>{var a,o;const c="column"===(null==(a=t[i])?void 0:a.type)?"bar":(null==(o=t[i])?void 0:o.type)||("column"===n?"bar":n);r[c]?("rangeArea"===c?(r[c].series.push(this.w.rangeData.seriesRangeStart[i]),r[c].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[i])):r[c].series.push(e),r[c].i.push(i),"bar"===c&&(s.globals.columnSeries=r.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(c)&&(l=c),n!==c&&"scatter"!==c&&h++}),h>0&&r.bar.series.length>0&&a.plotOptions.bar.horizontal&&(h-=r.bar.series.length,r.bar={series:[],i:[]},s.globals.columnSeries={series:[],i:[]}),o.comboCharts||(o.comboCharts=h>0);const c=r.line.series.length>0||r.area.series.length>0||r.scatter.series.length>0||r.bubble.series.length>0||r.rangeArea.series.length>0||!o.comboCharts&&["line","area","scatter","bubble","rangeArea"].includes(a.chart.type)?new(xt("line"))(i.w,i,e):null,d=r.candlestick.series.length>0||r.boxPlot.series.length>0||!o.comboCharts&&["candlestick","boxPlot"].includes(a.chart.type)?new(xt("candlestick"))(i.w,i,e):null,g=!o.comboCharts&&["pie","donut","polarArea"].includes(a.chart.type);i.pie=g?new(xt("pie"))(i.w,i):null;const p=r.rangeBar.series.length>0||!o.comboCharts&&"rangeBar"===a.chart.type;i.rangeBar=p?new(xt("rangeBar"))(i.w,i,e):null;let x=[];if(o.comboCharts){const t=new E(this.w);if(r.area.series.length>0&&x.push(...t.drawSeriesByGroup(r.area,o.areaGroups,"area",c)),r.bar.series.length>0)if(a.chart.stacked){const t=new(xt("barStacked"))(i.w,i,e);x.push(t.draw(r.bar.series,r.bar.i))}else i.bar=new(xt("bar"))(i.w,i,e),x.push(i.bar.draw(r.bar.series,r.bar.i));if(r.rangeArea.series.length>0&&x.push(c.draw(r.rangeArea.series,"rangeArea",r.rangeArea.i,r.rangeArea.seriesRangeEnd)),r.line.series.length>0&&x.push(...t.drawSeriesByGroup(r.line,o.lineGroups,"line",c)),r.candlestick.series.length>0&&x.push(d.draw(r.candlestick.series,"candlestick",r.candlestick.i)),r.boxPlot.series.length>0&&x.push(d.draw(r.boxPlot.series,"boxPlot",r.boxPlot.i)),r.rangeBar.series.length>0&&x.push(i.rangeBar.draw(r.rangeBar.series,r.rangeBar.i)),r.scatter.series.length>0){const t=new(xt("line"))(i.w,i,e,!0);x.push(t.draw(r.scatter.series,"scatter",r.scatter.i))}if(r.bubble.series.length>0){const t=new(xt("line"))(i.w,i,e,!0);x.push(t.draw(r.bubble.series,"bubble",r.bubble.i))}}else{const t=a.chart.type;switch(t){case"line":x=c.draw(this.w.seriesData.series,"line");break;case"area":x=c.draw(this.w.seriesData.series,"area");break;case"bar":if(a.chart.stacked){x=new(xt("barStacked"))(i.w,i,e).draw(this.w.seriesData.series)}else i.bar=new(xt("bar"))(i.w,i,e),x=i.bar.draw(this.w.seriesData.series);break;case"candlestick":x=d.draw(this.w.seriesData.series,"candlestick");break;case"boxPlot":x=d.draw(this.w.seriesData.series,t);break;case"rangeBar":x=i.rangeBar.draw(this.w.seriesData.series);break;case"rangeArea":x=c.draw(this.w.rangeData.seriesRangeStart,"rangeArea",void 0,this.w.rangeData.seriesRangeEnd);break;case"heatmap":x=new(xt("heatmap"))(i.w,i,e).draw(this.w.seriesData.series);break;case"treemap":x=new(xt("treemap"))(i.w,i).draw(this.w.seriesData.series);break;case"pie":case"donut":case"polarArea":x=i.pie.draw(this.w.seriesData.series);break;case"radialBar":x=new(xt("radialBar"))(i.w,i).draw(this.w.seriesData.series);break;case"radar":x=new(xt("radar"))(i.w,i).draw(this.w.seriesData.series);break;default:x=c.draw(this.w.seriesData.series)}}return x}setSVGDimensions(){var t;const{globals:e,config:s}=this.w;s.chart.width=s.chart.width||"100%",s.chart.height=s.chart.height||"auto";const i=s.chart.width,a=s.chart.height;e.svgWidth=NaN,e.svgHeight=NaN;let o=m.getDimensions(this.el);const r=i.toString().split(/[0-9]+/g).pop();"%"===r?m.isNumber(o[0])&&(0===o[0].width&&(o=m.getDimensions(this.el.parentNode)),e.svgWidth=o[0]*parseInt(i,10)/100):"px"!==r&&""!==r||(e.svgWidth=parseInt(i,10));const n=String(a).toString().split(/[0-9]+/g).pop();if("auto"!==a&&""!==a)if("%"===n){const t=m.getDimensions(this.el.parentNode);e.svgHeight=t[1]*parseInt(a,10)/100}else e.svgHeight=parseInt(a,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),T.setAttrs(this.w.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),"%"!==n&&c.isBrowser()){const i=s.chart.sparkline.enabled?0:e.axisCharts?s.chart.parentHeightOffset:0,a=this.w.dom.Paper.node;(null==(t=a.parentNode)?void 0:t.parentNode)&&(a.parentNode.parentNode.style.minHeight=`${e.svgHeight+i}px`)}this.w.dom.elWrap.style.width=`${e.svgWidth}px`,this.w.dom.elWrap.style.height=`${e.svgHeight}px`}shiftGraphPosition(){const{globals:t}=this.w,{translateY:e,translateX:s}=t;T.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${s}, ${e})`})}resizeNonAxisCharts(){var t,e;const{w:s}=this;let i=0,a=s.config.chart.sparkline.enabled?1:15;a+=s.config.grid.padding.bottom,["top","bottom"].includes(s.config.legend.position)&&s.config.legend.show&&!s.config.legend.floating&&(i=(null!=(e=null==(t=this.ctx.legend)?void 0:t.legendHelpers.getLegendDimensions().clwh)?e:0)+7);const o=s.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie");let r=2.05*s.globals.radialSize;if(o&&!s.config.chart.sparkline.enabled&&0!==s.config.plotOptions.radialBar.startAngle){const t=m.getBoundingClientRect(o);r=t.bottom;const e=t.bottom-t.top;r=Math.max(2.05*s.globals.radialSize,e)}const n=Math.ceil(r+this.w.layout.translateY+i+a);this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(n)),s.config.chart.height&&String(s.config.chart.height).includes("%")||(this.w.dom.elWrap.style.height=`${n}px`,T.setAttrs(this.w.dom.Paper.node,{height:n}),c.isBrowser()&&(this.w.dom.Paper.node.parentNode.parentNode.style.minHeight=`${n}px`))}coreCalculations(){new U(this.w).init()}resetGlobals(){const t=()=>this.w.config.series.map(()=>[]),e=new M,{globals:s}=this.w,i={dataWasParsed:this.w.axisFlags.dataWasParsed,originalSeries:s.originalSeries};e.initGlobalVars(s),s.seriesXvalues=t(),s.seriesYvalues=t(),i.dataWasParsed&&(this.w.axisFlags.dataWasParsed=i.dataWasParsed,s.originalSeries=i.originalSeries)}isMultipleY(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}xySettings(){const{w:t}=this;let e=null;if(t.globals.axisCharts){if("back"===t.config.xaxis.crosshairs.position&&new Q(this.w).drawXCrosshairs(),"back"===t.config.yaxis[0].crosshairs.position&&new Q(this.w).drawYCrosshairs(),"datetime"===t.config.xaxis.type&&void 0===t.config.xaxis.labels.formatter){this.ctx.timeScale=new dt(this.w,this.ctx);let e=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?e=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(e=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(e)}e=new E(this.w).getCalculatedRatios()}return e}updateSourceChart(t){this.ctx.w.interact.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}setupBrushHandler(){const{ctx:t,w:e}=this;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){const s=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];s.forEach(e=>{const s=t.constructor.getChartByID(e);s.w.globals.brushSource=this.ctx,"function"!=typeof s.w.config.chart.events.zoomed&&(s.w.config.chart.events.zoomed=()=>this.updateSourceChart(s)),"function"!=typeof s.w.config.chart.events.scrolled&&(s.w.config.chart.events.scrolled=()=>this.updateSourceChart(s))}),e.config.chart.events.selection=(e,i)=>{s.forEach(e=>{t.constructor.getChartByID(e).ctx.updateHelpers._updateOptions({xaxis:{min:i.xaxis.min,max:i.xaxis.max}},!1,!1,!1,!1)})}}}getAccessibleChartLabel(){const t=this.w,e=t.config;let s="";if(e.chart.accessibility&&e.chart.accessibility.description)s=e.chart.accessibility.description;else if(e.title.text){const t=e.chart.type;s=`${e.title.text}. ${t} chart`,e.subtitle.text&&(s+=`. ${e.subtitle.text}`)}else{s=`${e.chart.type} chart with ${t.seriesData.series.length||(e.series?e.series.length:0)} data series`}return s}}class ft{constructor(t,{resetGlobals:e=()=>{},isMultipleY:s=()=>{}}={}){this.w=t,this.resetGlobals=e,this.isMultipleY=s,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new E(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){const t=this.w.config.series,e=new et(this.w);this.activeSeriesIndex=e.getActiveConfigSeriesIndex();const s=t[this.activeSeriesIndex];return s&&s.data&&s.data.length>0&&null!==s.data[0]&&void 0!==s.data[0]?s.data[0]:null}isMultiFormat(){return this.isFormatXY()||this.isFormat2DArray()}isFormatXY(){var t;const e=this.getFirstDataPoint();if(!e||void 0===e.x)return!1;const s=null==(t=this.w.config.series[this.activeSeriesIndex])?void 0:t.data;if(s){const t=t=>t&&void 0!==t.x;for(let e=1;e<Math.min(3,s.length)&&!0===t(s[e]);e++);}return!0}isFormat2DArray(){const t=this.getFirstDataPoint();return t&&Array.isArray(t)}handleFormat2DArray(t,e){const s=this.w.config,i=t[e].data,a="boxPlot"===s.chart.type||"boxPlot"===s.series[e].type;for(let t=0;t<i.length;t++){const e=i[t],o=e[0],r=e[1],n=e[2];if(void 0!==r&&(Array.isArray(r)&&4===r.length&&!a?this.twoDSeries.push(m.parseNumber(r[3])):e.length>=5?this.twoDSeries.push(m.parseNumber(e[4])):this.twoDSeries.push(m.parseNumber(r)),this.w.axisFlags.dataFormatXNumeric=!0),"datetime"===s.xaxis.type){const t=new Date(o).getTime();this.twoDSeriesX.push(t)}else this.twoDSeriesX.push(o);void 0!==n&&(this.threeDSeries.push(n),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(t,e){const s=this.w.config,i=this.w.globals,a=new y(this.w),o=t[e].data;let r=e;i.collapsedSeriesIndices.indexOf(e)>-1&&(r=this.activeSeriesIndex);const n=t[r].data;for(let t=0;t<o.length;t++){const s=o[t];if(void 0!==s.y){const t=Array.isArray(s.y)?m.parseNumber(s.y[s.y.length-1]):m.parseNumber(s.y);this.twoDSeries.push(t)}void 0===this.seriesGoals[e]&&(this.seriesGoals[e]=[]),void 0!==s.goals&&Array.isArray(s.goals)?this.seriesGoals[e].push(s.goals):this.seriesGoals[e].push(null),void 0!==s.z&&(this.threeDSeries.push(s.z),this.w.axisFlags.isDataXYZ=!0)}for(let t=0;t<n.length;t++){const e=n[t].x,o="string"==typeof e,r=Array.isArray(e),l=!r&&!!a.isValidDate(e);if(o||l)if(o||s.xaxis.convertedCatToNumeric){const t=i.isBarHorizontal&&this.w.axisFlags.isRangeData;"datetime"!==s.xaxis.type||t?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e),isNaN(e)||"category"===this.w.config.xaxis.type||"string"==typeof e||(this.w.axisFlags.isXNumeric=!0)):this.twoDSeriesX.push(a.parseDate(e))}else"datetime"===s.xaxis.type?this.twoDSeriesX.push(a.parseDate(e.toString())):(this.w.axisFlags.dataFormatXNumeric=!0,this.w.axisFlags.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(e)));else r?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e)):(this.w.axisFlags.isXNumeric=!0,this.w.axisFlags.dataFormatXNumeric=!0,this.twoDSeriesX.push(e))}}handleRangeData(t,e){let s={start:[],end:[],rangeUniques:[]};return this.isFormat2DArray()?s=this.handleRangeDataFormat("array",t,e):this.isFormatXY()&&(s=this.handleRangeDataFormat("xy",t,e)),this.w.rangeData.seriesRangeStart[e]=void 0===s.start?[]:s.start,this.w.rangeData.seriesRangeEnd[e]=void 0===s.end?[]:s.end,this.w.rangeData.seriesRange[e]=s.rangeUniques,this.w.rangeData.seriesRange.forEach(t=>{t&&t.forEach(t=>{const e=t.y,s=e.length;if(!(s<=1))for(let i=0;i<s;i++){const a=e[i],o=a.y1,r=a.y2;for(let n=i+1;n<s;n++){const s=e[n],i=s.y1;if(o<=s.y2&&i<=r){const e=t;e.overlaps.add(a.rangeName),e.overlaps.add(s.rangeName)}}}})}),s}handleCandleStickBoxData(t,e){let s={o:[],h:[],m:[],l:[],c:[]};return this.isFormat2DArray()?s=this.handleCandleStickBoxDataFormat("array",t,e):this.isFormatXY()&&(s=this.handleCandleStickBoxDataFormat("xy",t,e)),this.w.candleData.seriesCandleO[e]=s.o,this.w.candleData.seriesCandleH[e]=s.h,this.w.candleData.seriesCandleM[e]=s.m,this.w.candleData.seriesCandleL[e]=s.l,this.w.candleData.seriesCandleC[e]=s.c,s}handleRangeDataFormat(t,e,s){const i=[],a=[],o=new Map,r=[];if(e[s].data.forEach(t=>{if(!o.has(t.x)){const e={x:t.x,overlaps:new Set,y:[]};o.set(t.x,e),r.push(e)}}),"array"===t)for(let t=0;t<e[s].data.length;t++)Array.isArray(e[s].data[t])?(i.push(e[s].data[t][1][0]),a.push(e[s].data[t][1][1])):(i.push(e[s].data[t]),a.push(e[s].data[t]));else if("xy"===t)for(let t=0;t<e[s].data.length;t++){const r=Array.isArray(e[s].data[t].y),n=m.randomId(),l=e[s].data[t].x,h={y1:r?e[s].data[t].y[0]:e[s].data[t].y,y2:r?e[s].data[t].y[1]:e[s].data[t].y,rangeName:n};e[s].data[t].rangeName=n;const c=o.get(l);c&&c.y.push(h),i.push(h.y1),a.push(h.y2)}return{start:i,end:a,rangeUniques:r}}handleCandleStickBoxDataFormat(t,e,s){const i=this.w,a="boxPlot"===i.config.chart.type||"boxPlot"===i.config.series[s].type,o=[],r=[],n=[],l=[],h=[],c=e[s].data;let d;if("array"===t){d=a&&6===c[0].length||!a&&5===c[0].length?t=>t.slice(1):t=>Array.isArray(t[1])?t[1]:[]}else d=t=>Array.isArray(t.y)?t.y:[];for(let t=0;t<c.length;t++){const e=d(c[t]);e&&e.length>=2&&(o.push(e[0]),r.push(e[1]),a?(n.push(e[2]),l.push(e[3]),h.push(e[4])):(l.push(e[2]),h.push(e[3])))}return{o:o,h:r,m:n,l:l,c:h}}parseDataAxisCharts(t){var e,s;const i=this.w.config,a=this.w.globals,o=new y(this.w),r=i.labels.length>0?i.labels.slice():i.xaxis.categories.slice();this.w.axisFlags.isRangeBar="rangeBar"===i.chart.type&&a.isBarHorizontal,this.w.labelData.hasXaxisGroups="category"===i.xaxis.type&&i.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=i.xaxis.group.groups),t.forEach((t,e)=>{void 0!==t.name?this.w.seriesData.seriesNames.push(t.name):this.w.seriesData.seriesNames.push("series-"+parseInt(String(e+1),10))}),this.coreUtils.setSeriesYAxisMappings();const h=[],c=[...new Set(i.series.map(t=>t.group))];i.series.forEach((t,e)=>{const s=c.indexOf(t.group);h[s]||(h[s]=[]),h[s].push(this.w.seriesData.seriesNames[e])}),this.w.labelData.seriesGroups=h;const d=()=>{for(let t=0;t<r.length;t++)if("string"==typeof r[t]){if(!o.isValidDate(r[t]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");this.twoDSeriesX.push(o.parseDate(r[t]))}else this.twoDSeriesX.push(r[t])};for(let a=0;a<t.length;a++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],void 0===t[a].data)return;const o=i.chart.dataReducer;if((null==o?void 0:o.enabled)&&this.isMultiFormat()&&t[a].data.length>(null!=(e=o.threshold)?e:500)&&(t[a]=l(n({},t[a]),{data:ft.lttbDownsample(t[a].data,null!=(s=o.targetPoints)?s:250)})),"rangeBar"!==i.chart.type&&"rangeArea"!==i.chart.type&&"rangeBar"!==t[a].type&&"rangeArea"!==t[a].type||(this.w.axisFlags.isRangeData=!0,this.handleRangeData(t,a)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,a):this.isFormatXY()&&this.handleFormatXY(t,a),"candlestick"!==i.chart.type&&"candlestick"!==t[a].type&&"boxPlot"!==i.chart.type&&"boxPlot"!==t[a].type||this.handleCandleStickBoxData(t,a),this.w.seriesData.series.push(this.twoDSeries),this.w.labelData.labels.push(this.twoDSeriesX),this.w.seriesData.seriesX.push(this.twoDSeriesX),this.w.seriesData.seriesGoals=this.seriesGoals,a!==this.activeSeriesIndex||this.fallbackToCategory||(this.w.axisFlags.isXNumeric=!0);else{"datetime"===i.xaxis.type?(this.w.axisFlags.isXNumeric=!0,d(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):"numeric"===i.xaxis.type&&(this.w.axisFlags.isXNumeric=!0,r.length>0&&(this.twoDSeriesX=r,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);const e=t[a].data.map(t=>m.parseNumber(t));this.w.seriesData.series.push(e)}this.w.seriesData.seriesZ.push(this.threeDSeries),void 0!==t[a].color?this.w.seriesData.seriesColors.push(t[a].color):this.w.seriesData.seriesColors.push(void 0)}return this.w}parseDataNonAxisCharts(t){const e=this.w.config,s=Array.isArray(t)&&t.every(t=>"number"==typeof t)&&e.labels.length>0;Array.isArray(t)&&t.some(t=>t&&"object"==typeof t&&t.data||t&&"object"==typeof t&&t.parsing);if(s){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=e.labels.slice();for(let t=0;t<this.w.seriesData.series.length;t++)void 0===this.w.seriesData.seriesNames[t]&&this.w.seriesData.seriesNames.push("series-"+(t+1));return this.w}if(Array.isArray(t)&&t.every(t=>"number"==typeof t)){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=[];for(let t=0;t<this.w.seriesData.series.length;t++)this.w.seriesData.seriesNames.push(e.labels[t]||`series-${t+1}`);return this.w}const i=this.extractPieDataFromSeries(t);this.w.seriesData.series=i.values,this.w.seriesData.seriesNames=i.labels,"radialBar"===e.chart.type&&(this.w.seriesData.series=this.w.seriesData.series.map(t=>{const e=m.parseNumber(t);return e}));for(let t=0;t<this.w.seriesData.series.length;t++)void 0===this.w.seriesData.seriesNames[t]&&this.w.seriesData.seriesNames.push("series-"+(t+1));return this.w}resetParsingFlags(){const t=this.w;t.axisFlags.dataWasParsed=!1,t.globals.originalSeries=null,t.config.series&&t.config.series.forEach(t=>{t.__apexParsed&&delete t.__apexParsed})}extractPieDataFromSeries(t){const e=[],s=[];if(!Array.isArray(t))return{values:[],labels:[]};if(0===t.length)return{values:[],labels:[]};const i=t[0];return"object"==typeof i&&null!==i&&i.data?(this.extractPieDataFromSeriesObjects(t,e,s),{values:e,labels:s}):{values:[],labels:[]}}extractPieDataFromSeriesObjects(t,e,s){t.forEach((t,i)=>{t.data&&Array.isArray(t.data)&&t.data.forEach(t=>{"object"==typeof t&&null!==t&&void 0!==t.x&&void 0!==t.y&&(s.push(String(t.x)),e.push(m.parseNumber(t.y)))})})}handleExternalLabelsData(t){const e=this.w.config;if(e.xaxis.categories.length>0)this.w.labelData.labels=e.xaxis.categories;else if(e.labels.length>0)this.w.labelData.labels=e.labels.slice();else if(this.fallbackToCategory){if(this.w.labelData.labels=this.w.labelData.labels[0],this.w.rangeData.seriesRange.length){this.w.rangeData.seriesRange.map(t=>{t.forEach(t=>{this.w.labelData.labels.indexOf(t.x)<0&&t.x&&this.w.labelData.labels.push(t.x)})});const t=this.w.labelData.labels;if(t.length>0&&("number"==typeof t[0]||"string"==typeof t[0]))this.w.labelData.labels=[...new Set(t)];else{const e=new Map;for(const s of t){const t=JSON.stringify(s);e.has(t)||e.set(t,s)}this.w.labelData.labels=Array.from(e.values())}}if(e.xaxis.convertedCatToNumeric){new C(e).convertCatToNumericXaxis(e,this.w.seriesData.seriesX[0]),this._generateExternalLabels(t)}}else this._generateExternalLabels(t)}_generateExternalLabels(t){const e=this.w.globals,s=this.w.config;let i=[];if(e.axisCharts){if(this.w.seriesData.series.length>0)if(this.isFormatXY()){const t=s.series.map(t=>{const e=new Map;for(const s of t.data)e.has(s.x)||e.set(s.x,s);return Array.from(e.values())}),e=t.reduce((t,e,s,i)=>i[t].length>e.length?t:s,0);for(let s=0;s<t[e].length;s++)i.push(s+1)}else for(let t=0;t<this.w.seriesData.series[e.maxValsInArrayIndex].length;t++)i.push(t+1);this.w.seriesData.seriesX=[];for(let e=0;e<t.length;e++)this.w.seriesData.seriesX.push(i);this.w.globals.isBarHorizontal||(this.w.axisFlags.isXNumeric=!0)}if(0===i.length){i=e.axisCharts?[]:this.w.seriesData.series.map((t,e)=>e+1);for(let e=0;e<t.length;e++)this.w.seriesData.seriesX.push(i)}this.w.labelData.labels=i,s.xaxis.convertedCatToNumeric&&(this.w.labelData.categoryLabels=i.map(t=>s.xaxis.labels.formatter(t))),this.w.axisFlags.noLabelsProvided=!0}parseRawDataIfNeeded(t){const e=this.w.config,s=this.w.globals,i=e.parsing;if(this.w.axisFlags.dataWasParsed)return t;if(!i&&!t.some(t=>t.parsing))return t;const a=t.map((t,e)=>{var s,a,o;if(!t.data||!Array.isArray(t.data)||0===t.data.length)return t;const r={x:(null==(s=t.parsing)?void 0:s.x)||(null==i?void 0:i.x),y:(null==(a=t.parsing)?void 0:a.y)||(null==i?void 0:i.y),z:(null==(o=t.parsing)?void 0:o.z)||(null==i?void 0:i.z)};if(!r.x&&!r.y)return t;const h=t.data[0];if("object"==typeof h&&null!==h&&(Object.prototype.hasOwnProperty.call(h,"x")||Object.prototype.hasOwnProperty.call(h,"y"))||Array.isArray(h))return t;if(!r.x||!r.y||Array.isArray(r.y)&&0===r.y.length)return t;const c=t.data.map((t,e)=>{if("object"!=typeof t||null===t)return t;const s=this.getNestedValue(t,r.x);let i,a;if(Array.isArray(r.y)){const e=r.y.map(e=>this.getNestedValue(t,e));"bubble"===this.w.config.chart.type?(e.length,i=e[0]):i=e}else i=this.getNestedValue(t,r.y);r.z&&(a=this.getNestedValue(t,r.z));const o={x:s,y:i,z:void 0};if("bubble"===this.w.config.chart.type&&Array.isArray(r.y)&&2===r.y.length){const e=this.getNestedValue(t,r.y[1]);void 0!==e&&(o.z=e)}return void 0!==a&&(o.z=a),o});return l(n({},t),{data:c,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,s.originalSeries||(s.originalSeries=m.clone(t)),a}getNestedValue(t,e){if(!t||"object"!=typeof t||!e)return;if(-1===e.indexOf("."))return t[e];const s=e.split(".");let i=t;for(let t=0;t<s.length;t++){if(null==i||"object"!=typeof i)return;i=i[s[t]]}return i}parseData(t){const e=this.w,s=e.config,i=e.globals;if(t=this.parseRawDataIfNeeded(t),s.series=t,i.initialSeries=m.clone(t),this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),i.axisCharts?(this.parseDataAxisCharts(t),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(t),s.chart.stacked){const t=new et(this.w);this.w.seriesData.series=t.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),i.axisCharts&&(this.w.seriesData.stackedSeriesTotals=this.coreUtils.getStackedSeriesTotals(),this.w.seriesData.stackedSeriesTotalsByGroups=this.coreUtils.getStackedSeriesTotalsByGroups()),this.coreUtils.getPercentSeries(),this.w.axisFlags.dataFormatXNumeric||this.w.axisFlags.isXNumeric&&("numeric"!==s.xaxis.type||0!==s.labels.length||0!==s.xaxis.categories.length)||this.handleExternalLabelsData(t);const a=this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let t=0;t<a.length;t++)if(Array.isArray(a[t])){this.w.axisFlags.isMultiLineX=!0;break}return{seriesData:{series:this.w.seriesData.series,seriesNames:this.w.seriesData.seriesNames,seriesX:this.w.seriesData.seriesX,seriesZ:this.w.seriesData.seriesZ,seriesColors:this.w.seriesData.seriesColors,seriesGoals:this.w.seriesData.seriesGoals,initialSeries:i.initialSeries,originalSeries:i.originalSeries,stackedSeriesTotals:this.w.seriesData.stackedSeriesTotals,stackedSeriesTotalsByGroups:this.w.seriesData.stackedSeriesTotalsByGroups,noLabelsProvided:this.w.axisFlags.noLabelsProvided},rangeData:{seriesRangeStart:this.w.rangeData.seriesRangeStart,seriesRangeEnd:this.w.rangeData.seriesRangeEnd,seriesRange:this.w.rangeData.seriesRange},candleData:{seriesCandleO:this.w.candleData.seriesCandleO,seriesCandleH:this.w.candleData.seriesCandleH,seriesCandleM:this.w.candleData.seriesCandleM,seriesCandleL:this.w.candleData.seriesCandleL,seriesCandleC:this.w.candleData.seriesCandleC},labelData:{labels:this.w.labelData.labels,categoryLabels:this.w.labelData.categoryLabels},axisFlags:{isXNumeric:this.w.axisFlags.isXNumeric,dataFormatXNumeric:this.w.axisFlags.dataFormatXNumeric,isDataXYZ:this.w.axisFlags.isDataXYZ,isRangeData:this.w.axisFlags.isRangeData,isRangeBar:this.w.axisFlags.isRangeBar,isMultiLineX:this.w.axisFlags.isMultiLineX,dataWasParsed:this.w.axisFlags.dataWasParsed,hasXaxisGroups:this.w.labelData.hasXaxisGroups,groups:this.w.labelData.groups,seriesGroups:this.w.labelData.seriesGroups}}}static lttbDownsample(t,e){const s=t.length;if(e>=s||e<3)return t;const i=!Array.isArray(t[0]),a=i?t=>t.x:t=>t[0],o=i?t=>t.y:t=>t[1],r=[];r.push(t[0]);const n=(s-2)/(e-2);let l=0;for(let i=0;i<e-2;i++){const e=Math.floor((i+1)*n)+1,h=Math.min(Math.floor((i+2)*n)+1,s);let c=0,d=0;const g=h-e;for(let s=e;s<h;s++)c+=a(t[s]),d+=o(t[s]);c/=g,d/=g;const p=Math.floor(i*n)+1,x=Math.min(Math.floor((i+1)*n)+1,s),u=a(t[l]),f=o(t[l]);let b=-1,m=p;for(let e=p;e<x;e++){const s=.5*Math.abs((u-c)*(o(t[e])-f)-(u-a(t[e]))*(d-f));s>b&&(b=s,m=e)}r.push(t[m]),l=m}return r.push(t[s-1]),r}excludeCollapsedSeriesInYAxis(){const t=this.w,e=[];t.globals.seriesYAxisMap.forEach((s,i)=>{let a=0;s.forEach(e=>{-1!==t.globals.collapsedSeriesIndices.indexOf(e)&&a++}),a>0&&a==s.length&&e.push(i)}),t.globals.ignoreYAxisIndexes=e.map(t=>t)}}class bt{constructor(t,e){this.w=t,this.ctx=e}_updateOptions(t,e=!1,s=!0,i=!0,a=!1){return new Promise(o=>{let r=[this.ctx];i&&(r=this.ctx.getSyncedCharts()),this.w.globals.isExecCalled&&(r=[this.ctx],this.w.globals.isExecCalled=!1),r.forEach((i,n)=>{const l=i.w;if(l.globals.shouldAnimate=s,e||(l.globals.resized=!0,l.globals.dataChanged=!0,s&&i.series.getPreviousPaths()),t&&"object"==typeof t&&(i.config=new D(t),t=E.extendArrayProps(i.config,t,l),i.w.globals.chartID!==this.w.globals.chartID&&delete t.series,l.config=m.extend(l.config,t),a&&(l.globals.lastXAxis=t.xaxis?m.clone(t.xaxis):[],l.globals.lastYAxis=t.yaxis?m.clone(t.yaxis):[],l.globals.initialConfig=m.extend({},l.config),l.globals.initialSeries=m.clone(l.config.series),t.series))){for(let t=0;t<l.globals.collapsedSeriesIndices.length;t++){const e=l.config.series[l.globals.collapsedSeriesIndices[t]];l.globals.collapsedSeries[t].data=l.globals.axisCharts?e.data.slice():e}for(let t=0;t<l.globals.ancillaryCollapsedSeriesIndices.length;t++){const e=l.config.series[l.globals.ancillaryCollapsedSeriesIndices[t]];l.globals.ancillaryCollapsedSeries[t].data=l.globals.axisCharts?e.data.slice():e}i.series.emptyCollapsedSeries(l.config.series)}return i.update(t).then(()=>{n===r.length-1&&o(i)})})})}_updateSeries(t,e,s=!1){return new Promise(i=>{const a=this.w;a.globals.shouldAnimate=e,a.globals.dataChanged=!0,_.invalidateSelectors(a),e&&this.ctx.series.getPreviousPaths();const o=a.config.series.length;this.ctx.data.resetParsingFlags();const r=this.ctx.data.parseData(t);return this.ctx._writeParsedSeriesData(r.seriesData),this.ctx._writeParsedRangeData(r.rangeData),this.ctx._writeParsedCandleData(r.candleData),this.ctx._writeParsedLabelData(r.labelData),this.ctx._writeParsedAxisFlags(r.axisFlags),s&&(a.globals.initialConfig&&(a.globals.initialConfig.series=m.clone(a.config.series)),a.globals.initialSeries=m.clone(a.config.series)),this._canUseFastPath(t,o,a)?this.ctx.fastUpdate(e).then(()=>{i(this.ctx)}):this.ctx.update().then(()=>{i(this.ctx)})})}_canUseFastPath(t,e,s){return!!s.dom.elGraphical&&(!!s.globals.axisCharts&&(t.length===e&&(!(s.globals.collapsedSeries.length>0)&&!s.globals.comboCharts)))}_extendSeries(t,e){const s=this.w,i=s.config.series[e];return l(n({},s.config.series[e]),{name:t.name?t.name:null==i?void 0:i.name,color:t.color?t.color:null==i?void 0:i.color,type:t.type?t.type:null==i?void 0:i.type,group:t.group?t.group:null==i?void 0:i.group,hidden:void 0!==t.hidden?t.hidden:null==i?void 0:i.hidden,data:t.data?t.data:null==i?void 0:i.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}toggleDataPointSelection(t,e){const s=this.w;let i=null;const a=`.apexcharts-series[data\\:realIndex='${t}']`;if(s.globals.axisCharts?i=s.dom.Paper.findOne(`${a} path[j='${e}'], ${a} circle[j='${e}'], ${a} rect[j='${e}']`):void 0===e&&(i=s.dom.Paper.findOne(`${a} path[j='${t}']`),"pie"!==s.config.chart.type&&"polarArea"!==s.config.chart.type&&"donut"!==s.config.chart.type||this.ctx.pie.pieClicked(t)),!i)return null;new T(this.w).pathMouseDown(i,null);return i.node?i.node:null}forceXAxisUpdate(t){const e=this.w;if(["min","max"].forEach(s=>{void 0!==t.xaxis[s]&&(e.config.xaxis[s]=t.xaxis[s],e.globals.lastXAxis[s]=t.xaxis[s])}),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){const e=new C(t);t=e.convertCatToNumericXaxis(t,this.ctx)}return t}forceYAxisUpdate(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((e,s)=>{t.yaxis[s].min=0,t.yaxis[s].max=100}):(t.yaxis.min=0,t.yaxis.max=100)),t}revertDefaultAxisMinMax(t){const e=this.w;let s=e.globals.lastXAxis,i=e.globals.lastYAxis;t&&t.xaxis&&(s=t.xaxis),t&&t.yaxis&&(i=t.yaxis);const a=s;e.config.xaxis.min=a.min,e.config.xaxis.max=a.max;const o=t=>{if(void 0!==i[t]){const s=i[t];e.config.yaxis[t].min=s.min,e.config.yaxis[t].max=s.max}};e.config.yaxis.map((t,s)=>{e.interact.zoomed||void 0!==i[s]?o(s):void 0!==this.ctx.opts.yaxis[s]&&(t.min=this.ctx.opts.yaxis[s].min,t.max=this.ctx.opts.yaxis[s].max)})}}class mt{constructor(t){this.w=t.w,this.ttCtx=t}getNearestValues({hoverArea:t,elGrid:e,clientX:s,clientY:i}){var a,o;const r=this.w,n=e.getBoundingClientRect(),l=n.width,h=n.height;let c=l/(r.globals.dataPoints-1);const d=h/r.globals.dataPoints,g=this.hasBars();!r.globals.comboCharts&&!g||r.config.xaxis.convertedCatToNumeric||(c=l/r.globals.dataPoints);const p=s-n.left-r.globals.barPadForNumericAxis,x=i-n.top;p<0||x<0||p>l||x>h?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):r.interact.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):r.interact.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));let u=Math.round(p/c);const f=Math.floor(x/d);g&&!r.config.xaxis.convertedCatToNumeric&&(u=Math.ceil(p/c),u-=1);let b=null,y=null,w=r.globals.seriesXvalues.map(t=>t.filter(t=>m.isNumber(t)));const v=r.globals.seriesYvalues.map(t=>t.filter(t=>m.isNumber(t)));if(r.axisFlags.isXNumeric){const t=this.ttCtx.getElGrid();if(!t)return{hoverX:p,hoverY:x};const e=t.getBoundingClientRect(),s=p*(e.width/l),i=x*(e.height/h);y=this.closestInMultiArray(s,i,w,v),b=y.index,u=null!=(a=y.j)?a:0,null!==b&&r.globals.hasNullValues&&(w=r.globals.seriesXvalues[b],y=this.closestInArray(s,w),u=null!=(o=y.j)?o:0)}return r.interact.capturedSeriesIndex=null===b?-1:b,(!u||u<1)&&(u=0),r.globals.isBarHorizontal?r.interact.capturedDataPointIndex=f:r.interact.capturedDataPointIndex=u,{capturedSeries:b,j:r.globals.isBarHorizontal?f:u,hoverX:p,hoverY:x}}getFirstActiveXArray(t){const e=this.w;let s=0;const i=t.map((t,e)=>t.length>0?e:-1);for(let t=0;t<i.length;t++)if(-1!==i[t]&&-1===e.globals.collapsedSeriesIndices.indexOf(t)&&-1===e.globals.ancillaryCollapsedSeriesIndices.indexOf(t)){s=i[t];break}return s}closestInMultiArray(t,e,s,i){const a=this.w,o=t=>-1===a.globals.collapsedSeriesIndices.indexOf(t)&&-1===a.globals.ancillaryCollapsedSeriesIndices.indexOf(t);let r=1/0,n=null,l=null;for(let h=0;h<s.length;h++){if(!o(h))continue;const c=s[h],d=i[h],g=Math.min(c.length,d.length);for(let s=0;s<g;s++){const i=t-c[s];let o=Math.sqrt(i*i);if(!a.globals.allSeriesHasEqualX){const t=e-d[s];o=Math.sqrt(i*i+t*t)}o<r&&(r=o,n=h,l=s)}}return{index:n,j:l}}closestInArray(t,e){const s=e[0];let i=null,a=Math.abs(t-s);for(let s=0;s<e.length;s++){const o=Math.abs(t-e[s]);o<a&&(a=o,i=s)}return{j:i}}isXoverlap(t){const e=[],s=this.w.seriesData.seriesX.filter(t=>void 0!==t[0]);if(s.length>0)for(let i=0;i<s.length-1;i++)void 0!==s[i][t]&&void 0!==s[i+1][t]&&s[i][t]!==s[i+1][t]&&e.push("unEqual");return 0===e.length}isInitialSeriesSameLen(){var t,e,s;let i=!0;const a=(null==(t=this.w.globals.initialSeries)?void 0:t.filter((t,e)=>{var s;return!(null==(s=this.w.globals.collapsedSeriesIndices)?void 0:s.includes(e))}))||[];for(let t=0;t<a.length-1;t++){if(!(null==(e=a[t])?void 0:e.data)||!(null==(s=a[t+1])?void 0:s.data))return!0;if(a[t].data.length!==a[t+1].data.length){i=!1;break}}return i}getBarsHeight(t){return[...t].reduce((t,e)=>t+e.getBBox().height,0)}getElMarkers(t){return"number"==typeof t?this.w.dom.baseEl.querySelectorAll(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-series-markers-wrap > *`):this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}getAllMarkers(t=!1){let e=[...this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap")];t&&(e=e.filter(t=>{const e=Number(t.getAttribute("data:realIndex"));return-1===this.w.globals.collapsedSeriesIndices.indexOf(e)})),e.sort((t,e)=>{var s=Number(t.getAttribute("data:realIndex")),i=Number(e.getAttribute("data:realIndex"));return i<s?1:i>s?-1:0});const s=[];return e.forEach(t=>{s.push(t.querySelector(".apexcharts-marker"))}),s}hasMarkers(t){return this.getElMarkers(t).length>0}getPathFromPoint(t,e){const s=Number(t.getAttribute("cx")),i=Number(t.getAttribute("cy")),a=t.getAttribute("shape");return new T(this.w).getMarkerPath(s,i,a,e)}getElBars(){return this.w.dom.baseEl.querySelectorAll(".apexcharts-bar-series,  .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}hasBars(){return this.getElBars().length>0}getHoverMarkerSize(t){const e=this.w;let s=e.config.markers.hover.size;return void 0===s&&(s=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),s}toggleAllTooltipSeriesGroups(t){const e=this.w,s=this.ttCtx;0===s.allTooltipSeriesGroups.length&&(s.allTooltipSeriesGroups=e.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));const i=s.allTooltipSeriesGroups;for(let s=0;s<i.length;s++)"enable"===t?(i[s].classList.add("apexcharts-active"),i[s].style.display=e.config.tooltip.items.display):(i[s].classList.remove("apexcharts-active"),i[s].style.display="none")}}class yt{constructor(t){this.w=t.w,this.ttCtx=t,this.tooltipUtil=new mt(t)}drawSeriesTexts({shared:t=!0,ttItems:e,i:s=0,j:i=null,y1:a,y2:o,e:r}){const n=this.w;void 0!==n.config.tooltip.custom?this.handleCustomTooltip({i:s,j:i,y1:a,y2:o,w:n}):this.toggleActiveInactiveSeries(t,s);const l=this.getValuesToPrint({i:s,j:i});this.printLabels({i:s,j:i,values:l,ttItems:e,shared:t,e:r});const h=this.ttCtx.getElTooltip();h&&(this.ttCtx.tooltipRect.ttWidth=h.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=h.getBoundingClientRect().height)}printLabels({i:t,j:e,values:s,ttItems:i,shared:a,e:o}){var r;const h=this.w;let c,d=[];const g=t=>h.seriesData.seriesGoals[t]&&h.seriesData.seriesGoals[t][e]&&Array.isArray(h.seriesData.seriesGoals[t][e]),{xVal:p,zVal:x,xAxisTTVal:u}=s;let f="",b=h.globals.colors[t];null!==e&&h.config.plotOptions.bar.distributed&&(b=h.globals.colors[e]);for(let s=0,m=h.seriesData.series.length-1;s<h.seriesData.series.length;s++,m--){let y=this.getFormatters(t);f=this.getSeriesName({fn:y.yLbTitleFormatter,index:t,seriesIndex:t,j:e}),"treemap"===h.config.chart.type&&(f=y.yLbTitleFormatter(String(h.config.series[t].data[e].x),{series:h.seriesData.series,seriesIndex:t,dataPointIndex:e,w:h}));const w=h.config.tooltip.inverseOrder?m:s;if(h.globals.axisCharts){const s=t=>{var s,i,a,o;return h.axisFlags.isRangeData?y.yLbFormatter(null==(i=null==(s=h.rangeData.seriesRangeStart)?void 0:s[t])?void 0:i[e],{series:h.rangeData.seriesRangeStart,seriesIndex:t,dataPointIndex:e,w:h})+" - "+y.yLbFormatter(null==(o=null==(a=h.rangeData.seriesRangeEnd)?void 0:a[t])?void 0:o[e],{series:h.rangeData.seriesRangeEnd,seriesIndex:t,dataPointIndex:e,w:h}):y.yLbFormatter(h.seriesData.series[t][e],{series:h.seriesData.series,seriesIndex:t,dataPointIndex:e,w:h})};if(a)y=this.getFormatters(w),f=this.getSeriesName({fn:y.yLbTitleFormatter,index:w,seriesIndex:t,j:e}),b=h.globals.colors[w],c=s(w),g(w)&&(d=h.seriesData.seriesGoals[w][e].map(t=>({attrs:t,val:y.yLbFormatter(t.value,{seriesIndex:w,dataPointIndex:e,w:h})})));else{const i=null==(r=null==o?void 0:o.target)?void 0:r.getAttribute("fill");i&&(-1!==i.indexOf("url")?-1!==i.indexOf("Pattern")&&(b=h.dom.baseEl.querySelector(i.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke")):b=i),c=s(t),g(t)&&Array.isArray(h.seriesData.seriesGoals[t][e])&&(d=h.seriesData.seriesGoals[t][e].map(s=>({attrs:s,val:y.yLbFormatter(s.value,{seriesIndex:t,dataPointIndex:e,w:h})})))}}null===e&&(c=y.yLbFormatter(h.seriesData.series[t],l(n({},h),{seriesIndex:t,dataPointIndex:t}))),this.DOMHandling({i:t,t:w,j:e,ttItems:i,values:{val:c,goalVals:d,xVal:p,xAxisTTVal:u,zVal:x},seriesName:f,shared:a,pColor:b})}}getFormatters(t){const e=this.w;let s,i=e.formatters.yLabelFormatters[t];return void 0!==e.formatters.ttVal?Array.isArray(e.formatters.ttVal)?(i=e.formatters.ttVal[t]&&e.formatters.ttVal[t].formatter,s=e.formatters.ttVal[t]&&e.formatters.ttVal[t].title&&e.formatters.ttVal[t].title.formatter):(i=e.formatters.ttVal.formatter,"function"==typeof e.formatters.ttVal.title.formatter&&(s=e.formatters.ttVal.title.formatter)):s=e.config.tooltip.y.title.formatter,"function"!=typeof i&&(i=e.formatters.yLabelFormatters[0]?e.formatters.yLabelFormatters[0]:function(t){return t}),"function"!=typeof s&&(s=function(t){return t?t+": ":""}),{yLbFormatter:i,yLbTitleFormatter:s}}getSeriesName({fn:t,index:e,seriesIndex:s,j:i}){const a=this.w;return t(String(a.seriesData.seriesNames[e]),{series:a.seriesData.series,seriesIndex:s,dataPointIndex:i,w:a})}DOMHandling({t:t,j:e,ttItems:s,values:i,seriesName:a,shared:o,pColor:r}){const n=this.w,l=this.ttCtx,{val:h,goalVals:c,xVal:d,xAxisTTVal:g,zVal:p}=i;let x=null;x=s[t].children,n.config.tooltip.fillSeriesColor&&(s[t].style.backgroundColor=r,x[0].style.display="none"),l.showTooltipTitle&&(null===l.tooltipTitle&&(l.tooltipTitle=n.dom.baseEl.querySelector(".apexcharts-tooltip-title")),l.tooltipTitle&&(l.tooltipTitle.innerHTML=d)),l.isXAxisTooltipEnabled&&l.xaxisTooltipText&&(l.xaxisTooltipText.innerHTML=""!==g?g:d);const u=s[t].querySelector(".apexcharts-tooltip-text-y-label");u&&(u.innerHTML=a||"");const f=s[t].querySelector(".apexcharts-tooltip-text-y-value");f&&(f.innerHTML=void 0!==h?h:""),x[0]&&x[0].classList.contains("apexcharts-tooltip-marker")&&(n.config.tooltip.marker.fillColors&&Array.isArray(n.config.tooltip.marker.fillColors)&&(r=n.config.tooltip.marker.fillColors[t]),n.config.tooltip.fillSeriesColor?x[0].style.backgroundColor=r:x[0].style.color=r),n.config.tooltip.marker.show||(x[0].style.display="none");const b=s[t].querySelector(".apexcharts-tooltip-text-goals-label"),m=s[t].querySelector(".apexcharts-tooltip-text-goals-value");if(c.length&&n.seriesData.seriesGoals[t]){const s=()=>{let t="<div>",e="<div>";c.forEach(s=>{t+=` <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: ${s.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;"></span> ${s.attrs.name}</div>`,e+=`<div>${s.val}</div>`}),b.innerHTML=t+"</div>",m.innerHTML=e+"</div>"};o?n.seriesData.seriesGoals[t][e]&&Array.isArray(n.seriesData.seriesGoals[t][e])?s():(b.innerHTML="",m.innerHTML=""):s()}else b.innerHTML="",m.innerHTML="";if(null!==p){s[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=n.config.tooltip.z.title;s[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==p?p:""}if(o&&x[0]){if(n.config.tooltip.hideEmptySeries){const e=s[t].querySelector(".apexcharts-tooltip-marker"),i=s[t].querySelector(".apexcharts-tooltip-text");0==parseFloat(h)?(e.style.display="none",i.style.display="none"):(e.style.display="block",i.style.display="block")}null==h||n.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||n.globals.collapsedSeriesIndices.indexOf(t)>-1||Array.isArray(l.tConfig.enabledOnSeries)&&-1===l.tConfig.enabledOnSeries.indexOf(t)?x[0].parentNode.style.display="none":x[0].parentNode.style.display=n.config.tooltip.items.display}else Array.isArray(l.tConfig.enabledOnSeries)&&-1===l.tConfig.enabledOnSeries.indexOf(t)&&(x[0].parentNode.style.display="none")}toggleActiveInactiveSeries(t,e){const s=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");const t=s.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${e}`);if(t){const e=t;e.classList.add("apexcharts-active"),e.style.display=s.config.tooltip.items.display}}}getValuesToPrint({i:t,j:e}){var s,i,a,o,r,n,l,h;const c=this.w,d=c.seriesData.seriesX.map(t=>t.length>0?t:[]);let g="",p="",x=null,u=null;const f={series:c.seriesData.series,seriesIndex:t,dataPointIndex:e,w:c},b=c.formatters.ttZFormatter;if(null===e)u=c.seriesData.series[t];else if(c.axisFlags.isXNumeric&&"treemap"!==c.config.chart.type){if(g=d[t][e],0===d[t].length){g=d[this.tooltipUtil.getFirstActiveXArray(d)][e]}}else{g=new ft(this.w).isFormatXY()?void 0!==c.config.series[t].data[e]?c.config.series[t].data[e].x:"":void 0!==c.labelData.labels[e]?c.labelData.labels[e]:""}const m=g;if(c.axisFlags.isXNumeric&&"datetime"===c.config.xaxis.type){g=new w(this.w).xLabelFormat(c.formatters.ttKeyFormatter,m,m,{i:void 0,dateFormatter:new y(this.w).formatDate,w:this.w})}else g=c.globals.isBarHorizontal?c.formatters.yLabelFormatters[0](m,f):null!=(a=null==(i=(s=c.formatters).xLabelFormatter)?void 0:i.call(s,m,f))?a:m;return void 0!==c.config.tooltip.x.formatter&&(g=null!=(n=null==(r=(o=c.formatters).ttKeyFormatter)?void 0:r.call(o,m,f))?n:m),c.seriesData.seriesZ.length>0&&c.seriesData.seriesZ[t].length>0&&(x=null==b?void 0:b(c.seriesData.seriesZ[t][e],c)),p="function"==typeof c.config.xaxis.tooltip.formatter?null==(h=(l=c.formatters).xaxisTooltipFormatter)?void 0:h.call(l,m,f):g,{val:Array.isArray(u)?u.join(" "):u,xVal:Array.isArray(g)?g.join(" "):g,xAxisTTVal:Array.isArray(p)?p.join(" "):p,zVal:x}}handleCustomTooltip({i:t,j:e,y1:s,y2:i,w:a}){const o=this.ttCtx.getElTooltip();let r=a.config.tooltip.custom;Array.isArray(r)&&r[t]&&(r=r[t]);const n=r({series:a.seriesData.series,seriesIndex:t,dataPointIndex:e,y1:s,y2:i,w:a});o&&("string"==typeof n||"number"==typeof n?o.innerHTML=String(n):(n instanceof Element||"string"==typeof n.nodeName)&&(o.innerHTML="",o.appendChild(n.cloneNode(!0))))}}class wt{constructor(t){this.ttCtx=t,this.w=t.w}moveXCrosshairs(t,e=null){const s=this.ttCtx,i=this.w,a=s.getElXCrosshairs();let o=t-s.xcrosshairsWidth/2;const r=i.labelData.labels.slice().length;if(null!==e&&(o=i.layout.gridWidth/r*e),null===a||i.globals.isBarHorizontal||(a.setAttribute("x",String(o)),a.setAttribute("x1",String(o)),a.setAttribute("x2",String(o)),a.setAttribute("y2",String(i.layout.gridHeight)),a.classList.add("apexcharts-active")),o<0&&(o=0),o>i.layout.gridWidth&&(o=i.layout.gridWidth),s.isXAxisTooltipEnabled){let t=o;"tickWidth"!==i.config.xaxis.crosshairs.width&&"barWidth"!==i.config.xaxis.crosshairs.width||(t=o+s.xcrosshairsWidth/2),this.moveXAxisTooltip(t)}}moveYCrosshairs(t){const e=this.ttCtx;null!==e.ycrosshairs&&T.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&T.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}moveXAxisTooltip(t){var e,s;const i=this.w,a=this.ttCtx;if(null!==a.xaxisTooltip&&0!==a.xcrosshairsWidth){a.xaxisTooltip.classList.add("apexcharts-active");const o=a.xaxisOffY+i.config.xaxis.tooltip.offsetY+i.layout.translateY+1+i.config.xaxis.offsetY;if(t-=a.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(t)){t+=i.layout.translateX;const r=new T(this.w).getTextRects(null!=(s=null==(e=a.xaxisTooltipText)?void 0:e.innerHTML)?s:"",i.config.xaxis.labels.style.fontSize);a.xaxisTooltipText&&(a.xaxisTooltipText.style.minWidth=r.width+"px"),a.xaxisTooltip.style.left=t+"px",a.xaxisTooltip.style.top=o+"px"}}}moveYAxisTooltip(t){var e,s;const i=this.w,a=this.ttCtx;null===a.yaxisTTEls&&(a.yaxisTTEls=[...i.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);const o=parseInt(null!=(s=null==(e=a.ycrosshairsHidden)?void 0:e.getAttribute("y1"))?s:"0",10);let r=i.layout.translateY+o;if(a.yaxisTTEls){const e=a.yaxisTTEls[t].getBoundingClientRect(),s=e.height;let o=i.globals.translateYAxisX[t]-2;i.config.yaxis[t].opposite&&(o-=e.width),r-=s/2,-1===i.globals.ignoreYAxisIndexes.indexOf(t)&&r>0&&r<i.layout.gridHeight?(a.yaxisTTEls[t].classList.add("apexcharts-active"),a.yaxisTTEls[t].style.top=r+"px",a.yaxisTTEls[t].style.left=o+i.config.yaxis[t].tooltip.offsetX+"px"):a.yaxisTTEls[t].classList.remove("apexcharts-active")}}moveTooltip(t,e,s=null){const i=this.w,a=this.ttCtx,o=a.getElTooltip(),r=a.tooltipRect,n=null!==s?parseFloat(String(s)):1;let l=parseFloat(String(t))+n+5,h=parseFloat(String(e))+n/2;if(l>i.layout.gridWidth/2&&(l=l-r.ttWidth-n-10),l>i.layout.gridWidth-r.ttWidth-10&&(l=i.layout.gridWidth-r.ttWidth),l<-20&&(l=-20),i.config.tooltip.followCursor){const t=a.getElGrid();if(!t)return;const e=t.getBoundingClientRect();l=a.e.clientX-e.left,l>i.layout.gridWidth/2&&(l-=a.tooltipRect.ttWidth),h=a.e.clientY+i.layout.translateY-e.top,h>i.layout.gridHeight/2&&(h-=a.tooltipRect.ttHeight)}else i.globals.isBarHorizontal||r.ttHeight/2+h>i.layout.gridHeight&&(h=i.layout.gridHeight-r.ttHeight+i.layout.translateY);isNaN(l)||(l+=i.layout.translateX,o&&(o.style.left=l+"px",o.style.top=h+"px"))}moveMarkers(t,e){var s;const i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0){const o=i.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\:realIndex='${t}'] .apexcharts-marker`);for(let t=0;t<o.length;t++)parseInt(null!=(s=o[t].getAttribute("rel"))?s:"0",10)===e&&(a.marker.resetPointsSize(),a.marker.enlargeCurrentPoint(e,o[t]))}else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(e,t)}moveDynamicPointOnHover(t,e){var s,i,a,o,r;const n=this.w,l=this.ttCtx;let h=0,c=0;const d=new T(this.w),g=n.globals.pointsArray,p=l.tooltipUtil.getHoverMarkerSize(e),x=n.config.series[e].type;if(x&&("column"===x||"candlestick"===x||"boxPlot"===x))return;h=null==(i=null==(s=g[e])?void 0:s[t])?void 0:i[0],c=(null==(o=null==(a=g[e])?void 0:a[t])?void 0:o[1])||0;const u=n.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers path`);if(u&&c<n.layout.gridHeight&&c>0){const t=null!=(r=u.getAttribute("shape"))?r:"circle",e=d.getMarkerPath(h,c,t,1.5*p);u.setAttribute("d",e)}this.moveXCrosshairs(h),l.fixedTooltip||this.moveTooltip(h,c,p)}moveDynamicPointsOnHover(t){var e,s;const i=this.ttCtx,a=i.w;let o=0,r=0,n=0;const l=a.globals.pointsArray,h=new et(this.w),c=new T(this.w);n=h.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);const d=i.tooltipUtil.getHoverMarkerSize(n);if((null==(e=l[n])?void 0:e[t])&&(o=l[n][t][0],r=l[n][t][1]),isNaN(o))return;const g=i.tooltipUtil.getAllMarkers();if(g.length)for(let e=0;e<a.seriesData.series.length;e++){const i=l[e];if(a.globals.comboCharts&&void 0===i&&g.splice(e,0,null),i&&i.length){let i,r=l[e][t][1];g[e].setAttribute("cx",o);const n=null!=(s=g[e].getAttribute("shape"))?s:"circle";if("rangeArea"===a.config.chart.type&&!a.globals.comboCharts){const s=t+a.seriesData.series[e].length;i=l[e][s][1];r-=Math.abs(r-i)/2}if(null!==r&&!isNaN(r)&&r<a.layout.gridHeight+d&&r+d>0){const t=c.getMarkerPath(o,r,n,d);g[e].setAttribute("d",t)}else g[e].setAttribute("d","")}}this.moveXCrosshairs(o),i.fixedTooltip||this.moveTooltip(o,r||a.layout.gridHeight,d)}moveStickyTooltipOverBars(t,e){var s,i,a;const o=this.w,r=this.ttCtx;let n=o.globals.columnSeries?o.globals.columnSeries.length:o.seriesData.series.length;o.config.chart.stacked&&(n=o.globals.barGroups.length);let l=n>=2&&n%2==0?Math.floor(n/2):Math.floor(n/2)+1;if(o.globals.isBarHorizontal){l=new et(this.w).getActiveConfigSeriesIndex("desc")+1}let h=o.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[rel='${l}'] path[j='${t}'], .apexcharts-candlestick-series .apexcharts-series[rel='${l}'] path[j='${t}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${l}'] path[j='${t}'], .apexcharts-rangebar-series .apexcharts-series[rel='${l}'] path[j='${t}']`);h||"number"!=typeof e||(h=o.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],\n        .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],\n        .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],\n        .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}']`));let c=h?parseFloat(null!=(s=h.getAttribute("cx"))?s:"0"):0,d=h?parseFloat(null!=(i=h.getAttribute("cy"))?i:"0"):0;const g=h?parseFloat(null!=(a=h.getAttribute("barWidth"))?a:"0"):0,p=r.getElGrid();if(!p)return;const x=p.getBoundingClientRect(),u=h&&(h.classList.contains("apexcharts-candlestick-area")||h.classList.contains("apexcharts-boxPlot-area"));o.axisFlags.isXNumeric?(h&&!u&&(c-=n%2!=0?g/2:0),h&&u&&(c-=g/2)):o.globals.isBarHorizontal||(c=r.xAxisTicksPositions[t-1]+r.dataPointsDividedWidth/2,isNaN(c)&&(c=r.xAxisTicksPositions[t]-r.dataPointsDividedWidth/2)),o.globals.isBarHorizontal?d-=r.tooltipRect.ttHeight:o.config.tooltip.followCursor?d=r.e.clientY-x.top-r.tooltipRect.ttHeight/2:d+r.tooltipRect.ttHeight+15>o.layout.gridHeight&&(d=o.layout.gridHeight),o.globals.isBarHorizontal||this.moveXCrosshairs(c),r.fixedTooltip||this.moveTooltip(c,d||o.layout.gridHeight)}}class vt{constructor(t){this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=new wt(t)}drawDynamicPoints(){const t=this.w,e=new T(this.w),s=new N(this.w,this.ctx),i=[...t.dom.baseEl.querySelectorAll(".apexcharts-series")];t.config.chart.stacked&&i.sort((t,e)=>parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex")));for(let a=0;a<i.length;a++){const o=i[a].querySelector(".apexcharts-series-markers-wrap");if(null!==o){let i=`apexcharts-marker w${(Math.random()+1).toString(36).substring(4)}`;"line"!==t.config.chart.type&&"area"!==t.config.chart.type||t.globals.comboCharts||t.config.tooltip.intersect||(i+=" no-pointer-events");const a=s.getMarkerConfig({cssClass:i,seriesIndex:Number(o.getAttribute("data:realIndex"))}),r=e.drawMarker(0,0,a);r.node.setAttribute("default-marker-size",0);const n=b.createElementNS(z,"g");n.classList.add("apexcharts-series-markers"),n.appendChild(r.node),o.appendChild(n)}}}enlargeCurrentPoint(t,e,s=null,i=null){const a=this.w;"bubble"!==a.config.chart.type&&this.newPointSize(t,e);let o=e.getAttribute("cx"),r=e.getAttribute("cy");if(null!==s&&null!==i&&(o=s,r=i),this.tooltipPosition.moveXCrosshairs(o),!this.fixedTooltip){if("radar"===a.config.chart.type){const t=this.ttCtx.getElGrid();if(!t)return;const e=t.getBoundingClientRect();o=this.ttCtx.e.clientX-e.left}this.tooltipPosition.moveTooltip(o,r,a.config.markers.hover.size)}}enlargePoints(t){var e,s;const i=this.w,a=this,o=this.ttCtx,r=t,n=i.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");let l=i.config.markers.hover.size;for(let t=0;t<n.length;t++){const h=n[t].getAttribute("rel"),c=n[t].getAttribute("index");if(void 0===l&&(l=i.globals.markers.size[c]+i.config.markers.hover.sizeOffset),r===parseInt(null!=h?h:"0",10)){a.newPointSize(r,n[t]);const i=null!=(e=n[t].getAttribute("cx"))?e:"0",h=null!=(s=n[t].getAttribute("cy"))?s:"0";a.tooltipPosition.moveXCrosshairs(parseFloat(i)),o.fixedTooltip||a.tooltipPosition.moveTooltip(parseFloat(i),parseFloat(h),l)}else a.oldPointSize(n[t])}}newPointSize(t,e){const s=this.w;let i=s.config.markers.hover.size;const a=0===t?e.parentNode.firstChild:e.parentNode.lastChild;if("0"!==a.getAttribute("default-marker-size")){const t=parseInt(a.getAttribute("index"),10);void 0===i&&(i=s.globals.markers.size[t]+s.config.markers.hover.sizeOffset),i<0&&(i=0);const o=this.ttCtx.tooltipUtil.getPathFromPoint(e,i);e.setAttribute("d",o)}}oldPointSize(t){const e=parseFloat(t.getAttribute("default-marker-size")),s=this.ttCtx.tooltipUtil.getPathFromPoint(t,e);t.setAttribute("d",s)}resetPointsSize(){var t;const e=this.w.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");for(let s=0;s<e.length;s++){const i=parseFloat(null!=(t=e[s].getAttribute("default-marker-size"))?t:"0");if(m.isNumber(i)&&i>0){const t=this.ttCtx.tooltipUtil.getPathFromPoint(e[s],i);e[s].setAttribute("d",t)}else e[s].setAttribute("d","M0,0")}}}class At{constructor(t){this.w=t.w;const e=this.w;this.ttCtx=t,this.isVerticalGroupedRangeBar=!e.globals.isBarHorizontal&&"rangeBar"===e.config.chart.type&&e.config.plotOptions.bar.rangeBarGroupRows}getAttr(t,e){var s;return parseFloat(null!=(s=t.target.getAttribute(e))?s:"")}handleHeatTreeTooltip({e:t,opt:e,x:s,y:i,type:a}){var o,r;const n=this.ttCtx,l=this.w;if(t.target.classList.contains(`apexcharts-${a}-rect`)){const a=this.getAttr(t,"i"),h=this.getAttr(t,"j"),c=this.getAttr(t,"cx"),d=this.getAttr(t,"cy"),g=this.getAttr(t,"width"),p=this.getAttr(t,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:a,j:h,shared:!1,e:t}),l.interact.capturedSeriesIndex=a,l.interact.capturedDataPointIndex=h,s=c+n.tooltipRect.ttWidth/2+g,i=d+n.tooltipRect.ttHeight/2-p/2,n.tooltipPosition.moveXCrosshairs(c+g/2),s>l.layout.gridWidth/2&&(s=c-n.tooltipRect.ttWidth/2+g),n.w.config.tooltip.followCursor){const t=l.dom.elWrap.getBoundingClientRect();s=(null!=(o=l.interact.clientX)?o:0)-t.left-(s>l.layout.gridWidth/2?n.tooltipRect.ttWidth:0),i=(null!=(r=l.interact.clientY)?r:0)-t.top-(i>l.layout.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:s,y:i}}handleMarkerTooltip({e:t,opt:e,x:s,y:i}){const a=this.w,o=this.ttCtx;let r,n;if(t.target.classList.contains("apexcharts-marker")){const l=parseInt(e.paths.getAttribute("cx"),10),h=parseInt(e.paths.getAttribute("cy"),10),c=parseFloat(e.paths.getAttribute("val"));if(n=parseInt(e.paths.getAttribute("rel"),10),r=parseInt(e.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,o.intersect){const t=m.findAncestor(e.paths,"apexcharts-series");t&&(r=parseInt(t.getAttribute("data:realIndex"),10))}if(o.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:r,j:n,shared:!o.showOnIntersect&&a.config.tooltip.shared,e:t}),"mouseup"===t.type&&o.markerClick(t,r,n),a.interact.capturedSeriesIndex=r,a.interact.capturedDataPointIndex=n,s=l,i=h+a.layout.translateY-1.4*o.tooltipRect.ttHeight,o.w.config.tooltip.followCursor){const t=o.getElGrid();if(!t)return{x:s,y:i};const e=t.getBoundingClientRect();i=o.e.clientY+a.layout.translateY-e.top}c<0&&(i=h),o.marker.enlargeCurrentPoint(n,e.paths,s,i)}return{x:s,y:i}}handleBarTooltip({e:t,opt:e}){const s=this.w,i=this.ttCtx,a=i.getElTooltip();let o,r=0,n=0,l=0,h=0;const c=this.getBarTooltipXY({e:t,opt:e});if(null===c.j&&0===c.barHeight&&0===c.barWidth)return;h=c.i;const d=c.j;if(s.interact.capturedSeriesIndex=h,s.interact.capturedDataPointIndex=null!==d?d:s.interact.capturedDataPointIndex,s.globals.isBarHorizontal&&i.tooltipUtil.hasBars()||!s.config.tooltip.shared?(n=c.x,l=c.y,o=Array.isArray(s.config.stroke.width)?s.config.stroke.width[h]:s.config.stroke.width,r=n):s.globals.comboCharts||s.config.tooltip.shared||(r/=2),isNaN(l)&&(l=s.globals.svgHeight-i.tooltipRect.ttHeight),n+i.tooltipRect.ttWidth>s.layout.gridWidth?n-=i.tooltipRect.ttWidth:n<0&&(n=0),i.w.config.tooltip.followCursor){if(!i.getElGrid())return}null===i.tooltip&&(i.tooltip=s.dom.baseEl.querySelector(".apexcharts-tooltip")),s.config.tooltip.shared||(s.globals.comboBarCount>0?i.tooltipPosition.moveXCrosshairs(r+o/2):i.tooltipPosition.moveXCrosshairs(r)),!i.fixedTooltip&&(!s.config.tooltip.shared||s.globals.isBarHorizontal&&i.tooltipUtil.hasBars())&&(l=l+s.layout.translateY-i.tooltipRect.ttHeight/2,a&&(a.style.left=n+s.layout.translateX+"px",a.style.top=l+"px"))}getBarTooltipXY({e:t,opt:e}){const s=this.w;let i=null;const a=this.ttCtx;let o=0,r=0,n=0,l=0,h=0;const c=t.target.classList;if(c.contains("apexcharts-bar-area")||c.contains("apexcharts-candlestick-area")||c.contains("apexcharts-boxPlot-area")||c.contains("apexcharts-rangebar-area")){const c=t.target,d=c.getBoundingClientRect(),g=e.elGrid.getBoundingClientRect(),p=d.height;h=d.height;const x=d.width,u=parseInt(c.getAttribute("cx"),10),f=parseInt(c.getAttribute("cy"),10);l=parseFloat(c.getAttribute("barWidth"));const b="touchmove"===t.type?t.touches[0].clientX:t.clientX;i=parseInt(c.getAttribute("j"),10),o=parseInt(c.parentNode.getAttribute("rel"),10)-1;const m=c.getAttribute("data-range-y1"),y=c.getAttribute("data-range-y2");s.globals.comboCharts&&(o=parseInt(c.parentNode.getAttribute("data:realIndex"),10));const w=t=>s.axisFlags.isXNumeric?u-x/2:this.isVerticalGroupedRangeBar?u+x/2:u-a.dataPointsDividedWidth+x/2,v=()=>f-a.dataPointsDividedHeight+p/2-a.tooltipRect.ttHeight/2;a.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:o,j:i,y1:m?parseInt(m,10):null,y2:y?parseInt(y,10):null,shared:!a.showOnIntersect&&s.config.tooltip.shared,e:t}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(r=b-g.left+15,n=v()):(r=w(r),n=t.clientY-g.top-a.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?(r=u,a.xyRatios&&r<a.xyRatios.baseLineInvertedY&&(r=u-a.tooltipRect.ttWidth),n=v()):(r=w(r),n=f)}return{x:r,y:n,barHeight:h,barWidth:l,i:o,j:i}}}class Ct{constructor(t){this.w=t.w,this.ttCtx=t}drawXaxisTooltip(){const t=this.w,e=this.ttCtx,s="bottom"===t.config.xaxis.position;e.xaxisOffY=s?t.layout.gridHeight+1:-t.layout.xAxisHeight-t.config.xaxis.axisTicks.height+3;const i=s?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",a=t.dom.elWrap;if(e.isXAxisTooltipEnabled){null===t.dom.baseEl.querySelector(".apexcharts-xaxistooltip")&&(e.xaxisTooltip=b.createElementNS("http://www.w3.org/1999/xhtml","div"),e.xaxisTooltip.setAttribute("class",i+" apexcharts-theme-"+t.config.tooltip.theme),a.appendChild(e.xaxisTooltip),e.xaxisTooltipText=b.createElementNS("http://www.w3.org/1999/xhtml","div"),e.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),e.xaxisTooltipText.style.fontFamily=t.config.xaxis.tooltip.style.fontFamily||t.config.chart.fontFamily,e.xaxisTooltipText.style.fontSize=t.config.xaxis.tooltip.style.fontSize,e.xaxisTooltip.appendChild(e.xaxisTooltipText))}}drawYaxisTooltip(){const t=this.w,e=this.ttCtx;for(let s=0;s<t.config.yaxis.length;s++){const i=t.config.yaxis[s].opposite||t.config.yaxis[s].crosshairs.opposite;e.yaxisOffX=i?t.layout.gridWidth+1:1;const a=i?`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-right`:`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-left`,o=t.dom.elWrap;null===t.dom.baseEl.querySelector(`.apexcharts-yaxistooltip apexcharts-yaxistooltip-${s}`)&&(e.yaxisTooltip=b.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+t.config.tooltip.theme),o.appendChild(e.yaxisTooltip),0===s&&(e.yaxisTooltipText=[]),e.yaxisTooltipText[s]=b.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltipText[s].classList.add("apexcharts-yaxistooltip-text"),e.yaxisTooltip.appendChild(e.yaxisTooltipText[s]))}}setXCrosshairWidth(){var t,e;const s=this.w,i=this.ttCtx,a=i.getElXCrosshairs();if(i.xcrosshairsWidth=parseInt(s.config.xaxis.crosshairs.width,10),s.globals.comboCharts){const t=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==t&&"barWidth"===s.config.xaxis.crosshairs.width){const s=parseFloat(null!=(e=t.getAttribute("barWidth"))?e:"0");i.xcrosshairsWidth=s}else if("tickWidth"===s.config.xaxis.crosshairs.width){const t=s.labelData.labels.length;i.xcrosshairsWidth=s.layout.gridWidth/t}}else if("tickWidth"===s.config.xaxis.crosshairs.width){const t=s.labelData.labels.length;i.xcrosshairsWidth=s.layout.gridWidth/t}else if("barWidth"===s.config.xaxis.crosshairs.width){const e=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(null!==e){const s=parseFloat(null!=(t=e.getAttribute("barWidth"))?t:"0");i.xcrosshairsWidth=s}else i.xcrosshairsWidth=1}s.globals.isBarHorizontal&&(i.xcrosshairsWidth=0),null!==a&&i.xcrosshairsWidth>0&&a.setAttribute("width",String(i.xcrosshairsWidth))}handleYCrosshair(){const t=this.w,e=this.ttCtx;e.ycrosshairs=t.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}drawYaxisTooltipText(t,e,s){const i=this.ttCtx,a=this.w,o=a.globals,r=o.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&r.length>0){const n=a.formatters.yLabelFormatters[t],l=i.getElGrid();if(!l)return;const h=l.getBoundingClientRect(),c=r[0];let d=0;s.yRatio.length>1&&(d=c);const g=(e-h.top)*s.yRatio[d],p=o.maxYArr[c]-o.minYArr[c];let x=o.minYArr[c]+(p-g);a.config.yaxis[t].reversed&&(x=o.maxYArr[c]-(p-g)),i.tooltipPosition.moveYCrosshairs(e-h.top),i.yaxisTooltipText[t].innerHTML=n(x),i.tooltipPosition.moveYAxisTooltip(t)}}}class St{constructor(t,e){this.w=t,this.ctx=e,this.tConfig=t.config.tooltip,this.tooltipUtil=new mt(this),this.tooltipLabels=new yt(this),this.tooltipPosition=new wt(this),this.marker=new vt(this),this.intersect=new At(this),this.axesTooltip=new Ct(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.xaxisTooltipText=null,this.yaxisTooltip=null,this.yaxisTooltipText=null,this.yaxisTTEls=null,this.xaxisOffY=0,this.yaxisOffX=0,this.xcrosshairsWidth=0,this.ycrosshairs=null,this.ycrosshairsHidden=null,this.tooltip=null,this.e=null,this.isBarShared=!t.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now(),this.dimensionUpdateScheduled=!1,this.xyRatios=null,this.isXAxisTooltipEnabled=!1,this.yaxisTooltips=[],this.allTooltipSeriesGroups=[],this.xAxisTicksPositions=null,this.dataPointsDividedHeight=0,this.dataPointsDividedWidth=0,this.tooltipTitle=null,this.legendLabels=null,this.ttItems=null,this.seriesBound=null,this.seriesHoverTimeout=void 0,this.clientX=0,this.clientY=0,this.barSeriesHeight=0,this.tooltipRect={x:0,y:0,ttWidth:0,ttHeight:0}}setupDimensionCache(){const t=this.w,e=this.getElTooltip();e&&(this.updateDimensionCache(),"undefined"==typeof ResizeObserver||t.globals.resizeObserver||(t.globals.resizeObserver=new ResizeObserver(()=>{this.dimensionUpdateScheduled||(this.dimensionUpdateScheduled=!0,requestAnimationFrame(()=>{this.updateDimensionCache(),this.dimensionUpdateScheduled=!1}))}),t.globals.resizeObserver.observe(e)))}updateDimensionCache(){const t=this.w,e=this.getElTooltip();if(!e)return;const s=e.getBoundingClientRect();t.globals.dimensionCache.tooltip={width:s.width,height:s.height,lastUpdate:Date.now()}}getCachedDimensions(){const t=this.w;if(t.globals.dimensionCache.tooltip){const e=t.globals.dimensionCache.tooltip;if(Date.now()-e.lastUpdate<1e3)return{ttWidth:e.width,ttHeight:e.height}}this.updateDimensionCache();const e=t.globals.dimensionCache.tooltip;return e?{ttWidth:e.width,ttHeight:e.height}:{ttWidth:0,ttHeight:0}}getElTooltip(t){return t||(t=this),t.w.dom.baseEl?t.w.dom.baseEl.querySelector(".apexcharts-tooltip"):null}getElXCrosshairs(){return this.w.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}getElGrid(){return this.w.dom.baseEl.querySelector(".apexcharts-grid")}drawTooltip(t){const e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map(t=>!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);const s=b.createElementNS("http://www.w3.org/1999/xhtml","div");if(s.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&s.classList.add(e.config.tooltip.cssClass),s.classList.add(`apexcharts-theme-${this.tConfig.theme||"light"}`),e.config.chart.accessibility.enabled&&e.config.chart.accessibility.announcements.enabled&&(s.setAttribute("role","tooltip"),s.setAttribute("aria-live","polite"),s.setAttribute("aria-atomic","true"),s.setAttribute("aria-hidden","true")),e.dom.elWrap.appendChild(s),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();const t=new $(this.w,this.ctx,void 0);this.xAxisTicksPositions=t.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(),e.globals.collapsedSeries.length===e.seriesData.series.length)return;this.dataPointsDividedHeight=e.layout.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.layout.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=b.createElementNS("http://www.w3.org/1999/xhtml","div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,s.appendChild(this.tooltipTitle));let i=e.seriesData.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(i=this.showOnIntersect?1:e.seriesData.series.length),this.legendLabels=e.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(i),this.addSVGEvents(),this.setupDimensionCache()}createTTElements(t){const e=this.w,s=[],i=this.getElTooltip();if(!i)return s;for(let a=0;a<t;a++){const o=b.createElementNS("http://www.w3.org/1999/xhtml","div");o.classList.add("apexcharts-tooltip-series-group",`apexcharts-tooltip-series-group-${a}`),o.style.order=String(e.config.tooltip.inverseOrder?t-a:a+1);const r=b.createElementNS("http://www.w3.org/1999/xhtml","span");r.classList.add("apexcharts-tooltip-marker"),e.config.tooltip.fillSeriesColor?r.style.backgroundColor=e.globals.colors[a]:r.style.color=e.globals.colors[a];const n=e.config.markers.shape;let l=n;Array.isArray(n)&&(l=n[a]),r.setAttribute("shape",l),o.appendChild(r);const h=b.createElementNS("http://www.w3.org/1999/xhtml","div");h.classList.add("apexcharts-tooltip-text"),h.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,h.style.fontSize=this.tConfig.style.fontSize,["y","goals","z"].forEach(t=>{const e=b.createElementNS("http://www.w3.org/1999/xhtml","div");e.classList.add(`apexcharts-tooltip-${t}-group`);const s=b.createElementNS("http://www.w3.org/1999/xhtml","span");s.classList.add(`apexcharts-tooltip-text-${t}-label`),e.appendChild(s);const i=b.createElementNS("http://www.w3.org/1999/xhtml","span");i.classList.add(`apexcharts-tooltip-text-${t}-value`),e.appendChild(i),h.appendChild(e)}),o.appendChild(h),i.appendChild(o),s.push(o)}return s}addSVGEvents(){const t=this.w,e=t.config.chart.type,s=this.getElTooltip();if(!s)return;const i=!("bar"!==e&&"candlestick"!==e&&"boxPlot"!==e&&"rangeBar"!==e),a="area"===e||"line"===e||"scatter"===e||"bubble"===e||"radar"===e,o=t.dom.Paper.node,r=this.getElGrid();r&&(this.seriesBound=r.getBoundingClientRect());const n=[],l=[],h={hoverArea:o,elGrid:r,tooltipEl:s,tooltipY:n,tooltipX:l,ttItems:this.ttItems};let c;if(t.globals.axisCharts&&(a?c=t.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):i?c=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area"):"heatmap"!==e&&"treemap"!==e||(c=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),c&&c.length))for(let t=0;t<c.length;t++)n.push(c[t].getAttribute("cy")),l.push(c[t].getAttribute("cx"));if(t.globals.xyCharts&&!this.showOnIntersect||t.globals.comboCharts&&!this.showOnIntersect||i&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([o],h);else if(i&&!t.globals.comboCharts||a&&this.showOnIntersect)this.addDatapointEventsListeners(h);else if(!t.globals.axisCharts||"heatmap"===e||"treemap"===e){const e=t.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(e,h)}if(this.showOnIntersect){const e=t.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");e.length>0&&this.addPathsEventListeners(e,h),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(h)}}drawFixedTooltipRect(){const t=this.w,e=this.getElTooltip();if(!e)return{x:0,y:0,ttWidth:0,ttHeight:0};const s=e.getBoundingClientRect(),i=s.width+10,a=s.height+10;let o=this.tConfig.fixed.offsetX,r=this.tConfig.fixed.offsetY;const n=this.tConfig.fixed.position.toLowerCase();return n.indexOf("right")>-1&&(o=o+t.globals.svgWidth-i+10),n.indexOf("bottom")>-1&&(r=r+t.globals.svgHeight-a-10),e.style.left=o+"px",e.style.top=r+"px",{x:o,y:r,ttWidth:i,ttHeight:a}}addDatapointEventsListeners(t){const e=this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(e,t)}addPathsEventListeners(t,e){const s=this;for(let i=0;i<t.length;i++){const a={paths:t[i],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(e=>t[i].addEventListener(e,s.onSeriesHover.bind(s,a),{capture:!1,passive:!0}))}}onSeriesHover(t,e){const s=Date.now()-this.lastHoverTime;s>=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(t,e)},20-s))}seriesHover(t,e){this.lastHoverTime=Date.now();let s=[];const i=this.w;i.config.chart.group&&(s=this.ctx.getGroupedCharts()),i.globals.axisCharts&&(i.globals.minX===-1/0&&i.globals.maxX===1/0||0===i.globals.dataPoints)||(s.length?s.forEach(s=>{const i=this.getElTooltip(s),a={paths:t.paths,tooltipEl:i,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:s.w.globals.tooltip.ttItems};s.w.globals.minX===this.w.globals.minX&&s.w.globals.maxX===this.w.globals.maxX&&s.w.globals.tooltip.seriesHoverByContext({chartCtx:s,ttCtx:s.w.globals.tooltip,opt:a,e:e})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}seriesHoverByContext({chartCtx:t,ttCtx:e,opt:s,e:i}){const a=t.w;if(!this.getElTooltip(t))return;const o=e.getCachedDimensions();if(e.tooltipRect={x:0,y:0,ttWidth:o.ttWidth,ttHeight:o.ttHeight},e.e=i,e.tooltipUtil.hasBars()&&!a.globals.comboCharts&&!e.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries){new et(t.w).toggleSeriesOnHover(i,i.target.parentNode)}a.globals.axisCharts?e.axisChartsTooltips({e:i,opt:s,tooltipRect:e.tooltipRect}):e.nonAxisChartsTooltips({e:i,opt:s,tooltipRect:e.tooltipRect}),e.fixedTooltip&&e.drawFixedTooltipRect()}axisChartsTooltips({e:t,opt:e}){var s;const i=this.w;let a,o;const r=e.elGrid.getBoundingClientRect(),n="touchmove"===t.type?t.touches[0].clientX:t.clientX,l="touchmove"===t.type?t.touches[0].clientY:t.clientY;if(this.clientY=l,this.clientX=n,i.interact.capturedSeriesIndex=-1,i.interact.capturedDataPointIndex=-1,l<r.top||l>r.top+r.height)return void this.handleMouseOut(e);if(Array.isArray(this.tConfig.enabledOnSeries)&&!i.config.tooltip.shared){const t=parseInt(e.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(t)<0)return void this.handleMouseOut(e)}const h=this.getElTooltip();if(!h)return;const c=this.getElXCrosshairs();let d=[];i.config.chart.group&&(d=this.ctx.getSyncedCharts());const g=i.globals.xyCharts||"bar"===i.config.chart.type&&!i.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||i.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===t.type||"touchmove"===t.type||"mouseup"===t.type){if(i.globals.collapsedSeries.length+i.globals.ancillaryCollapsedSeries.length===i.seriesData.series.length)return;null!==c&&c.classList.add("apexcharts-active");const r=null==(s=this.yaxisTooltips)?void 0:s.filter(t=>!0===t),p=this.ycrosshairs;if(null!==p&&(null==r?void 0:r.length)&&p.classList.add("apexcharts-active"),g&&!this.showOnIntersect||d.length>1)this.handleStickyTooltip(t,n,l,e);else if("heatmap"===i.config.chart.type||"treemap"===i.config.chart.type){const s=this.intersect.handleHeatTreeTooltip({e:t,opt:e,x:a,y:o,type:i.config.chart.type});a=s.x,o=s.y,h.style.left=a+"px",h.style.top=o+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:t,opt:e}),this.tooltipUtil.hasMarkers(0)&&this.intersect.handleMarkerTooltip({e:t,opt:e,x:a,y:o});if(this.yaxisTooltips&&this.yaxisTooltips.length)for(let t=0;t<i.config.yaxis.length;t++)this.axesTooltip.drawYaxisTooltipText(t,l,this.xyRatios);i.dom.baseEl.classList.add("apexcharts-tooltip-active"),e.tooltipEl.classList.add("apexcharts-active"),i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&e.tooltipEl.removeAttribute("aria-hidden")}else"mouseout"!==t.type&&"touchend"!==t.type||this.handleMouseOut(e)}nonAxisChartsTooltips({e:t,opt:e,tooltipRect:s}){var i,a,o,r;const n=this.w,l=e.paths.getAttribute("rel"),h=this.getElTooltip();if(!h)return;const c=n.dom.elWrap.getBoundingClientRect();if("mousemove"===t.type||"touchmove"===t.type){let t,r;n.dom.baseEl.classList.add("apexcharts-tooltip-active"),h.classList.add("apexcharts-active"),n.config.chart.accessibility.enabled&&n.config.chart.accessibility.announcements.enabled&&h.removeAttribute("aria-hidden"),this.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:parseInt(l,10)-1,shared:!1});const d=e.paths.querySelector("path[data\\:cx]")||e.paths;if(n.config.tooltip.intersect&&d.hasAttribute("data:cx")&&d.hasAttribute("data:cy")){const e=n.dom.Paper.node.getBoundingClientRect();t=e.left-c.left+parseFloat(d.getAttribute("data:cx"))-s.ttWidth/2,r=e.top-c.top+parseFloat(d.getAttribute("data:cy"))-s.ttHeight-10}else t=(null!=(i=n.interact.clientX)?i:0)-c.left-s.ttWidth/2,r=(null!=(a=n.interact.clientY)?a:0)-c.top-s.ttHeight-10;if(h.style.left=t+"px",h.style.top=r+"px",n.config.legend.tooltipHoverFormatter){const t=n.config.legend.tooltipHoverFormatter,e=l-1,s=null==(o=this.legendLabels)?void 0:o[e];if(!s)return;const i=t(s.getAttribute("data:default-text"),{seriesIndex:e,dataPointIndex:e,w:n});s.innerHTML=i}}else"mouseout"!==t.type&&"touchend"!==t.type||(h.classList.remove("apexcharts-active"),n.dom.baseEl.classList.remove("apexcharts-tooltip-active"),n.config.legend.tooltipHoverFormatter&&(null==(r=this.legendLabels)||r.forEach(t=>{const e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(null!=e?e:"")})))}handleStickyTooltip(t,e,s,i){const a=this.w,o=this.tooltipUtil.getNearestValues({context:this,hoverArea:i.hoverArea,elGrid:i.elGrid,clientX:e,clientY:s}),r=o.j;let n=o.capturedSeries;null!==n&&a.globals.collapsedSeriesIndices.includes(null!=n?n:-1)&&(n=null);const l=i.elGrid.getBoundingClientRect();if(o.hoverX<0||o.hoverX>l.width)this.handleMouseOut(i);else if(null!==n)this.handleStickyCapturedSeries(t,null!=n?n:-1,i,null!=r?r:0);else if(this.tooltipUtil.isXoverlap(null!=r?r:0)||a.globals.isBarHorizontal){const e=a.seriesData.series.findIndex((t,e)=>!a.globals.collapsedSeriesIndices.includes(e));this.create(t,this,e,null!=r?r:0,i.ttItems)}}handleStickyCapturedSeries(t,e,s,i){const a=this.w;if(!this.tConfig.shared){if(null===a.seriesData.series[e][i])return void this.handleMouseOut(s)}if(void 0!==a.seriesData.series[e][i])this.tConfig.shared&&this.tooltipUtil.isXoverlap(i)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,i,s.ttItems):this.create(t,this,e,i,s.ttItems,!1);else if(this.tooltipUtil.isXoverlap(i)){const e=a.seriesData.series.findIndex((t,e)=>!a.globals.collapsedSeriesIndices.includes(e));this.create(t,this,e,i,s.ttItems)}}deactivateHoverFilter(){const t=this.w,e=new T(this.w,this.ctx),s=t.dom.Paper.find(".apexcharts-bar-area");for(let t=0;t<s.length;t++)e.pathMouseLeave(s[t],void 0)}handleMouseOut(t){var e,s;const i=this.w,a=this.getElXCrosshairs();i.dom.baseEl.classList.remove("apexcharts-tooltip-active"),t.tooltipEl.classList.remove("apexcharts-active"),i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&t.tooltipEl.setAttribute("aria-hidden","true"),this.deactivateHoverFilter(),"bubble"!==i.config.chart.type&&this.marker.resetPointsSize(),null!==a&&a.classList.remove("apexcharts-active");const o=this.ycrosshairs;if(null!==o&&o.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&(null==(e=this.xaxisTooltip)||e.classList.remove("apexcharts-active")),this.yaxisTooltips&&this.yaxisTooltips.length){null===this.yaxisTTEls&&(this.yaxisTTEls=[...i.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);for(let t=0;t<this.yaxisTTEls.length;t++)this.yaxisTTEls[t].classList.remove("apexcharts-active")}i.config.legend.tooltipHoverFormatter&&(null==(s=this.legendLabels)||s.forEach(t=>{const e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(null!=e?e:"")}))}markerClick(t,e,s){const i=this.w;"function"==typeof i.config.chart.events.markerClick&&i.config.chart.events.markerClick(t,this.ctx,{seriesIndex:e,dataPointIndex:s,w:i}),this.ctx.events.fireEvent("markerClick",[t,this.ctx,{seriesIndex:e,dataPointIndex:s,w:i}])}create(t,e,s,i,a,o=null){var r,h,c,d,g,p,x,u,f,b,m,y,w,v,A,C,S,k,D;const L=this.w,P=e;"mouseup"===t.type&&this.markerClick(t,s,i),null===o&&(o=this.tConfig.shared);const M=this.tooltipUtil.hasMarkers(s),I=this.tooltipUtil.getElBars(),E=()=>{L.globals.markers.largestSize>0?P.marker.enlargePoints(i):P.tooltipPosition.moveDynamicPointsOnHover(i)};if(L.config.legend.tooltipHoverFormatter){const t=L.config.legend.tooltipHoverFormatter,e=Array.from(null!=(r=this.legendLabels)?r:[]);e.forEach(t=>{const e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(null!=e?e:"")});for(let a=0;a<e.length;a++){const r=e[a],n=parseInt(null!=(h=r.getAttribute("i"))?h:"",10),l=decodeURIComponent(null!=(c=r.getAttribute("data:default-text"))?c:""),d=t(l,{seriesIndex:o?n:s,dataPointIndex:i,w:L});if(o)r.innerHTML=L.globals.collapsedSeriesIndices.indexOf(n)<0?d:l;else if(r.innerHTML=n===s?d:l,s===n)break}}const F=L.rangeData,X=n(n({ttItems:a,i:s,j:i},void 0!==(null==(x=null==(p=null==(g=null==(d=F.seriesRange)?void 0:d[s])?void 0:g[i])?void 0:p.y[0])?void 0:x.y1)&&{y1:null==(m=null==(b=null==(f=null==(u=F.seriesRange)?void 0:u[s])?void 0:f[i])?void 0:b.y[0])?void 0:m.y1}),void 0!==(null==(A=null==(v=null==(w=null==(y=F.seriesRange)?void 0:y[s])?void 0:w[i])?void 0:v.y[0])?void 0:A.y2)&&{y2:null==(D=null==(k=null==(S=null==(C=F.seriesRange)?void 0:C[s])?void 0:S[i])?void 0:k.y[0])?void 0:D.y2});if(o){if(P.tooltipLabels.drawSeriesTexts(l(n({},X),{shared:!this.showOnIntersect&&this.tConfig.shared})),M)E();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight([...I]),this.barSeriesHeight>0)){const t=new T(this.w,this.ctx),e=L.dom.Paper.find(`.apexcharts-bar-area[j='${i}']`);this.deactivateHoverFilter();P.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&E(),P.tooltipPosition.moveStickyTooltipOverBars(i,s);for(let s=0;s<e.length;s++)t.pathMouseEnter(e[s],void 0)}}else P.tooltipLabels.drawSeriesTexts(n({shared:!1},X)),this.tooltipUtil.hasBars()&&P.tooltipPosition.moveStickyTooltipOverBars(i,s),M&&P.tooltipPosition.moveMarkers(s,i)}}class kt{constructor(t){this.node=t,t&&(t.instance=this),this._listeners=[],this._filter=null}attr(t,e){if("string"==typeof t&&void 0===e)return this.node.getAttribute(t);const s="string"==typeof t?{[t]:e}:t;for(const t in s){let e=s[t];null===e?this.node.removeAttribute(t):void 0!==e&&("number"==typeof e&&isNaN(e)&&(e=0),this.node.setAttribute(t,e))}if("text"===this.node.nodeName&&null!=s.x){const t=this.node.querySelectorAll("tspan[data-newline]");for(let e=0;e<t.length;e++)t[e].setAttribute("x",s.x)}return this}css(t){for(const e in t)this.node.style[e]=t[e];return this}fill(t){return"object"==typeof t?this.attr(t):this.attr("fill",t)}stroke(t){return"object"==typeof t?(void 0!==t.color&&this.attr("stroke",t.color),void 0!==t.width&&this.attr("stroke-width",t.width),void 0!==t.dasharray&&this.attr("stroke-dasharray",t.dasharray),void 0!==t.linecap&&this.attr("stroke-linecap",t.linecap),void 0!==t.opacity&&this.attr("stroke-opacity",t.opacity),this):this.attr("stroke",t)}size(t,e){return this.attr({width:t,height:e})}move(t,e){return this.attr({x:t,y:e})}center(t,e){if("g"===this.node.nodeName){const s=this.bbox(),i=t-(s.x+s.width/2),a=e-(s.y+s.height/2);return this.attr("transform",`translate(${i}, ${a})`)}return this.attr({cx:t,cy:e})}add(t){return this.node.appendChild(t.node||t),this}addTo(t){return(t.node||t).appendChild(this.node),this}remove(){return this.node.parentNode&&this.node.parentNode.removeChild(this.node),this}clear(){for(;this.node.firstChild;)this.node.removeChild(this.node.firstChild);return this}find(t){return Array.from(this.node.querySelectorAll(t)).map(t=>t.instance||new kt(t))}findOne(t){const e=this.node.querySelector(t);return e?e.instance||new kt(e):null}on(t,e){const s=t.split(".")[0];return this._listeners.push({event:t,eventType:s,handler:e}),this.node.addEventListener(s,e),this}off(t,e){if(t||e)if(t&&!e){const e=t.split(".")[0];this._listeners=this._listeners.filter(t=>t.eventType!==e||(this.node.removeEventListener(t.eventType,t.handler),!1))}else{const s=t.split(".")[0];this._listeners=this._listeners.filter(t=>t.eventType!==s||t.handler!==e||(this.node.removeEventListener(t.eventType,t.handler),!1))}else this._listeners.forEach(t=>{this.node.removeEventListener(t.eventType,t.handler)}),this._listeners=[];return this}each(t,e){return Array.from(this.node.children).forEach(s=>{const i=s.instance||new kt(s);t.call(i),e&&i.each(t,e)}),this}removeClass(t){return"*"===t?this.node.removeAttribute("class"):this.node.classList.remove(t),this}children(){return Array.from(this.node.childNodes).filter(t=>1===t.nodeType).map(t=>t.instance||new kt(t))}hide(){return this.node.style.display="none",this}show(){return this.node.style.display="",this}bbox(){if("function"==typeof this.node.getBBox)try{return this.node.getBBox()}catch(t){}return{x:0,y:0,width:0,height:0}}tspan(t){const e=b.createElementNS("http://www.w3.org/2000/svg","tspan");return e.textContent=t,this.node.appendChild(e),new kt(e)}plot(t){return"string"==typeof t&&this.attr("d",t),this}animate(){throw new Error("Animation module not loaded")}filterWith(){throw new Error("Filter module not loaded")}unfilter(t){return this._filter&&(this.node.removeAttribute("filter"),t&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),this._filter=null),this}filterer(){return this._filter}}let Dt=0;class Lt extends kt{constructor(t,e,s){const i="radial"===e?"radialGradient":"linearGradient";super(b.createElementNS(z,i)),this._id="SvgjsGradient"+ ++Dt,this.attr("id",this._id),"function"==typeof s&&s(new Pt(this));let a=t.node.querySelector("defs");a||(a=b.createElementNS(z,"defs"),t.node.appendChild(a)),a.appendChild(this.node)}stop(t,e,s){const i=b.createElementNS(z,"stop");return i.setAttribute("offset",t),i.setAttribute("stop-color",e),void 0!==s&&i.setAttribute("stop-opacity",String(s)),this.node.appendChild(i),this}from(t,e){return this.attr({x1:t,y1:e})}to(t,e){return this.attr({x2:t,y2:e})}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}}class Pt{constructor(t){this.gradient=t}stop(t,e,s){return this.gradient.stop(t,e,s),this}}let Mt=0;class It extends kt{constructor(t,e,s,i){if(super(b.createElementNS(z,"pattern")),this._id="SvgjsPattern"+ ++Mt,this.attr({id:this._id,width:e,height:s,patternUnits:"userSpaceOnUse"}),"function"==typeof i){i(new Et(this.node))}let a=t.node.querySelector("defs");a||(a=b.createElementNS(z,"defs"),t.node.appendChild(a)),a.appendChild(this.node)}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}}class Et extends kt{line(t,e,s,i){const a=this._make("line");return void 0!==t&&a.attr({x1:t,y1:e,x2:s,y2:i}),a}rect(t,e){const s=this._make("rect");return void 0!==t&&s.attr({width:t,height:e}),s}circle(t){const e=this._make("circle");return void 0!==t&&e.attr({r:t/2,cx:t/2,cy:t/2}),e}path(t){const e=this._make("path");return t&&e.attr("d",t),e}polygon(t){const e=this._make("polygon");return t&&e.attr("points",t),e}group(){return this._makeContainer("g")}defs(){return this._makeContainer("defs")}plain(t){const e=b.createElementNS(z,"text");e.textContent=t;const s=new kt(e);return this.node.appendChild(e),s}text(t){const e=b.createElementNS(z,"text"),s=new kt(e);return this.node.appendChild(e),"function"==typeof t&&t(new Ft(e)),s}image(t,e){const s=b.createElementNS(z,"image");s.setAttributeNS("http://www.w3.org/1999/xlink","href",t);const i=new kt(s);if(this.node.appendChild(s),"function"==typeof e){const s=new Image;s.onload=function(){i.size(s.width,s.height),e.call(i,{width:s.width,height:s.height})},s.src=t}return i}gradient(t,e){return new Lt(this,t,e)}pattern(t,e,s){return new It(this,t,e,s)}_make(t){const e=b.createElementNS(z,t);return this.node.appendChild(e),new kt(e)}_makeContainer(t){const e=b.createElementNS(z,t);return this.node.appendChild(e),new Et(e)}}class Ft{constructor(t){this.textNode=t}tspan(t){const e=b.createElementNS(z,"tspan");return e.textContent=t,this.textNode.appendChild(e),new Xt(e,this.textNode)}}class Xt{constructor(t,e){this.node=t,this.textNode=e}newLine(){return this.node.setAttribute("dy","1.1em"),this.node.dataset.newline="1",this}}let Tt=0;class zt extends kt{constructor(){super(b.createElementNS(z,"filter")),this._id="SvgjsFilter"+ ++Tt,this.attr("id",this._id)}size(t,e,s,i){return this.attr({width:t,height:e,x:s,y:i})}}class Rt{constructor(t){this.filter=t}colorMatrix(t){return this._primitive("feColorMatrix",t)}offset(t){return this._primitive("feOffset",t)}gaussianBlur(t){return this._primitive("feGaussianBlur",t)}flood(t){return this._primitive("feFlood",t)}composite(t){return this._primitive("feComposite",t)}merge(t){const e=b.createElementNS(z,"feMerge");return t.forEach(t=>{const s=b.createElementNS(z,"feMergeNode");s.setAttribute("in",t),e.appendChild(s)}),this.filter.node.appendChild(e),new kt(e)}_primitive(t,e){const s=b.createElementNS(z,t);for(const t in e)s.setAttribute(t,e[t]);return this.filter.node.appendChild(s),new kt(s)}}function Yt(t){if(!t||"string"!=typeof t)return[["M",0,0]];const e=[],s=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,i=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;let a;const o=[],r=[];for(;null!==(a=s.exec(t));)o.push(a[1]),r.push(a.index);for(let s=0;s<o.length;s++){const a=r[s]+o[s].length,n=s+1<r.length?r[s+1]:t.length,l=t.substring(a,n),h=[];let c;for(i.lastIndex=0;null!==(c=i.exec(l));)h.push(parseFloat(c[0]));const d=o[s].toUpperCase();if("Z"===d)e.push(["Z"]);else if("M"===d||"L"===d||"T"===d)for(let t=0;t<h.length;t+=2)e.push([d,h[t],h[t+1]]);else if("H"===d)for(let t=0;t<h.length;t++)e.push([d,h[t]]);else if("V"===d)for(let t=0;t<h.length;t++)e.push([d,h[t]]);else if("C"===d)for(let t=0;t<h.length;t+=6)e.push([d,h[t],h[t+1],h[t+2],h[t+3],h[t+4],h[t+5]]);else if("S"===d||"Q"===d)for(let t=0;t<h.length;t+=4)e.push([d,h[t],h[t+1],h[t+2],h[t+3]]);else if("A"===d)for(let t=0;t<h.length;t+=7)e.push([d,h[t],h[t+1],h[t+2],h[t+3],h[t+4],h[t+5],h[t+6]])}return 0===e.length&&e.push(["M",0,0]),e}function Bt(t){let e=1/0,s=1/0,i=-1/0,a=-1/0;return t.forEach(t=>{for(let o=1;o<t.length;o+=2)if(o+1<=t.length){const r=t[o],n=t[o+1];"number"==typeof r&&"number"==typeof n&&(r<e&&(e=r),r>i&&(i=r),n<s&&(s=n),n>a&&(a=n))}}),e===1/0?{x:0,y:0,width:0,height:0}:{x:e,y:s,width:i-e,height:a-s}}function Ht(t){switch(t[0]){case"z":case"Z":t[0]="L",t[1]=this.start[0],t[2]=this.start[1];break;case"H":t[0]="L",t[2]=this.pos[1];break;case"V":t[0]="L",t[2]=t[1],t[1]=this.pos[0];break;case"T":t[0]="Q",t[3]=t[1],t[4]=t[2],t[1]=this.reflection[1],t[2]=this.reflection[0];break;case"S":t[0]="C",t[6]=t[4],t[5]=t[3],t[4]=t[2],t[3]=t[1],t[2]=this.reflection[1],t[1]=this.reflection[0]}return t}function Nt(t){var e=t.length;return this.pos=[t[e-2],t[e-1]],-1!="SCQT".indexOf(t[0])&&(this.reflection=[2*this.pos[0]-t[e-4],2*this.pos[1]-t[e-3]]),t}function Ot(t){var e,s=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],s;case"L":t[5]=t[3]=t[1],t[6]=t[4]=t[2],t[1]=this.pos[0],t[2]=this.pos[1];break;case"Q":t[6]=t[4],t[5]=t[3],t[4]=1*t[4]/3+2*t[2]/3,t[3]=1*t[3]/3+2*t[1]/3,t[2]=1*this.pos[1]/3+2*t[2]/3,t[1]=1*this.pos[0]/3+2*t[1]/3;break;case"A":s=function(t,e){var s,i,a,o,r,n,l,h,c,d,g,p,x,u,f,b,m,y,w,v,A,C,S,k,D,L,P=Math.abs(e[1]),M=Math.abs(e[2]),I=e[3]%360,E=e[4],F=e[5],X=e[6],T=e[7],z=new R(t[0],t[1]),B=new R(X,T),H=[];if(0===P||0===M||z.x===B.x&&z.y===B.y)return[["C",z.x,z.y,B.x,B.y,B.x,B.y]];s=new R((z.x-B.x)/2,(z.y-B.y)/2).transform(new Y(0,0,0,0,0,0).rotate(I)),(i=s.x*s.x/(P*P)+s.y*s.y/(M*M))>1&&(P*=i=Math.sqrt(i),M*=i);a=new Y(0,0,0,0,0,0).rotate(I).scale(1/P,1/M).rotate(-I),z=z.transform(a),B=B.transform(a),o=[B.x-z.x,B.y-z.y],n=o[0]*o[0]+o[1]*o[1],r=Math.sqrt(n),o[0]/=r,o[1]/=r,l=n<4?Math.sqrt(1-n/4):0,E===F&&(l*=-1);h=new R((B.x+z.x)/2+l*-o[1],(B.y+z.y)/2+l*o[0]),c=new R(z.x-h.x,z.y-h.y),d=new R(B.x-h.x,B.y-h.y),g=Math.acos(c.x/Math.sqrt(c.x*c.x+c.y*c.y)),c.y<0&&(g*=-1);p=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(p*=-1);F&&g>p&&(p+=2*Math.PI);!F&&g<p&&(p-=2*Math.PI);for(u=Math.ceil(2*Math.abs(g-p)/Math.PI),b=[],m=g,x=(p-g)/u,f=4*Math.tan(x/4)/3,A=0;A<=u;A++)w=Math.cos(m),y=Math.sin(m),v=new R(h.x+w,h.y+y),b[A]=[new R(v.x+f*y,v.y-f*w),v,new R(v.x-f*y,v.y+f*w)],m+=x;for(b[0][0]=b[0][1].clone(),b[b.length-1][2]=b[b.length-1][1].clone(),a=new Y(0,0,0,0,0,0).rotate(I).scale(P,M).rotate(-I),A=0,C=b.length;A<C;A++)b[A][0]=b[A][0].transform(a),b[A][1]=b[A][1].transform(a),b[A][2]=b[A][2].transform(a);for(A=1,C=b.length;A<C;A++)S=(v=b[A-1][2]).x,k=v.y,D=(v=b[A][0]).x,L=v.y,X=(v=b[A][1]).x,T=v.y,H.push(["C",S,k,D,L,X,T]);return H}(null!=(e=this.pos)?e:[],t),t=s[0]}return t[0]="C",this.pos=[t[5],t[6]],this.reflection=[2*t[5]-t[3],2*t[6]-t[4]],s}function Wt(t,e){if(!1===e)return!1;for(var s=e,i=t.length;s<i;++s)if("M"==t[s][0])return s;return!1}function _t(t,e,s,i,a,o){for(var r=t.slice(e,s||void 0),n=i.slice(a,o||void 0),l=0,h={pos:[0,0],start:[0,0]},c={pos:[0,0],start:[0,0]};r[l]=Ht.call(h,r[l]),n[l]=Ht.call(c,n[l]),r[l][0]!=n[l][0]||"M"==r[l][0]||"A"==r[l][0]&&(r[l][4]!=n[l][4]||r[l][5]!=n[l][5])?(Array.prototype.splice.apply(r,[l,1].concat(Ot.call(h,r[l]))),Array.prototype.splice.apply(n,[l,1].concat(Ot.call(c,n[l])))):(r[l]=Nt.call(h,r[l]),n[l]=Nt.call(c,n[l])),++l!=r.length||l!=n.length;)l==r.length&&r.push(["C",h.pos[0],h.pos[1],h.pos[0],h.pos[1],h.pos[0],h.pos[1]]),l==n.length&&n.push(["C",c.pos[0],c.pos[1],c.pos[0],c.pos[1],c.pos[0],c.pos[1]]);return{start:r,dest:n}}function Gt(t,e){var s=function(t,e){for(var s,i=Yt(t),a=Yt(e),o=0,r=0,n=!1,l=!1;!1!==o||!1!==r;){if(n=Wt(i,!1!==o&&o+1),l=Wt(a,!1!==r&&r+1),!1===o){const t=Bt(s.start);o=0==t.height||0==t.width?i.push(i[0])-1:i.push(["M",t.x+t.width/2,t.y+t.height/2])-1}if(!1===r){const t=Bt(s.dest);r=0==t.height||0==t.width?a.push(a[0])-1:a.push(["M",t.x+t.width/2,t.y+t.height/2])-1}s=_t(i,o,n,a,r,l),i=i.slice(0,o).concat(s.start,!1===n?[]:i.slice(n)),a=a.slice(0,r).concat(s.dest,!1===l?[]:a.slice(l)),o=!1!==n&&o+s.start.length,r=!1!==l&&r+s.dest.length}return{start:i,dest:a}}(t,e),i=s.start,a=s.dest;return function(t){var e=i.map(function(e,s){return a[s].map(function(i,o){return 0===o?i:e[o]+(a[s][o]-e[o])*t})});return e.map(t=>t.join(" ")).join(" ")}}function $t(t){if(!t||"string"!=typeof t)return null;if("#"===t[0]){let e=t.slice(1);3===e.length&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const s=parseInt(e,16);return[s>>16&255,s>>8&255,255&s,1]}const e=t.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return e?[+e[1],+e[2],+e[3],void 0!==e[4]?+e[4]:1]:null}function jt(t,e,s){return`rgba(${Math.round(t[0]+(e[0]-t[0])*s)},${Math.round(t[1]+(e[1]-t[1])*s)},${Math.round(t[2]+(e[2]-t[2])*s)},${t[3]+(e[3]-t[3])*s})`}class Vt{constructor(t,e,s){this.el=t,this.duration=null!=e?e:300,this.delay=s||0,this._attrTarget=null,this._plotTarget=null,this._afterCb=null,this._duringCb=null,this._next=null,this._root=null,this._scheduled=!1}attr(t){return this._attrTarget=t,this._schedule(),this}plot(t){return this._plotTarget=t,this._schedule(),this}after(t){return this._afterCb=t,this._schedule(),this}during(t){return this._duringCb=t,this._schedule(),this}animate(t,e){const s=new Vt(this.el,t,e);return this._next=s,s._root=this._root||this,s}_schedule(){const t=this._root||this;t._scheduled||(t._scheduled=!0,queueMicrotask(()=>t._executeChain()))}_executeChain(){const t=[];let e=this;for(;e;)t.push(e),e=e._next;let s=0;t.forEach(t=>{s+=t.delay,t._execute(s),s+=t.duration})}_execute(t){const e=this.el,s=this.duration;if(s<=1){const s=()=>{this._attrTarget&&e.attr(this._attrTarget),this._plotTarget&&e.plot(this._plotTarget),this._afterCb&&this._afterCb.call(e)};return void(t>0?setTimeout(s,t):s())}const i=()=>{const t={},i={},a={};if(this._attrTarget)for(const s of Object.keys(this._attrTarget)){const o=e.attr(s);t[s]=o;const r=$t(o),n=$t(String(this._attrTarget[s]));r&&n&&(i[s]=r,a[s]=n)}let o=null;if(this._plotTarget){const t=e.attr("d")||"";try{o=Gt(t,this._plotTarget)}catch(t){o=null}}const r=performance.now(),n=l=>{const h=l-r,c=Math.min(h/s,1),d=(g=c,-Math.cos(g*Math.PI)/2+.5);var g;if(this._attrTarget)if(c>=1)e.attr(this._attrTarget);else{const s={};for(const e of Object.keys(this._attrTarget))if(i[e]&&a[e])s[e]=jt(i[e],a[e],d);else{const i=parseFloat(t[e]),a=parseFloat(this._attrTarget[e]);isNaN(i)||isNaN(a)||(s[e]=i+(a-i)*d)}e.attr(s)}o&&c<1&&e.attr("d",o(d)),this._duringCb&&this._duringCb(d),c<1?b.requestAnimationFrame(n):(this._plotTarget&&e.attr("d",this._plotTarget),this._afterCb&&this._afterCb.call(e))};b.requestAnimationFrame(n)};t>0?setTimeout(i,t):i()}}var Ut;function qt(){const t=b.createElementNS(z,"svg"),e=new Et(t);return e.attr({xmlns:z}),e}(Ut=kt).prototype.filterWith=function(t){const e=new zt;this._filter=e;let s=this.node;for(;s&&"svg"!==s.nodeName;)s=s.parentNode;if(s){let t=s.querySelector("defs");t||(t=b.createElementNS(z,"defs"),s.insertBefore(t,s.firstChild)),t.appendChild(e.node)}return t(new Rt(e)),this.attr("filter","url(#"+e._id+")"),this},Ut.prototype.unfilter=function(t){return this._filter&&(this.node.removeAttribute("filter"),t&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),this._filter=null),this},Ut.prototype.filterer=function(){return this._filter},function(t){t.prototype.animate=function(t,e){return new Vt(this,t,e)}}(kt),function(t){t.prototype.draggable=function(t){if(!1===t)return this._dragCleanup&&(this._dragCleanup(),this._dragCleanup=null),this;const e=this,s=t||{},i=t=>{if(t.button&&0!==t.button)return;t.stopPropagation();const i="touchstart"===t.type?t.touches[0]:t,a=e.node,o=parseFloat(a.getAttribute("x"))||0,r=parseFloat(a.getAttribute("y"))||0,n=i.clientX,l=i.clientY,h=a.ownerSVGElement;let d=null;h&&(d=h.getScreenCTM());const g=t=>{const e="touchmove"===t.type?t.touches[0]:t;let i=e.clientX-n,h=e.clientY-l;d&&(i/=d.a,h/=d.d);let c=o+i,g=r+h;const p=parseFloat(a.getAttribute("width"))||0,x=parseFloat(a.getAttribute("height"))||0;void 0!==s.minX&&c<s.minX&&(c=s.minX),void 0!==s.minY&&g<s.minY&&(g=s.minY),void 0!==s.maxX&&c+p>s.maxX&&(c=s.maxX-p),void 0!==s.maxY&&g+x>s.maxY&&(g=s.maxY-x);const u=new CustomEvent("dragmove",{detail:{handler:{move:function(t,e){a.setAttribute("x",t),a.setAttribute("y",e)}},box:{x:c,y:g,w:p,h:x,x2:c+p,y2:g+x}}});a.dispatchEvent(u)},p=()=>{c.isBrowser()&&(document.removeEventListener("mousemove",g),document.removeEventListener("touchmove",g),document.removeEventListener("mouseup",p),document.removeEventListener("touchend",p))};c.isBrowser()&&(document.addEventListener("mousemove",g),document.addEventListener("touchmove",g),document.addEventListener("mouseup",p),document.addEventListener("touchend",p))};return e.node.addEventListener("mousedown",i),e.node.addEventListener("touchstart",i),e._dragCleanup=()=>{e.node.removeEventListener("mousedown",i),e.node.removeEventListener("touchstart",i)},e}}(kt),function(t){t.prototype.select=function(t){if(!1===t)return this._selectCleanup&&(this._selectCleanup(),this._selectCleanup=null),this;const e=this,{createHandle:s,updateHandle:i}=t,a=document.createElementNS(z,"g");a.setAttribute("class","svg_select_points");const o=e.node.parentNode;o&&o.appendChild(a);const r={},n=["t","b","l","r","lt","rt","lb","rb"];n.forEach((t,e)=>{const i=new Et(document.createElementNS(z,"g"));a.appendChild(i.node);const o=s(i,[0,0],e,[],t);r[t]={group:i,handle:o}});const l=()=>{const t=parseFloat(e.attr("x"))||0,s=parseFloat(e.attr("y"))||0,o=parseFloat(e.attr("width"))||0,l=parseFloat(e.attr("height"))||0,h=e.node.getAttribute("transform");h?a.setAttribute("transform",h):a.removeAttribute("transform");const c={t:[t+o/2,s],b:[t+o/2,s+l],l:[t,s+l/2],r:[t+o,s+l/2],lt:[t,s],rt:[t+o,s],lb:[t,s+l],rb:[t+o,s+l]};n.forEach(t=>{r[t]&&c[t]&&i(r[t].group,c[t])})};return l(),e._selectHandles=a,e._selectHandlesMap=r,e._updateSelectPositions=l,e._selectCleanup=()=>{a.parentNode&&a.parentNode.removeChild(a),e._selectHandles=null,e._selectHandlesMap=null,e._updateSelectPositions=null},e},t.prototype.resize=function(t){if(!1===t)return this._resizeCleanup&&(this._resizeCleanup(),this._resizeCleanup=null),this;const e=this,s=e._selectHandlesMap;if(!s)return e;const i=[],a=t=>{const a=s[t];if(!a||!a.group||!a.group.node)return;const o=a.group.node,r=s=>{if(s.button&&0!==s.button)return;s.stopPropagation();const i=("touchstart"===s.type?s.touches[0]:s).clientX,a=e.node.ownerSVGElement;let o=null;a&&(o=a.getScreenCTM());const r=parseFloat(e.attr("x"))||0,n=parseFloat(e.attr("width"))||0,l=s=>{let a=("touchmove"===s.type?s.touches[0]:s).clientX-i;o&&(a/=o.a);let l=r,h=n;"l"===t?(l=r+a,h=n-a):"r"===t&&(h=n+a),h<0&&(h=0),e.attr({x:l,width:h}),e._updateSelectPositions&&e._updateSelectPositions();const c=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(c)},h=()=>{c.isBrowser()&&(document.removeEventListener("mousemove",l),document.removeEventListener("touchmove",l),document.removeEventListener("mouseup",h),document.removeEventListener("touchend",h));const t=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(t)};c.isBrowser()&&(document.addEventListener("mousemove",l),document.addEventListener("touchmove",l),document.addEventListener("mouseup",h),document.addEventListener("touchend",h))};o.addEventListener("mousedown",r),o.addEventListener("touchstart",r),i.push(()=>{o.removeEventListener("mousedown",r),o.removeEventListener("touchstart",r)})};return a("l"),a("r"),e._resizeCleanup=()=>{i.forEach(t=>t())},e}}(kt),qt.xlink="http://www.w3.org/1999/xlink",c.isBrowser()&&void 0===window.SVG&&(window.SVG=qt),c.isBrowser()?(void 0===window.SVG&&(window.SVG=qt),void 0===window.Apex&&(window.Apex={})):"undefined"!=typeof global&&(void 0===global.Apex&&(global.Apex={}),void 0===global.SVG&&(global.SVG=qt));const Zt=class t{static registerFeatures(e){for(const[s,i]of Object.entries(e))t._featureRegistry.set(s,i)}constructor(t){this.ctx=t,this.w=t.w}initModules(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend","keydown","keyup"],this.ctx.animations=new F(this.w,this.ctx),this.ctx.axes=new J(this.w,this.ctx),this.ctx.core=new ut(this.ctx.el,this.w,this.ctx),this.ctx.config=new D({}),this.ctx.data=new ft(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY()}),this.ctx.grid=new j(this.w,this.ctx),this.ctx.graphics=new T(this.w,this.ctx),this.ctx.coreUtils=new E(this.w),this.ctx.crosshairs=new Q(this.w),this.ctx.events=new Z(this.w,this.ctx),this.ctx.fill=new H(this.w),this.ctx.localization=new K(this.w),this.ctx.options=new k,this.ctx.responsive=new tt(this.w),this.ctx.series=new et(this.w,{toggleDataSeries:(...t)=>{var e;return null==(e=this.ctx.legend)?void 0:e.legendHelpers.toggleDataSeries(...t)},revertDefaultAxisMinMax:()=>this.ctx.updateHelpers.revertDefaultAxisMinMax(),updateSeries:(...t)=>this.ctx.updateHelpers._updateSeries(...t)}),this.ctx.theme=new st(this.w),this.ctx.formatters=new w(this.w),this.ctx.titleSubtitle=new it(this.w),this.ctx.dimensions=new lt(this.w,this.ctx),this.ctx.updateHelpers=new bt(this.w,this.ctx);const t=new St(this.w,this.ctx);this.w.globals.tooltip=t,Object.defineProperty(this.ctx,"tooltip",{get(){return this.w.globals.tooltip},configurable:!0}),this._initOptionalModules()}_initOptionalModules(){const e=t._featureRegistry,s=this.w,i=this.ctx,a=e.get("exports");i.exports=a?new a(s,i):null;const o=e.get("legend");i.legend=o?new o(s,i):null;const r=e.get("toolbar");Object.defineProperty(i,"toolbar",{get(){var t;return!this._toolbar&&r&&(this._toolbar=new r(s,this)),null!=(t=this._toolbar)?t:null},configurable:!0});const n=e.get("zoomPanSelection");Object.defineProperty(i,"zoomPanSelection",{get(){var t;return!this._zoomPanSelection&&n&&(this._zoomPanSelection=new n(s,this)),null!=(t=this._zoomPanSelection)?t:null},configurable:!0});const l=e.get("keyboardNavigation");Object.defineProperty(i,"keyboardNavigation",{get(){var t;return!this._keyboardNavigation&&l&&(this._keyboardNavigation=new l(s,this)),null!=(t=this._keyboardNavigation)?t:null},configurable:!0})}};h(Zt,"_featureRegistry",new Map);let Kt=Zt;class Jt{constructor(t){this.ctx=t,this.w=t.w}clear({isUpdating:t}){this.ctx._zoomPanSelection&&this.ctx._zoomPanSelection.destroy(),this.ctx._toolbar&&this.ctx._toolbar.destroy(),this.w.globals.resizeObserver&&"function"==typeof this.w.globals.resizeObserver.disconnect&&(this.w.globals.resizeObserver.disconnect(),this.w.globals.resizeObserver=null),_.invalidateAll(this.w),t?(this.ctx._zoomPanSelection=null,this.ctx._toolbar=null,this.ctx._keyboardNavigation=null):(this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx._zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx._toolbar=null,this.ctx.localization=null,this.ctx._keyboardNavigation=null,this.ctx.w.globals.tooltip=null),this.clearDomElements({isUpdating:t})}killSVG(t){t.each(function(){this.removeClass("*"),this.off()},!0),t.clear()}clearDomElements({isUpdating:t}){const e=this.w.dom;if(c.isBrowser()){const s=e.Paper.node;s.parentNode&&s.parentNode.parentNode&&!t&&(s.parentNode.parentNode.style.minHeight="unset");const i=e.baseEl;if(i&&this.ctx.eventList.forEach(t=>{i.removeEventListener(t,this.ctx.events.documentEvent)}),null!==this.ctx.el)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(e.Paper),e.Paper.remove()}e.elWrap=null,e.elGraphical=null,e.elLegendWrap=null,e.elLegendForeign=null,e.baseEl=null,e.elGridRect=null,e.elGridRectMask=null,e.elGridRectBarMask=null,e.elGridRectMarkerMask=null,e.elForecastMask=null,e.elNonForecastMask=null,e.elDefs=null}}const Qt=new WeakMap;class te{constructor(t,e){h(this,"core"),h(this,"responsive"),h(this,"axes"),h(this,"grid"),h(this,"graphics"),h(this,"coreUtils"),h(this,"crosshairs"),h(this,"events"),h(this,"fill"),h(this,"localization"),h(this,"options"),h(this,"series"),h(this,"theme"),h(this,"formatters"),h(this,"titleSubtitle"),h(this,"dimensions"),h(this,"updateHelpers"),h(this,"tooltip"),h(this,"data"),h(this,"animations"),h(this,"exports"),h(this,"legend"),h(this,"toolbar"),h(this,"zoomPanSelection"),h(this,"keyboardNavigation"),h(this,"annotations"),h(this,"timeScale"),h(this,"_keyboardNavigation"),h(this,"windowResizeHandler"),h(this,"parentResizeHandler"),h(this,"publicMethods",[]),h(this,"eventList",[]),h(this,"config"),this.opts=e,this.ctx=this,this.w=new I(e).init(),this.el=t,this.w.globals.cuid=m.randomId(),this.w.globals.chartID=this.w.config.chart.id?m.escapeString(this.w.config.chart.id):this.w.globals.cuid;new Kt(this).initModules(),this.lastUpdateOptions=null,this.create=this.create.bind(this),c.isBrowser()&&(this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this))}render(){var t,e;return(null==(e=null==(t=this.w)?void 0:t.config)?void 0:e.chart)?new Promise((t,e)=>{var s;if(m.elementExists(this.el)){void 0===Apex._chartInstances&&(Apex._chartInstances=[]),this.w.config.chart.id&&Apex._chartInstances.push({id:this.w.globals.chartID,group:this.w.config.chart.group,chart:this}),this.setLocale(this.w.config.chart.defaultLocale);const i=this.w.config.chart.events.beforeMount;if("function"==typeof i&&i(this,this.w),this.events.fireEvent("beforeMount",[this,this.w]),c.isBrowser()){window.addEventListener("resize",this.windowResizeHandler),function(t,e){if(c.isSSR())return;let s=!1;if(t.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){const e=t.getBoundingClientRect();"none"!==t.style.display&&0!==e.width||(s=!0)}const i=new ResizeObserver(i=>{s&&e.call(t,i),s=!0});t.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(t.children).forEach(t=>i.observe(t)):i.observe(t),Qt.set(e,i)}(this.el.parentNode,this.parentResizeHandler);const t=this.el.getRootNode&&this.el.getRootNode(),e=m.is("ShadowRoot",t),i=this.el.ownerDocument;let a=e?t.getElementById("apexcharts-css"):i.getElementById("apexcharts-css");if(!a){a=b.createElementNS("http://www.w3.org/1999/xhtml","style"),a.id="apexcharts-css",a.textContent='@keyframes opaque {\n  0% {\n    opacity: 0\n  }\n\n  to {\n    opacity: 1\n  }\n}\n\n@keyframes resizeanim {\n\n  0%,\n  to {\n    opacity: 0\n  }\n}\n\n.apexcharts-canvas {\n  position: relative;\n  direction: ltr !important;\n  user-select: none\n}\n\n.apexcharts-canvas ::-webkit-scrollbar {\n  -webkit-appearance: none;\n  width: 6px\n}\n\n.apexcharts-canvas ::-webkit-scrollbar-thumb {\n  border-radius: 4px;\n  background-color: rgba(0, 0, 0, .5);\n  box-shadow: 0 0 1px rgba(255, 255, 255, .5);\n  -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)\n}\n\n.apexcharts-inner {\n  position: relative\n}\n\n.apexcharts-text tspan {\n  font-family: inherit\n}\n\nrect.legend-mouseover-inactive,\n.legend-mouseover-inactive rect,\n.legend-mouseover-inactive path,\n.legend-mouseover-inactive circle,\n.legend-mouseover-inactive line,\n.legend-mouseover-inactive text.apexcharts-yaxis-title-text,\n.legend-mouseover-inactive text.apexcharts-yaxis-label {\n  transition: .15s ease all;\n  opacity: .2\n}\n\n.apexcharts-legend-text {\n  padding-left: 15px;\n  margin-left: -15px;\n}\n\n.apexcharts-legend-series[role="button"]:focus {\n  outline: 2px solid #008FFB;\n  outline-offset: 2px;\n}\n\n.apexcharts-legend-series[role="button"]:focus:not(:focus-visible) {\n  outline: none;\n}\n\n.apexcharts-legend-series[role="button"]:focus-visible {\n  outline: 2px solid #008FFB;\n  outline-offset: 2px;\n}\n\n.apexcharts-series-collapsed {\n  opacity: 0\n}\n\n/* Keyboard navigation focus indicator on SVG data elements.\n   SVG elements don\'t support CSS outline, so we use stroke. */\n.apexcharts-bar-area.apexcharts-keyboard-focused,\n.apexcharts-candlestick-area.apexcharts-keyboard-focused,\n.apexcharts-boxPlot-area.apexcharts-keyboard-focused,\n.apexcharts-rangebar-area.apexcharts-keyboard-focused,\n.apexcharts-pie-area.apexcharts-keyboard-focused,\n.apexcharts-heatmap-rect.apexcharts-keyboard-focused,\n.apexcharts-treemap-rect.apexcharts-keyboard-focused {\n  stroke: #008FFB;\n  stroke-width: 2;\n  stroke-opacity: 1;\n}\n\n.apexcharts-tooltip {\n  border-radius: 5px;\n  box-shadow: 2px 2px 6px -4px #999;\n  cursor: default;\n  font-size: 14px;\n  left: 62px;\n  opacity: 0;\n  pointer-events: none;\n  position: absolute;\n  top: 20px;\n  display: flex;\n  flex-direction: column;\n  overflow: hidden;\n  white-space: nowrap;\n  z-index: 12;\n  transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-active {\n  opacity: 1;\n  transition: .15s ease all\n}\n\n.apexcharts-tooltip.apexcharts-theme-light {\n  border: 1px solid #e3e3e3;\n  background: rgba(255, 255, 255, .96)\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark {\n  color: #fff;\n  background: rgba(30, 30, 30, .8)\n}\n\n.apexcharts-tooltip * {\n  font-family: inherit\n}\n\n.apexcharts-tooltip-title {\n  padding: 6px;\n  font-size: 15px;\n  margin-bottom: 4px\n}\n\n.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {\n  background: #eceff1;\n  border-bottom: 1px solid #ddd\n}\n\n.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {\n  background: rgba(0, 0, 0, .7);\n  border-bottom: 1px solid #333\n}\n\n.apexcharts-tooltip-text-goals-value,\n.apexcharts-tooltip-text-y-value,\n.apexcharts-tooltip-text-z-value {\n  display: inline-block;\n  margin-left: 5px;\n  font-weight: 600\n}\n\n.apexcharts-tooltip-text-goals-label:empty,\n.apexcharts-tooltip-text-goals-value:empty,\n.apexcharts-tooltip-text-y-label:empty,\n.apexcharts-tooltip-text-y-value:empty,\n.apexcharts-tooltip-text-z-value:empty,\n.apexcharts-tooltip-title:empty {\n  display: none\n}\n\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n  padding: 6px 0 5px\n}\n\n.apexcharts-tooltip-goals-group,\n.apexcharts-tooltip-text-goals-label,\n.apexcharts-tooltip-text-goals-value {\n  display: flex\n}\n\n.apexcharts-tooltip-text-goals-label:not(:empty),\n.apexcharts-tooltip-text-goals-value:not(:empty) {\n  margin-top: -6px\n}\n\n.apexcharts-tooltip-marker {\n  display: inline-block;\n  position: relative;\n  width: 16px;\n  height: 16px;\n  font-size: 16px;\n  line-height: 16px;\n  margin-right: 4px;\n  text-align: center;\n  vertical-align: middle;\n  color: inherit;\n}\n\n.apexcharts-tooltip-marker::before {\n  content: "";\n  display: inline-block;\n  width: 100%;\n  text-align: center;\n  color: currentcolor;\n  text-rendering: optimizeLegibility;\n  -webkit-font-smoothing: antialiased;\n  font-size: 26px;\n  font-family: Arial, Helvetica, sans-serif;\n  line-height: 14px;\n  font-weight: 900;\n}\n\n.apexcharts-tooltip-marker[shape="circle"]::before {\n  content: "\\25CF";\n}\n\n.apexcharts-tooltip-marker[shape="square"]::before,\n.apexcharts-tooltip-marker[shape="rect"]::before {\n  content: "\\25A0";\n  transform: translate(-1px, -2px);\n}\n\n.apexcharts-tooltip-marker[shape="line"]::before {\n  content: "\\2500";\n}\n\n.apexcharts-tooltip-marker[shape="diamond"]::before {\n  content: "\\25C6";\n  font-size: 28px;\n}\n\n.apexcharts-tooltip-marker[shape="triangle"]::before {\n  content: "\\25B2";\n  font-size: 22px;\n}\n\n.apexcharts-tooltip-marker[shape="cross"]::before {\n  content: "\\2715";\n  font-size: 18px;\n}\n\n.apexcharts-tooltip-marker[shape="plus"]::before {\n  content: "\\2715";\n  transform: rotate(45deg) translate(-1px, -1px);\n  font-size: 18px;\n}\n\n.apexcharts-tooltip-marker[shape="star"]::before {\n  content: "\\2605";\n  font-size: 18px;\n}\n\n.apexcharts-tooltip-marker[shape="sparkle"]::before {\n  content: "\\2726";\n  font-size: 20px;\n}\n\n.apexcharts-tooltip-series-group {\n  padding: 0 10px;\n  display: none;\n  text-align: left;\n  justify-content: left;\n  align-items: center\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {\n  opacity: 1\n}\n\n.apexcharts-tooltip-series-group.apexcharts-active,\n.apexcharts-tooltip-series-group:last-child {\n  padding-bottom: 4px\n}\n\n.apexcharts-tooltip-y-group {\n  padding: 6px 0 5px\n}\n\n.apexcharts-custom-tooltip,\n.apexcharts-tooltip-box {\n  padding: 4px 8px\n}\n\n.apexcharts-tooltip-boxPlot {\n  display: flex;\n  flex-direction: column-reverse\n}\n\n.apexcharts-tooltip-box>div {\n  margin: 4px 0\n}\n\n.apexcharts-tooltip-box span.value {\n  font-weight: 700\n}\n\n.apexcharts-tooltip-rangebar {\n  padding: 5px 8px\n}\n\n.apexcharts-tooltip-rangebar .category {\n  font-weight: 600;\n  color: #777\n}\n\n.apexcharts-tooltip-rangebar .series-name {\n  font-weight: 700;\n  display: block;\n  margin-bottom: 5px\n}\n\n.apexcharts-xaxistooltip,\n.apexcharts-yaxistooltip {\n  opacity: 0;\n  pointer-events: none;\n  color: #373d3f;\n  font-size: 13px;\n  text-align: center;\n  border-radius: 2px;\n  position: absolute;\n  z-index: 10;\n  background: #eceff1;\n  border: 1px solid #90a4ae\n}\n\n.apexcharts-xaxistooltip {\n  padding: 9px 10px;\n  transition: .15s ease all\n}\n\n.apexcharts-xaxistooltip.apexcharts-theme-dark {\n  background: rgba(0, 0, 0, .7);\n  border: 1px solid rgba(0, 0, 0, .5);\n  color: #fff\n}\n\n.apexcharts-xaxistooltip:after,\n.apexcharts-xaxistooltip:before {\n  left: 50%;\n  border: solid transparent;\n  content: " ";\n  height: 0;\n  width: 0;\n  position: absolute;\n  pointer-events: none\n}\n\n.apexcharts-xaxistooltip:after {\n  border-color: transparent;\n  border-width: 6px;\n  margin-left: -6px\n}\n\n.apexcharts-xaxistooltip:before {\n  border-color: transparent;\n  border-width: 7px;\n  margin-left: -7px\n}\n\n.apexcharts-xaxistooltip-bottom:after,\n.apexcharts-xaxistooltip-bottom:before {\n  bottom: 100%\n}\n\n.apexcharts-xaxistooltip-top:after,\n.apexcharts-xaxistooltip-top:before {\n  top: 100%\n}\n\n.apexcharts-xaxistooltip-bottom:after {\n  border-bottom-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-bottom:before {\n  border-bottom-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {\n  border-bottom-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip-top:after {\n  border-top-color: #eceff1\n}\n\n.apexcharts-xaxistooltip-top:before {\n  border-top-color: #90a4ae\n}\n\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,\n.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {\n  border-top-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-xaxistooltip.apexcharts-active {\n  opacity: 1;\n  transition: .15s ease all\n}\n\n.apexcharts-yaxistooltip {\n  padding: 4px 10px\n}\n\n.apexcharts-yaxistooltip.apexcharts-theme-dark {\n  background: rgba(0, 0, 0, .7);\n  border: 1px solid rgba(0, 0, 0, .5);\n  color: #fff\n}\n\n.apexcharts-yaxistooltip:after,\n.apexcharts-yaxistooltip:before {\n  top: 50%;\n  border: solid transparent;\n  content: " ";\n  height: 0;\n  width: 0;\n  position: absolute;\n  pointer-events: none\n}\n\n.apexcharts-yaxistooltip:after {\n  border-color: transparent;\n  border-width: 6px;\n  margin-top: -6px\n}\n\n.apexcharts-yaxistooltip:before {\n  border-color: transparent;\n  border-width: 7px;\n  margin-top: -7px\n}\n\n.apexcharts-yaxistooltip-left:after,\n.apexcharts-yaxistooltip-left:before {\n  left: 100%\n}\n\n.apexcharts-yaxistooltip-right:after,\n.apexcharts-yaxistooltip-right:before {\n  right: 100%\n}\n\n.apexcharts-yaxistooltip-left:after {\n  border-left-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-left:before {\n  border-left-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {\n  border-left-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip-right:after {\n  border-right-color: #eceff1\n}\n\n.apexcharts-yaxistooltip-right:before {\n  border-right-color: #90a4ae\n}\n\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,\n.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {\n  border-right-color: rgba(0, 0, 0, .5)\n}\n\n.apexcharts-yaxistooltip.apexcharts-active {\n  opacity: 1\n}\n\n.apexcharts-yaxistooltip-hidden {\n  display: none\n}\n\n.apexcharts-xcrosshairs,\n.apexcharts-ycrosshairs {\n  pointer-events: none;\n  opacity: 0;\n  transition: .15s ease all\n}\n\n.apexcharts-xcrosshairs.apexcharts-active,\n.apexcharts-ycrosshairs.apexcharts-active {\n  opacity: 1;\n  transition: .15s ease all\n}\n\n.apexcharts-ycrosshairs-hidden {\n  opacity: 0\n}\n\n.apexcharts-selection-rect {\n  cursor: move\n}\n\n.svg_select_shape {\n  stroke-width: 1;\n  stroke-dasharray: 10 10;\n  stroke: black;\n  stroke-opacity: 0.1;\n  pointer-events: none;\n  fill: none;\n}\n\n.svg_select_handle {\n  stroke-width: 3;\n  stroke: black;\n  fill: none;\n}\n\n.svg_select_handle_r {\n  cursor: e-resize;\n}\n\n.svg_select_handle_l {\n  cursor: w-resize;\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-zoom {\n  cursor: crosshair\n}\n\n.apexcharts-svg.apexcharts-zoomable.hovering-pan {\n  cursor: move\n}\n\n.apexcharts-menu-icon,\n.apexcharts-pan-icon,\n.apexcharts-reset-icon,\n.apexcharts-selection-icon,\n.apexcharts-toolbar-custom-icon,\n.apexcharts-zoom-icon,\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n  cursor: pointer;\n  width: 20px;\n  height: 20px;\n  line-height: 24px;\n  color: #6e8192;\n  text-align: center\n}\n\n.apexcharts-menu-icon svg,\n.apexcharts-reset-icon svg,\n.apexcharts-zoom-icon svg,\n.apexcharts-zoomin-icon svg,\n.apexcharts-zoomout-icon svg {\n  fill: #6e8192\n}\n\n.apexcharts-selection-icon svg {\n  fill: #444;\n  transform: scale(.76)\n}\n\n.apexcharts-theme-dark .apexcharts-menu-icon svg,\n.apexcharts-theme-dark .apexcharts-pan-icon svg,\n.apexcharts-theme-dark .apexcharts-reset-icon svg,\n.apexcharts-theme-dark .apexcharts-selection-icon svg,\n.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoom-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomin-icon svg,\n.apexcharts-theme-dark .apexcharts-zoomout-icon svg {\n  fill: #f3f4f5\n}\n\n.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,\n.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {\n  fill: #008ffb\n}\n\n.apexcharts-theme-light .apexcharts-menu-icon:hover svg,\n.apexcharts-theme-light .apexcharts-reset-icon:hover svg,\n.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,\n.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,\n.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {\n  fill: #333\n}\n\n.apexcharts-menu-icon,\n.apexcharts-selection-icon {\n  position: relative\n}\n\n.apexcharts-reset-icon {\n  margin-left: 5px\n}\n\n.apexcharts-menu-icon,\n.apexcharts-reset-icon,\n.apexcharts-zoom-icon {\n  transform: scale(.85)\n}\n\n.apexcharts-zoomin-icon,\n.apexcharts-zoomout-icon {\n  transform: scale(.7)\n}\n\n.apexcharts-zoomout-icon {\n  margin-right: 3px\n}\n\n.apexcharts-pan-icon {\n  transform: scale(.62);\n  position: relative;\n  left: 1px;\n  top: 0\n}\n\n.apexcharts-pan-icon svg {\n  fill: #fff;\n  stroke: #6e8192;\n  stroke-width: 2\n}\n\n.apexcharts-pan-icon.apexcharts-selected svg {\n  stroke: #008ffb\n}\n\n.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {\n  stroke: #333\n}\n\n.apexcharts-toolbar {\n  position: absolute;\n  z-index: 11;\n  max-width: 176px;\n  text-align: right;\n  border-radius: 3px;\n  padding: 0 6px 2px;\n  display: flex;\n  justify-content: space-between;\n  align-items: center\n}\n\n.apexcharts-menu {\n  background: #fff;\n  position: absolute;\n  top: 100%;\n  border: 1px solid #ddd;\n  border-radius: 3px;\n  padding: 3px;\n  right: 10px;\n  opacity: 0;\n  min-width: 110px;\n  transition: .15s ease all;\n  pointer-events: none\n}\n\n.apexcharts-menu.apexcharts-menu-open {\n  opacity: 1;\n  pointer-events: all;\n  transition: .15s ease all\n}\n\n.apexcharts-menu-item {\n  padding: 6px 7px;\n  font-size: 12px;\n  cursor: pointer\n}\n\n.apexcharts-theme-light .apexcharts-menu-item:hover {\n  background: #eee\n}\n\n.apexcharts-theme-dark .apexcharts-menu {\n  background: rgba(0, 0, 0, .7);\n  color: #fff\n}\n\n@media screen and (min-width:768px) {\n  .apexcharts-canvas:hover .apexcharts-toolbar {\n    opacity: 1\n  }\n}\n\n/* Toolbar keyboard accessibility: show toolbar when any button inside it is focused */\n.apexcharts-toolbar:focus-within {\n  opacity: 1\n}\n\n/* Focus indicator for toolbar icon buttons */\n.apexcharts-menu-icon:focus-visible,\n.apexcharts-pan-icon:focus-visible,\n.apexcharts-reset-icon:focus-visible,\n.apexcharts-selection-icon:focus-visible,\n.apexcharts-toolbar-custom-icon:focus-visible,\n.apexcharts-zoom-icon:focus-visible,\n.apexcharts-zoomin-icon:focus-visible,\n.apexcharts-zoomout-icon:focus-visible {\n  outline: 2px solid #008FFB;\n  outline-offset: 2px;\n  border-radius: 2px\n}\n\n/* Focus indicator for hamburger menu items */\n.apexcharts-menu-item:focus-visible {\n  outline: 2px solid #008FFB;\n  outline-offset: -2px;\n  background: #eee\n}\n\n.apexcharts-canvas .apexcharts-element-hidden,\n.apexcharts-datalabel.apexcharts-element-hidden,\n.apexcharts-hide .apexcharts-series-points {\n  opacity: 0;\n}\n\n.apexcharts-hidden-element-shown {\n  opacity: 1;\n  transition: 0.25s ease all;\n}\n\n.apexcharts-datalabel,\n.apexcharts-datalabel-label,\n.apexcharts-datalabel-value,\n.apexcharts-datalabels,\n.apexcharts-pie-label {\n  cursor: default;\n  pointer-events: none\n}\n\n.apexcharts-pie-label-delay {\n  opacity: 0;\n  animation-name: opaque;\n  animation-duration: .3s;\n  animation-fill-mode: forwards;\n  animation-timing-function: ease\n}\n\n.apexcharts-radialbar-label {\n  cursor: pointer;\n}\n\n.apexcharts-annotation-rect,\n.apexcharts-area-series .apexcharts-area,\n.apexcharts-gridline,\n.apexcharts-line,\n.apexcharts-point-annotation-label,\n.apexcharts-radar-series path:not(.apexcharts-marker),\n.apexcharts-radar-series polygon,\n.apexcharts-toolbar svg,\n.apexcharts-tooltip .apexcharts-marker,\n.apexcharts-xaxis-annotation-label,\n.apexcharts-yaxis-annotation-label,\n.apexcharts-zoom-rect,\n.no-pointer-events {\n  pointer-events: none\n}\n\n.apexcharts-tooltip-active .apexcharts-marker {\n  transition: .15s ease all\n}\n\n.apexcharts-radar-series .apexcharts-yaxis {\n  pointer-events: none;\n}\n\n.resize-triggers {\n  animation: 1ms resizeanim;\n  visibility: hidden;\n  opacity: 0;\n  height: 100%;\n  width: 100%;\n  overflow: hidden\n}\n\n.contract-trigger:before,\n.resize-triggers,\n.resize-triggers>div {\n  content: " ";\n  display: block;\n  position: absolute;\n  top: 0;\n  left: 0\n}\n\n.resize-triggers>div {\n  height: 100%;\n  width: 100%;\n  background: #eee;\n  overflow: auto\n}\n\n.contract-trigger:before {\n  overflow: hidden;\n  width: 200%;\n  height: 200%\n}\n\n.apexcharts-bar-goals-markers {\n  pointer-events: none\n}\n\n.apexcharts-bar-shadows {\n  pointer-events: none\n}\n\n.apexcharts-rangebar-goals-markers {\n  pointer-events: none\n}\n\n.apexcharts-disable-transitions * {\n  transition: none !important;\n}';const o=(null==(s=this.opts.chart)?void 0:s.nonce)||this.w.config.chart.nonce;o&&a.setAttribute("nonce",o),e?t.prepend(a):!1!==this.w.config.chart.injectStyleSheet&&i.head.appendChild(a)}}const a=this.create(this.w.config.series,{});if(!a)return t(this);this.mount(a).then(()=>{"function"==typeof this.w.config.chart.events.mounted&&this.w.config.chart.events.mounted(this,this.w),this.events.fireEvent("mounted",[this,this.w]),t(a)}).catch(t=>{var s,i;const a=t instanceof Error?t:new Error(String(t)),o=a;o.chartId=null==(i=null==(s=this.w)?void 0:s.globals)?void 0:i.chartID,o.el=this.el,e(a)})}else e(new Error("Element not found"))}):Promise.reject(new Error("ApexCharts: chart configuration is missing or invalid. Ensure the options object includes a `chart` property."))}create(t,e){var s;const i=this.w;if(!this.core){new Kt(this).initModules()}const a=this.w.globals;if(a.noData=!1,a.animationEnded=!1,!m.elementExists(this.el))return a.animationEnded=!0,null;if(this.responsive.checkResponsiveConfig(e),i.config.xaxis.convertedCatToNumeric){new C(i.config).convertCatToNumericXaxis(i.config,this.ctx)}if(this.core.setupElements(),"treemap"===i.config.chart.type&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),0===a.svgWidth)return a.animationEnded=!0,null;let o=t;t.forEach((t,e)=>{t.hidden&&(o=this.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:e}))});const r=E.checkComboSeries(o,i.config.chart.type);a.comboCharts=r.comboCharts,a.comboBarCount=r.comboBarCount;const n=o.every(t=>t.data&&0===t.data.length);(0===o.length||n&&a.collapsedSeries.length<1)&&this.series.handleNoData(),c.isBrowser()&&this.events.setupEventHandlers();const l=this.data.parseData(o);this._writeParsedSeriesData(l.seriesData),this._writeParsedRangeData(l.rangeData),this._writeParsedCandleData(l.candleData),this._writeParsedLabelData(l.labelData),this._writeParsedAxisFlags(l.axisFlags),this.theme.init();new N(this.w,this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),a.noData&&a.collapsedSeries.length!==i.seriesData.series.length&&!i.config.legend.showForSingleSeries||null==(s=this.legend)||s.init(),this.series.hasAllSeriesEqualX(),a.axisCharts&&(this.core.coreCalculations(),"category"!==i.config.xaxis.type&&this.formatters.setLabelFormatters(),this.ctx.toolbar&&(this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX)),this.formatters.heatmapLabelFormatters();new E(this.w).getLargestMarkerSize();const h=this.dimensions.plotCoords();this._writeLayoutCoords(h.layout);const d=this.core.xySettings();this.grid.createGridMask();const g=this.core.plotChartType(o,d),p=new W(this.w,this);p.bringForward(),i.config.dataLabels.background.enabled&&p.dataLabelsBackground(),this.core.shiftGraphPosition(),i.globals.dataPoints>50&&i.dom.elWrap.classList.add("apexcharts-disable-transitions");return{elGraph:g,xyRatios:d,dimensions:{plot:{left:i.layout.translateX,top:i.layout.translateY,width:i.layout.gridWidth,height:i.layout.gridHeight}}}}mount(t=null){const e=this,s=e.w;return new Promise((i,a)=>{var o,r,n,l,h,d,g,p,x;if(null===e.el)return a(new Error("Not enough data to display or target element not found"));(null===t||s.globals.allSeriesCollapsed)&&e.series.handleNoData(),e.grid=new j(e.w,e);const u=e.grid.drawGrid(),f=Kt._featureRegistry.get("annotations");if(e.annotations=f?new f(e.w,{theme:e.theme,timeScale:e.timeScale}):null,null==(o=e.annotations)||o.drawImageAnnos(),null==(r=e.annotations)||r.drawTextAnnos(),"back"===s.config.grid.position&&(u&&s.dom.elGraphical.add(u.el),(null==(n=null==u?void 0:u.elGridBorders)?void 0:n.node)&&s.dom.elGraphical.add(u.elGridBorders)),Array.isArray(t.elGraph))for(let e=0;e<t.elGraph.length;e++)s.dom.elGraphical.add(t.elGraph[e]);else s.dom.elGraphical.add(t.elGraph);"front"===s.config.grid.position&&(u&&s.dom.elGraphical.add(u.el),(null==(l=null==u?void 0:u.elGridBorders)?void 0:l.node)&&s.dom.elGraphical.add(u.elGridBorders)),"front"===s.config.xaxis.crosshairs.position&&e.crosshairs.drawXCrosshairs(),"front"===s.config.yaxis[0].crosshairs.position&&e.crosshairs.drawYCrosshairs(),"treemap"!==s.config.chart.type&&e.axes.drawAxis(s.config.chart.type,u);const b=new $(this.w,this.ctx,u),m=new q(this.w,{theme:this.theme,timeScale:this.timeScale},u);if(null!==u&&(b.xAxisLabelCorrections(),m.setYAxisTextAlignments(),s.config.yaxis.map((t,e)=>{-1===s.globals.ignoreYAxisIndexes.indexOf(e)&&m.yAxisTitleRotate(e,t.opposite)})),null==(h=e.annotations)||h.drawAxesAnnotations(),!s.globals.noData){if(c.isBrowser()&&s.config.tooltip.enabled&&!s.globals.noData&&(null==(d=e.w.globals.tooltip)||d.drawTooltip(t.xyRatios)),s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled&&s.config.chart.accessibility.keyboard.navigation.enabled&&(null==(g=e.keyboardNavigation)||g.init()),c.isBrowser()&&s.globals.axisCharts&&(s.axisFlags.isXNumeric||s.config.xaxis.convertedCatToNumeric||s.axisFlags.isRangeBar))(s.config.chart.zoom.enabled||s.config.chart.selection&&s.config.chart.selection.enabled||s.config.chart.pan&&s.config.chart.pan.enabled)&&(null==(p=e.zoomPanSelection)||p.init({xyRatios:t.xyRatios}));else{const t=s.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(e=>{t[e]=!1})}s.config.chart.toolbar.show&&!s.globals.allSeriesCollapsed&&(null==(x=e.toolbar)||x.createToolbar())}s.globals.memory.methodsToExec.length>0&&s.globals.memory.methodsToExec.forEach(t=>{t.method(t.params,!1,t.context)}),s.globals.axisCharts||s.globals.noData||e.core.resizeNonAxisCharts(),i(e)})}destroy(){c.isBrowser()&&(window.removeEventListener("resize",this.windowResizeHandler),function(t,e){if(c.isSSR())return;const s=Qt.get(e);s&&(s.disconnect(),Qt.delete(e))}(this.el.parentNode,this.parentResizeHandler));const t=this.w.config.chart.id;t&&Apex._chartInstances.forEach((e,s)=>{e.id===m.escapeString(t)&&Apex._chartInstances.splice(s,1)}),this._keyboardNavigation&&this._keyboardNavigation.destroy(),new Jt(this.ctx).clear({isUpdating:!1})}updateOptions(t,e=!1,s=!0,i=!0,a=!0){const o=this.w;if(o.interact.selection=void 0,this.lastUpdateOptions){if(m.shallowEqual(this.lastUpdateOptions,t))return Promise.resolve(this);if(t.series&&this.lastUpdateOptions.series&&JSON.stringify(this.lastUpdateOptions.series)===JSON.stringify(t.series)){const e=n({},t),s=n({},this.lastUpdateOptions);if(delete e.series,delete s.series,m.shallowEqual(e,s))return Promise.resolve(this)}}return t.series&&(this.data.resetParsingFlags(),this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((t,e)=>this.updateHelpers._extendSeries(t,e))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),o.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,e,s,i,a)}updateSeries(t=[],e=!0,s=!0){return this.data.resetParsingFlags(),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,s)}appendSeries(t,e=!0,s=!0){this.data.resetParsingFlags();const i=this.w.config.series.slice();return i.push(t),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,e,s)}appendData(t,e=!0){const s=this;s.data.resetParsingFlags(),s.w.globals.dataChanged=!0,s.series.getPreviousPaths();const i=s.w.config.series.slice();for(let e=0;e<i.length;e++)if(null!==t[e]&&void 0!==t[e]){const s=t[e],a=i[e];for(let t=0;t<s.data.length;t++)a.data.push(s.data[t])}return s.w.config.series=i,e&&(s.w.globals.initialSeries=m.clone(s.w.config.series)),this.update()}update(t){return new Promise((e,s)=>{if(this.lastUpdateOptions&&JSON.stringify(this.lastUpdateOptions)===JSON.stringify(t))return e(this);this.lastUpdateOptions=m.clone(t),new Jt(this.ctx).clear({isUpdating:!0});const i=this.create(this.w.config.series,null!=t?t:{});if(!i)return e(this);this.mount(i).then(()=>{"function"==typeof this.w.config.chart.events.updated&&this.w.config.chart.events.updated(this,this.w),this.events.fireEvent("updated",[this,this.w]),this.w.globals.isDirty=!0,e(this)}).catch(t=>{s(t)})})}fastUpdate(t){return new Promise((e,s)=>{var i;try{const s=this.w,a=s.globals;a.shouldAnimate=t,a.dataChanged=!0,a.animationEnded=!1,_.invalidateSelectors(s);const o=s.globals;o.maxY=-Number.MAX_VALUE,o.minY=Number.MIN_VALUE,o.minYArr=[],o.maxYArr=[],o.maxX=-Number.MAX_VALUE,o.minX=Number.MAX_VALUE,o.initialMaxX=-Number.MAX_VALUE,o.initialMinX=Number.MAX_VALUE,o.yAxisScale=[],o.xAxisScale=null,o.xAxisTicksPositions=[],o.xRange=0,o.yRange=[],o.zRange=0,o.xTickAmount=0,o.multiAxisTickAmount=0,o.pointsArray=[],o.dataLabelsRects=[],o.lastDrawnDataLabelsIndexes=[],o.textRectsCache=new Map,o.domCache=new Map,o.cachedSelectors={},o.disableZoomIn=!1,o.disableZoomOut=!1,a.axisCharts&&(this.core.coreCalculations(),"category"!==s.config.xaxis.type&&this.formatters.setLabelFormatters());const r=this.core.xySettings(),n=s.dom.elGraphical.node;n.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-datalabels-background").forEach(t=>{var e;return null==(e=t.parentNode)?void 0:e.removeChild(t)});const l=this.core.plotChartType(s.config.series,r),h=n.querySelector(".apexcharts-grid"),d=Array.isArray(l)?l:[l];h&&"front"===s.config.grid.position?d.forEach(t=>{const e=t&&t.node?t.node:t;e&&n.insertBefore(e,h)}):d.forEach(t=>{s.dom.elGraphical.add(t)});const g=new W(s,this);g.bringForward(),s.config.dataLabels.background.enabled&&g.dataLabelsBackground(),c.isBrowser()&&s.config.tooltip.enabled&&!a.noData&&(null==(i=s.globals.tooltip)||i.drawTooltip(r)),"function"==typeof s.config.chart.events.updated&&s.config.chart.events.updated(this,s),this.events.fireEvent("updated",[this,s]),a.isDirty=!0,e(this)}catch(t){s(t)}})}getSyncedCharts(){const t=this.getGroupedCharts();let e=[this];return t.length&&(e=[],t.forEach(t=>{e.push(t)})),e}getGroupedCharts(){return Apex._chartInstances.filter(t=>{if(t.group)return!0}).map(t=>this.w.config.chart.group===t.group?t.chart:this)}static getChartByID(t){const e=m.escapeString(t);if(!Apex._chartInstances)return;const s=Apex._chartInstances.filter(t=>t.id===e)[0];return s&&s.chart}static initOnLoad(){var t;const e=document.querySelectorAll("[data-apexcharts]");for(let s=0;s<e.length;s++){const i=e[s],a=JSON.parse(null!=(t=e[s].getAttribute("data-options"))?t:"");new te(i,a).render()}}static exec(t,e,...s){const i=this.getChartByID(t);if(!i)return;i.w.globals.isExecCalled=!0;let a=null;return-1!==i.publicMethods.indexOf(e)&&(a=i[e](...s)),a}static merge(t,e){return m.extend(t,e)}static getThemePalettes(){return{palette1:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"],palette2:["#3F51B5","#03A9F4","#4CAF50","#F9CE1D","#FF9800"],palette3:["#33B2DF","#546E7A","#D4526E","#13D8AA","#A5978B"],palette4:["#4ECDC4","#C7F464","#81D4FA","#FD6A6A","#546E7A"],palette5:["#2B908F","#F9A3A4","#90EE7E","#FA4443","#69D2E7"],palette6:["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"],palette7:["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"],palette8:["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"],palette9:["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"],palette10:["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]}}static use(t){!function(t){Object.assign(pt(),t)}(t)}static registerFeatures(t){Kt.registerFeatures(t)}toggleSeries(t){return this.series.toggleSeries(t)}highlightSeriesOnLegendHover(t,e){return this.series.toggleSeriesOnHover(t,e)}showSeries(t){this.series.showSeries(t)}hideSeries(t){this.series.hideSeries(t)}highlightSeries(t){this.series.highlightSeries(t)}isSeriesHidden(t){return this.series.isSeriesHidden(t)}resetSeries(t=!0,e=!0){this.series.resetSeries(t,e)}addEventListener(t,e){this.events.addEventListener(t,e)}removeEventListener(t,e){this.events.removeEventListener(t,e)}addXaxisAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),null==(i=a.annotations)||i.addXaxisAnnotationExternal(t,e,a)}addYaxisAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),null==(i=a.annotations)||i.addYaxisAnnotationExternal(t,e,a)}addPointAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),null==(i=a.annotations)||i.addPointAnnotationExternal(t,e,a)}clearAnnotations(t=void 0){var e;let s=this;t&&(s=t),null==(e=s.annotations)||e.clearAnnotations(s)}removeAnnotation(t,e=void 0){var s;let i=this;e&&(i=e),null==(s=i.annotations)||s.removeAnnotation(i,t)}getChartArea(){return this.w.dom.baseEl.querySelector(".apexcharts-inner")}getSeriesTotalXRange(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}getHighestValueInSeries(t=0){return new U(this.w).getMinYMaxY(t).highestY}getLowestValueInSeries(t=0){return new U(this.w).getMinYMaxY(t).lowestY}getSeriesTotal(){return this.w.globals.seriesTotals}getState(){const t=this.w,e=t.globals;return{series:t.seriesData.series,seriesNames:t.seriesData.seriesNames,colors:e.colors,labels:t.labelData.labels,seriesTotals:e.seriesTotals,seriesPercent:e.seriesPercent,seriesXvalues:e.seriesXvalues,seriesYvalues:e.seriesYvalues,minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,minXDiff:e.minXDiff,dataPoints:e.dataPoints,xAxisScale:e.xAxisScale,yAxisScale:e.yAxisScale,xTickAmount:e.xTickAmount,isXNumeric:t.axisFlags.isXNumeric,seriesYAxisMap:e.seriesYAxisMap,seriesYAxisReverseMap:e.seriesYAxisReverseMap,svgWidth:e.svgWidth,svgHeight:e.svgHeight,gridWidth:t.layout.gridWidth,gridHeight:t.layout.gridHeight,selectedDataPoints:t.interact.selectedDataPoints,collapsedSeriesIndices:e.collapsedSeriesIndices,zoomed:t.interact.zoomed,seriesX:t.seriesData.seriesX,seriesZ:t.seriesData.seriesZ,seriesCandleO:t.candleData.seriesCandleO,seriesCandleH:t.candleData.seriesCandleH,seriesCandleM:t.candleData.seriesCandleM,seriesCandleL:t.candleData.seriesCandleL,seriesCandleC:t.candleData.seriesCandleC,seriesRangeStart:t.rangeData.seriesRangeStart,seriesRangeEnd:t.rangeData.seriesRangeEnd,seriesGoals:t.seriesData.seriesGoals}}toggleDataPointSelection(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}zoomX(t,e){var s;null==(s=this.ctx.toolbar)||s.zoomUpdateOptions(t,e)}setLocale(t){this.localization.setCurrentLocaleValues(t)}dataURI(t){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.dataURI(t)}getSvgString(t){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.getSvgString(t)}exportToCSV(t={}){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.exportToCSV(t)}paper(){return this.w.dom.Paper}_writeParsedSeriesData(t){Object.assign(this.w.seriesData,t)}_writeParsedRangeData(t){Object.assign(this.w.rangeData,t)}_writeParsedCandleData(t){Object.assign(this.w.candleData,t)}_writeParsedLabelData(t){Object.assign(this.w.labelData,t)}_writeParsedAxisFlags(t){Object.assign(this.w.axisFlags,t)}_writeLayoutCoords(t){Object.assign(this.w.layout,t)}_parentResizeCallback(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}_windowResize(){this.w.globals.resizeTimer=window.setTimeout(()=>{this.w.globals.resized=!0,this.w.globals.dataChanged=!1,this.ctx.update()},150)}_windowResizeHandler(){var t;clearTimeout(null!=(t=this.w.globals.resizeTimer)?t:void 0);let{redrawOnWindowResize:e}=this.w.config.chart;"function"==typeof e&&(e=e()),e&&this._windowResize()}}const ee=".apexcharts-flip-y {\n  transform: scaleY(-1) translateY(-100%);\n  transform-origin: top;\n  transform-box: fill-box;\n}\n.apexcharts-flip-x {\n  transform: scaleX(-1);\n  transform-origin: center;\n  transform-box: fill-box;\n}\n.apexcharts-legend {\n  display: flex;\n  overflow: auto;\n  padding: 0 10px;\n}\n.apexcharts-legend.apexcharts-legend-group-horizontal {\n  flex-direction: column;\n}\n.apexcharts-legend-group {\n  display: flex;\n}\n.apexcharts-legend-group-vertical {\n  flex-direction: column-reverse;\n}\n.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\n  flex-wrap: wrap\n}\n.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n  flex-direction: column;\n  bottom: 0;\n}\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\n  justify-content: flex-start;\n  align-items: flex-start;\n}\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\n  justify-content: center;\n  align-items: center;\n}\n.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\n  justify-content: flex-end;\n  align-items: flex-end;\n}\n.apexcharts-legend-series {\n  cursor: pointer;\n  line-height: normal;\n  display: flex;\n  align-items: center;\n}\n.apexcharts-legend-text {\n  position: relative;\n  font-size: 14px;\n}\n.apexcharts-legend-text *, .apexcharts-legend-marker * {\n  pointer-events: none;\n}\n.apexcharts-legend-marker {\n  position: relative;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  cursor: pointer;\n  margin-right: 1px;\n}\n\n.apexcharts-legend-series.apexcharts-no-click {\n  cursor: auto;\n}\n.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\n  display: none !important;\n}\n.apexcharts-inactive-legend {\n  opacity: 0.45;\n} ";class se{constructor(t,e){this.w=t,this.ctx=e}svgStringToNode(t){return(new DOMParser).parseFromString(t,"image/svg+xml").documentElement}scaleSvgNode(t,e){const s=parseFloat(t.getAttributeNS(null,"width")),i=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",s*e),t.setAttributeNS(null,"height",i*e),t.setAttributeNS(null,"viewBox","0 0 "+s+" "+i)}getSvgString(t){return new Promise(e=>{const s=this.w;let i=t||s.config.chart.toolbar.export.scale||s.config.chart.toolbar.export.width/s.globals.svgWidth;i||(i=1);const a=s.globals.svgWidth*i,o=s.globals.svgHeight*i,r=s.dom.elWrap.cloneNode(!0);r.style.width=a+"px",r.style.height=o+"px";const n=(new XMLSerializer).serializeToString(r);let l="\n        .apexcharts-tooltip, .apexcharts-toolbar, .apexcharts-xaxistooltip, .apexcharts-yaxistooltip, .apexcharts-xcrosshairs, .apexcharts-ycrosshairs, .apexcharts-zoom-rect, .apexcharts-selection-rect {\n          display: none;\n        }\n      ";s.config.legend.show&&s.dom.elLegendWrap&&s.dom.elLegendWrap.children.length>0&&(l+=ee);let h=`\n        <svg xmlns="http://www.w3.org/2000/svg"\n          version="1.1"\n          xmlns:xlink="http://www.w3.org/1999/xlink"\n          class="apexcharts-svg"\n          xmlns:data="ApexChartsNS"\n          transform="translate(0, 0)"\n          width="${s.globals.svgWidth}px" height="${s.globals.svgHeight}px">\n          <foreignObject width="100%" height="100%">\n            <div xmlns="http://www.w3.org/1999/xhtml" style="width:${a}px; height:${o}px;">\n            <style type="text/css">\n              ${l}\n            </style>\n              ${n}\n            </div>\n          </foreignObject>\n        </svg>\n      `;const c=this.svgStringToNode(h);1!==i&&this.scaleSvgNode(c,i),this.convertImagesToBase64(c).then(()=>{h=(new XMLSerializer).serializeToString(c),e(h.replace(/&nbsp;/g,"&#160;"))})})}convertImagesToBase64(t){const e=t.getElementsByTagName("image"),s=Array.from(e).map(t=>{const e=t.getAttributeNS("http://www.w3.org/1999/xlink","href");return e&&!e.startsWith("data:")?this.getBase64FromUrl(e).then(e=>{t.setAttributeNS("http://www.w3.org/1999/xlink","href",e)}).catch(t=>{}):Promise.resolve()});return Promise.all(s)}getBase64FromUrl(t){return c.isSSR()?Promise.resolve(t):new Promise((e,s)=>{const i=new Image;i.crossOrigin="Anonymous",i.onload=()=>{const t=document.createElement("canvas");t.width=i.width,t.height=i.height;const s=t.getContext("2d");s&&s.drawImage(i,0,0),e(t.toDataURL())},i.onerror=s,i.src=t})}svgUrl(){return new Promise(t=>{this.getSvgString().then(e=>{const s=new Blob([e],{type:"image/svg+xml;charset=utf-8"});t(URL.createObjectURL(s))})})}dataURI(t){return c.isSSR()?Promise.resolve({imgURI:""}):new Promise(e=>{const s=this.w,i=t?t.scale||t.width/s.globals.svgWidth:1,a=document.createElement("canvas");a.width=s.globals.svgWidth*i,a.height=parseInt(s.dom.elWrap.style.height,10)*i;const o="transparent"!==s.config.chart.background&&s.config.chart.background?s.config.chart.background:"#fff",r=a.getContext("2d");r&&(r.fillStyle=o,r.fillRect(0,0,a.width*i,a.height*i),this.getSvgString(i).then(t=>{const s="data:image/svg+xml,"+encodeURIComponent(t),i=new Image;i.crossOrigin="anonymous",i.onload=()=>{r.drawImage(i,0,0);const t=a;if(t.msToBlob){const s=t.msToBlob();e({blob:s})}else{const t=a.toDataURL("image/png");e({imgURI:t})}},i.src=s}))})}exportToSVG(){this.svgUrl().then(t=>{this.triggerDownload(t,this.w.config.chart.toolbar.export.svg.filename,".svg")})}exportToPng(){const t=this.w.config.chart.toolbar.export.scale,e=this.w.config.chart.toolbar.export.width,s=t?{scale:t}:e?{width:e}:void 0;this.dataURI(s).then(({imgURI:t,blob:e})=>{e?navigator.msSaveOrOpenBlob(e,this.w.globals.chartID+".png"):this.triggerDownload(t,this.w.config.chart.toolbar.export.png.filename,".png")})}exportToCSV({series:t,fileName:e,columnDelimiter:s=",",lineDelimiter:i="\n"}){const a=this.w;t||(t=a.config.series);let o=[];const r=[];let n="";const l=a.seriesData.series.map((t,e)=>-1===a.globals.collapsedSeriesIndices.indexOf(e)?t:[]),h=t=>"function"==typeof a.config.chart.toolbar.export.csv.categoryFormatter?a.config.chart.toolbar.export.csv.categoryFormatter(t):"datetime"===a.config.xaxis.type&&String(t).length>=10?new Date(t).toDateString():m.isNumber(t)?t:t.split(s).join(""),c=t=>"function"==typeof a.config.chart.toolbar.export.csv.valueFormatter?a.config.chart.toolbar.export.csv.valueFormatter(t):t,d=Math.max(...t.map(t=>t.data?t.data.length:0)),g=new ft(this.w),p=new G(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale}),x=t=>{let e="";if(a.globals.axisCharts){if("category"===a.config.xaxis.type||a.config.xaxis.convertedCatToNumeric)if(a.globals.isBarHorizontal){const s=a.formatters.yLabelFormatters[0],i=new et(this.ctx.w).getActiveConfigSeriesIndex();e=s(a.labelData.labels[t],{seriesIndex:i,dataPointIndex:t,w:a})}else e=p.getLabel(a.labelData.labels,a.labelData.timescaleLabels,0,t).text;"datetime"===a.config.xaxis.type&&(a.config.xaxis.categories.length?e=a.config.xaxis.categories[t]:a.config.labels.length&&(e=a.config.labels[t]))}else e=a.config.labels[t];return null===e?"nullvalue":(Array.isArray(e)&&(e=e.join(" ")),m.isNumber(e)?e:e.split(s).join(""))},u=(e,i)=>{var n;if(o.length&&0===i&&r.push(o.join(s)),e.data){e.data=e.data.length&&e.data||[...Array(d)].map(()=>"");for(let d=0;d<e.data.length;d++){o=[];let p=x(d);if("nullvalue"!==p){if(p||(g.isFormatXY()?p=t[i].data[d].x:g.isFormat2DArray()&&(p=t[i].data[d]?t[i].data[d][0]:"")),0===i){o.push(h(p));for(let e=0;e<a.seriesData.series.length;e++){const s=g.isFormatXY()?null==(n=t[e].data[d])?void 0:n.y:l[e][d];o.push(c(s))}}("candlestick"===a.config.chart.type||e.type&&"candlestick"===e.type)&&(o.pop(),o.push(a.candleData.seriesCandleO[i][d]),o.push(a.candleData.seriesCandleH[i][d]),o.push(a.candleData.seriesCandleL[i][d]),o.push(a.candleData.seriesCandleC[i][d])),("boxPlot"===a.config.chart.type||e.type&&"boxPlot"===e.type)&&(o.pop(),o.push(a.candleData.seriesCandleO[i][d]),o.push(a.candleData.seriesCandleH[i][d]),o.push(a.candleData.seriesCandleM[i][d]),o.push(a.candleData.seriesCandleL[i][d]),o.push(a.candleData.seriesCandleC[i][d])),"rangeBar"===a.config.chart.type&&(o.pop(),o.push(a.rangeData.seriesRangeStart[i][d]),o.push(a.rangeData.seriesRangeEnd[i][d])),o.length&&r.push(o.join(s))}}}};o.push(a.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===a.config.chart.type?(o.push("minimum"),o.push("q1"),o.push("median"),o.push("q3"),o.push("maximum")):"candlestick"===a.config.chart.type?(o.push("open"),o.push("high"),o.push("low"),o.push("close")):"rangeBar"===a.config.chart.type?(o.push("minimum"),o.push("maximum")):t.map((t,e)=>{const i=(t.name?t.name:`series-${e}`)+"";a.globals.axisCharts&&o.push(i.split(s).join("")?i.split(s).join(""):`series-${e}`)}),a.globals.axisCharts||(o.push(a.config.chart.toolbar.export.csv.headerValue),r.push(o.join(s))),a.globals.allSeriesHasEqualX||!a.globals.axisCharts||a.config.xaxis.categories.length||a.config.labels.length?t.map((t,e)=>{a.globals.axisCharts?u(t,e):(o=[],o.push(h(a.labelData.labels[e])),o.push(c(l[e])),r.push(o.join(s)))}):(()=>{const e=new Set,i={};t.forEach((s,a)=>{null==s||s.data.forEach(s=>{let o,r;if(g.isFormatXY())o=s.x,r=s.y;else{if(!g.isFormat2DArray())return;o=s[0],r=s[1]}i[o]||(i[o]=Array(t.length).fill("")),i[o][a]=c(r),e.add(o)})}),o.length&&r.push(o.join(s)),Array.from(e).sort().forEach(t=>{r.push([h(t),i[t].join(s)])})})(),n+=r.join(i),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\ufeff"+n),e||a.config.chart.toolbar.export.csv.filename,".csv")}triggerDownload(t,e,s){if(c.isSSR())return;const i=document.createElement("a");i.href=t,i.download=(e||this.w.globals.chartID)+s,document.body.appendChild(i),i.click(),document.body.removeChild(i)}}te.registerFeatures({exports:se});let ie=class{constructor(t){this.w=t.w,this.lgCtx=t}getLegendStyles(){if(c.isSSR())return null;const t=document.createElement("style");t.setAttribute("type","text/css");const e=this.w.config.chart.nonce;e&&t.setAttribute("nonce",e);const s=document.createTextNode(ee);return t.appendChild(s),t}getLegendDimensions(){const t=this.w.dom.baseEl.querySelector(".apexcharts-legend");if(!t)return{clwh:0,clww:0};const{width:e,height:s}=t.getBoundingClientRect();return{clwh:s,clww:e}}appendToForeignObject(){var t;const e=this.getLegendStyles();!1!==this.w.config.chart.injectStyleSheet&&e&&(null==(t=this.w.dom.elLegendForeign)||t.appendChild(e))}toggleDataSeries(t,e){var s,i;const a=this.w;if(a.globals.axisCharts||"radialBar"===a.config.chart.type){a.globals.resized=!0;let o=null,r=null;if(a.globals.risingSeries=[],a.globals.axisCharts){if(o=a.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${t}']`),!o)return;r=parseInt(null!=(s=o.getAttribute("data:realIndex"))?s:"",10)}else{if(o=a.dom.baseEl.querySelector(`.apexcharts-series[rel='${t+1}']`),!o)return;r=parseInt(null!=(i=o.getAttribute("rel"))?i:"",10)-1}if(e){[{cs:a.globals.collapsedSeries,csi:a.globals.collapsedSeriesIndices},{cs:a.globals.ancillaryCollapsedSeries,csi:a.globals.ancillaryCollapsedSeriesIndices}].forEach(t=>{const e=t.cs,s=t.csi;this.riseCollapsedSeries(e,s,r)})}else this.hideSeries({seriesEl:o,realIndex:r});if(a.config.chart.accessibility.enabled){const e=a.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${t+1}"]`);if(e){const s=a.globals.collapsedSeriesIndices.includes(r)||a.globals.ancillaryCollapsedSeriesIndices.includes(r);e.setAttribute("aria-pressed",s?"true":"false");const i=e.querySelector(".apexcharts-legend-text"),o=i?i.textContent:a.seriesData.seriesNames[t],n=s?"hidden":"visible";e.setAttribute("aria-label",`${o}, ${n}. Press Enter or Space to toggle.`)}}}else{const e=a.dom.Paper.findOne(` .apexcharts-series[rel='${t+1}'] path`),s=a.config.chart.type;if("pie"===s||"polarArea"===s||"donut"===s){const t=a.config.plotOptions.pie.donut.labels;new T(this.w).pathMouseDown(e,null),this.lgCtx.printDataLabelsInner(e.node,t)}if(a.config.chart.accessibility.enabled){const e=a.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${t+1}"]`);if(e){const s=a.globals.collapsedSeriesIndices.includes(t);e.setAttribute("aria-pressed",s?"true":"false");const i=e.querySelector(".apexcharts-legend-text"),o=i?i.textContent:a.seriesData.seriesNames[t],r=s?"hidden":"visible";e.setAttribute("aria-label",`${o}, ${r}. Press Enter or Space to toggle.`)}}}}getSeriesAfterCollapsing({realIndex:t}){var e;const s=this.w,i=s.globals,a=m.clone(s.config.series);if(i.axisCharts){const e=s.config.yaxis[i.seriesYAxisReverseMap[t]],o={index:t,data:a[t].data.slice(),type:a[t].type||s.config.chart.type};if(e&&e.show&&e.showAlways)i.ancillaryCollapsedSeriesIndices.indexOf(t)<0&&(i.ancillaryCollapsedSeries.push(o),i.ancillaryCollapsedSeriesIndices.push(t));else if(i.collapsedSeriesIndices.indexOf(t)<0){i.collapsedSeries.push(o),i.collapsedSeriesIndices.push(t);const e=i.risingSeries.indexOf(t);i.risingSeries.splice(e,1)}}else i.collapsedSeries.push({index:t,data:a[t],type:null!=(e=s.config.series[t].type)?e:"line"}),i.collapsedSeriesIndices.push(t);return i.allSeriesCollapsed=i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.config.series.length,this._getSeriesBasedOnCollapsedState(a)}hideSeries({seriesEl:t,realIndex:e}){const s=this.w,i=this.getSeriesAfterCollapsing({realIndex:e}),a=t.childNodes;for(let t=0;t<a.length;t++)a[t].classList.contains("apexcharts-series-markers-wrap")&&(a[t].classList.contains("apexcharts-hide")?a[t].classList.remove("apexcharts-hide"):a[t].classList.add("apexcharts-hide"));this.lgCtx.updateSeries(i,s.config.chart.animations.dynamicAnimation.enabled)}riseCollapsedSeries(t,e,s){const i=this.w;let a=m.clone(i.config.series);if(t.length>0){for(let o=0;o<t.length;o++)t[o].index===s&&(i.globals.axisCharts?a[s].data=t[o].data.slice():a[s]=t[o].data,"number"!=typeof a[s]&&(a[s].hidden=!1),t.splice(o,1),e.splice(o,1),i.globals.risingSeries.push(s),o--);a=this._getSeriesBasedOnCollapsedState(a),this.lgCtx.updateSeries(a,i.config.chart.animations.dynamicAnimation.enabled)}}_getSeriesBasedOnCollapsedState(t){const e=this.w;let s=0;return e.globals.axisCharts?t.forEach((i,a)=>{e.globals.collapsedSeriesIndices.indexOf(a)<0&&e.globals.ancillaryCollapsedSeriesIndices.indexOf(a)<0||(t[a].data=[],s++)}):t.forEach((i,a)=>{e.globals.collapsedSeriesIndices.indexOf(a)<0||(t[a]=0,s++)}),e.globals.allSeriesCollapsed=s===t.length,t}};te.registerFeatures({legend:class{constructor(t,e){this.w=t,this.ctx=e,this.printDataLabelsInner=(...t)=>{var s;return null==(s=e.pie)?void 0:s.printDataLabelsInner(...t)},this.updateSeries=(...t)=>e.updateHelpers._updateSeries(...t),this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed="bar"===this.w.config.chart.type&&this.w.config.plotOptions.bar.distributed&&1===this.w.config.series.length,this.legendHelpers=new ie(this)}init(){const t=this.w,e=t.globals,s=t.config,i=s.legend.showForSingleSeries&&1===this.w.seriesData.series.length||this.isBarsDistributed||this.w.seriesData.series.length>1;if(this.legendHelpers.appendToForeignObject(),(i||!e.axisCharts)&&s.legend.show){const e=t.dom.elLegendWrap;for(;e.firstChild;)e.removeChild(e.firstChild);this.drawLegends(),"bottom"===s.legend.position||"top"===s.legend.position?this.legendAlignHorizontal():"right"!==s.legend.position&&"left"!==s.legend.position||this.legendAlignVertical()}}createLegendMarker({i:t,fillcolor:e}){const s=this.w,i=b.createElement("span");i.classList.add("apexcharts-legend-marker");const a=s.config.legend.markers.shape||s.config.markers.shape;let o=a;Array.isArray(a)&&(o=a[t]);const r=Array.isArray(s.config.legend.markers.size)?parseFloat(s.config.legend.markers.size[t]):parseFloat(s.config.legend.markers.size),h=Array.isArray(s.config.legend.markers.offsetX)?parseFloat(s.config.legend.markers.offsetX[t]):parseFloat(s.config.legend.markers.offsetX),d=Array.isArray(s.config.legend.markers.offsetY)?parseFloat(s.config.legend.markers.offsetY[t]):parseFloat(s.config.legend.markers.offsetY),g=Array.isArray(s.config.legend.markers.strokeWidth)?parseFloat(s.config.legend.markers.strokeWidth[t]):parseFloat(s.config.legend.markers.strokeWidth),p=i.style;if(p.height=2*(r+g)+"px",p.width=2*(r+g)+"px",p.left=h+"px",p.top=d+"px",s.config.legend.markers.customHTML)p.background="transparent",p.color=e[t],Array.isArray(s.config.legend.markers.customHTML)?s.config.legend.markers.customHTML[t]&&(i.innerHTML=s.config.legend.markers.customHTML[t]()):i.innerHTML=s.config.legend.markers.customHTML();else{const a=new N(this.ctx.w,this.ctx).getMarkerConfig({cssClass:`apexcharts-legend-marker apexcharts-marker apexcharts-marker-${o}`,seriesIndex:t,strokeWidth:g,size:r}),h=(c.isBrowser()?window.SVG:global.SVG)().addTo(i).size("100%","100%"),d=new T(this.w).drawMarker(0,0,l(n({},a),{pointFillColor:Array.isArray(e)?e[t]:a.pointFillColor,shape:o}));s.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach(t=>{t.node.classList.contains("apexcharts-marker-triangle")?t.node.style.transform="translate(50%, 45%)":t.node.style.transform="translate(50%, 50%)"}),h.add(d)}return i}drawLegends(){var t;const e=this,s=this.w,i=s.dom.elLegendWrap,a=s.config.legend.fontFamily;let o=s.seriesData.seriesNames,r=s.config.legend.markers.fillColors?s.config.legend.markers.fillColors.slice():s.globals.colors.slice();if("heatmap"===s.config.chart.type){const t=s.config.plotOptions.heatmap.colorScale.ranges;o=t.map(t=>t.name?t.name:t.from+" - "+t.to),r=t.map(t=>t.color)}else this.isBarsDistributed&&(o=s.labelData.labels.slice());s.config.legend.customLegendItems.length&&(o=s.config.legend.customLegendItems);const n=s.formatters.legendFormatter,l=s.config.legend.inverseOrder,h=[];s.labelData.seriesGroups.length>1&&s.config.legend.clusterGroupedSeries&&s.labelData.seriesGroups.forEach((t,e)=>{h[e]=b.createElement("div"),h[e].classList.add("apexcharts-legend-group",`apexcharts-legend-group-${e}`),"horizontal"===s.config.legend.clusterGroupedSeriesOrientation?i.classList.add("apexcharts-legend-group-horizontal"):h[e].classList.add("apexcharts-legend-group-vertical")});for(let e=l?o.length-1:0;l?e>=0:e<=o.length-1;l?e--:e++){const l=n(o[e],{seriesIndex:e,w:s});let c=!1,d=!1;if(s.globals.collapsedSeries.length>0)for(let t=0;t<s.globals.collapsedSeries.length;t++)s.globals.collapsedSeries[t].index===e&&(c=!0);if(s.globals.ancillaryCollapsedSeriesIndices.length>0)for(let t=0;t<s.globals.ancillaryCollapsedSeriesIndices.length;t++)s.globals.ancillaryCollapsedSeriesIndices[t]===e&&(d=!0);const g=this.createLegendMarker({i:e,fillcolor:r});T.setAttrs(g,{rel:e+1,"data:collapsed":c||d}),(c||d)&&g.classList.add("apexcharts-inactive-legend");const p=b.createElement("div");if(s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled){p.setAttribute("role","button"),p.setAttribute("tabindex","0");const t=Array.isArray(l)?l.join(" "):l,e=c||d,s=e?"hidden":"visible";p.setAttribute("aria-label",`${t}, ${s}. Press Enter or Space to toggle.`),p.setAttribute("aria-pressed",e?"true":"false")}const x=b.createElement("span");x.classList.add("apexcharts-legend-text"),x.innerHTML=Array.isArray(l)?l.join(" "):l;let u=s.config.legend.labels.useSeriesColors?s.globals.colors[e]:Array.isArray(s.config.legend.labels.colors)?null==(t=s.config.legend.labels.colors)?void 0:t[e]:s.config.legend.labels.colors;u||(u=s.config.chart.foreColor),x.style.color=u,x.style.fontSize=s.config.legend.fontSize,x.style.fontWeight=s.config.legend.fontWeight,x.style.fontFamily=a||s.config.chart.fontFamily,T.setAttrs(x,{rel:e+1,i:e,"data:default-text":encodeURIComponent(l),"data:collapsed":c||d}),p.appendChild(g),p.appendChild(x);const f=new E(this.w);if(!s.config.legend.showForZeroSeries){0===f.getSeriesTotalByIndex(e)&&f.seriesHaveSameValues(e)&&!f.isSeriesNull(e)&&-1===s.globals.collapsedSeriesIndices.indexOf(e)&&-1===s.globals.ancillaryCollapsedSeriesIndices.indexOf(e)&&p.classList.add("apexcharts-hidden-zero-series")}s.config.legend.showForNullSeries||f.isSeriesNull(e)&&-1===s.globals.collapsedSeriesIndices.indexOf(e)&&-1===s.globals.ancillaryCollapsedSeriesIndices.indexOf(e)&&p.classList.add("apexcharts-hidden-null-series"),h.length?s.labelData.seriesGroups.forEach((t,a)=>{var o,r;t.includes(null!=(r=null==(o=s.config.series[e])?void 0:o.name)?r:"")&&(i.appendChild(h[a]),h[a].appendChild(p))}):i.appendChild(p),i.classList.add(`apexcharts-align-${s.config.legend.horizontalAlign}`),i.classList.add("apx-legend-position-"+s.config.legend.position),p.classList.add("apexcharts-legend-series"),p.style.margin=`${s.config.legend.itemMargin.vertical}px ${s.config.legend.itemMargin.horizontal}px`,i.style.width=s.config.legend.width?s.config.legend.width+"px":"",i.style.height=s.config.legend.height?s.config.legend.height+"px":"",T.setAttrs(p,{rel:e+1,seriesName:m.escapeString(o[e]),"data:collapsed":c||d}),(c||d)&&p.classList.add("apexcharts-inactive-legend"),s.config.legend.onItemClick.toggleDataSeries||p.classList.add("apexcharts-no-click")}s.dom.elWrap.addEventListener("click",e.onLegendClick,!0),s.config.legend.onItemHover.highlightDataSeries&&0===s.config.legend.customLegendItems.length&&(s.dom.elWrap.addEventListener("mousemove",e.onLegendHovered,!0),s.dom.elWrap.addEventListener("mouseout",e.onLegendHovered,!0)),s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled&&s.dom.elWrap.addEventListener("keydown",e.onLegendKeyDown.bind(e),!0)}setLegendWrapXY(t,e){const s=this.w,i=s.dom.elLegendWrap,a=i.clientHeight;let o=0,r=0;if("bottom"===s.config.legend.position)r=s.globals.svgHeight-Math.min(a,s.globals.svgHeight/2)-5;else if("top"===s.config.legend.position){const t=new lt(this.w,this.ctx),e=t.dimHelpers.getTitleSubtitleCoords("title").height,s=t.dimHelpers.getTitleSubtitleCoords("subtitle").height;r=(e>0?e-10:0)+(s>0?s-10:0)}i.style.position="absolute",o=o+t+s.config.legend.offsetX,r=r+e+s.config.legend.offsetY,i.style.left=o+"px",i.style.top=r+"px","right"===s.config.legend.position&&(i.style.left="auto",i.style.right=25+s.config.legend.offsetX+"px");["width","height"].forEach(t=>{i&&i.style[t]&&(i.style[t]=parseInt(String(s.config.legend[t]),10)+"px")})}legendAlignHorizontal(){const t=this.w;t.dom.elLegendWrap.style.right="0";const e=new lt(this.w,this.ctx),s=e.dimHelpers.getTitleSubtitleCoords("title"),i=e.dimHelpers.getTitleSubtitleCoords("subtitle");let a=0;"top"===t.config.legend.position&&(a=s.height+i.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,a)}legendAlignVertical(){const t=this.w,e=this.legendHelpers.getLegendDimensions();let s=0;"left"===t.config.legend.position&&(s=20),"right"===t.config.legend.position&&(s=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(s,20)}onLegendHovered(t){var e;const s=this.w,i=t.target,a=i.classList.contains("apexcharts-legend-series")||i.classList.contains("apexcharts-legend-text")||i.classList.contains("apexcharts-legend-marker");if("heatmap"===s.config.chart.type||this.isBarsDistributed){if(a){const s=parseInt(null!=(e=i.getAttribute("rel"))?e:"0",10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,s,this.w]);new et(this.ctx.w).highlightRangeInSeries(t,i)}}else if(!i.classList.contains("apexcharts-inactive-legend")&&a){new et(this.ctx.w).toggleSeriesOnHover(t,i)}}onLegendKeyDown(t){const e=this,s=this.w,i=t.target;if((i.classList.contains("apexcharts-legend-series")||i.classList.contains("apexcharts-legend-text")||i.classList.contains("apexcharts-legend-marker"))&&("Enter"===t.key||" "===t.key)){t.preventDefault();const a=i.getAttribute("rel");e.onLegendClick(t),null!==a&&s.config.legend.onItemClick.toggleDataSeries&&requestAnimationFrame(()=>{const t=s.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${a}"]`);t&&t.focus()})}}onLegendClick(t){var e;const s=this.w,i=t.target;if(!s.config.legend.customLegendItems.length&&(i.classList.contains("apexcharts-legend-series")||i.classList.contains("apexcharts-legend-text")||i.classList.contains("apexcharts-legend-marker"))){const t=parseInt(null!=(e=i.getAttribute("rel"))?e:"0",10)-1,a="true"===i.getAttribute("data:collapsed"),o=this.w.config.chart.events.legendClick;"function"==typeof o&&o(this.ctx,t,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,t,this.w]);const r=this.w.config.legend.markers.onClick;"function"==typeof r&&i.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,t,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,t,this.w]));"treemap"!==s.config.chart.type&&"heatmap"!==s.config.chart.type&&!this.isBarsDistributed&&s.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(t,a)}}}});class ae{constructor(t,e){this.w=t,this.ctx=e,this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=t.globals.minX,this.maxX=t.globals.maxX,this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null,this.elMenu=null,this.elMenuItems=[],this.t=null}createToolbar(){const t=this.w,e=()=>b.createElementNS("http://www.w3.org/1999/xhtml","div"),s=e();if(s.setAttribute("class","apexcharts-toolbar"),s.style.top=t.config.chart.toolbar.offsetY+"px",s.style.right=3-t.config.chart.toolbar.offsetX+"px",t.dom.elWrap.appendChild(s),this.elZoom=e(),this.elZoomIn=e(),this.elZoomOut=e(),this.elPan=e(),this.elSelection=e(),this.elZoomReset=e(),this.elMenuIcon=e(),this.elMenu=e(),this.elCustomIcons=[],this.t=t.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(let t=0;t<this.t.customIcons.length;t++)this.elCustomIcons.push(e());const i=[],a=(e,s,a)=>{const o=e.toLowerCase();this.t[o]&&t.config.chart.zoom.enabled&&i.push({el:s,icon:"string"==typeof this.t[o]?this.t[o]:a,title:this.localeValues[e],class:`apexcharts-${o}-icon`})};a("zoomIn",this.elZoomIn,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n    <path d="M0 0h24v24H0z" fill="none"/>\n    <path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>\n</svg>\n'),a("zoomOut",this.elZoomOut,'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">\n    <path d="M0 0h24v24H0z" fill="none"/>\n    <path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>\n</svg>\n');const o=e=>{this.t[e]&&t.config.chart[e].enabled&&i.push({el:"zoom"===e?this.elZoom:this.elSelection,icon:"string"==typeof this.t[e]?this.t[e]:"zoom"===e?'<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24">\n    <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>\n    <path d="M0 0h24v24H0V0z" fill="none"/>\n    <path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/>\n</svg>':'<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n    <path d="M0 0h24v24H0z" fill="none"/>\n    <path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"/>\n</svg>',title:this.localeValues["zoom"===e?"selectionZoom":"selection"],class:`apexcharts-${e}-icon`})};o("zoom"),o("selection"),this.t.pan&&t.config.chart.zoom.enabled&&i.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24">\n    <defs>\n        <path d="M0 0h24v24H0z" id="a"/>\n    </defs>\n    <clipPath id="b">\n        <use overflow="visible" xlink:href="#a"/>\n    </clipPath>\n    <path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/>\n</svg>',title:this.localeValues.pan,class:"apexcharts-pan-icon"}),a("reset",this.elZoomReset,'<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n    <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>\n    <path d="M0 0h24v24H0z" fill="none"/>\n</svg>'),this.t.download&&i.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(let t=0;t<this.elCustomIcons.length;t++)i.push({el:this.elCustomIcons[t],icon:this.t.customIcons[t].icon,title:this.t.customIcons[t].title,index:this.t.customIcons[t].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[t].class});i.forEach((t,e)=>{t.index&&m.moveIndexInArray(i,e,t.index)});for(let t=0;t<i.length;t++)T.setAttrs(i[t].el,{class:i[t].class,title:i[t].title,tabindex:"0",role:"button","aria-label":i[t].title}),i[t].el.innerHTML=i[t].icon,s.appendChild(i[t].el);this.elZoom.parentNode&&this.elZoom.setAttribute("aria-pressed",String(!!t.interact.zoomEnabled)),this.elSelection.parentNode&&this.elSelection.setAttribute("aria-pressed",String(!!t.interact.selectionEnabled)),this.elPan.parentNode&&this.elPan.setAttribute("aria-pressed",String(!!t.interact.panEnabled)),this.elMenuIcon.parentNode&&(this.elMenuIcon.setAttribute("aria-haspopup","true"),this.elMenuIcon.setAttribute("aria-expanded","false")),this._createHamburgerMenu(s),t.interact.zoomEnabled?this.elZoom.classList.add(this.selectedClass):t.interact.panEnabled?this.elPan.classList.add(this.selectedClass):t.interact.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}_createHamburgerMenu(t){this.elMenuItems=[],t.appendChild(this.elMenu),T.setAttrs(this.elMenu,{class:"apexcharts-menu",role:"menu"});const e=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];for(let t=0;t<e.length;t++)this.elMenuItems.push(b.createElementNS("http://www.w3.org/1999/xhtml","div")),this.elMenuItems[t].innerHTML=e[t].title,T.setAttrs(this.elMenuItems[t],{class:`apexcharts-menu-item ${e[t].name}`,title:e[t].title,role:"menuitem",tabindex:"-1"}),this.elMenu.appendChild(this.elMenuItems[t])}addToolbarEventListeners(){var t,e,s,i,a,o,r,n;null==(t=this.elZoomReset)||t.addEventListener("click",this.handleZoomReset.bind(this)),null==(e=this.elSelection)||e.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),null==(s=this.elZoom)||s.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),null==(i=this.elZoomIn)||i.addEventListener("click",this.handleZoomIn.bind(this)),null==(a=this.elZoomOut)||a.addEventListener("click",this.handleZoomOut.bind(this)),null==(o=this.elPan)||o.addEventListener("click",this.togglePanning.bind(this)),null==(r=this.elMenuIcon)||r.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach(t=>{t.classList.contains("exportSVG")?t.addEventListener("click",this.handleDownload.bind(this,"svg")):t.classList.contains("exportPNG")?t.addEventListener("click",this.handleDownload.bind(this,"png")):t.classList.contains("exportCSV")&&t.addEventListener("click",this.handleDownload.bind(this,"csv"))});for(let t=0;t<this.t.customIcons.length;t++)this.elCustomIcons[t].addEventListener("click",this.t.customIcons[t].click.bind(this,this.ctx,this.ctx.w));[this.elZoomReset,this.elSelection,this.elZoom,this.elZoomIn,this.elZoomOut,this.elPan,this.elMenuIcon,...this.elCustomIcons].forEach(t=>{t.addEventListener("keydown",e=>{if("Enter"===e.key||" "===e.key){e.preventDefault();const s=t.className;t.click(),requestAnimationFrame(()=>{const t=this.w.dom.baseEl;if(!t)return;const e=s.split(" ").find(t=>t.startsWith("apexcharts-"));if(!e)return;const i=t.querySelector(`.${e}`);i&&i.focus()})}})}),null==(n=this.elMenuIcon)||n.addEventListener("keydown",t=>{var e;"ArrowDown"!==t.key&&"ArrowUp"!==t.key||(t.preventDefault(),(null==(e=this.elMenu)?void 0:e.classList.contains("apexcharts-menu-open"))||this.toggleMenu(),window.setTimeout(()=>{const e="ArrowDown"===t.key?0:this.elMenuItems.length-1;this.elMenuItems[e]&&this.elMenuItems[e].focus()},20))}),this.elMenuItems.forEach((t,e)=>{t.addEventListener("keydown",s=>{var i;if("ArrowDown"===s.key){s.preventDefault();(this.elMenuItems[e+1]||this.elMenuItems[0]).focus()}else if("ArrowUp"===s.key){s.preventDefault();(this.elMenuItems[e-1]||this.elMenuItems[this.elMenuItems.length-1]).focus()}else"Escape"===s.key||"Tab"===s.key?(this._closeMenu(),null==(i=this.elMenuIcon)||i.focus(),"Tab"===s.key||s.preventDefault()):"Enter"!==s.key&&" "!==s.key||(s.preventDefault(),t.click())})})}toggleZoomSelection(t){this.ctx.getSyncedCharts().forEach(e=>{e.ctx.toolbar.toggleOtherControls();const s="selection"===t?e.ctx.toolbar.elSelection:e.ctx.toolbar.elZoom,i="selection"===t?"selectionEnabled":"zoomEnabled";e.w.globals[i]=!e.w.globals[i],s.classList.contains(e.ctx.toolbar.selectedClass)?s.classList.remove(e.ctx.toolbar.selectedClass):s.classList.add(e.ctx.toolbar.selectedClass),s.setAttribute("aria-pressed",String(e.w.globals[i]))})}getToolbarIconsReference(){const t=this.w;this.elZoom||(this.elZoom=t.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=t.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=t.dom.baseEl.querySelector(".apexcharts-selection-icon"))}enableZoomPanFromToolbar(t){this.toggleOtherControls(),"pan"===t?this.w.interact.panEnabled=!0:this.w.interact.zoomEnabled=!0;const e="pan"===t?this.elPan:this.elZoom,s="pan"===t?this.elZoom:this.elPan;e&&e.classList.add(this.selectedClass),s&&s.classList.remove(this.selectedClass)}togglePanning(){this.ctx.getSyncedCharts().forEach(t=>{t.ctx.toolbar.toggleOtherControls(),t.w.interact.panEnabled=!t.w.interact.panEnabled,t.ctx.toolbar.elPan.classList.contains(t.ctx.toolbar.selectedClass)?t.ctx.toolbar.elPan.classList.remove(t.ctx.toolbar.selectedClass):t.ctx.toolbar.elPan.classList.add(t.ctx.toolbar.selectedClass),t.ctx.toolbar.elPan.setAttribute("aria-pressed",String(t.w.interact.panEnabled))})}toggleOtherControls(){const t=this.w;t.interact.panEnabled=!1,t.interact.zoomEnabled=!1,t.interact.selectionEnabled=!1,this.getToolbarIconsReference();[this.elPan,this.elSelection,this.elZoom].forEach(t=>{t&&t.classList.remove(this.selectedClass)})}handleZoomIn(){const t=this.w;t.axisFlags.isRangeBar&&(this.minX=t.globals.minY,this.maxX=t.globals.maxY);const e=(this.minX+this.maxX)/2,s=(this.minX+e)/2,i=(this.maxX+e)/2,a=this._getNewMinXMaxX(s,i);t.interact.disableZoomIn||this.zoomUpdateOptions(a.minX,a.maxX)}handleZoomOut(){const t=this.w;if(t.axisFlags.isRangeBar&&(this.minX=t.globals.minY,this.maxX=t.globals.maxY),"datetime"===t.config.xaxis.type&&new Date(this.minX).getUTCFullYear()<1e3)return;const e=(this.minX+this.maxX)/2,s=this.minX-(e-this.minX),i=this.maxX-(e-this.maxX),a=this._getNewMinXMaxX(s,i);t.interact.disableZoomOut||this.zoomUpdateOptions(a.minX,a.maxX)}_getNewMinXMaxX(t,e){const s=this.w.config.xaxis.convertedCatToNumeric;return{minX:s?Math.floor(t):t,maxX:s?Math.floor(e):e}}zoomUpdateOptions(t,e){const s=this.w;if(void 0===t&&void 0===e)return void this.handleZoomReset();if(s.config.xaxis.convertedCatToNumeric&&(t<1&&(t=1,e=s.globals.dataPoints),e-t<2))return;let i={min:t,max:e};const a=this.getBeforeZoomRange(i,void 0);a&&(i=a.xaxis);const o={xaxis:i};if(!s.globals.initialConfig)return;const r=m.clone(s.globals.initialConfig.yaxis);s.config.chart.group||(o.yaxis=r),this.w.interact.zoomed=!0,this.ctx.updateHelpers._updateOptions(o,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(i,r)}zoomCallback(t,e){"function"==typeof this.ev.zoomed&&(this.ev.zoomed(this.ctx,{xaxis:t,yaxis:e}),this.ctx.events.fireEvent("zoomed",{xaxis:t,yaxis:e}))}getBeforeZoomRange(t,e){let s=null;return"function"==typeof this.ev.beforeZoom&&(s=this.ev.beforeZoom(this,{xaxis:t,yaxis:e})),s}toggleMenu(){window.setTimeout(()=>{var t,e,s;(null==(t=this.elMenu)?void 0:t.classList.contains("apexcharts-menu-open"))?this._closeMenu():(null==(e=this.elMenu)||e.classList.add("apexcharts-menu-open"),null==(s=this.elMenuIcon)||s.setAttribute("aria-expanded","true"))},0)}_closeMenu(){var t,e;null==(t=this.elMenu)||t.classList.remove("apexcharts-menu-open"),null==(e=this.elMenuIcon)||e.setAttribute("aria-expanded","false")}handleDownload(t){const e=this.w,s=new se(this.w,this.ctx);switch(t){case"svg":s.exportToSVG();break;case"png":s.exportToPng();break;case"csv":s.exportToCSV({series:e.config.series,columnDelimiter:e.config.chart.toolbar.export.csv.columnDelimiter})}}handleZoomReset(){this.ctx.getSyncedCharts().forEach(t=>{const e=t.w;if(e.globals.lastXAxis.min=e.globals.initialConfig.xaxis.min,e.globals.lastXAxis.max=e.globals.initialConfig.xaxis.max,t.updateHelpers.revertDefaultAxisMinMax(),"function"==typeof e.config.chart.events.beforeResetZoom){const s=e.config.chart.events.beforeResetZoom(t,e);s&&t.updateHelpers.revertDefaultAxisMinMax(s)}"function"==typeof e.config.chart.events.zoomed&&t.ctx.toolbar.zoomCallback({min:e.config.xaxis.min,max:e.config.xaxis.max}),e.interact.zoomed=!1;const s=t.ctx.series.emptyCollapsedSeries(m.clone(e.globals.initialSeries));t.updateHelpers._updateSeries(s,e.config.chart.animations.dynamicAnimation.enabled)})}destroy(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}te.registerFeatures({toolbar:ae,zoomPanSelection:class extends ae{constructor(t,e){super(t,e),this.w=t,this.ctx=e,this.dragged=!1,this.graphics=new T(this.w),this.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend","wheel"],this.clientX=0,this.clientY=0,this.startX=0,this.endX=0,this.dragX=0,this.startY=0,this.endY=0,this.dragY=0,this.moveDirection="none",this.debounceTimer=null,this.debounceDelay=100,this.wheelDelay=400}init({xyRatios:t}){const e=this.w,s=this;this.xyRatios=t,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=e.dom.baseEl.querySelector(".apexcharts-grid"),this.constraints=new B(0,0,e.layout.gridWidth,e.layout.gridHeight),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),e.dom.Paper.add(this.zoomRect),e.dom.Paper.add(this.selectionRect),"x"===e.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:e.layout.gridWidth,maxY:e.layout.gridHeight}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):"y"===e.config.chart.selection.type?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:e.layout.gridWidth}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=e.dom.baseEl.querySelector(`${e.globals.chartClass} .apexcharts-svg`),this.hoverArea&&(this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach(e=>{var i;null==(i=this.hoverArea)||i.addEventListener(e,s.svgMouseEvents.bind(s,t),{capture:!1,passive:!0})}),e.config.chart.zoom.enabled&&e.config.chart.zoom.allowMouseWheelZoom&&this.hoverArea.addEventListener("wheel",s.mouseWheelEvent.bind(s),{capture:!1,passive:!1}))}destroy(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}svgMouseEvents(t,e){var s;const i=this.w,a=this.ctx.toolbar,o=i.interact.zoomEnabled?i.config.chart.zoom.type:i.config.chart.selection.type,r=i.config.chart.toolbar.autoSelected;if(e.shiftKey?(this.shiftWasPressed=!0,a.enableZoomPanFromToolbar("pan"===r?"zoom":"pan")):this.shiftWasPressed&&(a.enableZoomPanFromToolbar(r),this.shiftWasPressed=!1),!e.target)return;const n=e.target.classList;let l;e.target.parentNode&&null!==e.target.parentNode&&(l=e.target.parentNode.classList);if(!(n.contains("apexcharts-legend-marker")||n.contains("apexcharts-legend-text")||l&&l.contains("apexcharts-toolbar"))){if(this.clientX="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientX:"touchend"===e.type?e.changedTouches[0].clientX:e.clientX,this.clientY="touchmove"===e.type||"touchstart"===e.type?e.touches[0].clientY:"touchend"===e.type?e.changedTouches[0].clientY:e.clientY,"mousedown"===e.type&&1===e.which||"touchstart"===e.type){const t=null==(s=this.gridRect)?void 0:s.getBoundingClientRect();if(!t)return;this.startX=this.clientX-t.left-i.globals.barPadForNumericAxis,this.startY=this.clientY-t.top,this.dragged=!1,this.w.interact.mousedown=!0}("mousemove"===e.type&&1===e.which||"touchmove"===e.type)&&(this.dragged=!0,i.interact.panEnabled?(i.interact.selection=null,this.w.interact.mousedown&&this.panDragging({context:this,zoomtype:o,xyRatios:t})):(this.w.interact.mousedown&&i.interact.zoomEnabled||this.w.interact.mousedown&&i.interact.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:o}))),"mouseup"!==e.type&&"touchend"!==e.type&&"mouseleave"!==e.type||this.handleMouseUp({zoomtype:o}),this.makeSelectionRectDraggable()}}handleMouseUp({zoomtype:t,isResized:e}){var s;const i=this.w,a=null==(s=this.gridRect)?void 0:s.getBoundingClientRect();a&&(this.w.interact.mousedown||e)&&(this.endX=this.clientX-a.left-i.globals.barPadForNumericAxis,this.endY=this.clientY-a.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(i.interact.zoomEnabled||i.interact.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:t})),i.interact.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.interact.mousedown=!1}mouseWheelEvent(t){const e=this.w;t.preventDefault();const s=Date.now();s-e.interact.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(t),e.interact.lastWheelExecution=s),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(()=>{s-e.interact.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(t),e.interact.lastWheelExecution=s)},this.debounceDelay)}executeMouseWheelZoom(t){var e;const s=this.w;this.minX=s.axisFlags.isRangeBar?s.globals.minY:s.globals.minX,this.maxX=s.axisFlags.isRangeBar?s.globals.maxY:s.globals.maxX;const i=null==(e=this.gridRect)?void 0:e.getBoundingClientRect();if(!i)return;const a=(t.clientX-i.left)/i.width,o=this.minX,r=this.maxX,n=r-o;let l,h,c;if(t.deltaY<0){l=.5*n;const t=o+a*n;h=t-l/2,c=t+l/2}else l=1.5*n,h=o-l/2,c=r+l/2;if(!s.axisFlags.isRangeBar){h=Math.max(h,s.globals.initialMinX),c=Math.min(c,s.globals.initialMaxX);const t=.01*(s.globals.initialMaxX-s.globals.initialMinX);if(c-h<t){const e=(h+c)/2;h=e-t/2,c=e+t/2}}const d=this._getNewMinXMaxX(h,c);isNaN(d.minX)||isNaN(d.maxX)||this.zoomUpdateOptions(d.minX,d.maxX)}makeSelectionRectDraggable(){const t=this.w;if(!this.selectionRect)return;const e=this.selectionRect.node.getBoundingClientRect();e.width>0&&e.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:()=>{},updateRot:()=>{},createHandle:(t,e,s,i,a)=>"l"===a||"r"===a?t.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):t.circle(0),updateHandle:(t,e)=>t.center(e[0],e[1])}).resize().on("resize",()=>{const e=t.interact.zoomEnabled?t.config.chart.zoom.type:t.config.chart.selection.type;this.handleMouseUp({zoomtype:e,isResized:!0})}))}preselectedSelection(){const t=this.w,e=this.xyRatios;if(!t.interact.zoomEnabled)if(void 0!==t.interact.selection&&null!==t.interact.selection)this.drawSelectionRect(l(n({},t.interact.selection),{translateX:t.layout.translateX,translateY:t.layout.translateY}));else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){let s=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,i=t.layout.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-s;t.axisFlags.isRangeBar&&(s=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,i=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);const a={x:s,y:0,width:i,height:t.layout.gridHeight,translateX:t.layout.translateX,translateY:t.layout.translateY,selectionEnabled:!0};this.drawSelectionRect(a),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}drawSelectionRect({x:t,y:e,width:s,height:i,translateX:a=0,translateY:o=0}){const r=this.w,n=this.zoomRect,l=this.selectionRect;if(this.dragged||null!==r.interact.selection){const h={transform:"translate("+a+", "+o+")"};r.interact.zoomEnabled&&this.dragged&&(s<0&&(s=1),n.attr({x:t,y:e,width:s,height:i,fill:r.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":r.config.chart.zoom.zoomedArea.fill.opacity,stroke:r.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":r.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":r.config.chart.zoom.zoomedArea.stroke.opacity}),T.setAttrs(n.node,h)),r.interact.selectionEnabled&&(l.attr({x:t,y:e,width:s>0?s:0,height:i>0?i:0,fill:r.config.chart.selection.fill.color,"fill-opacity":r.config.chart.selection.fill.opacity,stroke:r.config.chart.selection.stroke.color,"stroke-width":r.config.chart.selection.stroke.width,"stroke-dasharray":r.config.chart.selection.stroke.dashArray,"stroke-opacity":r.config.chart.selection.stroke.opacity}),T.setAttrs(l.node,h))}}hideSelectionRect(t){t&&t.attr({x:0,y:0,width:0,height:0})}selectionDrawing({context:t,zoomtype:e}){var s;const i=this.w,a=t,o=null==(s=this.gridRect)?void 0:s.getBoundingClientRect();if(!o)return;const r=a.startX-1,h=a.startY;let c=!1,d=!1;const g=a.clientX-o.left-i.globals.barPadForNumericAxis,p=a.clientY-o.top;let x=g-r,u=p-h,f={translateX:i.layout.translateX,translateY:i.layout.translateY};return Math.abs(x+r)>i.layout.gridWidth?x=i.layout.gridWidth-r:g<0&&(x=r),r>g&&(c=!0,x=Math.abs(x)),h>p&&(d=!0,u=Math.abs(u)),f="x"===e?{x:c?r-x:r,y:0,width:x,height:i.layout.gridHeight}:"y"===e?{x:0,y:d?h-u:h,width:i.layout.gridWidth,height:u}:{x:c?r-x:r,y:d?h-u:h,width:x,height:u},f=l(n({},f),{translateX:i.layout.translateX,translateY:i.layout.translateY}),a.drawSelectionRect(f),a.selectionDragging("resizing"),f}selectionDragging(t,e){var s;const i=this.w;if(!e)return;e.preventDefault();const{handler:a,box:o}=e.detail,r=this.constraints;let{x:n,y:l}=o;n<r.x&&(n=r.x),l<r.y&&(l=r.y),o.x2>r.x2&&(n=r.x2-o.w),o.y2>r.y2&&(l=r.y2-o.h),a.move(n,l);const h=this.xyRatios,c=this.selectionRect;let d=0;"resizing"===t&&(d=30);const g=t=>parseFloat(c.node.getAttribute(t)),p={x:g("x"),y:g("y"),width:g("width"),height:g("height")};i.interact.selection=p,"function"==typeof i.config.chart.events.selection&&i.interact.selectionEnabled&&(clearTimeout(null!=(s=this.w.globals.selectionResizeTimer)?s:void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{var t;const e=null==(t=this.gridRect)?void 0:t.getBoundingClientRect();if(!e)return;const s=c.node.getBoundingClientRect();let a,o,r,n;if(i.axisFlags.isRangeBar)a=i.globals.yAxisScale[0].niceMin+(s.left-e.left)*h.invertedYRatio,o=i.globals.yAxisScale[0].niceMin+(s.right-e.left)*h.invertedYRatio,r=0,n=1;else{if(!i.globals.xAxisScale)return;a=i.globals.xAxisScale.niceMin+(s.left-e.left)*h.xRatio,o=i.globals.xAxisScale.niceMin+(s.right-e.left)*h.xRatio,r=i.globals.yAxisScale[0].niceMin+(e.bottom-s.bottom)*h.yRatio[0],n=i.globals.yAxisScale[0].niceMax-(s.top-e.top)*h.yRatio[0]}const l={xaxis:{min:a,max:o},yaxis:{min:r,max:n}};i.config.chart.events.selection(this.ctx,l),i.config.chart.brush.enabled&&void 0!==i.config.chart.events.brushScrolled&&i.config.chart.events.brushScrolled(this.ctx,l)},d))}selectionDrawn({context:t,zoomtype:e}){var s,i;const a=this.w,o=t,r=this.xyRatios,n=this.ctx.toolbar,l=a.interact.zoomEnabled?o.zoomRect.node.getBoundingClientRect():o.selectionRect.node.getBoundingClientRect(),h=o.gridRect.getBoundingClientRect(),c=l.left-h.left-a.globals.barPadForNumericAxis,d=l.right-h.left-a.globals.barPadForNumericAxis,g=l.top-h.top,p=l.bottom-h.top;let x,u;if(a.axisFlags.isRangeBar)x=a.globals.yAxisScale[0].niceMin+c*r.invertedYRatio,u=a.globals.yAxisScale[0].niceMin+d*r.invertedYRatio;else{const t=null!=(i=null==(s=a.globals.xAxisScale)?void 0:s.niceMin)?i:0;x=t+c*r.xRatio,u=t+d*r.xRatio}const f=[],b=[];if(a.config.yaxis.forEach((t,e)=>{const s=a.globals.seriesYAxisMap[e][0],i=a.globals.yAxisScale[e].niceMax-r.yRatio[s]*g,o=a.globals.yAxisScale[e].niceMax-r.yRatio[s]*p;f.push(i),b.push(o)}),o.dragged&&(o.dragX>10||o.dragY>10)&&x!==u)if(a.interact.zoomEnabled){if(!a.globals.initialConfig)return;let t=m.clone(a.globals.initialConfig.yaxis),s=m.clone(a.globals.initialConfig.xaxis);if(a.interact.zoomed=!0,a.config.xaxis.convertedCatToNumeric&&(x=Math.floor(x),u=Math.floor(u),x<1&&(x=1,u=a.globals.dataPoints),u-x<2&&(u=x+1)),"xy"!==e&&"x"!==e||(s={min:x,max:u}),"xy"!==e&&"y"!==e||t.forEach((e,s)=>{t[s].min=b[s],t[s].max=f[s]}),n){const e=n.getBeforeZoomRange(s,t);e&&(s=e.xaxis?e.xaxis:s,t=e.yaxis?e.yaxis:t)}const i={xaxis:s};a.config.chart.group||(i.yaxis=t),o.ctx.updateHelpers._updateOptions(i,!1,o.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof a.config.chart.events.zoomed&&n.zoomCallback(s,t)}else if(a.interact.selectionEnabled){let t=null,s=null;if(s={min:x,max:u},"xy"===e||"y"===e){const e=m.clone(a.config.yaxis);t=e,e.forEach((t,s)=>{e[s].min=b[s],e[s].max=f[s]})}a.interact.selection=o.selection,"function"==typeof a.config.chart.events.selection&&a.config.chart.events.selection(o.ctx,{xaxis:s,yaxis:t})}}panDragging({context:t}){var e;const s=this.w,i=t;if(void 0!==s.interact.lastClientPosition.x){const t=s.interact.lastClientPosition.x-i.clientX,a=(null!=(e=s.interact.lastClientPosition.y)?e:0)-i.clientY;Math.abs(t)>Math.abs(a)&&t>0?this.moveDirection="left":Math.abs(t)>Math.abs(a)&&t<0?this.moveDirection="right":Math.abs(a)>Math.abs(t)&&a>0?this.moveDirection="up":Math.abs(a)>Math.abs(t)&&a<0&&(this.moveDirection="down")}s.interact.lastClientPosition={x:i.clientX,y:i.clientY};const a=s.axisFlags.isRangeBar?s.globals.minY:s.globals.minX,o=s.axisFlags.isRangeBar?s.globals.maxY:s.globals.maxX;i.panScrolled(a,o)}panScrolled(t,e){const s=this.w,i=this.xyRatios;if(!s.globals.initialConfig)return;const a=m.clone(s.globals.initialConfig.yaxis);let o=i.xRatio,r=s.globals.minX,n=s.globals.maxX;s.axisFlags.isRangeBar&&(o=i.invertedYRatio,r=s.globals.minY,n=s.globals.maxY),"left"===this.moveDirection?(t=r+s.layout.gridWidth/15*o,e=n+s.layout.gridWidth/15*o):"right"===this.moveDirection&&(t=r-s.layout.gridWidth/15*o,e=n-s.layout.gridWidth/15*o),s.axisFlags.isRangeBar||(t<s.globals.initialMinX||e>s.globals.initialMaxX)&&(t=r,e=n);const l={xaxis:{min:t,max:e}};s.config.chart.group||(l.yaxis=a),this.updateScrolledChart(l,t,e)}updateScrolledChart(t,e,s){const i=this.w;if(this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof i.config.chart.events.scrolled){const t={xaxis:{min:e,max:s}};i.config.chart.events.scrolled(this.ctx,t),this.ctx.events.fireEvent("scrolled",t)}}}});let oe=class{constructor(t){this.w=t.w,this.annoCtx=t}setOrientations(t,e=null){var s,i;const a=this.w;if("vertical"===t.label.orientation){const o=null!==e?e:0,r=a.dom.baseEl.querySelector(`.apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='${o}']`);if(null!==r){const e=r.getBBox();r.setAttribute("x",String(parseFloat(null!=(s=r.getAttribute("x"))?s:"0")-e.height+4));const a="top"===t.label.position?e.width:-e.width;r.setAttribute("y",String(parseFloat(null!=(i=r.getAttribute("y"))?i:"0")+a));const{x:o,y:n}=this.annoCtx.graphics.rotateAroundCenter(r);r.setAttribute("transform",`rotate(-90 ${o} ${n})`)}}}addBackgroundToAnno(t,e){const s=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;const i=s.dom.baseEl.querySelector(".apexcharts-grid");if(!i)return null;const a=i.getBoundingClientRect(),o=i.getBBox(),r=a.width/o.width||1,n=t.getBoundingClientRect();let{left:l,right:h,top:c,bottom:d}=e.label.style.padding;"vertical"===e.label.orientation&&([c,d,l,h]=[l,h,c,d]);const g=(n.left-a.left)/r-l,p=(n.top-a.top)/r-c,x=this.annoCtx.graphics.drawRect(g-s.globals.barPadForNumericAxis,p,n.width/r+l+h,n.height/r+c+d,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&x.node.classList.add(e.id),x}annotationsBackground(){const t=this.w,e=(e,s,i)=>{const a=t.dom.baseEl.querySelector(`.apexcharts-${i}-annotations .apexcharts-${i}-annotation-label[rel='${s}']`);if(a){const t=a.parentNode,s=this.addBackgroundToAnno(a,e);s&&(null==t||t.insertBefore(s.node,a),e.label.mouseEnter&&s.node.addEventListener("mouseenter",e.label.mouseEnter.bind(this,e)),e.label.mouseLeave&&s.node.addEventListener("mouseleave",e.label.mouseLeave.bind(this,e)),e.label.click&&s.node.addEventListener("click",e.label.click.bind(this,e)))}};t.config.annotations.xaxis.forEach((t,s)=>e(t,s,"xaxis")),t.config.annotations.yaxis.forEach((t,s)=>e(t,s,"yaxis")),t.config.annotations.points.forEach((t,s)=>e(t,s,"point"))}getY1Y2(t,e){var s,i;const a=this.w,o="y1"===t?e.y:e.y2;let r,n=!1;if(this.annoCtx.invertAxis){const t=a.config.xaxis.convertedCatToNumeric?a.labelData.categoryLabels:a.labelData.labels,i=t.indexOf(o),n=a.dom.baseEl.querySelector(`.apexcharts-yaxis-texts-g text:nth-child(${i+1})`);r=n?parseFloat(null!=(s=n.getAttribute("y"))?s:"0"):(a.layout.gridHeight/t.length-1)*(i+1)-a.globals.barHeight,void 0!==e.seriesIndex&&a.globals.barHeight&&(r-=a.globals.barHeight/2*(a.seriesData.series.length-1)-a.globals.barHeight*e.seriesIndex)}else{const t=a.globals.seriesYAxisMap[e.yAxisIndex][0],s=a.config.yaxis[e.yAxisIndex].logarithmic?new E(this.w).getLogVal(a.config.yaxis[e.yAxisIndex].logBase,o,t)/a.globals.yLogRatio[t]:(o-a.globals.minYArr[t])/(a.globals.yRange[t]/a.layout.gridHeight);r=a.layout.gridHeight-Math.min(Math.max(s,0),a.layout.gridHeight),n=s>a.layout.gridHeight||s<0,!e.marker||void 0!==e.y&&null!==e.y||(r=0),(null==(i=a.config.yaxis[e.yAxisIndex])?void 0:i.reversed)&&(r=s)}return"string"==typeof o&&o.includes("px")&&(r=parseFloat(o)),{yP:r,clipped:n}}getX1X2(t,e){const s=this.w,i="x1"===t?e.x:e.x2,a=this.annoCtx.invertAxis?s.globals.minY:s.globals.minX,o=this.annoCtx.invertAxis?s.globals.maxY:s.globals.maxX,r=this.annoCtx.invertAxis?s.globals.yRange[0]:s.globals.xRange;let n=!1,l=this.annoCtx.inversedReversedAxis?(o-i)/(r/s.layout.gridWidth):(i-a)/(r/s.layout.gridWidth);return"category"!==s.config.xaxis.type&&!s.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||s.axisFlags.dataFormatXNumeric||s.config.chart.sparkline.enabled||(l=this.getStringX(i)),"string"==typeof i&&i.includes("px")&&(l=parseFloat(i)),null==i&&e.marker&&(l=s.layout.gridWidth),void 0!==e.seriesIndex&&s.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=s.globals.barWidth/2*(s.seriesData.series.length-1)-s.globals.barWidth*e.seriesIndex),"number"!=typeof l&&(l=0,n=!0),parseFloat(l.toFixed(10))>parseFloat(s.layout.gridWidth.toFixed(10))?(l=s.layout.gridWidth,n=!0):l<0&&(l=0,n=!0),{x:l,clipped:n}}getStringX(t){var e;const s=this.w;let i=t;s.config.xaxis.convertedCatToNumeric&&s.labelData.categoryLabels.length&&(t=s.labelData.categoryLabels.indexOf(String(t))+1);const a=s.labelData.labels.map(t=>Array.isArray(t)?t.join(" "):t).indexOf(t),o=s.dom.baseEl.querySelector(`.apexcharts-xaxis-texts-g text:nth-child(${a+1})`);return o&&(i=parseFloat(null!=(e=o.getAttribute("x"))?e:"0")),i}};class re{constructor(t){this.w=t.w,this.annoCtx=t,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new oe(this.annoCtx)}addXaxisAnnotation(t,e,s){const i=this.w,a=this.helpers.getX1X2("x1",t);let o=a.x;const r=a.clipped;let n,l=!0;const h=t.label.text,c=t.strokeDashArray;if(m.isNumber(o)){if(null===t.x2||void 0===t.x2){if(!r){const s=this.annoCtx.graphics.drawLine(o+t.offsetX,0+t.offsetY,o+t.offsetX,i.layout.gridHeight+t.offsetY,t.borderColor,c,t.borderWidth);e.appendChild(s.node),t.id&&s.node.classList.add(t.id)}}else{const s=this.helpers.getX1X2("x2",t);if(n=s.x,l=s.clipped,n<o){const t=o;o=n,n=t}const a=this.annoCtx.graphics.drawRect(o+t.offsetX,0+t.offsetY,n-o,i.layout.gridHeight+t.offsetY,0,t.fillColor,t.opacity,1,t.borderColor,c);a.node.classList.add("apexcharts-annotation-rect"),a.attr("clip-path",`url(#gridRectMask${i.globals.cuid})`),e.appendChild(a.node),t.id&&a.node.classList.add(t.id)}if(!r||!l){const a=this.annoCtx.graphics.getTextRects(h,t.label.style.fontSize),r="top"===t.label.position?4:"center"===t.label.position?i.layout.gridHeight/2+("vertical"===t.label.orientation?a.width/2:0):i.layout.gridHeight,n=this.annoCtx.graphics.drawText({x:o+t.label.offsetX,y:r+t.label.offsetY-("vertical"===t.label.orientation?"top"===t.label.position?a.width/2-12:-a.width/2:0),text:h,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-xaxis-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});n.attr({rel:s}),e.appendChild(n.node),this.annoCtx.helpers.setOrientations(t,s)}}}drawXAxisAnnotations(){const t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return t.config.annotations.xaxis.map((t,s)=>{this.addXaxisAnnotation(t,e.node,s)}),e}}class ne{constructor(t){this.w=t.w,this.annoCtx=t,this.helpers=new oe(this.annoCtx),this.axesUtils=new G(this.annoCtx.w,{theme:this.annoCtx.theme,timeScale:this.annoCtx.timeScale})}addYaxisAnnotation(t,e,s){const i=this.w,a=t.strokeDashArray;let o=this.helpers.getY1Y2("y1",t),r=o.yP;const n=o.clipped;let l,h=!0,c=!1;const d=t.label.text;if(null===t.y2||void 0===t.y2){if(!n){c=!0;const s=this.annoCtx.graphics.drawLine(0+t.offsetX,r+t.offsetY,this._getYAxisAnnotationWidth(t),r+t.offsetY,t.borderColor,a,t.borderWidth);e.appendChild(s.node),t.id&&s.node.classList.add(t.id)}}else{if(o=this.helpers.getY1Y2("y2",t),l=o.yP,h=o.clipped,l>r){const t=r;r=l,l=t}if(!n||!h){c=!0;const s=this.annoCtx.graphics.drawRect(0+t.offsetX,l+t.offsetY,this._getYAxisAnnotationWidth(t),r-l,0,t.fillColor,t.opacity,1,t.borderColor,a);s.node.classList.add("apexcharts-annotation-rect"),s.attr("clip-path",`url(#gridRectMask${i.globals.cuid})`),e.appendChild(s.node),t.id&&s.node.classList.add(t.id)}}if(c){const a="right"===t.label.position?i.layout.gridWidth:"center"===t.label.position?i.layout.gridWidth/2:0,o=this.annoCtx.graphics.drawText({x:a+t.label.offsetX,y:(null!=l?l:r)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-yaxis-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});o.attr({rel:s}),e.appendChild(o.node)}}_getYAxisAnnotationWidth(t){const e=this.w;let s=e.layout.gridWidth;return s=t.width.indexOf("%")>-1?e.layout.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10),s+t.offsetX}drawYAxisAnnotations(){const t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return t.config.annotations.yaxis.forEach((t,s)=>{t.yAxisIndex=this.axesUtils.translateYAxisIndex(t.yAxisIndex),this.axesUtils.isYAxisHidden(t.yAxisIndex)&&this.axesUtils.yAxisAllSeriesCollapsed(t.yAxisIndex)||this.addYaxisAnnotation(t,e.node,s)}),e}}class le{constructor(t){this.w=t.w,this.annoCtx=t,this.helpers=new oe(this.annoCtx)}addPointAnnotation(t,e,s){if(this.w.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)return;const i=this.helpers.getX1X2("x1",t),a=i.x,o=i.clipped,r=this.helpers.getY1Y2("y1",t),n=r.yP,l=r.clipped;if(m.isNumber(a)&&!l&&!o){const i={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:`apexcharts-point-annotation-marker ${t.marker.cssClass} ${t.id?t.id:""}`};let o=this.annoCtx.graphics.drawMarker(a+t.marker.offsetX,n+t.marker.offsetY,i);e.appendChild(o.node);const r=t.label.text?t.label.text:"",l=this.annoCtx.graphics.drawText({x:a+t.label.offsetX,y:n+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:r,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-point-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});if(l.attr({rel:s}),e.appendChild(l.node),t.customSVG.SVG){const s=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});s.attr({transform:`translate(${a+t.customSVG.offsetX}, ${n+t.customSVG.offsetY})`}),s.node.innerHTML=t.customSVG.SVG,e.appendChild(s.node)}if(t.image.path){const e=t.image.width?t.image.width:20,s=t.image.height?t.image.height:20;o=this.annoCtx.addImage({x:a+t.image.offsetX-e/2,y:n+t.image.offsetY-s/2,width:e,height:s,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&o.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&o.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&o.node.addEventListener("click",t.click.bind(this,t))}}drawPointAnnotations(){const t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return t.config.annotations.points.map((t,s)=>{this.addPointAnnotation(t,e.node,s)}),e}}te.registerFeatures({annotations:class{constructor(t,{theme:e=null,timeScale:s=null}={}){this.w=t,this.theme=e,this.timeScale=s,this.invertAxis=void 0,this.inversedReversedAxis=void 0,this.graphics=new T(this.w),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new oe(this),this.xAxisAnnotations=new re(this),this.yAxisAnnotations=new ne(this),this.pointsAnnotations=new le(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.layout.gridWidth/this.w.globals.dataPoints}drawAxesAnnotations(){const t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){const e=this.yAxisAnnotations.drawYAxisAnnotations(),s=this.xAxisAnnotations.drawXAxisAnnotations(),i=this.pointsAnnotations.drawPointAnnotations(),a=t.config.chart.animations.enabled,o=[e,s,i],r=[s.node,e.node,i.node];for(let e=0;e<3;e++)t.dom.elGraphical.add(o[e]),!a||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&r[e].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:r[e],index:0});this.helpers.annotationsBackground()}}drawImageAnnos(){this.w.config.annotations.images.map(t=>{this.addImage(t)})}drawTextAnnos(){this.w.config.annotations.texts.map(t=>{this.addText(t)})}addXaxisAnnotation(t,e,s){this.xAxisAnnotations.addXaxisAnnotation(t,e,s)}addYaxisAnnotation(t,e,s){this.yAxisAnnotations.addYaxisAnnotation(t,e,s)}addPointAnnotation(t,e,s){this.pointsAnnotations.addPointAnnotation(t,e,s)}addText(t){const{x:e,y:s,text:i,textAnchor:a,foreColor:o,fontSize:r,fontFamily:n,fontWeight:l,cssClass:h,backgroundColor:c,borderWidth:d,strokeDashArray:g,borderRadius:p,borderColor:x,appendTo:u=".apexcharts-svg",paddingLeft:f=4,paddingRight:b=4,paddingBottom:m=2,paddingTop:y=2}=t,w=this.w,v=this.graphics.drawText({x:e,y:s,text:i,textAnchor:a||"start",fontSize:r||"12px",fontWeight:l||"regular",fontFamily:n||w.config.chart.fontFamily,foreColor:o||w.config.chart.foreColor,cssClass:h}),A=w.dom.baseEl.querySelector(u);A&&A.appendChild(v.node);const C=v.bbox();if(i){const t=this.graphics.drawRect(C.x-f,C.y-y,C.width+f+b,C.height+m+y,p,c||"transparent",1,d,x,g);A.insertBefore(t.node,v.node)}}addImage(t){const e=this.w,{path:s,x:i=0,y:a=0,width:o=20,height:r=20,appendTo:n=".apexcharts-svg"}=t,l=e.dom.Paper.image(s);l.size(o,r).move(i,a);const h=e.dom.baseEl.querySelector(n);return h&&h.appendChild(l.node),l}addXaxisAnnotationExternal(t,e,s){return this.addAnnotationExternal({params:t,pushToMemory:e,context:s,type:"xaxis",contextMethod:s.addXaxisAnnotation}),s}addYaxisAnnotationExternal(t,e,s){return this.addAnnotationExternal({params:t,pushToMemory:e,context:s,type:"yaxis",contextMethod:s.addYaxisAnnotation}),s}addPointAnnotationExternal(t,e,s){return void 0===this.invertAxis&&(this.invertAxis=s.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:s,type:"point",contextMethod:s.addPointAnnotation}),s}addAnnotationExternal({params:t,pushToMemory:e,context:s,type:i,contextMethod:a}){const o=s,r=o.w,n=r.dom.baseEl.querySelector(`.apexcharts-${i}-annotations`),l=n.childNodes.length+1,h=new k,c=Object.assign({},"xaxis"===i?h.xAxisAnnotation:"yaxis"===i?h.yAxisAnnotation:h.pointAnnotation),d=m.extend(c,t);switch(i){case"xaxis":this.addXaxisAnnotation(d,n,l);break;case"yaxis":this.addYaxisAnnotation(d,n,l);break;case"point":this.addPointAnnotation(d,n,l)}const g=r.dom.baseEl.querySelector(`.apexcharts-${i}-annotations .apexcharts-${i}-annotation-label[rel='${l}']`),p=this.helpers.addBackgroundToAnno(g,d);return p&&n.insertBefore(p.node,g),e&&r.globals.memory.methodsToExec.push({context:o,id:d.id?d.id:m.randomId(),method:a,label:"addAnnotation",params:t}),s}clearAnnotations(t){const e=t.w,s=e.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");for(let t=e.globals.memory.methodsToExec.length-1;t>=0;t--)"addText"!==e.globals.memory.methodsToExec[t].label&&"addAnnotation"!==e.globals.memory.methodsToExec[t].label||e.globals.memory.methodsToExec.splice(t,1);Array.prototype.forEach.call(s,t=>{for(;t.firstChild;)t.removeChild(t.firstChild)})}removeAnnotation(t,e){const s=t.w,i=s.dom.baseEl.querySelectorAll(`.${e}`);i&&(s.globals.memory.methodsToExec.map((t,i)=>{t.id===e&&s.globals.memory.methodsToExec.splice(i,1)}),Object.keys(s.config.annotations).forEach(t=>{const i=s.config.annotations[t];Array.isArray(i)&&(s.config.annotations[t]=i.filter(t=>t.id!==e))}),Array.prototype.forEach.call(i,t=>{t.parentElement.removeChild(t)}))}}});te.registerFeatures({keyboardNavigation:class{constructor(t,e){this.w=t,this.ctx=e,this.seriesIndex=0,this.dataPointIndex=0,this.active=!1,this._focusedEl=null,this._hoveredBarEl=null,this._enlargedScatterMarker=null,this._onKeyDown=this._onKeyDown.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onLegendClick=this._onLegendClick.bind(this)}init(){const t=this.w.dom.Paper.node;t&&(t.setAttribute("tabindex","0"),t.addEventListener("focus",this._onFocus),t.addEventListener("blur",this._onBlur),t.addEventListener("keydown",this._onKeyDown,{passive:!1}),this.ctx.events.addEventListener("legendClick",this._onLegendClick))}destroy(){const t=this.w,e=t.dom.Paper&&t.dom.Paper.node;e&&(e.removeEventListener("focus",this._onFocus),e.removeEventListener("blur",this._onBlur),e.removeEventListener("keydown",this._onKeyDown),this.ctx.events.removeEventListener("legendClick",this._onLegendClick))}handleKey(t){}_onFocus(){this._isNavEnabled()&&(this.active=!0,this._clampCursor(),this._snapToVisibleRange(),this._showCurrentPoint())}_onBlur(){this.active=!1,this._hideFocus()}_onLegendClick(){this.active&&(this.active=!1,this._hideFocus())}_onKeyDown(t){if(this._isNavEnabled()&&this.active)switch(t.key){case"ArrowRight":t.preventDefault(),this._move(0,1);break;case"ArrowLeft":t.preventDefault(),this._move(0,-1);break;case"ArrowUp":t.preventDefault(),this._move(-1,0);break;case"ArrowDown":t.preventDefault(),this._move(1,0);break;case"Home":t.preventDefault(),this.dataPointIndex=0,this._skipNullForward(),this._showCurrentPoint();break;case"End":t.preventDefault(),this.dataPointIndex=this._getDataPointCount(this.seriesIndex)-1,this._skipNullBackward(),this._showCurrentPoint();break;case"Enter":case" ":t.preventDefault(),this._fireClick();break;case"Escape":t.preventDefault(),this.active=!1,this._hideFocus()}}_move(t,e){const s=this.w,i=s.config.chart.accessibility.keyboard.navigation.wrapAround;if(0!==t){const e=this.w.globals.tooltip;if(e&&e.tConfig&&e.tConfig.shared){const t=this.dataPointIndex;if(e.tooltipUtil&&e.tooltipUtil.isXoverlap(t)&&e.tooltipUtil.isInitialSeriesSameLen())return}const a=this._getSeriesCount();let o=this.seriesIndex+t,r=0;for(;r<a&&(o<0&&(o=i?a-1:0),o>=a&&(o=i?0:a-1),s.globals.collapsedSeriesIndices.includes(o));)o+=t,r++;this.seriesIndex=o;const n=this._getDataPointCount(o);this.dataPointIndex>=n&&(this.dataPointIndex=n-1)}if(0!==e){const t=this._getDataPointCount(this.seriesIndex);let s=this.dataPointIndex+e;s<0&&(s=i?t-1:0),s>=t&&(s=i?0:t-1),this.dataPointIndex=s,e>0?this._skipNullForward():this._skipNullBackward(),this._isDataPointVisible(this.seriesIndex,this.dataPointIndex)||this._snapToVisibleRangeInDirection(e)}this._showCurrentPoint()}_skipNullForward(){const t=this.w,e=this.seriesIndex,s=this._getDataPointCount(e);let i=this.dataPointIndex,a=0;if(Array.isArray(t.seriesData.series[e])){for(;a<s&&null===t.seriesData.series[e][i];)i=(i+1)%s,a++;this.dataPointIndex=i}}_skipNullBackward(){const t=this.w,e=this.seriesIndex,s=this._getDataPointCount(e);let i=this.dataPointIndex,a=0;if(Array.isArray(t.seriesData.series[e])){for(;a<s&&null===t.seriesData.series[e][i];)i=(i-1+s)%s,a++;this.dataPointIndex=i}}_showCurrentPoint(){const{seriesIndex:t,dataPointIndex:e}=this,s=this.w,i=s.globals.tooltip;i&&i.ttItems&&(s.interact.capturedSeriesIndex=t,s.interact.capturedDataPointIndex=e,this._applyFocusClass(t,e),this._showTooltip(t,e,i))}_hideFocus(){const t=this.w,e=t.globals.tooltip;if(this._removeFocusClass(),this._leaveHoveredBar(),!e)return;e.marker&&e.marker.resetPointsSize(),this._enlargedScatterMarker=null;const s=e.getElTooltip();s&&(s.classList.remove("apexcharts-active"),t.config.chart.accessibility.enabled&&t.config.chart.accessibility.announcements.enabled&&s.setAttribute("aria-hidden","true")),t.dom.baseEl.classList.remove("apexcharts-tooltip-active");const i=e.getElXCrosshairs();i&&i.classList.remove("apexcharts-active")}_showTooltip(t,e,s){const i=this.w,a=i.config.chart.type,o=s.getElTooltip();if(!o)return;const r=s.getCachedDimensions();s.tooltipRect={x:0,y:0,ttWidth:r.ttWidth||0,ttHeight:r.ttHeight||0},this._setSyntheticEvent(t,e,s),i.dom.baseEl.classList.add("apexcharts-tooltip-active"),o.classList.add("apexcharts-active"),i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&o.removeAttribute("aria-hidden"),"pie"===a||"donut"===a||"polarArea"===a?this._showTooltipNonAxis(t,e,s,o):"radialBar"===a?this._showTooltipRadialBar(t,e,s,o):"heatmap"===a||"treemap"===a?this._showTooltipHeatTree(t,e,s,o,a):"bar"===a||"candlestick"===a||"boxPlot"===a||"rangeBar"===a?this._showTooltipBar(t,e,s):this._showTooltipAxisLine(t,e,s)}_setSyntheticEvent(t,e,s){const i=this.w,a=i.config.chart.type;let o=0,r=0;const n=this._getFocusableElement(t,e);if(n){const t=n.getBoundingClientRect();o=t.left+t.width/2,r=t.top+t.height/2}else if(i.globals.pointsArray&&i.globals.pointsArray[t]&&i.globals.pointsArray[t][e]){const a=i.globals.pointsArray[t][e],n=s.getElGrid&&s.getElGrid();if(n){const t=n.getBoundingClientRect();o=t.left+(a[0]||0),r=t.top+(a[1]||0)}}else{const t=i.dom.Paper&&i.dom.Paper.node;if(t){const e=t.getBoundingClientRect();o=e.left+e.width/2,r=e.top+e.height/2}}if(("line"===a||"area"===a||"rangeArea"===a||"scatter"===a||"bubble"===a||"radar"===a)&&i.globals.pointsArray&&i.globals.pointsArray[t]&&i.globals.pointsArray[t][e]){const a=i.globals.pointsArray[t][e],n=s.getElGrid&&s.getElGrid();if(n){const t=n.getBoundingClientRect();o=t.left+(a[0]||0),r=t.top+(a[1]||0)}}s.e={type:"mousemove",clientX:o,clientY:r}}_showTooltipBar(t,e,s){var i,a,o,r;const h=this.w,c=s.tConfig.shared&&(s.tooltipUtil.isXoverlap(e)||h.globals.isBarHorizontal)&&s.tooltipUtil.isInitialSeriesSameLen(),d=null==(r=null==(o=null==(a=null==(i=h.rangeData.seriesRange)?void 0:i[t])?void 0:a[e])?void 0:o.y)?void 0:r[0];s.tooltipLabels.drawSeriesTexts(l(n(n({ttItems:s.ttItems,i:t,j:e},void 0!==(null==d?void 0:d.y1)&&{y1:d.y1}),void 0!==(null==d?void 0:d.y2)&&{y2:d.y2}),{shared:c}));const g=`.apexcharts-series[data\\:realIndex='${t}']`,p=h.dom.Paper.findOne(`${g} path[j='${e}'], ${g} circle[j='${e}'], ${g} rect[j='${e}']`);if(p){this._leaveHoveredBar();new T(this.w,this.ctx).pathMouseEnter(p,null),this._hoveredBarEl=p}if(h.globals.isBarHorizontal){const t=p&&p.node;if(t){const e=h.dom.elWrap.getBoundingClientRect(),i=t.getBoundingClientRect(),a=i.left-e.left,o=i.top-e.top,r=i.height,n=i.width,l=s.tooltipRect.ttWidth||0,c=o+r/2-(s.tooltipRect.ttHeight||0)/2;let d=a+n;a<(s.xyRatios&&null!=s.xyRatios.baseLineInvertedY?s.xyRatios.baseLineInvertedY:e.width/2)&&(d=a-l);const g=s.getElTooltip();g&&(g.style.left=d+"px",g.style.top=c+"px")}}else s.tooltipPosition.moveStickyTooltipOverBars(e,t)}_showTooltipAxisLine(t,e,s){const i=this.w,a=i.config.chart.type,o=s.tConfig.shared&&s.tooltipUtil.isXoverlap(e)&&s.tooltipUtil.isInitialSeriesSameLen();s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,j:e,shared:o});const r="scatter"===a||"bubble"===a,n=i.globals.markers.largestSize>0;r?this._showScatterBubblePoint(t,e,s):n?o?s.marker.enlargePoints(e):s.tooltipPosition.moveDynamicPointOnHover(e,t):o?s.tooltipPosition.moveDynamicPointsOnHover(e):s.tooltipPosition.moveDynamicPointOnHover(e,t)}_showScatterBubblePoint(t,e,s){const i=this.w.dom.baseEl;this._enlargedScatterMarker&&(s.marker.oldPointSize(this._enlargedScatterMarker),this._enlargedScatterMarker=null);const a=i.querySelector(`.apexcharts-series[data\\:realIndex='${t}']`);if(!a)return;const o=a.querySelector(`.apexcharts-marker[rel='${e}']`);o&&(s.marker.enlargeCurrentPoint(e,o),this._enlargedScatterMarker=o)}_showTooltipNonAxis(t,e,s,i){var a,o;const r=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,shared:!1});const n=i.getBoundingClientRect(),l=n.width||s.tooltipRect.ttWidth||0,h=n.height||s.tooltipRect.ttHeight||0,c=r.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${e}']`);if(c){const t=parseFloat(null!=(a=c.getAttribute("data:cx"))?a:""),e=parseFloat(null!=(o=c.getAttribute("data:cy"))?o:"");if(!isNaN(t)&&!isNaN(e)){const s=r.dom.Paper.node.getBoundingClientRect(),a=r.dom.elWrap.getBoundingClientRect(),o=s.left-a.left,n=s.top-a.top;i.style.left=o+t-l/2+"px",i.style.top=n+e-h-10+"px"}}}_showTooltipRadialBar(t,e,s,i){var a;const o=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,shared:!1});const{ttWidth:r=0,ttHeight:n=0}=s.getCachedDimensions(),l=o.dom.baseEl.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${t}'] path`);if(l){const e=parseFloat(null!=(a=l.getAttribute("data:angle"))?a:"")||0,s=(o.config.plotOptions.radialBar.startAngle||0)+e/2,h=o.layout.gridWidth/2,c=o.layout.gridHeight/2,d=o.globals.radialSize||Math.min(o.layout.gridWidth,o.layout.gridHeight)/2,g=o.seriesData.series.length,p=d/Math.max(g,1),x=d-t*p,u=(x+(x-p))/2,f=m.polarToCartesian(h,c,u,s),b=f.x+(o.layout.translateX||0),y=f.y+(o.layout.translateY||0);i.style.left=b-r/2+"px",i.style.top=y-n-10+"px"}}_showTooltipHeatTree(t,e,s,i,a){var o,r;const n=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,j:e,shared:!1});const l=i.getBoundingClientRect(),h=l.width||s.tooltipRect.ttWidth||0,c=l.height||s.tooltipRect.ttHeight||0,d="heatmap"===a?"apexcharts-heatmap-rect":"apexcharts-treemap-rect",g=n.dom.baseEl.querySelector(`.${d}[i='${t}'][j='${e}']`);if(g){const t=n.dom.elWrap.getBoundingClientRect(),e=g.getBoundingClientRect(),a=e.left-t.left,l=e.top-t.top,d=e.width,p=e.height,x=parseFloat(null!=(o=g.getAttribute("cx"))?o:""),u=parseFloat(null!=(r=g.getAttribute("width"))?r:"");s.tooltipPosition.moveXCrosshairs(x+u/2);let f=a+d+h/2;const b=l+p/2-c/2;a+d>n.layout.gridWidth/2&&(f=a-h/2),i.style.left=f+"px",i.style.top=b+"px"}}_applyFocusClass(t,e){this._removeFocusClass();const s=this._getFocusableElement(t,e);s&&(s.classList.add("apexcharts-keyboard-focused"),this._focusedEl=s)}_removeFocusClass(){this._focusedEl&&(this._focusedEl.classList.remove("apexcharts-keyboard-focused"),this._focusedEl=null)}_leaveHoveredBar(){if(this._hoveredBarEl){new T(this.w,this.ctx).pathMouseLeave(this._hoveredBarEl,null),this._hoveredBarEl=null}}_getFocusableElement(t,e){const s=this.w,i=s.config.chart.type,a=s.dom.baseEl;if("pie"===i||"donut"===i||"polarArea"===i)return a.querySelector(`.apexcharts-pie-area[j='${e}']`);if("heatmap"===i)return a.querySelector(`.apexcharts-heatmap-rect[i='${t}'][j='${e}']`);if("treemap"===i)return a.querySelector(`.apexcharts-treemap-rect[i='${t}'][j='${e}']`);if("radialBar"===i)return a.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${t}'] path`);if("bar"===i||"candlestick"===i||"boxPlot"===i||"rangeBar"===i)return a.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] path[j='${e}']`);return a.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-marker[rel='${e}']`)||null}_fireClick(){const t=this.w.globals.tooltip;if(!t)return;t.markerClick({type:"mouseup",clientX:0,clientY:0},this.seriesIndex,this.dataPointIndex)}_isNavEnabled(){const t=this.w.config.chart.accessibility;return t.enabled&&t.keyboard.enabled&&t.keyboard.navigation.enabled}_getSeriesCount(){const t=this.w,e=t.config.chart.type;return"pie"===e||"donut"===e||"polarArea"===e?1:t.seriesData.series.length}_getDataPointCount(t){const e=this.w,s=e.config.chart.type;if("pie"===s||"donut"===s||"polarArea"===s)return e.seriesData.series.length;const i=e.seriesData.series;return i[t]&&Array.isArray(i[t])?i[t].length:0}_clampCursor(){const t=this._getSeriesCount();this.seriesIndex>=t&&(this.seriesIndex=t-1),this.seriesIndex<0&&(this.seriesIndex=0);const e=this._getDataPointCount(this.seriesIndex);this.dataPointIndex>=e&&(this.dataPointIndex=e-1),this.dataPointIndex<0&&(this.dataPointIndex=0)}_snapToVisibleRange(){const t=this.w,e=t.globals,s=this.seriesIndex;if(!t.interact.zoomed)return;const i=t.seriesData.seriesX&&t.seriesData.seriesX[s];if(!i||!i.length)return;const a=e.minX,o=e.maxX;if(void 0===a||void 0===o)return;const r=i[this.dataPointIndex];if(r>=a&&r<=o)return;const n=i.length;for(let t=0;t<n;t++)if(i[t]>=a&&i[t]<=o)return void(this.dataPointIndex=t)}_snapToVisibleRangeInDirection(t){const e=this.w,s=e.globals,i=this.seriesIndex,a=e.seriesData.seriesX&&e.seriesData.seriesX[i];if(!a||!a.length)return;const o=s.minX,r=s.maxX;if(void 0===o||void 0===r)return;const n=a.length;if(t>=0){for(let t=0;t<n;t++)if(a[t]>=o&&a[t]<=r)return void(this.dataPointIndex=t)}else for(let t=n-1;t>=0;t--)if(a[t]>=o&&a[t]<=r)return void(this.dataPointIndex=t)}_isDataPointVisible(t,e){const s=this.w,i=s.globals;if(!s.interact.zoomed)return!0;const a=s.seriesData.seriesX&&s.seriesData.seriesX[t];if(!a)return!0;const o=a[e];return void 0===o||o>=i.minX&&o<=i.maxX}}});class he{constructor(t){this.w=t.w,this.barCtx=t,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}handleBarDataLabels(t){const{x:e,y:s,y1:i,y2:a,i:o,j:r,realIndex:h,columnGroupIndex:c,series:d,barHeight:g,barWidth:p,barXPosition:x,barYPosition:u,visibleSeries:f}=t,b=this.w,m=new T(this.barCtx.w),y=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[h]:this.barCtx.strokeWidth;let w,v;b.axisFlags.isXNumeric&&!b.globals.isBarHorizontal?(w=e+p*(f+1),v=s+g*(f+1)-y):(w=e+p*f,v=s+g*f);let A=null,C=null,S=e,k=s,D={};const L=b.config.dataLabels,P=this.barCtx.barOptions.dataLabels,M=this.barCtx.barOptions.dataLabels.total;void 0!==u&&this.barCtx.isRangeBar&&(v=u,k=u),void 0!==x&&this.barCtx.isVerticalGroupedRangeBar&&(w=x,S=x);const I=L.offsetX,E=L.offsetY;let F={width:0,height:0};if(b.config.dataLabels.enabled){const t=b.seriesData.series[o][r];F=m.getTextRects(b.config.dataLabels.formatter?b.config.dataLabels.formatter(t,l(n({},b),{seriesIndex:o,dataPointIndex:r,w:b})):b.formatters.yLabelFormatters[0](t),parseFloat(L.style.fontSize).toString())}const X={x:e,y:s,i:o,j:r,realIndex:h,columnGroupIndex:c,bcx:w,bcy:v,barHeight:g,barWidth:p,textRects:F,strokeWidth:y,dataLabelsX:S,dataLabelsY:k,dataLabelsConfig:L,barDataLabelsConfig:P,barTotalDataLabelsConfig:M,offX:I,offY:E};return D=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(X):this.calculateColumnsDataLabelsPosition(X),A=this.drawCalculatedDataLabels({x:D.dataLabelsX,y:D.dataLabelsY,val:this.barCtx.isRangeBar?[i,a]:"100%"===b.config.chart.stackType?d[h][r]:b.seriesData.series[h][r],i:h,j:r,barWidth:p,barHeight:g,textRects:F,dataLabelsConfig:L}),b.config.chart.stacked&&M.enabled&&(C=this.drawTotalDataLabels({x:D.totalDataLabelsX,y:D.totalDataLabelsY,barWidth:p,barHeight:g,realIndex:h,textAnchor:D.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:h,j:r}),dataLabelsConfig:L,barTotalDataLabelsConfig:M})),{dataLabelsPos:D,dataLabels:A,totalDataLabels:C}}getStackedTotalDataLabel({realIndex:t,j:e}){const s=this.w;let i=this.barCtx.stackedSeriesTotals[e];return this.totalFormatter&&(i=this.totalFormatter(i,l(n({},s),{seriesIndex:t,dataPointIndex:e,w:s}))),i}calculateColumnsDataLabelsPosition(t){const e=this.w;let s,i,{i:a,j:o,realIndex:r,y:n,bcx:l,barWidth:h,barHeight:c,textRects:d,dataLabelsX:g,dataLabelsY:p,dataLabelsConfig:x,barDataLabelsConfig:u,barTotalDataLabelsConfig:f,strokeWidth:b,offX:m,offY:y}=t;const w=l;c=Math.abs(c);const v="vertical"===e.config.plotOptions.bar.dataLabels.orientation,{zeroEncounters:A}=this.barCtx.barHelpers.getZeroValueEncounters({i:a,j:o});l-=b/2;const C=e.layout.gridWidth/e.globals.dataPoints;if(this.barCtx.isVerticalGroupedRangeBar?g+=h/2:(g=e.axisFlags.isXNumeric?l-h/2+m:l-C+h/2+m,!e.config.chart.stacked&&A>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(g-=h*A)),v){const t=2;g=g+d.height/2-b/2-t}const S=e.seriesData.series[a][o]<0;let k=n;switch(this.barCtx.isReversed&&(k=n+(S?c:-c)),u.position){case"center":p=v?S?k-c/2+y:k+c/2-y:S?k-c/2+d.height/2+y:k+c/2+d.height/2-y;break;case"bottom":p=v?S?k-c+y:k+c-y:S?k-c+d.height+b+y:k+c-d.height/2+b-y;break;case"top":p=v?S?k+y:k-y:S?k-d.height/2-y:k+d.height+y}let D=k;if(e.labelData.seriesGroups.forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevY.forEach(t=>{D=S?Math.max(t[o],D):Math.min(t[o],D)})}),this.barCtx.lastActiveBarSerieIndex===r&&f.enabled){const t=18,a=new T(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:o}),x.fontSize);s=S?D-a.height/2-y-f.offsetY+t:D+a.height+y+f.offsetY-t;const n=C;i=w+(e.axisFlags.isXNumeric?-h*e.globals.barGroups.length/2:e.globals.barGroups.length*h/2-(e.globals.barGroups.length-1)*h-n)+f.offsetX}return e.config.chart.stacked||(p<0?p=0+b:p+d.height/3>e.layout.gridHeight&&(p=e.layout.gridHeight-b)),{bcx:l,bcy:n,dataLabelsX:g,dataLabelsY:p,totalDataLabelsX:i,totalDataLabelsY:s,totalDataLabelsAnchor:"middle"}}calculateBarsDataLabelsPosition(t){const e=this.w;let{x:s,i:i,j:a,realIndex:o,bcy:r,barHeight:n,barWidth:l,textRects:h,dataLabelsX:c,strokeWidth:d,dataLabelsConfig:g,barDataLabelsConfig:p,barTotalDataLabelsConfig:x,offX:u,offY:f}=t;const b=e.layout.gridHeight/e.globals.dataPoints,{zeroEncounters:m}=this.barCtx.barHelpers.getZeroValueEncounters({i:i,j:a});l=Math.abs(l);let y,w,v=r-(this.barCtx.isRangeBar?0:b)+n/2+h.height/2+f-3;!e.config.chart.stacked&&m>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(v-=n*m);let A="start";const C=e.seriesData.series[i][a]<0;let S=s;switch(this.barCtx.isReversed&&(S=s+(C?-l:l),A=C?"start":"end"),p.position){case"center":c=C?S+l/2-u:Math.max(h.width/2,S-l/2)+u;break;case"bottom":c=C?S+l-d-u:S-l+d+u;break;case"top":c=C?S-d-u:S-d+u}let k=S;if(e.labelData.seriesGroups.forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevX.forEach(t=>{k=C?Math.min(t[a],k):Math.max(t[a],k)})}),this.barCtx.lastActiveBarSerieIndex===o&&x.enabled){const t=new T(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:a}),g.fontSize);C?(y=k-d-u-x.offsetX,A="end"):y=k+u+x.offsetX+(this.barCtx.isReversed?-(l+d):d),w=v-h.height/2+t.height/2+x.offsetY+d,e.globals.barGroups.length>1&&(w-=e.globals.barGroups.length/2*(n/2))}return e.config.chart.stacked||("start"===g.textAnchor?c-h.width<0?c=C?h.width+d:d:c+h.width>e.layout.gridWidth&&(c=C?e.layout.gridWidth-d:e.layout.gridWidth-h.width-d):"middle"===g.textAnchor?c-h.width/2<0?c=h.width/2+d:c+h.width/2>e.layout.gridWidth&&(c=e.layout.gridWidth-h.width/2-d):"end"===g.textAnchor&&(c<1?c=h.width+d:c+1>e.layout.gridWidth&&(c=e.layout.gridWidth-h.width-d))),{bcx:s,bcy:r,dataLabelsX:c,dataLabelsY:v,totalDataLabelsX:y,totalDataLabelsY:w,totalDataLabelsAnchor:A}}drawCalculatedDataLabels({x:t,y:e,val:s,i:i,j:a,textRects:o,barHeight:r,barWidth:h,dataLabelsConfig:c}){const d=this.w;let g="rotate(0)";"vertical"===d.config.plotOptions.bar.dataLabels.orientation&&(g=`rotate(-90, ${t}, ${e})`);const p=new W(this.barCtx.w,this.barCtx.ctx),x=new T(this.barCtx.w),u=c.formatter;let f=null;const b=d.globals.collapsedSeriesIndices.indexOf(i)>-1;if(c.enabled&&!b){f=x.group({class:"apexcharts-data-labels",transform:g});let b="";void 0!==s&&(b=u(s,l(n({},d),{seriesIndex:i,dataPointIndex:a,w:d}))),!s&&d.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(b="");const m=d.seriesData.series[i][a]<0,y=d.config.plotOptions.bar.dataLabels.position;if("vertical"===d.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(c.textAnchor=m?"end":"start"),"center"===y&&(c.textAnchor="middle"),"bottom"===y&&(c.textAnchor=m?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){h<x.getTextRects(b,parseFloat(c.style.fontSize).toString()).width&&(b="")}d.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?o.width/1.6>Math.abs(h)&&(b=""):o.height/1.6>Math.abs(r)&&(b=""));const w=n({},c);this.barCtx.isHorizontal&&s<0&&("start"===c.textAnchor?w.textAnchor="end":"end"===c.textAnchor&&(w.textAnchor="start")),p.plotDataLabelsText({x:t,y:e,text:b,i:i,j:a,parent:f,dataLabelsConfig:w,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return f}drawTotalDataLabels({x:t,y:e,val:s,realIndex:i,textAnchor:a,barTotalDataLabelsConfig:o}){const r=new T(this.barCtx.w);let n;return o.enabled&&void 0!==t&&void 0!==e&&this.barCtx.lastActiveBarSerieIndex===i&&(n=r.drawText({x:t,y:e,foreColor:o.style.color,text:s,textAnchor:a,fontFamily:o.style.fontFamily,fontSize:o.style.fontSize,fontWeight:o.style.fontWeight})),n}}let ce=class{constructor(t){this.w=t.w,this.barCtx=t}initVariables(t){const e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let s=0;s<t.length;s++)if(t[s].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[s].length),e.axisFlags.isXNumeric)for(let i=0;i<t[s].length;i++)e.seriesData.seriesX[s][i]>e.globals.minX&&e.seriesData.seriesX[s][i]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(e.seriesData.series),m.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(t=>t.map(t=>"none"))),0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],e.globals.comboCharts||this.checkZeroSeries({series:t})}initialPositions(t){const e=this.w;let s,i,a,o,r,n,l,h,c=e.globals.dataPoints;this.barCtx.isRangeBar&&(c=e.labelData.labels.length);let d=this.barCtx.seriesLen;if(e.config.plotOptions.bar.rangeBarGroupRows&&(d=1),this.barCtx.isHorizontal)a=e.layout.gridHeight/c,r=a/d,e.axisFlags.isXNumeric&&(a=e.layout.gridHeight/this.barCtx.totalItems,r=a/this.barCtx.seriesLen),r=r*parseInt(this.barCtx.barOptions.barHeight,10)/100,-1===String(this.barCtx.barOptions.barHeight).indexOf("%")&&(r=parseInt(this.barCtx.barOptions.barHeight,10)),h=this.barCtx.baseLineInvertedY+e.globals.padHorizontal+(this.barCtx.isReversed?e.layout.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(h=e.layout.gridWidth/2),i=(a-r*this.barCtx.seriesLen)/2;else{if(o=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(o=e.layout.gridWidth/e.globals.dataPoints),n=o/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const t=this.barCtx.xRatio;e.globals.minXDiff&&.5!==e.globals.minXDiff&&e.globals.minXDiff/t>0&&(o=e.globals.minXDiff/t),n=o/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,n<1&&(n=1)}if(-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(n=parseInt(this.barCtx.barOptions.columnWidth,10)),l=e.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?e.layout.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e.axisFlags.isXNumeric){s=this.barCtx.getBarXForNumericXAxis({x:s,j:0,realIndex:t,barWidth:n}).x}else s=e.globals.padHorizontal+m.noExponents(o-n*this.barCtx.seriesLen)/2}return e.globals.barHeight=r,e.globals.barWidth=n,{x:s,y:i,yDivision:a,xDivision:o,barHeight:r,barWidth:n,zeroH:l,zeroW:h}}initializeStackedPrevVars(t){t.w.labelData.seriesGroups.forEach(e=>{t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]})}initializeStackedXYVars(t){t.w.labelData.seriesGroups.forEach(e=>{t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]})}getPathFillColor(t,e,s,i){var a,o,r,n;const l=this.w,h=new H(this.barCtx.w);let c=null;const d=this.barCtx.barOptions.distributed?s:e;let g=!1;if(this.barCtx.barOptions.colors.ranges.length>0){this.barCtx.barOptions.colors.ranges.map(i=>{t[e][s]>=i.from&&t[e][s]<=i.to&&(c=i.color,g=!0)})}return{color:h.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:i,dataPointIndex:s,color:c,value:t[e][s],fillConfig:null==(a=l.config.series[e].data[s])?void 0:a.fill,fillType:(null==(r=null==(o=l.config.series[e].data[s])?void 0:o.fill)?void 0:r.type)?null==(n=l.config.series[e].data[s])?void 0:n.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[i]:l.config.fill.type}),useRangeColor:g}}getStrokeWidth(t,e,s){let i=0;const a=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]||"bar"===a.config.chart.type&&!this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,a.config.stroke.show&&(this.barCtx.isNullValue||(i=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth)),i}createBorderRadiusArr(t){var e;const s=this.w,i=!this.w.config.chart.stacked||s.config.plotOptions.bar.borderRadius<=0,a=t.length,o=0|(null==(e=t[0])?void 0:e.length),r=Array.from({length:a},()=>Array(o).fill(i?"top":"none"));if(i)return r;const n=this.w.config.chart.type;for(let e=0;e<o;e++){const s=[],i=[];let l=0;for(let o=0;o<a;o++){const a=t[o][e];a>0?(s.push(o),l++):a<0&&(i.push(o),l++)}if(s.length>0&&0===i.length)if(1===s.length)r[s[0]][e]="bar"===n&&1===o?"top":"both";else{const t=s[0],i=s[s.length-1];for(const a of s)r[a][e]=a===t?"bar"===n&&1===o?"top":"bottom":a===i?"top":"none"}else if(i.length>0&&0===s.length)if(1===i.length)r[i[0]][e]="both";else{const t=Math.max(...i),s=Math.min(...i);for(const a of i)r[a][e]=a===t?"bottom":a===s?"top":"none"}else if(s.length>0&&i.length>0){const t=s[s.length-1];for(const i of s)r[i][e]=i===t?"top":"none";const a=Math.max(...i);for(const t of i)r[t][e]=t===a?"bottom":"none"}else if(1===l){r[s[0]||i[0]][e]="both"}}return r}barBackground({j:t,i:e,x1:s,x2:i,y1:a,y2:o,elSeries:r}){const n=this.w,l=new T(this.barCtx.w),h=new et(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===e){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);const e=this.barCtx.barOptions.colors.backgroundBarColors[t],h=l.drawRect(void 0!==s?s:0,void 0!==a?a:0,void 0!==i?i:n.layout.gridWidth,void 0!==o?o:n.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,e,this.barCtx.barOptions.colors.backgroundBarOpacity);r.add(h),h.node.classList.add("apexcharts-backgroundBar")}}getColumnPaths({barWidth:t,barXPosition:e,y1:s,y2:i,strokeWidth:a,isReversed:o,series:r,seriesGroup:n,realIndex:l,i:h,j:c,w:d}){var g;const p=new T(this.barCtx.w);(a=Array.isArray(a)?a[l]:a)||(a=0);let x=t,u=e;(null==(g=d.config.series[l].data[c])?void 0:g.columnWidthOffset)&&(u=e-d.config.series[l].data[c].columnWidthOffset/2,x=t+d.config.series[l].data[c].columnWidthOffset);const f=a/2,b=u+f,m=u+x-f,y=(r[h][c]>=0?1:-1)*(o?-1:1);s+=.001-f*y,i+=.001+f*y;let w=p.move(b,s),v=p.move(b,s);const A=p.line(m,s);if(d.globals.previousPaths.length>0&&(v=this.barCtx.getPreviousPath(l,c,!1)),w=w+p.line(b,i)+p.line(m,i)+A+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][c]?" Z":" z"),v=v+p.line(b,s)+A+A+A+A+A+p.line(b,s)+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][c]?" Z":" z"),"none"!==this.arrBorderRadius[l][c]&&(w=p.roundPathCorners(w,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.yArrj.push(i-f*y),t.yArrjF.push(Math.abs(s-i+a*y)),t.yArrjVal.push(this.barCtx.series[h][c])}return{pathTo:w,pathFrom:v}}getBarpaths({barYPosition:t,barHeight:e,x1:s,x2:i,strokeWidth:a,isReversed:o,series:r,seriesGroup:n,realIndex:l,i:h,j:c,w:d}){var g;const p=new T(this.barCtx.w);(a=Array.isArray(a)?a[l]:a)||(a=0);let x=t,u=e;(null==(g=d.config.series[l].data[c])?void 0:g.barHeightOffset)&&(x=t-d.config.series[l].data[c].barHeightOffset/2,u=e+d.config.series[l].data[c].barHeightOffset);const f=a/2,b=x+f,m=x+u-f,y=(r[h][c]>=0?1:-1)*(o?-1:1);s+=.001+f*y,i+=.001-f*y;let w=p.move(s,b),v=p.move(s,b);d.globals.previousPaths.length>0&&(v=this.barCtx.getPreviousPath(l,c,!1));const A=p.line(s,m);if(w=w+p.line(i,b)+p.line(i,m)+A+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][c]?" Z":" z"),v=v+p.line(s,b)+A+A+A+A+A+p.line(s,b)+("around"===d.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][c]?" Z":" z"),"none"!==this.arrBorderRadius[l][c]&&(w=p.roundPathCorners(w,d.config.plotOptions.bar.borderRadius)),d.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.xArrj.push(i+f*y),t.xArrjF.push(Math.abs(s-i-a*y)),t.xArrjVal.push(this.barCtx.series[h][c])}return{pathTo:w,pathFrom:v}}checkZeroSeries({series:t}){const e=this.w;for(let s=0;s<t.length;s++){let i=0;for(let a=0;a<t[e.globals.maxValsInArrayIndex].length;a++)i+=t[s][a];0===i&&this.barCtx.zeroSerieses.push(s)}}getXForValue(t,e,s=!0){let i=s?e:null;return null!=t&&(i=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),i}getYForValue(t,e,s,i=!0){let a=i?e:null;return null!=t&&(a=e-t/this.barCtx.yRatio[s]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[s]:0)),a}getGoalValues(t,e,s,i,a,o){const r=this.w,h=[],c=(i,a)=>{h.push({[t]:"x"===t?this.getXForValue(i,e,!1):this.getYForValue(i,s,o,!1),attrs:a})};if(r.seriesData.seriesGoals[i]&&r.seriesData.seriesGoals[i][a]&&Array.isArray(r.seriesData.seriesGoals[i][a])&&r.seriesData.seriesGoals[i][a].forEach(t=>{c(t.value,t)}),this.barCtx.barOptions.isDumbbell&&r.rangeData.seriesRange.length){const e=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:r.globals.colors,s={strokeHeight:"x"===t?0:r.globals.markers.size[i],strokeWidth:"x"===t?r.globals.markers.size[i]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(e[i])?e[i][0]:e[i]};c(r.rangeData.seriesRangeStart[i][a],s),c(r.rangeData.seriesRangeEnd[i][a],l(n({},s),{strokeColor:Array.isArray(e[i])?e[i][1]:e[i]}))}return h}drawGoalLine({barXPosition:t,barYPosition:e,goalX:s,goalY:i,barWidth:a,barHeight:o}){const r=new T(this.barCtx.w),n=r.group({className:"apexcharts-bar-goals-groups"});n.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:n.node}),n.attr("clip-path",`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let l=null;return this.barCtx.isHorizontal?Array.isArray(s)&&s.forEach(t=>{if(t.x>=-1&&t.x<=r.w.layout.gridWidth+1){const s=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:o/2,i=e+s+o/2;l=r.drawLine(t.x,i-2*s,t.x,i,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),n.add(l)}}):Array.isArray(i)&&i.forEach(e=>{if(e.y>=-1&&e.y<=r.w.layout.gridHeight+1){const s=void 0!==e.attrs.strokeWidth?e.attrs.strokeWidth:a/2,i=t+s+a/2;l=r.drawLine(i-2*s,e.y,i,e.y,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeHeight?e.attrs.strokeHeight:2,e.attrs.strokeLineCap),n.add(l)}}),n}drawBarShadow({prevPaths:t,currPaths:e,color:s,realIndex:i,j:a}){const o=this.w,{x:r,x1:n,barYPosition:l}=t,{x:h,x1:c,barYPosition:d}=e,g=l+e.barHeight,p=new T(this.barCtx.w),x=new m,u=p.move(n,g)+p.line(r,g)+p.line(h,d)+p.line(c,d)+p.line(n,g)+("around"===o.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[i][a]?" Z":" z");return p.drawPath({d:u,fill:x.shadeColor(.5,m.rgb2hex(s)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}getZeroValueEncounters({i:t,j:e}){var s;const i=this.w;let a=0,o=0;return(i.config.plotOptions.bar.horizontal?i.seriesData.series.map((t,e)=>e):(null==(s=i.globals.columnSeries)?void 0:s.i.map(t=>t))||[]).forEach(s=>{const r=i.globals.seriesPercent[s][e];r&&a++,s<t&&0===r&&o++}),{nonZeroColumns:a,zeroEncounters:o}}getGroupIndex(t){const e=this.w,s=e.labelData.seriesGroups.findIndex(s=>s.indexOf(e.seriesData.seriesNames[t])>-1),i=this.barCtx.columnGroupIndices;let a=i.indexOf(s);return a<0&&(i.push(s),a=i.length-1),{groupIndex:s,columnGroupIndex:a}}};class de{constructor(t,e,s){this.ctx=e,this.w=t,this.barOptions=t.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=t.config.stroke.width,this.isNullValue=!1,this.isRangeBar=t.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.rangeData.seriesRange.length&&t.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,null!==this.xyRatios&&(this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.invertedXRatio=s.invertedXRatio,this.invertedYRatio=s.invertedYRatio,this.baseLineY=s.baseLineY,this.baseLineInvertedY=s.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;const i=new et(this.w);this.lastActiveBarSerieIndex=i.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];const a=i.getBarSeriesIndices(),o=new E(this.w);this.stackedSeriesTotals=o.getStackedSeriesTotals(this.w.config.series.map((t,e)=>-1===a.indexOf(e)?e:-1).filter(t=>-1!==t)),this.barHelpers=new ce(this)}draw(t,e){var s;const i=this.w,a=new T(this.w),o=new E(this.w);t=o.getLogSeries(t),this.series=t,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&(this.totalItems,this.barOptions.dataLabels.maxItems);for(let o=0,h=0;o<t.length;o++,h++){let c,d;const g=[],p=[],x=i.globals.comboCharts?e[o]:o,{columnGroupIndex:u}=this.barHelpers.getGroupIndex(x),f=a.group({class:"apexcharts-series",rel:o+1,seriesName:m.escapeString(i.seriesData.seriesNames[x]),"data:realIndex":x});et.addCollapsedClassToSeries(this.w,f,x),t[o].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[x],this.translationsIndex=x);const b=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;const y=this.barHelpers.initialPositions(x),{y:w,yDivision:v,zeroW:A,x:C,xDivision:S,zeroH:k}=y;let D=y.barHeight,L=y.barWidth;d=w,c=C,this.isHorizontal||p.push(c+(null!=L?L:0)/2);const P=a.group({class:"apexcharts-datalabels","data:realIndex":x});i.globals.delayedElements.push({el:P.node}),P.node.classList.add("apexcharts-element-hidden");const M=a.group({class:"apexcharts-bar-goals-markers"}),I=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:I.node}),I.node.classList.add("apexcharts-element-hidden");for(let e=0;e<t[o].length;e++){const a=this.barHelpers.getStrokeWidth(o,e,x);let r=null;const y={indexes:{i:o,j:e,realIndex:x,translationsIndex:b,bc:h},x:c,y:d,strokeWidth:a,elSeries:f};this.isHorizontal?(r=this.drawBarPaths(l(n({},y),{barHeight:D,zeroW:A,yDivision:v})),L=this.series[o][e]/this.invertedYRatio):(r=this.drawColumnPaths(l(n({},y),{xDivision:S,barWidth:L,zeroH:k})),D=this.series[o][e]/this.yRatio[b]);const w=this.barHelpers.getPathFillColor(t,o,e,x);if(this.isFunnel&&this.barOptions.isFunnel3d&&this.pathArr.length&&e>0){const t=this.barHelpers.drawBarShadow({color:"string"==typeof w.color&&-1===(null==(s=w.color)?void 0:s.indexOf("url"))?w.color:m.hexToRgba(i.globals.colors[o]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:r,realIndex:x,j:e});if(I.add(t),i.config.chart.dropShadow.enabled){new X(this.w).dropShadow(t,i.config.chart.dropShadow,x)}}this.pathArr.push(r);const C=this.barHelpers.drawGoalLine({barXPosition:r.barXPosition,barYPosition:r.barYPosition,goalX:r.goalX,goalY:r.goalY,barHeight:D,barWidth:L});C&&M.add(C),d=r.y,c=r.x,e>0&&p.push(c+(null!=L?L:0)/2),g.push(d),this.renderSeries(l(n({realIndex:x,pathFill:w.color},w.useRangeColor?{lineFill:w.color}:{}),{j:e,i:o,columnGroupIndex:u,pathFrom:r.pathFrom,pathTo:r.pathTo,strokeWidth:a,elSeries:f,x:c,y:d,series:t,barHeight:Math.abs(r.barHeight?r.barHeight:D),barWidth:Math.abs(r.barWidth?r.barWidth:L),elDataLabelsWrap:P,elGoalsMarkers:M,elBarShadows:I,visibleSeries:this.visibleI,type:"bar"}))}i.globals.seriesXvalues[x]=p,i.globals.seriesYvalues[x]=g,r.add(f)}return r}renderSeries({realIndex:t,pathFill:e,lineFill:s,j:i,i:a,columnGroupIndex:o,pathFrom:r,pathTo:n,strokeWidth:l,elSeries:h,x:c,y:d,y1:g,y2:p,series:x,barHeight:u,barWidth:f,barXPosition:b,barYPosition:m,elDataLabelsWrap:y,elGoalsMarkers:w,elBarShadows:v,visibleSeries:A,type:C,classes:S}){const k=this.w,D=new T(this.w,this.ctx);let L=!1;if(h._bindingsDelegated||(h._bindingsDelegated=!0,D.setupEventDelegation(h,`.apexcharts-${C}-area`)),!s){let e=function(t){const e=k.config.stroke.colors;let s;return Array.isArray(e)&&e.length>0&&(s=e[t],s||(s=""),"function"==typeof s)?s({value:k.seriesData.series[t][i],dataPointIndex:i,w:k}):s};const a="function"==typeof k.globals.stroke.colors[t]?e(t):k.globals.stroke.colors[t];s=this.barOptions.distributed?k.globals.stroke.colors[i]:a}const P=new he(this).handleBarDataLabels({x:c,y:d,y1:g,y2:p,i:a,j:i,series:x,realIndex:t,columnGroupIndex:o,barHeight:u,barWidth:f,barXPosition:b,barYPosition:m,visibleSeries:A});k.globals.isBarHorizontal||(P.dataLabelsPos.dataLabelsX+Math.max(f,k.globals.barPadForNumericAxis)<0||P.dataLabelsPos.dataLabelsX-Math.max(f,k.globals.barPadForNumericAxis)>k.layout.gridWidth)&&(L=!0),k.config.series[a].data[i]&&k.config.series[a].data[i].strokeColor&&(s=k.config.series[a].data[i].strokeColor),this.isNullValue&&(e="none");const M=i/k.config.chart.animations.animateGradually.delay*(k.config.chart.animations.speed/k.globals.dataPoints)/2.4;if(!L){const o=D.renderPaths({i:a,j:i,realIndex:t,pathFrom:r,pathTo:n,stroke:s,strokeWidth:l,strokeLineCap:k.config.stroke.lineCap,fill:e,animationDelay:M,initialSpeed:k.config.chart.animations.speed,dataChangeSpeed:k.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${C}-area ${S}`,chartType:C,bindEventsOnPaths:!1});o.attr("clip-path",`url(#gridRectBarMask${k.globals.cuid})`);const c=k.config.forecastDataPoints;c.count>0&&i>=k.globals.dataPoints-c.count&&(o.node.setAttribute("stroke-dasharray",c.dashArray),o.node.setAttribute("stroke-width",c.strokeWidth),o.node.setAttribute("fill-opacity",c.fillOpacity)),void 0!==g&&void 0!==p&&(o.attr("data-range-y1",g),o.attr("data-range-y2",p));new X(this.w).setSelectionFilter(o,t,i),h.add(o),o.attr({cy:P.dataLabelsPos.bcy,cx:P.dataLabelsPos.bcx,j:i,val:k.seriesData.series[a][i],barHeight:u,barWidth:f}),null!==P.dataLabels&&y.add(P.dataLabels),P.totalDataLabels&&y.add(P.totalDataLabels),h.add(y),w&&h.add(w),v&&h.add(v)}return h}drawBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:i,x:a,y:o,yDivision:r,elSeries:n}){const l=this.w,h=t.i,c=t.j;let d;if(l.axisFlags.isXNumeric)d=(o=(l.seriesData.seriesX[h][c]-l.globals.minX)/this.invertedXRatio-e)+e*this.visibleI;else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:h,j:c});t>0&&(e=this.seriesLen*e/t),d=o+e*this.visibleI,d-=e*s}else d=o+e*this.visibleI;if(this.isFunnel){const t=null!=i?i:0;i=t-(this.barHelpers.getXForValue(this.series[h][c],t)-t)/2}a=this.barHelpers.getXForValue(this.series[h][c],null!=i?i:0);const g=this.barHelpers.getBarpaths({barYPosition:d,barHeight:e,x1:i,x2:a,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:h,j:c,w:l});return l.axisFlags.isXNumeric||(o+=r),this.barHelpers.barBackground({j:c,i:h,y1:d-e*this.visibleI,y2:e*this.seriesLen,elSeries:n}),{pathTo:g.pathTo,pathFrom:g.pathFrom,x1:i,x:a,y:o,goalX:this.barHelpers.getGoalValues("x",i,null,h,c,0),barYPosition:d,barHeight:e}}drawColumnPaths({indexes:t,x:e,y:s,xDivision:i,barWidth:a,zeroH:o,strokeWidth:r,elSeries:n}){const l=this.w,h=t.realIndex,c=t.translationsIndex,d=t.i,g=t.j,p=t.bc;let x;if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:g,realIndex:h,barWidth:a});e=t.x,x=t.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:d,j:g});t>0&&(a=this.seriesLen*a/t),x=e+a*this.visibleI,x-=a*s}else x=e+a*this.visibleI;s=this.barHelpers.getYForValue(this.series[d][g],o,c);const u=this.barHelpers.getColumnPaths({barXPosition:x,barWidth:a,y1:o,y2:s,strokeWidth:r,isReversed:this.isReversed,series:this.series,realIndex:h,i:d,j:g,w:l});return l.axisFlags.isXNumeric||(e+=i),this.barHelpers.barBackground({bc:p,j:g,i:d,x1:x-r/2-a*this.visibleI,x2:a*this.seriesLen+r/2,elSeries:n}),{pathTo:u.pathTo,pathFrom:u.pathFrom,x:e,y:s,goalY:this.barHelpers.getGoalValues("y",null,o,d,g,c),barXPosition:x,barWidth:a}}getBarXForNumericXAxis({x:t,barWidth:e,realIndex:s,j:i}){const a=this.w;let o=s;return a.seriesData.seriesX[s].length||(o=a.globals.maxValsInArrayIndex),m.isNumber(a.seriesData.seriesX[o][i])&&(t=(a.seriesData.seriesX[o][i]-a.globals.minX)/this.xRatio-e*this.seriesLen/2),{barXPosition:t+e*this.visibleI,x:t}}getPreviousPath(t,e){const s=this.w;let i="M 0 0";for(let a=0;a<s.globals.previousPaths.length;a++){const o=s.globals.previousPaths[a];o.paths&&o.paths.length>0&&parseInt(o.realIndex,10)===parseInt(String(t),10)&&void 0!==s.globals.previousPaths[a].paths[e]&&(i=s.globals.previousPaths[a].paths[e].d)}return i}}class ge extends de{draw(t,e,s){const i=this.w,a=new T(this.w),o=i.globals.comboCharts?e:i.config.chart.type,r=new H(this.w);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=i.config.plotOptions.bar.horizontal,this.isOHLC=this.candlestickOptions&&"ohlc"===this.candlestickOptions.type,this.coreUtils=new E(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const h=a.group({class:`apexcharts-${o}-series apexcharts-plot-series`});for(let e=0;e<t.length;e++){let o,c;this.isBoxPlot="boxPlot"===i.config.chart.type||"boxPlot"===i.config.series[e].type;const d=[],g=[],p=i.globals.comboCharts?s[e]:e,{columnGroupIndex:x}=this.barHelpers.getGroupIndex(p),u=a.group({class:"apexcharts-series",seriesName:m.escapeString(i.seriesData.seriesNames[p]),rel:e+1,"data:realIndex":p});et.addCollapsedClassToSeries(this.w,u,p),t[e].length>0&&(this.visibleI=this.visibleI+1);let f=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[p][0],f=p);const b=this.barHelpers.initialPositions(p),{y:y,barHeight:w,yDivision:v,zeroW:A,x:C,barWidth:S,xDivision:k,zeroH:D}=b;c=y,o=C,g.push(o+(null!=S?S:0)/2);const L=a.group({class:"apexcharts-datalabels","data:realIndex":p}),P=a.group({class:"apexcharts-bar-goals-markers"});for(let s=0;s<i.globals.dataPoints;s++){const a=this.barHelpers.getStrokeWidth(e,s,p);let h=null;const b={indexes:{i:e,j:s,realIndex:p,translationsIndex:f},x:o,y:c,strokeWidth:a,elSeries:u};h=this.isHorizontal?this.drawHorizontalBoxPaths(l(n({},b),{yDivision:v,barHeight:w,zeroW:A})):this.drawVerticalBoxPaths(l(n({},b),{xDivision:k,barWidth:S,zeroH:D})),c=h.y,o=h.x;const m=this.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:h.barYPosition,goalX:h.goalX,goalY:h.goalY,barHeight:w,barWidth:S});m&&P.add(m),s>0&&g.push(o+(null!=S?S:0)/2),d.push(c),h.pathTo.forEach((n,l)=>{const d=!this.isBoxPlot&&this.candlestickOptions.wick.useFillColor?h.color[l]:i.globals.stroke.colors[e],g=r.fillPath({seriesNumber:p,dataPointIndex:s,color:h.color[l],value:t[e][s]});this.renderSeries({realIndex:p,pathFill:g,lineFill:d,j:s,i:e,pathFrom:h.pathFrom,pathTo:n,strokeWidth:a,elSeries:u,x:o,y:c,series:t,columnGroupIndex:x,barHeight:w,barWidth:S,elDataLabelsWrap:L,elGoalsMarkers:P,visibleSeries:this.visibleI,type:i.config.chart.type})})}i.globals.seriesXvalues[p]=g,i.globals.seriesYvalues[p]=d,h.add(u)}return h}drawVerticalBoxPaths({indexes:t,x:e,xDivision:s,barWidth:i,zeroH:a,strokeWidth:o}){var r,n;const l=this.w,h=new T(this.w),c=t.i,d=t.j,{colors:g}=l.config.plotOptions.candlestick,{colors:p}=this.boxOptions,x=t.realIndex,u=t=>Array.isArray(t)?t[x]:t,f=u(g.upward),b=u(g.downward),m=this.yRatio[t.translationsIndex],y=this.getOHLCValue(x,d);let w=a,v=a,A=y.o<y.c?[f]:[b];this.isBoxPlot&&(A=[u(p.lower),u(p.upper)]);let C=Math.min(y.o,y.c),S=Math.max(y.o,y.c),k=y.m;l.axisFlags.isXNumeric&&(e=(l.seriesData.seriesX[x][d]-l.globals.minX)/this.xRatio-i/2);const D=e+i*this.visibleI;let L;void 0===(null==(r=this.series[c])?void 0:r[d])||null===(null==(n=this.series[c])?void 0:n[d])?(C=a,S=a):(C=a-C/m,S=a-S/m,w=a-y.h/m,v=a-y.l/m,k=a-y.m/m);let P=h.move(D+i/2,C);if(l.globals.previousPaths.length>0&&(P=this.getPreviousPath(x,d)),this.isOHLC){const t=D+i/2,e=a-y.o/m,s=a-y.c/m;L=[h.move(t,w)+h.line(t,v)+h.move(t,e)+h.line(D,e)+h.move(t,s)+h.line(D+i,s)]}else L=this.isBoxPlot?[h.move(D,C)+h.line(D+i/2,C)+h.line(D+i/2,w)+h.line(D+i/4,w)+h.line(D+i-i/4,w)+h.line(D+i/2,w)+h.line(D+i/2,C)+h.line(D+i,C)+h.line(D+i,k)+h.line(D,k)+h.line(D,C+o/2),h.move(D,k)+h.line(D+i,k)+h.line(D+i,S)+h.line(D+i/2,S)+h.line(D+i/2,v)+h.line(D+i-i/4,v)+h.line(D+i/4,v)+h.line(D+i/2,v)+h.line(D+i/2,S)+h.line(D,S)+h.line(D,k)+"z"]:[h.move(D,S)+h.line(D+i/2,S)+h.line(D+i/2,w)+h.line(D+i/2,S)+h.line(D+i,S)+h.line(D+i,C)+h.line(D+i/2,C)+h.line(D+i/2,v)+h.line(D+i/2,C)+h.line(D,C)+h.line(D,S-o/2)];return P+=h.move(D,C),l.axisFlags.isXNumeric||(e+=s),{pathTo:L,pathFrom:P,x:e,y:S,goalY:this.barHelpers.getGoalValues("y",null,a,c,d,t.translationsIndex),barXPosition:D,color:A}}drawHorizontalBoxPaths({indexes:t,y:e,yDivision:s,barHeight:i,zeroW:a,strokeWidth:o}){var r,n;const l=this.w,h=new T(this.w),c=t.i,d=t.j,g=t.realIndex,{colors:p}=l.config.plotOptions.candlestick,{colors:x}=this.boxOptions,u=t=>Array.isArray(t)?t[g]:t,f=this.invertedYRatio,b=this.getOHLCValue(g,d);let m=b.o<b.c?[u(p.upward)]:[u(p.downward)];this.isBoxPlot&&(m=[u(x.lower),u(x.upper)]);let y=a,w=a,v=Math.min(b.o,b.c),A=Math.max(b.o,b.c),C=b.m;l.axisFlags.isXNumeric&&(e=(l.seriesData.seriesX[g][d]-l.globals.minX)/this.invertedXRatio-i/2);const S=e+i*this.visibleI;void 0===(null==(r=this.series[c])?void 0:r[d])||null===(null==(n=this.series[c])?void 0:n[d])?(v=a,A=a):(v=a+v/f,A=a+A/f,y=a+b.h/f,w=a+b.l/f,C=a+b.m/f);let k=h.move(v,S+i/2);l.globals.previousPaths.length>0&&(k=this.getPreviousPath(g,d));const D=[h.move(v,S)+h.line(v,S+i/2)+h.line(y,S+i/2)+h.line(y,S+i/2-i/4)+h.line(y,S+i/2+i/4)+h.line(y,S+i/2)+h.line(v,S+i/2)+h.line(v,S+i)+h.line(C,S+i)+h.line(C,S)+h.line(v+o/2,S),h.move(C,S)+h.line(C,S+i)+h.line(A,S+i)+h.line(A,S+i/2)+h.line(w,S+i/2)+h.line(w,S+i-i/4)+h.line(w,S+i/4)+h.line(w,S+i/2)+h.line(A,S+i/2)+h.line(A,S)+h.line(C,S)+"z"];return k+=h.move(v,S),l.axisFlags.isXNumeric||(e+=s),{pathTo:D,pathFrom:k,x:A,y:e,goalX:this.barHelpers.getGoalValues("x",a,null,c,d,0),barYPosition:S,color:m}}getOHLCValue(t,e){const s=this.w,i=this.coreUtils,a=s=>s[t]&&null!=s[t][e]?i.getLogValAtSeriesIndex(s[t][e],t):0,o=a(s.candleData.seriesCandleH),r=a(s.candleData.seriesCandleO),n=a(s.candleData.seriesCandleM),l=a(s.candleData.seriesCandleC),h=a(s.candleData.seriesCandleL);return{o:this.isBoxPlot?o:r,h:this.isBoxPlot?r:o,m:n,l:this.isBoxPlot?l:h,c:this.isBoxPlot?h:l}}}class pe{constructor(t,e){this.ctx=e,this.w=t}checkColorRange(){const t=this.w;let e=!1;const s=t.config.plotOptions[t.config.chart.type];return s.colorScale.ranges.length>0&&s.colorScale.ranges.map(t=>{t.from<=0&&(e=!0)}),e}getShadeColor(t,e,s,i){const a=this.w;let o=1;const r=a.config.plotOptions[t].shadeIntensity,n=this.determineColor(t,e,s);a.globals.hasNegs||i?o=a.config.plotOptions[t].reverseNegativeShade?n.percent<0?n.percent/100*(1.25*r):(1-n.percent/100)*(1.25*r):n.percent<=0?1-(1+n.percent/100)*r:(1-n.percent/100)*r:(o=1-n.percent/100,"treemap"===t&&(o=(1-n.percent/100)*(1.25*r)));let l=n.color;const h=new m;if(a.config.plotOptions[t].enableShades)if("dark"===this.w.config.theme.mode){const t=h.shadeColor(-1*o,n.color);l=m.hexToRgba(m.isColorHex(t)?t:m.rgb2hex(t),a.config.fill.opacity)}else{const t=h.shadeColor(o,n.color);l=m.hexToRgba(m.isColorHex(t)?t:m.rgb2hex(t),a.config.fill.opacity)}return{color:l,colorProps:n}}determineColor(t,e,s){const i=this.w,a=i.seriesData.series[e][s],o=i.config.plotOptions[t];let r=o.colorScale.inverse?s:e;o.distributed&&"treemap"===i.config.chart.type&&(r=s);let n=i.globals.colors[r],l=null,h=Math.min(...i.seriesData.series[e]),c=Math.max(...i.seriesData.series[e]);o.distributed||"heatmap"!==t||(h=i.globals.minY,c=i.globals.maxY),void 0!==o.colorScale.min&&(h=o.colorScale.min<i.globals.minY?o.colorScale.min:i.globals.minY,c=o.colorScale.max>i.globals.maxY?o.colorScale.max:i.globals.maxY);const d=Math.abs(c)+Math.abs(h);let g=100*a/(0===d?d-1e-6:d);if(o.colorScale.ranges.length>0){o.colorScale.ranges.map(t=>{if(a>=t.from&&a<=t.to){n=t.color,l=t.foreColor?t.foreColor:null,h=t.from,c=t.to;const e=Math.abs(c)+Math.abs(h);g=100*a/(0===e?e-1e-6:e)}})}return{color:n,foreColor:l,percent:g}}calculateDataLabels({text:t,x:e,y:s,i:i,j:a,colorProps:o,fontSize:r}){const n=this.w.config.dataLabels,l=new T(this.w),h=new W(this.w,this.ctx);let c=null;if(n.enabled){c=l.group({class:"apexcharts-data-labels"});const d=n.offsetX,g=n.offsetY,p=e+d,x=s+parseFloat(n.style.fontSize)/3+g;h.plotDataLabelsText({x:p,y:x,text:t,i:i,j:a,color:o.foreColor,parent:c,fontSize:r,dataLabelsConfig:n})}return c}}class xe{constructor(t){this.w=t.w,this.lineCtx=t}sameValueSeriesFix(t,e){const s=this.w;if("gradient"===s.config.fill.type||"gradient"===s.config.fill.type[t]){if(new E(this.lineCtx.w).seriesHaveSameValues(t)){const s=e[t].slice();s[s.length-1]=s[s.length-1]+1e-6,e[t]=s}}return e}calculatePoints({series:t,realIndex:e,x:s,y:i,i:a,j:o,prevY:r}){const n=this.w,l=[],h=[];let c=this.lineCtx.categoryAxisCorrection+n.config.markers.offsetX;return n.axisFlags.isXNumeric&&(c=(n.seriesData.seriesX[e][0]-n.globals.minX)/this.lineCtx.xRatio+n.config.markers.offsetX),0===o&&(l.push(c),h.push(m.isNumber(t[a][0])?r+n.config.markers.offsetY:null)),l.push(s+n.config.markers.offsetX),h.push(m.isNumber(t[a][o+1])?i+n.config.markers.offsetY:null),{x:l,y:h}}checkPreviousPaths({pathFromLine:t,pathFromArea:e,realIndex:s}){const i=this.w;for(let a=0;a<i.globals.previousPaths.length;a++){const o=i.globals.previousPaths[a];("line"===o.type||"area"===o.type)&&o.paths.length>0&&parseInt(o.realIndex,10)===parseInt(s,10)&&("line"===o.type?(this.lineCtx.appendPathFrom=!1,t=i.globals.previousPaths[a].paths[0].d):"area"===o.type&&(this.lineCtx.appendPathFrom=!1,e=i.globals.previousPaths[a].paths[0].d,i.config.stroke.show&&i.globals.previousPaths[a].paths[1]&&(t=i.globals.previousPaths[a].paths[1].d)))}return{pathFromLine:t,pathFromArea:e}}determineFirstPrevY({i:t,realIndex:e,series:s,prevY:i,lineYPosition:a,translationsIndex:o}){var r,n,l;const h=this.w,c=h.config.chart.stacked&&!h.globals.comboCharts||h.config.chart.stacked&&h.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(r=this.w.config.series[e])?void 0:r.type)||"column"===(null==(n=this.w.config.series[e])?void 0:n.type));if(void 0!==(null==(l=s[t])?void 0:l[0]))i=(a=c&&t>0?this.lineCtx.prevSeriesY[t-1][0]:this.lineCtx.zeroY)-s[t][0]/this.lineCtx.yRatio[o]+2*(this.lineCtx.isReversed?s[t][0]/this.lineCtx.yRatio[o]:0);else if(c&&t>0&&void 0===s[t][0])for(let e=t-1;e>=0;e--)if(null!==s[e][0]&&void 0!==s[e][0]){i=a=this.lineCtx.prevSeriesY[e][0];break}return{prevY:i,lineYPosition:a}}}const ue=t=>{const e=function(t){const e=[];let s=t[0],i=t[1],a=e[0]=be(s,i),o=1;for(let r=t.length-1;o<r;o++)s=i,i=t[o+1],e[o]=.5*(a+(a=be(s,i)));return e[o]=a,e}(t),s=t.length-1,i=[];let a,o,r,n;for(let i=0;i<s;i++)r=be(t[i],t[i+1]),Math.abs(r)<1e-6?e[i]=e[i+1]=0:(a=e[i]/r,o=e[i+1]/r,n=a*a+o*o,n>9&&(n=3*r/Math.sqrt(n),e[i]=n*a,e[i+1]=n*o));for(let a=0;a<=s;a++)n=(t[Math.min(s,a+1)][0]-t[Math.max(0,a-1)][0])/(6*(1+e[a]*e[a])),i.push([n||0,e[a]*n||0]);return i},fe={points(t){const e=ue(t),s=t[1],i=t[0],a=[],o=e[1],r=e[0];a.push(i,[i[0]+r[0],i[1]+r[1],s[0]-o[0],s[1]-o[1],s[0],s[1]]);for(let s=2,i=e.length;s<i;s++){const i=t[s],o=e[s];a.push([i[0]-o[0],i[1]-o[1],i[0],i[1]])}return a},slice(t,e,s){const i=t.slice(e,s);if(e){if(s-e>1&&i[1].length<6){const t=i[0].length;i[1]=[2*i[0][t-2]-i[0][t-4],2*i[0][t-1]-i[0][t-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i}};function be(t,e){return(e[1]-t[1])/(e[0]-t[0])}class me{constructor(t,e,s,i){this.ctx=e,this.w=t,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.zRatio=0,this.baseLineY=[],this.pointsChart=!("bubble"!==this.w.config.chart.type&&"scatter"!==this.w.config.chart.type)||i,this.scatter=new O(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new xe(this),this.markers=new N(this.w,this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0,this.xDivision=0,this.zeroY=0,this.areaBottomY=0,this.strokeWidth=0,this.isReversed=!1,this.appendPathFrom=!1,this.elSeries=null,this.elPointsMain=null,this.elDataLabelsWrap=null}draw(t,e,s,i){var a;const o=this.w,r=new T(this.w),h=o.globals.comboCharts?e:o.config.chart.type,c=r.group({class:`apexcharts-${h}-series apexcharts-plot-series`}),d=new E(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=d.getLogSeries(t),this.yRatio=d.getLogYRatios(this.yRatio),this.prevSeriesY=[];const g=[];for(let e=0;e<t.length;e++){t=this.lineHelpers.sameValueSeriesFix(e,t);const a=o.globals.comboCharts?s[e]:e,r=this.yRatio.length>1?a:0;this._initSerieVariables(t,e,a);const c=[],d=[],p=[];let x=o.globals.padHorizontal+this.categoryAxisCorrection;const u=1,f=[],b=[];et.addCollapsedClassToSeries(this.w,this.elSeries,a),o.axisFlags.isXNumeric&&o.seriesData.seriesX.length>0&&(x=(o.seriesData.seriesX[a][0]-o.globals.minX)/this.xRatio),p.push(x);const m=x;let y;const w=m;let v=this.zeroY,A=this.zeroY;const C=0;v=this.lineHelpers.determineFirstPrevY({i:e,realIndex:a,series:t,prevY:v,lineYPosition:C,translationsIndex:r}).prevY,"monotoneCubic"===o.config.stroke.curve&&null===t[e][0]?c.push(null):c.push(v);const S=v;let k;"rangeArea"===h&&(k=this.lineHelpers.determineFirstPrevY({i:e,realIndex:a,series:i,prevY:A,lineYPosition:C,translationsIndex:r}),A=k.prevY,y=A,d.push(null!==c[0]?A:null));const D=this._calculatePathsFrom({type:h,series:t,i:e,realIndex:a,translationsIndex:r,prevX:w,prevY:v,prevY2:A}),L=[c[0]],P=[d[0]],M={type:h,series:t,realIndex:a,translationsIndex:r,i:e,x:x,y:u,pX:m,pY:S,pathsFrom:D,linePaths:f,areaPaths:b,seriesIndex:s,lineYPosition:C,xArrj:p,yArrj:c,y2Arrj:d,seriesRangeEnd:i},I=this._iterateOverDataPoints(l(n({},M),{iterations:"rangeArea"===h?t[e].length-1:void 0,isRangeStart:!0}));if("rangeArea"===h){const t=this._calculatePathsFrom({series:i,i:e,realIndex:a,prevX:w,prevY:A}),s=this._iterateOverDataPoints(l(n({},M),{series:i,xArrj:[x],yArrj:L,y2Arrj:P,pY:y,areaPaths:I.areaPaths,pathsFrom:t,iterations:i[e].length-1,isRangeStart:!1})),o=I.linePaths.length/2;for(let t=0;t<o;t++)I.linePaths[t]=s.linePaths[t+o]+I.linePaths[t];I.linePaths.splice(o),I.pathFromLine=s.pathFromLine+I.pathFromLine}else I.pathFromArea+="z";this._handlePaths({type:h,realIndex:a,i:e,paths:I}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),g.push(this.elSeries)}if(void 0!==(null==(a=o.config.series[0])?void 0:a.zIndex)&&g.sort((t,e)=>Number(t.node.getAttribute("zIndex"))-Number(e.node.getAttribute("zIndex"))),o.config.chart.stacked)for(let t=g.length-1;t>=0;t--)c.add(g[t]);else for(let t=0;t<g.length;t++)c.add(g[t]);return c}_initSerieVariables(t,e,s){const i=this.w,a=new T(this.w);this.xDivision=i.layout.gridWidth/(i.globals.dataPoints-("on"===i.config.xaxis.tickPlacement?1:0)),this.strokeWidth=Array.isArray(i.config.stroke.width)?i.config.stroke.width[s]:i.config.stroke.width;let o=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[s],o=s),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.layout.gridHeight-this.baseLineY[o]-(this.isReversed?i.layout.gridHeight:0)+(this.isReversed?2*this.baseLineY[o]:0),this.areaBottomY=this.zeroY,(this.zeroY>i.layout.gridHeight||"end"===i.config.plotOptions.area.fillTo)&&(this.areaBottomY=i.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2;const r=i.config.series[s];if(this.elSeries=a.group({class:"apexcharts-series",zIndex:void 0!==r.zIndex?r.zIndex:s,seriesName:m.escapeString(i.seriesData.seriesNames[s])}),this.elPointsMain=a.group({class:"apexcharts-series-markers-wrap","data:realIndex":s}),i.globals.hasNullValues){const t=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[i.layout.gridHeight+i.globals.markers.largestSize]},seriesIndex:e,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});null!==t&&this.elPointsMain.add(t)}this.elDataLabelsWrap=a.group({class:"apexcharts-datalabels","data:realIndex":s});const n=t[e].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:e+1,"data:realIndex":s}),this.appendPathFrom=!0}_calculatePathsFrom({type:t,series:e,i:s,realIndex:i,translationsIndex:a,prevX:o,prevY:r,prevY2:n}){const l=this.w,h=new T(this.w);let c,d,g,p;if(null===e[s][0]){for(let t=0;t<e[s].length;t++)if(null!==e[s][t]){o=this.xDivision*t,r=this.zeroY-e[s][t]/this.yRatio[a],c=h.move(o,r),d=h.move(o,this.areaBottomY);break}}else c=h.move(o,r),"rangeArea"===t&&(c=h.move(o,n)+h.line(o,r)),d=h.move(o,this.areaBottomY)+h.line(o,r);if(g=h.move(0,this.areaBottomY)+h.line(0,this.areaBottomY),p=h.move(0,this.areaBottomY)+h.line(0,this.areaBottomY),l.globals.previousPaths.length>0){const t=this.lineHelpers.checkPreviousPaths({pathFromLine:g,pathFromArea:p,realIndex:i});g=t.pathFromLine,p=t.pathFromArea}return{prevX:o,prevY:r,linePath:c,areaPath:d,pathFromLine:g,pathFromArea:p}}_handlePaths({type:t,realIndex:e,i:s,paths:i}){const a=this.w,o=new T(this.w),r=new H(this.w);this.prevSeriesY.push(i.yArrj),a.globals.seriesXvalues[e]=i.xArrj,a.globals.seriesYvalues[e]=i.yArrj;const h=a.config.forecastDataPoints;if(h.count>0&&"rangeArea"!==t){const t=a.globals.seriesXvalues[e][a.globals.seriesXvalues[e].length-h.count-1],s=o.drawRect(t,0,a.layout.gridWidth,a.layout.gridHeight,0);a.dom.elForecastMask.appendChild(s.node);const i=o.drawRect(0,0,t,a.layout.gridHeight,0);a.dom.elNonForecastMask.appendChild(i.node)}this.pointsChart||a.globals.delayedElements.push({el:this.elPointsMain.node,index:e});const c={i:s,realIndex:e,animationDelay:s,initialSpeed:a.config.chart.animations.speed,dataChangeSpeed:a.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${t}`};if("area"===t){const t=r.fillPath({seriesNumber:e});for(let e=0;e<i.areaPaths.length;e++){const s=o.renderPaths(l(n({},c),{pathFrom:i.pathFromArea,pathTo:i.areaPaths[e],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:t}));this.elSeries.add(s)}}if(a.config.stroke.show&&!this.pointsChart){let d=null;if("line"===t)d=r.fillPath({seriesNumber:e,i:s});else if("solid"===a.config.stroke.fill.type)d=a.globals.stroke.colors[e];else{const t=a.config.fill;a.config.fill=a.config.stroke.fill,d=r.fillPath({seriesNumber:e,i:s}),a.config.fill=t}for(let s=0;s<i.linePaths.length;s++){let g=d;"rangeArea"===t&&(g=r.fillPath({seriesNumber:e}));const p=l(n({},c),{pathFrom:i.pathFromLine,pathTo:i.linePaths[s],stroke:d,strokeWidth:this.strokeWidth,strokeLineCap:a.config.stroke.lineCap,fill:"rangeArea"===t?g:"none"}),x=o.renderPaths(p);if(this.elSeries.add(x),x.attr("fill-rule","evenodd"),h.count>0&&"rangeArea"!==t){const t=o.renderPaths(p);t.node.setAttribute("stroke-dasharray",h.dashArray),h.strokeWidth&&t.node.setAttribute("stroke-width",h.strokeWidth),this.elSeries.add(t),t.attr("clip-path",`url(#forecastMask${a.globals.cuid})`),x.attr("clip-path",`url(#nonForecastMask${a.globals.cuid})`)}}}}_iterateOverDataPoints({type:t,series:e,iterations:s,realIndex:i,translationsIndex:a,i:o,x:r,y:n,pX:l,pY:h,pathsFrom:c,linePaths:d,areaPaths:g,seriesIndex:p,lineYPosition:x,xArrj:u,yArrj:f,y2Arrj:b,isRangeStart:y,seriesRangeEnd:w}){var v,A;const C=this.w,S=new T(this.w),k=this.yRatio;let{prevY:D,linePath:L,areaPath:P,pathFromLine:M,pathFromArea:I}=c;const E=m.isNumber(C.globals.minYArr[i])?C.globals.minYArr[i]:C.globals.minY;s||(s=C.globals.dataPoints>1?C.globals.dataPoints-1:C.globals.dataPoints);const F=(t,e)=>e-t/k[a]+2*(this.isReversed?t/k[a]:0);let X=n;const z=C.config.chart.stacked&&!C.globals.comboCharts||C.config.chart.stacked&&C.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(v=this.w.config.series[i])?void 0:v.type)||"column"===(null==(A=this.w.config.series[i])?void 0:A.type));let R=C.config.stroke.curve;Array.isArray(R)&&(R=Array.isArray(p)?R[p[o]]:R[o]);let Y,B=0;for(let a=0;a<s&&0!==e[o].length;a++){const c=void 0===e[o][a+1]||null===e[o][a+1];if(C.axisFlags.isXNumeric){let t=C.seriesData.seriesX[i][a+1];void 0===C.seriesData.seriesX[i][a+1]&&(t=C.seriesData.seriesX[i][s-1]),r=(t-C.globals.minX)/this.xRatio}else r+=this.xDivision;if(z)if(o>0&&C.globals.collapsedSeries.length<C.config.series.length-1){const t=t=>{for(let e=t;e>0;e--){if(!(C.globals.collapsedSeriesIndices.indexOf((null==p?void 0:p[e])||e)>-1))return e;e--}return 0};x=this.prevSeriesY[t(o-1)][a+1]}else x=this.zeroY;else x=this.zeroY;c?n=F(E,x):(n=F(e[o][a+1],x),"rangeArea"===t&&(X=F(w[o][a+1],x))),u.push(null===e[o][a+1]?null:r),!c||"smooth"!==C.config.stroke.curve&&"monotoneCubic"!==C.config.stroke.curve?(f.push(n),b.push(X)):(f.push(null),b.push(null));const m=this.lineHelpers.calculatePoints({series:e,x:r,y:n,realIndex:i,i:o,j:a,prevY:D}),v=this._createPaths({type:t,series:e,i:o,j:a,x:r,y:n,y2:X,xArrj:u,yArrj:f,y2Arrj:b,pX:l,pY:h,pathState:B,segmentStartX:Y,linePath:L,areaPath:P,linePaths:d,areaPaths:g,curve:R,isRangeStart:y});g=v.areaPaths,d=v.linePaths,l=v.pX,h=v.pY,B=v.pathState,Y=v.segmentStartX,P=v.areaPath,L=v.linePath,!this.appendPathFrom||C.globals.hasNullValues||"monotoneCubic"===R&&"rangeArea"===t||(M+=S.line(r,this.areaBottomY),I+=S.line(r,this.areaBottomY)),this.handleNullDataPoints(e,m,o,a,i),this._handleMarkersAndLabels({type:t,pointsPos:m,i:o,j:a,realIndex:i,isRangeStart:y})}return{yArrj:f,xArrj:u,pathFromArea:I,areaPaths:g,pathFromLine:M,linePaths:d,linePath:L,areaPath:P}}_handleMarkersAndLabels({type:t,pointsPos:e,isRangeStart:s,i:i,j:a,realIndex:o}){const r=this.w,n=new W(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,a,{realIndex:o,pointsPos:e,zRatio:this.zRatio,elParent:this.elPointsMain});else{r.seriesData.series[i].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");const t=this.markers.plotChartMarkers({pointsPos:e,seriesIndex:o,j:a+1});null!==t&&this.elPointsMain.add(t)}const l=n.drawDataLabel({type:t,isRangeStart:s,pos:e,i:o,j:a+1});null!==l&&this.elDataLabelsWrap.add(l)}_createPaths({type:t,series:e,i:s,j:i,x:a,y:o,xArrj:r,yArrj:n,y2:l,y2Arrj:h,pX:c,pY:d,pathState:g,segmentStartX:p,linePath:x,areaPath:u,linePaths:f,areaPaths:b,curve:m,isRangeStart:y}){const w=new T(this.w),v=this.areaBottomY,A="rangeArea"===t,C="rangeArea"===t&&y;switch(m){case"monotoneCubic":{const t=y?n:h,a=(t,e)=>t.map((t,s)=>[t,e[s]]).filter(t=>null!==t[1]),o=t=>{const e=[];let s=0;return t.forEach(t=>{null!==t?s++:s>0&&(e.push(s),s=0)}),s>0&&e.push(s),e},l=(t,e)=>{const s=o(t),i=[];for(let t=0,a=0;t<s.length;a+=s[t++])i[t]=fe.slice(e,a,a+s[t]);return i};switch(g){case 0:if(null===t[i+1])break;g=1;case 1:if(!(A?r.length===e[s].length:i===e[s].length-2))break;case 2:{const e=y?r:r.slice().reverse(),s=y?t:t.slice().reverse(),i=a(e,s),o=i.length>1?fe.points(i):i;let n=[];A&&(C?b=i:n=b.reverse());let h=0,c=0;if(l(s,o).forEach(t=>{h++;const e=(t=>{let e="";for(let s=0;s<t.length;s++){const i=t[s],a=i.length;a>4?(e+=`C${i[0]}, ${i[1]}`,e+=`, ${i[2]}, ${i[3]}`,e+=`, ${i[4]}, ${i[5]}`):a>2&&(e+=`S${i[0]}, ${i[1]}`,e+=`, ${i[2]}, ${i[3]}`)}return e})(t),s=c;c+=t.length;const a=c-1;C?x=w.move(i[s][0],i[s][1])+e:A?x=w.move(n[s][0],n[s][1])+w.line(i[s][0],i[s][1])+e+w.line(n[a][0],n[a][1]):(x=w.move(i[s][0],i[s][1])+e,u=x+w.line(i[a][0],v)+w.line(i[s][0],v)+"z",b.push(u)),f.push(x)}),A&&h>1&&!C){const t=f.slice(h).reverse();f.splice(h),t.forEach(t=>f.push(t))}g=0;break}}break}case"smooth":{const t=.35*(a-c);if(null===e[s][i])g=0;else switch(g){case 0:if(p=c,x=C?w.move(c,h[i])+w.line(c,d):w.move(c,d),u=w.move(c,d),null===e[s][i+1]||void 0===e[s][i+1]){f.push(x),b.push(u);break}if(g=1,i<e[s].length-2){const e=w.curve(c+t,d,a-t,o,a,o);x+=e,u+=e;break}case 1:if(null===e[s][i+1])x+=C?w.line(c,l):w.move(c,d),u+=w.line(c,v)+w.line(p,v)+"z",f.push(x),b.push(u),g=-1;else{const r=w.curve(c+t,d,a-t,o,a,o);x+=r,u+=r,i>=e[s].length-2&&(C&&(x+=w.curve(a,o,a,o,a,l)+w.move(a,l)),u+=w.curve(a,o,a,o,a,v)+w.line(p,v)+"z",f.push(x),b.push(u),g=-1)}}c=a,d=o;break}default:{const t=(t,e,s)=>{let i="";switch(t){case"stepline":i=w.line(e,null,"H")+w.line(null,s,"V");break;case"linestep":i=w.line(null,s,"V")+w.line(e,null,"H");break;case"straight":i=w.line(e,s)}return i};if(null===e[s][i])g=0;else switch(g){case 0:if(p=c,x=C?w.move(c,h[i])+w.line(c,d):w.move(c,d),u=w.move(c,d),null===e[s][i+1]||void 0===e[s][i+1]){f.push(x),b.push(u);break}if(g=1,i<e[s].length-2){const e=t(m,a,o);x+=e,u+=e;break}case 1:if(null===e[s][i+1])x+=C?w.line(c,l):w.move(c,d),u+=w.line(c,v)+w.line(p,v)+"z",f.push(x),b.push(u),g=-1;else{const r=t(m,a,o);x+=r,u+=r,i>=e[s].length-2&&(C&&(x+=w.line(a,l)),u+=w.line(a,v)+w.line(p,v)+"z",f.push(x),b.push(u),g=-1)}}c=a,d=o;break}}return{linePaths:f,areaPaths:b,pX:c,pY:d,pathState:g,segmentStartX:p,linePath:x,areaPath:u}}handleNullDataPoints(t,e,s,i,a){const o=this.w;if(null===t[s][i]&&o.config.markers.showNullDataPoints||1===t[s].length){let t=this.strokeWidth-o.config.markers.strokeWidth/2;t>0||(t=0);const s=this.markers.plotChartMarkers({pointsPos:e,seriesIndex:a,j:i+1,pSize:t,alwaysDrawMarker:!0});null!==s&&this.elPointsMain.add(s)}}}class ye{constructor(t){this.w=t}drawYAxisTexts(t,e,s,i){const a=this.w,o=a.config.yaxis[0],r=a.formatters.yLabelFormatters[0];return new T(this.w).drawText({x:t+o.labels.offsetX,y:e+o.labels.offsetY,text:r(i,s),textAnchor:"middle",fontSize:o.labels.style.fontSize,fontFamily:o.labels.style.fontFamily,foreColor:Array.isArray(o.labels.style.colors)?o.labels.style.colors[s]:o.labels.style.colors})}}class we{constructor(t,e){this.ctx=e,this.w=t,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=void 0!==t.globals.stroke.colors?t.globals.stroke.colors:t.globals.colors,this.defaultSize=Math.min(t.layout.gridWidth,t.layout.gridHeight),this.centerY=this.defaultSize/2,this.centerX=t.layout.gridWidth/2,"radialBar"===t.config.chart.type?this.fullAngle=360:this.fullAngle=Math.abs(t.config.plotOptions.pie.endAngle-t.config.plotOptions.pie.startAngle),this.initialAngle=t.config.plotOptions.pie.startAngle%this.fullAngle,t.globals.radialSize=this.defaultSize/2.05-t.config.stroke.width-(t.config.chart.sparkline.enabled?0:t.config.chart.dropShadow.blur),this.donutSize=t.globals.radialSize*parseInt(t.config.plotOptions.pie.donut.size,10)/100;const s=t.config.plotOptions.pie.customScale,i=t.layout.gridWidth/2,a=t.layout.gridHeight/2;this.translateX=i-i*s,this.translateY=a-a*s,this.dataLabelsGroup=new T(this.w).group({class:"apexcharts-datalabels-group",transform:`translate(${this.translateX}, ${this.translateY}) scale(${s})`}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}draw(t){const e=this.w,s=new T(this.w),i=s.group({class:"apexcharts-pie"});if(e.globals.noData)return i;let a=0;for(let e=0;e<t.length;e++)a+=m.negToZero(t[e]);const o=[],r=s.group();0===a&&(a=1e-5),t.forEach(t=>{this.maxY=Math.max(this.maxY,t)}),e.config.yaxis[0].max&&(this.maxY=e.config.yaxis[0].max),"back"===e.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(i);for(let s=0;s<t.length;s++){const i=this.fullAngle*m.negToZero(t[s])/a;o.push(i),"polarArea"===this.chartType?(o[s]=this.fullAngle/t.length,this.sliceSizes.push(e.globals.radialSize*t[s]/this.maxY)):this.sliceSizes.push(e.globals.radialSize)}if(e.globals.dataChanged){let t,s=0;for(let t=0;t<e.globals.previousPaths.length;t++)s+=m.negToZero(e.globals.previousPaths[t]);for(let i=0;i<e.globals.previousPaths.length;i++)t=this.fullAngle*m.negToZero(e.globals.previousPaths[i])/s,this.prevSectorAngleArr.push(t)}if(this.donutSize<0&&(this.donutSize=0),"donut"===this.chartType){const t=s.drawCircle(this.donutSize);t.attr({cx:this.centerX,cy:this.centerY,fill:e.config.plotOptions.pie.donut.background?e.config.plotOptions.pie.donut.background:"transparent"}),r.add(t)}const n=this.drawArcs(o,t);if(this.sliceLabels.forEach(t=>{n.add(t)}),r.attr({transform:`translate(${this.translateX}, ${this.translateY}) scale(${e.config.plotOptions.pie.customScale})`}),r.add(n),i.add(r),this.donutDataLabels.show){const t=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});i.add(t)}return"front"===e.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(i),i}drawArcs(t,e){const s=this.w,i=new X(this.w),a=new T(this.w),o=new H(this.w),r=a.group({class:"apexcharts-slices"});let n=this.initialAngle,l=this.initialAngle,h=this.initialAngle,c=this.initialAngle;this.strokeWidth=s.config.stroke.show?s.config.stroke.width:0;for(let d=0;d<t.length;d++){const g=a.group({class:"apexcharts-series apexcharts-pie-series",seriesName:m.escapeString(s.seriesData.seriesNames[d]),rel:d+1,"data:realIndex":d});r.add(g),n=h,l=c,h=n+t[d],c=l+this.prevSectorAngleArr[d];const p=h<n?this.fullAngle+h-n:h-n,x=o.fillPath({seriesNumber:d,size:this.sliceSizes[d],value:e[d]}),u=this.getChangedPath(l,c),f=a.drawPath({d:u,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[d]:this.lineColorArr,strokeWidth:0,fill:x,fillOpacity:s.config.fill.opacity,classes:`apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${d}`});if(f.attr({index:0,j:d}),i.setSelectionFilter(f,0,d),s.config.chart.dropShadow.enabled){const t=s.config.chart.dropShadow;i.dropShadow(f,t,d)}this.addListeners(f,this.donutDataLabels);let b={x:0,y:0};const y=(n+p/2)%this.fullAngle;let w={x:this.centerX,y:this.centerY};"pie"===this.chartType||"polarArea"===this.chartType?(b=m.polarToCartesian(this.centerX,this.centerY,s.globals.radialSize/1.25+s.config.plotOptions.pie.dataLabels.offset,y),w=m.polarToCartesian(this.centerX,this.centerY,s.globals.radialSize/2,y)):"donut"===this.chartType&&(b=m.polarToCartesian(this.centerX,this.centerY,(s.globals.radialSize+this.donutSize)/2+s.config.plotOptions.pie.dataLabels.offset,y),w=m.polarToCartesian(this.centerX,this.centerY,(s.globals.radialSize+this.donutSize)/2,y)),T.setAttrs(f.node,{"data:angle":p,"data:startAngle":n,"data:strokeWidth":this.strokeWidth,"data:value":e[d],"data:cx":w.x,"data:cy":w.y}),g.add(f);let v=0;if(!this.initialAnim||s.globals.resized||s.globals.dataChanged?this.animBeginArr.push(0):(v=p/this.fullAngle*s.config.chart.animations.speed,0===v&&(v=1),this.animDur=v+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&s.globals.dataChanged?this.animatePaths(f,{size:this.sliceSizes[d],endAngle:h,startAngle:n,prevStartAngle:l,prevEndAngle:c,animateStartingPos:!0,i:d,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:s.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(f,{size:this.sliceSizes[d],endAngle:h,startAngle:n,i:d,totalItems:t.length-1,animBeginArr:this.animBeginArr,dur:v}),s.config.plotOptions.pie.expandOnClick&&"polarArea"!==this.chartType&&f.node.addEventListener("mouseup",this.pieClicked.bind(this,d)),void 0!==s.interact.selectedDataPoints[0]&&s.interact.selectedDataPoints[0].indexOf(d)>-1&&this.pieClicked(d),s.config.dataLabels.enabled){const e=b.x,o=b.y;let r=100*p/this.fullAngle+"%";if(0!==p&&s.config.plotOptions.pie.dataLabels.minAngleToShowLabel<t[d]){const t=s.config.dataLabels.formatter;void 0!==t&&(r=t(s.globals.seriesPercent[d][0],{seriesIndex:d,w:s}));const n=s.globals.dataLabels.style.colors[d],l=a.group({class:"apexcharts-datalabels"}),h=a.drawText({x:e,y:o,text:r,textAnchor:"middle",fontSize:s.config.dataLabels.style.fontSize,fontFamily:s.config.dataLabels.style.fontFamily,fontWeight:s.config.dataLabels.style.fontWeight,foreColor:n});if(l.add(h),s.config.dataLabels.dropShadow.enabled){const t=s.config.dataLabels.dropShadow;i.dropShadow(h,t)}h.node.classList.add("apexcharts-pie-label"),s.config.chart.animations.animate&&!1===s.globals.resized&&(h.node.classList.add("apexcharts-pie-label-delay"),h.node.style.animationDelay=s.config.chart.animations.speed/940+"s"),this.sliceLabels.push(l)}}}return r}addListeners(t,e){const s=new T(this.w);t.node.addEventListener("mouseenter",s.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",s.pathMouseLeave.bind(this,t)),t.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this)),t.node.addEventListener("mousedown",s.pathMouseDown.bind(this,t)),this.donutDataLabels.total.showAlways||(t.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,t.node,e)),t.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,t.node,e)))}animatePaths(t,e){const s=this.w;let i=e.endAngle<e.startAngle?this.fullAngle+e.endAngle-e.startAngle:e.endAngle-e.startAngle,a=i,o=e.startAngle;const r=e.startAngle;void 0!==e.prevStartAngle&&void 0!==e.prevEndAngle&&(o=e.prevEndAngle,a=e.prevEndAngle<e.prevStartAngle?this.fullAngle+e.prevEndAngle-e.prevStartAngle:e.prevEndAngle-e.prevStartAngle),e.i===s.config.series.length-1&&(i+r>this.fullAngle?e.endAngle=e.endAngle-(i+r):i+r<this.fullAngle&&(e.endAngle=e.endAngle+(this.fullAngle-(i+r)))),i===this.fullAngle&&(i=this.fullAngle-.01),this.animateArc(t,o,r,i,a,e)}animateArc(t,e,s,i,a,o){const r=this,n=this.w,l=new F(this.w),h=o.size;let c;(isNaN(e)||isNaN(a))&&(e=s,a=i,o.dur=0);let d=i,g=s;const p=e<s?this.fullAngle+e-s:e-s;n.globals.dataChanged&&o.shouldSetPrevPaths&&o.prevEndAngle&&(c=r.getPiePath({me:r,startAngle:o.prevStartAngle,angle:o.prevEndAngle<o.prevStartAngle?this.fullAngle+o.prevEndAngle-o.prevStartAngle:o.prevEndAngle-o.prevStartAngle,size:h}),t.attr({d:c})),0!==o.dur?t.animate(o.dur,o.animBeginArr[o.i]).after(function(){"pie"!==r.chartType&&"donut"!==r.chartType&&"polarArea"!==r.chartType||this.animate(n.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":r.strokeWidth}),o.i===n.config.series.length-1&&l.animationCompleted(t)}).during(n=>{d=p+(i-p)*n,o.animateStartingPos&&(d=a+(i-a)*n,g=e-a+(s-(e-a))*n),c=r.getPiePath({me:r,startAngle:g,angle:d,size:h}),t.node.setAttribute("data:pathOrig",c),t.attr({d:c})}):(c=r.getPiePath({me:r,startAngle:g,angle:i,size:h}),o.isTrack||(n.globals.animationEnded=!0),t.node.setAttribute("data:pathOrig",c),t.attr({d:c,"stroke-width":r.strokeWidth}))}pieClicked(t){const e=this.w,s=this,i=s.sliceSizes[t]+(e.config.plotOptions.pie.expandOnClick?4:0),a=e.dom.Paper.findOne(`.apexcharts-${s.chartType.toLowerCase()}-slice-${t}`);if("true"===a.attr("data:pieClicked")){a.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner();const t=a.attr("data:pathOrig");return void a.attr({d:t})}{const s=e.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(s,t=>{t.setAttribute("data:pieClicked","false");const e=t.getAttribute("data:pathOrig");e&&t.setAttribute("d",e)}),e.interact.capturedDataPointIndex=t,a.attr("data:pieClicked","true")}const o=parseInt(a.attr("data:startAngle"),10),r=parseInt(a.attr("data:angle"),10),n=s.getPiePath({me:s,startAngle:o,angle:r,size:i});360!==r&&a.plot(n)}getChangedPath(t,e){let s="";return this.dynamicAnim&&this.w.globals.dataChanged&&(s=this.getPiePath({me:this,startAngle:t,angle:e-t,size:this.size})),s}getPiePath({me:t,startAngle:e,angle:s,size:i}){let a;const o=new T(this.w),r=e,n=Math.PI*(r-90)/180;let l=s+e;Math.ceil(l)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(l=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(l)>this.fullAngle&&(l-=this.fullAngle);const h=Math.PI*(l-90)/180,c=t.centerX+i*Math.cos(n),d=t.centerY+i*Math.sin(n),g=t.centerX+i*Math.cos(h),p=t.centerY+i*Math.sin(h),x=m.polarToCartesian(t.centerX,t.centerY,t.donutSize,l),u=m.polarToCartesian(t.centerX,t.centerY,t.donutSize,r),f=s>180?1:0,b=["M",c,d,"A",i,i,0,f,1,g,p];return a="donut"===t.chartType?[...b,"L",x.x,x.y,"A",t.donutSize,t.donutSize,0,f,0,u.x,u.y,"L",c,d,"z"].join(" "):"pie"===t.chartType||"polarArea"===t.chartType?[...b,"L",t.centerX,t.centerY,"L",c,d].join(" "):[...b].join(" "),o.roundPathCorners(a,2*this.strokeWidth)}drawPolarElements(t){const e=this.w,s=new V(this.w),i=new T(this.w),a=new ye(this.w),o=i.group(),r=i.group(),n=s.niceScale(0,Math.ceil(this.maxY),0),l=n.result.reverse(),h=n.result.length;this.maxY=n.niceMax;let c=e.globals.radialSize;const d=c/(h-1);for(let t=0;t<h-1;t++){const s=i.drawCircle(c);if(s.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":e.config.plotOptions.polarArea.rings.strokeWidth,stroke:e.config.plotOptions.polarArea.rings.strokeColor}),e.config.yaxis[0].show){const s=a.drawYAxisTexts(this.centerX,this.centerY-c+parseInt(e.config.yaxis[0].labels.style.fontSize,10)/2,t,l[t]);r.add(s)}o.add(s),c-=d}this.drawSpokes(t),t.add(o),t.add(r)}renderInnerDataLabels(t,e,s){const i=this.w,a=new T(this.w),o=e.total.show;t.node.innerHTML="",t.node.style.opacity=s.opacity;const r=s.centerX,n=this.donutDataLabels.total.label?s.centerY:s.centerY-s.centerY/6;let l,h;l=void 0===e.name.color?i.globals.colors[0]:e.name.color;let c=e.name.fontSize,d=e.name.fontFamily,g=e.name.fontWeight;h=void 0===e.value.color?i.config.chart.foreColor:e.value.color;const p=e.value.formatter;let x="",u="";if(o?(l=e.total.color,c=e.total.fontSize,d=e.total.fontFamily,g=e.total.fontWeight,u=this.donutDataLabels.total.label?e.total.label:"",x=e.total.formatter(i)):1===i.seriesData.series.length&&(x=p(i.seriesData.series[0],i),u=i.seriesData.seriesNames[0]),u&&(u=e.name.formatter(u,e.total.show,i)),e.name.show){const s=a.drawText({x:r,y:n+parseFloat(e.name.offsetY),text:u,textAnchor:"middle",foreColor:l,fontSize:c,fontWeight:g,fontFamily:d});s.node.classList.add("apexcharts-datalabel-label"),t.add(s)}if(e.value.show){const s=e.name.show?parseFloat(e.value.offsetY)+16:e.value.offsetY,i=a.drawText({x:r,y:n+s,text:x,textAnchor:"middle",foreColor:h,fontWeight:e.value.fontWeight,fontSize:e.value.fontSize,fontFamily:e.value.fontFamily});i.node.classList.add("apexcharts-datalabel-value"),t.add(i)}return t}printInnerLabels(t,e,s,i){const a=this.w;let o;i?o=void 0===t.name.color?a.globals.colors[parseInt(i.parentNode.getAttribute("rel"),10)-1]:t.name.color:a.seriesData.series.length>1&&t.total.show&&(o=t.total.color);const r=a.dom.baseEl.querySelector(".apexcharts-datalabel-label"),n=a.dom.baseEl.querySelector(".apexcharts-datalabel-value");s=(0,t.value.formatter)(s,a),i||"function"!=typeof t.total.formatter||(s=t.total.formatter(a));const l=e===t.total.label;if(e=this.donutDataLabels.total.label?t.name.formatter(e,l,a):"",null!==r&&(r.textContent=e),null!==n&&(n.textContent=s),null!==r){r.style.fill=o}}printDataLabelsInner(t,e){const s=this.w,i=t.getAttribute("data:value"),a=s.seriesData.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];s.seriesData.series.length>1&&this.printInnerLabels(e,a,i,t);const o=s.dom.baseEl.querySelector(".apexcharts-datalabels-group");if(null!==o){o.style.opacity="1"}}drawSpokes(t){const e=this.w,s=new T(this.w),i=e.config.plotOptions.polarArea.spokes;if(0===i.strokeWidth)return;const a=[],o=360/e.seriesData.series.length;for(let t=0;t<e.seriesData.series.length;t++)a.push(m.polarToCartesian(this.centerX,this.centerY,e.globals.radialSize,e.config.plotOptions.pie.startAngle+o*t));a.forEach((e,a)=>{const o=s.drawLine(e.x,e.y,this.centerX,this.centerY,Array.isArray(i.connectorColors)?i.connectorColors[a]:i.connectorColors);t.add(o)})}revertDataLabelsInner(){const t=this.w;if(this.donutDataLabels.show){const e=t.dom.Paper.findOne(".apexcharts-datalabels-group"),s=this.renderInnerDataLabels(e,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});t.dom.Paper.findOne(".apexcharts-radialbar, .apexcharts-pie").add(s)}}}function ve(t,e){let s=0;for(let e=0;e<t.length;e++)s+=t[e];const i=e/s,a=new Array(t.length);for(let e=0;e<t.length;e++)a[e]=t[e]*i;return a}function Ae(t,e,s,i){const a=i*i,o=s*s;return Math.max(a*e/o,o/(a*t))}function Ce(t,e,s,i,a,o){if(0===t)return!0;return Ae(e,s,i,o)>=Ae(Math.min(e,a),Math.max(s,a),i+a,o)}function Se(t,e,s,i,a,o,r,n){if(r>=n){const r=i/n;let l=o;for(let i=0;i<s;i++){const s=e[i]/r;t.push([a,l,a+r,l+s]),l+=s}}else{const n=i/r;let l=a;for(let i=0;i<s;i++){const s=e[i]/n;t.push([l,o,l+s,o+n]),l+=s}}}function ke(t,e,s,i,a){const o=[],r=t.length;if(0===r)return o;const n=new Array(r);let l=0,h=0,c=1/0,d=-1/0,g=0;for(;g<r;){const r=Math.min(i,a),p=t[g];if(Ce(l,c,d,h,p,r))n[l]=p,l++,h+=p,p<c&&(c=p),p>d&&(d=p),g++;else{if(Se(o,n,l,h,e,s,i,a),i>=a){const t=h/a;e+=t,i-=t}else{const t=h/i;s+=t,a-=t}l=0,h=0,c=1/0,d=-1/0}}return l>0&&Se(o,n,l,h,e,s,i,a),o}const De={generate:function(t,e,s){const i=t.length,a=new Array(i);for(let e=0;e<i;e++){let s=0;const i=t[e];for(let t=0;t<i.length;t++)s+=i[t];a[e]=s}const o=ke(ve(a,e*s),0,0,e,s),r=new Array(i);for(let e=0;e<i;e++){const s=o[e],i=s[0],a=s[1],n=s[2]-i,l=s[3]-a;r[e]=ke(ve(t[e],n*l),i,a,n,l)}return r}};return te.use({line:me,area:me,scatter:me,bubble:me,rangeArea:me,bar:de,column:de,barStacked:class extends de{draw(t,e){const s=this.w;this.graphics=new T(this.w),this.bar=new de(this.w,this.ctx,this.xyRatios);const i=new E(this.w);t=i.getLogSeries(t),this.yRatio=i.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===s.config.chart.stackType&&(t=s.globals.comboCharts?e.map(t=>s.globals.seriesPercent[t]):s.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);const a=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"});let o=0,r=0;for(let i=0,h=0;i<t.length;i++,h++){const c=s.globals.comboCharts?e[i]:i,{groupIndex:d,columnGroupIndex:g}=this.barHelpers.getGroupIndex(c);this.groupCtx=this[s.labelData.seriesGroups[d]];const p=[],x=[];let u=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[c][0],u=c),this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed;let f=this.graphics.group({class:"apexcharts-series",seriesName:m.escapeString(s.seriesData.seriesNames[c]),rel:i+1,"data:realIndex":c});et.addCollapsedClassToSeries(this.w,f,c);const b=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":c}),y=this.graphics.group({class:"apexcharts-bar-goals-markers"}),w=this.initialPositions(o,r,void 0,void 0,void 0,void 0,u),{xDivision:v,yDivision:A,zeroH:C,zeroW:S}=w;let k=w.barHeight,D=w.barWidth;r=w.y,o=w.x,s.globals.barHeight=k,s.globals.barWidth=D,this.barHelpers.initializeStackedXYVars(this),1===this.groupCtx.prevY.length&&this.groupCtx.prevY[0].every(t=>isNaN(t))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>C),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let e=0;e<s.globals.dataPoints;e++){const a=this.barHelpers.getStrokeWidth(i,e,c),m={indexes:{i:i,j:e,realIndex:c,translationsIndex:u,bc:h},strokeWidth:a,x:o,y:r,elSeries:f,columnGroupIndex:g,seriesGroup:s.labelData.seriesGroups[d]};let w=null;this.isHorizontal?(w=this.drawStackedBarPaths(l(n({},m),{zeroW:S,barHeight:k,yDivision:A})),D=this.series[i][e]/this.invertedYRatio):(w=this.drawStackedColumnPaths(l(n({},m),{xDivision:v,barWidth:D,zeroH:C})),k=this.series[i][e]/this.yRatio[u]);const L=this.barHelpers.drawGoalLine({barXPosition:w.barXPosition,barYPosition:w.barYPosition,goalX:w.goalX,goalY:w.goalY,barHeight:k,barWidth:D});L&&y.add(L),r=w.y,o=w.x,p.push(o),x.push(r);const P=this.barHelpers.getPathFillColor(t,i,e,c);let M="";const I=s.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";("bottom"===this.barHelpers.arrBorderRadius[c][e]&&s.seriesData.series[c][e]>0||"top"===this.barHelpers.arrBorderRadius[c][e]&&s.seriesData.series[c][e]<0)&&(M=I),f=this.renderSeries(l(n({realIndex:c,pathFill:P.color},P.useRangeColor?{lineFill:P.color}:{}),{j:e,i:i,columnGroupIndex:g,pathFrom:w.pathFrom,pathTo:w.pathTo,strokeWidth:a,elSeries:f,x:o,y:r,series:t,barHeight:k,barWidth:D,elDataLabelsWrap:b,elGoalsMarkers:y,type:"bar",visibleSeries:g,classes:M}))}s.globals.seriesXvalues[c]=p,s.globals.seriesYvalues[c]=x,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),a.add(f)}return a}initialPositions(t,e,s,i,a,o,r){const n=this.w;let l,h;if(this.isHorizontal){i=n.layout.gridHeight/n.globals.dataPoints;const t=n.config.plotOptions.bar.barHeight;l=-1===String(t).indexOf("%")?parseInt(t,10):i*parseInt(t,10)/100,o=n.globals.padHorizontal+(this.isReversed?n.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),e=(i-l)/2}else{h=s=n.layout.gridWidth/n.globals.dataPoints;const e=n.config.plotOptions.bar.columnWidth;n.axisFlags.isXNumeric&&n.globals.dataPoints>1?h=(s=n.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:-1===String(e).indexOf("%")?h=parseInt(e,10):h*=parseInt(e,10)/100,a=this.isReversed?this.baseLineY[r]:n.layout.gridHeight-this.baseLineY[r],t=n.globals.padHorizontal+(s-h)/2}const c=n.globals.barGroups.length||1;return{x:t,y:e,yDivision:i,xDivision:s,barHeight:(null!=l?l:0)/c,barWidth:(null!=h?h:0)/c,zeroH:a,zeroW:o}}drawStackedBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:i,x:a,y:o,columnGroupIndex:r,seriesGroup:n,yDivision:l,elSeries:h}){var c,d,g,p,x;const u=this.w,f=o+r*e;let b;const m=t.i,y=t.j,w=t.realIndex,v=t.translationsIndex;let A=0;for(let t=0;t<this.groupCtx.prevXF.length;t++)A+=this.groupCtx.prevXF[t][y];let C=m;if(u.config.series[w].name&&(C=n.indexOf(u.config.series[w].name)),C>0){let t=i;this.groupCtx.prevXVal[C-1][y]<0?t=(null==(c=this.series[m])?void 0:c[y])>=0?this.groupCtx.prevX[C-1][y]+A-2*(this.isReversed?A:0):this.groupCtx.prevX[C-1][y]:this.groupCtx.prevXVal[C-1][y]>=0&&(t=(null==(d=this.series[m])?void 0:d[y])>=0?this.groupCtx.prevX[C-1][y]:this.groupCtx.prevX[C-1][y]-A+2*(this.isReversed?A:0)),b=t}else b=i;a=null===(null==(g=this.series[m])?void 0:g[y])?b:b+(null==(p=this.series[m])?void 0:p[y])/this.invertedYRatio-2*(this.isReversed?(null==(x=this.series[m])?void 0:x[y])/this.invertedYRatio:0);const S=this.barHelpers.getBarpaths({barYPosition:f,barHeight:e,x1:b,x2:a,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,seriesGroup:n,i:m,j:y,w:u});return this.barHelpers.barBackground({j:y,i:m,y1:f,y2:e,elSeries:h}),o+=l,{pathTo:S.pathTo,pathFrom:S.pathFrom,goalX:this.barHelpers.getGoalValues("x",i,null,m,y,v),barXPosition:b,barYPosition:f,x:a,y:o}}drawStackedColumnPaths({indexes:t,x:e,y:s,xDivision:i,barWidth:a,zeroH:o,columnGroupIndex:r,seriesGroup:n,elSeries:l}){var h,c,d,g,p,x,u,f,b;const m=this.w,y=t.i,w=t.j,v=t.bc,A=t.realIndex,C=t.translationsIndex;if(m.axisFlags.isXNumeric){let t=m.seriesData.seriesX[A][w];t||(t=0),e=(t-m.globals.minX)/this.xRatio-a/2*m.globals.barGroups.length}const S=e+r*a;let k,D=0;for(let t=0;t<this.groupCtx.prevYF.length;t++)D+=isNaN(this.groupCtx.prevYF[t][w])?0:this.groupCtx.prevYF[t][w];let L=y;if(n&&(L=n.indexOf(m.seriesData.seriesNames[A])),L>0&&!m.axisFlags.isXNumeric||L>0&&m.axisFlags.isXNumeric&&m.seriesData.seriesX[A-1][w]===m.seriesData.seriesX[A][w]){let t,e;const s=Math.min(this.yRatio.length+1,A+1);if(void 0!==this.groupCtx.prevY[L-1]&&this.groupCtx.prevY[L-1].length)for(let t=1;t<s;t++)if(!isNaN(null==(h=this.groupCtx.prevY[L-t])?void 0:h[w])){e=this.groupCtx.prevY[L-t][w];break}for(let i=1;i<s;i++){if((null==(c=this.groupCtx.prevYVal[L-i])?void 0:c[w])<0){t=(null==(d=this.series[y])?void 0:d[w])>=0?e-D+2*(this.isReversed?D:0):e;break}if((null==(g=this.groupCtx.prevYVal[L-i])?void 0:g[w])>=0){t=(null==(p=this.series[y])?void 0:p[w])>=0?e:e+D-2*(this.isReversed?D:0);break}}void 0===t&&(t=m.layout.gridHeight),k=(null==(x=this.groupCtx.prevYF[0])?void 0:x.every(t=>0===t))&&this.groupCtx.prevYF.slice(1,L).every(t=>t.every(t=>isNaN(t)))?o:t}else k=o;s=(null==(u=this.series[y])?void 0:u[w])?k-(null==(f=this.series[y])?void 0:f[w])/this.yRatio[C]+2*(this.isReversed?(null==(b=this.series[y])?void 0:b[w])/this.yRatio[C]:0):k;const P=this.barHelpers.getColumnPaths({barXPosition:S,barWidth:a,y1:k,y2:s,yRatio:this.yRatio[C],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:n,realIndex:t.realIndex,i:y,j:w,w:m});return this.barHelpers.barBackground({bc:v,j:w,i:y,x1:S,x2:a,elSeries:l}),{pathTo:P.pathTo,pathFrom:P.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,o,y,w,0),barXPosition:S,x:m.axisFlags.isXNumeric?e:e+i,y:s}}},rangeBar:class extends de{draw(t,e){var s,i,a,o,r,l,h,c,d;const g=this.w,p=new T(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=g.rangeData.seriesRangeStart,this.seriesRangeEnd=g.rangeData.seriesRangeEnd,this.barHelpers.initVariables(t);const x=p.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let u=0;u<t.length;u++){let f,b;const y=g.globals.comboCharts?e[u]:u,{columnGroupIndex:w}=this.barHelpers.getGroupIndex(y),v=p.group({class:"apexcharts-series",seriesName:m.escapeString(g.seriesData.seriesNames[y]),rel:u+1,"data:realIndex":y});et.addCollapsedClassToSeries(this.w,v,y),t[u].length>0&&(this.visibleI=this.visibleI+1);let A=0;this.yRatio.length>1&&(this.yaxisIndex=g.globals.seriesYAxisReverseMap[y][0],A=y);const C=this.barHelpers.initialPositions(y),{y:S,zeroW:k,x:D,zeroH:L}=C;let P=null!=(s=C.barWidth)?s:0,M=null!=(i=C.barHeight)?i:0;const I=null!=(a=C.yDivision)?a:0,E=null!=(o=C.xDivision)?o:0;b=S,f=D;const F=p.group({class:"apexcharts-datalabels","data:realIndex":y}),X=p.group({class:"apexcharts-rangebar-goals-markers"});for(let e=0;e<g.globals.dataPoints;e++){const s=this.barHelpers.getStrokeWidth(u,e,y),i=this.seriesRangeStart[u][e],a=this.seriesRangeEnd[u][e];let o=null,p=null,x=null;const m={x:f,y:b,strokeWidth:s,elSeries:v};let S=this.seriesLen;if(g.config.plotOptions.bar.rangeBarGroupRows&&(S=1),void 0===(null==(r=g.config.series[u].data)?void 0:r[e]))break;if(this.isHorizontal){x=b+M*this.visibleI;const t=(I-M*S)/2;if(null==(h=null==(l=g.config.series[u].data)?void 0:l[e])?void 0:h.x){const s=this.detectOverlappingBars({i:u,j:e,barYPosition:x,srty:t,barHeight:M,yDivision:I,initPositions:C});M=s.barHeight,x=s.barYPosition}o=this.drawRangeBarPaths(n({indexes:{i:u,j:e,realIndex:y},barHeight:M,barYPosition:x,zeroW:k,yDivision:I,y1:i,y2:a},m)),P=o.barWidth}else{g.axisFlags.isXNumeric&&(f=(g.seriesData.seriesX[u][e]-g.globals.minX)/this.xRatio-P/2),p=f+P*this.visibleI;const t=(E-P*S)/2;if(null==(d=null==(c=g.config.series[u].data)?void 0:c[e])?void 0:d.x){const s=this.detectOverlappingBars({i:u,j:e,barXPosition:p,srtx:t,barWidth:P,xDivision:E,initPositions:C});P=s.barWidth,p=s.barXPosition}o=this.drawRangeColumnPaths(n({indexes:{i:u,j:e,realIndex:y,translationsIndex:A},barWidth:P,barXPosition:p,zeroH:L,xDivision:E},m)),M=o.barHeight}const D=this.barHelpers.drawGoalLine({barXPosition:o.barXPosition,barYPosition:x,goalX:o.goalX,goalY:o.goalY,barHeight:M,barWidth:P});D&&X.add(D),b=o.y,f=o.x;const T=this.barHelpers.getPathFillColor(t,u,e,y);this.renderSeries({realIndex:y,pathFill:T.color,lineFill:T.useRangeColor?T.color:g.globals.stroke.colors[y],j:e,i:u,x:f,y:b,y1:i,y2:a,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:s,elSeries:v,series:t,barHeight:M,barWidth:P,barXPosition:p,barYPosition:x,columnGroupIndex:w,elDataLabelsWrap:F,elGoalsMarkers:X,visibleSeries:this.visibleI,type:"rangebar"})}x.add(v)}return x}detectOverlappingBars({i:t,j:e,barYPosition:s,barXPosition:i,srty:a,srtx:o,barHeight:r,barWidth:n,yDivision:l,xDivision:h,initPositions:c}){var d,g,p,x;const u=this.w;let f=[];const b=null==(g=null==(d=u.config.series[t].data)?void 0:d[e])?void 0:g.rangeName,m=null==(x=null==(p=u.config.series[t].data)?void 0:p[e])?void 0:x.x,y=Array.isArray(m)?m.join(" "):m,w=u.labelData.labels.map(t=>Array.isArray(t)?t.join(" "):t).indexOf(y),v=u.rangeData.seriesRange[t].findIndex(t=>{var e;return t.x===y&&(null==(e=t.overlaps)?void 0:e.size)>0});return this.isHorizontal?(s=u.config.plotOptions.bar.rangeBarGroupRows?a+l*w:a+r*this.visibleI+l*w,v>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(f=Array.from(u.rangeData.seriesRange[t][v].overlaps),f.indexOf(b)>-1&&(s=(r=c.barHeight/f.length)*this.visibleI+l*(100-parseInt(this.barOptions.barHeight,10))/100/2+r*(this.visibleI+f.indexOf(b))+l*w))):(w>-1&&!u.labelData.timescaleLabels.length&&(i=u.config.plotOptions.bar.rangeBarGroupRows?o+h*w:o+n*this.visibleI+h*w),v>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(f=Array.from(u.rangeData.seriesRange[t][v].overlaps),f.indexOf(b)>-1&&(i=(n=c.barWidth/f.length)*this.visibleI+h*(100-parseInt(this.barOptions.barWidth,10))/100/2+n*(this.visibleI+f.indexOf(b))+h*w))),{barYPosition:s,barXPosition:i,barHeight:r,barWidth:n}}drawRangeColumnPaths({indexes:t,x:e,xDivision:s,barWidth:i,barXPosition:a,zeroH:o}){var r,n;const l=this.w,{i:h,j:c,realIndex:d,translationsIndex:g}=t,p=this.yRatio[g],x=this.getRangeValue(d,c);let u=Math.min(x.start,x.end),f=Math.max(x.start,x.end);void 0===(null==(r=this.series[h])?void 0:r[c])||null===(null==(n=this.series[h])?void 0:n[c])?u=o:(u=o-u/p,f=o-f/p);const b=Math.abs(f-u),m=this.barHelpers.getColumnPaths({barXPosition:a,barWidth:i,y1:u,y2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:d,i:d,j:c,w:l});if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:c,realIndex:d,barWidth:i});e=t.x,a=t.barXPosition}else e+=s;return{pathTo:m.pathTo,pathFrom:m.pathFrom,barHeight:b,x:e,y:x.start<0&&x.end<0?u:f,goalY:this.barHelpers.getGoalValues("y",null,o,h,c,g),barXPosition:a}}preventBarOverflow(t){const e=this.w;return t<0&&(t=0),t>e.layout.gridWidth&&(t=e.layout.gridWidth),t}drawRangeBarPaths({indexes:t,y:e,y1:s,y2:i,yDivision:a,barHeight:o,barYPosition:r,zeroW:n}){const l=this.w,{realIndex:h,j:c}=t,d=this.preventBarOverflow(n+s/this.invertedYRatio),g=this.preventBarOverflow(n+i/this.invertedYRatio),p=this.getRangeValue(h,c),x=Math.abs(g-d),u=this.barHelpers.getBarpaths({barYPosition:r,barHeight:o,x1:d,x2:g,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:h,realIndex:h,j:c,w:l});return l.axisFlags.isXNumeric||(e+=a),{pathTo:u.pathTo,pathFrom:u.pathFrom,barWidth:x,x:p.start<0&&p.end<0?d:g,goalX:this.barHelpers.getGoalValues("x",n,null,h,c,0),y:e}}getRangeValue(t,e){const s=this.w;return{start:s.rangeData.seriesRangeStart[t][e],end:s.rangeData.seriesRangeEnd[t][e]}}},candlestick:ge,boxPlot:ge,pie:we,donut:we,polarArea:we,radialBar:class extends we{constructor(t,e){super(t,e),this.ctx=e,this.w=t,this.animBeginArr=[0],this.animDur=0,this.startAngle=t.config.plotOptions.radialBar.startAngle,this.endAngle=t.config.plotOptions.radialBar.endAngle,this.totalAngle=Math.abs(t.config.plotOptions.radialBar.endAngle-t.config.plotOptions.radialBar.startAngle),this.trackStartAngle=t.config.plotOptions.radialBar.track.startAngle,this.trackEndAngle=t.config.plotOptions.radialBar.track.endAngle,this.barLabels=this.w.config.plotOptions.radialBar.barLabels,this.donutDataLabels=this.w.config.plotOptions.radialBar.dataLabels,this.radialDataLabels=this.donutDataLabels,this.trackStartAngle||(this.trackStartAngle=this.startAngle),this.trackEndAngle||(this.trackEndAngle=this.endAngle),360===this.endAngle&&(this.endAngle=359.99),this.margin=parseInt(t.config.plotOptions.radialBar.track.margin,10),this.onBarLabelClick=this.onBarLabelClick.bind(this)}draw(t){const e=this.w,s=new T(this.w),i=s.group({class:"apexcharts-radialbar"});if(e.globals.noData)return i;const a=s.group(),o=this.defaultSize/2,r=e.layout.gridWidth/2;let n=this.defaultSize/2.05;e.config.chart.sparkline.enabled||(n=n-e.config.stroke.width-e.config.chart.dropShadow.blur);const l=e.globals.fill.colors;if(e.config.plotOptions.radialBar.track.show){const e=this.drawTracks({size:n,centerX:r,centerY:o,colorArr:l,series:t});a.add(e)}const h=this.drawArcs({size:n,centerX:r,centerY:o,colorArr:l,series:t});let c=360;e.config.plotOptions.radialBar.startAngle<0&&(c=this.totalAngle);const d=(360-c)/360;if(e.globals.radialSize=n-n*d,this.radialDataLabels.value.show){const t=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);e.globals.radialSize+=t*d}return a.add(h.g),"front"===e.config.plotOptions.radialBar.hollow.position&&(h.g.add(h.elHollow),h.dataLabels&&h.g.add(h.dataLabels)),i.add(a),i}drawTracks(t){const e=this.w,s=new T(this.w),i=s.group({class:"apexcharts-tracks"}),a=new X(this.w),o=new H(this.w),r=this.getStrokeWidth(t);t.size=t.size-r/2;for(let n=0;n<t.series.length;n++){const l=s.group({class:"apexcharts-radialbar-track apexcharts-track"});i.add(l),l.attr({rel:n+1}),t.size=t.size-r-this.margin;const h=e.config.plotOptions.radialBar.track,c=o.fillPath({seriesNumber:0,size:t.size,fillColors:Array.isArray(h.background)?h.background[n]:h.background,solid:!0}),d=this.trackStartAngle;let g=this.trackEndAngle;Math.abs(g)+Math.abs(d)>=360&&(g=360-Math.abs(this.startAngle)-.1);const p=s.drawPath({d:"",stroke:c,strokeWidth:r*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){const t=h.dropShadow;a.dropShadow(p,t)}l.add(p),p.attr("id","apexcharts-radialbarTrack-"+n),this.animatePaths(p,{centerX:t.centerX,centerY:t.centerY,endAngle:g,startAngle:d,size:t.size,i:n,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return i}drawArcs(t){const e=this.w,s=new T(this.w),i=new H(this.w),a=new X(this.w),o=s.group(),r=this.getStrokeWidth(t);t.size=t.size-r/2;let n=e.config.plotOptions.radialBar.hollow.background;const l=t.size-r*t.series.length-this.margin*t.series.length-r*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(n=this.drawHollowImage(t,o,l,n));const c=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:n||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){const t=e.config.plotOptions.radialBar.hollow.dropShadow;a.dropShadow(c,t)}let d=1;!this.radialDataLabels.total.show&&e.seriesData.series.length>1&&(d=0);let g=null;if(this.radialDataLabels.show){const s=e.dom.Paper.findOne(".apexcharts-datalabels-group");g=this.renderInnerDataLabels(s,this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:d})}"back"===e.config.plotOptions.radialBar.hollow.position&&(o.add(c),g&&o.add(g));let p=!1;e.config.plotOptions.radialBar.inverseOrder&&(p=!0);for(let n=p?t.series.length-1:0;p?n>=0:n<t.series.length;p?n--:n++){const l=s.group({class:"apexcharts-series apexcharts-radial-series",seriesName:m.escapeString(e.seriesData.seriesNames[n])});o.add(l),l.attr({rel:n+1,"data:realIndex":n}),et.addCollapsedClassToSeries(this.w,l,n),t.size=t.size-r-this.margin;const h=i.fillPath({seriesNumber:n,size:t.size,value:t.series[n]}),c=this.startAngle;let d;const g=m.negToZero(t.series[n]>100?100:t.series[n])/100;let p,x=Math.round(this.totalAngle*g)+this.startAngle;e.globals.dataChanged&&(d=this.startAngle,p=Math.round(this.totalAngle*m.negToZero(e.globals.previousPaths[n])/100)+d);Math.abs(x)+Math.abs(c)>360&&(x-=.01);Math.abs(p)+Math.abs(d)>360&&(p-=.01);const u=x-c,f=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[n]:e.config.stroke.dashArray,b=s.drawPath({d:"",stroke:h,strokeWidth:r,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+n,strokeDashArray:f}),y=c+u/2,w=m.polarToCartesian(t.centerX,t.centerY,t.size,y);if(T.setAttrs(b.node,{"data:angle":u,"data:value":t.series[n],"data:cx":w.x,"data:cy":w.y}),e.config.chart.dropShadow.enabled){const t=e.config.chart.dropShadow;a.dropShadow(b,t,n)}if(a.setSelectionFilter(b,0,n),this.addListeners(b,this.radialDataLabels),l.add(b),b.attr({index:0,j:n}),this.barLabels.enabled){const i=m.polarToCartesian(t.centerX,t.centerY,t.size,c),a=this.barLabels.formatter(e.seriesData.seriesNames[n],{seriesIndex:n,w:e}),o=["apexcharts-radialbar-label"];this.barLabels.onClick||o.push("apexcharts-no-click");let r=this.barLabels.useSeriesColors?e.globals.colors[n]:e.config.chart.foreColor;r||(r=e.config.chart.foreColor);const h=i.x+this.barLabels.offsetX,d=i.y+this.barLabels.offsetY,g=s.drawText({x:h,y:d,text:a,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:r,cssClass:o.join(" ")});g.on("click",this.onBarLabelClick),g.attr({rel:n+1}),0!==c&&g.attr({"transform-origin":`${h} ${d}`,transform:`rotate(${c} 0 0)`}),l.add(g)}let v=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(v=e.config.chart.animations.speed),e.globals.dataChanged&&(v=e.config.chart.animations.dynamicAnimation.speed),this.animDur=v/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(b,{centerX:t.centerX,centerY:t.centerY,endAngle:x,startAngle:c,prevEndAngle:p,prevStartAngle:d,size:t.size,i:n,totalItems:2,animBeginArr:this.animBeginArr,dur:v,shouldSetPrevPaths:!0})}return{g:o,elHollow:c,dataLabels:g}}drawHollow(t){const e=new T(this.w).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}drawHollowImage(t,e,s,i){const a=this.w,o=new H(this.w),r=m.randomId(),n=a.config.plotOptions.radialBar.hollow.image;if(a.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:s,height:s,image:n,patternID:`pattern${a.globals.cuid}${r}`}),i=`url(#pattern${a.globals.cuid}${r})`;else{const s=a.config.plotOptions.radialBar.hollow.imageWidth,i=a.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===s&&void 0===i){const s=a.dom.Paper.image(n,function(e){this.move(t.centerX-e.width/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+a.config.plotOptions.radialBar.hollow.imageOffsetY)});e.add(s)}else{const o=a.dom.Paper.image(n,function(){this.move(t.centerX-s/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-i/2+a.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(s,i)});e.add(o)}}return i}getStrokeWidth(t){const e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}onBarLabelClick(t){var e;const s=t.target,i=parseInt(null!=(e=s.getAttribute("rel"))?e:"",10)-1,a=this.barLabels.onClick,o=this.w;a&&a(o.seriesData.seriesNames[i],{w:o,seriesIndex:i})}},radar:class{constructor(t,e){this.ctx=e,this.w=t,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0,this.graphics=new T(this.w),this.lineColorArr=void 0!==t.globals.stroke.colors?t.globals.stroke.colors:t.globals.colors,this.defaultSize=t.globals.svgHeight<t.globals.svgWidth?t.layout.gridHeight:t.layout.gridWidth,this.isLog=t.config.yaxis[0].logarithmic,this.logBase=t.config.yaxis[0].logBase,this.coreUtils=new E(this.w),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,t.globals.maxY,0):t.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):t.globals.minY,this.polygons=t.config.plotOptions.radar.polygons,this.strokeWidth=t.config.stroke.show?t.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-t.config.chart.dropShadow.blur,t.config.xaxis.labels.show&&(this.size=this.size-t.layout.xAxisLabelsWidth/1.75),void 0!==t.config.plotOptions.radar.size&&(this.size=t.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.dataPointsLen=0,this.disAngle=0,this.yaxisLabelsTextsPos=[]}draw(t){const e=this.w,s=new H(this.w),i=[],a=new W(this.w,this.ctx);t.length&&(this.dataPointsLen=t[e.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;const o=e.layout.gridWidth/2,r=e.layout.gridHeight/2,h=o+e.config.plotOptions.radar.offsetX,c=r+e.config.plotOptions.radar.offsetY,d=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:`translate(${h||0}, ${c||0})`});let g=[],p=null,x=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),t.forEach((t,o)=>{const r=t.length===e.globals.dataPoints,h=this.graphics.group().attr({class:"apexcharts-series","data:longestSeries":r,seriesName:m.escapeString(e.seriesData.seriesNames[o]),rel:o+1,"data:realIndex":o});this.dataRadiusOfPercent[o]=[],this.dataRadius[o]=[],this.angleArr[o]=[],t.forEach((t,e)=>{const s=Math.abs(this.maxValue-this.minValue);t-=this.minValue,this.isLog&&(t=this.coreUtils.getLogVal(this.logBase,t,0)),this.dataRadiusOfPercent[o][e]=t/s,this.dataRadius[o][e]=this.dataRadiusOfPercent[o][e]*this.size,this.angleArr[o][e]=e*this.disAngle}),g=this.getDataPointsPos(this.dataRadius[o],this.angleArr[o]);const c=this.createPaths(g,{x:0,y:0});p=this.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),x=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":o}),e.globals.delayedElements.push({el:p.node,index:o});const d={i:o,realIndex:o,animationDelay:o,initialSpeed:e.config.chart.animations.speed,dataChangeSpeed:e.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:e.globals.stroke.colors[o],strokeLineCap:e.config.stroke.lineCap};let u=null;e.globals.previousPaths.length>0&&(u=this.getPreviousPath(o));for(let t=0;t<c.linePathsTo.length;t++){const i=this.graphics.renderPaths(l(n({},d),{pathFrom:null===u?c.linePathsFrom[t]:u,pathTo:c.linePathsTo[t],strokeWidth:Array.isArray(this.strokeWidth)?this.strokeWidth[o]:this.strokeWidth,fill:"none",drawShadow:!1}));h.add(i);const a=s.fillPath({seriesNumber:o}),r=this.graphics.renderPaths(l(n({},d),{pathFrom:null===u?c.areaPathsFrom[t]:u,pathTo:c.areaPathsTo[t],strokeWidth:0,fill:a,drawShadow:!1}));if(e.config.chart.dropShadow.enabled){const t=new X(this.w),s=e.config.chart.dropShadow;t.dropShadow(r,Object.assign({},s,{noUserSpaceOnUse:!0}),o)}h.add(r)}t.forEach((t,s)=>{const i=new N(this.w,this.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:o,dataPointIndex:s}),r=this.graphics.drawMarker(g[s].x,g[s].y,i);r.attr("rel",s),r.attr("j",s),r.attr("index",o),r.node.setAttribute("default-marker-size",i.pSize);const l=this.graphics.group({class:"apexcharts-series-markers"});l&&l.add(r),p.add(l),h.add(p);const c=e.config.dataLabels;if(c.enabled){const t=c.formatter(e.seriesData.series[o][s],{seriesIndex:o,dataPointIndex:s,w:e});a.plotDataLabelsText({x:g[s].x,y:g[s].y,text:t,textAnchor:"middle",i:o,j:o,parent:x,offsetCorrection:!1,dataLabelsConfig:n({},c)})}h.add(x)}),i.push(h)}),this.drawPolygons({parent:d}),e.config.xaxis.labels.show){const t=this.drawXAxisTexts();d.add(t)}return i.forEach(t=>{d.add(t)}),d.add(this.yaxisLabels),d}drawPolygons(t){const e=this.w,{parent:s}=t,i=new ye(this.w),a=e.globals.yAxisScale[0].result.reverse(),o=a.length,r=[],n=this.size/(o-1);for(let t=0;t<o;t++)r[t]=n*t;r.reverse();const l=[],h=[];r.forEach((t,e)=>{const s=m.getPolygonPos(t,this.dataPointsLen);let i="";s.forEach((t,s)=>{if(0===e){const e=this.graphics.drawLine(t.x,t.y,0,0,Array.isArray(this.polygons.connectorColors)?this.polygons.connectorColors[s]:this.polygons.connectorColors);h.push(e)}0===s&&this.yaxisLabelsTextsPos.push({x:t.x,y:t.y}),i+=t.x+","+t.y+" "}),l.push(i)}),l.forEach((t,i)=>{const a=this.polygons.strokeColors,o=this.polygons.strokeWidth,r=this.graphics.drawPolygon(t,Array.isArray(a)?a[i]:a,Array.isArray(o)?o[i]:o,e.globals.radarPolygons.fill.colors[i]);s.add(r)}),h.forEach(t=>{s.add(t)}),e.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((t,e)=>{const s=i.drawYAxisTexts(t.x,t.y,e,a[e]);this.yaxisLabels.add(s)})}drawXAxisTexts(){const t=this.w,e=t.config.xaxis.labels,s=this.graphics.group({class:"apexcharts-xaxis"}),i=m.getPolygonPos(this.size,this.dataPointsLen);return t.labelData.labels.forEach((a,o)=>{const r=t.config.xaxis.labels.formatter,l=new W(this.w,this.ctx);if(i[o]){const h=this.getTextPos(i[o],this.size),c=r(a,{seriesIndex:-1,dataPointIndex:o,w:t});l.plotDataLabelsText({x:h.newX,y:h.newY,text:c,textAnchor:h.textAnchor,i:o,j:o,parent:s,className:"apexcharts-xaxis-label",color:Array.isArray(e.style.colors)&&e.style.colors[o]?e.style.colors[o]:"#a8a8a8",dataLabelsConfig:n({textAnchor:h.textAnchor,dropShadow:{enabled:!1}},e),offsetCorrection:!1}).on("click",e=>{if("function"==typeof t.config.chart.events.xAxisLabelClick){const s=Object.assign({},t,{labelIndex:o});t.config.chart.events.xAxisLabelClick(e,this.ctx,s)}})}}),s}createPaths(t,e){const s=[];let i=[];const a=[];let o=[];if(t.length){i=[this.graphics.move(e.x,e.y)],o=[this.graphics.move(e.x,e.y)];let r=this.graphics.move(t[0].x,t[0].y),n=this.graphics.move(t[0].x,t[0].y);t.forEach((e,s)=>{r+=this.graphics.line(e.x,e.y),n+=this.graphics.line(e.x,e.y),s===t.length-1&&(r+="Z",n+="Z")}),s.push(r),a.push(n)}return{linePathsFrom:i,linePathsTo:s,areaPathsFrom:o,areaPathsTo:a}}getTextPos(t,e){let s="middle",i=t.x,a=t.y;return Math.abs(t.x)>=10?t.x>0?(s="start",i+=10):t.x<0&&(s="end",i-=10):s="middle",Math.abs(t.y)>=e-10&&(t.y<0?a-=10:t.y>0&&(a+=10)),{textAnchor:s,newX:i,newY:a}}getPreviousPath(t){const e=this.w;let s=null;for(let i=0;i<e.globals.previousPaths.length;i++){const a=e.globals.previousPaths[i];a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(String(t),10)&&void 0!==e.globals.previousPaths[i].paths[0]&&(s=e.globals.previousPaths[i].paths[0].d)}return s}getDataPointsPos(t,e,s=this.dataPointsLen){t=t||[],e=e||[];const i=[];for(let a=0;a<s;a++){const s={};s.x=t[a]*Math.sin(e[a]),s.y=-t[a]*Math.cos(e[a]),i.push(s)}return i}},heatmap:class{constructor(t,e,s){this.ctx=e,this.w=t,this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new pe(t,e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}draw(t){const e=this.w,s=new T(this.w,this.ctx),i=s.group({class:"apexcharts-heatmap"});i.attr("clip-path",`url(#gridRectMask${e.globals.cuid})`);const a=e.layout.gridWidth/e.globals.dataPoints,o=e.layout.gridHeight/e.seriesData.series.length;let r=0,n=!1;this.negRange=this.helpers.checkColorRange();const l=t.slice();e.config.yaxis[0].reversed&&(n=!0,l.reverse());for(let h=n?0:l.length-1;n?h<l.length:h>=0;n?h++:h--){const n=s.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:m.escapeString(e.seriesData.seriesNames[h]),rel:h+1,"data:realIndex":h});if(et.addCollapsedClassToSeries(this.w,n,h),s.setupEventDelegation(n,".apexcharts-heatmap-rect"),e.config.chart.dropShadow.enabled){const t=e.config.chart.dropShadow;new X(this.w).dropShadow(n,t,h)}let c=0;const d=e.config.plotOptions.heatmap.shadeIntensity;let g=0;for(let i=0;i<e.globals.dataPoints;i++){if(e.seriesData.seriesX.length&&!e.globals.allSeriesHasEqualX&&e.globals.minX+e.globals.minXDiff*i<e.seriesData.seriesX[h][g]){c+=a;continue}if(g>=l[h].length)break;const p=this.helpers.getShadeColor(e.config.chart.type,h,g,this.negRange);let x=p.color;const u=p.colorProps;if("image"===e.config.fill.type){x=new H(this.w).fillPath({seriesNumber:h,dataPointIndex:g,opacity:e.globals.hasNegs?u.percent<0?1-(1+u.percent/100):d+u.percent/100:u.percent/100,patternID:m.randomId(),width:e.config.fill.image.width?e.config.fill.image.width:a,height:e.config.fill.image.height?e.config.fill.image.height:o})}const f=this.rectRadius,b=s.drawRect(c,r,a,o,f);if(b.attr({cx:c,cy:r}),b.node.classList.add("apexcharts-heatmap-rect"),n.add(b),b.attr({fill:x,i:h,index:h,j:g,val:t[h][g],"stroke-width":this.strokeWidth,stroke:e.config.plotOptions.heatmap.useFillColorAsStroke?x:e.globals.stroke.colors[0],color:x}),e.config.chart.animations.enabled&&!e.globals.dataChanged){let t=1;e.globals.resized||(t=e.config.chart.animations.speed),this.animateHeatMap(b,c,r,a,o,t)}if(e.globals.dataChanged){let t=1;if(this.dynamicAnim.enabled&&e.globals.shouldAnimate){t=this.dynamicAnim.speed;let s=e.globals.previousPaths[h]&&e.globals.previousPaths[h][g]&&e.globals.previousPaths[h][g].color;s||(s="rgba(255, 255, 255, 0)"),this.animateHeatColor(b,m.isColorHex(s)?s:m.rgb2hex(s),m.isColorHex(x)?x:m.rgb2hex(x),t)}}const y=(0,e.config.dataLabels.formatter)(e.seriesData.series[h][g],{value:e.seriesData.series[h][g],seriesIndex:h,dataPointIndex:g,w:e}),w=this.helpers.calculateDataLabels({text:y,x:c+a/2,y:r+o/2,i:h,j:g,colorProps:u,series:l});null!==w&&n.add(w),c+=a,g++}r+=o,i.add(n)}const h=e.globals.yAxisScale[0].result.slice();return e.config.yaxis[0].reversed?h.unshift(""):h.push(""),e.globals.yAxisScale[0].result=h,i}animateHeatMap(t,e,s,i,a,o){const r=new F(this.w);r.animateRect(t,{x:e+i/2,y:s+a/2,width:0,height:0},{x:e,y:s,width:i,height:a},o,()=>{r.animationCompleted(t)})}animateHeatColor(t,e,s,i){t.attr({fill:e}).animate(i).attr({fill:s})}},treemap:class{constructor(t,e){this.ctx=e,this.w=t,this.strokeWidth=this.w.config.stroke.width,this.helpers=new pe(t,e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}draw(t){const e=this.w,s=new T(this.w,this.ctx),i=new H(this.w),a=s.group({class:"apexcharts-treemap"});if(e.globals.noData)return a;const o=[];t.forEach(t=>{const e=t.map(t=>Math.abs(t));o.push(e)}),this.negRange=this.helpers.checkColorRange(),e.config.series.forEach((t,e)=>{t.data.forEach(t=>{Array.isArray(this.labels[e])||(this.labels[e]=[]),this.labels[e].push(t.x)})});return De.generate(o,e.layout.gridWidth,e.layout.gridHeight).forEach((o,r)=>{var n;const l=s.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:m.escapeString(e.seriesData.seriesNames[r]),rel:r+1,"data:realIndex":r});if(s.setupEventDelegation(l,".apexcharts-treemap-rect"),e.config.chart.dropShadow.enabled){const t=e.config.chart.dropShadow;new X(this.w).dropShadow(a,t,r)}const h=s.group({class:"apexcharts-data-labels"}),c={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};o.forEach((a,o)=>{const n=a[0],h=a[1],d=a[2],g=a[3];c.xMin=Math.min(c.xMin,n),c.yMin=Math.min(c.yMin,h),c.xMax=Math.max(c.xMax,d),c.yMax=Math.max(c.yMax,g);const p=this.helpers.getShadeColor(e.config.chart.type,r,o,this.negRange),x=p.color,u=i.fillPath({color:x,seriesNumber:r,dataPointIndex:o}),f=s.drawRect(n,h,d-n,g-h,e.config.plotOptions.treemap.borderRadius,"#fff",1,this.strokeWidth,e.config.plotOptions.treemap.useFillColorAsStroke?x:e.globals.stroke.colors[r]);f.attr({cx:n,cy:h,index:r,i:r,j:o,width:d-n,height:g-h,fill:u}),f.node.classList.add("apexcharts-treemap-rect");let b={x:n+(d-n)/2,y:h+(g-h)/2,width:0,height:0};const m={x:n,y:h,width:d-n,height:g-h};if(e.config.chart.animations.enabled&&!e.globals.dataChanged){let t=1;e.globals.resized||(t=e.config.chart.animations.speed),this.animateTreemap(f,b,m,t)}if(e.globals.dataChanged){let t=1;this.dynamicAnim.enabled&&e.globals.shouldAnimate&&(t=this.dynamicAnim.speed,e.globals.previousPaths[r]&&e.globals.previousPaths[r][o]&&e.globals.previousPaths[r][o].rect&&(b=e.globals.previousPaths[r][o].rect),this.animateTreemap(f,b,m,t))}let y=this.getFontSize(a),w=e.config.dataLabels.formatter(this.labels[r][o],{value:e.seriesData.series[r][o],seriesIndex:r,dataPointIndex:o,w:e});"truncate"===e.config.plotOptions.treemap.dataLabels.format&&(y=parseInt(String(e.config.dataLabels.style.fontSize),10),w=this.truncateLabels(String(w),y,n,h,d,g));let v=null;e.seriesData.series[r][o]&&(v=this.helpers.calculateDataLabels({text:w,x:(n+d)/2,y:(h+g)/2+this.strokeWidth/2+y/3,i:r,j:o,colorProps:p,fontSize:y,series:t})),e.config.dataLabels.enabled&&v&&this.rotateToFitLabel(v,y,w,n,h,d,g),l.add(f),null!==v&&l.add(v)});const d=e.config.plotOptions.treemap.seriesTitle;if(e.config.series.length>1&&d&&d.show){const t=e.config.series[r].name||"";if(t&&c.xMin<1/0&&c.yMin<1/0){const{offsetX:i,offsetY:a,borderColor:o,borderWidth:r,borderRadius:h,style:g}=d,p=g.color||e.config.chart.foreColor,x={left:g.padding.left,right:g.padding.right,top:g.padding.top,bottom:g.padding.bottom},u=s.getTextRects(t,g.fontSize,g.fontFamily),f=u.width+x.left+x.right,b=u.height+x.top+x.bottom,m=c.xMin+(i||0),y=c.yMin+(a||0),w=s.drawRect(m,y,f,b,h,g.background,1,r,o),v=s.drawText({x:m+x.left,y:y+x.top+.75*(null!=(n=null==u?void 0:u.height)?n:0),text:t,fontSize:g.fontSize,fontFamily:g.fontFamily,fontWeight:g.fontWeight,foreColor:p,cssClass:g.cssClass||""});l.add(w),l.add(v)}}l.add(h),a.add(l)}),a}getFontSize(t){const e=this.w;const s=function t(e){let s,i=0;if(Array.isArray(e[0]))for(s=0;s<e.length;s++)i+=t(e[s]);else for(s=0;s<e.length;s++)i+=e[s].length;return i}(this.labels)/function t(e){let s,i=0;if(Array.isArray(e[0]))for(s=0;s<e.length;s++)i+=t(e[s]);else for(s=0;s<e.length;s++)i+=1;return i}(this.labels);return function(t,i){const a=t*i,o=Math.pow(a,.5);return Math.min(o/s,parseInt(e.config.dataLabels.style.fontSize,10))}(t[2]-t[0],t[3]-t[1])}rotateToFitLabel(t,e,s,i,a,o,r){const n=new T(this.w),l=n.getTextRects(s,String(e));if(l.width+this.w.config.stroke.width+5>o-i&&l.width<=r-a){const e=n.rotateAroundCenter(t.node);t.node.setAttribute("transform",`rotate(-90 ${e.x} ${e.y}) translate(${l.height/3})`)}}truncateLabels(t,e,s,i,a,o){const r=new T(this.w),n=r.getTextRects(t,String(e)).width+this.w.config.stroke.width+5>a-s&&o-i>a-s?o-i:a-s,l=r.getTextBasedOnMaxWidth({text:t,maxWidth:n,fontSize:e});return t.length!==l.length&&n/e<5?"":l}animateTreemap(t,e,s,i){const a=new F(this.w);a.animateRect(t,e,s,i,()=>{a.animationCompleted(t)})}}}),te});