/*! * ApexCharts v7.5.1 * (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,i=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,n=(e,i,s)=>i in e?t(e,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[i]=s,o=(t,e)=>{for(var i in e||(e={}))a.call(e,i)&&n(t,i,e[i]);if(s)for(var i of s(e))r.call(e,i)&&n(t,i,e[i]);return t},l=(t,s)=>e(t,i(s)),h=(t,e,i)=>n(t,"symbol"!=typeof e?e+"":e,i),c=(t,e,i)=>new Promise((s,a)=>{var r=t=>{try{o(i.next(t))}catch(t){a(t)}},n=t=>{try{o(i.throw(t))}catch(t){a(t)}},o=t=>t.done?s(t.value):Promise.resolve(t.value).then(r,n);o((i=i.apply(t,e)).next())});class d{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 p{constructor(t,e=null){this.nodeName=t,this.namespaceURI=e,this.attributes=new Map,this.children=[],this.textContent="",this.style={},this.classList=new u,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 i=this.children.indexOf(e);return-1!==i&&(t.parentNode=this,this.children.splice(i,0,t)),t}cloneNode(t=!1){const e=new p(this.nodeName,this.namespaceURI);return e.textContent=this.textContent,this.attributes.forEach((t,i)=>{e.attributes.set(i,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}}getBBox(){if("text"!==this.nodeName&&"tspan"!==this.nodeName)return{x:0,y:0,width:0,height:0};const t=this._textLines(),e=t.reduce((t,e)=>Math.max(t,e.length),0);if(!e)return{x:0,y:0,width:0,height:0};const i=parseFloat(this.attributes.get("font-size"))||11,s=e*i*.55,a=1.167*i+(t.length-1)*i*1.1,r=this.attributes.get("text-anchor"),n=parseFloat(this.attributes.get("x"))||0;return{x:"middle"===r?n-s/2:"end"===r?n-s:n,y:(parseFloat(this.attributes.get("y"))||0)-.917*i,width:s,height:a}}_textLines(){var t;const e=this.children.filter(t=>"tspan"===t.nodeName);return e.length?e.map(t=>{var e;return String(null!=(e=t.textContent)?e:"")}):[String(null!=(t=this.textContent)?t:"")]}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,i)=>{t+=` ${i}="${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}`}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 u{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 g{constructor(){this.SVGNS="http://www.w3.org/2000/svg",this.XLINKNS="http://www.w3.org/1999/xlink"}createElementNS(t,e){return new p(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 i=new p("root");return i.innerHTML=t,{documentElement:i}}}}}let f=null,x=null,m=null;class b{static init(){d.isSSR()&&!f&&(f=new g)}static createElement(t){return d.isSSR()?(f||this.init(),f.createElementNS(null,t)):document.createElement(t)}static createElementNS(t,e){return d.isSSR()?(f||this.init(),f.createElementNS(t,e)):document.createElementNS(t,e)}static createTextNode(t){return d.isSSR()?(f||this.init(),f.createTextNode(t)):document.createTextNode(t)}static querySelector(t){return d.isSSR()?null:document.querySelector(t)}static querySelectorAll(t){return d.isSSR()?[]:document.querySelectorAll(t)}static getComputedStyle(t){return d.isSSR()?{}:window.getComputedStyle(t)}static matchMedia(t){if(d.isSSR()||"function"!=typeof window.matchMedia)return null;try{return window.matchMedia(t)}catch(t){return null}}static getBoundingClientRect(t){return d.isSSR()?(f||this.init(),f.getBoundingClientRect(t)):t?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return d.isSSR()?(f||this.init(),x||(x=f.createXMLSerializer()),x):(x||(x=new XMLSerializer),x)}static getDOMParser(){return d.isSSR()?(f||this.init(),m||(m=f.createDOMParser()),m):(m||(m=new DOMParser),m)}static addWindowEventListener(t,e,i){d.isBrowser()&&window.addEventListener(t,e,i)}static removeWindowEventListener(t,e,i){d.isBrowser()&&window.removeEventListener(t,e,i)}static requestAnimationFrame(t){return d.isBrowser()?window.requestAnimationFrame(t):(t(0),null)}static cancelAnimationFrame(t){d.isBrowser()&&t&&window.cancelAnimationFrame(t)}static elementExists(t){return!!t&&(d.isSSR()?!0===t._ssrMode||void 0!==t.nodeName:!!t.getRootNode&&(t.getRootNode({composed:!0})===document||t.isConnected))}static getWindow(){return d.isBrowser()?window:null}static getDocument(){return d.isBrowser()?document:null}static _getShim(){return f}static _resetShim(){f=null,x=null,m=null}}const y=new WeakMap;let w=0,v=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 d.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(t,e){if(!this.isObject(t)&&this.isObject(e))return this.clone(e);const i=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach(s=>{this.isObject(e[s])?s in t?i[s]=this.extend(t[s],e[s]):Object.assign(i,{[s]:e[s]}):Object.assign(i,{[s]:e[s]})}),i}static copySeriesShallow(t){return Array.isArray(t)?t.map(t=>this.isObject(t)?o({},t):t):t}static extendArray(e,i){const s=[];return e.map(e=>{s.push(t.extend(i,e))}),e=s}static monthMod(t){return t%12}static clone(t,e=new WeakMap,i=!1){if(null===t||"object"!=typeof t)return t;if(e.has(t))return e.get(t);let s;if(Array.isArray(t))if(i)s=t.slice();else{s=[],e.set(t,s);for(let i=0;i{if("function"!=typeof e)return e;let i=y.get(e);return void 0===i&&(i=++w,y.set(e,i)),`__apx_fn_${i}`})}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 i=Object.keys(t),s=Object.keys(e);if(i.length!==s.length)return!1;for(const s of i)if(t[s]!==e[s])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 getDimensions(t){if(!t)return[0,0];if(d.isSSR())return[t._ssrWidth||400,t._ssrHeight||300];let e;try{e=getComputedStyle(t,null)}catch(e){return[t.clientWidth||0,t.clientHeight||0]}let i=t.clientWidth,s=t.clientHeight;if(!i||!s){const e=t.getBoundingClientRect();i=i||e.width,s=s||e.height}return s-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),i-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),[i,s]}static getBoundingClientRect(t){if(!t)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(d.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 i=t.replace("#",""),s=i.match(new RegExp("(.{"+i.length/3+"})","g"))||[];for(let t=0;tt+t).join("")),/^[0-9a-fA-F]{6}$/.test(e)?[parseInt(e.slice(0,2),16),parseInt(e.slice(2,4),16),parseInt(e.slice(4,6),16)]:null}static relativeLuminance([t,e,i]){const s=t=>{const e=t/255;return e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)};return.2126*s(t)+.7152*s(e)+.0722*s(i)}static getContrastRatio(e,i){const s=t.parseHex(e),a=t.parseHex(i);if(!s||!a)return 0;const r=t.relativeLuminance(s),n=t.relativeLuminance(a);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}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 i=e.split(","),s=t<0?0:255,a=t<0?-1*t:t,r=parseInt(i[0].slice(4),10),n=parseInt(i[1],10),o=parseInt(i[2],10);return"rgb("+(Math.round((s-r)*a)+r)+","+(Math.round((s-n)*a)+n)+","+(Math.round((s-o)*a)+o)+")"}shadeHexColor(t,e){const i=parseInt(e.slice(1),16),s=t<0?0:255,a=t<0?-1*t:t,r=i>>16,n=i>>8&255,o=255&i;return"#"+(16777216+65536*(Math.round((s-r)*a)+r)+256*(Math.round((s-n)*a)+n)+(Math.round((s-o)*a)+o)).toString(16).slice(1)}shadeColor(e,i){return t.isColorHex(i)?this.shadeHexColor(e,i):this.shadeRGBColor(e,i)}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(d.isSSR())return e;const i=document.createElement("div");let s;i.style.cssText="position:fixed; left: -9999px; visibility:hidden;",i.style.color=e,document.body.appendChild(i);try{s=window.getComputedStyle(i).color}finally{i.parentNode&&i.parentNode.removeChild(i)}return s}static applyOpacityToColor(t,e){const i=Number(e);if(!Number.isFinite(i))return t;if(i<=0)return"transparent";if(i>=1)return t;return`color-mix(in srgb, ${t} ${Math.round(100*i)}%, transparent)`}static getPolygonPos(t,e){const i=[],s=2*Math.PI/e;for(let a=0;a{}[\]\\/]/gi,e),i}static negToZero(t){return t<0?0:t}static moveIndexInArray(t,e,i){if(i>=t.length){let e=i-t.length+1;for(;e--;)t.push(void 0)}return t.splice(i,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 i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t.style[i]=e[i])}static preciseAddition(t,e){const i=(String(t).split(".")[1]||"").length,s=(String(e).split(".")[1]||"").length,a=Math.pow(10,Math.max(i,s));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(d.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,i=7){let s=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));for(s>1?(t=Math.round(Math.abs(t)*s),e=Math.round(Math.abs(e)*s)):s=1;e;){const i=e;e=t%e,t=i}return t/s}static getPrimeFactors(t){const e=[];let i=2;for(;t>=2;)t%i==0?(e.push(i),t/=i):i++;return e}static mod(t,e,i=7){const s=Math.pow(10,i-Math.floor(Math.log10(Math.max(t,e))));return(t=Math.round(Math.abs(t)*s))%(e=Math.round(Math.abs(e)*s))/s}};class A{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(isNaN(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);if("string"!=typeof t)return NaN;let i=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return i=this.getTimeStamp(i),i}parseDateWithTimezone(t){return Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "))}formatDate(t,e){const i=this.w.globals.locale,s=this.w.config.xaxis.labels.datetimeUTC,a=["\0",...i.months],r=["\x01",...i.shortMonths],n=["\x02",...i.days],o=["\x03",...i.shortDays];function l(t,e=2){let i=t+"";for(;i.length12?p-12:0===p?12:p;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(p))).replace(/(^|[^\\])H/g,"$1"+p)).replace(/(^|[^\\])hh+/g,"$1"+l(u))).replace(/(^|[^\\])h/g,"$1"+u);const g=s?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(g))).replace(/(^|[^\\])m/g,"$1"+g);const f=s?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(f))).replace(/(^|[^\\])s/g,"$1"+f);let x=s?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(x,3)),x=Math.round(x/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(x)),x=Math.round(x/10);const m=p<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+x)).replace(/(^|[^\\])TT+/g,"$1"+m)).replace(/(^|[^\\])T/g,"$1"+m.charAt(0));const b=m.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+b)).replace(/(^|[^\\])t/g,"$1"+b.charAt(0));let y=-t.getTimezoneOffset(),w=s||!y?"Z":y>0?"+":"-";if(!s){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=(s?t.getUTCDay():t.getDay())+1;return e=(e=(e=(e=(e=e.replace(new RegExp(n[0],"g"),n[v])).replace(new RegExp(o[0],"g"),o[v])).replace(new RegExp(a[0],"g"),a[c])).replace(new RegExp(r[0],"g"),r[c])).replace(/\\(.)/g,"$1")}getTimeUnitsfromTimestamp(t,e){const i=this.w;void 0!==i.config.xaxis.min&&(t=i.config.xaxis.min),void 0!==i.config.xaxis.max&&(e=i.config.xaxis.max);const s=this.getDate(t),a=this.getDate(e),r=this.formatDate(s,"yyyy MM dd HH mm ss fff").split(" "),n=this.formatDate(a,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(r[6],10),maxMillisecond:parseInt(n[6],10),minSecond:parseInt(r[5],10),maxSecond:parseInt(n[5],10),minMinute:parseInt(r[4],10),maxMinute:parseInt(n[4],10),minHour:parseInt(r[3],10),maxHour:parseInt(n[3],10),minDate:parseInt(r[2],10),maxDate:parseInt(n[2],10),minMonth:parseInt(r[1],10)-1,maxMonth:parseInt(n[1],10)-1,minYear:parseInt(r[0],10),maxYear:parseInt(n[0],10)}}isLeapYear(t){return t%4==0&&t%100!=0||t%400==0}calculcateLastDaysOfMonth(t,e,i){return this.determineDaysOfMonths(t,e)-i}determineDaysOfYear(t){let e=365;return this.isLeapYear(t)&&(e=366),e}determineRemainingDaysOfYear(t,e,i){let s=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear(t)&&s++,s}determineDaysOfMonths(t,e){let i=30;switch(t=v.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}getDateFields(t,e){const i=new Date(t);return e?{year:i.getUTCFullYear(),month:i.getUTCMonth(),date:i.getUTCDate(),hour:i.getUTCHours(),minute:i.getUTCMinutes(),second:i.getUTCSeconds(),ms:i.getUTCMilliseconds(),weekday:i.getUTCDay()}:{year:i.getFullYear(),month:i.getMonth(),date:i.getDate(),hour:i.getHours(),minute:i.getMinutes(),second:i.getSeconds(),ms:i.getMilliseconds(),weekday:i.getDay()}}addInterval(t,e,i,s){const a=new Date(t);if(s)switch(e){case"year":a.setUTCFullYear(a.getUTCFullYear()+i);break;case"month":a.setUTCMonth(a.getUTCMonth()+i);break;case"week":a.setUTCDate(a.getUTCDate()+7*i);break;case"day":a.setUTCDate(a.getUTCDate()+i);break;case"hour":a.setUTCHours(a.getUTCHours()+i);break;case"minute":a.setUTCMinutes(a.getUTCMinutes()+i);break;case"second":a.setUTCSeconds(a.getUTCSeconds()+i)}else switch(e){case"year":a.setFullYear(a.getFullYear()+i);break;case"month":a.setMonth(a.getMonth()+i);break;case"week":a.setDate(a.getDate()+7*i);break;case"day":a.setDate(a.getDate()+i);break;case"hour":a.setHours(a.getHours()+i);break;case"minute":a.setMinutes(a.getMinutes()+i);break;case"second":a.setSeconds(a.getSeconds()+i)}return a.getTime()}ceilToBoundary(t,e,i,s){const a=new Date(t);if(s)switch(e){case"second":{const e=a.getUTCSeconds(),s=Math.ceil(e/i)*i;return s===e&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(s),a.getTime())}case"minute":{const e=a.getUTCMinutes(),s=Math.ceil(e/i)*i;return s===e&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(s),a.getTime())}case"hour":{const e=a.getUTCHours(),s=Math.ceil(e/i)*i;return s===e&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(s),a.getTime())}case"day":return 0===a.getUTCHours()&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0),a.setUTCDate(a.getUTCDate()+1),a.getTime());case"week":{const e=6048e5,s=Date.UTC(1970,0,5);a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0);const r=a.getTime(),n=Math.ceil((r-s)/e),o=s+Math.ceil(n/i)*i*e;return o>=t?o:o+i*e}case"month":{const e=a.getUTCMonth(),s=Math.ceil(e/i)*i;return s===e&&1===a.getUTCDate()&&0===a.getUTCHours()&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0),a.setUTCDate(1),a.setUTCMonth(s),a.getTime())}case"year":{const e=a.getUTCFullYear(),s=Math.ceil(e/i)*i;return s===e&&0===a.getUTCMonth()&&1===a.getUTCDate()&&0===a.getUTCHours()&&0===a.getUTCMinutes()&&0===a.getUTCSeconds()&&0===a.getUTCMilliseconds()?t:Date.UTC(s,0,1)}}else switch(e){case"second":{const e=a.getSeconds(),s=Math.ceil(e/i)*i;return s===e&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(s),a.getTime())}case"minute":{const e=a.getMinutes(),s=Math.ceil(e/i)*i;return s===e&&0===a.getSeconds()&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(s),a.getTime())}case"hour":{const e=a.getHours(),s=Math.ceil(e/i)*i;return s===e&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(s),a.getTime())}case"day":return 0===a.getHours()&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.setDate(a.getDate()+1),a.getTime());case"week":{const e=6048e5,s=new Date(1970,0,5).getTime();a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0);const r=a.getTime(),n=Math.ceil((r-s)/e),o=s+Math.ceil(n/i)*i*e;return o>=t?o:o+i*e}case"month":{const e=a.getMonth(),s=Math.ceil(e/i)*i;return s===e&&1===a.getDate()&&0===a.getHours()&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.setDate(1),a.setMonth(s),a.getTime())}case"year":{const e=a.getFullYear(),s=Math.ceil(e/i)*i;return s===e&&0===a.getMonth()&&1===a.getDate()&&0===a.getHours()&&0===a.getMinutes()&&0===a.getSeconds()&&0===a.getMilliseconds()?t:new Date(s,0,1).getTime()}}return t}isAtBoundary(t,e,i){const s=this.getDateFields(t,i);switch(e){case"year":return 0===s.month&&1===s.date&&0===s.hour&&0===s.minute&&0===s.second&&0===s.ms;case"month":return 1===s.date&&0===s.hour&&0===s.minute&&0===s.second&&0===s.ms;case"day":return 0===s.hour&&0===s.minute&&0===s.second&&0===s.ms;case"hour":return 0===s.minute&&0===s.second&&0===s.ms;case"minute":return 0===s.second&&0===s.ms;case"second":return 0===s.ms}return!1}}class S{constructor(t){this.w=t,this.tooltipKeyFormat="dd MMM"}xLabelFormat(t,e,i,s){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 A(this.w);return t.formatDate(t.getDate(e),a.config.tooltip.x.format)}return t(e,i,s)}defaultGeneralFormatter(t){return Array.isArray(t)?t.map(t=>t):t}defaultYFormatter(t,e){const i=this.w;if(v.isNumber(t))if(0!==i.globals.yValueDecimal)t=t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:i.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,i=t.axisFlags.isXNumeric&&t.axisFlags.dataFormatXNumeric&&"datetime"!==t.config.xaxis.type&&!t.config.xaxis.convertedCatToNumeric&&!t.globals.isBarHorizontal;if(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=>{var s;if(v.isNumber(e)){if(!t.config.xaxis.convertedCatToNumeric&&("numeric"===t.config.xaxis.type||i)){const a=null==(s=t.globals.xAxisScale)?void 0:s.result;if(i&&Array.isArray(a)&&a.every(Number.isInteger))return e.toFixed(0);if(v.isNumber(t.config.xaxis.decimalsInFloat))return e.toFixed(t.config.xaxis.decimalsInFloat);{const i=t.globals.maxX-t.globals.minX;if(i>0){const t=i/10,s=Math.max(0,-Math.floor(Math.log10(t)));return e.toFixed(s)}return e.toFixed(0)}}if(t.globals.isBarHorizontal){if(t.globals.maxY-t.globals.minY<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;else if(void 0===t.config.xaxis.labels.formatter&&i){const t=e.xLabelFormatter;e.ttKeyFormatter=e=>Number.isInteger(e)?e.toFixed(0):t(e)}else e.ttKeyFormatter=e.xLabelFormatter;return"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((i,s)=>{if(void 0!==i.labels.formatter)e.yLabelFormatters[s]=i.labels.formatter;else if("violin"===t.config.chart.type){const i=t=>"number"==typeof t&&isFinite(t)?""+Math.round(100*t)/100:t;e.yLabelFormatters[s]=e=>t.globals.xyCharts?Array.isArray(e)?e.map(i):i(e):e}else e.yLabelFormatters[s]=e=>t.globals.xyCharts?Array.isArray(e)?e.map(t=>this.defaultYFormatter(t,i)):this.defaultYFormatter(e,i):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 C={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",measure:"Measure"}}};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,alignZero:!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},tooltip:{enabled:!1,text:void 0,formatter:void 0,theme:void 0,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:[]},plugins:[],trellis:{by:void 0,row:void 0,column:void 0,emptyPanels:"placeholder",data:void 0,x:void 0,y:void 0,seriesBy:void 0,columns:"auto",minPanelWidth:220,gap:12,aspectRatio:1.6,panelHeight:void 0,order:"first-seen",limit:void 0,virtualize:"auto",scales:{x:"shared",y:"shared",color:"shared",size:"shared"},header:{show:!0,formatter:void 0,style:{fontSize:void 0,fontWeight:void 0,color:void 0}},axes:{labels:"edges"},legend:"shared",toolbar:"shared",tooltip:"panel",zoom:"sync",promote:!0,radiusByTotal:!1,targetTicks:3,panel:void 0},chart:{animations:{enabled:!0,speed:800,easing:"easeInOutSine",animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350,easing:void 0},chartTypeMorph:{enabled:!0,speed:600},respectReducedMotion:!0,largeDatasetThreshold:1e3},background:"",locales:[C],defaultLocale:"en",perspectives:{serializeOptions:["theme","xaxis","yaxis","title","subtitle"]},history:{enabled:!1,maxDepth:100,coalesceMs:250,keyboard:!0},renderer:"svg",rendererThreshold:8e3,layers:{series:"auto",grid:"svg",annotations:"svg",dataLabels:"svg"},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,crossFilter:void 0,filterChange:void 0,annotationDragged:void 0,annotationEdited:void 0,annotationCreated:void 0,annotationStyled:void 0,annotationDeleted:void 0,measured:void 0,keyDown:void 0,keyUp:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,print:{enabled:!0,width:700},id:void 0,group:void 0,nonce:void 0,license: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},link:{enabled:!1,mode:"highlight",dimOpacity:.2,id:void 0,dimension:void 0,reduce:void 0,type:void 0,bins:void 0,order:void 0,seriesName:void 0},ink:{enabled:!1,palette:!1,snap:!1,noteColors:void 0},measure:{enabled:!1,mode:"span",key:"m",pinOnRelease:!0,colors:{up:void 0,down:void 0,neutral:void 0,guide:void 0},band:!0,guides:!0,markers:!0,format:{x:void 0,y:void 0,percent:void 0},label:void 0},contextMenu:{enabled:!1,items:["annotate","xline","yline","measure"],labels:{annotate:void 0,xline:void 0,yline:void 0,measure:void 0},noteText:"Note",line:{text:"",strokeDashArray:4,color:void 0}},stacked:!1,stackOnlyBar:!0,stackType:"normal",streaming:{enabled:!1,maxPoints:void 0},toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,measure:!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,embedFonts:!0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:"auto",pinch:"auto",resetControl:"auto",zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}},pan:{inertia:!0,friction:.92},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:"all",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,dumbbell:{connector:{color:void 0,opacity:.55},dataLabels:{enabled:!1,offset:6,colorFromMarker:!0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0}},tooltip:{differenceLabel:"Difference"}},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,minZ:void 0,maxZ:void 0},scatter:{jitter:{enabled:!1,x:0,y:0,distributed:!1,maxPoints:5e3}},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"},whiskers:"minmax",points:{show:!1,shape:"circle",size:2.5,jitter:.5,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},violin:{bandwidthScale:1,kde:{bandwidth:void 0,resolution:64},normalize:"individual",side:"both",box:{show:!1,width:"15%",whiskers:"minmax",strokeWidth:1,fillColor:void 0,capWidth:.5},points:{show:!0,shape:"circle",size:2.5,jitter:.5,constrainToViolin:!0,position:"center",laneWidth:"40%",maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},histogram:{bins:"auto",binWidth:void 0,range:void 0,normalize:"count",cumulative:!1,overlap:!0},heatmap:{shape:"rect",radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,gradientLegend:{enabled:!1,width:"70%",height:"70%",thickness:12,align:"center",stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:"11px",fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}}},waterfall:{colors:{positive:"#00A86F",negative:"#FF4560",subtotal:void 0,total:void 0},connectors:{show:!0,color:void 0,strokeWidth:1,strokeDashArray:3}},streamgraph:{offset:"wiggle",order:"inside-out",hover:{show:!0,opacity:.35},labels:{show:!0,minWidth:24,minFontSize:9,maxFontSize:30,style:{fontSize:"auto",fontFamily:void 0,fontWeight:600,colors:void 0}}},funnel:{shape:"rectangle",lastShape:"flat"},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale",minFontSize:4},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0,colorValue:void 0,gradient:{enabled:void 0,min:void 0,max:void 0,midpoint:void 0,symmetric:!0,colors:void 0,stops:void 0},gradientLegend:{enabled:!1,width:"70%",height:"70%",thickness:12,align:"center",stops:16,showLabels:!0,showHoverValue:!0,labelStyle:{fontSize:"11px",fontFamily:void 0,colors:void 0},arrow:{size:8,color:void 0},formatter:void 0}},nested:{enabled:void 0,drilldownAsLevels:!1},parents:{show:"auto",padding:4,fill:void 0,fillOpacity:1,borderColor:void 0,borderWidth:1,borderRadius:void 0,hover:{show:!0,color:void 0,width:2},header:{show:!0,height:22,minWidth:40,align:"left",offsetX:0,offsetY:0,showValue:!1,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,color:void 0,background:void 0,cssClass:""}},tooltip:{formatter:void 0}},levels:[],zoom:{enabled:!1,breadcrumb: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}}}},unit:{layout:"grouped",positions:void 0,transition:"group",shape:"circle",image:{src:void 0,width:20,height:20,tint:!1},pictogram:{mark:void 0,fit:"contain",scale:1,padding:0,fallback:"circle"},size:"auto",columns:{size:"inherit"},grid:{columns:10,total:void 0,fillFrom:"bottom",split:!1,tileColumns:void 0,max:void 0,trackColor:void 0},scatter:{y:"lanes",spread:"swarm",orientation:"horizontal",tickAmount:5,xMin:void 0,xMax:void 0,xTitle:void 0,xFormatter:void 0,yTickAmount:5,yMin:void 0,yMax:void 0,yTitle:void 0,yFormatter:void 0,sizeField:"z",sizeRange:void 0,laneLabelWidth:void 0,gridlines:!0},sizeByValue:{enabled:!1,maxRadius:"auto",minRadius:void 0,scale:"area"},spacing:1.05,borderRadius:0,gather:{motion:"auto",spring:"crisp",easing:"outCubic",overshoot:1.70158,enter:"burst"},arc:{startAngle:-90,endAngle:90,innerRadiusRatio:.4,rows:"auto"},unitValue:1,maxUnits:5e3,sortByGroup:!0,clusterLabels:{show:!0,position:"top",curved:!0,fontSize:"13px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:void 0,external:{show:!1,connector:{show:!0,width:1.5,color:void 0,gap:8,length:22},offsetX:0,offsetY:0}},tooltip:{formatter:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,shape:"arc",min:0,max:100,bands:[],bandsStyle:{strokeWidth:"40%",gap:0,hideTrackWhenPresent:!0},ticks:{show:!1,major:{count:11,length:10,width:2,color:"#666",placement:"outside"},minor:{count:4,length:5,width:1,color:"#999",placement:"outside"},labels:{show:!1,offset:6,fontSize:"11px",fontFamily:void 0,fontWeight:400,color:"#666",formatter:t=>String(t)}},needle:{color:"#333",length:"85%",baseWidth:4,tipWidth:1,offsetY:0,showValueArc:!1,animation:{enabled:!0,duration:800,easing:"ease-out"}},hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",stroke:void 0,strokeWidth:1,strokeDasharray:void 0,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,expandOffset:10,hoverOutline:{show:!0,size:8,gap:0,opacity:.3,color:void 0},borderRadius:0,spacing:0,dataLabels:{offset:0,minAngleToShowLabel:10,external:{show:!1,offsetX:0,offsetY:0,fontSize:void 0,fontFamily:void 0,fontWeight:void 0,color:void 0,formatter:void 0,connector:{show:!0,width:1,color:void 0,length:16,gap:6}}},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"}},sunburst:{offsetX:0,offsetY:0,startAngle:0,endAngle:360,innerSize:"15%",borderRadius:0,spacing:1,leaf:"extend",partition:"normalize",tint:.14,zoomOnClick:!0,dataLabels:{show:!0,minAngleToShow:8,style:{fontSize:"12px",fontFamily:void 0,fontWeight:400,colors:void 0}}},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},animate:{enabled:!0},countUp:{enabled:!1}},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:[],drilldown:{enabled:!1,series:[],breadcrumb:{show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0},animation:{enabled:!0,zoomFromPoint:!1,speed:260},loading:{show:!0},cache:!0,marker:{show:!0,size:6,strokeColor:"#fff"}},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},largeDatasetThreshold:0},noData:{text:void 0,align:"center",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten",value:.15}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.35}}},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,arrow:!0,compact:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0,background: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",day:"dd MMM",hour:"HH:mm",minute:"HH:mm",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:!1,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",tokens:!0,follow:!1,name:"",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65},accessibility:{colorBlindMode:""}}}}}const _={funnel:"bar",pyramid:"bar",gauge:"radialBar",waffle:"unit",histogram:"bar",waterfall:"rangeBar",dumbbell:"rangeBar",streamgraph:"rangeArea",raincloud:"violin"},M="_apexOwnedByType",D=(t,e)=>(e[M]=t,e),L=["tooltip.custom","tooltip.shared","tooltip.intersect","tooltip.followCursor","dataLabels.enabled","dataLabels.formatter","plotOptions.bar.dataLabels.position","markers.size","plotOptions.violin.side","plotOptions.violin.box.show","plotOptions.violin.box.whiskers","plotOptions.violin.points.position","states.hover.filter.type","states.active.filter.type","xaxis.crosshairs.width","xaxis.tickPlacement","xaxis.tooltip.enabled","chart.zoom.enabled","chart.animations.dynamicAnimation.enabled"],P=(t,e)=>{let i=t;for(const t of e.split(".")){if(null==i||"object"!=typeof i)return;i=i[t]}return i},F=(t,e,i)=>{const s=e.split("."),a=s.pop();let r=t;for(const t of s)null!=r[t]&&"object"==typeof r[t]||(r[t]={}),r=r[t];void 0===i?delete r[a]:r[a]=i},E=(t,e)=>{var i,s;const a=_[t];return{chart:{type:a||t,requestedType:a?t:void 0,stacked:null==(i=e.chart)?void 0:i.stacked},plotOptions:{bar:{isFunnel:"funnel"===t||"pyramid"===t},histogram:null==(s=e.plotOptions)?void 0:s.histogram},series:e.series,yaxis:[{title:{},labels:{},axisBorder:{},axisTicks:{}}]}},T=(t,e)=>{if("function"==typeof t)return!!Array.isArray(t[M])||"function"==typeof e&&String(t)===String(e);if("function"==typeof e)return void 0===t;if(t===e)return!0;try{return JSON.stringify(t)===JSON.stringify(e)}catch(t){return!1}},I=({isTimeline:t,seriesIndex:e,dataPointIndex:i,y1:s,y2:a,w:r})=>{var n;let o=r.rangeData.seriesRangeStart[e][i],l=r.rangeData.seriesRangeEnd[e][i],h=r.labelData.labels[i],c=r.config.series[e].name?r.config.series[e].name:"";const d=r.formatters.ttKeyFormatter,p=r.config.tooltip.y.title.formatter,u={w:r,seriesIndex:e,dataPointIndex:i,start:o,end:l};if("function"==typeof p&&(c=p(c,u)),(null==(n=r.config.series[e].data[i])?void 0:n.x)&&(h=r.config.series[e].data[i].x),!t&&"datetime"===r.config.xaxis.type){h=new S(r).xLabelFormat(r.formatters.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new A(r).formatDate,w:r})}"function"==typeof d&&(h=d(h,u)),Number.isFinite(s)&&Number.isFinite(a)&&(o=s,l=a);let g="",f="";const x=r.globals.colors[e];if(void 0===r.config.tooltip.x.formatter)if("datetime"===r.config.xaxis.type){const t=new A(r);g=t.formatDate(t.getDate(o),r.config.tooltip.x.format),f=t.formatDate(t.getDate(l),r.config.tooltip.x.format)}else g=o,f=l;else g=r.config.tooltip.x.formatter(o),f=r.config.tooltip.x.formatter(l);return{start:o,end:l,startVal:g,endVal:f,ylabel:h,color:x,seriesName:c}},R=t=>{let{color:e,seriesName:i,ylabel:s,start:a,end:r,seriesIndex:n,dataPointIndex:o}=t;const l=t.w.globals.tooltip.tooltipLabels.getFormatters(n);a=l.yLbFormatter(a),r=l.yLbFormatter(r);const h=l.yLbFormatter(t.w.seriesData.series[n][o]);let c="";const d=`\n ${a}\n - \n ${r}\n `;return c=t.w.globals.comboCharts?"rangeArea"===t.w.config.series[n].type||"rangeBar"===t.w.config.series[n].type?d:`${h}`:d,'
'+(i||"")+'
'+s+": "+c+"
"};class z{constructor(t){this.opts=t}static forType(t){var e,i;const s=new z(t),a=t.chart.requestedType;let r;return r="funnel"===a||"pyramid"===a?s[a]():"gauge"===a?s.gauge():"histogram"===a?s.histogram():"waterfall"===a?s.waterfall():"dumbbell"===a?s.dumbbell():"streamgraph"===a?s.streamgraph():"raincloud"===a?s.raincloud():-1!==["line","area","bar","candlestick","boxPlot","violin","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","unit","sunburst","pie","polarArea","donut","radar","radialBar"].indexOf(t.chart.type)?s[t.chart.type]():s.line(),(null==(i=null==(e=t.plotOptions)?void 0:e.bar)?void 0:i.isFunnel)&&(r=s.funnel()),t.chart.stacked&&"bar"===t.chart.type&&(r=s.stackedBars()),r}static handOverTypeDefaults(t,e,i){const s=t.chart.requestedType||t.chart.type;if(!e||e===s)return;const a=(new k).init(),r=v.extend(a,z.forType(E(e,t))),n=v.extend(a,z.forType(E(s,t)));for(const e of L){if(i&&void 0!==P(i,e))continue;const s=P(r,e),a=P(n,e);void 0===s&&void 0===a||T(P(t,e),s)&&F(t,e,a)}}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 v.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(t,e){const i=e.w.config.series[e.seriesIndex].name;return null!==t?i+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}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(o({},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}}})}pyramid(){return this.funnel()}gauge(){const t=this.radialBar();return l(o({},t),{plotOptions:{radialBar:{startAngle:-135,endAngle:135,hollow:{margin:0,size:"60%"},track:{background:"#e7e7e7",strokeWidth:"100%",margin:5},dataLabels:{name:{show:!1},value:{show:!0,fontSize:"32px",fontWeight:600,offsetY:8}}}}})}waterfall(){const t=this.rangeBar();return l(o({},t),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!0}}},plotOptions:l(o({},t.plotOptions),{bar:l(o({},t.plotOptions.bar),{columnWidth:"60%",barHeight:"60%"})}),dataLabels:l(o({},t.dataLabels),{enabled:!0,background:{enabled:!0,backgroundColor:"#fff",foreColor:"#373d3f",borderColor:"#e3e8ee",opacity:.92}}),legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!1}})}histogram(){var t,e,i,s;const a=Array.isArray(null==(t=this.opts)?void 0:t.series)&&this.opts.series.length>1&&!1!==(null==(s=null==(i=null==(e=this.opts)?void 0:e.plotOptions)?void 0:i.histogram)?void 0:s.overlap);return l(o({},this.bar()),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!1}}},plotOptions:{bar:{columnWidth:"100%",borderRadius:0,dataLabels:{position:"top"}}},dataLabels:{enabled:!1},fill:a?{opacity:.65}:{},stroke:a?{show:!1}:{show:!0,width:1,colors:["#fff"]},xaxis:{type:"numeric",tooltip:{enabled:!1}},tooltip:{shared:a,intersect:!1,x:{formatter:(t,e)=>{var i,s;const a=null==(s=null==(i=null==e?void 0:e.w)?void 0:i.histogramData)?void 0:s.edges,r=null==e?void 0:e.dataPointIndex;if(!Array.isArray(a)||"number"!=typeof r||r<0)return String(t);const n=a[r],o=a[r+1];if(void 0===n||void 0===o)return String(t);const l=t=>Number.isInteger(t)?String(t):t.toFixed(2);return`${l(n)} to ${l(o)}`}}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:D(["candlestick"],({seriesIndex:t,dataPointIndex:e,w:i})=>this._getBoxTooltip(i,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:D(["boxPlot"],({seriesIndex:t,dataPointIndex:e,w:i})=>this._getBoxTooltip(i,t,e,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot"))},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}violin(){return{chart:{zoom:{enabled:!1},animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},fill:{opacity:.7},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:D(["violin"],({seriesIndex:t,dataPointIndex:e,w:i})=>this._getViolinTooltip(i,t,e))},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}raincloud(){var t,e,i;const s=this.violin(),a=!0===(null==(i=null==(e=null==(t=this.opts)?void 0:t.plotOptions)?void 0:e.bar)?void 0:i.horizontal);return l(o({},s),{plotOptions:{violin:{side:a?"top":"right",box:{show:!0,whiskers:"tukey"},points:{position:a?"bottom":"left",jitter:.85}}},tooltip:l(o({},s.tooltip),{custom:D(["raincloud"],({seriesIndex:t,dataPointIndex:e,w:i})=>this._getRaincloudTooltip(i,t,e))})})}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:i,w:s}){const a=()=>{const t=s.rangeData.seriesRangeStart[e][i];return s.rangeData.seriesRangeEnd[e][i]-t};return s.globals.comboCharts?"rangeBar"===s.config.series[e].type||"rangeArea"===s.config.series[e].type?a():t:a()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:D(["rangeBar"],t=>t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?(t=>{const{color:e,seriesName:i,ylabel:s,startVal:a,endVal:r}=I(l(o({},t),{isTimeline:!0}));return R(l(o({},t),{color:e,seriesName:i,ylabel:s,start:a,end:r}))})(t):(t=>{const{color:e,seriesName:i,ylabel:s,start:a,end:r}=I(t);return R(l(o({},t),{color:e,seriesName:i,ylabel:s,start:a,end:r}))})(t))},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(){const t=this.rangeBar(),e=(t,e,i)=>'
'+t+' '+i+"
";return l(o({},t),{chart:{stacked:!1,zoom:{enabled:!1}},plotOptions:l(o({},t.plotOptions),{bar:l(o({},t.plotOptions.bar),{barHeight:6,columnWidth:6,dumbbell:{dataLabels:{enabled:!0}}})}),dataLabels:l(o({},t.dataLabels),{enabled:!1}),legend:{show:!0,position:"bottom",horizontalAlign:"left",markers:{shape:"circle"}},tooltip:{shared:!1,intersect:!0,followCursor:!1,custom:D(["rangeBar"],t=>{var i;const{w:s,dataPointIndex:a,seriesIndex:r}=t,n=s.dumbbellData;if(!n||"series"!==n.form){const{color:e,seriesName:i,ylabel:s,start:a,end:r}=I(t);return R(l(o({},t),{color:e,seriesName:i,ylabel:s,start:a,end:r}))}const h=n.values[a]||[],c=s.globals.tooltip.tooltipLabels.getFormatters(r),d=null!=(i=s.labelData.labels[a])?i:"";let p="";const u=[];for(let t=0;t
'+d+"
"+p+(2===u.length?'
'+s.config.plotOptions.bar.dumbbell.tooltip.differenceLabel+': '+c.yLbFormatter(Math.abs(u[1]-u[0]))+"
":"")+""})}})}dumbbellSizing(t){var e,i;return(null==(e=t.plotOptions.bar)?void 0:e.barHeight)||(t.plotOptions.bar.barHeight=2),(null==(i=t.plotOptions.bar)?void 0:i.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:D(["rangeArea"],t=>(t=>{const{color:e,seriesName:i,ylabel:s,start:a,end:r}=I(t);return R(l(o({},t),{color:e,seriesName:i,ylabel:s,start:a,end:r}))})(t))}}}streamgraph(){const t=this.rangeArea();return l(o({},t),{chart:{stacked:!1},stroke:{curve:"monotoneCubic",width:0},fill:{type:"solid",opacity:1},dataLabels:{enabled:!1},grid:{yaxis:{lines:{show:!1}}},markers:{size:0,hover:{size:0,sizeOffset:0}},tooltip:{intersect:!1,shared:!1,followCursor:!0,custom:D(["streamgraph"],t=>(t=>{var e;const{w:i,dataPointIndex:s,seriesIndex:a}=t,r=i.streamgraphData;if(!r||!Array.isArray(r.order)){const{color:e,seriesName:i,ylabel:s,start:a,end:r}=I(t);return R(l(o({},t),{color:e,seriesName:i,ylabel:s,start:a,end:r}))}const{ylabel:n}=I(t),h=(()=>{const t=i.streamgraphData,e=i.dom.baseEl&&i.dom.baseEl.querySelector(".apexcharts-svg"),r=i.interact&&i.interact.clientY,n=i.globals.maxY-i.globals.minY;if(!e||null==r||!n||!isFinite(n))return a;const o=e.getBoundingClientRect(),l=i.globals.svgWidth?o.width/i.globals.svgWidth:1,h=(r-o.top)/(l||1)-i.layout.translateY,c=i.layout.gridHeight,d=t=>{var e;const s=(t-i.globals.minY)/n;return(null==(e=i.config.yaxis[0])?void 0:e.reversed)?s*c:c-s*c};let p=a,u=1/0;for(let e=0;e=l&&h<=c)return i;const g=h{if(c){const s=i.globals.tooltip.tooltipLabels.getFormatters(t);if("function"==typeof s.yLbFormatter)return s.yLbFormatter(e)}return Number.isInteger(e)?String(e):String(Number(e.toFixed(6)))};let p="",u=0;for(let t=r.order.length-1;t>=0;t--){const a=r.order[t],n=null==(e=r.values[a])?void 0:e[s];null!=n&&isFinite(n)&&(u+=n,p+='
'+r.names[a]+' '+d(a,n)+"
")}return'
'+n+"
"+p+("expand"===r.offset?"":'
Total '+d(a,u)+"
")+"
"})(t))},legend:{show:!0,position:"top",horizontalAlign:"center"}})}brush(t){return v.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}stacked100(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;const e=t.dataLabels.formatter;t.yaxis.forEach((e,i)=>{t.yaxis[i].min=0,t.yaxis[i].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(o({},t),{plotOptions:l(o({},t.plotOptions),{bar:l(o({},t.plotOptions.bar),{borderRadiusApplication:"end"})})})}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 v.isNumber(t)?Math.floor(t):t};const i=t.xaxis.labels.formatter;let s=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return e&&e.length&&(s=e.map(t=>Array.isArray(t)?t:String(t))),s&&s.length&&(t.xaxis.labels.formatter=function(t){return v.isNumber(t)?i(s[Math.floor(t)-1]):i(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,zoom:{enabled:!1}},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!1,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},axisTicks:{show:!1}}}}unit(){return{chart:{toolbar:{show:!1}},dataLabels:{enabled:!1},stroke:{show:!1,width:0},fill:{opacity:1},tooltip:{followCursor:!0,x:{show:!1}},legend:{show:!0,position:"bottom"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}sunburst(){return{chart:{toolbar:{show:!1}},dataLabels:{style:{colors:["#fff"]},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:t=>"number"==typeof t?t.toFixed(1)+"%":t,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=>"number"==typeof t?t.toFixed(1)+"%":t,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=>"number"==typeof t?t.toFixed(1)+"%":t,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}},stroke:{lineCap:"butt"},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,i,s,a){const r=t.candleData.seriesCandleO[e][i],n=t.candleData.seriesCandleH[e][i],o=t.candleData.seriesCandleM[e][i],l=t.candleData.seriesCandleL[e][i],h=t.candleData.seriesCandleC[e][i],c=t.config.series[e];return c.type&&c.type!==a?`
\n ${c.name?c.name:"series-"+(e+1)}: ${t.seriesData.series[e][i]}\n
`:`
${s[0]}: `+r+`
${s[1]}: `+n+"
"+(o?`
${s[2]}: `+o+"
":"")+`
${s[3]}: `+l+`
${s[4]}: `+h+"
"}_getViolinTooltip(t,e,i){var s,a,r;const n=null==(s=t.violinData.seriesViolinMin[e])?void 0:s[i],o=null==(a=t.violinData.seriesViolinMax[e])?void 0:a[i],l=(null==(r=t.violinData.seriesViolinPoints[e])?void 0:r[i])||[],h=t.config.series[e].name||"series-"+(e+1);return`
${h}
Min: ${n}
Max: ${o}
Observations: ${l.length}
`}_getRaincloudTooltip(t,e,i){var s,a;const r=null==(s=t.violinData.seriesViolinSummary[e])?void 0:s[i];if(!r)return this._getViolinTooltip(t,e,i);const n=(null==(a=t.violinData.seriesViolinPoints[e])?void 0:a[i])||[],o=t.config.series[e].name||"series-"+(e+1),l=t=>{if(!isFinite(t))return String(t);const e=Math.round(t);return Math.abs(t-e)<1e-6?String(e):String(Number(t.toFixed(2)))},[h,c,d,p,u]=r;return`
${o}
Whisker high: ${l(u)}
Q3: ${l(p)}
Median: ${l(d)}
Q1: ${l(c)}
Whisker low: ${l(h)}
Observations: ${n.length}
`}}class X{constructor(t){this.opts=t}init({responsiveOverride:t}){var e,i,s,a,r,n,o,l;let h=this.opts;const c=new k,p=new z(h);h=this.normalizeAliasedChartType(h),this.chartType=h.chart.type,h=this.extendYAxis(h),h=this.extendAnnotations(h);let u=c.init(),g={};if(h&&"object"==typeof h){let c=z.forType(h);(null==(e=h.chart.brush)?void 0:e.enabled)&&(c=p.brush(c)),(null==(s=null==(i=h.plotOptions)?void 0:i.line)?void 0:s.isSlopeChart)&&(c=p.slope()),h.chart.stacked&&"100%"===h.chart.stackType&&(h=p.stacked100(h)),(null==(r=null==(a=h.plotOptions)?void 0:a.bar)?void 0:r.isDumbbell)&&"dumbbell"!==h.chart.requestedType&&(h=p.dumbbellSizing(h)),this.checkForDarkTheme(d.getApex()),this.checkForDarkTheme(h),h.xaxis=h.xaxis||d.getApex().xaxis||{},t||(h.xaxis.convertedCatToNumeric=!1),h=this.checkForCatToNumericXAxis(this.chartType,c,h),((null==(n=h.chart.sparkline)?void 0:n.enabled)||(null==(l=null==(o=d.getApex().chart)?void 0:o.sparkline)?void 0:l.enabled))&&(c=p.sparkline(c)),g=v.extend(u,c)}const f=v.extend(g,d.getApex());return u=v.extend(f,h),u=this.handleUserInputErrors(u),u}normalizeAliasedChartType(t){if(!t||!t.chart)return t;const e=t.chart.type;return e&&_[e]?(t.chart.requestedType=e,"waffle"===e?(t.plotOptions=t.plotOptions||{},t.plotOptions.unit=t.plotOptions.unit||{},null==t.plotOptions.unit.layout&&(t.plotOptions.unit.layout="grid"),null==t.plotOptions.unit.shape&&(t.plotOptions.unit.shape="square"),t.chart.type="unit"):"funnel"===e||"pyramid"===e?(t.plotOptions=t.plotOptions||{},t.plotOptions.bar=t.plotOptions.bar||{},t.plotOptions.bar.isFunnel=!0,t.plotOptions.bar.horizontal=!0,t.chart.type="bar",t.plotOptions.bar.isPyramid="pyramid"===e):"gauge"===e?t.chart.type="radialBar":"waterfall"===e?(t.chart.stacked=!1,t.chart.type="rangeBar"):"dumbbell"===e?(t.plotOptions=t.plotOptions||{},t.plotOptions.bar=t.plotOptions.bar||{},t.plotOptions.bar.isDumbbell=!0,null==t.plotOptions.bar.horizontal&&(t.plotOptions.bar.horizontal=!0),t.chart.stacked=!1,t.chart.type="rangeBar"):"streamgraph"===e?(t.chart.stacked=!1,t.yaxis=t.yaxis||{},Array.isArray(t.yaxis)||null!=t.yaxis.show||(t.yaxis.show=!1),t.chart.type="rangeArea"):"histogram"===e?(t.xaxis=t.xaxis||{},null==t.xaxis.type&&(t.xaxis.type="numeric"),t.chart.type="bar"):"raincloud"===e&&(t.chart.type="violin"),t):t}checkForCatToNumericXAxis(t,e,i){var s,a,r,n,o;const l=new z(i),h=("bar"===t||"boxPlot"===t||"violin"===t)&&(null==(a=null==(s=i.plotOptions)?void 0:s.bar)?void 0:a.horizontal),c="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t||"unit"===t||"sunburst"===t,d="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,p=("scatter"===t||"bubble"===t)&&(null==(o=null==(n=null==(r=i.plotOptions)?void 0:r.scatter)?void 0:n.jitter)?void 0:o.enabled),u=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return h||c||p||!d||"between"===u||(i=l.convertCatToNumeric(i)),i}extendYAxis(t,e){const i=new k;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={});const s=d.getApex();t.yaxis.constructor!==Array&&s.yaxis&&s.yaxis.constructor!==Array&&(t.yaxis=v.extend(t.yaxis,s.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[v.extend(i.yAxis,t.yaxis)]:t.yaxis=v.extendArray(t.yaxis,i.yAxis);let a=!1;t.yaxis.forEach(t=>{t.logarithmic&&(a=!0)});let r=t.series;return e&&!r&&(r=e.config.series),a&&r.length!==t.yaxis.length&&r.length&&(t.yaxis=r.map((e,s)=>{if(e.name||(r[s].name=`series-${s+1}`),t.yaxis[s])return t.yaxis[s].seriesName=r[s].name,t.yaxis[s];{const e=v.extend(i.yAxis,t.yaxis[0]);return e.show=!1,e}})),a&&r.length>1&&(r.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=v.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}extendXAxisAnnotations(t){const e=new k;return t.annotations.xaxis=v.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}extendPointAnnotations(t){const e=new k;return t.annotations.points=v.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 B=1.618,N=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],O=[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 Y{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.hasNullValues=!1,t.invalidLogScale=!1,t.seriesRangeName={},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.isDestroyed=!1,t.bulkRevealScheduled=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.delayedElements=[],t.pointsArray=[],t.barCanvasCoords=null,t.activeRenderer=null,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,i,s=i)=>{Object.defineProperty(e,s,{get:()=>t[i],set(e){t[i]=e},enumerable:!0,configurable:!0})},i={};e(i,"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","collapsingSeriesIndices","allSeriesCollapsed","risingSeries","previousPaths","ignoreYAxisIndexes","labels","categoryLabels","timescaleLabels","groups"])e(i,t);Object.defineProperty(t,"seriesNS",{value:i,writable:!1,enumerable:!1,configurable:!0});const s={};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(s,t);Object.defineProperty(t,"axes",{value:s,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 r={};for(const t of["domCache","dimensionCache","cachedSelectors","textRectsCache","pointsArray","dataLabelsRects","lastDrawnDataLabelsIndexes","delayedElements","resizeTimer","selectionResizeTimer","resizeObserver"])e(r,t);Object.defineProperty(t,"cache",{value:r,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:[]},radialNeedleRAF:null,unitGatherRAF:null,unitExitRAF:null,stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0,batched:!1},LINE_HEIGHT_RATIO:B,axisCharts:!0,isSlopeChart:t.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],tokenSurface:void 0,lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],collapsingSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],prevPolarAngles:null,prevStreamFrame:null,streamScrolled:!1,prevChromeFrame:null,svgWidth:0,svgHeight:0,lastResizeSignature:null,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:N,niceScaleDefaultTicks:O,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}defineLazyInitialSeries(t){let e=[],i=null;Object.defineProperty(t,"initialSeries",{configurable:!0,enumerable:!0,get:()=>(null===i&&(i=v.clone(e)),i),set(s){e=v.copySeriesShallow(s),i=null,t._initialSeriesPeek=e}}),t._initialSeriesPeek=e}init(t){const e=this.globalVars(t);this.initGlobalVars(e),this.defineLazyInitialSeries(e);const i=v.extend({},t);return i.series=v.copySeriesShallow(t.series),e.initialConfig=i,e.initialSeries=t.series,e.lastXAxis=v.clone(e.initialConfig.xaxis),e.lastYAxis=v.clone(e.initialConfig.yaxis),e}}class W{constructor(t){this.opts=t}init(){const t=new X(this.opts).init({responsiveOverride:!1}),e=(new Y).init(t),i={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,measureEnabled:"measure"===t.chart.toolbar.autoSelected&&!!t.chart.toolbar.tools.measure&&!(!t.chart.measure||!t.chart.measure.enabled),zoomed:!1,selection:void 0,visibleXRange:void 0,selectedDataPoints:[],mousedown:!1,clientX:null,clientY:null,lastClientPosition:{},capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:!!d.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:[],seriesBoxPoints:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},violinData:{seriesViolinDensity:[],seriesViolinPoints:[],seriesViolinSummary:[],seriesViolinMin:[],seriesViolinMax:[]},histogramData:{edges:[],binWidth:0,counts:[],rule:"",capped:!1},waterfallData:{values:[],cumulative:[],kinds:[],geometry:null},dumbbellData:null,streamgraphData:null,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:[],unitData:[]},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:[],gridPad:{top:0,right:0,bottom:0,left:0}}};Object.defineProperty(e,"dom",{get:()=>i.dom,set(t){i.dom=t},enumerable:!1,configurable:!0});for(const t of["xLabelFormatter","yLabelFormatters","xaxisTooltipFormatter","ttKeyFormatter","ttVal","ttZFormatter","legendFormatter"])Object.defineProperty(e,t,{get:()=>i.formatters[t],set(e){i.formatters[t]=e},enumerable:!1,configurable:!0});for(const t of["zoomEnabled","panEnabled","selectionEnabled","zoomed","selection","visibleXRange","selectedDataPoints","mousedown","clientX","clientY","lastClientPosition","capturedSeriesIndex","capturedDataPointIndex","disableZoomIn","disableZoomOut","isTouchDevice"])Object.defineProperty(e,t,{get:()=>i.interact[t],set(e){i.interact[t]=e},enumerable:!1,configurable:!0});for(const t of["gridHeight","gridWidth","translateX","translateY","translateXAxisX","translateXAxisY","rotateXLabels","xAxisHeight","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yLabelsCoords","yTitleCoords","gridPad"])Object.defineProperty(e,t,{get:()=>i.layout[t],set(e){i.layout[t]=e},enumerable:!1,configurable:!0});for(const t of["series","seriesNames","seriesX","seriesZ","seriesColors","seriesGoals","stackedSeriesTotals","stackedSeriesTotalsByGroups"])Object.defineProperty(e,t,{get:()=>i.seriesData[t],set(e){i.seriesData[t]=e},enumerable:!1,configurable:!0});for(const t of["isXNumeric","dataFormatXNumeric","isDataXYZ","isRangeData","isRangeBar","isMultiLineX","noLabelsProvided","dataWasParsed"])Object.defineProperty(e,t,{get:()=>i.axisFlags[t],set(e){i.axisFlags[t]=e},enumerable:!1,configurable:!0});for(const t of["labels","categoryLabels","timescaleLabels","hasXaxisGroups","groups","seriesGroups"])Object.defineProperty(e,t,{get:()=>i.labelData[t],set(e){i.labelData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesRangeStart","seriesRangeEnd","seriesRange"])Object.defineProperty(e,t,{get:()=>i.rangeData[t],set(e){i.rangeData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC"])Object.defineProperty(e,t,{get:()=>i.candleData[t],set(e){i.candleData[t]=e},enumerable:!1,configurable:!0});for(const t of["seriesViolinDensity","seriesViolinPoints","seriesViolinMin","seriesViolinMax"])Object.defineProperty(e,t,{get:()=>i.violinData[t],set(e){i.violinData[t]=e},enumerable:!1,configurable:!0});return i}}class H{constructor(t){this.w=t}static checkComboSeries(t,e){let i=!1,s=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&&"violin"!==t.type||s++,void 0!==t.type&&t.type!==e&&a++}),a>0&&(i=!0),{comboBarCount:s,comboCharts:i}}getStackedSeriesTotals(t=[]){const e=this.w,i=[];if(0===e.seriesData.series.length)return i;for(let s=0;st+e,0);{const e=this.w.seriesData.series[t];return Array.isArray(e)?e.reduce((t,e)=>t+e,0):null!=e?e:0}}getStackedSeriesTotalsByGroups(){const t=this.w,e=[];return t.labelData.seriesGroups.forEach(i=>{const s=[];t.config.series.forEach((e,a)=>{i.indexOf(t.seriesData.seriesNames[a])>-1&&s.push(a)});const a=t.seriesData.series.map((t,e)=>-1===s.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 i=[];const s=[],a=[],r=this.w.seriesData.series.length>e.yaxis.length||e.yaxis.some(t=>Array.isArray(t.seriesName));e.series.forEach((t,e)=>{a.push(e),s.push(null)}),e.yaxis.forEach((t,e)=>{i[e]=[]});const n=[];e.yaxis.forEach((t,s)=>{let o=!1;if(t.seriesName){let n=[];Array.isArray(t.seriesName)?n=t.seriesName:n.push(t.seriesName),n.forEach(t=>{e.series.forEach((e,n)=>{if(e.name===t){let t=n;s===n||r?(!r||a.indexOf(n)>-1)&&i[s].push([s,n]):(i[n].push([n,s]),t=s),o=!0,t=a.indexOf(t),-1!==t&&a.splice(t,1)}})})}o||n.push(s)}),i=i.map(t=>{const e=[];return t.forEach(t=>{s[t[1]]=t[0],e.push(t[1])}),e});let o=e.yaxis.length-1;for(let t=0;t{i[o].push(t),s[t]=o}),t.seriesYAxisMap=i.map(t=>t),t.seriesYAxisReverseMap=s.map(t=>t),t.seriesYAxisMap.forEach((t,i)=>{t.forEach(t=>{if(e.series[t]&&void 0===e.series[t].group){e.series[t].group="apexcharts-axis-".concat(i.toString())}})})}isSeriesNull(t=null){let e=[];const i=this.w.config.series;return e=null===t?i.filter(t=>null!==t):i[t]&&Array.isArray(i[t].data)?i[t].data.filter(t=>null!==t):null!==i[t]&&void 0!==i[t]?[i[t]]:[],0===e.length}seriesHaveSameValues(t){const e=this.w.seriesData.series[t];return!Array.isArray(e)||e.every((t,e,i)=>t===i[0])}getCategoryLabels(t){const e=this.w;let i=t.slice();return e.config.xaxis.convertedCatToNumeric&&(i=t.map(t=>e.config.xaxis.labels.formatter(t-e.globals.minX+1))),i}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 i=0;i{let r=0;for(let n=0;nt&&i.seriesData.seriesX[a][n]{const i=[];if(Array.isArray(e))for(let s=0;st+e,0);i.push(s)}return i})}getCalculatedRatios(){const t=this.w,e=t.globals,i=[];let s=0,a=0,r=0,n=0,o=[],l=.1,h=0;if(e.yRange=[],e.isMultipleYAxis)for(let t=0;t0){const r=(e,s)=>{const a=t.config.yaxis[t.globals.seriesYAxisReverseMap[s]];if(!a)return 0;if(a.logarithmic)return 0;return-(e<0?-1:1)*(e=Math.abs(e))/i[s]};if(e.isMultipleYAxis){o=[];for(let t=0;t{const s=e.globals.seriesYAxisReverseMap[i];return e.config.yaxis[s]&&e.config.yaxis[s].logarithmic?t.map(t=>null===t?null:this.getLogVal(e.config.yaxis[s].logBase,t,i)):t}),e.globals.invalidLogScale?t:e.globals.seriesLog}getLogValAtSeriesIndex(t,e){if(null===t)return null;const i=this.w,s=i.globals.seriesYAxisReverseMap[e];return i.config.yaxis[s]&&i.config.yaxis[s].logarithmic?this.getLogVal(i.config.yaxis[s].logBase,t,e):t}getBaseLog(t,e){return Math.log(e)/Math.log(t)}getLogVal(t,e,i){if(e<=0)return 0;const s=this.w,a=0===s.globals.minYArr[i]?-1:this.getBaseLog(t,s.globals.minYArr[i]),r=(0===s.globals.maxYArr[i]?0:this.getBaseLog(t,s.globals.maxYArr[i]))-a;return(this.getBaseLog(t,e)-a)/r}getLogYRatios(t){const e=this.w,i=this.w.globals,s=i;return s.yLogRatio=t.slice(),s.logYRange=i.yRange.map((t,a)=>{const r=e.globals.seriesYAxisReverseMap[a];if(e.config.yaxis[r]&&this.w.config.yaxis[r].logarithmic){const t=1;return s.yLogRatio[a]=t/this.w.layout.gridHeight,t}return i.yRange[a]}),s.invalidLogScale?t.slice():s.yLogRatio}static extendArrayProps(t,e,i){var s,a;return(null==e?void 0:e.yaxis)&&(e=t.extendYAxis(e,i)),(null==e?void 0:e.annotations)&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),(null==(s=null==e?void 0:e.annotations)?void 0:s.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,i,s){const a=this.w,r=[];return t.series.length>0&&e.forEach(e=>{const n=[],o=[];t.i.forEach((i,s)=>{a.config.series[i].group===e&&(n.push(t.series[s]),o.push(i))}),n.length>0&&r.push(s.draw(n,i,o))}),r}}const $="http://www.w3.org/2000/svg";class j{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 j(this.x,this.y)}}class G{constructor(t,e,i,s,a,r){this.a=null!=t?t:1,this.b=null!=e?e:0,this.c=null!=i?i:0,this.d=null!=s?s:1,this.e=null!=a?a:0,this.f=null!=r?r:0}rotate(t){const e=t*Math.PI/180,i=Math.cos(e),s=Math.sin(e);return this.multiply(new G(i,s,-s,i,0,0))}scale(t,e){return this.multiply(new G(t,0,0,null!=e?e:t,0,0))}multiply(t){return new G(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 j(this.a*t.x+this.c*t.y+this.e,this.b*t.x+this.d*t.y+this.f)}}class V{constructor(t,e,i,s){this.x=t,this.y=e,this.w=i,this.h=s,this.width=i,this.height=s,this.x2=t+i,this.y2=e+s}}function U(t){if(!t||"string"!=typeof t)return[["M",0,0]];const e=[],i=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,s=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;let a;const r=[],n=[];for(;null!==(a=i.exec(t));)r.push(a[1]),n.push(a.index);for(let i=0;i{for(let r=1;rs&&(s=n),oa&&(a=o))}}),e===1/0?{x:0,y:0,width:0,height:0}:{x:e,y:i,width:s-e,height:a-i}}function Z(t){return t.map(t=>t.join(" ")).join(" ")}function K(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 J(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 Q(t){var e,i=[t];switch(t[0]){case"M":return this.pos=this.start=[t[1],t[2]],i;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":i=function(t,e){var i,s,a,r,n,o,l,h,c,d,p,u,g,f,x,m,b,y,w,v,A,S,C,k,_,M,D=Math.abs(e[1]),L=Math.abs(e[2]),P=e[3]%360,F=e[4],E=e[5],T=e[6],I=e[7],R=new j(t[0],t[1]),z=new j(T,I),X=[];if(0===D||0===L||R.x===z.x&&R.y===z.y)return[["C",R.x,R.y,z.x,z.y,z.x,z.y]];i=new j((R.x-z.x)/2,(R.y-z.y)/2).transform((new G).rotate(P)),(s=i.x*i.x/(D*D)+i.y*i.y/(L*L))>1&&(D*=s=Math.sqrt(s),L*=s);a=(new G).rotate(P).scale(1/D,1/L).rotate(-P),R=R.transform(a),z=z.transform(a),r=[z.x-R.x,z.y-R.y],o=r[0]*r[0]+r[1]*r[1],n=Math.sqrt(o),r[0]/=n,r[1]/=n,l=o<4?Math.sqrt(1-o/4):0,F===E&&(l*=-1);h=new j((z.x+R.x)/2+l*-r[1],(z.y+R.y)/2+l*r[0]),c=new j(R.x-h.x,R.y-h.y),d=new j(z.x-h.x,z.y-h.y),p=Math.acos(c.x/Math.sqrt(c.x*c.x+c.y*c.y)),c.y<0&&(p*=-1);u=Math.acos(d.x/Math.sqrt(d.x*d.x+d.y*d.y)),d.y<0&&(u*=-1);E&&p>u&&(u+=2*Math.PI);!E&&p>16&255,i>>8&255,255&i,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 ht(t,e,i){return`rgba(${Math.round(t[0]+(e[0]-t[0])*i)},${Math.round(t[1]+(e[1]-t[1])*i)},${Math.round(t[2]+(e[2]-t[2])*i)},${t[3]+(e[3]-t[3])*i})`}class ct{constructor(t,e,i){this.el=t,this.duration=null!=e?e:300,this.delay=i||0,this._attrTarget=null,this._plotTarget=null,this._plotSnap=null,this._plotAlgorithm="commands",this._afterCb=null,this._duringCb=null,this._easing=null,this._next=null,this._root=null,this._scheduled=!1}ease(t){return"function"==typeof t&&(this._easing=t),this._schedule(),this}attr(t){return this._attrTarget=t,this._schedule(),this}plot(t,e,i){return this._plotTarget=t,e&&(this._plotAlgorithm=e),this._plotSnap=i||null,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 i=new ct(this.el,t,e);return this._next=i,i._root=this._root||this,i}_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 i=0;t.forEach(t=>{i+=t.delay,t._execute(i),i+=t.duration})}_execute(t){const e=this.el,i=this.duration;if(i<=1){const i=()=>{this._attrTarget&&e.attr(this._attrTarget),this._plotTarget&&e.plot(this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(e)};return void(t>0?setTimeout(i,t):i())}const s=()=>{const t={},s={},a={};if(this._attrTarget)for(const i of Object.keys(this._attrTarget)){const r=e.attr(i);t[i]=r;const n=lt(r),o=lt(String(this._attrTarget[i]));n&&o&&(s[i]=n,a[i]=o)}let r=null;if(this._plotTarget){const t=e.attr("d")||"";try{r="polygons"===this._plotAlgorithm?function(t,e,i=96){const s=rt(t,i),a=rt(e,i);let r=0,n=1/0;for(let t=0;t=n)break}e{const c=h-n,d=Math.min(c/i,1),p=o(d);if(this._attrTarget)if(d>=1)e.attr(this._attrTarget);else{const i={};for(const e of Object.keys(this._attrTarget))if(s[e]&&a[e])i[e]=ht(s[e],a[e],p);else{const s=parseFloat(t[e]),a=parseFloat(this._attrTarget[e]);isNaN(s)||isNaN(a)||(i[e]=s+(a-s)*p)}e.attr(i)}r&&d<1&&e.attr("d",r(p)),this._duringCb&&this._duringCb(p),d<1?b.requestAnimationFrame(l):(this._plotTarget&&e.attr("d",this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(e))};b.requestAnimationFrame(l)};t>0?setTimeout(s,t):s()}}function dt(t){t.prototype.animate=function(t,e){return new ct(this,t,e)}}function pt(t){return-Math.cos(t*Math.PI)/2+.5}function ut(t,e,i,s){t=Math.min(Math.max(t,0),1),i=Math.min(Math.max(i,0),1);const a=3*t,r=3*(i-t)-a,n=1-a-r,o=3*e,l=3*(s-e)-o,h=1-o-l,c=t=>((n*t+r)*t+a)*t;return t=>t<=0?0:t>=1?1:(t=>((h*t+l)*t+o)*t)((t=>{let e=0,i=1,s=t;if(si)return i;for(;ea?e=s:i=s,s=(e+i)/2}return s})(t))}const gt=new Map;function ft(t){return"function"==typeof t?xt(t):(e=t,Array.isArray(e)&&4===e.length&&e.every(t=>"number"==typeof t)?ut(t[0],t[1],t[2],t[3]):"string"==typeof t&>.has(t)?xt(gt.get(t)):pt);var e}function xt(t){return e=>{const i=t(e);return"number"==typeof i&&isFinite(i)?i:e}}gt.set("linear",t=>t),gt.set("easeInOutSine",pt),gt.set("easeInSine",t=>1-Math.cos(t*Math.PI/2)),gt.set("easeOutSine",t=>Math.sin(t*Math.PI/2)),gt.set("easeInQuad",t=>t*t),gt.set("easeOutQuad",t=>1-(1-t)*(1-t)),gt.set("easeInOutQuad",t=>t<.5?2*t*t:1-Math.pow(-2*t+2,2)/2),gt.set("easeInCubic",t=>t*t*t),gt.set("easeOutCubic",t=>1-Math.pow(1-t,3)),gt.set("easeInOutCubic",t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2),gt.set("easeOutBack",t=>{const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)}),gt.set("easeInOutBack",t=>{const e=2.5949095;return t<.5?Math.pow(2*t,2)*(7.189819*t-e)/2:(Math.pow(2*t-2,2)*((e+1)*(2*t-2)+e)+2)/2});const mt="http://www.w3.org/2000/svg";function bt(t){return 1-Math.pow(1-t,3)}let yt=null;function wt(){if(!d.isBrowser())return!1;try{return yt||(yt=window.matchMedia("(prefers-reduced-motion: reduce)")),!!yt.matches}catch(t){return!1}}function vt(t,e,i){if(!d.isBrowser())return!1;if(i.globals.dataChanged||i.globals.resized)return!1;const s=i.config.chart.animations;if(!s||!1===s.enabled)return!1;const a=i.config.chart.type;if("line"!==a&&"area"!==a&&"rangeArea"!==a)return!1;if(!(i.layout.gridWidth>0))return!1;const r=2*(s.speed||800),n=Math.max(0,Math.min(1,e/i.layout.gridWidth)),o=(1-Math.cbrt(1-n))*r,l=t.node.style;l.opacity="0";let h=null;const c=t=>{null===h&&(h=t),t-h>=o?l.opacity="":b.requestAnimationFrame(c)};return b.requestAnimationFrame(c),!0}function At(t){const e=t.config.chart.animations;var i;e&&(!1!==e.respectReducedMotion&&wt()&&(e.enabled=!1,e.dynamicAnimation&&(e.dynamicAnimation.enabled=!1)),i=ft(e.easing),ot="function"==typeof i?i:nt)}function St(t){const e=t.style,i=t.index||0,s="number"==typeof t.baseDelay?t.baseDelay:40,a=t.row||0,r=t.col||0,n=t.groupIndex||0,o=t.perGroup||1,l=t.centerDistance||0;switch(e){case"none":return 0;case"diagonal":return(a+r)*s;case"group":return n*s+i%o*(s/4);case"centroid":return l*s*(i+1);default:return i*s}}class Ct{constructor(t,e){this.w=t,this.ctx=e}animateLine(t,e,i,s){t.attr(e).animate(s).attr(i)}animateMarker(t,e,i,s){t.attr({opacity:0}).animate(e).attr({opacity:1}).after(()=>{s()})}animatePop(t,{speed:e,delay:i=0,onComplete:s}){const a=this.w;if(!d.isBrowser()||!a.globals.shouldAnimate||e<1)return void(s&&s());const r=t.node.style;r.transformBox="fill-box",r.transformOrigin="center",r.transform="scale(0)",r.opacity="0";const n=performance.now()+i,o=t=>{if(a.globals.isDestroyed)return;const i=Math.max(0,Math.min(1,(t-n)/e));r.transform=`scale(${function(t){const e=1.70158;return 1+2.70158*Math.pow(t-1,3)+e*Math.pow(t-1,2)}(i)})`,r.opacity=String(Math.min(1,2*i)),i<1?b.requestAnimationFrame(o):(r.transform="",r.transformOrigin="",r.transformBox="",r.opacity="",s&&s())};b.requestAnimationFrame(o)}animateRect(t,e,i,s,a,r=0){t.attr(e).animate(s,r).attr(i).after(()=>a())}animatePathsGradually(t){const{el:e,realIndex:i,j:s,fill:a,pathFrom:r,pathTo:n,pathToInterp:o,speed:l,delay:h,scrollMorph:c}=t,d=this.w;let p=0;d.config.chart.animations.animateGradually.enabled&&(p=d.config.chart.animations.animateGradually.delay),d.config.chart.animations.dynamicAnimation.enabled&&d.globals.dataChanged&&"bar"!==d.config.chart.type&&(p=0),this.morphSVG(e,i,s,"line"!==d.config.chart.type||d.globals.comboCharts?a:"stroke",r,n,l,h*p,c,o)}revealBulk(t){const e=this.w;t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node}),d.isBrowser()&&e.globals.shouldAnimate?e.globals.bulkRevealScheduled||(e.globals.bulkRevealScheduled=!0,b.requestAnimationFrame(()=>{e.globals.isDestroyed||(e.globals.bulkRevealScheduled=!1,this.animationCompleted(t))})):this.animationCompleted(t)}showDelayedElements(){this.w.globals.delayedElements.forEach(t=>{if(t.holdUntilComplete&&!this.w.globals.animationEnded)return;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}))}animateDraw(t,{realIndex:e,j:i,isFill:s,isLast:a,speed:r,delay:n,mask:o}){const l=this.w,h=this,c=()=>{a&&l.globals.shouldAnimate&&h.animationCompleted(t),h.showDelayedElements()};if(!d.isBrowser()||!l.globals.shouldAnimate||r<1)return void c();const p=t.node,u=()=>{const t=o&&"radial"===o.type,a=l.layout.gridWidth+8,h=o&&o.cx||0,d=o&&o.cy||0,u=(o&&o.r||l.layout.gridWidth/2)+4,g=`apexDrawMask${l.globals.cuid}-${e}-${null!=i?i:0}-${s?"f":"s"}`,f=b.createElementNS(mt,"mask");let x;if(f.setAttribute("id",g),f.setAttribute("maskUnits","userSpaceOnUse"),t){const t=u;f.setAttribute("x",String(h-t)),f.setAttribute("y",String(d-t)),f.setAttribute("width",String(2*t)),f.setAttribute("height",String(2*t)),x=b.createElementNS(mt,"circle"),x.setAttribute("cx",String(h)),x.setAttribute("cy",String(d)),x.setAttribute("r","0"),x.setAttribute("fill","#fff")}else f.setAttribute("x",String(-4)),f.setAttribute("y",String(-4)),f.setAttribute("width",String(a)),f.setAttribute("height",String(l.layout.gridHeight+8)),x=b.createElementNS(mt,"rect"),x.setAttribute("x",String(-4)),x.setAttribute("y",String(-4)),x.setAttribute("width","0"),x.setAttribute("height",String(l.layout.gridHeight+8)),x.setAttribute("fill","#fff");f.appendChild(x),l.dom.elDefs.node.appendChild(f),p.setAttribute("mask",`url(#${g})`);const m=performance.now()+(n||0),y=e=>{if(l.globals.isDestroyed)return;const i=Math.max(0,Math.min(1,(e-m)/r)),s=bt(i);t?x.setAttribute("r",String(s*u)):x.setAttribute("width",String(s*a)),i<1?b.requestAnimationFrame(y):(p.removeAttribute("mask"),f.parentNode&&f.parentNode.removeChild(f),c())};b.requestAnimationFrame(y)};b.requestAnimationFrame(()=>{if(l.globals.isDestroyed)return;if(s)return void u();const t=p.getAttribute("stroke-dasharray");if(!!t&&"0"!==t&&""!==t)return void u();let e=0;try{"function"==typeof p.getTotalLength&&(e=p.getTotalLength())}catch(t){e=0}e?(t=>{p.setAttribute("stroke-dasharray",String(t)),p.setAttribute("stroke-dashoffset",String(t));const e=performance.now()+(n||0),i=s=>{if(l.globals.isDestroyed)return;const a=Math.max(0,Math.min(1,(s-e)/r));p.setAttribute("stroke-dashoffset",String(t*(1-bt(a)))),a<1?b.requestAnimationFrame(i):(p.removeAttribute("stroke-dasharray"),p.removeAttribute("stroke-dashoffset"),c())};b.requestAnimationFrame(i)})(e):c()})}morphSVG(t,e,i,s,a,r,n,o,l,h){var c,d;const p=this.w;a||(a=t.attr("pathFrom")),r||(r=t.attr("pathTo"));const u=()=>("radar"===p.config.chart.type&&(n=1),`M 0 ${p.layout.gridHeight}`);(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=u()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=u(),h=void 0),h&&(!h.trim()||h.indexOf("undefined")>-1||h.indexOf("NaN")>-1)&&(h=void 0),p.globals.shouldAnimate||(n=1);const g=!0===(null==(d=null==(c=this.ctx)?void 0:c.morphTypeChange)?void 0:d.isActive())?"polygons":"commands";let f=null;if(p.globals.dataChanged){const t=p.config.chart.animations.dynamicAnimation.easing;null!=t?f=ft(t):l&&(f=ft("linear"))}const x=t.plot(a).animate(n,o);f&&x.ease(f),x.plot(h||r,g,h?r:void 0).after(()=>{if(v.isNumber(i)){const e=p.seriesData.series[p.globals.maxValsInArrayIndex];e&&i===e.length-2&&p.globals.shouldAnimate&&this.animationCompleted(t)}else"none"!==s&&p.globals.shouldAnimate&&(!p.globals.comboCharts&&e===p.seriesData.series.length-1||p.globals.comboCharts)&&this.animationCompleted(t);this.showDelayedElements()})}}const kt=.15,_t=.35;class Mt{constructor(t){this.w=t}static isSliceChart(t){const e=t.config.chart.type;return"pie"===e||"donut"===e||"polarArea"===e}static hoverOutlineOwnsHoverState(t){var e;return Mt.isSliceChart(t)&&"none"!==t.config.states.hover.filter.type&&!0===(null==(e=t.config.plotOptions.pie.hoverOutline)?void 0:e.show)}static sliceOffsetOwnsActiveState(t){return Mt.isSliceChart(t)&&"polarArea"!==t.config.chart.type&&!0===t.config.plotOptions.pie.expandOnClick&&t.config.plotOptions.pie.expandOffset>0&&!Mt.drilldownBlocksSliceOffset(t)}static drilldownBlocksSliceOffset(t){var e;return Mt.isSliceChart(t)&&!0===(null==(e=t.config.drilldown)?void 0:e.enabled)}getDefaultFilter(t,e){const i=this.w;t.unfilter&&t.unfilter(!0),i.config.chart.dropShadow.enabled&&this.dropShadow(t,i.config.chart.dropShadow,e)}applyFilter(t,e,i,s){var a,r,n;const o=this.w;if(t.unfilter&&t.unfilter(!0),"none"===i)return void this.getDefaultFilter(t,e);const l=o.config.chart.dropShadow,h="lighten"===i?kt:_t,c=Math.max(0,Math.min(1,"number"==typeof s?s:h)),d=1-c,p="lighten"===i?c:0;t.filterWith&&(t.filterWith(t=>{t.colorMatrix({type:"matrix",values:`\n ${d} 0 0 0 ${p}\n 0 ${d} 0 0 ${p}\n 0 0 ${d} 0 ${p}\n 0 0 0 1 0\n `,in:"SourceGraphic",result:"brightness"}),l.enabled&&this.addShadow(t,e,l,"brightness")}),l.noUserSpaceOnUse||null==(r=null==(a=t.filterer())?void 0:a.node)||r.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null==(n=t.filterer())?void 0:n.node))}addShadow(t,e,i,s){var a;const r=this.w;let{blur:n,top:o,left:l,color:h,opacity:c}=i;if(h=Array.isArray(h)?h[e]:h,(null==(a=r.config.chart.dropShadow.enabledOnSeries)?void 0:a.length)>0&&-1===r.config.chart.dropShadow.enabledOnSeries.indexOf(e))return t;t.offset({in:s,dx:l,dy:o,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:n,result:"blur"}),t.flood({"flood-color":h,"flood-opacity":c,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",s])}dropShadow(t,e,i=0){var s,a,r,n,o;const l=this.w;return t.unfilter&&t.unfilter(!0),v.isMsEdge()&&"radialBar"===l.config.chart.type||(null==(s=l.config.chart.dropShadow.enabledOnSeries)?void 0:s.length)>0&&-1===(null==(a=l.config.chart.dropShadow.enabledOnSeries)?void 0:a.indexOf(i))||t.filterWith&&(t.filterWith(t=>{this.addShadow(t,i,e,"SourceGraphic")}),e.noUserSpaceOnUse||null==(n=null==(r=t.filterer())?void 0:r.node)||n.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize(null==(o=t.filterer())?void 0:o.node)),t}setSelectionFilter(t,e,i){const s=this.w;if(void 0!==s.interact.selectedDataPoints[e]&&s.interact.selectedDataPoints[e].indexOf(i)>-1){if(t.node.setAttribute("selected",!0),Mt.sliceOffsetOwnsActiveState(s))return;const i=s.config.states.active.filter;"none"!==i.type&&this.applyFilter(t,e,i.type,i.value)}}_scaleFilterSize(t){if(!t)return;(e=>{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.setAttribute(i,e[i])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}const Dt=Object.freeze({"stroke.dashArray":Object.freeze({type:"number"}),"dataLabels.enabledOnSeries":Object.freeze({type:"boolean"})});function Lt(t,e){const i=function(t){return t.weaveClaims||(t.weaveClaims={byOption:new Map}),t.weaveClaims}(t);return i.byOption.has(e)||i.byOption.set(e,[]),i.byOption.get(e)}function Pt(t,e){const i=Dt[t],s=[];for(const t of Array.isArray(e)?e:[])!t||"string"!=typeof t.series&&"number"!=typeof t.series||typeof t.value===i.type&&s.push({series:t.series,value:t.value});return s}function Ft(t,e){if(t.weaveClaims)for(const[i,s]of t.weaveClaims.byOption){const a=s.filter(t=>t.owner!==e);a.length!==s.length&&t.weaveClaims.byOption.set(i,a)}}function Et(t,e){if("number"==typeof e)return e;const i=t.config&&t.config.series||[];for(let t=0;t2&&(t[t.length-2]=e.x,t[t.length-1]=e.y)}function r(t){return{x:parseFloat(t[t.length-2]),y:parseFloat(t[t.length-1])}}t.indexOf("NaN")>-1&&(t="");var n=t.split(/[,\s]/).reduce(function(t,e){var i=e.match(/^([a-zA-Z])(.+)/);return i?(t.push(i[1]),t.push(i[2])):t.push(e),t},[]).reduce(function(t,e){return parseFloat(e)==e&&t.length?t[t.length-1].push(e):t.push([e]),t},[]),o=[];if(n.length>1){var l=r(n[0]),h=null;"Z"==n[n.length-1][0]&&n[0].length>2&&(h=["L",l.x,l.y],n[n.length-1]=h),o.push(n[0]);for(var c=1;c2&&"L"==p[0]&&u.length>2&&"L"==u[0]){var g,f,x=r(d),m=r(p),b=r(u);g=i(m,x,e),f=i(m,b,e),a(p,g),p.origPoint=m,o.push(p);var y=s(g,m,.5),w=s(m,f,.5),v=["C",y.x,y.y,w.x,w.y,f.x,f.y];v.origPoint=m,o.push(v)}else o.push(p)}if(h){var A=r(o[o.length-1]);o.push(["Z"]),a(o[0],A)}}else o=n;return o.reduce(function(t,e){return t+e.join(" ")+" "},"")}drawLine(t,e,i,s,a="#a8a8a8",r=0,n=null,o="butt"){return this.w.dom.Paper.line().attr({x1:t,y1:e,x2:i,y2:s,stroke:a,"stroke-dasharray":r,"stroke-width":n,"stroke-linecap":o})}drawRect(t=0,e=0,i=0,s=0,a=0,r="#fefefe",n=1,o=null,l=null,h=0){const c=this.w.dom.Paper.rect();return c.attr({x:t,y:e,width:i>0?i:0,height:s>0?s:0,rx:a,ry:a,opacity:n,"stroke-width":null!==o?o:0,stroke:null!==l?l:"none","stroke-dasharray":h}),c.node.setAttribute("fill",r),c}drawPolygon(t,e="#e1e1e1",i=1,s="none"){return this.w.dom.Paper.polygon(t).attr({fill:s,stroke:e,"stroke-width":i})}drawCircle(t,e=null){t<0&&(t=0);const i=this.w.dom.Paper.circle(2*t);return null!==e&&i.attr(e),i}drawPath({d:t="",stroke:e="#a8a8a8",strokeWidth:i=1,fill:s,fillOpacity:a=1,strokeOpacity:r=1,classes:n,strokeLinecap:o=null,strokeDashArray:l=0}){const h=this.w;null===o&&(o=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:s,"fill-opacity":a,stroke:e,"stroke-opacity":r,"stroke-linecap":o,"stroke-width":i,"stroke-dasharray":l,class:n})}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,i=null){return"H"===i?[" H",t].join(" "):"V"===i?[" V",e].join(" "):[" L",t,e].join(" ")}curve(t,e,i,s,a,r){return["C",t,e,i,s,a,r].join(" ")}quadraticCurve(t,e,i,s){return["Q",t,e,i,s].join(" ")}arc(t,e,i,s,a,r,n,o=!1){let l="A";o&&(l="a");return[l,t,e,i,s,a,r,n].join(" ")}renderPaths({j:t,realIndex:e,pathFrom:i,pathTo:s,pathToInterp:a,stroke:r,strokeWidth:n,strokeLinecap:h,fill:c,animationDelay:d,initialSpeed:p,dataChangeSpeed:u,className:g,chartType:f,shouldClipToGrid:x=!0,bindEventsOnPaths:m=!0,drawShadow:b=!0,drawMask:y=null,scrollMorph:w=!1}){var v,A,S,C;const k=this.w,_=new Mt(this.w),M=new Ct(this.w,null!=(v=this.ctx)?v:void 0),D=this.w.config.chart.animations.enabled,L=D&&this.w.config.chart.animations.dynamicAnimation.enabled;if(i&&i.startsWith("M 0 0 ")&&s){const t=s.match(/^M\s+[\d.-]+\s+[\d.-]+/);t&&(i=i.replace(/^M\s+0\s+0/,t[0]))}let P;const F=!0===(null==(S=null==(A=this.ctx)?void 0:A.morphTypeChange)?void 0:S.isActive()),E=!!(D&&!k.globals.resized||L&&k.globals.dataChanged&&k.globals.shouldAnimate||F&&D&&k.globals.shouldAnimate),T="string"==typeof g&&(g.indexOf("apexcharts-line")>-1||g.indexOf("apexcharts-area")>-1||g.indexOf("apexcharts-rangeArea")>-1||g.indexOf("apexcharts-radar")>-1),I=!(!D||k.globals.resized||k.globals.dataChanged||!T),R=null!=(C=k.config.chart.animations.largeDatasetThreshold)?C:0,z=!!(E&&!I&&R>0&&k.globals.dataPoints>R),X=!(!("candlestick"===f||"boxPlot"===f)||!E||I||!k.globals.dataChanged||F),B=z||X;!E||I||B?(P=s,E||(k.globals.animationEnded=!0)):P=i;const N=k.config.stroke.dashArray;let O=0;O=Array.isArray(N)?N[e]:k.config.stroke.dashArray,O=Tt(k,"stroke.dashArray",e,O);const Y=this.drawPath({d:P,stroke:r,strokeWidth:n,fill:c,fillOpacity:1,classes:g,strokeLinecap:h,strokeDashArray:O});Y.attr("index",e),x&&("bar"===f&&!k.globals.isBarHorizontal||k.globals.comboCharts?Y.attr({"clip-path":`url(#gridRectBarMask${k.globals.cuid})`}):Y.attr({"clip-path":`url(#gridRectMask${k.globals.cuid})`})),k.config.chart.dropShadow.enabled&&b&&_.dropShadow(Y,k.config.chart.dropShadow,e),m&&(Y.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,Y)),Y.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,Y)),Y.node.addEventListener("mousedown",this.pathMouseDown.bind(this,Y))),Y.attr({pathTo:s,pathFrom:i});const W={el:Y,j:t,realIndex:e,pathFrom:i,pathTo:s,pathToInterp:a,fill:c,strokeWidth:n,delay:d,scrollMorph:w};if(!D||k.globals.resized||k.globals.dataChanged)!k.globals.resized&&k.globals.dataChanged||B||M.showDelayedElements();else if(I){const i=2*p,s="none"===r||0===n,a=k.seriesData.series.length,o=!!k.globals.comboCharts||e===a-1;M.animateDraw(Y,{realIndex:e,j:t,isFill:s,isLast:o,speed:i,delay:0,mask:y})}else B||M.animatePathsGradually(l(o({},W),{speed:p}));return E&&!B&&(k.globals.dataChanged&&L||F)&&M.animatePathsGradually(l(o({},W),{speed:u})),B&&M.revealBulk(Y),Y}drawPattern(t,e,i,s="#a8a8a8",a=0){return this.w.dom.Paper.pattern(e,i,r=>{"horizontalLines"===t?r.line(0,0,i,0).stroke({color:s,width:a+1}):"verticalLines"===t?r.line(0,0,0,e).stroke({color:s,width:a+1}):"slantedLines"===t?r.line(0,0,e,i).stroke({color:s,width:a}):"squares"===t?r.rect(e,i).fill("none").stroke({color:s,width:a}):"circles"===t&&r.circle(e).fill("none").stroke({color:s,width:a})})}drawGradient(t,e,i,s,a,r=null,n=null,o=[],l=0,h=!1){const c=this.w;let d;e.length<9&&0===e.indexOf("#")&&(e=v.hexToRgba(e,s)),i.length<9&&0===i.indexOf("#")&&(i=v.hexToRgba(i,a));let p=0,u=1,g=1,f=null;null!==n&&(p=void 0!==n[0]?n[0]/100:0,u=void 0!==n[1]?n[1]/100:1,g=void 0!==n[2]?n[2]/100:1,f=void 0!==n[3]?n[3]/100:null);const x=!("donut"!==c.config.chart.type&&"pie"!==c.config.chart.type&&"polarArea"!==c.config.chart.type&&"bubble"!==c.config.chart.type);if(d=o&&0!==o.length?c.dom.Paper.gradient(x?"radial":"linear",t=>{(Array.isArray(o[l])?o[l]:Array.isArray(o[0])?o[0]||[]:o).forEach(e=>{t.stop(e.offset/100,e.color,e.opacity)})}):c.dom.Paper.gradient(x?"radial":"linear",t=>{t.stop(p,e,s),t.stop(u,i,a),t.stop(g,i,a),null!==f&&t.stop(f,e,s)}),x){const t=c.layout.gridWidth/2,e=c.layout.gridHeight/2;"bubble"!==c.config.chart.type?d.attr({gradientUnits:"userSpaceOnUse",cx:t,cy:e,r:r}):d.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else"vertical"===t?h?(d.attr({gradientUnits:"userSpaceOnUse"}),d.from(0,0).to(0,c.layout.gridHeight)):d.from(0,0).to(0,1):"diagonal"===t?d.from(0,0).to(1,1):"horizontal"===t?d.from(0,1).to(1,1):"diagonal2"===t&&d.from(1,0).to(0,1);return d}getTextBasedOnMaxWidth({text:t,maxWidth:e,fontSize:i,fontFamily:s}){const a=this.getTextRects(t,i,s,""),r=a.width/t.length,n=Math.floor(e/r);return e{for(let e=0;et.tspan(f))),m.attr({x:t,y:e,"text-anchor":s,"dominant-baseline":u,"font-size":a,"font-family":r,"font-weight":n,fill:l,class:"apexcharts-text "+d}),m.node.style.fontFamily=r,m.node.style.opacity=h,m}getMarkerPath(t,e,i,s){let a="";switch(i){case"cross":a=`M ${t-(s/=1.4)} ${e-s} L ${t+s} ${e+s} M ${t-s} ${e+s} L ${t+s} ${e-s}`;break;case"plus":a=`M ${t-(s/=1.12)} ${e} L ${t+s} ${e} M ${t} ${e-s} L ${t} ${e+s}`;break;case"star":case"sparkle":{let r=5;s*=1.15,"sparkle"===i&&(s/=1.1,r=4);const n=Math.PI/r;for(let i=0;i<=2*r;i++){const r=i*n,o=i%2==0?s:s/2;a+=(0===i?"M":"L")+(t+o*Math.sin(r))+","+(e-o*Math.cos(r))}a+="Z";break}case"triangle":a=`M ${t} ${e-s} \n L ${t+s} ${e+s} \n L ${t-s} ${e+s} \n Z`;break;case"square":case"rect":a=`M ${t-(s/=1.125)} ${e-s} \n L ${t+s} ${e-s} \n L ${t+s} ${e+s} \n L ${t-s} ${e+s} \n Z`;break;case"diamond":a=`M ${t} ${e-(s*=1.05)} \n L ${t+s} ${e} \n L ${t} ${e+s} \n L ${t-s} ${e} \n Z`;break;case"line":a=`M ${t-(s/=1.1)} ${e} \n L ${t+s} ${e}`;break;default:a=`M ${t}, ${e} \n m -${(s*=2)/2}, 0 \n a ${s/2},${s/2} 0 1,0 ${s},0 \n a ${s/2},${s/2} 0 1,0 -${s},0`}return a}drawMarkerShape(t,e,i,s,a){const r=this.drawPath({d:this.getMarkerPath(t,e,i,s),stroke:a.pointStrokeColor,strokeDashArray:a.pointStrokeDashArray,strokeWidth:a.pointStrokeWidth,fill:a.pointFillColor,fillOpacity:a.pointFillOpacity,strokeOpacity:a.pointStrokeOpacity});return r.attr({cx:t,cy:e,shape:a.shape,class:a.class?a.class:""}),r}drawMarker(t,e,i){t=t||0;let s=i.pSize||0;return v.isNumber(e)||(s=0,e=0),this.drawMarkerShape(t,e,null==i?void 0:i.shape,s,o(o({},i),"line"===i.shape||"plus"===i.shape||"cross"===i.shape?{pointStrokeColor:i.pointFillColor,pointStrokeOpacity:i.pointFillOpacity}:{}))}pathMouseEnter(t,e){var i,s;const a=this.w,r=new Mt(this.w),n=parseInt(null!=(i=t.node.getAttribute("index"))?i:"",10),o=parseInt(null!=(s=t.node.getAttribute("j"))?s:"",10);if(!(isNaN(n)||isNaN(o)||("function"==typeof a.config.chart.events.dataPointMouseEnter&&a.config.chart.events.dataPointMouseEnter(e,this.ctx,{seriesIndex:n,dataPointIndex:o,w:a}),It._fireEvent(a,"dataPointMouseEnter",[e,this.ctx,{seriesIndex:n,dataPointIndex:o,w:a}]),"none"!==a.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||Mt.hoverOutlineOwnsHoverState(a)||"none"===a.config.states.hover.filter.type||a.interact.isTouchDevice))){const e=a.config.states.hover.filter;r.applyFilter(t,n,e.type,e.value)}}pathMouseLeave(t,e){var i,s;const a=this.w,r=new Mt(this.w),n=parseInt(null!=(i=t.node.getAttribute("index"))?i:"",10),o=parseInt(null!=(s=t.node.getAttribute("j"))?s:"",10);isNaN(n)||isNaN(o)||("function"==typeof a.config.chart.events.dataPointMouseLeave&&a.config.chart.events.dataPointMouseLeave(e,this.ctx,{seriesIndex:n,dataPointIndex:o,w:a}),It._fireEvent(a,"dataPointMouseLeave",[e,this.ctx,{seriesIndex:n,dataPointIndex:o,w:a}]),"none"!==a.config.states.active.filter.type&&"true"===t.node.getAttribute("selected")||Mt.hoverOutlineOwnsHoverState(a)||"none"!==a.config.states.hover.filter.type&&r.getDefaultFilter(t,n))}_clearAllDataPointSelections(t,e){const i=this.w;i.interact.selectedDataPoints=[];const s=i.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),a=i.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),r=i=>{Array.prototype.forEach.call(i,i=>{i.node.setAttribute("selected","false"),t.getDefaultFilter(i,e)})};r(s),r(a)}_togglePointSelection(t,e,i,s){const a=this.w;if("true"===t.node.getAttribute("selected")){t.node.setAttribute("selected","false");const e=a.interact.selectedDataPoints[i].indexOf(s);return e>-1&&a.interact.selectedDataPoints[i].splice(e,1),"false"}return!a.config.states.active.allowMultipleDataPointsSelection&&a.interact.selectedDataPoints.length>0&&this._clearAllDataPointSelections(e,i),t.node.setAttribute("selected","true"),void 0===a.interact.selectedDataPoints[i]&&(a.interact.selectedDataPoints[i]=[]),a.interact.selectedDataPoints[i].push(s),"true"}_applyPointSelectionFilter(t,e,i,s){const a=this.w;if(!Mt.sliceOffsetOwnsActiveState(a))if("true"===s){const s=a.config.states.active.filter;if("none"!==s)e.applyFilter(t,i,s.type,s.value);else if("none"!==a.config.states.hover.filter&&!a.interact.isTouchDevice){const s=a.config.states.hover.filter;e.applyFilter(t,i,s.type,s.value)}}else if("none"!==a.config.states.active.filter.type)if("none"===a.config.states.hover.filter.type||a.interact.isTouchDevice)e.getDefaultFilter(t,i);else{const s=a.config.states.hover.filter;e.applyFilter(t,i,s.type,s.value)}}pathMouseDown(t,e){var i,s;const a=this.w,r=new Mt(this.w),n=parseInt(null!=(i=t.node.getAttribute("index"))?i:"",10),o=parseInt(null!=(s=t.node.getAttribute("j"))?s:"",10);if(isNaN(n)||isNaN(o))return;const l=a.config.chart.link;if(!!(!l||"function"!=typeof l.dimension&&!l.enabled)){const e=this._togglePointSelection(t,r,n,o);this._applyPointSelectionFilter(t,r,n,e)}"function"==typeof a.config.chart.events.dataPointSelection&&a.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:n,dataPointIndex:o,w:a}),e&&It._fireEvent(a,"dataPointSelection",[e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:n,dataPointIndex:o,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 i=null;t.node.addEventListener("mouseover",s=>{const a=It._findDelegateTarget(s.target,t.node,e);a&&a!==i&&(i&&i.instance&&this.pathMouseLeave(i.instance,s),i=a,a.instance&&this.pathMouseEnter(a.instance,s))}),t.node.addEventListener("mouseout",s=>{if(!i)return;(s.relatedTarget?It._findDelegateTarget(s.relatedTarget,t.node,e):null)!==i&&(i&&i.instance&&this.pathMouseLeave(i.instance,s),i=null)}),t.node.addEventListener("mousedown",i=>{const s=It._findDelegateTarget(i.target,t.node,e);s&&s.instance&&this.pathMouseDown(s.instance,i)})}static _fireEvent(t,e,i){const s=t.globals.events;if(!s||!Object.prototype.hasOwnProperty.call(s,e))return;const a=s[e];for(let t=0;t0&&t.getComputedTextLength()>=i/1.1)){for(let s=e.length-3;s>0;s-=3)if(t.getSubStringLength(0,s)<=i/1.1)return void(t.textContent=e.substring(0,s)+"...");t.textContent="."}}}class Rt{constructor(t){this.w=t,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(t){const e=this.w,i=e.config,s=parseInt(String(e.layout.gridWidth),10),a=parseInt(String(e.layout.gridHeight),10),r=s>a?s:a,n=t.image;let o=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=r+1,l=r):(o=t.width,l=t.height);const h=b.createElementNS($,"pattern");It.setAttrs(h,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});const c=b.createElementNS($,"image");h.appendChild(c);const p=d.isBrowser()?window.SVG:global.SVG;c.setAttributeNS(p.xlink,"href",n),It.setAttrs(c,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),c.style.opacity=t.opacity,e.dom.elDefs.node.appendChild(h)}getSeriesIndex(t){const e=this.w,i=e.config.chart.type;return("bar"===i||"rangeBar"===i)&&e.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.seriesData.series.length,this.seriesIndex}getSeriesAxisRange(t){var e,i,s;const a=this.w,r=null!=(i=null==(e=a.globals.seriesYAxisReverseMap)?void 0:e[t])?i:0;return{minY:v.isNumber(a.globals.minYArr[t])?a.globals.minYArr[t]:a.globals.minY,maxY:v.isNumber(a.globals.maxYArr[t])?a.globals.maxYArr[t]:a.globals.maxY,reversed:!!(null==(s=a.config.yaxis[r])?void 0:s.reversed)}}computeColorStops(t,e){const i=this.w,{threshold:s,colorAboveThreshold:a,colorBelowThreshold:r}=e,{minY:n,maxY:o}=t,l=o-n;let h=0===l?s>o?0:100:(o-s)/l*100;t.reversed&&(h=100-h),h=Math.max(0,Math.min(h,100));const c=Array.isArray(i.config.fill.opacity)?i.config.fill.opacity[this.seriesIndex]:i.config.fill.opacity,d={offset:h,color:a,opacity:c},p={offset:h,color:r,opacity:c};return t.reversed?[p,d]:[d,p]}fillPath(t){var e,i,s,a,r,n,o;const l=this.w;this.opts=t;const h=this.w.config;let c,d,p;this.seriesIndex=this.getSeriesIndex(t);const u=h.plotOptions.line.colors.colorAboveThreshold&&h.plotOptions.line.colors.colorBelowThreshold;let g=this.getFillColors()[this.seriesIndex];void 0!==l.seriesData.seriesColors[this.seriesIndex]&&(g=l.seriesData.seriesColors[this.seriesIndex]),"function"==typeof g&&(g=g({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:l}));const f=t.fillType?t.fillType:this.getFillType(this.seriesIndex);let x=Array.isArray(h.fill.opacity)?h.fill.opacity[this.seriesIndex]:h.fill.opacity;const m="gradient"===f||u;t.color&&(g=t.color);const b=l.config.series[this.seriesIndex];(null==(i=null==(e=null==b?void 0:b.data)?void 0:e[t.dataPointIndex])?void 0:i.fillColor)&&(g=null==(a=null==(s=null==b?void 0:b.data)?void 0:s[t.dataPointIndex])?void 0:a.fillColor),g||(g="#fff"),void 0!==t.opacity&&null!==t.opacity&&(x=t.opacity);let y=g;v.isCSSVariable(g)?y=v.applyOpacityToColor(g,x):-1===g.indexOf("rgb")?-1===g.indexOf("#")?y=g:g.length<9&&(y=v.hexToRgba(g,x)):g.indexOf("rgba")>-1?x=v.getOpacityFromRGBA(g):y=v.hexToRgba(v.rgb2hex(g),x);const w=v.isCSSVariable(g)?v.getThemeColor(g):g;if("pattern"===f&&(d=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:d,fillColor:w,defaultColor:y})),m){const e=h.fill.gradient.colorStops?[...h.fill.gradient.colorStops]:[];let i=null!=(o=null==(n=null==(r=t.fillConfig)?void 0:r.gradient)?void 0:n.type)?o:h.fill.gradient.type;u&&(e[this.seriesIndex]=this.computeColorStops(this.getSeriesAxisRange(this.seriesIndex),h.plotOptions.line.colors),i="vertical"),p=this.handleGradientFill({type:i,fillConfig:t.fillConfig,fillColor:w,fillOpacity:x,colorStops:e,i:this.seriesIndex,verticalUserSpace:u})}if("image"===f){const e=h.fill.image.src,i=t.patternID?t.patternID:"",s=`pattern${l.globals.cuid}${t.seriesNumber+1}${i}`;-1===this.patternIDs.indexOf(s)&&(this.clippedImgArea({opacity:x,image:Array.isArray(e)?t.seriesNumber-1&&(g=v.getOpacityFromRGBA(u));let f=void 0===l.gradient.opacityTo?i:Array.isArray(l.gradient.opacityTo)?l.gradient.opacityTo[r]:l.gradient.opacityTo;if(void 0===l.gradient.gradientToColors||0===l.gradient.gradientToColors.length)p="dark"===l.gradient.shade?d.shadeColor(-1*parseFloat(l.gradient.shadeIntensity),e.indexOf("rgb")>-1?v.rgb2hex(e):e):d.shadeColor(parseFloat(l.gradient.shadeIntensity),e.indexOf("rgb")>-1?v.rgb2hex(e):e);else if(l.gradient.gradientToColors[h.seriesNumber]){const t=l.gradient.gradientToColors[h.seriesNumber];p=t,t.indexOf("rgba")>-1&&(f=v.getOpacityFromRGBA(t))}else p=e;if(l.gradient.gradientFrom&&(u=l.gradient.gradientFrom),l.gradient.gradientTo&&(p=l.gradient.gradientTo),l.gradient.inverseColors){const t=u;u=p,p=t}return u.indexOf("rgb")>-1&&(u=v.rgb2hex(u)),p.indexOf("rgb")>-1&&(p=v.rgb2hex(p)),c.drawGradient(t,u,p,g,f,h.size,l.gradient.stops,a,r,n)}}const zt=["none","lighten","darken"];function Xt(t,e){const i=t&&t.renderer;return i&&i.kind&&"svg"!==i.kind?i:e}function Bt(t){var e,i,s,a;const r=t.config.fill&&t.config.fill.type,n=t=>"pattern"===t||"image"===t||"gradient"===t;if(Array.isArray(r)?r.some(n):n(r))return!0;const o=null==(i=null==(e=t.config.plotOptions)?void 0:e.line)?void 0:i.colors;if(o&&o.colorAboveThreshold&&o.colorBelowThreshold)return!0;if("heatmap"===t.config.chart.type&&"rect"!==((null==(a=null==(s=t.config.plotOptions)?void 0:s.heatmap)?void 0:a.shape)||"rect"))return!0;const l=t.config.states||{},h=l.hover&&l.hover.filter&&l.hover.filter.type,c=l.active&&l.active.filter&&l.active.filter.type;return!(!h||zt.includes(h))||!(!c||zt.includes(c))}class Nt{constructor(t,e){this.w=t,this.ctx=e,this._filters=new Mt(this.w),this._graphics=new It(this.w,this.ctx),this._seriesWrap=null,this._seriesWrapIndex=-1,this._batch=null}resetSeriesWrapCache(){this._seriesWrap=null,this._seriesWrapIndex=-1,this._batch=null}static markersAreInert(t){const e=t.config.chart.type;return!("line"!==e&&"area"!==e||t.globals.comboCharts||t.config.tooltip.intersect)}_shouldBatch(){var t,e,i,s,a;const r=this.w,n=r.config.markers,o=null!=(t=n.largeDatasetThreshold)?t:0;if(o<=0)return!1;if("canvas"===(null==(i=null==(e=this.ctx)?void 0:e.renderer)?void 0:i.kind))return!1;if(!Nt.markersAreInert(r))return!1;if(n.discrete&&n.discrete.length)return!1;if(n.onClick||n.onDblClick)return!1;if(null==(s=r.config.chart.events)?void 0:s.dataPointSelection)return!1;const l=r.seriesData.series;if(!Array.isArray(l)||!l.length)return!1;let h=!1;for(let t=0;t0||e&&n.showNullDataPoints)&&(l[t].length>o&&(h=!0))}return h}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.lengtht.config.markers.size);t.globals.markers.batched=this._shouldBatch()}plotChartMarkers({pointsPos:t,seriesIndex:e,j:i,pSize:s,alwaysDrawMarker:a=!1,isVirtualPoint:r=!1}){const n=this.w,o=e,l=t;let h=null;const c=new It(this.w),d=Xt(this.ctx,c),p=n.config.markers.discrete&&n.config.markers.discrete.length;if(Array.isArray(l.x))for(let t=0;t0:n.config.markers.size>0;if(n.globals.markers.batched&&(m||a)&&!p&&!r)this._batchPoint(e,g,l.x[t],l.y[t],{invalid:f,graphics:c,pSize:a?s:void 0,trackPoint:!a});else if(m||a||p){"canvas"===d.kind&&(void 0===n.globals.pointsArray[e]&&(n.globals.pointsArray[e]=[]),n.globals.pointsArray[e][g]=[l.x[t],l.y[t]]),f||(x+=` w${v.randomId()}`);const i=this.getMarkerConfig({cssClass:x,seriesIndex:e,dataPointIndex:g}),r=n.config.series[o];if(r.data[g]&&(r.data[g].fillColor&&(i.pointFillColor=r.data[g].fillColor),r.data[g].strokeColor&&(i.pointStrokeColor=r.data[g].strokeColor)),void 0!==s&&(i.pSize=s),(l.x[t]<-n.globals.markers.largestSize||l.x[t]>n.layout.gridWidth+n.globals.markers.largestSize||l.y[t]<-n.globals.markers.largestSize||l.y[t]>n.layout.gridHeight+n.globals.markers.largestSize)&&(i.pSize=0),!f){if((n.globals.markers.size[e]>0||a||p)&&!h){const t=!a&&!p;t&&this._seriesWrap&&this._seriesWrapIndex===e?h=this._seriesWrap:(h=d.group({class:t?"apexcharts-series-markers":""}),h.attr("clip-path",`url(#gridRectMarkerMask${n.globals.cuid})`),this.setupMarkerDelegation(h),t&&(this._seriesWrap=h,this._seriesWrapIndex=e))}u=d.drawMarker(l.x[t],l.y[t],i),u.attr("rel",g),u.attr("j",g),u.attr("index",e),u.node.setAttribute("default-marker-size",i.pSize),vt(u,l.x[t],n),this._filters.setSelectionFilter(u,e,g),h&&h.add(u)}}else void 0===n.globals.pointsArray[e]&&(n.globals.pointsArray[e]=[]),n.globals.pointsArray[e].push([l.x[t],l.y[t]])}return h}_batchPoint(t,e,i,s,{invalid:a,graphics:r,pSize:n,trackPoint:o}){const l=this.w;if(o&&(void 0===l.globals.pointsArray[t]&&(l.globals.pointsArray[t]=[]),l.globals.pointsArray[t][e]=[i,s]),a)return;this._batch&&this._batch.seriesIndex===t||(this._batch={seriesIndex:t,opts:this.getMarkerConfig({cssClass:"",seriesIndex:t}),sizes:new Map});const h=void 0===n?this._batch.opts.pSize:n;if(!(h>0))return;const c=l.globals.markers.largestSize;if(i<-c||i>l.layout.gridWidth+c||s<-c||s>l.layout.gridHeight+c)return;let d=this._batch.sizes.get(h);d||(d=[],this._batch.sizes.set(h,d)),d.push(r.getMarkerPath(i,s,this._batch.opts.shape,h))}flushBatch(t,e){const i=this._batch;if(this._batch=null,!i||i.seriesIndex!==e||!i.sizes.size)return[];const s=this.w,a=new It(this.w),r=i.opts,n="line"===r.shape||"plus"===r.shape||"cross"===r.shape,o=n?r.pointFillColor:r.pointStrokeColor,l=n?r.pointFillOpacity:r.pointStrokeOpacity,h=[];return i.sizes.forEach((i,n)=>{if(!i.length)return;const c=a.drawPath({d:i.join(" "),fill:r.pointFillColor,fillOpacity:r.pointFillOpacity,stroke:o,strokeOpacity:l,strokeWidth:r.pointStrokeWidth,strokeDashArray:r.pointStrokeDashArray});c.attr({class:"apexcharts-marker-batch"+(Nt.markersAreInert(s)?" no-pointer-events":""),"clip-path":`url(#gridRectMarkerMask${s.globals.cuid})`,shape:r.shape,index:e,"default-marker-size":n}),t.add(c),h.push(c)}),h}getMarkerConfig({cssClass:t,seriesIndex:e,dataPointIndex:i=null,radius:s=null,size:a=null,strokeWidth:r=null}){const n=this.w,o=this.getMarkerStyle(e);let l=null===a?n.globals.markers.size[e]:a;const h=n.config.markers;return null!==i&&h.discrete.length&&h.discrete.map(t=>{t.seriesIndex===e&&t.dataPointIndex===i&&(void 0!==t.strokeColor&&(o.pointStrokeColor=t.strokeColor),void 0!==t.fillColor&&(o.pointFillColor=t.fillColor),void 0!==t.size&&(l=t.size),void 0!==t.shape&&(o.pointShape=t.shape))}),{pSize:null===s?l:s,pRadius:null!==s?s:h.radius,pointStrokeWidth:null!==r?r:Array.isArray(h.strokeWidth)?h.strokeWidth[e]:h.strokeWidth,pointStrokeColor:o.pointStrokeColor,pointFillColor:o.pointFillColor,shape:o.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,i=".apexcharts-marker";this._graphics.setupEventDelegation(t,i),t.node.addEventListener("click",s=>{if(e.config.markers.onClick){It._findDelegateTarget(s.target,t.node,i)&&e.config.markers.onClick(s)}}),t.node.addEventListener("dblclick",s=>{if(e.config.markers.onDblClick){It._findDelegateTarget(s.target,t.node,i)&&e.config.markers.onDblClick(s)}}),t.node.addEventListener("touchstart",e=>{const s=It._findDelegateTarget(e.target,t.node,i);s&&s.instance&&this._graphics.pathMouseDown(s.instance,e)},{passive:!0})}getMarkerStyle(t){const e=this.w,i=e.globals.markers.colors,s=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(s)?s[t]:s,pointFillColor:Array.isArray(i)?i[t]:i}}}class Ot{constructor(t,e){this.ctx=e,this.w=t,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new Ct(this.w),this.filters=new Mt(this.w),this.fill=new Rt(this.w),this.markers=new Nt(this.w,this.ctx),this.graphics=new It(this.w),this._elPointsWrap=null,this._elPointsWrapParent=null,this._perSeries=null}draw(t,e,i){const s=this.w,a=this.graphics,r=Xt(this.ctx,a),n=i.realIndex,o=i.pointsPos,l=i.zRatio,h=i.elParent;let c=this._elPointsWrap;if(c&&this._elPointsWrapParent===h||(c=r.group({class:`apexcharts-series-markers apexcharts-series-${s.config.chart.type}`}),c.attr("clip-path",`url(#gridRectMarkerMask${s.globals.cuid})`),this.markers.setupMarkerDelegation(c),h.add(c),this._elPointsWrap=c,this._elPointsWrapParent=h,this._perSeries=this._buildPerSeriesCache(n,r)),Array.isArray(o.x))for(let t=0;tt.maxBubbleRadius&&(h=t.maxBubbleRadius)}const d=o.x[t],p=o.y[t];if(h=h||0,null!==p&&void 0!==s.seriesData.series[n][i]||(a=!1),a){const t=this.drawPoint(d,p,h,n,i,e);c.add(t),"canvas"===r.kind&&(void 0===s.globals.pointsArray[n]&&(s.globals.pointsArray[n]=[]),s.globals.pointsArray[n][i]=[d,p])}}}_buildPerSeriesCache(t,e){var i;const s=this.w;return{realIndex:t,emit:e,isBubble:"bubble"===s.config.chart.type||s.globals.comboCharts&&s.config.series[t]&&"bubble"===s.config.series[t].type,canCacheConfig:!s.config.markers.discrete.length,markerConfig:null,fillCacheable:void 0,fillCircle:void 0,dropShadowEnabled:s.config.chart.dropShadow.enabled,doInitialAnim:this.initialAnim&&!s.globals.dataChanged&&!s.globals.resized,jitter:null==(i=s.config.plotOptions.scatter)?void 0:i.jitter,anim:null}}drawPoint(t,e,i,s,a,r){var n;const o=this.w,l=s,h=this.anim,c=this.filters,d=this.fill,p=this.markers;let u=this._perSeries;u&&u.realIndex===s||(u=this._perSeries=this._buildPerSeriesCache(s,Xt(this.ctx,this.graphics)));const g=u.emit;let f;u.canCacheConfig?(u.markerConfig||(u.markerConfig=p.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:u.isBubble?i:null})),f=u.markerConfig,u.isBubble&&(f.pSize=i,f.pRadius=i)):f=p.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:u.isBubble?i:null});const x=o.config.series[l].data[a];let m;void 0!==u.fillCircle?m=u.fillCircle:(m=d.fillPath({seriesNumber:s,dataPointIndex:a,color:f.pointFillColor,patternUnits:"objectBoundingBox",value:o.seriesData.series[s][r]}),void 0===u.fillCacheable&&(u.fillCacheable=u.canCacheConfig&&"solid"===d.getFillType(s)&&"string"==typeof f.pointFillColor&&!!f.pointFillColor),u.fillCacheable&&!(null==x?void 0:x.fillColor)&&(u.fillCircle=m));const b=g.drawMarker(t,e,f);(null==x?void 0:x.fillColor)&&(m=x.fillColor);const y=u.jitter;if((null==y?void 0:y.enabled)&&y.distributed&&o.globals.colors.length){const t=Math.round(null==(n=o.seriesData.seriesX[s])?void 0:n[a]);isNaN(t)||(m=o.globals.colors[t%o.globals.colors.length])}if(b.attr({fill:m}),u.dropShadowEnabled){const t=o.config.chart.dropShadow;c.dropShadow(b,t,s)}if(u.doInitialAnim){if(!u.anim){const t=o.config.chart.animations,e=o.globals.dataPoints||1,i=t.animateGradually,s=i&&!1!==i.enabled;u.anim={popSpeed:t.speed,baseDelay:s?Math.min(20,.5*t.speed/Math.max(1,e)):0}}const t=St({style:u.anim.baseDelay>0?"sequential":"none",index:a,baseDelay:u.anim.baseDelay});h.animatePop(b,{speed:u.anim.popSpeed,delay:t,onComplete:()=>h.animationCompleted(b)})}else o.globals.animationEnded=!0;return b.attr({rel:a,j:a,index:s,"default-marker-size":f.pSize}),c.setSelectionFilter(b,s,a),b}centerTextInBubble(t){const e=this.w;return{y:t+=parseInt(e.config.dataLabels.style.fontSize,10)/4}}}const Yt=(t,e,i,s)=>{if("function"!=typeof t)return t;const a=t({series:e.seriesData.series,seriesIndex:i,dataPointIndex:s,w:e});return Number.isFinite(a)?a:0};class Wt{constructor(t,e=null){this.w=t,this.ctx=e}dataLabelsCorrection(t,e,i,s,a,r,n){const o=this.w;let l=!1;const h=new It(this.w).getTextRects(i,n),c=h.width,d=h.height;e<0&&(e=0),e>o.layout.gridHeight+d&&(e=o.layout.gridHeight+d/2),void 0===o.globals.dataLabelsRects[s]&&(o.globals.dataLabelsRects[s]=[]),o.globals.dataLabelsRects[s].push({x:t,y:e,width:c,height:d});const p=o.globals.dataLabelsRects[s].length-2,u=void 0!==o.globals.lastDrawnDataLabelsIndexes[s]?o.globals.lastDrawnDataLabelsIndexes[s][o.globals.lastDrawnDataLabelsIndexes[s].length-1]:0;if(void 0!==o.globals.dataLabelsRects[s][p]){const i=o.globals.dataLabelsRects[s][u];(t>i.x+i.width||e>i.y+i.height||e+dn.config.dataLabels.formatter(t,{seriesIndex:i,dataPointIndex:d,w:n});if("bubble"===n.config.chart.type){s=n.seriesData.seriesZ[i][d],r=l(s),c=e.y[o];c=new Ot(this.w,this.ctx).centerTextInBubble(c).y}else void 0!==s&&(r=l(s));let u=n.config.dataLabels.textAnchor;n.globals.isSlopeChart&&(u=0===d?"end":d===n.config.series[i].data.length-1?"start":"middle"),this.plotDataLabelsText({x:h,y:c,text:r,i:i,j:d,parent:p,offsetCorrection:!0,dataLabelsConfig:n.config.dataLabels,textAnchor:u})}return p}plotDataLabelsText(t){const e=this.w,i=new It(this.w);let{x:s,y:a,i:r,j:n,text:o,textAnchor:l,fontSize:h,parent:c,dataLabelsConfig:d,color:p,alwaysDrawDataLabel:u,offsetCorrection:g,className:f,seriesIndex:x=r,dataPointIndex:m=n}=t,b=null;if(!Tt(e,"dataLabels.enabledOnSeries",r,!Array.isArray(e.config.dataLabels.enabledOnSeries)||e.config.dataLabels.enabledOnSeries.indexOf(r)>=0))return b;let y={x:s,y:a,drawnextLabel:!0,textRects:null};if(g&&(y=this.dataLabelsCorrection(s,a,o,r,n,u,parseInt(d.style.fontSize,10).toString())),e.interact.zoomed||(s=y.x,a=y.y),y.textRects){const t=e.globals.barPadForNumericAxis||0;(s<-(t+20)-y.textRects.width||s>e.layout.gridWidth+y.textRects.width+t+30)&&(o="")}let w=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(w=e.globals.dataLabels.style.colors[n]),"function"==typeof w&&(w=w({series:e.seriesData.series,seriesIndex:r,dataPointIndex:n,w:e})),p&&(w=p);const v="bar"===e.config.chart.type||"rangeBar"===e.config.chart.type,A=v?0:Yt(d.offsetX,e,x,m);let S=A;const C=v?0:Yt(d.offsetY,e,x,m);if(e.globals.isSlopeChart&&(0!==n&&(S=-2*A+5),0!==n&&n!==e.config.series[r].data.length-1&&(S=0)),y.drawnextLabel){if("middle"===l&&s===e.layout.gridWidth&&(l="end"),b=i.drawText({x:s+S,y:a+C,foreColor:w,textAnchor:l||d.textAnchor,text:o,fontSize:h||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"}),b.attr({class:f||"apexcharts-datalabel",cx:s,cy:a}),d.dropShadow.enabled){const t=d.dropShadow;new Mt(this.w).dropShadow(b,t)}c.add(b),vt(b,s,e),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(n)}return b}addBackgroundToDataLabel(t,e){const i=this.w,s=i.config.dataLabels.background,a=s.padding,r=s.padding/2,n=e.width,o=e.height,l=new It(this.w).drawRect(e.x-a,e.y-r/2,n+2*a,o+r,s.borderRadius,"transparent"!==i.config.chart.background&&i.config.chart.background?i.config.chart.background:"#fff",s.opacity,s.borderWidth,s.borderColor);if(s.dropShadow.enabled){new Mt(this.w).dropShadow(l,s.dropShadow)}return l}dataLabelsBackground(){var t;const e=this.w;if("bubble"===e.config.chart.type)return;const i=e.dom.baseEl.querySelectorAll(".apexcharts-datalabels text");for(let s=0;s0?(i=e[s].position,h=e[s].value):"datetime"===o.config.xaxis.type&&void 0===d&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();const g=new It(this.w);let f={};f=o.layout.rotateXLabels&&n?g.getTextRects(h,parseInt(r,10).toString(),null,`rotate(${o.config.xaxis.labels.rotate} 0 0)`,!1):g.getTextRects(h,parseInt(r,10).toString());const x=!o.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(h)&&("NaN"===String(h)||a.indexOf(h)>=0&&x)&&(h=""),{x:i,text:h,textRect:f}}checkLabelBasedOnTickamount(t,e,i){const s=this.w;let a=s.config.xaxis.tickAmount;if("dataPoints"===a&&(a=Math.round(s.layout.gridWidth/120)),a>i)return e;return t%Math.round(i/(a+1))===0||(e.text=""),e}checkForOverflowingLabels(t,e,i,s,a){const r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&s.length>0){const t=a[a.length-1];if(r.config.xaxis.labels.trim&&"datetime"!==r.config.xaxis.type)return e;e.x-1===e.collapsedSeriesIndices.indexOf(t))}translateYAxisIndex(t){const e=this.w,i=e.globals,s=e.config.yaxis;return e.seriesData.series.length>s.length||s.some(t=>Array.isArray(t.seriesName))?t:i.seriesYAxisReverseMap[t]}isYAxisHidden(t){const e=this.w,i=e.config.yaxis[t];if(!i.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!i.showForNullSeries){const i=e.globals.seriesYAxisMap[t],s=new H(this.w);return i.every(t=>s.isSeriesNull(t))}return!1}getYAxisForeColor(t,e){var i;const s=this.w;return Array.isArray(t)&&s.globals.yAxisScale[e]&&(null==(i=this.theme)||i.pushExtraColors(t,s.globals.yAxisScale[e].result.length,!1)),t}drawYAxisTicks(t,e,i,s,a,r,n){const o=this.w,l=new It(this.w);let h=o.layout.translateY+o.config.yaxis[a].labels.offsetY;if(o.globals.isBarHorizontal?h=0:"heatmap"===o.config.chart.type&&(h+=r/2),s.show&&e>0){!0===o.config.yaxis[a].opposite&&(t+=s.width);for(let a=e;a>=0;a--){const e=l.drawLine(t+i.offsetX-s.width+s.offsetX,h+s.offsetY,t+i.offsetX+s.offsetX,h+s.offsetY,s.color);n.add(e),h+=r}}}}class jt{constructor(t,e,i){this.w=t,this.ctx=e,this.elgrid=i,this.axesUtils=new $t(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 It(this.w),i=e.group({class:"apexcharts-xaxis",transform:`translate(${t.config.xaxis.offsetX}, ${t.config.xaxis.offsetY})`}),s=e.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${t.layout.translateXAxisX}, ${t.layout.translateXAxisY})`});i.add(s);let a=[];for(let t=0;te),t.labelData.hasXaxisGroups){const i=t.labelData.groups;a=[];for(let t=0;ti[t].cols*e,r)}if(void 0!==t.config.xaxis.title.text){const s=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});s.add(a),i.add(s)}if(t.config.xaxis.axisBorder.show){const s=t.globals.barPadForNumericAxis,a=e.drawLine(t.globals.padHorizontal+t.config.xaxis.axisBorder.offsetX-s,this.offY,this.xaxisBorderWidth+s,this.offY,t.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(a):i.add(a)}return i}drawXAxisLabelAndGroup(t,e,i,s,a,r,n={}){var o,l;const h=[],c=[],d=this.w,p=n.xaxisFontSize||this.xaxisFontSize,u=n.xaxisFontFamily||this.xaxisFontFamily,g=n.xaxisForeColors||this.xaxisForeColors,f=n.fontWeight||d.config.xaxis.labels.style.fontWeight,x=n.cssClass||d.config.xaxis.labels.style.cssClass;let m,y=d.globals.padHorizontal;const w=s.length;let v="category"===d.config.xaxis.type?d.globals.dataPoints:w;if(0===v&&w>v&&(v=w),a){const t=Math.max(Number(d.config.xaxis.tickAmount)||1,v>1?v-1:v);m=d.layout.gridWidth/Math.min(t,w-1),y=y+r(0,m)/2+d.config.xaxis.labels.offsetX}else m=d.layout.gridWidth/v,y=y+r(0,m)+d.config.xaxis.labels.offsetX;for(let a=0;a<=w-1;a++){let n=y-r(a,m)/2+d.config.xaxis.labels.offsetX;0===a&&1===w&&m/2===y&&1===v&&(n=d.layout.gridWidth/2);let A=this.axesUtils.getLabel(s,d.labelData.timescaleLabels,n,a,h,p,t),S=28;d.layout.rotateXLabels&&t&&(S=22),d.config.xaxis.title.text&&"top"===d.config.xaxis.position&&(S+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(S=S+parseFloat(p)+(d.layout.xAxisLabelsHeight-d.layout.xAxisGroupLabelsHeight)+(d.layout.rotateXLabels?10:0));A=void 0!==d.config.xaxis.tickAmount&&"dataPoints"!==d.config.xaxis.tickAmount&&"datetime"!==d.config.xaxis.type?this.axesUtils.checkLabelBasedOnTickamount(a,A,w):this.axesUtils.checkForOverflowingLabels(a,A,w,h,c);const C=()=>t&&d.config.xaxis.convertedCatToNumeric?g[d.globals.minX+a-1]:g[a],k=(null!=(l=null==(o=A.textRect)?void 0:o.width)?l:0)/2,_=A.x+k<0;if(d.config.xaxis.labels.show&&!_){const s=e.drawText({x:A.x,y:this.offY+d.config.xaxis.labels.offsetY+S-("top"===d.config.xaxis.position?d.layout.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:A.text,textAnchor:"middle",fontWeight:f,fontSize:p,fontFamily:u,foreColor:Array.isArray(g)?C():g,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+x});if(i.add(s),s.on("click",t=>{if("function"==typeof d.config.chart.events.xAxisLabelClick){const e=Object.assign({},d,{labelIndex:a});d.config.chart.events.xAxisLabelClick(t,this.ctx,e)}}),t){const t=b.createElementNS($,"title");t.textContent=Array.isArray(A.text)?A.text.join(" "):A.text,s.node.appendChild(t),""!==A.text&&(h.push(A.text),c.push(A))}}aArray.isArray(d)?d[s]:d;let u=0;Array.isArray(a)&&(u=a.length/2*parseInt(c.style.fontSize,10));let g=c.offsetX-15,f="end";this.yaxis.opposite&&(f="start"),"left"===e.config.yaxis[0].labels.align?(g=c.offsetX,f="start"):"center"===e.config.yaxis[0].labels.align?(g=c.offsetX,f="middle"):"right"===e.config.yaxis[0].labels.align&&(f="end");const x=i.drawText({x:g,y:l+o+c.offsetY-u,text:a,textAnchor:f,foreColor:p(),fontSize:c.style.fontSize,fontFamily:c.style.fontFamily,fontWeight:c.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+c.style.cssClass,maxWidth:c.maxWidth});r.add(x),x.on("click",t=>{if("function"==typeof e.config.chart.events.xAxisLabelClick){const i=Object.assign({},e,{labelIndex:s});e.config.chart.events.xAxisLabelClick(t,this.ctx,i)}});const m=b.createElementNS($,"title");if(m.textContent=Array.isArray(a)?a.join(" "):a,x.node.appendChild(m),0!==e.config.yaxis[t].labels.rotate){const s=i.rotateAroundCenter(x.node);x.node.setAttribute("transform",`rotate(${e.config.yaxis[t].labels.rotate} 0 ${s.y})`)}l+=o}if(void 0!==e.config.yaxis[0].title.text){const t=i.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+s+", 0)"}),r=i.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(r),a.add(t)}let d=0;this.isCategoryBarHorizontal&&e.config.yaxis[0].opposite&&(d=e.layout.gridWidth);const p=e.config.xaxis.axisBorder;if(p.show){const t=i.drawLine(e.globals.padHorizontal+p.offsetX+d,1+p.offsetY,e.globals.padHorizontal+p.offsetX+d,e.layout.gridHeight+p.offsetY,p.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,n.length,e.config.yaxis[0].axisBorder,e.config.yaxis[0].axisTicks,0,o,a),a}drawXaxisTicks(t,e,i){const s=this.w,a=t;if(t<0||t-2>s.layout.gridWidth)return;const r=this.offY+s.config.xaxis.axisTicks.offsetY;if(e=e+r+s.config.xaxis.axisTicks.height,"top"===s.config.xaxis.position&&(e=r-s.config.xaxis.axisTicks.height),s.config.xaxis.axisTicks.show){const n=new It(this.w).drawLine(t+s.config.xaxis.axisTicks.offsetX,r+s.config.xaxis.offsetY,a+s.config.xaxis.axisTicks.offsetX,e+s.config.xaxis.offsetY,s.config.xaxis.axisTicks.color);i.add(n),n.node.classList.add("apexcharts-xaxis-tick")}}getXAxisTicksPositions(){const t=this.w,e=[],i=this.xaxisLabels.length;let s=t.globals.padHorizontal;if(t.labelData.timescaleLabels.length>0)for(let t=0;t{a.placeTextWithEllipsis(t,t.textContent,s.layout.xAxisLabelsHeight-("bottom"===s.config.legend.position?20:10))})}else{const t=s.layout.gridWidth/(s.labelData.labels.length+1);for(let e=0;e{a.placeTextWithEllipsis(e,e.textContent,t)})}}if(o.length>0){const r=o[o.length-1].getBBox(),n=o[0].getBBox();r.x<-20&&(null==(t=o[o.length-1].parentNode)||t.removeChild(o[o.length-1])),n.x+n.width>s.layout.gridWidth&&!s.globals.isBarHorizontal&&(null==(e=o[0].parentNode)||e.removeChild(o[0]));for(let t=0;t0&&(this.xaxisLabels=t.labelData.timescaleLabels.slice())}drawGridArea(t=null){const e=this.w,i=new It(this.w);t||(t=i.group({class:"apexcharts-grid"}));const s=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.layout.gridHeight,"transparent"),a=i.drawLine(e.globals.padHorizontal,e.layout.gridHeight,e.layout.gridWidth,e.layout.gridHeight,"transparent");return t.add(a),t.add(s),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,i=new It(this.w),s=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,a=t=>{const e=b.createElementNS($,"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 r=0,n=0;(["bar","rangeBar","candlestick","boxPlot","violin"].includes(t.config.chart.type)||t.globals.comboBarCount>0)&&t.axisFlags.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.layout.gridPad.left,e.barPadForNumericAxis),n=Math.max(t.layout.gridPad.right,e.barPadForNumericAxis)),t.dom.elGridRect=i.drawRect(-s/2-2,-s/2-2,t.layout.gridWidth+s+4,t.layout.gridHeight+s+4,0,"#fff"),t.dom.elGridRectBar=i.drawRect(-s/2-r-2,-s/2-2,t.layout.gridWidth+s+n+r+4,t.layout.gridHeight+s+4,0,"#fff");const o=t.globals.markers.largestSize;t.dom.elGridRectMarker=i.drawRect(Math.min(-s/2-r-2,-o),-o,t.layout.gridWidth+Math.max(s+n+r+4,2*o),t.layout.gridHeight+2*o,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:i,x2:s,y2:a,xCount:r,parent:n}){const o=this.w;if(!(0===t&&o.globals.skipFirstTimelinelabel||t===r-1&&o.globals.skipLastTimelinelabel&&!o.config.xaxis.labels.formatter||"radar"===o.config.chart.type)){o.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:e,y1:i,x2:s,y2:a,xCount:r,parent:n});let l=0;if(o.labelData.hasXaxisGroups&&"between"===o.config.xaxis.tickPlacement){const e=o.labelData.groups;if(e){let i=0;for(let s=0;i{for(let o=0;os.layout.gridWidth||this._drawGridLines({i:o,x1:i,y1:a,x2:r,y2:n,xCount:t,parent:this.elgridLinesV})},r=({xC:e,x1:i,y1:a,x2:r,y2:n})=>{for(let o=0;o0&&"datetime"!==s.config.xaxis.type&&(o=a.yAxisScale[n].result.length-1)),this._drawXYLines({xCount:o,tickAmount:l})):(o=l,l=a.xTickAmount,this._drawInvertedXYLines({xCount:o,tickAmount:l})),this.drawGridBands(o,l),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:s.layout.gridWidth/o}}drawGridBands(t,e){var i,s,a,r,n;const o=this.w,l=(t,i,s,a,r,n)=>{for(let l=0,h=0;l=o.config.grid[t].colors.length&&(h=0),this._drawGridBandRect({c:h,x1:s,y1:a,x2:r,y2:n,type:t}),a+=o.layout.gridHeight/e};if((null==(i=o.config.grid.row.colors)?void 0:i.length)>0&&l("row",e,0,0,o.layout.gridWidth,o.layout.gridHeight/e),(null==(s=o.config.grid.column.colors)?void 0:s.length)>0){let e=o.globals.isBarHorizontal||"on"!==o.config.xaxis.tickPlacement||"category"!==o.config.xaxis.type&&!o.config.xaxis.convertedCatToNumeric?t:t-1;o.axisFlags.isXNumeric&&(e=(null!=(r=null==(a=o.globals.xAxisScale)?void 0:a.result.length)?r:1)-1);let i=o.globals.padHorizontal;const s=0;let l=o.globals.padHorizontal+o.layout.gridWidth/e;const h=o.layout.gridHeight;for(let a=0,r=0;a=o.config.grid.column.colors.length&&(r=0),"datetime"===o.config.xaxis.type&&(i=this.xaxisLabels[a].position,l=((null==(n=this.xaxisLabels[a+1])?void 0:n.position)||o.layout.gridWidth)-this.xaxisLabels[a].position),this._drawGridBandRect({c:r,x1:i,y1:s,x2:l,y2:h,type:"column"}),i+=o.layout.gridWidth/e}}}class Vt{constructor(t){this.w=t,this.coreUtils=new H(this.w)}niceScale(t,e,i=0){const s=1e-11,a=this.w,r=a.globals;let n,o,l,h;r.isBarHorizontal?(n=a.config.xaxis,o=Math.max((r.svgWidth-100)/25,2)):(n=a.config.yaxis[i],o=Math.max((r.svgHeight-100)/15,2)),v.isNumber(o)||(o=10),l=void 0!==n.min&&null!==n.min,h=void 0!==n.max&&null!==n.max;let c=void 0!==n.stepSize&&null!==n.stepSize,d=void 0!==n.tickAmount&&null!==n.tickAmount,p=d?n.tickAmount:O[Math.min(Math.round(o/2),O.length-1)];if(r.isMultipleYAxis&&!d&&r.multiAxisTickAmount>0&&(p=r.multiAxisTickAmount,d=!0),p="dataPoints"===p?r.dataPoints-1:Math.abs(Math.round(p)),(t===Number.MIN_VALUE&&0===e||!v.isNumber(t)&&!v.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=v.isNumber(n.min)?n.min:0,e=v.isNumber(n.max)?n.max:t+p,r.allSeriesCollapsed=!1),t>e){const i=e;e=t,t=i}else t===e&&(t=0===t?0:t-1,e=0===e?2:e+1);const u=[];p<1&&(p=1);let g=p,f=Math.abs(e-t);!l&&t>0&&t/f<.15&&(t=0,l=!0),!h&&e<0&&-e/f<.15&&(e=0,h=!0),f=Math.abs(e-t);let x=f/g,m=x;const b=Math.floor(Math.log10(m)),y=Math.pow(10,b);let w=Math.ceil(m/y);if(w=N[0===r.yValueDecimal?0:1][w],m=w*y,x=m,r.isBarHorizontal&&n.stepSize&&"datetime"!==n.type?(x=n.stepSize,c=!0):c&&(x=n.stepSize),c&&n.forceNiceScale){const t=Math.floor(Math.log10(x));x*=Math.pow(10,b-t)}if(l&&h){let t=f/g;if(d)if(c)if(0!=v.mod(f,x)){const e=v.getGCD(x,t);x=t/e<10?e:t}else 0==v.mod(x,t)?x=t:(t=x,d=!1);else x=t;else if(c)0==v.mod(f,x)?t=x:x=t;else if(0==v.mod(f,x))t=x;else{g=Math.ceil(f/x),t=f/g;const e=v.getGCD(f,x);f/eo&&(t=e-x*p,t+=x*Math.floor((i-t)/x))}else if(l)if(d)e=t+x*g;else{const i=e;e=x*Math.ceil(e/x),Math.abs(e-t)/v.getGCD(f,x)>o&&(e=t+x*p,e+=x*Math.ceil((i-e)/x))}}else if(r.isMultipleYAxis&&d){const i=x*Math.floor(t/x);let s=i+x*g;s0&&t16&&v.getPrimeFactors(g).length<2&&g++),!d&&n.forceNiceScale&&0===r.yValueDecimal&&g>f&&(g=f,x=Math.round(f/g)),g>o&&(!d&&!c||n.forceNiceScale)){const t=v.getPrimeFactors(g),e=t.length-1;let i=g;t:for(var A=0;A_);return{result:u,niceMin:u[0],niceMax:u[u.length-1]}}linearScale(t,e,i=10,s=0,a=void 0){const r=Math.abs(e-t);let n=[];if(t===e)return n=[t],{result:n,niceMin:n[0],niceMax:n[n.length-1]};"dataPoints"===(i=this._adjustTicksForSmallRange(i,s,r))&&(i=this.w.globals.dataPoints-1);const o=i;a||(a=r/o);if(0!==a&&isFinite(a)){const t=Math.floor(Math.log10(Math.abs(a))),e=Math.max(2,2-t),i=Math.pow(10,e);a=Math.round((a+Number.EPSILON)*i)/i}let l=i===Number.MAX_VALUE?5:o;i===Number.MAX_VALUE&&(a=1);let h=t;for(;l>=0;)n.push(h),h=v.preciseAddition(h,a),l-=1;return{result:n,niceMin:n[0],niceMax:n[n.length-1]}}_resolveLogTickAmount(t){let e=t.tickAmount;return"dataPoints"===e&&(e=this.w.globals.dataPoints-1),v.isNumber(e)&&e>=1?Number(e):null}_thinToTickAmount(t,e){if(null===e||!v.isNumber(e)||e<1)return t;const i=e+1;if(t.length<=i)return t;const s=t.length-1;let a=null;for(let t=1;t<=s;t++){if(s%t!==0)continue;const e=s/t+1;e>i||(null===a||e>a.count)&&(a={stride:t,count:e})}if(!a)return[t[0],t[t.length-1]];const r=[];for(let e=0;e=1,l=r.logarithmic&&(o||n>5);if(r.logarithmic&&!l&&(s.invalidLogScale=!0),l){s.allSeriesCollapsed=!1;const a=this._resolveLogTickAmount(r);s.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase,a):this.logarithmicScale(e,i,r.logBase,a)}else i!==-Number.MAX_VALUE&&v.isNumber(i)&&e!==Number.MAX_VALUE&&v.isNumber(e)?(s.allSeriesCollapsed=!1,s.yAxisScale[t]=this.niceScale(e,i,t)):s.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t)}setXScale(t,e){const i=this.w,s=i.globals;if(e!==-Number.MAX_VALUE&&v.isNumber(e)){const a=s.xTickAmount;s.xAxisScale=this.linearScale(t,e,a,0,void 0===i.config.xaxis.max?i.config.xaxis.stepSize:void 0)}else s.xAxisScale=this.linearScale(0,10,10);return s.xAxisScale}scaleMultipleYAxes(){const t=this.w.config,e=this.w.globals;this.coreUtils.setSeriesYAxisMappings();const i=e.seriesYAxisMap,s=e.minYArr,a=e.maxYArr,r=[],n=!e.isBarHorizontal;if(e.allSeriesCollapsed=!0,e.barGroups=[],i.forEach((i,o)=>{const l=[];if(i.forEach(e=>{var i;const s=null==(i=t.series[e])?void 0:i.group;l.indexOf(s)<0&&l.push(s)}),i.length>0){let h,c,d=Number.MAX_VALUE,p=-Number.MAX_VALUE,u=d,g=p;if(t.chart.stacked){const s=new Array(e.dataPoints).fill(0),a=[],r=[],n=[];l.forEach(()=>{a.push(s.map(()=>Number.MIN_VALUE)),r.push(s.map(()=>Number.MIN_VALUE)),n.push(s.map(()=>Number.MIN_VALUE))});for(let s=0;s{if(t.series[d].group===e)for(let t=0;t=0?r[i][t]+=e:n[i][t]+=e,a[i][t]+=e,u=Math.min(u,e),g=Math.max(g,e)}})),"bar"!==h&&"column"!==h||e.barGroups.push(c)}h||(h=t.chart.type),"bar"===h||"column"===h?l.forEach((t,e)=>{d=Math.min(d,Math.min.apply(null,n[e])),p=Math.max(p,Math.max.apply(null,r[e]))}):(l.forEach((t,e)=>{u=Math.min(u,Math.min.apply(null,a[e])),g=Math.max(g,Math.max.apply(null,a[e]))}),d=u,p=g),d===Number.MIN_VALUE&&p===Number.MIN_VALUE&&(p=-Number.MAX_VALUE)}else for(let t=0;ti.indexOf(t)===e);const f=t.yaxis[o];n&&!0===f.alignZero&&!f.logarithmic&&void 0===f.min&&void 0===f.max&&e.ignoreYAxisIndexes.indexOf(o)<0&&v.isNumber(d)&&v.isNumber(p)?r.push({ai:o,minY:d,maxY:p}):(this.setYScaleForIndex(o,d,p),i.forEach(t=>{s[t]=e.yAxisScale[o].niceMin,a[t]=e.yAxisScale[o].niceMax}))}else this.setYScaleForIndex(o,0,-Number.MAX_VALUE)}),r.length>=2){r.forEach(t=>{this.setYScaleForIndex(t.ai,t.minY,t.maxY),i[t.ai].forEach(i=>{s[i]=e.yAxisScale[t.ai].niceMin,a[i]=e.yAxisScale[t.ai].niceMax})});let t=0;r.forEach(i=>{const s=e.yAxisScale[i.ai],a=s.niceMax-s.niceMin;if(a>0){const e=-s.niceMin/a;e>t&&(t=e)}}),t>1&&(t=1),t<0&&(t=0);const n=t=>{if(t<=0)return 1;const e=Math.floor(Math.log10(t)),i=Math.pow(10,e),s=t/i;let a;return a=s<=1+1e-9?1:s<=2+1e-9?2:s<=2.5+1e-9?2.5:s<=5+1e-9?5:10,a*i};r.forEach(r=>{const o=e.yAxisScale[r.ai];if(!o.result||o.result.length<2)return;const l=o.niceMax-o.niceMin;if(l<=0)return;const h=-o.niceMin/l;if(Math.abs(h-t)<=1e-9)return;const c=ht&&t>1e-9;if(!c&&!d)return;const p=c?-t*o.niceMax/(1-t):o.niceMin,u=d?-o.niceMin*(1-t)/t:o.niceMax,g=u-p;if(g<=0)return;const f=Math.max(o.result.length,5),x=n(g/Math.max(f-1,1));if(x<=0)return;let m,b;if(c){m=Math.floor(p/x+1e-9)*x;const e=t>1e-9?m*(t-1)/t:o.niceMax,i=Math.max(e,o.niceMax);b=Math.ceil(i/x-1e-9)*x}else{b=Math.ceil(u/x-1e-9)*x;const e=t<1-1e-9?-t*b/(1-t):o.niceMin,i=Math.min(e,o.niceMin);m=Math.floor(i/x+1e-9)*x}o.result=[];for(let t=m;t<=b+1e-9*x;t=v.preciseAddition(t,x))o.result.push(v.stripNumber(t,7));o.niceMin=m,o.niceMax=b,i[r.ai].forEach(t=>{s[t]=o.niceMin,a[t]=o.niceMax})})}else if(1===r.length){const t=r[0];this.setYScaleForIndex(t.ai,t.minY,t.maxY),i[t.ai].forEach(i=>{s[i]=e.yAxisScale[t.ai].niceMin,a[i]=e.yAxisScale[t.ai].niceMax})}}}class Ut{constructor(t){this.w=t,this.scales=new Vt(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}_xPixelTolerance(t){const e=this.w.layout.gridWidth;if(!e||!t||!t.length)return 0;const i=this.w.config.xaxis,s="number"==typeof i.min?i.min:t[0],a="number"==typeof i.max?i.max:t[t.length-1];return a>s?(a-s)/e:0}_autoScaleYEnabled(){var t;const e=this.w.config,i=null==(t=this.w.globals.brushSource)?void 0:t.w.config.chart.brush;return!!(e.chart.zoom.enabled&&e.chart.zoom.autoScaleYaxis||(null==i?void 0:i.enabled)&&(null==i?void 0:i.autoScaleYaxis))}_autoScaleXBounds(t){const e=this.w.config.xaxis;if(!e.min&&!e.max)return null;const i=this._xPixelTolerance(this.w.seriesData.seriesX[t]);return{lo:e.min?e.min-i:-1/0,hi:e.max?e.max+i:1/0}}getMinYMaxY(t,e=Number.MAX_VALUE,i=-Number.MAX_VALUE,s=null){var a,r,n,o,l,h,c,d;const p=this.w.config,u=this.w.globals;let g=-Number.MAX_VALUE,f=Number.MIN_VALUE;null===s&&(s=t+1);const x=this.w.seriesData.series;let m=x,b=x;"candlestick"===p.chart.type?(m=this.w.candleData.seriesCandleL,b=this.w.candleData.seriesCandleH):"boxPlot"===p.chart.type?(m=this.w.candleData.seriesCandleO,b=this.w.candleData.seriesCandleC):"violin"===p.chart.type?(m=this.w.violinData.seriesViolinMin,b=this.w.violinData.seriesViolinMax):this.w.axisFlags.isRangeData&&(m=this.w.rangeData.seriesRangeStart,b=this.w.rangeData.seriesRangeEnd);let y=!1,w=!1;this.w.seriesData.seriesX.length>=s&&this._autoScaleYEnabled()&&!this._ignoreAutoScaleWindow&&(y=!0);for(let A=t;Avoid 0!==t).length),this.w.labelData.labels.length&&"datetime"!==p.xaxis.type&&0!==this.w.seriesData.series.reduce((t,e)=>t+e.length,0)&&(u.dataPoints=Math.max(u.dataPoints,this.w.labelData.labels.length));let s=0,S=x[A].length-1;if(y){const t=this.w.seriesData.seriesX[A],e=this._autoScaleXBounds(A);if(e&&p.xaxis.min)for(;ss&&t[S]>e.hi;S--);if(e&&t&&t.length){if(!(t[s]>=e.lo&&t[s]<=e.hi)){t[0]e.hi&&s>0?(S=s,s=S-1):(s=0,S=-1,w=!0)}}}if(m===x&&b===x&&"boxPlot"!==p.chart.type&&"candlestick"!==t&&"boxPlot"!==t&&"violin"!==t&&"rangeArea"!==t&&"rangeBar"!==t&&!(this.w.seriesData.seriesGoals[A]&&this.w.seriesData.seriesGoals[A].length)){const r=x[A],n=Math.min(S,r.length-1),o=null==(a=this.w.seriesData._parsedExtrema)?void 0:a[A];if(o&&o.ref===r&&o.len===r.length&&0===s&&n===r.length-1)o.maxY>g&&(g=o.maxY),o.lowestYu.yValueDecimal&&(u.yValueDecimal=o.yDec),o.hasNulls&&(u.hasNullValues=!0);else{let t=u.yValueDecimal,i=!1;for(let a=s;a<=n;a++){const s=r[a];if(null!==s&&"number"==typeof s&&s==s&&s!==1/0&&s!==-1/0){if(s>g&&(g=s),ss&&s<0&&(f=s),!Number.isInteger(s)){const e=s<0?-s:s;if(e>=1e-6&&e<1e21){const e=""+s,i=e.indexOf("."),a=-1===i?0:e.length-i-1;a>t&&(t=a)}else{const e=v.noExponents(s);v.isFloat(e)&&(t=Math.max(t,e.toString().split(".")[1].length))}}}else i=!0}u.yValueDecimal=t,i&&(u.hasNullValues=!0)}i=g,"bar"!==t&&"column"!==t||(f<0&&g<0&&(g=0,i=Math.max(i,0)),f===Number.MIN_VALUE&&(f=0,e=Math.min(e,0)));continue}for(let a=s;a<=S&&a{g=Math.max(g,t.value),e=Math.min(e,t.value)}),"boxPlot"===this.w.config.chart.type||"boxPlot"===t){const t=null==(h=null==(l=this.w.candleData.seriesBoxPoints)?void 0:l[A])?void 0:h[a];if(t)for(let i=0;i(null==(c=m[A])?void 0:c[a])&&(null==(d=m[A])?void 0:d[a])<0&&(f=m[A][a])}else u.hasNullValues=!0}"bar"!==t&&"column"!==t||(f<0&&g<0&&(g=0,i=Math.max(i,0)),f===Number.MIN_VALUE&&(f=0,e=Math.min(e,0)))}if("rangeBar"===p.chart.type&&this.w.rangeData.seriesRangeStart.length&&u.isBarHorizontal&&(f=e),"bar"===p.chart.type&&(f<0&&g<0&&(g=0),f===Number.MIN_VALUE&&(f=0)),w&&g===-Number.MAX_VALUE){this._ignoreAutoScaleWindow=!0;try{return this.getMinYMaxY(t,Number.MAX_VALUE,-Number.MAX_VALUE,s)}finally{this._ignoreAutoScaleWindow=!1}}return{minY:f,maxY:g,lowestY:e,highestY:i}}setYRange(){const t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;let i,s=Number.MAX_VALUE;if(t.isMultipleYAxis){s=Number.MAX_VALUE;for(let e=0;e{void 0!==e.max&&("number"==typeof e.max?t.maxYArr[i]=e.max:"function"==typeof e.max&&(t.maxYArr[i]=e.max(t.isMultipleYAxis?t.maxYArr[i]:t.maxY)),t.maxY=t.maxYArr[i]),void 0!==e.min&&("number"==typeof e.min?t.minYArr[i]=e.min:"function"==typeof e.min&&(t.minYArr[i]=e.min(t.isMultipleYAxis?t.minYArr[i]===Number.MIN_VALUE?0:t.minYArr[i]:t.minY)),t.minY=t.minYArr[i])}),t.isBarHorizontal){["min","max"].forEach(i=>{void 0!==e.xaxis[i]&&"number"==typeof e.xaxis[i]&&("min"===i?t.minY=e.xaxis[i]:t.maxY=e.xaxis[i])})}return t.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),t.minY=s):(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(i=>{const s=i;switch(s.type||e.chart.type){case"bar":case"column":t.barGroups.push(s.group);break;case"line":t.lineGroups.push(s.group);break;case"area":t.areaGroups.push(s.group)}}),t.barGroups=t.barGroups.filter((t,e,i)=>i.indexOf(t)===e),t.lineGroups=t.lineGroups.filter((t,e,i)=>i.indexOf(t)===e),t.areaGroups=t.areaGroups.filter((t,e,i)=>i.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,i="numeric"===e.xaxis.type||"datetime"===e.xaxis.type||"category"===e.xaxis.type&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric,s=()=>{var e;let i=t.minX,s=t.maxX;for(let t=0;ts&&(s=r.maxX),r.minXs&&(s=e),eArray.isArray(e)?e.reduce((t,e)=>Math.max(t,String(e).length),t):t,0),n=t.dataPoints*r*a*.6<=t.svgWidth;("numeric"===e.xaxis.type||i&&n)&&t.dataPoints<30&&(s=t.dataPoints-1),s>t.dataPoints&&0!==t.dataPoints&&(s=t.dataPoints-1)}else if("dataPoints"===e.xaxis.tickAmount){if(this.w.seriesData.series.length>1&&(s=this.w.seriesData.series[t.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){const e=Math.round(t.maxX-t.minX);e<30&&(s=e)}}else s=e.xaxis.tickAmount;if(t.xTickAmount=s,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 i=t.minX-1;i0&&(t.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,s-1,0,e.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());i&&(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(){var t;const e=this.w.globals;if(!this.w.axisFlags.isDataXYZ)return;for(let t=0;te.maxZ&&(e.maxZ=i.maxZ)}_handleSingleDataPoint(){const t=this.w.globals,e=this.w.config;if(t.minX===t.maxX){const i=new A(this.w);if("datetime"===e.xaxis.type){const s=i.getDate(t.minX);e.xaxis.labels.datetimeUTC?s.setUTCDate(s.getUTCDate()-2):s.setDate(s.getDate()-2),t.minX=new Date(s).getTime();const a=i.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,i)=>{var s;if(e.length){1===e.length&&e.push(this.w.seriesData.seriesX[t.maxValsInArrayIndex][this.w.seriesData.seriesX[t.maxValsInArrayIndex].length-1]);const a=null==(s=this.w.seriesData._parsedExtrema)?void 0:s[i];if(a&&a.xNumeric&&a.xSorted&&a.xref===e&&a.len===e.length)return a.minXDiff0)it-e),o.forEach((e,i)=>{if(i>0){const s=e-o[i-1];s>0&&(t.minXDiff=Math.min(s,t.minXDiff))}}),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}})}_setStackedMinMax(){const t=this.w.globals,e=this._autoScaleYEnabled();if(!this.w.seriesData.series.length)return;let i=this.w.labelData.seriesGroups;i.length||(i=[this.w.seriesData.seriesNames.map(t=>t)]);const s={},a={};i.forEach(i=>{s[i]=[],a[i]=[];this.w.config.series.map((t,e)=>i.indexOf(this.w.seriesData.seriesNames[e])>-1?e:null).filter(t=>null!==t).forEach(r=>{var n,o,l,h;const c=e?this._autoScaleXBounds(r):null,d=this.w.seriesData.seriesX[r],p=!!(c&&d&&d.length);for(let e=0;ec.hi))continue;void 0===s[i][e]&&(s[i][e]=0,a[i][e]=0);(this.w.config.chart.stacked&&!t.comboCharts||this.w.config.chart.stacked&&t.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null==(o=null==(n=this.w.config.series)?void 0:n[r])?void 0:o.type)||"column"===(null==(h=null==(l=this.w.config.series)?void 0:l[r])?void 0:h.type)))&&null!==this.w.seriesData.series[r][e]&&v.isNumber(this.w.seriesData.series[r][e])&&(this.w.seriesData.series[r][e]>0?s[i][e]+=parseFloat(String(this.w.seriesData.series[r][e]))+1e-4:a[i][e]+=parseFloat(String(this.w.seriesData.series[r][e])))}})}),Object.entries(s).forEach(([e])=>{s[e].forEach((i,r)=>{t.maxY=Math.max(t.maxY,s[e][r]),t.minY=Math.min(t.minY,a[e][r])})})}}function qt(){return{palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],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"]}}class Zt{constructor(t,{theme:e=null,timeScale:i=null}={},s){this.w=t,this.elgrid=s,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 $t(t,{theme:e,timeScale:i})}drawYaxis(t){const e=this.w,i=new It(this.w),s=e.config.yaxis[t].labels.style,{fontSize:a,fontFamily:r,fontWeight:n}=s,o=i.group({class:"apexcharts-yaxis",rel:t,transform:`translate(${e.globals.translateYAxisX[t]}, 0)`});if(this.axesUtils.isYAxisHidden(t))return o;const l=i.group({class:"apexcharts-yaxis-texts-g"});o.add(l);const h=e.globals.yAxisScale[t].result.length-1,c=e.layout.gridHeight/h,d=e.formatters.yLabelFormatters[t],p=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());let u=1;if("heatmap"===e.config.chart.type&&!e.config.yaxis[t].labels.formatter){const t=parseInt(a,10)||11,i=Math.max(1,Math.floor(e.layout.gridHeight/(1.4*t))),s=h+1;s>i&&(u=Math.ceil(s/i))}if(e.config.yaxis[t].labels.show){let o=e.layout.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?o=0:"heatmap"===e.config.chart.type&&(o-=c/2),o+=parseInt(a,10)/3;let g=null;for(let f=h;f>=0;f--){const h=u>1&&f%u!==0?"":d(p[f],f,e);let x=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&0!==e.config.yaxis.length&&(x*=-1);const m=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),b=this.axesUtils.getYAxisForeColor(s.colors,t),y=Array.isArray(b)?b[f]:b,w=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-label tspan`)).map(t=>t.textContent),v=i.drawText({x:x,y:o,text:w.includes(h)&&!e.config.yaxis[t].labels.showDuplicates?"":h,textAnchor:m,fontSize:a,fontFamily:r,fontWeight:n,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:y,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${s.cssClass}`});l.add(v),this.addTooltip(v,h),null===g&&(g=v),0!==e.config.yaxis[t].labels.rotate&&this.rotateLabel(i,v,g,e.config.yaxis[t].labels.rotate),o+=c}}return this.addYAxisTitle(i,o,t),this.addAxisBorder(i,o,t,h,c),o}getTextAnchor(t,e){return"left"===t?"start":"center"===t?"middle":"right"===t?"end":e?"start":"end"}addTooltip(t,e){const i=b.createElementNS($,"title");i.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(i)}rotateLabel(t,e,i,s){const a=t.rotateAroundCenter(i.node),r=t.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(${s} ${a.x} ${r.y})`)}addYAxisTitle(t,e,i){const s=this.w;if(void 0!==s.config.yaxis[i].title.text){const a=t.group({class:"apexcharts-yaxis-title"}),r=s.config.yaxis[i].opposite?s.globals.translateYAxisX[i]:0,n=t.drawText({x:r,y:s.layout.gridHeight/2+s.layout.translateY+s.config.yaxis[i].title.offsetY,text:s.config.yaxis[i].title.text,textAnchor:"end",foreColor:s.config.yaxis[i].title.style.color,fontSize:s.config.yaxis[i].title.style.fontSize,fontWeight:s.config.yaxis[i].title.style.fontWeight,fontFamily:s.config.yaxis[i].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text ${s.config.yaxis[i].title.style.cssClass}`});a.add(n),e.add(a)}}addAxisBorder(t,e,i,s,a){const r=this.w,n=r.config.yaxis[i].axisBorder;let o=31+n.offsetX;if(r.config.yaxis[i].opposite&&(o=-31-n.offsetX),n.show){const i=t.drawLine(o,r.layout.translateY+n.offsetY-2,o,r.layout.gridHeight+r.layout.translateY+n.offsetY+2,n.color,0,n.width);e.add(i)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,s,n,r.config.yaxis[i].axisTicks,i,a,e)}drawYaxisInversed(t){const e=this.w,i=new It(this.w),s=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),a=i.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${e.layout.translateXAxisX}, ${e.layout.translateXAxisY})`});s.add(a);let r=e.globals.yAxisScale[t].result.length-1;const n=e.layout.gridWidth/r+.1;let o=n+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(),r=h.length),e.config.xaxis.labels.show)for(let s=c.length?0:r;c.length?s=0;c.length?s++:s--){let r=null==l?void 0:l(h[s],s,e),d=e.layout.gridWidth+e.globals.padHorizontal-(o-n+e.config.xaxis.labels.offsetX);if(c.length){const t=this.axesUtils.getLabel(h,c,d,s,this.drawnLabels,this.xaxisFontSize);d=t.x,r=t.text,this.drawnLabels.push(t.text),0===s&&e.globals.skipFirstTimelinelabel&&(r=""),s===h.length-1&&e.globals.skipLastTimelinelabel&&(r="")}const p=i.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:r,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(p),this.addTooltip(p,r),o+=n}return this.inversedYAxisTitleText(s),this.inversedYAxisBorder(s),s}inversedYAxisBorder(t){const e=this.w,i=new It(this.w),s=e.config.xaxis.axisBorder;if(s.show){let a=0;"bar"===e.config.chart.type&&e.axisFlags.isXNumeric&&(a-=15);const r=i.drawLine(e.globals.padHorizontal+a+s.offsetX,this.xAxisoffX,e.layout.gridWidth,this.xAxisoffX,s.color,0,s.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}inversedYAxisTitleText(t){const e=this.w,i=new It(this.w);if(void 0!==e.config.xaxis.title.text){const s=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),a=i.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}`});s.add(a),t.add(s)}}yAxisTitleRotate(t,e){const i=this.w,s=new It(this.w),a=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),r=a?a.getBoundingClientRect():{width:0,height:0},n=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-title text`),o=n?n.getBoundingClientRect():{width:0,height:0};if(n){const a=this.xPaddingForYAxisTitle(t,r,o,e);n.setAttribute("x",String(a.xPos-(e?10:0)));const l=s.rotateAroundCenter(n);n.setAttribute("transform",`rotate(${e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate} ${l.x} ${l.y})`)}}xPaddingForYAxisTitle(t,e,i,s){const a=this.w;let r=0,n=10;return void 0===a.config.yaxis[t].title.text||t<0?{xPos:r,padd:0}:(s?r=e.width+a.config.yaxis[t].title.offsetX+i.width/2+n/2:(r=-1*e.width+a.config.yaxis[t].title.offsetX+n/2+i.width/2,a.globals.isBarHorizontal&&(n=25,r=-1*e.width-a.config.yaxis[t].title.offsetX-n)),{xPos:r,padd:n})}setYAxisXPosition(t,e){const i=this.w;let s=0,a=0,r=18,n=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach((o,l)=>{const h=i.globals.ignoreYAxisIndexes.includes(l)||!o.show||o.floating||0===t[l].width,c=t[l].width+e[l].width;o.opposite?i.globals.isBarHorizontal?(a=i.layout.gridWidth+i.layout.translateX-1,i.globals.translateYAxisX[l]=a-o.labels.offsetX):(a=i.layout.gridWidth+i.layout.translateX+n,h||(n+=c+20),i.globals.translateYAxisX[l]=a-o.labels.offsetX+20):(s=i.layout.translateX-r,h||(r+=c+20),i.globals.translateYAxisX[l]=s+o.labels.offsetX)})}setYAxisTextAlignments(){const t=this.w;t.config.yaxis.forEach((e,i)=>{if(e&&!e.floating&&void 0!==e.labels.align){const s=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-texts-g`);if(!s)return;const a=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-label`)),r=s.getBoundingClientRect();a.forEach(t=>{t.setAttribute("text-anchor",e.labels.align)}),"left"!==e.labels.align||e.opposite?"center"===e.labels.align?s.setAttribute("transform",`translate(${r.width/2*(e.opposite?1:-1)}, 0)`):"right"===e.labels.align&&e.opposite&&s.setAttribute("transform",`translate(${r.width}, 0)`):s.setAttribute("transform",`translate(-${r.width}, 0)`)}})}}class Kt{constructor(t,e){this.w=t,this.ctx=e,this.documentEvent=this.documentEvent.bind(this)}addEventListener(t,e){const i=this.w;Object.prototype.hasOwnProperty.call(i.globals.events,t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}removeEventListener(t,e){const i=this.w;if(!Object.prototype.hasOwnProperty.call(i.globals.events,t))return;const s=i.globals.events[t].indexOf(e);-1!==s&&i.globals.events[t].splice(s,1)}fireEvent(t,e){const i=this.w;if(!Object.prototype.hasOwnProperty.call(i.globals.events,t))return;e&&e.length||(e=[]);const s=i.globals.events[t],a=s.length;for(let t=0;t{null==i||i.addEventListener(s,i=>{const s=null===i.target.getAttribute("i")&&-1!==t.interact.capturedSeriesIndex?t.interact.capturedSeriesIndex:i.target.getAttribute("i"),a=null===i.target.getAttribute("j")&&-1!==t.interact.capturedDataPointIndex?t.interact.capturedDataPointIndex:i.target.getAttribute("j"),r=Object.assign({},t,{seriesIndex:t.globals.axisCharts?s:0,dataPointIndex:a});"keydown"===i.type?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&(e.ctx.keyboardNavigation&&e.ctx.keyboardNavigation.handleKey(i),"function"==typeof t.config.chart.events.keyDown&&t.config.chart.events.keyDown(i,e,r),e.ctx.events.fireEvent("keydown",[i,e,r])):"keyup"===i.type?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&("function"==typeof t.config.chart.events.keyUp&&t.config.chart.events.keyUp(i,e,r),e.ctx.events.fireEvent("keyup",[i,e,r])):"mousemove"===i.type||"touchmove"===i.type?"function"==typeof t.config.chart.events.mouseMove&&t.config.chart.events.mouseMove(i,e,r):"mouseleave"===i.type||"touchleave"===i.type?"function"==typeof t.config.chart.events.mouseLeave&&t.config.chart.events.mouseLeave(i,e,r):("mouseup"===i.type&&1===i.which||"touchend"===i.type)&&("function"==typeof t.config.chart.events.click&&t.config.chart.events.click(i,e,r),e.ctx.events.fireEvent("click",[i,e,r]))},{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,i=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"!==i&&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 Jt{constructor(t){this.w=t}setCurrentLocaleValues(t){let e=this.w.config.chart.locales;const i=d.getApex();i.chart&&i.chart.locales&&i.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(i.chart.locales));const s=e.filter(e=>e.name===t)[0];if(!s)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");{const t=v.extend(C,s);this.w.globals.locale=t.options}}}class Qt{constructor(t,e){this.w=t,this.ctx=e}drawAxis(t,e){const i=this.w.globals,s=this.w.config,a=new jt(this.w,this.ctx,e),r=new Zt(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},e);if(i.axisCharts&&"radar"!==t){let t,e;i.isBarHorizontal?(e=r.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),s.yaxis.map((t,s)=>{if(-1===i.ignoreYAxisIndexes.indexOf(s)&&(e=r.drawYaxis(s),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 te{constructor(t){this.w=t}drawXCrosshairs(){const t=this.w;t.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-xcrosshairs").forEach(t=>t.remove());const e=new It(this.w),i=new Mt(this.w),s=t.config.xaxis.crosshairs.fill.gradient,a=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,n=s.colorFrom,o=s.colorTo,l=s.opacityFrom,h=s.opacityTo,c=s.stops,d=a.enabled,p=a.left,u=a.top,g=a.blur,f=a.color,x=a.opacity;let m=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(m=e.drawGradient("vertical",n,o,l,h,null,c,[]));let s=1===t.config.xaxis.crosshairs.width?e.drawLine(0,0,0,0):e.drawRect(),a=t.layout.gridHeight;(!v.isNumber(a)||a<0)&&(a=0);let b=t.config.xaxis.crosshairs.width;(!v.isNumber(b)||Number(b)<0)&&(b=0),s.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:a,width:b,height:a,fill:m,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&&(s=i.dropShadow(s,{left:p,top:u,blur:g,color:f,opacity:x})),t.dom.elGraphical.add(s)}}drawYCrosshairs(){const t=this.w;t.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-ycrosshairs, :scope > .apexcharts-ycrosshairs-hidden").forEach(t=>t.remove());const e=new It(this.w),i=t.config.yaxis[0].crosshairs,s=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){const a=e.drawLine(-s,0,t.layout.gridWidth+s,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);a.attr({class:"apexcharts-ycrosshairs"}),t.dom.elGraphical.add(a)}const a=e.drawLine(-s,0,t.layout.gridWidth+s,0,i.stroke.color,0,0);a.attr({class:"apexcharts-ycrosshairs-hidden"}),t.dom.elGraphical.add(a)}}function ee(t,e){if(!v.isObject(t)||!v.isObject(e))return void 0!==e?e:t;const i=o({},t);for(const s of Object.keys(e)){const a=e[s];void 0!==a&&(v.isObject(a)&&v.isObject(t[s])?i[s]=ee(t[s],a):i[s]=a)}return i}class ie{constructor(t){this.w=t,this._activeBreakpoint=null}checkResponsiveConfig(t){const e=this.w,i=e.config;if(0===i.responsive.length)return;const s=i.responsive.slice();s.sort((t,e)=>t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0).reverse();const a=new X({}),r=(t={})=>{var i;const r=s[0].breakpoint,n=d.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(n>r){if(null!==this._activeBreakpoint){if(!e.globals.initialConfig)return;const i=v.clone(e.globals.initialConfig);i.series=v.clone(e.config.series);const s=H.extendArrayProps(a,i,e);t=v.extend(s,t),this.overrideResponsiveOptions(t),this._activeBreakpoint=null}}else for(let r=0;ree(t,i[e]))})}this.overrideResponsiveOptions(t),this._activeBreakpoint=s[r].breakpoint}};if(t){let i=H.extendArrayProps(a,t,e);i=v.extend(e.config,i),i=v.extend(i,t),r(i)}else r({})}overrideResponsiveOptions(t){const e=new X(t).init({responsiveOverride:!0});this.w.config=e}}const se=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function ae(t,e){const{ax:i,bx:s,ay:a,by:r}=e,n=[],o=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g;let l;for(;null!==(l=o.exec(t));){const t=l[1].toUpperCase(),e=(l[2].match(se)||[]).map(parseFloat);if("Z"===t){n.push("z");continue}if("H"===t){for(const t of e)n.push(`H ${i*t+s}`);continue}if("V"===t){for(const t of e)n.push(`V ${a*t+r}`);continue}if("A"===t){for(let t=0;t+6"C"===t[0]?[Number(t[5]),Number(t[6])]:[Number(t[1]),Number(t[2])]);for(const t of o)if(!isFinite(t[0])||!isFinite(t[1]))return null;return{body:a,closing:r,segType:n,anchors:o}}function ne(t,e,i){return[t[0]+(e[0]-t[0])*i,t[1]+(e[1]-t[1])*i]}function oe(t,e,i){const s=t,a=[e[1],e[2]],r=[e[3],e[4]],n=[e[5],e[6]],o=ne(s,a,i),l=ne(a,r,i),h=ne(r,n,i),c=ne(o,l,i),d=ne(l,h,i),p=ne(c,d,i);return{first:["C",o[0],o[1],c[0],c[1],p[0],p[1]],second:["C",d[0],d[1],h[0],h[1],n[0],n[1]],mid:p}}function le(t,e,i){const s=[e[1],e[2]],a=ne(t,s,i);return{first:["L",a[0],a[1]],second:["L",s[0],s[1]],mid:a}}function he(t,e){const{body:i,closing:s,segType:a,anchors:r}=t,n=r.length,o=e.length,l=t=>"C"===a?["C",t[0],t[1],t[0],t[1],t[0],t[1]]:["L",t[0],t[1]],h=[["M",r[0][0],r[0][1]]];let c=0;for(;ch.push(t.slice())),h}function ce(t,e,i,s,a,r){const n=re(t,s,r);if(!n)return null;const o=re(e,a,r);if(!o)return null;if(n.segType!==o.segType)return null;if((n.closing||o.closing)&&(!n.closing||!o.closing||n.closing[0][0]!==o.closing[0][0]))return null;const l=i.map(t=>t.oldJ),h=i.map(t=>t.newJ);return{from:Z(he(n,l)),toInterp:Z(he(o,h))}}function de(t){var e;const i=t.config.chart.animations;if(!i||!1===i.enabled)return!1;if(!i.dynamicAnimation||!1===i.dynamicAnimation.enabled)return!1;const s=null!=(e=i.largeDatasetThreshold)?e:0;return!(s>0&&t.globals.dataPoints>s)&&!!(d.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function pe(t,e,i){var s,a,r,n;if(null==(s=t.axisFlags)?void 0:s.isXNumeric){const s=null==(r=null==(a=t.seriesData)?void 0:a.seriesX)?void 0:r[e];if(s&&s.length&&null!=s[i])return"x:"+s[i]}const o=null==(n=t.globals.labels)?void 0:n[i];return null!=o&&""!==String(o)?"c:"+(Array.isArray(o)?o.join(" "):String(o)):"j:"+i}function ue(t){const e=new Map;return t.map(t=>{const i=e.get(t)||0;return e.set(t,i+1),0===i?t:`${t}#${i}`})}function ge(t,e,i=!1,s=!1){var a,r;if(!de(t))return null;const n=t.globals.prevStreamFrame;if(!n)return null;const o=null==(a=n.seriesY)?void 0:a[e],l=null==(r=t.seriesData.series)?void 0:r[e];if(!Array.isArray(o)||!Array.isArray(l))return null;if(!o.length||!l.length)return null;const h=ue(o.map((t,i)=>function(t,e,i){var s,a;if(t.isXNumeric){const a=null==(s=t.seriesX)?void 0:s[e];if(a&&a.length&&null!=a[i])return"x:"+a[i]}const r=null==(a=t.labels)?void 0:a[i];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+i}(n,e,i))),c=ue(l.map((i,s)=>pe(t,e,s))),d=function(t,e){const i=new Map;t.forEach((t,e)=>{i.has(t)||i.set(t,e)});const s=new Array(e.length),a=new Set;let r=-1,n=!0,o=t.length===e.length;e.forEach((t,e)=>{const l=i.has(t)&&!a.has(i.get(t))?i.get(t):-1;s[e]=l,-1!==l&&(a.add(l),l{if(t.globals.isDestroyed)return;const l=Math.max(0,Math.min(1,(o-r)/e));s(i(l),l),l<1?b.requestAnimationFrame(n):a&&a()};b.requestAnimationFrame(n)}function me(t,{elPointsMain:e,realIndex:i,speed:s}){var a,r,n,o;if(!(null==e?void 0:e.node))return!1;const l=ge(t,i,!0);if(!l)return!1;const h=t.globals.prevStreamFrame;if(!h)return!1;const c=null==(a=h.xPixels)?void 0:a[i],d=null==(r=h.yPixels)?void 0:r[i];if(!c||!d)return!1;const p=e.node.querySelectorAll(".apexcharts-marker");if(!p.length)return!1;const u=(null==(n=t.globals.seriesXvalues)?void 0:n[i])||[],g=(null==(o=t.globals.seriesYvalues)?void 0:o[i])||[],f=fe(t),x=Math.max(1,s||1);return e.node.classList.remove("apexcharts-element-hidden"),p.forEach(e=>{var s,a,r,n,o,p,m,b,y;const w=parseInt(null!=(a=null!=(s=e.getAttribute("j"))?s:e.getAttribute("rel"))?a:"",10);if(!isFinite(w)||w<0||w>=l.join.toOld.length)return;const v=l.join.toOld[w],A=null!=u[w]&&null!=g[w]?[u[w],g[w]]:null;if(-1===v||!A){const i=e.style;return i.opacity="0",void xe(t,x,f,t=>{i.opacity=String(t)},()=>{i.opacity=""})}const S=(null!=(r=c[v])?r:NaN)-A[0],C=(null!=(n=d[v])?n:NaN)-A[1];if(!isFinite(S)||!isFinite(C))return;const k=null!=(m=null==(p=null==(o=h.rPixels)?void 0:o[i])?void 0:p[v])?m:NaN,_=parseFloat(null!=(y=null!=(b=e.getAttribute("r"))?b:e.getAttribute("default-marker-size"))?y:""),M=isFinite(k)&&isFinite(_)&&_>0&&Math.abs(k-_)>.25;if(!(Math.abs(S)>=.5||Math.abs(C)>=.5)&&!M)return;const D=t=>{const i=S*(1-t),s=C*(1-t);if(M){const a=(k+(_-k)*t)/_;e.setAttribute("transform",`translate(${i+A[0]*(1-a)}, ${s+A[1]*(1-a)}) scale(${a})`)}else e.setAttribute("transform",`translate(${i}, ${s})`)};D(0),xe(t,x,f,D,()=>{e.removeAttribute("transform")})}),!0}function be(t,{type:e,realIndex:i,pathFromLine:s,pathFromArea:a,linePaths:r,areaPaths:n}){var o,l;const h=ge(t,i);if(!h)return null;const{join:c,oldKeys:d,newKeys:p}=h,u=t.globals.prevStreamFrame;if(!u)return null;const g=null==(o=u.seriesY)?void 0:o[i],f=null==(l=t.seriesData.series)?void 0:l[i];if(g.length<2||f.length<2)return null;if(g.some(t=>null===t)||f.some(t=>null===t))return null;const x=function(t,e){const i=new Set(t.exits),s=[];let a=0;for(let e=0;et&&t.d&&null!=t.key&&!o.has(t.key));if(!l.length)return;const h=new It(t),c=null==(n=t.globals.colors)?void 0:n[parseInt(String(i.realIndex),10)];l.forEach(i=>{let s=i.fill||c||"#c8c8c8";0===String(s).indexOf("url(")&&(s=c||"#c8c8c8");const n=h.drawPath({d:i.d,stroke:"none",strokeWidth:0,fill:s,fillOpacity:1,classes:"apexcharts-bar-ghost"}),o=n.node;o.setAttribute("pointer-events","none"),n.attr("clip-path",`url(#gridRectBarMask${t.globals.cuid})`),e.node.insertBefore(o,e.node.firstChild);const l=function(t){const e=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(t||"");if(!e)return null;const i=parseFloat(e[1]),s=parseFloat(e[2]);return isFinite(i)&&isFinite(s)?{x:i,y:s}:null}(i.d);let d=a?"left center":"center bottom";try{const t=o.getBBox();l&&t&&(d=a?Math.abs(l.x-t.x)<=Math.abs(l.x-(t.x+t.width))?"left center":"right center":Math.abs(l.y-(t.y+t.height))<=Math.abs(l.y-t.y)?"center bottom":"center top")}catch(t){}const p=o.style;p.transformBox="fill-box",p.transformOrigin=d;const u=Math.max(1,r||1),g=performance.now(),f=e=>{if(t.globals.isDestroyed||!o.parentNode)return;const i=Math.max(0,Math.min(1,(e-g)/u)),s=1-Math.pow(1-i,3),r=1-s;p.transform=a?`scaleX(${r})`:`scaleY(${r})`,p.opacity=String(1-s),i<1?b.requestAnimationFrame(f):o.parentNode.removeChild(o)};b.requestAnimationFrame(f)})}function we(t,e,i){return[...t.querySelectorAll(e)].map(t=>{var e,s,a;return{text:t.textContent||"",display:null!=(a=null!=(s=null==(e=t.querySelector("tspan"))?void 0:e.textContent)?s:t.textContent)?a:"",pos:parseFloat(t.getAttribute(i)||""),transform:t.getAttribute("transform")}})}function ve(t,e,i){return[...t.querySelectorAll(e)].map(t=>parseFloat(t.getAttribute(i)||""))}const Ae=":not(.apexcharts-tick-ghost)",Se=`.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)${Ae}`,Ce=`.apexcharts-yaxis-texts-g text${Ae}`,ke=`.apexcharts-gridlines-vertical line${Ae}`,_e=`.apexcharts-gridlines-horizontal line${Ae}`;function Me(t){var e,i;const s=t.globals;if(!(null==(e=t.axisFlags)?void 0:e.isXNumeric)||s.isBarHorizontal)return null;if(null==(i=t.config.xaxis)?void 0:i.reversed)return null;const a=s.minX,r=s.maxX,n=t.layout.gridWidth;return isFinite(a)&&isFinite(r)&&r>a&&n>0?{min:a,max:r,width:n}:null}function De(t,e){var i;const s=t.globals;if(s.isBarHorizontal)return null;if(!Array.isArray(t.config.yaxis)||1!==t.config.yaxis.length)return null;if(null==(i=t.config.yaxis[0])?void 0:i.logarithmic)return null;const a=s.minY,r=s.maxY;if(!(isFinite(a)&&isFinite(r)&&r>a))return null;const n=e.map(t=>t.pos).filter(t=>isFinite(t));return n.length<2?null:{min:a,max:r,pLo:Math.max(...n),pHi:Math.min(...n)}}function Le(t,e){if(!t||!e)return null;const i=t.pHi-t.pLo,s=e.pHi-e.pLo,a=t.max-t.min,r=e.max-e.min;if(!(i&&s&&a>0&&r>0))return null;return{toNew:n=>e.pLo+((e=>t.min+(e-t.pLo)/i*a)(n)-e.min)/r*s,toOld:n=>t.pLo+((t=>e.min+(t-e.pLo)/s*r)(n)-t.min)/a*i}}function Pe(t,e,i,s){const a=e.style;a.opacity="0",xe(t,i,s,t=>{a.opacity=String(t)},()=>{a.opacity=""})}function Fe(t,e,i,s,a,r,n){i.forEach(t=>e.setAttribute(t,String(s))),xe(t,r,n,t=>{const r=String(s+(a-s)*t);i.forEach(t=>e.setAttribute(t,r))},()=>{i.forEach(t=>e.setAttribute(t,String(a)))})}function Ee(t,{template:e,display:i,attrs:s,from:a,to:r,duration:n,ease:o}){const l=e.parentNode;if(!l)return;const h=e.cloneNode(!0);if(h.classList.add("apexcharts-tick-ghost"),h.setAttribute("pointer-events","none"),h.removeAttribute("id"),void 0!==i){const t=h.querySelector("tspan");t?t.textContent=i:h.textContent=i;const e=h.querySelector("title");e&&(e.textContent=i)}s.forEach(t=>h.setAttribute(t,String(a)));const c=h.style;c.opacity="1",l.appendChild(h),xe(t,n,o,t=>{const e=String(a+(r-a)*t);s.forEach(t=>h.setAttribute(t,e)),c.opacity=String(1-t)},()=>{h.parentNode&&h.parentNode.removeChild(h)})}function Te(t,{newLabels:e,oldLabels:i,posAttr:s,newLines:a,oldLines:r,lineAttrs:n,duration:h,ease:c,project:d}){const p=new Map;i.forEach((t,e)=>{p.has(t.text)||p.set(t.text,l(o({},t),{i:e}))});const u=new Set,g=a.length===e.length,f=r.length===i.length,x=i.map(t=>t.pos).concat(e.map(t=>parseFloat(t.getAttribute(s)||""))).filter(t=>isFinite(t)),m=Math.min(...x),b=Math.max(...x),y=Math.max(40,.25*(b-m)),w=t=>Math.max(m-y,Math.min(b+y,t)),v=(e,i)=>{if(!e)return;const s=parseFloat(e.getAttribute(n[0])||""),a=r[i.i];isFinite(s)&&isFinite(a)&&Fe(t,e,n,a,s,h,c)};if(e.forEach((e,i)=>{const r=parseFloat(e.getAttribute(s)||""),o=p.get(e.textContent||""),l=g?a[i]:null;o&&u.add(o.i);const f=e.getAttribute("transform");if(o&&isFinite(o.pos)){if(isFinite(r)&&!(Math.abs(o.pos-r)<.5)){if(f||o.transform){const i=o.pos-r;if(isFinite(i)){const a=f||"";xe(t,h,c,t=>{const r=i*(1-t),n="x"===s?`translate(${r} 0)`:`translate(0 ${r})`;e.setAttribute("transform",`${n} ${a}`.trim())},()=>{a?e.setAttribute("transform",a):e.removeAttribute("transform")})}return void v(l,o)}Fe(t,e,[s],o.pos,r,h,c),v(l,o)}}else if(!o){if(d&&isFinite(r)&&!f){const i=isFinite(d.toOld(r))?w(d.toOld(r)):NaN;isFinite(i)&&Math.abs(i-r)>.5&&(Fe(t,e,[s],i,r,h,c),l&&Fe(t,l,n,i,r,h,c))}Pe(t,e,h,c),l&&Pe(t,l,h,c)}}),!d||!e.length)return;let A=0;i.forEach((i,o)=>{if(u.has(o))return;if(!isFinite(i.pos)||i.transform)return;if(A>=20)return;const l=d.toNew(i.pos);!isFinite(l)||Math.abs(l-i.pos)<.5||(A++,Ee(t,{template:e[0],display:i.display,attrs:[s],from:i.pos,to:w(l),duration:h,ease:c}),f&&a.length&&isFinite(r[o])&&Ee(t,{template:a[0],attrs:n,from:r[o],to:w(d.toNew(r[o])),duration:h,ease:c}))})}function Ie(t){const e=t.globals,i=e.prevChromeFrame;if(e.prevChromeFrame=null,!i||!e.axisCharts||!d.isBrowser())return;if(!de(t))return;if(!(t.seriesData.series||[]).some((e,i)=>null!==ge(t,i,!0,!0)))return;const s=t.dom.baseEl;if(!v.elementExists(s))return;const a=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),r=fe(t);try{const e=[...s.querySelectorAll(Ce)],n=function(t,e){if(!t||!e)return null;const i=t.max-t.min,s=e.max-e.min;return i>0&&s>0&&t.width>0&&e.width>0?{toNew:a=>(t.min+a/t.width*i-e.min)/s*e.width,toOld:a=>(e.min+a/e.width*s-t.min)/i*t.width}:null}(i.xScale,Me(t)),o=Le(i.yAnchors,De(t,e.map(t=>({pos:parseFloat(t.getAttribute("y")||"")}))));Te(t,{newLabels:[...s.querySelectorAll(Se)],oldLabels:i.xLabels,posAttr:"x",newLines:[...s.querySelectorAll(ke)],oldLines:i.vGrid,lineAttrs:["x1","x2"],duration:a,ease:r,project:n}),Te(t,{newLabels:e,oldLabels:i.yLabels,posAttr:"y",newLines:[...s.querySelectorAll(_e)],oldLines:i.hGrid,lineAttrs:["y1","y2"],duration:a,ease:r,project:o})}catch(t){}}const Re=".apexcharts-data-labels[data\\:dlKey]",ze=".apexcharts-datalabel",Xe=".apexcharts-datalabel-total[data\\:dlTotalKey]";function Be(t){var e,i;const s=t.config.dataLabels;return!(!(null==(e=null==s?void 0:s.animate)?void 0:e.enabled)&&!(null==(i=null==s?void 0:s.countUp)?void 0:i.enabled))}function Ne(t){if(!isFinite(t))return 0;const e=String(Math.abs(t)),i=e.indexOf("e");if(-1!==i){const t=e.slice(0,i),s=parseInt(e.slice(i+1),10),a=t.indexOf("."),r=-1===a?0:t.length-a-1;return Math.min(6,Math.max(0,r-s))}const s=e.indexOf(".");return-1===s?0:Math.min(6,e.length-s-1)}function Oe(t,e){const i=t.querySelector("tspan");i?i.textContent=e:t.textContent=e}function Ye(t,{el:e,oldCx:i,oldCy:s,duration:a,ease:r,delay:n=0}){const o=e.hasAttribute("cx")?e:e.querySelector(ze);if(!o)return;const l=i-parseFloat(o.getAttribute("cx")||""),h=s-parseFloat(o.getAttribute("cy")||"");if(!isFinite(l)||!isFinite(h))return;if(Math.abs(l)+Math.abs(h)<=.5)return;const c=e.getAttribute("transform")||"",d=()=>xe(t,a,r,t=>{const i=1-t;e.setAttribute("transform",`translate(${l*i} ${h*i}) ${c}`.trim())},()=>{c?e.setAttribute("transform",c):e.removeAttribute("transform")});n>0?(e.setAttribute("transform",`translate(${l} ${h}) ${c}`.trim()),setTimeout(()=>{t.globals.isDestroyed||d()},n)):d()}function We(t,{el:e,from:i,to:s,formatter:a,fmtOpts:r,duration:n,ease:o,delay:l=0}){if(!isFinite(i)||!isFinite(s))return;if(Math.abs(s-i)<=1e-9)return;const h=Math.max(Ne(i),Ne(s)),c=t=>{const e=Number(t.toFixed(h));let i=e;if("function"==typeof a)try{i=a(e,r)}catch(t){i=e}return String(i)},d=()=>xe(t,n,o,t=>{Oe(e,c(i+(s-i)*t))},()=>{Oe(e,c(s))});l>0?(Oe(e,c(i)),setTimeout(()=>{t.globals.isDestroyed||d()},l)):d()}function He(t){var e,i;const s=t.globals,a=s.prevDataLabels;if(s.prevDataLabels=null,!a||!s.axisCharts||!d.isBrowser())return;if(!Be(t))return;if(!de(t))return;const r=t.dom.baseEl;if(!v.elementExists(r))return;const n=t.config.dataLabels,h=!!(null==(e=n.animate)?void 0:e.enabled),c=!!(null==(i=n.countUp)?void 0:i.enabled),p=n.formatter,u=Math.max(1,t.config.chart.animations.dynamicAnimation.speed||1),g=fe(t);try{r.querySelectorAll(Re).forEach(e=>{const i=e.getAttribute("data:dlKey");if(!i)return;const s=e.querySelector(ze);if(!s)return;const r=a.get(i),n=parseInt(e.getAttribute("data:dlDelay")||"0",10)||0;if(h&&(r&&isFinite(r.cx)&&isFinite(r.cy)?Ye(t,{el:e,oldCx:r.cx,oldCy:r.cy,duration:u,ease:g,delay:n}):r||function(t,e,i,s){const a=e.style;a.opacity="0",xe(t,i,s,t=>{a.opacity=String(t)},()=>{a.opacity=""})}(t,e,u,g)),c&&r){const a=parseInt(i,10),h=parseInt(e.getAttribute("data:dlJ")||"",10);We(t,{el:s,from:r.val,to:parseFloat(e.getAttribute("data:dlVal")||""),formatter:p,fmtOpts:l(o({},t),{seriesIndex:a,dataPointIndex:isFinite(h)?h:0,w:t}),duration:u,ease:g,delay:n})}});const e=t.config.plotOptions.bar.dataLabels.total.formatter||p;r.querySelectorAll(Xe).forEach(i=>{const s=i.getAttribute("data:dlTotalKey");if(!s)return;const r=a.get(`total::${s}`);if(!r)return;const n=parseInt(i.getAttribute("data:dlDelay")||"0",10)||0;if(h&&isFinite(r.cx)&&isFinite(r.cy)&&Ye(t,{el:i,oldCx:r.cx,oldCy:r.cy,duration:u,ease:g,delay:n}),c){const a=parseInt(i.getAttribute("data:dlTotalSeries")||s,10);We(t,{el:i,from:r.val,to:parseFloat(i.getAttribute("data:dlTotalVal")||""),formatter:e,fmtOpts:l(o({},t),{seriesIndex:a,dataPointIndex:0,w:t}),duration:u,ease:g,delay:n})}})}catch(t){}}class $e{constructor(t,{toggleDataSeries:e,revertDefaultAxisMinMax:i,updateSeries:s}={}){this.w=t,this._toggleDataSeries=e||null,this._revertDefaultAxisMinMax=i||null,this._updateSeries=s||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='${v.escapeString(t)}']`)}isSeriesHidden(t){var e;const i=this.getSeriesByName(t),s=parseInt(null!=(e=i.getAttribute("data:realIndex"))?e:"0",10);return{isHidden:i.classList.contains("apexcharts-series-collapsed"),realIndex:s}}addCollapsedClassToSeries(t,e){$e.addCollapsedClassToSeries(this.w,t,e)}static addCollapsedClassToSeries(t,e,i){let s=!1;function a(t){for(let a=0;a{t.globals.isDestroyed||e.node.classList.remove("apexcharts-series-collapsing")},n)}toggleSeries(t){var e;const i=this.isSeriesHidden(t);return null==(e=this._toggleDataSeries)||e.call(this,i.realIndex,i.isHidden),i.isHidden}showSeries(t){var e;const i=this.isSeriesHidden(t);i.isHidden&&(null==(e=this._toggleDataSeries)||e.call(this,i.realIndex,!0))}hideSeries(t){var e;const i=this.isSeriesHidden(t);i.isHidden||null==(e=this._toggleDataSeries)||e.call(this,i.realIndex,!1)}prepareDataUpdate(){const t=this.w;this.clearSeriesCache(),t.globals.previousPaths=[],t.globals.axisCharts||(t.globals.collapsedSeries=[],t.globals.ancillaryCollapsedSeries=[],t.globals.collapsedSeriesIndices=[],t.globals.ancillaryCollapsedSeriesIndices=[])}resetSeries(t=!0,e=!0,i=!0){var s,a;const r=this.w;this.clearSeriesCache();let n=v.clone(r.globals.initialSeries);Array.isArray(n)||(n=v.clone(r.config.series)||[]),r.globals.previousPaths=[],i?(r.globals.collapsedSeries=[],r.globals.ancillaryCollapsedSeries=[],r.globals.collapsedSeriesIndices=[],r.globals.ancillaryCollapsedSeriesIndices=[]):n=this.emptyCollapsedSeries(n),r.config.series=n,t&&(e&&(r.interact.zoomed=!1,null==(s=this._revertDefaultAxisMinMax)||s.call(this)),null==(a=this._updateSeries)||a.call(this,n,r.config.chart.animations.dynamicAnimation.enabled))}emptyCollapsedSeries(t){const e=this.w;if(!Array.isArray(t))return t;for(let i=0;i-1&&(t[i]&&"object"==typeof t[i]?t[i].data=[]:t[i]=0);return t}_deriveSeriesNames(t){const e=this.w,i=t||e.config.series||[],s=e.config.labels||[];return i.map((t,e)=>t&&"object"==typeof t&&null!=t.name?String(t.name):null!=s[e]?String(s[e]):`series-${e+1}`)}reconcileCollapsedByName(t){const e=this.w,i=e.globals,s=t||e.config.series,a=this._deriveSeriesNames(s),r=t=>{const e=[],r=[];return t.forEach(t=>{const n=t&&null!=t.name?a.indexOf(t.name):t.index;if(null==n||n<0||n>=s.length)return;const o=s[n];t.index=n,i.axisCharts?o&&Array.isArray(o.data)&&o.data.length&&(t.data=o.data.slice()):t.data=o,e.push(t),r.push(n)}),{records:e,indices:r}},n=r(i.collapsedSeries);i.collapsedSeries=n.records,i.collapsedSeriesIndices=n.indices;const o=r(i.ancillaryCollapsedSeries);i.ancillaryCollapsedSeries=o.records,i.ancillaryCollapsedSeriesIndices=o.indices,i.allSeriesCollapsed=i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.length,this.emptyCollapsedSeries(s)}canvasRestyle(t){const e=this.w.globals.activeRenderer;e&&"canvas"===e.kind&&"function"==typeof e.restyle&&e.restyle(t)}highlightSeries(t){var e;const i=this.w,s=this.getSeriesByName(t),a=parseInt(null!=(e=null==s?void 0:s.getAttribute("data:realIndex"))?e:"",10),r="highlightSeriesEls";let n=i.globals.cachedSelectors[r];n||(n=i.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),i.globals.cachedSelectors[r]=n);let o=null,l=null,h=null;if(i.globals.axisCharts||"radialBar"===i.config.chart.type)if(i.globals.axisCharts){o=i.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${a}']`),l=i.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${a}']`);const t=i.globals.seriesYAxisReverseMap[a];h=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}']`)}else o=i.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}']`);else o=i.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}'] path`);for(let t=0;t{for(let e=0;e=n.from&&e<=n.to&&s[t].classList.remove(this.legendInactiveClass)}}}getActiveConfigSeriesIndex(t="asc",e=[]){const i=this.w;let s=0;if(i.config.series.length>1){const a=i.config.series.map((t,s)=>t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(s)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(i.config.series[s].type)>-1)?s:-1);for(let e="asc"===t?0:a.length-1;"asc"===t?e=0;"asc"===t?e++:e--)if(-1!==a[e]){s=a[e];break}}return s}getActiveConfigSeriesIndexByGroup(t=[]){const e=this.w;return(e.labelData.seriesGroups||[]).map(i=>{let s=-1;return e.config.series.forEach((a,r)=>{if(-1===i.indexOf(e.seriesData.seriesNames[r]))return;if(e.globals.comboCharts&&t.length&&-1===t.indexOf(a.type))return;a.data&&a.data.length>0&&-1===e.globals.collapsedSeriesIndices.indexOf(r)&&(s=r)}),s})}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,i,s;const a=this.w;if(function(t){var e,i,s;const a=t.globals;if(a.streamScrolled=!1,!a.axisCharts||!t.seriesData||!Array.isArray(t.seriesData.series)||0===t.seriesData.series.length)return void(a.prevStreamFrame=null);const r=[];(null==(i=null==(e=t.dom)?void 0:e.baseEl)?void 0:i.querySelectorAll)&&t.dom.baseEl.querySelectorAll(".apexcharts-marker").forEach(t=>{var e,i,s,a,n;const o=parseInt(null!=(e=t.getAttribute("index"))?e:"",10),l=parseInt(null!=(s=null!=(i=t.getAttribute("j"))?i:t.getAttribute("rel"))?s:"",10),h=parseFloat(null!=(n=null!=(a=t.getAttribute("r"))?a:t.getAttribute("default-marker-size"))?n:"");isFinite(o)&&isFinite(l)&&isFinite(h)&&((r[o]=r[o]||[])[l]=h)}),a.prevStreamFrame={seriesX:(t.seriesData.seriesX||[]).slice(),seriesY:t.seriesData.series.slice(),xPixels:(a.seriesXvalues||[]).slice(),yPixels:(a.seriesYvalues||[]).slice(),rPixels:r,labels:(a.labels||[]).slice(),isXNumeric:!!(null==(s=t.axisFlags)?void 0:s.isXNumeric)}}(a),function(t){const e=t.globals;if(e.prevChromeFrame=null,!e.axisCharts||!d.isBrowser())return;const i=t.dom.baseEl;if(v.elementExists(i))try{const s=we(i,Ce,"y");e.prevChromeFrame={xLabels:we(i,Se,"x"),yLabels:s,vGrid:ve(i,ke,"x1"),hGrid:ve(i,_e,"y1"),xScale:Me(t),yAnchors:De(t,s)}}catch(t){e.prevChromeFrame=null}}(a),function(t){const e=t.globals;if(e.prevDataLabels=null,!e.axisCharts||!d.isBrowser())return;if(!Be(t))return;const i=t.dom.baseEl;if(v.elementExists(i))try{const t=new Map;i.querySelectorAll(Re).forEach(e=>{const i=e.getAttribute("data:dlKey");if(!i)return;const s=e.querySelector(ze);s&&t.set(i,{cx:parseFloat(s.getAttribute("cx")||""),cy:parseFloat(s.getAttribute("cy")||""),val:parseFloat(e.getAttribute("data:dlVal")||"")})}),i.querySelectorAll(Xe).forEach(e=>{const i=e.getAttribute("data:dlTotalKey");i&&t.set(`total::${i}`,{cx:parseFloat(e.getAttribute("cx")||""),cy:parseFloat(e.getAttribute("cy")||""),val:parseFloat(e.getAttribute("data:dlTotalVal")||"")})}),e.prevDataLabels=t.size?t:null}catch(t){e.prevDataLabels=null}}(a),!a.globals.axisCharts)return void(a.globals.previousPaths=a.seriesData.series);if(!v.elementExists(a.dom.baseEl))return void(a.globals.previousPaths=[]);function r(t,e,i){const s=t[e].childNodes,r={type:i,paths:[],realIndex:t[e].getAttribute("data:realIndex")};for(let t=0;t{const e=(i=t,a.dom.baseEl.querySelectorAll(`.apexcharts-${i}-series .apexcharts-series`));var i;for(let i=0;i0)for(let r=0;ro[a].getAttribute(t),n={x:parseFloat(null!=(t=r("x"))?t:"0"),y:parseFloat(null!=(e=r("y"))?e:"0"),width:parseFloat(null!=(i=r("width"))?i:"0"),height:parseFloat(null!=(s=r("height"))?s:"0")};l.push({rect:n,color:o[a].getAttribute("color")})}a.globals.previousPaths.push(l)}}clearPreviousPaths(){const t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1}handleNoData(){const t=this.w,e=t.config.noData,i=new It(this.w);let s=t.globals.svgWidth/2,a=t.globals.svgHeight/2,r="middle";if(t.globals.noData=!0,t.globals.animationEnded=!0,"left"===e.align?(s=10,r="start"):"right"===e.align&&(s=t.globals.svgWidth-10,r="end"),"top"===e.verticalAlign?a=50:"bottom"===e.verticalAlign&&(a=t.globals.svgHeight-50),s+=e.offsetX,a=a+parseInt(e.style.fontSize,10)+2+e.offsetY,void 0!==e.text&&""!==e.text){const n=i.drawText({x:s,y:a,text:e.text,textAnchor:r,fontSize:e.style.fontSize,fontFamily:e.style.fontFamily,foreColor:e.style.color,opacity:1,cssClass:"apexcharts-text-nodata"});t.dom.Paper.add(n)}}setNullSeriesToZeroValues(t){const e=this.w;for(let i=0;it.length>0?t:[])}}const je={accent:"--apx-accent",fore:"--apx-fore",grid:"--apx-grid",surface:"--apx-surface"};const Ge="__apexcharts_themes__";function Ve(){return globalThis[Ge]}globalThis[Ge]||(globalThis[Ge]={});const Ue="#373d3f",qe="#f6f7f8",Ze="#e0e0e0";class Ke{constructor(t){this.w=t,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed(),this._tokens={},this._namedTheme=null}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,i=new v;var s;this._namedTheme=(s=e.config.theme.name)&&Ve()[s]||null,this._applyNamedThemeMode(),e.dom.elWrap.classList.add(`apexcharts-theme-${e.config.theme.mode||"light"}`),this._applyModeDefaults(),this._tokens=this._resolveTokens(),this.applyTokenChrome(this._tokens);const a=null==(t=e.config.theme.accessibility)?void 0:t.colorBlindMode;if(a){e.globals.colors=this.getColorBlindColors(a),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"===a&&e.dom.elWrap.classList.add("apexcharts-high-contrast"))}const r=[...e.config.colors||e.config.fill.colors||[]];e.globals.colors=this.getColors(r),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,i));const n=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],n),this.applyDataLabelsColors(n),this.applyRadarPolygonsColors(),this.applyMarkersColors(n)}_applyModeDefaults(){const t=this.w,e=t.config.theme.mode;"dark"===e?(t.config.chart.foreColor===Ue&&(t.config.chart.foreColor=qe),"palette1"===t.config.theme.palette&&(t.config.theme.palette="palette4"),t.config.tooltip&&"light"!==t.config.tooltip.theme&&(t.config.tooltip.theme="dark")):"light"===e&&(t.config.chart.foreColor===qe&&(t.config.chart.foreColor=Ue),"palette4"===t.config.theme.palette&&(t.config.theme.palette="palette1"))}_applyNamedThemeMode(){const t=this._namedTheme;if(!t)return;const e=this.w.config.theme;t.mode&&!e.mode&&(e.mode=t.mode),!t.accessibility||!t.accessibility.colorBlindMode||e.accessibility&&e.accessibility.colorBlindMode||(e.accessibility=e.accessibility||{},e.accessibility.colorBlindMode=t.accessibility.colorBlindMode),t.monochrome&&t.monochrome.enabled&&!e.monochrome.enabled&&(e.monochrome=o(o({},e.monochrome),t.monochrome))}_resolveTokens(){const t=this._namedTheme&&this._namedTheme.tokens||{},e=this._shouldUseTokens()?function(t){if(!d.isBrowser())return{};const e=t.dom&&(t.dom.elWrap||t.dom.baseEl)||null;if(!e)return{};const i=b.getComputedStyle(e);if(!i||"function"!=typeof i.getPropertyValue)return{};const s=t=>{const e=i.getPropertyValue(t);return e?String(e).trim():""},a={};for(const t in je){const e=s(je[t]);e&&(a[t]=e)}const r=[];for(let t=1;t<=24;t++){const e=s(`--apx-series-${t}`);if(!e)break;r.push(e)}return r.length&&(a.series=r),a}(this.w):{};return o(o({},t),e)}_shouldUseTokens(){return!1!==this.w.config.theme.tokens}applyTokenChrome(t){if(!t)return;const e=this.w;if(!t.fore||e.config.chart.foreColor!==Ue&&e.config.chart.foreColor!==qe||(e.config.chart.foreColor=t.fore),t.grid){e.config.grid.borderColor===Ze&&(e.config.grid.borderColor=t.grid);const i=e=>{e&&(e.axisBorder&&e.axisBorder.color===Ze&&(e.axisBorder.color=t.grid),e.axisTicks&&e.axisTicks.color===Ze&&(e.axisTicks.color=t.grid))};i(e.config.xaxis),Array.isArray(e.config.yaxis)?e.config.yaxis.forEach(i):i(e.config.yaxis)}const i=e.globals.tokenSurface,s=e.config.chart.background,a=!s||s===i;if(t.surface){if(a){e.config.chart.background=t.surface,e.globals.tokenSurface=t.surface;const i=e.dom.Paper&&e.dom.Paper.node;i&&i.style&&(i.style.background=t.surface)}}else if(i&&s===i){e.config.chart.background="",e.globals.tokenSurface=void 0;const t=e.dom.Paper&&e.dom.Paper.node;t&&t.style&&(t.style.background="")}}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((i,s)=>{const a=t[s]||t[0];return"function"==typeof a?a({value:e.globals.axisCharts?e.seriesData.series[s][0]||0:e.seriesData.series[s],seriesIndex:s,dataPointIndex:s,w:this.w}):a})):t:this.predefined()}applySeriesColors(t,e){t.forEach((t,i)=>{t&&(e[i]=t)})}getMonochromeColors(t,e,i){const{color:s,shadeIntensity:a,shadeTo:r}=t,n=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,o=1/(n/a);let l=0;return Array.from({length:n},()=>{const t="dark"===r?i.shadeColor(-1*l,s):i.shadeColor(l,s);return l+=o,t})}applyColorTypes(t,e){const i=this.w;t.forEach(t=>{i.globals[t].colors=void 0===i.config[t].colors?this.isColorFn?i.config.colors:e:i.config[t].colors.slice(),this.pushExtraColors(i.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,i=null){const s=this.w;let a=e||s.seriesData.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===s.config.chart.type&&s.config.plotOptions.heatmap&&s.config.plotOptions.heatmap.colorScale.inverse),i&&s.seriesData.series.length&&(a=s.seriesData.series[s.globals.maxValsInArrayIndex].length*s.seriesData.series.length),t.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}getDatalabelsRect(){const t=this.w,e=[];t.config.series.forEach((i,s)=>{i.data.forEach((i,a)=>{const r=(n=t.seriesData.series[s][a],t.config.dataLabels.formatter(n,{seriesIndex:s,dataPointIndex:a,w:t}));var n;e.push(r)})});const i=v.getLargestStringFromArr(e),s=new It(this.w),a=t.config.dataLabels.style,r=s.getTextRects(i,parseInt(a.fontSize).toString(),a.fontFamily);return{width:1.05*r.width,height:r.height}}getLargestStringFromMultiArr(t,e){let i=t;if(this.w.axisFlags.isMultiLineX){const t=e.map(t=>Array.isArray(t)?t.length:1),s=Math.max(...t);i=e[t.indexOf(s)]}return i}getSparklineStrokeInset(){const t=this.w,e=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,i=e/2;if(!(t.config.stroke.show&&i>0))return{top:0,bottom:0};const s=t.globals.maxY-t.globals.minY,a=this._getSeriesYExtremes();if(!(this._strokeTracesDataPoints()&&s>0&&a))return{top:i,bottom:i};const r=Math.max(t.globals.svgHeight-e,0),n=r*(t.globals.maxY-a.max)/s,o=r*(a.min-t.globals.minY)/s;return{top:Math.min(Math.max(i-n,0),i),bottom:Math.min(Math.max(i-o,0),i)}}_strokeTracesDataPoints(){const t=this.w;if(!t.globals.axisCharts||t.config.chart.stacked)return!1;const e=["line","area","scatter"];return t.config.series.every(i=>e.includes(i.type||t.config.chart.type))}_getSeriesYExtremes(){let t=1/0,e=-1/0;return this.w.seriesData.series.forEach(i=>{Array.isArray(i)&&i.forEach(i=>{Number.isFinite(i)&&(ie&&(e=i))})}),t===1/0?null:{min:t,max:e}}};class ti{constructor(t){this.w=t.w,this.dCtx=t}getxAxisLabelsCoords(){const t=this.w;let e,i=t.labelData.labels.slice();if(t.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=t.labelData.categoryLabels),t.labelData.timescaleLabels.length>0){const i=this.getxAxisTimeScaleLabelsCoords();e={width:i.width,height:i.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 s=t.formatters.xLabelFormatter;let a=v.getLargestStringFromArr(i),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,i);t.globals.isBarHorizontal&&(a=t.globals.yAxisScale[0].result.reduce((t,e)=>t.length>e.length?t:e,0),r=a);const n=new S(this.w),o=a;a=n.xLabelFormat(s,a,o,{i:void 0,dateFormatter:new A(this.w).formatDate,w:t}),r=n.xLabelFormat(s,r,o,{i:void 0,dateFormatter:new A(this.w).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&void 0===a||""===String(a).trim())&&(a="1",r=a);const l=new It(this.w);let h=l.getTextRects(a,t.config.xaxis.labels.style.fontSize),c=h;if(a!==r&&(c=l.getTextRects(r,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*i.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 i=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=i(a),a!==r&&(c=i(r)),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 i=(null==(t=e.config.xaxis.group.style)?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,s=e.labelData.groups.map(t=>t.title);let a;const r=v.getLargestStringFromArr(s),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s),o=new It(this.w),l=o.getTextRects(r,i);let h=l;return r!==n&&(h=o.getTextRects(n,i)),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,i=0;if(void 0!==t.config.xaxis.title.text){const s=new It(this.w).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=s.width,i=s.height}return{width:e,height:i}}getxAxisTimeScaleLabelsCoords(){const t=this.w;this.dCtx.timescaleLabels=t.labelData.timescaleLabels.slice();const e=this.dCtx.timescaleLabels.map(t=>t.value),i=e.reduce((t,e)=>void 0===t?0:t.length>e.length?t:e,0),s=new It(this.w).getTextRects(i,t.config.xaxis.labels.style.fontSize);return 1.05*s.width*e.length>t.layout.gridWidth&&0!==t.config.xaxis.labels.rotate&&(t.globals.overlappingXLabels=!0),s}additionalPaddingXLabels(t){const e=this.w,i=e.globals,s=e.config,a=s.xaxis.type,r=t.width;i.skipLastTimelinelabel=!1,i.skipFirstTimelinelabel=!1;const n=e.config.yaxis[0].opposite&&e.globals.isBarHorizontal,o=t=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){const a=this.dCtx.timescaleLabels[0],n=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+r/1.75-this.dCtx.yAxisWidthRight,o=a.position-r/1.75+this.dCtx.yAxisWidthLeft,l="right"===e.config.legend.position&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;n>i.svgWidth-e.layout.translateX-l&&(i.skipLastTimelinelabel=!0),o<-(t.show&&!t.floating||"bar"!==s.chart.type&&"candlestick"!==s.chart.type&&"rangeBar"!==s.chart.type&&"boxPlot"!==s.chart.type&&"violin"!==s.chart.type?10:r/1.75)&&(i.skipFirstTimelinelabel=!0)}else"datetime"===a?this.dCtx.gridPad.right{s.yaxis.length>1&&(t=>-1!==i.collapsedSeriesIndices.indexOf(t))(e)||o(t)};s.yaxis.forEach((t,e)=>{n?(this.dCtx.gridPad.left{const n={seriesIndex:r,dataPointIndex:-1,w:t},o=t.globals.yAxisScale[r];let l=0;if(!s.isYAxisHidden(r)&&a.labels.show&&void 0!==a.labels.minWidth&&(l=a.labels.minWidth),!s.isYAxisHidden(r)&&a.labels.show&&o.result.length){const s=t.formatters.yLabelFormatters[r],h=o.niceMin===Number.MIN_VALUE?0:o.niceMin;let c=o.result.reduce((t,e)=>{var i,a;return(null==(i=String(s(t,n)))?void 0:i.length)>(null==(a=String(s(e,n)))?void 0:a.length)?t:e},h);c=s(c,n);let d=c;if(void 0!==c&&0!==c.length||(c=o.niceMax),1===String(c).length&&(c+=".0",d=c),t.globals.isBarHorizontal){i=0;const e=t.labelData.labels.slice();c=v.getLargestStringFromArr(e),c=s(c,{seriesIndex:r,dataPointIndex:-1,w:t}),d=this.dCtx.dimHelpers.getLargestStringFromMultiArr(c,e)}const p=new It(this.w),u="rotate(".concat(a.labels.rotate," 0 0)"),g=p.getTextRects(c,a.labels.style.fontSize,a.labels.style.fontFamily,u,!1);let f=g;c!==d&&(f=p.getTextRects(d,a.labels.style.fontSize,a.labels.style.fontFamily,u,!1)),e.push({width:(l>f.width||l>g.width?l:f.width>g.width?f.width:g.width)+i,height:f.height>g.height?f.height:g.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 i=new It(this.w),s="rotate(".concat(t.title.rotate," 0 0)"),a=i.getTextRects(t.title.text,t.title.style.fontSize,t.title.style.fontFamily,s,!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,i=0,s=0;const a=t.globals.yAxisScale.length>1?10:0,r=new $t(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),n=(n,o)=>{const l=t.config.yaxis[o].floating;let h=0;n.width>0&&!l?(h=n.width+a,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(o)&&(h=h-n.width-a)):h=l||r.isYAxisHidden(o)?0:5,t.config.yaxis[o].opposite?s+=h:i+=h,e+=h};return t.layout.yLabelsCoords.map((t,e)=>{n(t,e)}),t.layout.yTitleCoords.map((t,e)=>{n(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=i,this.dCtx.yAxisWidthRight=s,e}}class ii{constructor(t){this.w=t.w,this.dCtx=t}gridPadForColumnsInNumericAxis(t){const{w:e}=this,{config:i,globals:s}=e;if(s.noData||s.collapsedSeries.length+s.ancillaryCollapsedSeries.length===i.series.length)return 0;const a=t=>["bar","rangeBar","candlestick","boxPlot","violin"].includes(t),r=i.chart.type;let n=0,o=a(r)?i.series.length:1;s.comboBarCount>0&&(o=s.comboBarCount),s.collapsedSeries.forEach(t=>{a(t.type)&&(o-=1)}),i.chart.stacked&&(o=1);const l=a(r)||s.comboBarCount>0;let h=Math.abs(s.initialMaxX-s.initialMinX);if(l&&e.axisFlags.isXNumeric&&!s.isBarHorizontal&&o>0&&0!==h){h<=3&&(h=s.dataPoints);const e=h/t;let a=s.minXDiff&&s.minXDiff/e>0?s.minXDiff/e:0;a>t/2&&(a/=2),n=a*parseInt(i.plotOptions.bar.columnWidth,10)/100,n<1&&(n=1),s.barPadForNumericAxis=n}return n}gridPadForStackedTotalDataLabels(){const{w:t}=this,e=t.config.plotOptions.bar.dataLabels.total;if(!t.globals.isBarHorizontal||!t.config.chart.stacked||"100%"!==t.config.chart.stackType||!e.enabled)return;const i=t.seriesData.stackedSeriesTotals||[];if(!i.length)return;const s=e.formatter||t.config.dataLabels.formatter,a=i.map((e,i)=>String(s?s(e,l(o({},t),{seriesIndex:0,dataPointIndex:i,w:t})):e)),r=new It(t).getTextRects(v.getLargestStringFromArr(a),parseFloat(e.style.fontSize).toString(),e.style.fontFamily).width+Math.abs(e.offsetX||0)+2;this.dCtx.xPadRight=Math.max(this.dCtx.xPadRight,r)}gridPadFortitleSubtitle(){const{w:t}=this,{globals:e}=t;let i=this.dCtx.isSparkline||!e.axisCharts?0:10;["title","subtitle"].forEach(s=>{void 0!==t.config[s].text?i+=t.config[s].margin:i+=this.dCtx.isSparkline||!e.axisCharts?0:5}),!t.config.legend.show||"bottom"!==t.config.legend.position||t.config.legend.floating||e.axisCharts||(i+=10);const s=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),a=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");this.dCtx.titleBlockPad=i,t.layout.gridHeight-=s.height+a.height+i,t.layout.translateY+=s.height+a.height+i}setGridXPosForDualYAxis(t,e){const{w:i}=this,s=new $t(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});i.config.yaxis.forEach((a,r)=>{-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||a.floating||s.isYAxisHidden(r)||(a.opposite&&(i.layout.translateX-=e[r].width+t[r].width+parseInt(a.labels.style.fontSize,10)/1.2+12),i.layout.translateX<2&&(i.layout.translateX=2))})}}const si="http://www.w3.org/1999/xhtml";function ai(t,e){const i=t.config.drilldown&&t.config.drilldown.breadcrumb||{};return o(o({show:!0,position:"top-left",separator:" / ",rootLabel:"All",offsetX:0,offsetY:0,formatter:void 0},i),e||{})}function ri(t,e){const i=[".apexcharts-title-text",".apexcharts-subtitle-text"].map(e=>t.dom.baseEl.querySelector(e)).filter(t=>null!==t);if(!i.length)return;const s=t.dom.elWrap.getBoundingClientRect().top;for(let t=0;t{const i=e.getBoundingClientRect();return t.lefti.left&&t.topi.top});if(!a)break;e.style.top=a.getBoundingClientRect().bottom-s+4+"px"}}function ni(t,e,i,s){var a;const r=null==(a=null==e?void 0:e.dimensions)?void 0:a.dimHelpers,n=r?r.getTitleSubtitleCoords("title").height+r.getTitleSubtitleCoords("subtitle").height:0,o=i.getBoundingClientRect().height||18,l=s&&s.offsetY||0,h=function(t,e){const i=t.layout.translateY||0,s=t.dom.elWrap;if(!s)return i;const a=t.dom.baseEl.querySelectorAll(".apexcharts-yaxis-label");if(!a.length)return i;const r=s.getBoundingClientRect().top,n=e.getBoundingClientRect();let o=i;for(let t=0;t=n.right||e.right<=n.left||(o=Math.min(o,e.top-r)))}return o}(t,i);if(h-n>=o+1)return i.style.top=`${h-o-1+l}px`,!0;i.style.top=`${n+l}px`;const c="dark"===t.config.theme.mode;return i.style.background=c?"rgba(20,24,30,0.82)":"rgba(255,255,255,0.86)",i.style.borderRadius="4px",!1}function oi(t){const e=t.dom.elWrap;if(!e)return;const i=e.querySelector(".apexcharts-breadcrumb");i&&i.parentNode&&i.parentNode.removeChild(i)}class li{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 Qe(this),this.dimYAxis=new ei(this),this.dimXAxis=new ti(this),this.dimGrid=new ii(this),this.lgWidthForSideLegends=0,this.gridPad=o({},this.w.config.grid.padding),this.xPadRight=0,this.titleBlockPad=0,this.xPadLeft=0,this.datalabelsCoords={width:0,height:0},this.xAxisWidth=0,this.timescaleLabels=[]}plotCoords(){const t=this.w,e=t.globals;if(this.gridPad=o({},t.config.grid.padding),this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0},this.isSparkline){this.w.globals.markers.largestSize>0&&Object.entries(this.gridPad).forEach(([t,e])=>{this.gridPad[t]=Math.max(e,this.w.globals.markers.largestSize/1.5)});const t=this.dimHelpers.getSparklineStrokeInset();this.gridPad.top=Math.max(t.top,this.gridPad.top),this.gridPad.bottom=Math.max(t.bottom,this.gridPad.bottom)}if(e.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),this.gridPadForBreadcrumb(),this.dimGrid.gridPadForStackedTotalDataLabels(),"heatmap"===t.config.chart.type&&"hexagon"===t.config.plotOptions.heatmap.shape&&("numeric"!==t.config.xaxis.type&&"datetime"!==t.config.xaxis.type||!t.axisFlags.isXNumeric)){const i=e.dataPoints||1,s=(t.seriesData.series||[]).length||1,a=t.layout.gridWidth-this.xPadRight-this.xPadLeft,r=t.layout.gridHeight,n=t.config.stroke.show?Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width:0,o=(a+4*i*(n/2+6))/(4*i+2),l=(r+6*s*(n/2))/(6*s+2);this.gridPad.left=Math.max(o,this.gridPad.left),this.gridPad.right=Math.max(o,this.gridPad.right),this.gridPad.top=Math.max(l,this.gridPad.top),this.gridPad.bottom=Math.max(l,this.gridPad.bottom)}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,gridPad:o({},this.gridPad)}}}gridPadForBreadcrumb(){var t,e,i,s,a,r;const n=this.w,o="treemap"===n.config.chart.type;if(o){const i=null==(e=null==(t=n.config.plotOptions)?void 0:t.treemap)?void 0:e.zoom;if(i&&i.enabled){if(!1===ai(n,i.breadcrumb).show)return;return void(this.gridPad.top+=22)}}if(!n.globals.axisCharts)return;if(!this.ctx.drilldown)return;if(!n.config.drilldown||!n.config.drilldown.enabled)return;if(!1===ai(n).show)return;const l=parseFloat(String(null==(r=null==(a=null==(s=null==(i=n.config.yaxis)?void 0:i[0])?void 0:s.labels)?void 0:a.style)?void 0:r.fontSize))||11,h=24+(o?0:Math.ceil(l*B/2)),c=o?0:this.titleBlockPad||0;this.gridPad.top+=Math.max(0,h-c)}setDimensionsForAxisCharts(){const t=this.w,e=t.globals,i=this.dimYAxis.getyAxisLabelsCoords(),s=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:i[a].width,index:a}),t.layout.yTitleCoords.push({width:s[a].width,index:a})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();const a=this.dimXAxis.getxAxisLabelsCoords(),r=this.dimXAxis.getxAxisGroupLabelsCoords(),n=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(a,n,r),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)||12)/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 o=this.yAxisWidth,l=this.xAxisHeight;t.layout.xAxisLabelsHeight=this.xAxisHeight-n.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)&&(o=0,l=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===t.config.chart.type)&&(o=0,l=0,h=0),this.isSparkline||"treemap"===t.config.chart.type||this.dimXAxis.additionalPaddingXLabels(a);const c=()=>{t.layout.translateX=o+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-o-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+o+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-l-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-o-2*this.datalabelsCoords.width;break;case"right":t.layout.translateY=h,t.layout.translateX=o+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-l-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-o-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(s,i);new Zt(this.w,{theme:this.theme,timeScale:this.timeScale}).setYAxisXPosition(i,s)}setDimensionsForNonAxisCharts(){const t=this.w,e=t.globals,i=t.config;let s=0;if(t.config.legend.show&&!t.config.legend.floating&&(s=20),"unit"===i.chart.type){const a=i.legend.show&&!i.legend.floating,r=i.legend.position;let n=0,o=0;return a&&("bottom"===r||"top"===r?n=this.lgRect.height:o=this.lgRect.width+s),t.layout.gridWidth=e.svgWidth-o,t.layout.gridHeight=e.svgHeight-n,t.layout.translateX="left"===r?o:0,void(t.layout.translateY="top"===r?n:0)}const a="sunburst"===i.chart.type?"sunburst":"pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[a].offsetY,n=i.plotOptions[a].offsetX;if(!i.legend.show||i.legend.floating){t.layout.gridHeight=e.svgHeight;const i=t.dom.elWrap.getBoundingClientRect().width;return t.layout.gridWidth=Math.min(i,t.layout.gridHeight),t.layout.translateY=r,void(t.layout.translateX=n+(e.svgWidth-t.layout.gridWidth)/2)}switch(i.legend.position){case"bottom":t.layout.gridHeight=e.svgHeight-this.lgRect.height,t.layout.gridWidth=e.svgWidth,t.layout.translateY=r-10,t.layout.translateX=n+(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+r+10,t.layout.translateX=n+(e.svgWidth-t.layout.gridWidth)/2;break;case"left":t.layout.gridWidth=e.svgWidth-this.lgRect.width-s,t.layout.gridHeight="auto"!==i.chart.height?e.svgHeight:t.layout.gridWidth,t.layout.translateY=r,t.layout.translateX=n+this.lgRect.width+s;break;case"right":t.layout.gridWidth=e.svgWidth-this.lgRect.width-s-5,t.layout.gridHeight="auto"!==i.chart.height?e.svgHeight:t.layout.gridWidth,t.layout.translateY=r,t.layout.translateX=n+10;break;default:throw new Error("Legend position not supported")}}conditionalChecksForAxisCoords(t,e,i){const s=this.w,a=s.labelData.hasXaxisGroups?2:1,r=i.height+t.height+e.height,n=s.axisFlags.isMultiLineX?1.2:B,o=s.layout.rotateXLabels?22:10,l=s.layout.rotateXLabels&&"bottom"===s.config.legend.position?10:0;this.xAxisHeight=r*n+a*o+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>s.config.xaxis.labels.maxHeight&&(this.xAxisHeight=s.config.xaxis.labels.maxHeight),s.config.xaxis.labels.minHeight&&this.xAxisHeight{h+=t.labels.minWidth,c+=t.labels.maxWidth}),this.yAxisWidthc&&(this.yAxisWidth=c)}}const hi=1e3,ci=6e4,di=36e5,pi=24*di,ui=7*pi,gi=30*pi,fi=365*pi,xi=10/86400,mi=[{unit:"second",step:1,approxMs:hi},{unit:"second",step:5,approxMs:5e3},{unit:"second",step:15,approxMs:15e3},{unit:"second",step:30,approxMs:3e4},{unit:"minute",step:1,approxMs:ci},{unit:"minute",step:5,approxMs:3e5},{unit:"minute",step:15,approxMs:9e5},{unit:"minute",step:30,approxMs:18e5},{unit:"hour",step:1,approxMs:di},{unit:"hour",step:3,approxMs:3*di},{unit:"hour",step:6,approxMs:6*di},{unit:"hour",step:12,approxMs:12*di},{unit:"day",step:1,approxMs:pi},{unit:"day",step:2,approxMs:2*pi},{unit:"week",step:1,approxMs:ui},{unit:"week",step:2,approxMs:2*ui},{unit:"month",step:1,approxMs:gi},{unit:"month",step:3,approxMs:7776e6},{unit:"month",step:6,approxMs:15552e6},{unit:"year",step:1,approxMs:fi},{unit:"year",step:2,approxMs:63072e6},{unit:"year",step:5,approxMs:15768e7},{unit:"year",step:10,approxMs:31536e7},{unit:"year",step:25,approxMs:7884e8},{unit:"year",step:50,approxMs:15768e8},{unit:"year",step:100,approxMs:31536e8}];class bi{constructor(t,e){this.w=t,this.ctx=e,this.tickInterval=null,this.timeScaleArray=[],this.utc=t.config.xaxis.labels.datetimeUTC}calculateTimeScaleTicks(t,e){const i=this.w;if(i.globals.allSeriesCollapsed)return i.labelData.labels=[],i.labelData.timescaleLabels=[],this.timeScaleArray=[],[];const s=e-t,a=s/pi;i.interact.disableZoomIn=!1,i.interact.disableZoomOut=!1,a5e4&&(i.interact.disableZoomOut=!0);const r=Number.isFinite(i.config.xaxis.tickAmount)?i.config.xaxis.tickAmount:10;this.tickInterval=function(t,e){(!Number.isFinite(e)||e<=0)&&(e=10);if(t<=0)return mi[0];const i=t/e;let s=mi[0],a=1/0;for(const t of mi){const e=Math.abs(Math.log(t.approxMs/i));e0?(h-t)/o*n:0;l.push({timestamp:h,position:s,unit:i.unit,year:e.year,month:e.month+1,day:e.date,hour:e.hour,minute:e.minute,second:e.second,value:h}),h=a.addInterval(h,i.unit,i.step,r),c++}return l}recalcDimensionsBasedOnFormat(t){const e=this.w,i=this.formatDates(t),s=this.removeOverlappingTS(i);e.labelData.timescaleLabels=s.slice();const a=new li(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(a.layout)}formatDates(t){const e=this.w,i=new A(e),s=e.config.xaxis.labels.format,a=e.config.xaxis.labels.datetimeFormatter,r=this.utc,n=(t,e=2)=>String(t).padStart(e,"0"),o=s||this._effectiveFormat(t,a);return t.map(t=>{const e=i.getDate(t.timestamp),s=i.formatDate(e,o);return{dateString:`${t.year}-${n(t.month)}-${n(t.day)}T${n(t.hour)}:${n(t.minute)}:${n(t.second)}.000${r?"Z":""}`,position:t.position,value:s,unit:t.unit,year:t.year,month:t.month}})}_effectiveFormat(t,e){if(0===t.length)return e.day||"dd MMM";const i=this.tickInterval&&this.tickInterval.unit||t[0].unit,s=e["week"===i?"day":i]||e.day||"dd MMM",a=t[0],r=t[t.length-1],n=a.year!==r.year,o=n||a.month!==r.month||a.day!==r.day,l=/y/i.test(s),h=/M/.test(s),c=/d/i.test(s);if("month"===i||"week"===i)return n&&!l?s+" yyyy":s;if("day"===i)return n&&!l?s+" yyyy":s;if("hour"===i||"minute"===i||"second"===i){if(o&&!c&&!h){return(n?"dd MMM yyyy":"dd MMM")+" "+s}return s}return s}removeOverlappingTS(t){if(0===t.length)return[];const e=this.w,i=new It(e);let s,a=!1;t[0].value&&t.every(e=>e.value.length===t[0].value.length)&&(a=!0,s=i.getTextRects(t[0].value,e.config.xaxis.labels.style.fontSize).width);let r=0;return t.map((n,o)=>{if(0===o)return n;if(!e.config.xaxis.labels.hideOverlappingLabels)return n;const l=a?s:i.getTextRects(t[r].value,e.config.xaxis.labels.style.fontSize).width,h=t[r].position;return n.position>h+l+10?(r=o,n):null}).filter(t=>null!==t)}}const yi="__apexcharts_registry__",wi="__apexcharts_custom_types__";function vi(){return globalThis[yi]}function Ai(){return globalThis[wi]}function Si(t){return Ai().has(t)}function Ci(t){Object.assign(vi(),t)}function ki(t){const e=vi()[t];if(!e)throw new Error(`ApexCharts: chart type "${t}" is not registered. Bundler: import 'apexcharts/${t}'. Script tag: add