PageSourceSearch

https://smartcomm.ai/build/assets/apexcharts.esm-BzFP5PJR.js

js smartcomm.ai collected 2026-10-05 15:05:43 UTC 858,693 bytes, 1,382 lines download raw bytes

1var Ca=Object.defineProperty,ka=Object.defineProperties,Ma=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,Ni=Object.prototype.hasOwnProperty,Bi=Object.prototype.propertyIsEnumerable,ns=(x,t,e)=>t in x?Ca(x,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):x[t]=e,G=(x,t)=>{for(var e in t||(t={}))Ni.call(t,e)&&ns(x,e,t[e]);if(De)for(var e of De(t))Bi.call(t,e)&&ns(x,e,t[e]);return x},Z=(x,t)=>ka(x,Ma(t)),La=(x,t)=>{var e={};for(var s in x)Ni.call(x,s)&&t.indexOf(s)<0&&(e[s]=x[s]);if(x!=null&&De)for(var s of De(x))t.indexOf(s)<0&&Bi.call(x,s)&&(e[s]=x[s]);return e},j=(x,t,e)=>ns(x,typeof t!="symbol"?t+"":t,e),Yi=(x,t,e)=>new Promise((s,i)=>{var a=o=>{try{r(e.next(o))}catch(l){i(l)}},n=o=>{try{r(e.throw(o))}catch(l){i(l)}},r=o=>o.done?s(o.value):Promise.resolve(o.value).then(a,n);r((e=e.apply(x,t)).next())});class H{static isSSR(){return typeof window>"u"||typeof document>"u"}static isBrowser(){return!this.isSSR()}static hasAPI(t){return this.isSSR()?!1:typeof window[t]<"u"}static getApex(){return typeof window<"u"&&window.Apex?window.Apex:typeof global<"u"&&global.Apex?global.Apex:{}}}class Ee{constructor(t,e=null){this.nodeName=t,this.namespaceURI=e,this.attributes=new Map,this.children=[],this.textContent="",this.style={},this.classList=new Da,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);e!==-1&&this.children.splice(e,1)}t.parentNode=this,this.children.push(t)}return t}removeChild(t){const e=this.children.indexOf(t);return e!==-1&&(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 i=this.children.indexOf(t);i!==-1&&this.children.splice(i,1)}const s=this.children.indexOf(e);return s!==-1&&(t.parentNode=this,this.children.splice(s,0,t)),t}cloneNode(t=!1){const e=new Ee(this.nodeName,this.namespaceURI);return e.textContent=this.textContent,this.attributes.forEach((s,i)=>{e.attributes.set(i,s)}),Object.assign(e.style,this.style),t&&this.children.forEach(s=>{s.cloneNode&&e.appendChild(s.cloneNode(!0))}),e}getBoundingClientRect(){return{width:this._ssrWidth||0,height:this._ssrHeight||0,top:0,left:0,right:this._ssrWidth||0,bottom:this._ssrHeight||0,x:0,y:0}}getRootNode(){let t=this;for(;t.parentNode;)t=t.parentNode;return t}querySelector(){return null}querySelectorAll(){return[]}getElementsByClassName(){return[]}addEventListener(){}removeEventListener(){}get childNodes(){return this.children}toString(){let t="";if(this.attributes.forEach((s,i)=>{t+=` ${i}="${s}"`}),this.children.length===0&&!this.textContent)return`<${this.nodeName}${t}/>`;const e=this.children.map(s=>s.toString()).join("");return`<${this.nodeName}${t}>${this.textContent}${e}</${this.nodeName}>`}get innerHTML(){return this.children.map(t=>t.toString()).join("")}set innerHTML(t){this.children=[],this.textContent=t}get outerHTML(){return this.toString()}get isConnected(){return!0}}class Da{constructor(){this.classes=new Set}add(...t){t.forEach(e=>this.classes.add(e))}remove(...t){t.forEach(e=>this.classes.delete(e))}contains(t){return this.classes.has(t)}toggle(t,e){return e===!0?(this.classes.add(t),!0):e===!1?(this.classes.delete(t),!1):this.classes.has(t)?(this.classes.delete(t),!1):(this.classes.add(t),!0)}toString(){return Array.from(this.classes).join(" ")}}class Ea{constructor(){this.SVGNS="http://www.w3.org/2000/svg",this.XLINKNS="http://www.w3.org/1999/xlink"}createElementNS(t,e){return new Ee(e,t)}createTextNode(t){const e={nodeName:"#text",nodeType:3,textContent:t,toString(){return 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){return t.toString?t.toString():""}}}createDOMParser(){return{parseFromString(t,e){const s=new Ee("root");return s.innerHTML=t,{documentElement:s}}}}}let ft=null,Xt=null,It=null;class B{static init(){H.isSSR()&&!ft&&(ft=new Ea)}static createElement(t){return H.isSSR()?(ft||this.init(),ft.createElementNS(null,t)):document.createElement(t)}static createElementNS(t,e){return H.isSSR()?(ft||this.init(),ft.createElementNS(t,e)):document.createElementNS(t,e)}static createTextNode(t){return H.isSSR()?(ft||this.init(),ft.createTextNode(t)):document.createTextNode(t)}static querySelector(t){return H.isSSR()?null:document.querySelector(t)}static querySelectorAll(t){return H.isSSR()?[]:document.querySelectorAll(t)}static getComputedStyle(t){return H.isSSR()?{}:window.getComputedStyle(t)}static matchMedia(t){if(H.isSSR()||typeof window.matchMedia!="function")return null;try{return window.matchMedia(t)}catch{return null}}static getBoundingClientRect(t){return H.isSSR()?(ft||this.init(),ft.getBoundingClientRect(t)):t?t.getBoundingClientRect():{width:0,height:0,top:0,left:0,right:0,bottom:0,x:0,y:0}}static getXMLSerializer(){return H.isSSR()?(ft||this.init(),Xt||(Xt=ft.createXMLSerializer()),Xt):(Xt||(Xt=new XMLSerializer),Xt)}static getDOMParser(){return H.isSSR()?(ft||this.init(),It||(It=ft.createDOMParser()),It):(It||(It=new DOMParser),It)}static addWindowEventListener(t,e,s){H.isBrowser()&&window.addEventListener(t,e,s)}static removeWindowEventListener(t,e,s){H.isBrowser()&&window.removeEventListener(t,e,s)}static requestAnimationFrame(t){return H.isBrowser()?window.requestAnimationFrame(t):(t(0),null)}static cancelAnimationFrame(t){H.isBrowser()&&t&&window.cancelAnimationFrame(t)}static elementExists(t){return t?H.isSSR()?t._ssrMode===!0||t.nodeName!==void 0:t.getRootNode?t.getRootNode({composed:!0})===document||t.isConnected:!1:!1}
1static getWindow(){return H.isBrowser()?window:null}static getDocument(){return H.isBrowser()?document:null}static _getShim(){return ft}static _resetShim(){ft=null,Xt=null,It=null}}let R=class Dt{static isObject(t){return t&&typeof t=="object"&&!Array.isArray(t)}static is(t,e){return Object.prototype.toString.call(e)==="[object "+t+"]"}static isSafari(){return H.isBrowser()&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}static extend(t,e){if(!this.isObject(t)&&this.isObject(e))return this.clone(e);const s=Object.assign({},t);return this.isObject(t)&&this.isObject(e)&&Object.keys(e).forEach(i=>{this.isObject(e[i])?i in t?s[i]=this.extend(t[i],e[i]):Object.assign(s,{[i]:e[i]}):Object.assign(s,{[i]:e[i]})}),s}static extendArray(t,e){const s=[];return t.map(i=>{s.push(Dt.extend(e,i))}),t=s,t}static monthMod(t){return t%12}static clone(t,e=new WeakMap,s=!1){if(t===null||typeof t!="object")return t;if(e.has(t))return e.get(t);let i;if(Array.isArray(t))if(s)i=t.slice();else{i=[],e.set(t,i);for(let a=0;a<t.length;a++)i[a]=this.clone(t[a],e,!1)}else if(t instanceof Date)i=new Date(t.getTime());else if(s)i=Object.assign({},t);else{i={},e.set(t,i);for(const a in t)Object.prototype.hasOwnProperty.call(t,a)&&(i[a]=this.clone(t[a],e,!1))}return i}static shallowClone(t){return t===null||typeof t!="object"?t:Array.isArray(t)?t.slice():Object.assign({},t)}static shallowEqual(t,e){if(t===e)return!0;if(!t||!e)return!1;if(typeof t!="object"||typeof e!="object")return t===e;const s=Object.keys(t),i=Object.keys(e);if(s.length!==i.length)return!1;for(const a of s)if(t[a]!==e[a])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 typeof t=="number"||t===null?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(H.isSSR())return[t._ssrWidth||400,t._ssrHeight||300];let e;try{e=getComputedStyle(t,null)}catch{return[t.clientWidth||0,t.clientHeight||0]}let s=t.clientWidth,i=t.clientHeight;if(!s||!i){const a=t.getBoundingClientRect();s=s||a.width,i=i||a.height}return i-=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),s-=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),[s,i]}static getBoundingClientRect(t){if(!t)return{top:0,right:0,bottom:0,left:0,width:0,height:0,x:0,y:0};if(H.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((e,s)=>(Array.isArray(s)&&(s=s.reduce((i,a)=>i.length>a.length?i:a)),e.length>s.length?e:s),0)}static hexToRgba(t="#999999",e=.6){t.substring(0,1)!=="#"&&(t="#999999");const s=t.replace("#",""),i=s.match(new RegExp("(.{"+s.length/3+"})","g"))||[];for(let a=0;a<i.length;a++)i[a]=parseInt(i[a].length===1?i[a]+i[a]:i[a],16);return typeof e<"u"&&i.push(e),"rgba("+i.join(",")+")"}static getOpacityFromRGBA(t){return parseFloat(t.replace(/^.*,(.+)\)/,"$1"))}static parseHex(t){if(typeof t!="string")return null;let e=t.trim().replace("#","");return e.length===3&&(e=e.split("").map(s=>s+s).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,s]){const i=a=>{const n=a/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)};return .2126*i(t)+.7152*i(e)+.0722*i(s)}static getContrastRatio(t,e){const s=Dt.parseHex(t),i=Dt.parseHex(e);if(!s||!i)return 0;const a=Dt.relativeLuminance(s),n=Dt.relativeLuminance(i),r=Math.max(a,n),o=Math.min(a,n);return(r+.05)/(o+.05)}static rgb2hex(t){return t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i),t&&t.length===4?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""}shadeRGBColor(t,e){const s=e.split(","),i=t<0?0:255,a=t<0?t*-1:t,n=parseInt(s[0].slice(4),10),r=parseInt(s[1],10),o=parseInt(s[2],10);return"rgb("+(Math.round((i-n)*a)+n)+","+(Math.round((i-r)*a)+r)+","+(Math.round((i-o)*a)+o)+")"}shadeHexColor(t,e){const s=parseInt(e.slice(1),16),i=t<0?0:255,a=t<0?t*-1:t,n=s>>16,r=s>>8&255,o=s&255;return"#"+(16777216+(Math.round((i-n)*a)+n)*65536+(Math.round((i-r)*a)+r)*256+(Math.round((i-o)*a)+o)
1).toString(16).slice(1)}shadeColor(t,e){return Dt.isColorHex(e)?this.shadeHexColor(t,e):this.shadeRGBColor(t,e)}static isColorHex(t){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(t)}static isCSSVariable(t){if(typeof t!="string")return!1;const e=t.trim();return e.startsWith("var(")&&e.endsWith(")")}static getThemeColor(t){if(!Dt.isCSSVariable(t)||H.isSSR())return t;const e=document.createElement("div");e.style.cssText="position:fixed; left: -9999px; visibility:hidden;",e.style.color=t,document.body.appendChild(e);let s;try{s=window.getComputedStyle(e).color}finally{e.parentNode&&e.parentNode.removeChild(e)}return s}static applyOpacityToColor(t,e){const s=Number(e);if(!Number.isFinite(s))return t;if(s<=0)return"transparent";if(s>=1)return t;const i=Math.round(s*100);return`color-mix(in srgb, ${t} ${i}%, transparent)`}static getPolygonPos(t,e){const s=[],i=Math.PI*2/e;for(let a=0;a<e;a++){const n={};n.x=t*Math.sin(a*i),n.y=-t*Math.cos(a*i),s.push(n)}return s}static polarToCartesian(t,e,s,i){const a=(i-90)*Math.PI/180;return{x:t+s*Math.cos(a),y:e+s*Math.sin(a)}}static escapeString(t,e="x"){let s=t.toString().slice();return s=s.replace(/[` ~!@#$%^&*()|+=?;:'",.<>{}[\]\\/]/gi,e),s}static negToZero(t){return t<0?0:t}static moveIndexInArray(t,e,s){if(s>=t.length){let i=s-t.length+1;for(;i--;)t.push(void 0)}return t.splice(s,0,t.splice(e,1)[0]),t}static extractNumber(t){return parseFloat(t.replace(/[^\d.]*/g,""))}static findAncestor(t,e){for(;(t=t.parentElement)&&!t.classList.contains(e););return t}static setELstyles(t,e){for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t.style[s]=e[s])}static preciseAddition(t,e){const s=(String(t).split(".")[1]||"").length,i=(String(e).split(".")[1]||"").length,a=Math.pow(10,Math.max(s,i));return(Math.round(t*a)+Math.round(e*a))/a}static isNumber(t){return!isNaN(t)&&parseFloat(String(Number(t)))===t&&!isNaN(parseInt(t,10))}static isFloat(t){return Number(t)===t&&t%1!==0}static isMsEdge(){if(H.isSSR())return!1;const t=window.navigator.userAgent,e=t.indexOf("Edge/");return e>0?parseInt(t.substring(e+5,t.indexOf(".",e)),10):!1}static getGCD(t,e,s=7){let i=Math.pow(10,s-Math.floor(Math.log10(Math.max(t,e))));for(i>1?(t=Math.round(Math.abs(t)*i),e=Math.round(Math.abs(e)*i)):i=1;e;){const a=e;e=t%e,t=a}return t/i}static getPrimeFactors(t){const e=[];let s=2;for(;t>=2;)t%s==0?(e.push(s),t=t/s):s++;return e}static mod(t,e,s=7){const i=Math.pow(10,s-Math.floor(Math.log10(Math.max(t,e))));return t=Math.round(Math.abs(t)*i),e=Math.round(Math.abs(e)*i),t%e/i}};class xt{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 typeof t=="number"?!1:!isNaN(this.parseDate(t))}getTimeStamp(t){return isNaN(Date.parse(t))?t:this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toISOString().substr(0,25)).getTime():new Date(t).getTime()}getDate(t){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toUTCString()):new Date(t)}parseDate(t){const e=Date.parse(t);if(!isNaN(e))return this.getTimeStamp(t);let s=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return s=this.getTimeStamp(s),s}parseDateWithTimezone(t){return Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "))}formatDate(t,e){const s=this.w.globals.locale,i=this.w.config.xaxis.labels.datetimeUTC,a=["\0",...s.months],n=["�",...s.shortMonths],r=["�",...s.days],o=["�",...s.shortDays];function l(_,C=2){let S=_+"";for(;S.length<C;)S="0"+S;return S}const c=i?t.getUTCFullYear():t.getFullYear();e=e.replace(/(^|[^\\])yyyy+/g,"$1"+c),e=e.replace(/(^|[^\\])yy/g,"$1"+c.toString().substr(2,2)),e=e.replace(/(^|[^\\])y/g,"$1"+c);const h=(i?t.getUTCMonth():t.getMonth())+1;e=e.replace(/(^|[^\\])MMMM+/g,"$1"+a[0]),e=e.replace(/(^|[^\\])MMM/g,"$1"+n[0]),e=e.replace(/(^|[^\\])MM/g,"$1"+l(h)),e=e.replace(/(^|[^\\])M/g,"$1"+h);const d=i?t.getUTCDate():t.getDate();e=e.replace(/(^|[^\\])dddd+/g,"$1"+r[0]),e=e.replace(/(^|[^\\])ddd/g,"$1"+o[0]),e=e.replace(/(^|[^\\])dd/g,"$1"+l(d)),e=e.replace(/(^|[^\\])d/g,"$1"+d);const f=i?t.getUTCHours():t.getHours();e=e.replace(/(^|[^\\])HH+/g,"$1"+l(f)),e=e.replace(/(^|[^\\])H/g,"$1"+f);const u=f>12?f-12:f===0?12:f;e=e.replace(/(^|[^\\])hh+/g,"$1"+l(u)),e=e.replace(/(^|[^\\])h/g,"$1"+u);const g=i?t.getUTCMinutes():t.getMinutes();e=e.replace(/(^|[^\\])mm+/g,"$1"+l(g)),e=e.replace(/(^|[^\\])m/g,"$1"+g);const p=i?t.getUTCSeconds():t.getSeconds();e=e.replace(/(^|[^\\])ss+/g,"$1"+l(p)),e=e.replace(/(^|[^\\])s/g,"$1"+p);let b=i?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(b,3)),b=Math.round(b/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(b)),b=Math.round(b/10),e=e.replace(/(^|[^\\])f/g,"$1"+b);const m=f<12?"AM":"PM";e=e.replace(/(^|[^\\])TT+/g,"$1"+m),e=e.replace(/(^|[^\\])T/g,"$1"+m.charAt(0));const A=m.toLowerCase();e=e.replace(/(^|[^\\])tt+/g,"$1"+A),e=e.replace(/(^|[^\\])t/g,"$1"+A.charAt(0));let v=-t.getTimezoneOffset(),y=i||!v?"Z":v>0?"+":"-";if(!i){v=Math.abs(v);const _=Math.floor(v/60),C=v%60;y+=l(_)+":"+l(C)}e=e.replace(/(^|[^\\])K/g,"$1"+y);const w=(i?t.getUTCDay():t.getDay())+1;return e=e.replace(new RegExp(r[0],"g"),r[w]),e=e.replace(new RegExp(o[0],"g"),o[w]),e=e.replace(new RegExp(a[0],"g"),a[h]),e=e.replace(new RegExp(n[0],"g"),n[h]),e=e.replace(/\\(.)/g,"$1"),e}getTimeUnitsfromTimestamp(t,e){const s=this.w;s.config.xaxis.min!==void 0&&(t=s.config.xaxis.min),s.config.xaxis.max!==void 0&&(e=s.config.xaxis.max);const i=this.getDate(t),a=this.getDate(e),n=this.formatDate(i,"yyyy MM dd HH mm ss fff").split(" "),r=this.formatDate(a,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(n[6],10),maxMillisecond:parseInt(r[6],10),minSecond:parseInt(n[5],10),maxSecond:parseInt(r[5],10),minMinute:parseInt(n[4],10),maxMinute:parseInt(r[4],10),minHour:parseInt(n[3],10),maxHour:parseInt(r[3],10),minDate:parseInt(n[2],10),maxDate:parseInt(r[2],10),minMonth:
1parseInt(n[1],10)-1,maxMonth:parseInt(r[1],10)-1,minYear:parseInt(n[0],10),maxYear:parseInt(r[0],10)}}isLeapYear(t){return t%4===0&&t%100!==0||t%400===0}calculcateLastDaysOfMonth(t,e,s){return this.determineDaysOfMonths(t,e)-s}determineDaysOfYear(t){let e=365;return this.isLeapYear(t)&&(e=366),e}determineRemainingDaysOfYear(t,e,s){let i=this.daysCntOfYear[e]+s;return e>1&&this.isLeapYear(t)&&i++,i}determineDaysOfMonths(t,e){let s=30;switch(t=R.monthMod(t),!0){case this.months30.indexOf(t)>-1:t===2&&(this.isLeapYear(e)?s=29:s=28);break;case this.months31.indexOf(t)>-1:s=31;break;default:s=31;break}return s}getDateFields(t,e){const s=new Date(t);return e?{year:s.getUTCFullYear(),month:s.getUTCMonth(),date:s.getUTCDate(),hour:s.getUTCHours(),minute:s.getUTCMinutes(),second:s.getUTCSeconds(),ms:s.getUTCMilliseconds(),weekday:s.getUTCDay()}:{year:s.getFullYear(),month:s.getMonth(),date:s.getDate(),hour:s.getHours(),minute:s.getMinutes(),second:s.getSeconds(),ms:s.getMilliseconds(),weekday:s.getDay()}}addInterval(t,e,s,i){const a=new Date(t);if(i)switch(e){case"year":a.setUTCFullYear(a.getUTCFullYear()+s);break;case"month":a.setUTCMonth(a.getUTCMonth()+s);break;case"week":a.setUTCDate(a.getUTCDate()+s*7);break;case"day":a.setUTCDate(a.getUTCDate()+s);break;case"hour":a.setUTCHours(a.getUTCHours()+s);break;case"minute":a.setUTCMinutes(a.getUTCMinutes()+s);break;case"second":a.setUTCSeconds(a.getUTCSeconds()+s);break}else switch(e){case"year":a.setFullYear(a.getFullYear()+s);break;case"month":a.setMonth(a.getMonth()+s);break;case"week":a.setDate(a.getDate()+s*7);break;case"day":a.setDate(a.getDate()+s);break;case"hour":a.setHours(a.getHours()+s);break;case"minute":a.setMinutes(a.getMinutes()+s);break;case"second":a.setSeconds(a.getSeconds()+s);break}return a.getTime()}ceilToBoundary(t,e,s,i){const a=new Date(t);if(i)switch(e){case"second":{const n=a.getUTCSeconds(),r=Math.ceil(n/s)*s;return r===n&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(r),a.getTime())}case"minute":{const n=a.getUTCMinutes(),r=Math.ceil(n/s)*s;return r===n&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(r),a.getTime())}case"hour":{const n=a.getUTCHours(),r=Math.ceil(n/s)*s;return r===n&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(r),a.getTime())}case"day":return a.getUTCHours()===0&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0),a.setUTCDate(a.getUTCDate()+1),a.getTime());case"week":{const r=Date.UTC(1970,0,5);a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0);const o=a.getTime(),l=Math.ceil((o-r)/6048e5),c=Math.ceil(l/s)*s,h=r+c*6048e5;return h>=t?h:h+s*6048e5}case"month":{const n=a.getUTCMonth(),r=Math.ceil(n/s)*s;return r===n&&a.getUTCDate()===1&&a.getUTCHours()===0&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:(a.setUTCMilliseconds(0),a.setUTCSeconds(0),a.setUTCMinutes(0),a.setUTCHours(0),a.setUTCDate(1),a.setUTCMonth(r),a.getTime())}case"year":{const n=a.getUTCFullYear(),r=Math.ceil(n/s)*s;return r===n&&a.getUTCMonth()===0&&a.getUTCDate()===1&&a.getUTCHours()===0&&a.getUTCMinutes()===0&&a.getUTCSeconds()===0&&a.getUTCMilliseconds()===0?t:Date.UTC(r,0,1)}}else switch(e){case"second":{const n=a.getSeconds(),r=Math.ceil(n/s)*s;return r===n&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(r),a.getTime())}case"minute":{const n=a.getMinutes(),r=Math.ceil(n/s)*s;return r===n&&a.getSeconds()===0&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(r),a.getTime())}case"hour":{const n=a.getHours(),r=Math.ceil(n/s)*s;return r===n&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(r),a.getTime())}case"day":return a.getHours()===0&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.setDate(a.getDate()+1),a.getTime());case"week":{const r=new Date(1970,0,5).getTime();a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0);const o=a.getTime(),l=Math.ceil((o-r)/6048e5),c=Math.ceil(l/s)*s,h=r+c*6048e5;return h>=t?h:h+s*6048e5}
1case"month":{const n=a.getMonth(),r=Math.ceil(n/s)*s;return r===n&&a.getDate()===1&&a.getHours()===0&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0?t:(a.setMilliseconds(0),a.setSeconds(0),a.setMinutes(0),a.setHours(0),a.setDate(1),a.setMonth(r),a.getTime())}case"year":{const n=a.getFullYear(),r=Math.ceil(n/s)*s;return r===n&&a.getMonth()===0&&a.getDate()===1&&a.getHours()===0&&a.getMinutes()===0&&a.getSeconds()===0&&a.getMilliseconds()===0?t:new Date(r,0,1).getTime()}}return t}isAtBoundary(t,e,s){const i=this.getDateFields(t,s);switch(e){case"year":return i.month===0&&i.date===1&&i.hour===0&&i.minute===0&&i.second===0&&i.ms===0;case"month":return i.date===1&&i.hour===0&&i.minute===0&&i.second===0&&i.ms===0;case"day":return i.hour===0&&i.minute===0&&i.second===0&&i.ms===0;case"hour":return i.minute===0&&i.second===0&&i.ms===0;case"minute":return i.second===0&&i.ms===0;case"second":return i.ms===0}return!1}}class be{constructor(t){this.w=t,this.tooltipKeyFormat="dd MMM"}xLabelFormat(t,e,s,i){const a=this.w;if(a.config.xaxis.type==="datetime"&&a.config.xaxis.labels.formatter===void 0&&a.config.tooltip.x.formatter===void 0){const n=new xt(this.w);return n.formatDate(n.getDate(e),a.config.tooltip.x.format)}return t(e,s,i)}defaultGeneralFormatter(t){return Array.isArray(t)?t.map(e=>e):t}defaultYFormatter(t,e){const s=this.w;if(R.isNumber(t))if(s.globals.yValueDecimal!==0)t=t.toFixed(e.decimalsInFloat!==void 0?e.decimalsInFloat:s.globals.yValueDecimal);else{const i=t.toFixed(0);t=Number(i)===t?i:t.toFixed(1)}return t}setLabelFormatters(){const t=this.w,e=t.formatters;return e.xaxisTooltipFormatter=s=>this.defaultGeneralFormatter(s),e.ttKeyFormatter=s=>this.defaultGeneralFormatter(s),e.ttZFormatter=s=>s,e.legendFormatter=s=>this.defaultGeneralFormatter(s),t.config.xaxis.labels.formatter!==void 0?e.xLabelFormatter=t.config.xaxis.labels.formatter:e.xLabelFormatter=s=>{if(R.isNumber(s)){if(!t.config.xaxis.convertedCatToNumeric&&t.config.xaxis.type==="numeric"){if(R.isNumber(t.config.xaxis.decimalsInFloat))return s.toFixed(t.config.xaxis.decimalsInFloat);{const i=t.globals.maxX-t.globals.minX;if(i>0){const a=i/10,n=Math.max(0,-Math.floor(Math.log10(a)));return s.toFixed(n)}return s.toFixed(0)}}return t.globals.isBarHorizontal&&t.globals.maxY-t.globals.minY<4?s.toFixed(1):s.toFixed(0)}return s},typeof t.config.tooltip.x.formatter=="function"?e.ttKeyFormatter=t.config.tooltip.x.formatter:e.ttKeyFormatter=e.xLabelFormatter,typeof t.config.xaxis.tooltip.formatter=="function"&&(e.xaxisTooltipFormatter=t.config.xaxis.tooltip.formatter),(Array.isArray(t.config.tooltip.y)||t.config.tooltip.y.formatter!==void 0)&&(e.ttVal=t.config.tooltip.y),t.config.tooltip.z.formatter!==void 0&&(e.ttZFormatter=t.config.tooltip.z.formatter),t.config.legend.formatter!==void 0&&(e.legendFormatter=t.config.legend.formatter),e.yLabelFormatters=[],t.config.yaxis.forEach((s,i)=>{if(s.labels.formatter!==void 0)e.yLabelFormatters[i]=s.labels.formatter;else if(t.config.chart.type==="violin"){const a=n=>typeof n=="number"&&isFinite(n)?`${Math.round(n*100)/100}`:n;e.yLabelFormatters[i]=n=>t.globals.xyCharts?Array.isArray(n)?n.map(a):a(n):n}else e.yLabelFormatters[i]=a=>t.globals.xyCharts?Array.isArray(a)?a.map(n=>this.defaultYFormatter(n,s)):this.defaultYFormatter(a,s):a}),t.globals}heatmapLabelFormatters(){const t=this.w;if(t.config.chart.type==="heatmap"){t.globals.yAxisScale[0].result=t.seriesData.seriesNames.slice();const e=t.seriesData.seriesNames.reduce((s,i)=>s.length>i.length?s:i,0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}const He=({isTimeline:x,seriesIndex:t,dataPointIndex:e,y1:s,y2:i,w:a})=>{var n;let r=a.rangeData.seriesRangeStart[t][e],o=a.rangeData.seriesRangeEnd[t][e],l=a.labelData.labels[e],c=a.config.series[t].name?a.config.series[t].name:"";const h=a.formatters.ttKeyFormatter,d=a.config.tooltip.y.title.formatter,f={w:a,seriesIndex:t,dataPointIndex:e,start:r,end:o};typeof d=="function"&&(c=d(c,f)),(n=a.config.series[t].data[e])!=null&&n.x&&(l=a.config.series[t].data[e].x),x||a.config.xaxis.type==="datetime"&&(l=new be(a).xLabelFormat(a.formatters.ttKeyFormatter,l,l,{i:void 0,dateFormatter:new xt(a).formatDate,w:a})),typeof h=="function"&&(l=h(l,f)),Number.isFinite(s)&&Number.isFinite(i)&&(r=s,o=i);let u="",g="";const p=a.globals.colors[t];if(a.config.tooltip.x.formatter===void 0)if(a.config.xaxis.type==="datetime"){const b=new xt(a);u=b.formatDate(b.getDate(r),a.config.tooltip.x.format),g=b.formatDate(b.getDate(o),a.config.tooltip.x.format)}else u=r,g=o;else u=a.config.tooltip.x.formatter(r),g=a.config.tooltip.x.formatter(o);return{start:r,end:o,startVal:u,endVal:g,ylabel:l,color:p,seriesName:c}},We=x=>{let{color:t,seriesName:e,ylabel:s,start:i,end:a,seriesIndex:n,dataPointIndex:r}=x;const o=x.w.globals.tooltip.tooltipLabels.getFormatters(n);i=o.yLbFormatter(i),a=o.yLbFormatter(a);const l=o.yLbFormatter(x.w.seriesData.series[n][r]);let c="";const h=`<span class="value start-value">
2  ${i}
3  </span> <span class="separator">-</span> <span class="value end-value">
4  ${a}
5  </span>`;return x.w.globals.comboCharts?x.w.config.series[n].type==="rangeArea"||x.w.c
5onfig.series[n].type==="rangeBar"?c=h:c=`<span>${l}</span>`:c=h,'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+t+'">'+(e||"")+'</span></div><div> <span class="category">'+s+": </span> "+c+" </div></div>"};class xe{constructor(t){this.opts=t}hideYAxis(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}line(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}sparkline(t){this.hideYAxis();const e={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}};return R.extend(t,e)}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(t,e){const s=e.w.config.series[e.seriesIndex].name;return t!==null?s+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}bar(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"square"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}funnel(){return this.hideYAxis(),Z(G({},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 Z(G({},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}}}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,t,e,["Open","High","","Low","Close"],"candlestick")},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}boxPlot(){return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,t,e,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}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:({seriesIndex:t,dataPointIndex:e,w:s})=>this._getViolinTooltip(s,t,e)},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}rangeBar(){const t=s=>{const{color:i,seriesName:a,ylabel:n,startVal:r,endVal:o}=He(Z(G({},s),{isTimeline:!0}));return We(Z(G({},s),{color:i,seriesName:a,ylabel:n,start:r,end:o}))},e=s=>{const{color:i,seriesName:a,ylabel:n,start:r,end:o}=He(s);return We(Z(G({},s),{color:i,seriesName:a,ylabel:n,start:r,end:o}))};return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter(s,{seriesIndex:i,dataPointIndex:a,w:n}){const r=()=>{const o=n.rangeData.seriesRangeStart[i][a];return n.rangeData.seriesRangeEnd[i][a]-o};return n.globals.comboCharts?n.config.series[i].type==="rangeBar"||n.config.series[i].type==="rangeArea"?r():s:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom(s){return s.w.config.plotOptions&&s.w.config.plotOptions.bar&&s.w.config.plotOptions.bar.horizontal?t(s):e(s)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(t){var e,s;return(e=t.plotOptions.bar)!=null&&e.barHeight||(t.plotOptions.bar.barHeight=2),(s=t.plotOptions.bar)!=null&&s.columnWidth||(t.plotOptions.bar.columnWidth=2),t}area(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}rangeArea(){const t=e=>{const{color:s,seriesName:i,ylabel:a,start:n,end:r}=He(e);return We(Z(G({},e),{color:s,seriesName:i,ylabel:a,start:n,end:r}))};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(e){return t(e)}}}}brush(t){const e={chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}};return R.extend(t,e)}stacked100(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;const e=t.dataLabels.formatter;return t.yaxis.forEach((i,a)=>{t.yaxis[a].min=0,t.yaxis[a].max=100}),t.chart.type==="bar"&&(t.dataLabels.formatter=e||function(i){return typeof i=="number"?i&&i.toFixed(0)+"%":i}),t}stackedBars(){const t=this.bar();return Z(G({},t),{plotOptions:Z(G({},t.plotOptions),{bar:Z(G({},t.plotOptions.bar),{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}convertCatToNumeric(t){return t.xaxis.convertedCatToNumeric=!0,t}convertCatToNumericXaxis(t,e){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(a){return R.isNumber(a)?Math.floor(a):a};const s=t.xaxis.labels.formatter;let i=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return e&&e.length&&(i=e.map(a=>Array.isArray(a)?a:String(a))),i&&i.length&&(t.xaxis.labels.formatter=function(a){return R.isNumber(a)?s(i[Math.floor(a)-1]):s(a)}),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}}}}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){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}donut(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}polarArea(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}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,s,i,a){const n=t.candleData.seriesCandleO[e][s],r=t.candleData.seriesCandleH[e][s],o=t.candleData.seriesCandleM[e][s],l=t.candleData.seriesCandleL[e][s],c=t.candleData.seriesCandleC[e][s],h=t.config.series[e];return h.type&&h.type!==a?`<div class="apexcharts-custom-tooltip">
6          ${h.name?h.name:"series-"+(e+1)}: <strong>${t.seriesData.series[e][s]}</strong>
7        </div>`:`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div>${i[0]}: <span class="value">`+n+`</span></div><div>${i[1]}: <span class="value">
7`+r+"</span></div>"+(o?`<div>${i[2]}: <span class="value">`+o+"</span></div>":"")+`<div>${i[3]}: <span class="value">`+l+`</span></div><div>${i[4]}: <span class="value">`+c+"</span></div></div>"}_getViolinTooltip(t,e,s){var i,a,n;const r=(i=t.violinData.seriesViolinMin[e])==null?void 0:i[s],o=(a=t.violinData.seriesViolinMax[e])==null?void 0:a[s],l=((n=t.violinData.seriesViolinPoints[e])==null?void 0:n[s])||[],c=t.config.series[e].name||"series-"+(e+1);return`<div class="apexcharts-tooltip-box apexcharts-tooltip-${t.config.chart.type}"><div class="apexcharts-tooltip-violin-name">${c}</div><div>Min: <span class="value">${r}</span></div><div>Max: <span class="value">${o}</span></div><div>Observations: <span class="value">${l.length}</span></div></div>`}}const Ra="en",Ta={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"}},Oi={name:Ra,options:Ta};class St{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:[],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:[Oi],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,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},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,pinch:!0,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:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},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"},points:{show:!1,shape:"circle",size:2.5,jitter:.5,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}},violin:{bandwidthScale:1,normalize:"individual",points:{show:!0,shape:"circle",size:2.5,jitter:.5,constrainToViolin:!0,maxPoints:3e3,opacity:.9,fillColor:"series-dark",strokeColor:"#fff",strokeWidth:1}}
7,heatmap:{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}}},funnel:{shape:"rectangle",lastShape:"flat"},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:"#000",borderWidth:1,borderRadius:2,style:{background:"rgba(0, 0, 0, 0.6)",color:"#fff",fontSize:"12px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:6,right:6,top:2,bottom:2}}}},unit:{layout:"grouped",transition:"group",shape:"circle",image:{src:void 0,width:20,height:20,tint:!1},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",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:{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},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){return 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){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter(t){return t.globals.seriesTotals.reduce((e,s)=>e+s,0)/t.seriesData.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!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){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter(t){return t.globals.seriesTotals.reduce((e,s)=>e+s,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){return t!==null?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:!1},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],c
7olorStops:[]},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}},legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",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,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){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM",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:""}}}}}class me{constructor(t){this.opts=t}init({responsiveOverride:t}){var e,s,i,a,n,r,o,l,c,h;let d=this.opts;const f=new St,u=new xe(d);d=this.normalizeAliasedChartType(d),this.chartType=d.chart.type,d=this.extendYAxis(d),d=this.extendAnnotations(d);let g=f.init(),p={};if(d&&typeof d=="object"){let m={};const A=["line","area","bar","candlestick","boxPlot","violin","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","unit","sunburst","pie","polarArea","donut","radar","radialBar"],v=d.chart.requestedType;v==="funnel"||v==="pyramid"?m=u[v]():v==="gauge"?m=u.gauge():A.indexOf(d.chart.type)!==-1?m=u[d.chart.type]():m=u.line(),(s=(e=d.plotOptions)==null?void 0:e.bar)!=null&&s.isFunnel&&(m=u.funnel()),d.chart.stacked&&d.chart.type==="bar"&&(m=u.stackedBars()),(i=d.chart.brush)!=null&&i.enabled&&(m=u.brush(m)),(n=(a=d.plotOptions)==null?void 0:a.line)!=null&&n.isSlopeChart&&(m=u.slope()),d.chart.stacked&&d.chart.stackType==="100%"&&(d=u.stacked100(d)),(o=(r=d.plotOptions)==null?void 0:r.bar)!=null&&o.isDumbbell&&(d=u.dumbbell(d)),this.checkForDarkTheme(H.getApex()),this.checkForDarkTheme(d),d.xaxis=d.xaxis||H.getApex().xaxis||{},t||(d.xaxis.convertedCatToNumeric=!1),d=this.checkForCatToNumericXAxis(this.chartType,m,d),((l=d.chart.sparkline)!=null&&l.enabled||(h=(c=H.getApex().chart)==null?void 0:c.sparkline)!=null&&h.enabled)&&(m=u.sparkline(m)),p=R.extend(g,m)}const b=R.extend(p,H.getApex());return g=R.extend(b,d),g=this.handleUserInputErrors(g),g}normalizeAliasedChartType(t){if(!t||!t.chart)return t;const e=t.chart.type;return e!=="funnel"&&e!=="pyramid"&&e!=="gauge"&&e!=="waffle"||(t.chart.requestedType=e,e==="waffle"?(t.plotOptions=t.plotOptions||{},t.plotOptions.unit=t.plotOptions.unit||{},t.plotOptions.unit.layout==null&&(t.plotOptions.unit.layout="grid"),t.plotOptions.unit.shape==null&&(t.plotOptions.unit.shape="square"),t.chart.type="unit"):e==="funnel"||e==="pyramid"?(t.plotOptions=t.plotOptions||{},t.plotOptions.bar=t.plotOptions.bar||{},t.plotOptions.bar.isFunnel=!0,t.plotOptions.bar.horizontal=!0,t.chart.type="bar",e==="pyramid"?t.plotOptions.bar.isPyramid=!0:t.plotOptions.bar.isPyramid=!1):e==="gauge"&&(t.chart.type="radialBar")),t}checkForCatToNumericXAxis(t,e,s){var i,a,n,r,o;const l=new xe(s),c=(t==="bar"||t==="boxPlot"||t==="violin")&&((a=(i=s.plotOptions)==null?void 0:i.bar)==null?void 0:a.horizontal),h=t==="pie"||t==="polarArea"||t==="donut"||t==="radar"||t==="radialBar"||t==="heatmap"||t==="unit"||t==="sunburst",d=s.xaxis.type!=="datetime"&&s.xaxis.type!=="numeric",f=(t==="scatter"||t==="bubble")&&((o=(r=(n=s.plotOptions)==null?void 0:n.scatter)==null?void 0:r.jitter)==null?void 0:o.enabled),u=s.xaxis.tickPlacement?s.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return!c&&!h&&!f&&d&&u!=="between"&&(s=l.convertCatToNumeric(s)),s}extendYAxis(t,e){const s=new St;(typeof t.yaxis>"u"||!t.yaxis||Array.isArray(t.yaxis)&&t.yaxis.length===0)&&(t.yaxis={});const i=H.getApex();
7t.yaxis.constructor!==Array&&i.yaxis&&i.yaxis.constructor!==Array&&(t.yaxis=R.extend(t.yaxis,i.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[R.extend(s.yAxis,t.yaxis)]:t.yaxis=R.extendArray(t.yaxis,s.yAxis);let a=!1;t.yaxis.forEach(r=>{r.logarithmic&&(a=!0)});let n=t.series;return e&&!n&&(n=e.config.series),a&&n.length!==t.yaxis.length&&n.length&&(t.yaxis=n.map((r,o)=>{if(r.name||(n[o].name=`series-${o+1}`),t.yaxis[o])return t.yaxis[o].seriesName=n[o].name,t.yaxis[o];{const l=R.extend(s.yAxis,t.yaxis[0]);return l.show=!1,l}})),a&&n.length>1&&n.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}extendAnnotations(t){return typeof t.annotations>"u"&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t),t}extendYAxisAnnotations(t){const e=new St;return t.annotations.yaxis=R.extendArray(typeof t.annotations.yaxis<"u"?t.annotations.yaxis:[],e.yAxisAnnotation),t}extendXAxisAnnotations(t){const e=new St;return t.annotations.xaxis=R.extendArray(typeof t.annotations.xaxis<"u"?t.annotations.xaxis:[],e.xAxisAnnotation),t}extendPointAnnotations(t){const e=new St;return t.annotations.points=R.extendArray(typeof t.annotations.points<"u"?t.annotations.points:[],e.pointAnnotation),t}checkForDarkTheme(t){t.theme&&t.theme.mode==="dark"&&(t.tooltip||(t.tooltip={}),t.tooltip.theme!=="light"&&(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(e.chart.type==="bar"&&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(e.chart.type==="bar"||e.chart.type==="rangeBar")&&e.tooltip.shared&&e.xaxis.crosshairs.width==="barWidth"&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),(e.chart.type==="candlestick"||e.chart.type==="boxPlot")&&e.yaxis[0].reversed&&(console.warn(`Reversed y-axis in ${e.chart.type} chart is not supported.`),e.yaxis[0].reversed=!1),e}}const zi=1.618,Hi=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],rs=[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 Wi{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=(r,o,l=o)=>{Object.defineProperty(r,l,{get(){return t[o]},set(c){t[o]=c},enumerable:!0,configurable:!0})},s={};e(s,"series","data");for(const r of["seriesNames","seriesX","seriesZ","seriesXvalues","seriesYvalues","seriesGoals","seriesLog","seriesColors","seriesPercent","seriesTotals","stackedSeriesTotals","seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC","seriesRangeStart","seriesRangeEnd","seriesRange","seriesYAxisMap","seriesYAxisReverseMap","seriesGroups","barGroups","lineGroups","areaGroups","originalSeries","collapsedSeries","collapsedSeriesIndices","ancillaryCollapsedSeries","ancillaryCollapsedSeriesIndices","allSeriesCollapsed","risingSeries","previousPaths","ignoreYAxisIndexes","labels","categoryLabels","timescaleLabels","groups"])e(s,r);Object.defineProperty(t,"seriesNS",{value:s,writable:!1,enumerable:!1,
7configurable:!0});const i={};for(const r of["minX","maxX","initialMinX","initialMaxX","minY","maxY","minYArr","maxYArr","minZ","maxZ","minDate","maxDate","minXDiff","xRange","yRange","zRange","xAxisScale","yAxisScale","xAxisTicksPositions","xTickAmount","multiAxisTickAmount","dataPoints","maxValsInArrayIndex","isXNumeric","isMultipleYAxis","isMultiLineX","isDataXYZ","dataFormatXNumeric","allSeriesHasEqualX","hasNullValues","dataWasParsed","hasXaxisGroups","hasSeriesGroups","skipFirstTimelinelabel","skipLastTimelinelabel","yValueDecimal","invalidLogScale","noLabelsProvided"])e(i,r);Object.defineProperty(t,"axes",{value:i,writable:!1,enumerable:!1,configurable:!0});const a={};for(const r 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,r);Object.defineProperty(t,"layout",{value:a,writable:!1,enumerable:!1,configurable:!0});const n={};for(const r of["domCache","dimensionCache","cachedSelectors","textRectsCache","pointsArray","dataLabelsRects","lastDrawnDataLabelsIndexes","delayedElements","resizeTimer","selectionResizeTimer","resizeObserver"])e(n,r);Object.defineProperty(t,"cache",{value:n,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},LINE_HEIGHT_RATIO:zi,axisCharts:!0,isSlopeChart:t.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],prevStreamFrame:null,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:Hi,niceScaleDefaultTicks:rs,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}defineLazyInitialSeries(t){let e=[],s=null;Object.defineProperty(t,"initialSeries",{configurable:!0,enumerable:!0,get(){return s===null&&(s=R.clone(e)),s},set(i){e=Array.isArray(i)?i.map(a=>a&&typeof a=="object"&&!Array.isArray(a)?G({},a):a):i,s=null,t._initialSeriesPeek=e}}),t._initialSeriesPeek=e}init(t){const e=this.globalVars(t);return this.initGlobalVars(e),this.defineLazyInitialSeries(e),e.initialConfig=R.extend({},t),e.initialSeries=t.series,e.lastXAxis=R.clone(e.initialConfig.xaxis),e.lastYAxis=R.clone(e.initialConfig.yaxis),e}}class Pa{constructor(t){this.opts=t}init(){const t=new me(this.opts).init({responsiveOverride:!1}),e=new Wi().init(t),s={config:t,globals:e,dom:{},interact:{zoomEnabled:t.chart.toolbar.autoSelected==="zoom"&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:t.chart.toolbar.autoSelected==="pan"&&t.chart.toolbar.tools.pan,selectionEnabled:t.chart.toolbar.autoSelected==="selection"&&t.chart.toolbar.tools.selection,measureEnabled:t.chart.toolbar.autoSelected==="measure"&&!!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:H.isBrowser()?"ontouchstart"in window||navigator.maxTouchPoints>0:!1},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:[],seriesViolinMin:[],seriesViolinMax:[]},labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,noLabelsProvi
7ded:!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:[]}};Object.defineProperty(e,"dom",{get(){return s.dom},set(i){s.dom=i},enumerable:!1,configurable:!0});for(const i of["xLabelFormatter","yLabelFormatters","xaxisTooltipFormatter","ttKeyFormatter","ttVal","ttZFormatter","legendFormatter"])Object.defineProperty(e,i,{get(){return s.formatters[i]},set(a){s.formatters[i]=a},enumerable:!1,configurable:!0});for(const i of["zoomEnabled","panEnabled","selectionEnabled","zoomed","selection","visibleXRange","selectedDataPoints","mousedown","clientX","clientY","lastClientPosition","capturedSeriesIndex","capturedDataPointIndex","disableZoomIn","disableZoomOut","isTouchDevice"])Object.defineProperty(e,i,{get(){return s.interact[i]},set(a){s.interact[i]=a},enumerable:!1,configurable:!0});for(const i of["gridHeight","gridWidth","translateX","translateY","translateXAxisX","translateXAxisY","rotateXLabels","xAxisHeight","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yLabelsCoords","yTitleCoords"])Object.defineProperty(e,i,{get(){return s.layout[i]},set(a){s.layout[i]=a},enumerable:!1,configurable:!0});for(const i of["series","seriesNames","seriesX","seriesZ","seriesColors","seriesGoals","stackedSeriesTotals","stackedSeriesTotalsByGroups"])Object.defineProperty(e,i,{get(){return s.seriesData[i]},set(a){s.seriesData[i]=a},enumerable:!1,configurable:!0});for(const i of["isXNumeric","dataFormatXNumeric","isDataXYZ","isRangeData","isRangeBar","isMultiLineX","noLabelsProvided","dataWasParsed"])Object.defineProperty(e,i,{get(){return s.axisFlags[i]},set(a){s.axisFlags[i]=a},enumerable:!1,configurable:!0});for(const i of["labels","categoryLabels","timescaleLabels","hasXaxisGroups","groups","seriesGroups"])Object.defineProperty(e,i,{get(){return s.labelData[i]},set(a){s.labelData[i]=a},enumerable:!1,configurable:!0});for(const i of["seriesRangeStart","seriesRangeEnd","seriesRange"])Object.defineProperty(e,i,{get(){return s.rangeData[i]},set(a){s.rangeData[i]=a},enumerable:!1,configurable:!0});for(const i of["seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC"])Object.defineProperty(e,i,{get(){return s.candleData[i]},set(a){s.candleData[i]=a},enumerable:!1,configurable:!0});for(const i of["seriesViolinDensity","seriesViolinPoints","seriesViolinMin","seriesViolinMax"])Object.defineProperty(e,i,{get(){return s.violinData[i]},set(a){s.violinData[i]=a},enumerable:!1,configurable:!0});return s}}class rt{constructor(t){this.w=t}static checkComboSeries(t,e){let s=!1,i=0,a=0;return e===void 0&&(e="line"),t.length&&typeof t[0].type<"u"&&t.forEach(n=>{(n.type==="bar"||n.type==="column"||n.type==="candlestick"||n.type==="boxPlot"||n.type==="violin")&&i++,typeof n.type<"u"&&n.type!==e&&a++}),a>0&&(s=!0),{comboBarCount:i,comboCharts:s}}getStackedSeriesTotals(t=[]){const e=this.w,s=[];if(e.seriesData.series.length===0)return s;for(let i=0;i<e.seriesData.series[e.globals.maxValsInArrayIndex].length;i++){let a=0;for(let n=0;n<e.seriesData.series.length;n++)typeof e.seriesData.series[n][i]<"u"&&t.indexOf(n)===-1&&(a+=e.seriesData.series[n][i]);s.push(a)}return s}getSeriesTotalByIndex(t=null){if(t===null)return this.w.config.series.reduce((e,s)=>e+s,0);{const e=this.w.seriesData.series[t];return Array.isArray(e)?e.reduce((s,i)=>s+i,0):e??0}}getStackedSeriesTotalsByGroups(){const t=this.w,e=[];return t.labelData.seriesGroups.forEach(s=>{const i=[];t.config.series.forEach((n,r)=>{s.indexOf(t.seriesData.seriesNames[r])>-1&&i.push(r)});const a=t.seriesData.series.map((n,r)=>i.indexOf(r)===-1?r:-1).filter(n=>n!==-1);e.push(this.getStackedSeriesTotals(a))}),e}setSeriesYAxisMappings(){const t=this.w.globals,e=this.w.config;let s=[];const i=[],a=[],n=this.w.seriesData.series.length>e.yaxis.length||e.yaxis.some(l=>Array.isArray(l.seriesName));
7e.series.forEach((l,c)=>{a.push(c),i.push(null)}),e.yaxis.forEach((l,c)=>{s[c]=[]});const r=[];e.yaxis.forEach((l,c)=>{let h=!1;if(l.seriesName){let d=[];Array.isArray(l.seriesName)?d=l.seriesName:d.push(l.seriesName),d.forEach(f=>{e.series.forEach((u,g)=>{if(u.name===f){let p=g;c===g||n?!n||a.indexOf(g)>-1?s[c].push([c,g]):console.warn("Series '"+u.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(s[g].push([g,c]),p=c),h=!0,p=a.indexOf(p),p!==-1&&a.splice(p,1)}})})}h||r.push(c)}),s=s.map(l=>{const c=[];return l.forEach(h=>{i[h[1]]=h[0],c.push(h[1])}),c});let o=e.yaxis.length-1;for(let l=0;l<r.length&&(o=r[l],s[o]=[],a);l++){const c=a[0];a.shift(),s[o].push(c),i[c]=o}a.forEach(l=>{s[o].push(l),i[l]=o}),t.seriesYAxisMap=s.map(l=>l),t.seriesYAxisReverseMap=i.map(l=>l),t.seriesYAxisMap.forEach((l,c)=>{l.forEach(h=>{if(e.series[h]&&e.series[h].group===void 0){const d=e.series[h];d.group="apexcharts-axis-".concat(c.toString())}})})}isSeriesNull(t=null){let e=[];const s=this.w.config.series;return t===null?e=s.filter(i=>i!==null):s[t]&&Array.isArray(s[t].data)?e=s[t].data.filter(i=>i!==null):e=s[t]!==null&&s[t]!==void 0?[s[t]]:[],e.length===0}seriesHaveSameValues(t){const e=this.w.seriesData.series[t];return Array.isArray(e)?e.every((s,i,a)=>s===a[0]):!0}getCategoryLabels(t){const e=this.w;let s=t.slice();return e.config.xaxis.convertedCatToNumeric&&(s=t.map(i=>e.config.xaxis.labels.formatter(i-e.globals.minX+1))),s}getLargestSeries(){const t=this.w;t.globals.maxValsInArrayIndex=t.seriesData.series.map(e=>e.length).indexOf(Math.max.apply(Math,t.seriesData.series.map(e=>e.length)))}getLargestMarkerSize(){const t=this.w;let e=0;return t.globals.markers.size.forEach(s=>{e=Math.max(e,s)}),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach(s=>{e=Math.max(e,s.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(e=>{let s=0;if(Array.isArray(e))for(let i=0;i<e.length;i++)s+=e[i];else s+=e;return s})}getSeriesTotalsXRange(t,e){const s=this.w;return s.seriesData.series.map((a,n)=>{let r=0;for(let o=0;o<a.length;o++)s.seriesData.seriesX[n][o]>t&&s.seriesData.seriesX[n][o]<e&&(r+=a[o]);return r})}getPercentSeries(){const t=this.w;t.globals.seriesPercent=t.seriesData.series.map(e=>{const s=[];if(Array.isArray(e))for(let i=0;i<e.length;i++){const a=t.seriesData.stackedSeriesTotals[i];let n=0;a&&(n=100*e[i]/a),s.push(n)}else{const i=t.globals.seriesTotals.reduce((n,r)=>n+r,0),a=100*e/i;s.push(a)}return s})}getCalculatedRatios(){const t=this.w,e=t.globals,s=[];let i=0,a=0,n=0,r=0,o=[],l=.1,c=0;if(e.yRange=[],e.isMultipleYAxis)for(let h=0;h<e.minYArr.length;h++)e.yRange.push(Math.abs(e.minYArr[h]-e.maxYArr[h])),o.push(0);else e.yRange.push(Math.abs(e.minY-e.maxY));e.xRange=Math.abs(e.maxX-e.minX),e.zRange=Math.abs(e.maxZ-e.minZ);for(let h=0;h<e.yRange.length;h++)s.push(e.yRange[h]/this.w.layout.gridHeight);if(a=e.xRange/this.w.layout.gridWidth,i=e.yRange/this.w.layout.gridWidth,n=e.xRange/this.w.layout.gridHeight,r=e.zRange/this.w.layout.gridHeight*16,r||(r=1),e.minY!==Number.MIN_VALUE&&Math.abs(e.minY)!==0){const h=e;h.hasNegs=!0}if(t.globals.seriesYAxisReverseMap.length>0){const h=(d,f)=>{const u=t.config.yaxis[t.globals.seriesYAxisReverseMap[f]];if(!u)return 0;const g=d<0?-1:1;return d=Math.abs(d),u.logarithmic&&(d=this.getBaseLog(u.logBase,d)),-g*d/s[f]};if(e.isMultipleYAxis){o=[];for(let d=0;d<s.length;d++)o.push(h(e.minYArr[d],d))}else o=[],o.push(h(e.minY,0)),e.minY!==Number.MIN_VALUE&&Math.abs(e.minY)!==0&&(l=-e.minY/i,c=e.minX/a)}else o=[],o.push(0),l=0,c=0;return{yRatio:s,invertedYRatio:i,zRatio:r,xRatio:a,invertedXRatio:n,baseLineInvertedY:l,baseLineY:o,baseLineX:c}}getLogSeries(t){const e=this.w;return e.globals.seriesLog=t.map((s,i)=>{const a=e.globals.seriesYAxisReverseMap[i];return e.config.yaxis[a]&&e.config.yaxis[a].logarithmic?s.map(n=>n===null?null:this.getLogVal(e.config.yaxis[a].logBase,n,i)):s}),e.globals.invalidLogScale?t:e.globals.seriesLog}getLogValAtSeriesIndex(t,e){if(t===null)return null;const s=this.w,i=s.globals.seriesYAxisReverseMap[e];return s.config.yaxis[i]&&s.config.yaxis[i].logarithmic?this.getLogVal(s.config.yaxis[i].logBase,t,e):t}getBaseLog(t,e){return Math.log(e)/Math.log(t)}getLogVal(t,e,s){if(e<=0)return 0;
7const i=this.w,a=i.globals.minYArr[s]===0?-1:this.getBaseLog(t,i.globals.minYArr[s]),r=(i.globals.maxYArr[s]===0?0:this.getBaseLog(t,i.globals.maxYArr[s]))-a;return e<1?e/r:(this.getBaseLog(t,e)-a)/r}getLogYRatios(t){const e=this.w,s=this.w.globals,i=s;return i.yLogRatio=t.slice(),i.logYRange=s.yRange.map((a,n)=>{const r=e.globals.seriesYAxisReverseMap[n];if(e.config.yaxis[r]&&this.w.config.yaxis[r].logarithmic){let o=-Number.MAX_VALUE,l=Number.MIN_VALUE,c=1;return s.seriesLog.forEach((h,d)=>{h.forEach(f=>{e.config.yaxis[d]&&e.config.yaxis[d].logarithmic&&(o=Math.max(f,o),l=Math.min(f,l))})}),c=Math.pow(s.yRange[n],Math.abs(l-o)/s.yRange[n]),i.yLogRatio[n]=c/this.w.layout.gridHeight,c}}),i.invalidLogScale?t.slice():i.yLogRatio}static extendArrayProps(t,e,s){var i,a;return e?.yaxis&&(e=t.extendYAxis(e,s)),e?.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),(i=e?.annotations)!=null&&i.xaxis&&(e=t.extendXAxisAnnotations(e)),(a=e?.annotations)!=null&&a.points&&(e=t.extendPointAnnotations(e))),e}drawSeriesByGroup(t,e,s,i){const a=this.w,n=[];return t.series.length>0&&e.forEach(r=>{const o=[],l=[];t.i.forEach((c,h)=>{a.config.series[c].group===r&&(o.push(t.series[h]),l.push(c))}),o.length>0&&n.push(i.draw(o,s,l))}),n}}const tt="http://www.w3.org/2000/svg";class mt{constructor(t,e){typeof t=="object"?(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 mt(this.x,this.y)}}class Ht{constructor(t,e,s,i,a,n){this.a=t??1,this.b=e??0,this.c=s??0,this.d=i??1,this.e=a??0,this.f=n??0}rotate(t){const e=t*Math.PI/180,s=Math.cos(e),i=Math.sin(e);return this.multiply(new Ht(s,i,-i,s,0,0))}scale(t,e){return this.multiply(new Ht(t,0,0,e??t,0,0))}multiply(t){return new Ht(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 mt(this.a*t.x+this.c*t.y+this.e,this.b*t.x+this.d*t.y+this.f)}}class Fa{constructor(t,e,s,i){this.x=t,this.y=e,this.w=s,this.h=i,this.width=s,this.height=i,this.x2=t+s,this.y2=e+i}}function Vt(x){if(!x||typeof x!="string")return[["M",0,0]];const t=[],e=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,s=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;let i;const a=[],n=[];for(;(i=e.exec(x))!==null;)a.push(i[1]),n.push(i.index);for(let r=0;r<a.length;r++){const o=n[r]+a[r].length,l=r+1<n.length?n[r+1]:x.length,c=x.substring(o,l),h=[];let d;for(s.lastIndex=0;(d=s.exec(c))!==null;)h.push(parseFloat(d[0]));const f=a[r].toUpperCase();if(f==="Z")t.push(["Z"]);else if(f==="M"||f==="L"||f==="T")for(let u=0;u<h.length;u+=2)t.push([f,h[u],h[u+1]]);else if(f==="H")for(let u=0;u<h.length;u++)t.push([f,h[u]]);else if(f==="V")for(let u=0;u<h.length;u++)t.push([f,h[u]]);else if(f==="C")for(let u=0;u<h.length;u+=6)t.push([f,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5]]);else if(f==="S"||f==="Q")for(let u=0;u<h.length;u+=4)t.push([f,h[u],h[u+1],h[u+2],h[u+3]]);else if(f==="A")for(let u=0;u<h.length;u+=7)t.push([f,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5],h[u+6]])}return t.length===0&&t.push(["M",0,0]),t}function Re(x){let t=1/0,e=1/0,s=-1/0,i=-1/0;return x.forEach(a=>{for(let n=1;n<a.length;n+=2)if(n+1<=a.length){const r=a[n],o=a[n+1];typeof r=="number"&&typeof o=="number"&&(r<t&&(t=r),r>s&&(s=r),o<e&&(e=o),o>i&&(i=o))}}),t===1/0?{x:0,y:0,width:0,height:0}:{x:t,y:e,width:s-t,height:i-e}}function os(x){return x.map(t=>t.join(" ")).join(" ")}function Ns(x){switch(x[0]){case"z":case"Z":x[0]="L",x[1]=this.start[0],x[2]=this.start[1];break;case"H":x[0]="L",x[2]=this.pos[1];break;case"V":x[0]="L",x[2]=x[1],x[1]=this.pos[0];break;case"T":x[0]="Q",x[3]=x[1],x[4]=x[2],x[1]=this.reflection[1],x[2]=this.reflection[0];break;case"S":x[0]="C",x[6]=x[4],x[5]=x[3],x[4]=x[2],x[3]=x[1],x[2]=this.reflection[1],x[1]=this.reflection[0];break}return x}function Bs(x){var t=x.length;return this.pos=[x[t-2],x[t-1]],"SCQT".indexOf(x[0])!=-1&&(this.reflection=[2*this.pos[0]-x[t-4],2*this.pos[1]-x[t-3]]),x}function Ys(x){var t,e=[x];switch(x[0]){case"M":return this.pos=this.start=[x[1],x[2]],e;case"L":x[5]=x[3]=x[1],x[6]=x[4]=x[2],x[1]=this.pos[0],x[2]=this.pos[1];break;
7case"Q":x[6]=x[4],x[5]=x[3],x[4]=x[4]*1/3+x[2]*2/3,x[3]=x[3]*1/3+x[1]*2/3,x[2]=this.pos[1]*1/3+x[2]*2/3,x[1]=this.pos[0]*1/3+x[1]*2/3;break;case"A":e=Xa((t=this.pos)!=null?t:[],x),x=e[0];break}return x[0]="C",this.pos=[x[5],x[6]],this.reflection=[2*x[5]-x[3],2*x[6]-x[4]],e}function Os(x,t){if(t===!1)return!1;for(var e=t,s=x.length;e<s;++e)if(x[e][0]=="M")return e;return!1}function Xa(x,t){var e=Math.abs(t[1]),s=Math.abs(t[2]),i=t[3]%360,a=t[4],n=t[5],r=t[6],o=t[7],l=new mt(x[0],x[1]),c=new mt(r,o),h,d,f,u,g,p,b,m,A,v,y,w,_,C,S,k,M,L,E,D,T,F,P=[],Y,z,W,O;if(e===0||s===0||l.x===c.x&&l.y===c.y)return[["C",l.x,l.y,c.x,c.y,c.x,c.y]];for(h=new mt((l.x-c.x)/2,(l.y-c.y)/2).transform(new Ht().rotate(i)),d=h.x*h.x/(e*e)+h.y*h.y/(s*s),d>1&&(d=Math.sqrt(d),e=d*e,s=d*s),f=new Ht().rotate(i).scale(1/e,1/s).rotate(-i),l=l.transform(f),c=c.transform(f),u=[c.x-l.x,c.y-l.y],p=u[0]*u[0]+u[1]*u[1],g=Math.sqrt(p),u[0]/=g,u[1]/=g,b=p<4?Math.sqrt(1-p/4):0,a===n&&(b*=-1),m=new mt((c.x+l.x)/2+b*-u[1],(c.y+l.y)/2+b*u[0]),A=new mt(l.x-m.x,l.y-m.y),v=new mt(c.x-m.x,c.y-m.y),y=Math.acos(A.x/Math.sqrt(A.x*A.x+A.y*A.y)),A.y<0&&(y*=-1),w=Math.acos(v.x/Math.sqrt(v.x*v.x+v.y*v.y)),v.y<0&&(w*=-1),n&&y>w&&(w+=2*Math.PI),!n&&y<w&&(w-=2*Math.PI),C=Math.ceil(Math.abs(y-w)*2/Math.PI),k=[],M=y,_=(w-y)/C,S=4*Math.tan(_/4)/3,T=0;T<=C;T++)E=Math.cos(M),L=Math.sin(M),D=new mt(m.x+E,m.y+L),k[T]=[new mt(D.x+S*L,D.y-S*E),D,new mt(D.x-S*L,D.y+S*E)],M+=_;for(k[0][0]=k[0][1].clone(),k[k.length-1][2]=k[k.length-1][1].clone(),f=new Ht().rotate(i).scale(e,s).rotate(-i),T=0,F=k.length;T<F;T++)k[T][0]=k[T][0].transform(f),k[T][1]=k[T][1].transform(f),k[T][2]=k[T][2].transform(f);for(T=1,F=k.length;T<F;T++)D=k[T-1][2],Y=D.x,z=D.y,D=k[T][0],W=D.x,O=D.y,D=k[T][1],r=D.x,o=D.y,P.push(["C",Y,z,W,O,r,o]);return P}function Ia(x,t,e,s,i,a){for(var n=x.slice(t,e||void 0),r=s.slice(i,a||void 0),o=0,l={pos:[0,0],start:[0,0]},c={pos:[0,0],start:[0,0]};n[o]=Ns.call(l,n[o]),r[o]=Ns.call(c,r[o]),n[o][0]!=r[o][0]||n[o][0]=="M"||n[o][0]=="A"&&(n[o][4]!=r[o][4]||n[o][5]!=r[o][5])?(Array.prototype.splice.apply(n,[o,1].concat(Ys.call(l,n[o]))),Array.prototype.splice.apply(r,[o,1].concat(Ys.call(c,r[o])))):(n[o]=Bs.call(l,n[o]),r[o]=Bs.call(c,r[o])),!(++o==n.length&&o==r.length);)o==n.length&&n.push(["C",l.pos[0],l.pos[1],l.pos[0],l.pos[1],l.pos[0],l.pos[1]]),o==r.length&&r.push(["C",c.pos[0],c.pos[1],c.pos[0],c.pos[1],c.pos[0],c.pos[1]]);return{start:n,dest:r}}function Na(x,t){for(var e=Vt(x),s=Vt(t),i=0,a=0,n=!1,r=!1,o;!(i===!1&&a===!1);){if(n=Os(e,i===!1?!1:i+1),r=Os(s,a===!1?!1:a+1),i===!1){const l=Re(o.start);l.height==0||l.width==0?i=e.push(e[0])-1:i=e.push(["M",l.x+l.width/2,l.y+l.height/2])-1}if(a===!1){const l=Re(o.dest);l.height==0||l.width==0?a=s.push(s[0])-1:a=s.push(["M",l.x+l.width/2,l.y+l.height/2])-1}o=Ia(e,i,n,s,a,r),e=e.slice(0,i).concat(o.start,n===!1?[]:e.slice(n)),s=s.slice(0,a).concat(o.dest,r===!1?[]:s.slice(r)),i=n===!1?!1:i+o.start.length,a=r===!1?!1:a+o.dest.length}return{start:e,dest:s}}function Ba(x,t){var e=Na(x,t),s=e.start,i=e.dest;return function(a){var n=s.map(function(r,o){return i[o].map(function(l,c){return c===0?l:r[c]+(i[o][c]-r[c])*a})});return os(n)}}let Nt=null,oe=null;function zs(x,t){const e=new Array(t);if(!H.isBrowser()){const i=Vt(x),a=Re(i),n=a.x+a.width/2,r=a.y+a.height/2;for(let o=0;o<t;o++)e[o]={x:n,y:r};return e}Nt||(Nt=document.createElementNS("http://www.w3.org/2000/svg","svg"),Nt.setAttribute("width","0"),Nt.setAttribute("height","0"),Nt.setAttribute("style","position:absolute;width:0;height:0;visibility:hidden;pointer-events:none;"),oe=document.createElementNS("http://www.w3.org/2000/svg","path"),Nt.appendChild(oe),document.body.appendChild(Nt)),oe.setAttribute("d",x||"M0 0");let s=0;try{s=oe.getTotalLength()}catch{s=0}if(!s||!isFinite(s)){const i=Vt(x),a=Re(i),n=a.x+a.width/2,r=a.y+a.height/2;for(let o=0;o<t;o++)e[o]={x:n,y:r};return e}for(let i=0;i<t;i++)try{const a=oe.getPointAtLength(i/t*s);e[i]={x:a.x,y:a.y}}catch{e[i]={x:0,y:0}}return e}function Ya(x,t,e=96){const s=zs(x,e),i=zs(t,e);let a=0,n=1/0;for(let o=0;o<e;o++){let l=0;for(let c=0;c<e;c++){const h=s[(c+o)%e],d=i[c],f=h.x-d.x,u=h.y-d.y;if(l+=f*f+u*u,l>=n)break}l<n&&(n=l,a=o)}const r=new Array(e);for(let o=0;o<e;o++)r[o]=s[(o+a)%e];return function(o){let l="";for(let c=0;c<e;c++){const h=r[c],d=i[c],f=h.x+(d.x-h.x)*o,u=h.y+(d.y-h.y)*o;l+=(c===0?"M":"L")+f.toFixed(3)+" "+u.toFixed(3)+" "}return l+"Z"}}function $i(x){return-Math.cos(x*Math.PI)/2+.5}let Vi=$i;function Oa(x){Vi=typeof x=="function"?x:$i}function Hs(x){if(!x||typeof x!="string")return null;if(x[0]==="#"){let e=x.slice(1);e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const s=parseInt(e,16);return[s>>16&255,s>>8&255,s&255,1]}const t=x.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return t?[+t[1],+t[2],+t[3],t[4]!==void 0?+t[4]:1]:null}function za(x,t,e){return`rgba(${Math.round(x[0]+(t[0]-x[0])*e)},${Math.round(x[1]+(t[1]-x[1])*e)},${Math.round(x[2]+(t[2]-x[2])*e)},${x[3]+(t[3]-x[3])*e})`}class Ls{constructor(t,e,s){this.el=t,this.duration=e??300,this.delay=s||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 typeof t=="function"&&(this._easing=t),this._schedule(),this}attr(t){return this._attrTarget=t,this._schedule(),this}plot(t,e,s){return this._plotTarget=t,e&&(this._plotAlgorithm=e),this._plotSnap=s||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 s=new Ls(this.el,t,e);return this._next=s,s._root=this._root||this,s}
7_schedule(){const t=this._root||this;t._scheduled||(t._scheduled=!0,queueMicrotask(()=>t._executeChain()))}_executeChain(){const t=[];let e=this;for(;e;)t.push(e),e=e._next;let s=0;t.forEach(i=>{s+=i.delay,i._execute(s),s+=i.duration})}_execute(t){const e=this.el,s=this.duration;if(s<=1){const a=()=>{this._attrTarget&&e.attr(this._attrTarget),this._plotTarget&&e.plot(this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(e)};t>0?setTimeout(a,t):a();return}const i=()=>{const a={},n={},r={};if(this._attrTarget)for(const d of Object.keys(this._attrTarget)){const f=e.attr(d);a[d]=f;const u=Hs(f),g=Hs(String(this._attrTarget[d]));u&&g&&(n[d]=u,r[d]=g)}let o=null;if(this._plotTarget){const d=e.attr("d")||"";try{o=this._plotAlgorithm==="polygons"?Ya(d,this._plotTarget):Ba(d,this._plotTarget)}catch{o=null}}const l=performance.now(),c=this._easing||Vi,h=d=>{const f=d-l,u=Math.min(f/s,1),g=c(u);if(this._attrTarget)if(u>=1)e.attr(this._attrTarget);else{const p={};for(const b of Object.keys(this._attrTarget))if(n[b]&&r[b])p[b]=za(n[b],r[b],g);else{const m=parseFloat(a[b]),A=parseFloat(this._attrTarget[b]);!isNaN(m)&&!isNaN(A)&&(p[b]=m+(A-m)*g)}e.attr(p)}o&&u<1&&e.attr("d",o(g)),this._duringCb&&this._duringCb(g),u<1?B.requestAnimationFrame(h):(this._plotTarget&&e.attr("d",this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(e))};B.requestAnimationFrame(h)};t>0?setTimeout(i,t):i()}}function Ha(x){x.prototype.animate=function(t,e){return new Ls(this,t,e)}}function Gi(x){return-Math.cos(x*Math.PI)/2+.5}function Wa(x,t,e,s){x=Math.min(Math.max(x,0),1),e=Math.min(Math.max(e,0),1);const i=3*x,a=3*(e-x)-i,n=1-i-a,r=3*t,o=3*(s-t)-r,l=1-r-o,c=f=>((n*f+a)*f+i)*f,h=f=>((l*f+o)*f+r)*f,d=f=>{let u=0,g=1,p=f;if(p<u)return u;if(p>g)return g;for(;u<g;){const b=c(p);if(Math.abs(b-f)<1e-4)return p;f>b?u=p:g=p,p=(u+g)/2}return p};return f=>f<=0?0:f>=1?1:h(d(f))}const ut=new Map,$a=x=>x;ut.set("linear",$a);ut.set("easeInOutSine",Gi);ut.set("easeInSine",x=>1-Math.cos(x*Math.PI/2));ut.set("easeOutSine",x=>Math.sin(x*Math.PI/2));ut.set("easeInQuad",x=>x*x);ut.set("easeOutQuad",x=>1-(1-x)*(1-x));ut.set("easeInOutQuad",x=>x<.5?2*x*x:1-Math.pow(-2*x+2,2)/2);ut.set("easeInCubic",x=>x*x*x);ut.set("easeOutCubic",x=>1-Math.pow(1-x,3));ut.set("easeInOutCubic",x=>x<.5?4*x*x*x:1-Math.pow(-2*x+2,3)/2);ut.set("easeOutBack",x=>1+2.70158*Math.pow(x-1,3)+1.70158*Math.pow(x-1,2));ut.set("easeInOutBack",x=>{const e=2.5949095;return x<.5?Math.pow(2*x,2)*((e+1)*2*x-e)/2:(Math.pow(2*x-2,2)*((e+1)*(x*2-2)+e)+2)/2});function Va(x,t){typeof x=="string"&&x&&typeof t=="function"&&ut.set(x,t)}function Ga(x){return Array.isArray(x)&&x.length===4&&x.every(t=>typeof t=="number")}function Te(x){return typeof x=="function"?Ws(x):Ga(x)?Wa(x[0],x[1],x[2],x[3]):typeof x=="string"&&ut.has(x)?Ws(ut.get(x)):Gi}function Ws(x){return t=>{const e=x(t);return typeof e=="number"&&isFinite(e)?e:t}}const $e="http://www.w3.org/2000/svg";function $s(x){return 1-Math.pow(1-x,3)}function Ua(x){return 1+2.70158*Math.pow(x-1,3)+1.70158*Math.pow(x-1,2)}let Ve=null;function Be(){if(!H.isBrowser())return!1;try{return Ve||(Ve=window.matchMedia("(prefers-reduced-motion: reduce)")),!!Ve.matches}catch{return!1}}function kt(x,t,e){if(!H.isBrowser()||e.globals.dataChanged||e.globals.resized)return!1;const s=e.config.chart.animations;if(!s||s.enabled===!1)return!1;const i=e.config.chart.type;if(i!=="line"&&i!=="area"&&i!=="rangeArea"||!(e.layout.gridWidth>0))return!1;const a=(s.speed||800)*2,n=Math.max(0,Math.min(1,t/e.layout.gridWidth)),o=(1-Math.cbrt(1-n))*a,c=x.node.style;c.opacity="0";let h=null;const d=f=>{h===null&&(h=f),f-h>=o?c.opacity="":B.requestAnimationFrame(d)};return B.requestAnimationFrame(d),!0}function Vs(x){const t=x.config.chart.animations;t&&(t.respectReducedMotion!==!1&&Be()&&(t.enabled=!1,t.dynamicAnimation&&(t.dynamicAnimation.enabled=!1)),Oa(Te(t.easing)))}function Ds(x){const t=x.style,e=x.index||0,s=typeof x.baseDelay=="number"?x.baseDelay:40,i=x.row||0,a=x.col||0,n=x.groupIndex||0,r=x.perGroup||1,o=x.centerDistance||0;switch(t){case"none":return 0;case"diagonal":return(i+a)*s;case"group":return n*s+e%r*(s/4);case"centroid":return o*s*(e+1);default:return e*s}}class ne{constructor(t,e){this.w=t,this.ctx=e}animateLine(t,e,s,i){t.attr(e).animate(i).attr(s)}animateMarker(t,e,s,i){t.attr({opacity:0}
7).animate(e).attr({opacity:1}).after(()=>{i()})}animatePop(t,{speed:e,delay:s=0,onComplete:i}){const a=this.w;if(!H.isBrowser()||!a.globals.shouldAnimate||e<1){i&&i();return}const r=t.node.style;r.transformBox="fill-box",r.transformOrigin="center",r.transform="scale(0)",r.opacity="0";const o=performance.now()+s,l=c=>{if(a.globals.isDestroyed)return;const h=Math.max(0,Math.min(1,(c-o)/e));r.transform=`scale(${Ua(h)})`,r.opacity=String(Math.min(1,h*2)),h<1?B.requestAnimationFrame(l):(r.transform="",r.transformOrigin="",r.transformBox="",r.opacity="",i&&i())};B.requestAnimationFrame(l)}animateRect(t,e,s,i,a,n=0){t.attr(e).animate(i,n).attr(s).after(()=>a())}animatePathsGradually(t){const{el:e,realIndex:s,j:i,fill:a,pathFrom:n,pathTo:r,pathToInterp:o,speed:l,delay:c,scrollMorph:h}=t,d=this,f=this.w;let u=0;f.config.chart.animations.animateGradually.enabled&&(u=f.config.chart.animations.animateGradually.delay),f.config.chart.animations.dynamicAnimation.enabled&&f.globals.dataChanged&&f.config.chart.type!=="bar"&&(u=0),d.morphSVG(e,s,i,f.config.chart.type==="line"&&!f.globals.comboCharts?"stroke":a,n,r,l,c*u,h,o)}revealBulk(t){const e=this.w;if(t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node}),!H.isBrowser()||!e.globals.shouldAnimate){this.animationCompleted(t);return}e.globals.bulkRevealScheduled||(e.globals.bulkRevealScheduled=!0,B.requestAnimationFrame(()=>{e.globals.isDestroyed||(e.globals.bulkRevealScheduled=!1,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(),typeof e.config.chart.events.animationEnd=="function"&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}animateDraw(t,{realIndex:e,j:s,isFill:i,isLast:a,speed:n,delay:r,mask:o}){const l=this.w,c=this,h=()=>{a&&l.globals.shouldAnimate&&c.animationCompleted(t),c.showDelayedElements()};if(!H.isBrowser()||!l.globals.shouldAnimate||n<1){h();return}const d=t.node,f=()=>{const p=o&&o.type==="radial",b=l.layout.gridWidth+8,m=o&&o.cx||0,A=o&&o.cy||0,v=(o&&o.r||l.layout.gridWidth/2)+4,y=`apexDrawMask${l.globals.cuid}-${e}-${s??0}-${i?"f":"s"}`,w=B.createElementNS($e,"mask");w.setAttribute("id",y),w.setAttribute("maskUnits","userSpaceOnUse");let _;if(p){const k=v;w.setAttribute("x",String(m-k)),w.setAttribute("y",String(A-k)),w.setAttribute("width",String(k*2)),w.setAttribute("height",String(k*2)),_=B.createElementNS($e,"circle"),_.setAttribute("cx",String(m)),_.setAttribute("cy",String(A)),_.setAttribute("r","0"),_.setAttribute("fill","#fff")}else w.setAttribute("x",String(-4)),w.setAttribute("y",String(-4)),w.setAttribute("width",String(b)),w.setAttribute("height",String(l.layout.gridHeight+8)),_=B.createElementNS($e,"rect"),_.setAttribute("x",String(-4)),_.setAttribute("y",String(-4)),_.setAttribute("width","0"),_.setAttribute("height",String(l.layout.gridHeight+8)),_.setAttribute("fill","#fff");w.appendChild(_),l.dom.elDefs.node.appendChild(w),d.setAttribute("mask",`url(#${y})`);const C=performance.now()+(r||0),S=k=>{if(l.globals.isDestroyed)return;const M=Math.max(0,Math.min(1,(k-C)/n)),L=$s(M);p?_.setAttribute("r",String(L*v)):_.setAttribute("width",String(L*b)),M<1?B.requestAnimationFrame(S):(d.removeAttribute("mask"),w.parentNode&&w.parentNode.removeChild(w),h())};B.requestAnimationFrame(S)},u=g=>{d.setAttribute("stroke-dasharray",String(g)),d.setAttribute("stroke-dashoffset",String(g));const p=performance.now()+(r||0),b=m=>{if(l.globals.isDestroyed)return;const A=Math.max(0,Math.min(1,(m-p)/n));d.setAttribute("stroke-dashoffset",String(g*(1-$s(A)))),A<1?B.requestAnimationFrame(b):(d.removeAttribute("stroke-dasharray"),d.removeAttribute("stroke-dashoffset"),h())};B.requestAnimationFrame(b)};B.requestAnimationFrame(()=>{if(l.globals.isDestroyed)return;if(i){f();return}const g=d.getAttribute("stroke-dasharray");
7if(!!g&&g!=="0"&&g!==""){f();return}let b=0;try{typeof d.getTotalLength=="function"&&(b=d.getTotalLength())}catch{b=0}if(!b){h();return}u(b)})}morphSVG(t,e,s,i,a,n,r,o,l,c){var h,d;const f=this.w;a||(a=t.attr("pathFrom")),n||(n=t.attr("pathTo"));const u=()=>(f.config.chart.type==="radar"&&(r=1),`M 0 ${f.layout.gridHeight}`);(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=u()),(!n.trim()||n.indexOf("undefined")>-1||n.indexOf("NaN")>-1)&&(n=u(),c=void 0),c&&(!c.trim()||c.indexOf("undefined")>-1||c.indexOf("NaN")>-1)&&(c=void 0),f.globals.shouldAnimate||(r=1);const p=((d=(h=this.ctx)==null?void 0:h.morphTypeChange)==null?void 0:d.isActive())===!0?"polygons":"commands";let b=null;if(f.globals.dataChanged){const A=f.config.chart.animations.dynamicAnimation.easing;A!=null?b=Te(A):l&&(b=Te("linear"))}const m=t.plot(a).animate(1,o).plot(a).animate(r,o);b&&m.ease(b),m.plot(c||n,p,c?n:void 0).after(()=>{if(R.isNumber(s)){const A=f.seriesData.series[f.globals.maxValsInArrayIndex];A&&s===A.length-2&&f.globals.shouldAnimate&&this.animationCompleted(t)}else i!=="none"&&f.globals.shouldAnimate&&(!f.globals.comboCharts&&e===f.seriesData.series.length-1||f.globals.comboCharts)&&this.animationCompleted(t);this.showDelayedElements()})}}const Gs={lighten:.15,darken:.35};class dt{constructor(t){this.w=t}getDefaultFilter(t,e){const s=this.w;t.unfilter&&t.unfilter(!0),s.config.chart.dropShadow.enabled&&this.dropShadow(t,s.config.chart.dropShadow,e)}applyFilter(t,e,s,i){var a,n,r;const o=this.w;if(t.unfilter&&t.unfilter(!0),s==="none"){this.getDefaultFilter(t,e);return}const l=o.config.chart.dropShadow,c=s==="lighten"?Gs.lighten:Gs.darken,h=Math.max(0,Math.min(1,typeof i=="number"?i:c)),d=1-h,f=s==="lighten"?h:0;t.filterWith&&(t.filterWith(u=>{u.colorMatrix({type:"matrix",values:`
8            ${d} 0 0 0 ${f}
9            0 ${d} 0 0 ${f}
10            0 0 ${d} 0 ${f}
11            0 0 0 1 0
12          `,in:"SourceGraphic",result:"brightness"}),l.enabled&&this.addShadow(u,e,l,"brightness")}),l.noUserSpaceOnUse||(n=(a=t.filterer())==null?void 0:a.node)==null||n.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((r=t.filterer())==null?void 0:r.node))}addShadow(t,e,s,i){var a;const n=this.w;let{blur:r,top:o,left:l,color:c,opacity:h}=s;if(c=Array.isArray(c)?c[e]:c,((a=n.config.chart.dropShadow.enabledOnSeries)==null?void 0:a.length)>0&&n.config.chart.dropShadow.enabledOnSeries.indexOf(e)===-1)return t;t.offset({in:i,dx:l,dy:o,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:r,result:"blur"}),t.flood({"flood-color":c,"flood-opacity":h,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",i])}dropShadow(t,e,s=0){var i,a,n,r,o;const l=this.w;return t.unfilter&&t.unfilter(!0),R.isMsEdge()&&l.config.chart.type==="radialBar"||((i=l.config.chart.dropShadow.enabledOnSeries)==null?void 0:i.length)>0&&((a=l.config.chart.dropShadow.enabledOnSeries)==null?void 0:a.indexOf(s))===-1||t.filterWith&&(t.filterWith(c=>{this.addShadow(c,s,e,"SourceGraphic")}),e.noUserSpaceOnUse||(r=(n=t.filterer())==null?void 0:n.node)==null||r.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((o=t.filterer())==null?void 0:o.node)),t}setSelectionFilter(t,e,s){const i=this.w;if(typeof i.interact.selectedDataPoints[e]<"u"&&i.interact.selectedDataPoints[e].indexOf(s)>-1){t.node.setAttribute("selected",!0);const a=i.config.states.active.filter;a.type!=="none"&&this.applyFilter(t,e,a.type,a.value)}}_scaleFilterSize(t){if(!t)return;(s=>{for(const i in s)Object.prototype.hasOwnProperty.call(s,i)&&t.setAttribute(i,s[i])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}class I{constructor(t,e=null){this.w=t,this.ctx=e}roundPathCorners(t,e){t.indexOf("NaN")>-1&&(t="");function s(S,k,M){var L=k.x-S.x,E=k.y-S.y,D=Math.sqrt(L*L+E*E);return i(S,k,Math.min(1,M/D))}function i(S,k,M){return{x:S.x+(k.x-S.x)*M,y:S.y+(k.y-S.y)*M}}function a(S,k){S.length>2&&(S[S.length-2]=k.x,S[S.length-1]=k.y)}function n(S){return{x:parseFloat(S[S.length-2]),y:parseFloat(S[S.length-1])}}var r=t.split(/[,\s]/).reduce(function(S,k){var M=k.match(/^([a-zA-Z])(.+)/);return M?(S.push(M[1]),S.push(M[2])):S.push(k),S},[]),o=r.reduce(function(S,k){return parseFloat(k)==k&&S.length?S[S.length-1].push(k):S.push([k]),S},[]),l=[];
12if(o.length>1){var c=n(o[0]),h=null;o[o.length-1][0]=="Z"&&o[0].length>2&&(h=["L",c.x,c.y],o[o.length-1]=h),l.push(o[0]);for(var d=1;d<o.length;d++){var f=l[l.length-1],u=o[d],g=u==h?o[1]:o[d+1];if(g&&f&&f.length>2&&u[0]=="L"&&g.length>2&&g[0]=="L"){var p=n(f),b=n(u),m=n(g),A,v;A=s(b,p,e),v=s(b,m,e),a(u,A),u.origPoint=b,l.push(u);var y=i(A,b,.5),w=i(b,v,.5),_=["C",y.x,y.y,w.x,w.y,v.x,v.y];_.origPoint=b,l.push(_)}else l.push(u)}if(h){var C=n(l[l.length-1]);l.push(["Z"]),a(l[0],C)}}else l=o;return l.reduce(function(S,k){return S+k.join(" ")+" "},"")}drawLine(t,e,s,i,a="#a8a8a8",n=0,r=null,o="butt"){return this.w.dom.Paper.line().attr({x1:t,y1:e,x2:s,y2:i,stroke:a,"stroke-dasharray":n,"stroke-width":r,"stroke-linecap":o})}drawRect(t=0,e=0,s=0,i=0,a=0,n="#fefefe",r=1,o=null,l=null,c=0){const d=this.w.dom.Paper.rect();return d.attr({x:t,y:e,width:s>0?s:0,height:i>0?i:0,rx:a,ry:a,opacity:r,"stroke-width":o!==null?o:0,stroke:l!==null?l:"none","stroke-dasharray":c}),d.node.setAttribute("fill",n),d}drawPolygon(t,e="#e1e1e1",s=1,i="none"){return this.w.dom.Paper.polygon(t).attr({fill:i,stroke:e,"stroke-width":s})}drawCircle(t,e=null){const s=this.w;t<0&&(t=0);const i=s.dom.Paper.circle(t*2);return e!==null&&i.attr(e),i}drawPath({d:t="",stroke:e="#a8a8a8",strokeWidth:s=1,fill:i,fillOpacity:a=1,strokeOpacity:n=1,classes:r,strokeLinecap:o=null,strokeDashArray:l=0}){const c=this.w;return o===null&&(o=c.config.stroke.lineCap),(t.indexOf("undefined")>-1||t.indexOf("NaN")>-1)&&(t=`M 0 ${c.layout.gridHeight}`),c.dom.Paper.path(t).attr({fill:i,"fill-opacity":a,stroke:e,"stroke-opacity":n,"stroke-linecap":o,"stroke-width":s,"stroke-dasharray":l,class:r})}group(t=null){const s=this.w.dom.Paper.group();return t!==null&&s.attr(t),s}move(t,e){return["M",t,e].join(" ")}line(t,e,s=null){return s==="H"?[" H",t].join(" "):s==="V"?[" V",e].join(" "):[" L",t,e].join(" ")}curve(t,e,s,i,a,n){return["C",t,e,s,i,a,n].join(" ")}quadraticCurve(t,e,s,i){return["Q",t,e,s,i].join(" ")}arc(t,e,s,i,a,n,r,o=!1){let l="A";return o&&(l="a"),[l,t,e,s,i,a,n,r].join(" ")}renderPaths({j:t,realIndex:e,pathFrom:s,pathTo:i,pathToInterp:a,stroke:n,strokeWidth:r,strokeLinecap:o,fill:l,animationDelay:c,initialSpeed:h,dataChangeSpeed:d,className:f,chartType:u,shouldClipToGrid:g=!0,bindEventsOnPaths:p=!0,drawShadow:b=!0,drawMask:m=null,scrollMorph:A=!1}){var v,y;const w=this.w,_=new dt(this.w),C=new ne(this.w,(v=this.ctx)!=null?v:void 0),S=this.w.config.chart.animations.enabled,k=S&&this.w.config.chart.animations.dynamicAnimation.enabled;if(s&&s.startsWith("M 0 0 ")&&i){const V=i.match(/^M\s+[\d.-]+\s+[\d.-]+/);V&&(s=s.replace(/^M\s+0\s+0/,V[0]))}let M;const L=!!(S&&!w.globals.resized||k&&w.globals.dataChanged&&w.globals.shouldAnimate),E=typeof f=="string"&&(f.indexOf("apexcharts-line")>-1||f.indexOf("apexcharts-area")>-1||f.indexOf("apexcharts-rangeArea")>-1||f.indexOf("apexcharts-radar")>-1),D=!!(S&&!w.globals.resized&&!w.globals.dataChanged&&E),T=(y=w.config.chart.animations.largeDatasetThreshold)!=null?y:0,F=!!(L&&!D&&T>0&&w.globals.dataPoints>T),Y=!!((u==="candlestick"||u==="boxPlot")&&L&&!D&&w.globals.dataChanged),z=F||Y;L&&!D&&!z?M=s:(M=i,L||(w.globals.animationEnded=!0));const W=w.config.stroke.dashArray;let O=0;Array.isArray(W)?O=W[e]:O=w.config.stroke.dashArray;const N=this.drawPath({d:M,stroke:n,strokeWidth:r,fill:l,fillOpacity:1,classes:f,strokeLinecap:o,strokeDashArray:O});N.attr("index",e),g&&(u==="bar"&&!w.globals.isBarHorizontal||w.globals.comboCharts?N.attr({"clip-path":`url(#gridRectBarMask${w.globals.cuid})`}):N.attr({"clip-path":`url(#gridRectMask${w.globals.cuid})`})),w.config.chart.dropShadow.enabled&&b&&_.dropShadow(N,w.config.chart.dropShadow,e),p&&(N.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,N)),N.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,N)),N.node.addEventListener("mousedown",this.pathMouseDown.bind(this,N))),N.attr({pathTo:i,pathFrom:s});const X={el:N,j:t,realIndex:e,pathFrom:s,pathTo:i,pathToInterp:a,fill:l,strokeWidth:r,delay:c,scrollMorph:A};if(S&&!w.globals.resized&&!w.globals.dataChanged)if(D){const V=h*2,U=n==="none"||r===0,$=w.seriesData.series.length,q=w.globals.comboCharts?!0:e===$-1;C.animateDraw(N,{realIndex:e,j:t,isFill:U,isLast:q,speed:V,delay:0,mask:m})}else z||C.animatePathsGradually(Z(G({},X),{speed:h}
12));else(w.globals.resized||!w.globals.dataChanged)&&!z&&C.showDelayedElements();return w.globals.dataChanged&&k&&L&&!z&&C.animatePathsGradually(Z(G({},X),{speed:d})),z&&C.revealBulk(N),N}drawPattern(t,e,s,i="#a8a8a8",a=0){return this.w.dom.Paper.pattern(e,s,o=>{t==="horizontalLines"?o.line(0,0,s,0).stroke({color:i,width:a+1}):t==="verticalLines"?o.line(0,0,0,e).stroke({color:i,width:a+1}):t==="slantedLines"?o.line(0,0,e,s).stroke({color:i,width:a}):t==="squares"?o.rect(e,s).fill("none").stroke({color:i,width:a}):t==="circles"&&o.circle(e).fill("none").stroke({color:i,width:a})})}drawGradient(t,e,s,i,a,n=null,r=null,o=[],l=0){const c=this.w;let h;e.length<9&&e.indexOf("#")===0&&(e=R.hexToRgba(e,i)),s.length<9&&s.indexOf("#")===0&&(s=R.hexToRgba(s,a));let d=0,f=1,u=1,g=null;r!==null&&(d=typeof r[0]<"u"?r[0]/100:0,f=typeof r[1]<"u"?r[1]/100:1,u=typeof r[2]<"u"?r[2]/100:1,g=typeof r[3]<"u"?r[3]/100:null);const p=c.config.chart.type==="donut"||c.config.chart.type==="pie"||c.config.chart.type==="polarArea"||c.config.chart.type==="bubble";if(!o||o.length===0?h=c.dom.Paper.gradient(p?"radial":"linear",b=>{b.stop(d,e,i),b.stop(f,s,a),b.stop(u,s,a),g!==null&&b.stop(g,e,i)}):h=c.dom.Paper.gradient(p?"radial":"linear",b=>{(Array.isArray(o[l])?o[l]:Array.isArray(o[0])?o[0]||[]:o).forEach(A=>{b.stop(A.offset/100,A.color,A.opacity)})}),!p)t==="vertical"?h.from(0,0).to(0,1):t==="diagonal"?h.from(0,0).to(1,1):t==="horizontal"?h.from(0,1).to(1,1):t==="diagonal2"&&h.from(1,0).to(0,1);else{const b=c.layout.gridWidth/2,m=c.layout.gridHeight/2;c.config.chart.type!=="bubble"?h.attr({gradientUnits:"userSpaceOnUse",cx:b,cy:m,r:n}):h.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}return h}getTextBasedOnMaxWidth({text:t,maxWidth:e,fontSize:s,fontFamily:i}){const a=this.getTextRects(t,s,i,""),n=a.width/t.length,r=Math.floor(e/n);return e<a.width?t.slice(0,r-3)+"...":t}drawText({x:t,y:e,text:s,textAnchor:i,fontSize:a,fontFamily:n,fontWeight:r,foreColor:o,opacity:l,maxWidth:c,cssClass:h="",isPlainText:d=!0,dominantBaseline:f="auto"}){const u=this.w;typeof s>"u"&&(s="");let g=s;i||(i="start"),(!o||!o.length)&&(o=u.config.chart.foreColor),n=n||u.config.chart.fontFamily,a=a||"11px",r=r||"regular";const p={maxWidth:c,fontSize:a,fontFamily:n};let b;return Array.isArray(s)?b=u.dom.Paper.text(m=>{for(let A=0;A<s.length;A++)g=s[A],c&&(g=this.getTextBasedOnMaxWidth(G({text:s[A]},p))),A===0?m.tspan(g):m.tspan(g).newLine()}):(c&&(g=this.getTextBasedOnMaxWidth(G({text:s},p))),b=d?u.dom.Paper.plain(s):u.dom.Paper.text(m=>m.tspan(g))),b.attr({x:t,y:e,"text-anchor":i,"dominant-baseline":f,"font-size":a,"font-family":n,"font-weight":r,fill:o,class:"apexcharts-text "+h}),b.node.style.fontFamily=n,b.node.style.opacity=l,b}
12getMarkerPath(t,e,s,i){let f="";switch(s){case"cross":i=i/1.4,f=`M ${t-i} ${e-i} L ${t+i} ${e+i}  M ${t-i} ${e+i} L ${t+i} ${e-i}`;break;case"plus":i=i/1.12,f=`M ${t-i} ${e} L ${t+i} ${e}  M ${t} ${e-i} L ${t} ${e+i}`;break;case"star":case"sparkle":{let u=5;i=i*1.15,s==="sparkle"&&(i=i/1.1,u=4);const g=Math.PI/u;for(let p=0;p<=2*u;p++){const b=p*g,m=p%2===0?i:i/2,A=t+m*Math.sin(b),v=e-m*Math.cos(b);f+=(p===0?"M":"L")+A+","+v}f+="Z";break}case"triangle":f=`M ${t} ${e-i} 
13             L ${t+i} ${e+i} 
14             L ${t-i} ${e+i} 
15             Z`;break;case"square":case"rect":i=i/1.125,f=`M ${t-i} ${e-i} 
16           L ${t+i} ${e-i} 
17           L ${t+i} ${e+i} 
18           L ${t-i} ${e+i} 
19           Z`;break;case"diamond":i=i*1.05,f=`M ${t} ${e-i} 
20             L ${t+i} ${e} 
21             L ${t} ${e+i} 
22             L ${t-i} ${e} 
23            Z`;break;case"line":i=i/1.1,f=`M ${t-i} ${e} 
24           L ${t+i} ${e}`;break;default:i=i*2,f=`M ${t}, ${e} 
25           m -${i/2}, 0 
26           a ${i/2},${i/2} 0 1,0 ${i},0 
27           a ${i/2},${i/2} 0 1,0 -${i},0`;break}return f}drawMarkerShape(t,e,s,i,a){const n=this.drawPath({d:this.getMarkerPath(t,e,s,i),stroke:a.pointStrokeColor,strokeDashArray:a.pointStrokeDashArray,strokeWidth:a.pointStrokeWidth,fill:a.pointFillColor,fillOpacity:a.pointFillOpacity,strokeOpacity:a.pointStrokeOpacity});return n.attr({cx:t,cy:e,shape:a.shape,class:a.class?a.class:""}),n}drawMarker(t,e,s){t=t||0;let i=s.pSize||0;return R.isNumber(e)||(i=0,e=0),this.drawMarkerShape(t,e,s?.shape,i,G(G({},s),s.shape==="line"||s.shape==="plus"||s.shape==="cross"?{pointStrokeColor:s.pointFillColor,pointStrokeOpacity:s.pointFillOpacity}:{}))}pathMouseEnter(t,e){var s,i;const a=this.w,n=new dt(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),o=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);if(!(isNaN(r)||isNaN(o))&&(typeof a.config.chart.events.dataPointMouseEnter=="function"&&a.config.chart.events.dataPointMouseEnter(e,this.ctx,{seriesIndex:r,dataPointIndex:o,w:a}),I._fireEvent(a,"dataPointMouseEnter",[e,this.ctx,{seriesIndex:r,dataPointIndex:o,w:a}]),!(a.config.states.active.filter.type!=="none"&&t.node.getAttribute("selected")==="true")&&a.config.states.hover.filter.type!=="none"&&!a.interact.isTouchDevice)){const l=a.config.states.hover.filter;n.applyFilter(t,r,l.type,l.value)}}pathMouseLeave(t,e){var s,i;const a=this.w,n=new dt(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),o=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);isNaN(r)||isNaN(o)||(typeof a.config.chart.events.dataPointMouseLeave=="function"&&a.config.chart.events.dataPointMouseLeave(e,this.ctx,{seriesIndex:r,dataPointIndex:o,w:a}),I._fireEvent(a,"dataPointMouseLeave",[e,this.ctx,{seriesIndex:r,dataPointIndex:o,w:a}]),!(a.config.states.active.filter.type!=="none"&&t.node.getAttribute("selected")==="true")&&a.config.states.hover.filter.type!=="none"&&n.getDefaultFilter(t,r))}_clearAllDataPointSelections(t,e){const s=this.w;s.interact.selectedDataPoints=[];const i=s.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),a=s.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),n=r=>{Array.prototype.forEach.call(r,o=>{o.node.setAttribute("selected","false"),t.getDefaultFilter(o,e)})};n(i),n(a)}_togglePointSelection(t,e,s,i){const a=this.w;if(t.node.getAttribute("selected")==="true"){t.node.setAttribute("selected","false");const n=a.interact.selectedDataPoints[s].indexOf(i);return n>-1&&a.interact.selectedDataPoints[s].splice(n,1),"false"}return!a.config.states.active.allowMultipleDataPointsSelection&&a.interact.selectedDataPoints.length>0&&this._clearAllDataPointSelections(e,s),t.node.setAttribute("selected","true"),typeof a.interact.selectedDataPoints[s]>"u"&&(a.interact.selectedDataPoints[s]=[]),a.interact.selectedDataPoints[s].push(i),"true"}_applyPointSelectionFilter(t,e,s,i){const a=this.w;if(i==="true"){const n=a.config.states.active.filter;if(n!=="none")e.applyFilter(t,s,n.type,n.value);
27else if(a.config.states.hover.filter!=="none"&&!a.interact.isTouchDevice){const r=a.config.states.hover.filter;e.applyFilter(t,s,r.type,r.value)}}else if(a.config.states.active.filter.type!=="none")if(a.config.states.hover.filter.type!=="none"&&!a.interact.isTouchDevice){const n=a.config.states.hover.filter;e.applyFilter(t,s,n.type,n.value)}else e.getDefaultFilter(t,s)}pathMouseDown(t,e){var s,i;const a=this.w,n=new dt(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),o=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);if(isNaN(r)||isNaN(o))return;const l=a.config.chart.link;if(!!!(l&&(typeof l.dimension=="function"||l.enabled))){const h=this._togglePointSelection(t,n,r,o);this._applyPointSelectionFilter(t,n,r,h)}typeof a.config.chart.events.dataPointSelection=="function"&&a.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:r,dataPointIndex:o,w:a}),e&&I._fireEvent(a,"dataPointSelection",[e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:r,dataPointIndex:o,w:a}])}rotateAroundCenter(t){let e={};t&&typeof t.getBBox=="function"&&(e=t.getBBox());const s=e.x+e.width/2,i=e.y+e.height/2;return{x:s,y:i}}setupEventDelegation(t,e){let s=null;t.node.addEventListener("mouseover",i=>{const a=I._findDelegateTarget(i.target,t.node,e);!a||a===s||(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=a,a.instance&&this.pathMouseEnter(a.instance,i))}),t.node.addEventListener("mouseout",i=>{if(!s)return;(i.relatedTarget?I._findDelegateTarget(i.relatedTarget,t.node,e):null)!==s&&(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=null)}),t.node.addEventListener("mousedown",i=>{const a=I._findDelegateTarget(i.target,t.node,e);a&&a.instance&&this.pathMouseDown(a.instance,i)})}static _fireEvent(t,e,s){const i=t.globals.events;if(!i||!Object.prototype.hasOwnProperty.call(i,e))return;const a=i[e];for(let n=0;n<a.length;n++)a[n].apply(null,s)}static _findDelegateTarget(t,e,s){for(;t&&t!==e&&t!==document;){if(t.matches&&t.matches(s))return t;t=t.parentNode}return null}static setAttrs(t,e){for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.setAttribute(s,e[s])}getTextRects(t,e,s,i,a=!0){const n=this.w,r=[t,e,s,i,a].join("\0"),o=n.globals.textRectsCache;if(o&&o.has(r))return o.get(r);const l=this.drawText({x:-200,y:-200,text:t,textAnchor:"start",fontSize:e,fontFamily:s,foreColor:"#fff",opacity:0});i&&l.attr("transform",i),n.dom.Paper.add(l);let c=l.bbox();const h=c.y;a||(c=l.node.getBoundingClientRect()),l.remove();const d={width:c.width,height:c.height,centerOffset:a?h+c.height/2- -200:0};return o&&o.set(r,d),d}placeTextWithEllipsis(t,e,s){if(typeof t.getComputedTextLength=="function"&&(t.textContent=e,e.length>0&&t.getComputedTextLength()>=s/1.1)){for(let i=e.length-3;i>0;i-=3)if(t.getSubStringLength(0,i)<=s/1.1){t.textContent=e.substring(0,i)+"...";return}t.textContent="."}}}class pt{constructor(t){this.w=t,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(t){const e=this.w,s=e.config,i=parseInt(String(e.layout.gridWidth),10),a=parseInt(String(e.layout.gridHeight),10),n=i>a?i:a,r=t.image;let o=0,l=0;typeof t.width>"u"&&typeof t.height>"u"?s.fill.image.width!==void 0&&s.fill.image.height!==void 0?(o=s.fill.image.width+1,l=s.fill.image.height):(o=n+1,l=n):(o=t.width,l=t.height);const c=B.createElementNS(tt,"pattern");I.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});const h=B.createElementNS(tt,"image");c.appendChild(h);const d=H.isBrowser()?window.SVG:global.SVG;h.setAttributeNS(d.xlink,"href",r),I.setAttrs(h,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),h.style.opacity=t.opacity,e.dom.elDefs.node.appendChild(c)}getSeriesIndex(t){const e=this.w,s=e.config.chart.type;return(s==="bar"||s==="rangeBar")&&e.config.plotOptions.bar.distributed||s==="heatmap"||s==="treemap"?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.seriesData.series.length,this.seriesIndex}computeColorStops(t,e){const s=this.w;let i=null,a=null;for(const c of t)c>=e.threshold?(i===null||c>i)&&(i=c):(a===null||c<a)&&(a=c);i===null&&(i=e.threshold),a===null&&(a=e.threshold);let n=i-e.threshold+(e.threshold-a);n===0&&(n=1);let o=100-(e.threshold-a)/n*100;o=Math.max(0,Math.min(o,100));const l=Array.isArray(s.config.fill.opacity)?s.config.fill.opacity[this.seriesIndex]:s.config.fill.opacity;return[{offset:o,color:e.colorAboveThreshold,opacity:l},{offset:0,color:e.colorBelowThreshold,opacity:l}]}fillPath(t){var e,s,i,a;const n=this.w;this.opts=t;const r=this.w.config;let o,l,c;this.seriesIndex=this.getSeriesIndex(t);const h=r.plotOptions.line.colors.colorAboveThreshold&&r.plotOptions.line.colors.colorBelowThreshold;let f=this.getFillColors()[this.seriesIndex];n.seriesData.seriesColors[this.seriesIndex]!==void 0&&(f=n.seriesData.seriesColors[this.seriesIndex]),typeof f=="function"&&(f=f({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:n}));const u=t.fillType?t.fillType:this.getFillType(this.seriesIndex);let g=Array.isArray(r.fill.opacity)?r.fill.opacity[this.seriesIndex]:r.fill.opacity;const p=u==="gradient"||h;t.color&&(f=t.color);const b=n.config.series[this.seriesIndex];(s=(e=b?.data)==null?void 0:e[t.dataPointIndex])!=null&&s.fillColor&&(f=(a=(i=b?.data)==null?void 0:i[t.dataPointIndex])==null?void 0:a.fillColor),f||(f="#fff",console.warn("undefined color - ApexCharts")),t.opacity!==void 0&&t.opacity!==null&&(g=t.opacity);let m=f;R.isCSSVariable(f)?m=R.applyOpacityToColor(f,g):f.indexOf("rgb")===-1?f.indexOf("#")===-1?m=f:f.length<9&&(m=R.hexToRgba(f,g)):f.indexOf("rgba")>-1?g=R.getOpacityFromRGBA(f):m=R.hexToRgba(R.rgb2hex(f),g);const A=R.isCSSVariable(f)?R.getThemeColor(f):f;if(u==="pattern"&&(l=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:l,fillColor:A,defaultColor:m})),p){const v=r.fill.gradient.colorStops?[...r.fill.gradient.colorStops]:[];let y=r.fill.gradient.type;h&&(v[this.seriesIndex]=this.computeColorStops(n.seriesData.series[this.seriesIndex],r.plotOptions.line.colors),y="vertical"),c=this.handleGradientFill({type:y,fillConfig:t.fillConfig,fillColor:A,fillOpacity:g,colorStops:v,i:this.seriesIndex})}if(u==="image"){const v=r.fill.image.src,y=t.patternID?t.patternID:"",w=`pattern${n.globals.cuid}${t.seriesNumber+1}${y}`;this.patternIDs.indexOf(w)===-1&&(this.clippedImgArea({opacity:g,image:Array.isArray(v)?t.seriesNumber<v.length?v[t.seriesNumber]:v[0]:v,width:t.width?t.width:void 0,height:t.height?t.height:void 0,patternUnits:t.patternUnits,patternID:w}),this.patternIDs.push(w)),o=`url(#${w})`}else p?o=c:u==="pattern"?o=l:o=m;return t.solid&&(o=m),o}getFillType(t){const e=this.w;return Array.isArray(e.config.fill.type)?e.config.fill.type[t]:e.config.fill.type}getFillColors(){const t=this.w,e=t.config,s=this.opts;let i=[];return t.globals.comboCharts?t.config.series[this.seriesIndex].type==="line"?Array.isArray(t.globals.stroke.colors)?i=t.globals.stroke.colors:i.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?i=t.globals.fill.colors:i.push(t.globals.fill.colors):e.chart.type==="line"?Array.isArray(t.globals.stroke.colors)?i=t.globals.stroke.colors:i.push(t.globals.stroke.colors):Array.isArray(t.globals.fill.colors)?i=t.globals.fill.colors:i.push(t.globals.fill.colors),typeof s.fillColors<"u"&&(i=[],Array.isArray(s.fillColors)?i=s.fillColors.slice():i.push(s.fillColors)),i}handlePatternFill({fillConfig:t,patternFill:e,fillColor:s,defaultColor:i}){let a=this.w.config.fill;t&&(a=t);const n=this.opts,r=new I(this.w),o=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,l=s;return Array.isArray(a.pattern.style)?typeof a.pattern.style[n.seriesNumber]<"u"?e=r.drawPattern(a.pattern.style[n.seriesNumber],a.pattern.width,a.pattern.height,l,o):e=i:e=r.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,l,o),e}handleGradientFill({type:t,fillColor:e,fillOpacity:s,fillConfig:i,colorStops:a,i:n}){let r=this.w.config.fill;i&&(r=G(G({},r),i));const o=this.opts,l=new I(this.w),c=new R;t=t||r.gradient.type;let h=e,d,f=r.gradient.opacityFrom===void 0?s:Array.isArray(r.gradient.opacityFrom)?r.gradient.opacityFrom[n]:r.gradient.opacityFrom;h.indexOf("rgba")>-1&&(f=R.getOpacityFromRGBA(h));let u=r.gradient.opacityTo===void 0?s:Array.isArray(r.gradient.opacityTo)?r.gradient.opacityTo[n]:r.gradient.opacityTo;
27if(r.gradient.gradientToColors===void 0||r.gradient.gradientToColors.length===0)r.gradient.shade==="dark"?d=c.shadeColor(parseFloat(r.gradient.shadeIntensity)*-1,e.indexOf("rgb")>-1?R.rgb2hex(e):e):d=c.shadeColor(parseFloat(r.gradient.shadeIntensity),e.indexOf("rgb")>-1?R.rgb2hex(e):e);else if(r.gradient.gradientToColors[o.seriesNumber]){const g=r.gradient.gradientToColors[o.seriesNumber];d=g,g.indexOf("rgba")>-1&&(u=R.getOpacityFromRGBA(g))}else d=e;if(r.gradient.gradientFrom&&(h=r.gradient.gradientFrom),r.gradient.gradientTo&&(d=r.gradient.gradientTo),r.gradient.inverseColors){const g=h;h=d,d=g}return h.indexOf("rgb")>-1&&(h=R.rgb2hex(h)),d.indexOf("rgb")>-1&&(d=R.rgb2hex(d)),l.drawGradient(t,h,d,f,u,o.size,r.gradient.stops,a,n)}}const Us=["none","lighten","darken"];function Gt(x,t){const e=x&&x.renderer;return e&&e.kind&&e.kind!=="svg"?e:t}function qa(x){const t=x.config.series||[],e=x.config.chart.type,s=e==="scatter"||e==="bubble",i=x.config.markers&&x.config.markers.size,a=Array.isArray(i)?i.some(h=>h>0):(i||0)>0,n=!!(x.config.dataLabels&&x.config.dataLabels.enabled),r=e==="heatmap";let o=0,l=0;return t.forEach(h=>{const d=Array.isArray(h.data)?h.data.length:0;d>l&&(l=d),(s||a||r)&&(o+=d),n&&(o+=d)}),l>=5e4&&(o=Math.max(o,l)),o}function qs(x){var t,e;const s=x.config.fill&&x.config.fill.type,i=l=>l==="pattern"||l==="image"||l==="gradient";if(Array.isArray(s)?s.some(i):i(s))return!0;const a=(e=(t=x.config.plotOptions)==null?void 0:t.line)==null?void 0:e.colors;if(a&&a.colorAboveThreshold&&a.colorBelowThreshold)return!0;const n=x.config.states||{},r=n.hover&&n.hover.filter&&n.hover.filter.type,o=n.active&&n.active.filter&&n.active.filter.type;return!!(r&&!Us.includes(r)||o&&!Us.includes(o))}class re{constructor(t,e){this.w=t,this.ctx=e,this._filters=new dt(this.w),this._graphics=new I(this.w,this.ctx),this._seriesWrap=null,this._seriesWrapIndex=-1}resetSeriesWrapCache(){this._seriesWrap=null,this._seriesWrapIndex=-1}setGlobalMarkerSize(){const t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length<t.seriesData.series.length+1)for(let e=0;e<=t.seriesData.series.length;e++)typeof t.globals.markers.size[e]>"u"&&t.globals.markers.size.push(t.globals.markers.size[0])}else t.globals.markers.size=t.config.series.map(()=>t.config.markers.size)}plotChartMarkers({pointsPos:t,seriesIndex:e,j:s,pSize:i,alwaysDrawMarker:a=!1,isVirtualPoint:n=!1}){const r=this.w,o=e,l=t;let c=null;const h=new I(this.w),d=Gt(this.ctx,h),f=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(l.x))for(let u=0;u<l.x.length;u++){let g,p=s,b=!R.isNumber(l.y[u]);r.globals.markers.largestSize===0&&r.globals.hasNullValues&&r.seriesData.series[o][s+1]!==null&&!n&&(b=!0),s===1&&u===0&&(p=0),s===1&&u===1&&(p=1);let m="apexcharts-marker";if((r.config.chart.type==="line"||r.config.chart.type==="area")&&!r.globals.comboCharts&&!r.config.tooltip.intersect&&(m+=" no-pointer-events"),(Array.isArray(r.config.markers.size)?r.globals.markers.size[e]>0:r.config.markers.size>0)||a||f){d.kind==="canvas"&&(typeof r.globals.pointsArray[e]>"u"&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e][p]=[l.x[u],l.y[u]]),b||(m+=` w${R.randomId()}`);const v=this.getMarkerConfig({cssClass:m,seriesIndex:e,dataPointIndex:p}),y=r.config.series[o];if(y.data[p]&&(y.data[p].fillColor&&(v.pointFillColor=y.data[p].fillColor),y.data[p].strokeColor&&(v.pointStrokeColor=y.data[p].strokeColor)),typeof i<"u"&&(v.pSize=i),(l.x[u]<-r.globals.markers.largestSize||l.x[u]>r.layout.gridWidth+r.globals.markers.largestSize||l.y[u]<-r.globals.markers.largestSize||l.y[u]>r.layout.gridHeight+r.globals.markers.largestSize)&&(v.pSize=0),!b){if((r.globals.markers.size[e]>0||a||f)&&!c){const _=!a&&!f;_&&this._seriesWrap&&this._seriesWrapIndex===e?c=this._seriesWrap:(c=d.group({class:_?"apexcharts-series-markers":""}),c.attr("clip-path",`url(#gridRectMarkerMask${r.globals.cuid})`),this.setupMarkerDelegation(c),_&&(this._seriesWrap=c,this._seriesWrapIndex=e))}g=d.drawMarker(l.x[u],l.y[u],v),g.attr("rel",p),g.attr("j",p),g.attr("index",e),g.node.setAttribute("default-marker-size",v.pSize),kt(g,l.x[u],r),this._filters.setSelectionFilter(g,e,p),c&&c.add(g)}}else typeof r.globals.pointsArray[e]>"u"&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([l.x[u],l.y[u]])}return c}getMarkerConfig({cssClass:t,seriesIndex:e,dataPointIndex:s=null,radius:i=null,size:a=null,
27strokeWidth:n=null}){const r=this.w,o=this.getMarkerStyle(e);let l=a===null?r.globals.markers.size[e]:a;const c=r.config.markers;return s!==null&&c.discrete.length&&c.discrete.map(h=>{h.seriesIndex===e&&h.dataPointIndex===s&&(o.pointStrokeColor=h.strokeColor,o.pointFillColor=h.fillColor,l=h.size,o.pointShape=h.shape)}),{pSize:i===null?l:i,pRadius:i!==null?i:c.radius,pointStrokeWidth:n!==null?n:Array.isArray(c.strokeWidth)?c.strokeWidth[e]:c.strokeWidth,pointStrokeColor:o.pointStrokeColor,pointFillColor:o.pointFillColor,shape:o.pointShape||(Array.isArray(c.shape)?c.shape[e]:c.shape),class:t,pointStrokeOpacity:Array.isArray(c.strokeOpacity)?c.strokeOpacity[e]:c.strokeOpacity,pointStrokeDashArray:Array.isArray(c.strokeDashArray)?c.strokeDashArray[e]:c.strokeDashArray,pointFillOpacity:Array.isArray(c.fillOpacity)?c.fillOpacity[e]:c.fillOpacity,seriesIndex:e}}setupMarkerDelegation(t){const e=this.w,s=".apexcharts-marker";this._graphics.setupEventDelegation(t,s),t.node.addEventListener("click",i=>{e.config.markers.onClick&&I._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onClick(i)}),t.node.addEventListener("dblclick",i=>{e.config.markers.onDblClick&&I._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onDblClick(i)}),t.node.addEventListener("touchstart",i=>{const a=I._findDelegateTarget(i.target,t.node,s);a&&a.instance&&this._graphics.pathMouseDown(a.instance,i)},{passive:!0})}addEvents(t){const e=this.w;t.node.addEventListener("mouseenter",this._graphics.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",this._graphics.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",this._graphics.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",this._graphics.pathMouseDown.bind(this.ctx,t),{passive:!0})}getMarkerStyle(t){const e=this.w,s=e.globals.markers.colors,i=e.config.markers.strokeColor||e.config.markers.strokeColors,a=Array.isArray(i)?i[t]:i,n=Array.isArray(s)?s[t]:s;return{pointStrokeColor:a,pointFillColor:n}}}class Ui{constructor(t,e){this.ctx=e,this.w=t,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new ne(this.w),this.filters=new dt(this.w),this.fill=new pt(this.w),this.markers=new re(this.w,this.ctx),this.graphics=new I(this.w),this._elPointsWrap=null,this._elPointsWrapParent=null,this._perSeries=null}draw(t,e,s){const i=this.w,a=this.graphics,n=Gt(this.ctx,a),r=s.realIndex,o=s.pointsPos,l=s.zRatio,c=s.elParent;let h=this._elPointsWrap;if((!h||this._elPointsWrapParent!==c)&&(h=n.group({class:`apexcharts-series-markers apexcharts-series-${i.config.chart.type}`}),h.attr("clip-path",`url(#gridRectMarkerMask${i.globals.cuid})`),this.markers.setupMarkerDelegation(h),c.add(h),this._elPointsWrap=h,this._elPointsWrapParent=c,this._perSeries=this._buildPerSeriesCache(r,n)),Array.isArray(o.x))for(let d=0;d<o.x.length;d++){let f=e+1,u=!0;e===0&&d===0&&(f=0),e===0&&d===1&&(f=1);let g=i.globals.markers.size[r];if(l!==1/0){const m=i.config.plotOptions.bubble;g=i.seriesData.seriesZ[r][f],m.zScaling&&(g/=l),m.minBubbleRadius&&g<m.minBubbleRadius&&(g=m.minBubbleRadius),m.maxBubbleRadius&&g>m.maxBubbleRadius&&(g=m.maxBubbleRadius)}const p=o.x[d],b=o.y[d];if(g=g||0,(b===null||typeof i.seriesData.series[r][f]>"u")&&(u=!1),u){const m=this.drawPoint(p,b,g,r,f,e);h.add(m),n.kind==="canvas"&&(typeof i.globals.pointsArray[r]>"u"&&(i.globals.pointsArray[r]=[]),i.globals.pointsArray[r][f]=[p,b])}}}_buildPerSeriesCache(t,e){var s;const i=this.w;return{realIndex:t,emit:e,isBubble:i.config.chart.type==="bubble"||i.globals.comboCharts&&i.config.series[t]&&i.config.series[t].type==="bubble",canCacheConfig:!i.config.markers.discrete.length,markerConfig:null,fillCacheable:void 0,fillCircle:void 0,dropShadowEnabled:i.config.chart.dropShadow.enabled,doInitialAnim:this.initialAnim&&!i.globals.dataChanged&&!i.globals.resized,jitter:(s=i.config.plotOptions.scatter)==null?void 0:s.jitter,anim:null}}drawPoint(t,e,s,i,a,n){var r;const o=this.w,l=i,c=this.anim,h=this.filters,d=this.fill,f=this.markers;let u=this._perSeries;(!u||u.realIndex!==i)&&(u=this._perSeries=this._buildPerSeriesCache(i,Gt(this.ctx,this.graphics)));const g=u.emit;let p;u.canCacheConfig?(u.markerConfig||(u.markerConfig=f.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:u.isBubble?s:null})),p=u.markerConfig,u.isBubble&&(p.pSize=s,p.pRadius=s)):p=f.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:u.isBubble?s:null});const m=o.config.series[l].data[a];let A;u.fillCircle!==void 0?A=u.fillCircle:(A=d.fillPath({seriesNumber:i,dataPointIndex:a,color:p.pointFillColor,patternUnits:"objectBoundingBox",value:o.seriesData.series[i][n]}),u.fillCacheable===void 0&&(u.fillCacheable=u.canCacheConfig&&d.getFillType(i)==="solid"&&typeof p.pointFillColor=="string"&&!!p.pointFillColor),u.fillCacheable&&!m?.fillColor&&(u.fillCircle=A));const v=g.drawMarker(t,e,p);m?.fillColor&&(A=m.fillColor);const y=u.jitter;if(y?.enabled&&y.distributed&&o.globals.colors.length){const w=Math.round((r=o.seriesData.seriesX[i])==null?void 0:r[a]);isNaN(w)||(A=o.globals.colors[w%o.globals.colors.length])}if(v.attr({fill:A}),u.dropShadowEnabled){const w=o.config.chart.dropShadow;h.dropShadow(v,w,i)}if(u.doInitialAnim){if(!u.anim){const _=o.config.chart.animations,C=o.globals.dataPoints||1,S=_.animateGradually,k=S&&S.enabled!==!1;u.anim={popSpeed:_.speed,baseDelay:k?Math.min(20,_.speed*.5/Math.max(1,C)):0}}const w=Ds({style:u.anim.baseDelay>0?"sequential":"none",index:a,baseDelay:u.anim.baseDelay});c.animatePop(v,{speed:u.anim.popSpeed,delay:w,onComplete:()=>c.animationCompleted(v)})}else o.globals.animationEnded=!0;return v.attr({rel:a,j:a,index:i,"default-marker-size":p.pSize}),h.setSelectionFilter(v,i,a),v}centerTextInBubble(t){const e=this.w;return t=t+parseInt(e.config.dataLabels.style.fontSize,10)/4,{y:t}}}class Ut{constructor(t,e=null){this.w=t,this.ctx=e}dataLabelsCorrection(t,e,s,i,a,n,r){const o=this.w,l=new I(this.w);let c=!1;const h=l.getTextRects(s,r),d=h.width,f=h.height;e<0&&(e=0),e>o.layout.gridHeight+f&&(e=o.layout.gridHeight+f/2),typeof o.globals.dataLabelsRects[i]>"u"&&(o.globals.dataLabelsRects[i]=[]),o.globals.dataLabelsRects[i].push({x:t,y:e,width:d,height:f});const u=o.globals.dataLabelsRects[i].length-2,g=typeof o.globals.lastDrawnDataLabelsIndexes[i]<"u"?o.globals.lastDrawnDataLabelsIndexes[i][o.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(typeof o.globals.dataLabelsRects[i][u]<"u"){const p=o.globals.dataLabelsRects[i][g];(t>p.x+p.width||e>p.y+p.height||e+f<p.y||t+d<p.x)&&(c=!0)}return(a===0||n)&&(c=!0),{x:t,y:e,textRects:h,drawnextLabel:c}}drawDataLabel({type:t,pos:e,i:s,j:i,isRangeStart:a,strokeWidth:n=2}){const r=this.w,o=new I(this.w),l=r.config.dataLabels;let c=0,h=0,d=i,f=null;if(r.globals.collapsedSeriesIndices.indexOf(s)!==-1||!l.enabled||!Array.isArray(e.x))return f;f=o.group({class:"apexcharts-data-labels"});for(let g=0;g<e.x.length;g++)if(c=e.x[g]+l.offsetX,h=e.y[g]+l.offsetY+n,!isNaN(c)){i===1&&g===0&&(d=0),i===1&&g===1&&(d=1);let p=r.seriesData.series[s][d];t==="rangeArea"&&(a?p=r.rangeData.seriesRangeStart[s][d]:p=r.rangeData.seriesRangeEnd[s][d]);let b="";const m=v=>r.config.dataLabels.formatter(v,{seriesIndex:s,dataPointIndex:d,w:r});r.config.chart.type==="bubble"?(p=r.seriesData.seriesZ[s][d],b=m(p),h=e.y[g],h=new Ui(this.w,this.ctx).centerTextInBubble(h).y):typeof p<"u"&&(b=m(p));let A=r.config.dataLabels.textAnchor;r.globals.isSlopeChart&&(d===0?A="end":d===r.config.series[s].data.length-1?A="start":A="middle"),this.plotDataLabelsText({x:c,y:h,text:b,i:s,j:d,parent:f,offsetCorrection:!0,dataLabelsConfig:r.config.dataLabels,textAnchor:A})}return f}plotDataLabelsText(t){const e=this.w,s=new I(this.w);let{x:i,y:a,i:n,j:r,text:o,textAnchor:l,fontSize:c,parent:h,dataLabelsConfig:d,color:f,alwaysDrawDataLabel:u,offsetCorrection:g,className:p}=t,b=null;if(Array.isArray(e.config.dataLabels.enabledOnSeries)&&e.config.dataLabels.enabledOnSeries.indexOf(n)<0)return b;let m={x:i,y:a,drawnextLabel:!0,textRects:null};if(g&&(m=this.dataLabelsCorrection(i,a,o,n,r,u,parseInt(d.style.fontSize,10).toString())),e.interact.zoomed||(i=m.x,a=m.y),m.textRects){const w=e.globals.barPadForNumericAxis||
270;(i<-(w+20)-m.textRects.width||i>e.layout.gridWidth+m.textRects.width+w+30)&&(o="")}let A=e.globals.dataLabels.style.colors[n];((e.config.chart.type==="bar"||e.config.chart.type==="rangeBar")&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(A=e.globals.dataLabels.style.colors[r]),typeof A=="function"&&(A=A({series:e.seriesData.series,seriesIndex:n,dataPointIndex:r,w:e})),f&&(A=f);let v=d.offsetX,y=d.offsetY;if((e.config.chart.type==="bar"||e.config.chart.type==="rangeBar")&&(v=0,y=0),e.globals.isSlopeChart&&(r!==0&&(v=d.offsetX*-2+5),r!==0&&r!==e.config.series[n].data.length-1&&(v=0)),m.drawnextLabel){if(l==="middle"&&i===e.layout.gridWidth&&(l="end"),b=s.drawText({x:i+v,y:a+y,foreColor:A,textAnchor:l||d.textAnchor,text:o,fontSize:c||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"}),b.attr({class:p||"apexcharts-datalabel",cx:i,cy:a}),d.dropShadow.enabled){const w=d.dropShadow;new dt(this.w).dropShadow(b,w)}h.add(b),kt(b,i,e),typeof e.globals.lastDrawnDataLabelsIndexes[n]>"u"&&(e.globals.lastDrawnDataLabelsIndexes[n]=[]),e.globals.lastDrawnDataLabelsIndexes[n].push(r)}return b}addBackgroundToDataLabel(t,e){const s=this.w,i=s.config.dataLabels.background,a=i.padding,n=i.padding/2,r=e.width,o=e.height,c=new I(this.w).drawRect(e.x-a,e.y-n/2,r+a*2,o+n,i.borderRadius,s.config.chart.background==="transparent"||!s.config.chart.background?"#fff":s.config.chart.background,i.opacity,i.borderWidth,i.borderColor);return i.dropShadow.enabled&&new dt(this.w).dropShadow(c,i.dropShadow),c}dataLabelsBackground(){var t;const e=this.w;if(e.config.chart.type==="bubble")return;const s=e.dom.baseEl.querySelectorAll(".apexcharts-datalabels text");for(let i=0;i<s.length;i++){const a=s[i],n=a.getBBox();let r=null;if(n.width&&n.height&&(r=this.addBackgroundToDataLabel(a,n)),r){(t=a.parentNode)==null||t.insertBefore(r.node,a);const o=e.config.dataLabels.background.backgroundColor||a.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?r.animate().attr({fill:o}):r.attr({fill:o}),a.setAttribute("fill",e.config.dataLabels.background.foreColor);const c=a.getAttribute("cx");c!==null&&kt(r,parseFloat(c),e)}}}bringForward(){const t=this.w,e=t.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),s=t.dom.baseEl.querySelector(".apexcharts-plot-series:last-child");for(let i=0;i<e.length;i++)s&&s.insertBefore(e[i],s.nextSibling)}}class Es{static invalidateAll(t){!t||!t.globals||(t.globals.cachedSelectors&&(t.globals.cachedSelectors={}),t.globals.domCache&&t.globals.domCache.clear(),t.globals.dimensionCache={})}static invalidateDimensions(t){!t||!t.globals||(t.globals.dimensionCache={})}static invalidateSelectors(t){!t||!t.globals||t.globals.cachedSelectors&&(t.globals.cachedSelectors={})}static getCachedSelector(t,e,s){return!t||!t.globals?s():(t.globals.cachedSelectors||(t.globals.cachedSelectors={}),t.globals.cachedSelectors[e]||(t.globals.cachedSelectors[e]=s()),t.globals.cachedSelectors[e])}static getCachedDimension(t,e,s,i=1e3){if(!t||!t.globals)return s();t.globals.dimensionCache||(t.globals.dimensionCache={});const a=t.globals.dimensionCache[e],n=Date.now();if(a&&a.lastUpdate&&n-a.lastUpdate<i)return a.value;const r=s();return t.globals.dimensionCache[e]={value:r,lastUpdate:n},r}static cacheDOMElement(t,e,s){!t||!t.globals||(t.globals.domCache||(t.globals.domCache=new Map),t.globals.domCache.set(e,s))}static getCachedDOMElement(t,e){return!t||!t.globals||!t.globals.domCache?null:t.globals.domCache.get(e)||null}}class Pt{constructor(t,{theme:e=null,timeScale:s=null}={}){this.w=t,this.theme=e,this.timeScale=s}getLabel(t,e,s,i,a=[],n="12px",r=!0){const o=this.w,l=typeof t[i]>"u"?"":t[i];let c=l;const h=o.formatters.xLabelFormatter,d=o.config.xaxis.labels.formatter,f=new be(this.w),u=l;r&&(c=f.xLabelFormat(h,l,u,{i,dateFormatter:new xt(this.w).formatDate,w:o}),d!==void 0&&(c=d(l,t[i],{i,dateFormatter:new xt(this.w).formatDate,w:o}))),e.length>0?(s=e[i].position,c=e[i].value):o.config.xaxis.type==="datetime"&&d===void 0&&(c=""),typeof c>"u"&&(c=""),c=Array.isArray(c)?c:c.toString();const g=new I(this.w);let p={};o.layout.rotateXLabels&&r?p=g.getTextRects(c,parseInt(n,10).toString(),null,`rotate(${o.config.xaxis.labels.rotate} 0 0)`,!1):p=g.getTextRects(c,parseInt(n,10).toString());const b=!o.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(c)&&(String(c)==="NaN"||a.indexOf(c)>=0&&b)&&(c=""),{x:s,text:c,textRect:p}}checkLabelBasedOnTickamount(t,e,s){const i=this.w;let a=i.config.xaxis.tickAmount;if(a==="dataPoints"&&(a=Math.round(i.layout.gridWidth/120)),a>s)return e;const n=Math.round(s/(a+1));return t%n===0||(e.text=""),e}checkForOverflowingLabels(t,e,s,i,a){const n=this.w;if(t===0&&n.globals.skipFirstTimelinelabel&&(e.text=""),t===s-1&&n.globals.skipLastTimelinelabel&&(e.text=""),n.config.xaxis.labels.hideOverlappingLabels&&i.length>0){const r=a[a.length-1];if(n.config.xaxis.labels.trim&&n.config.xaxis.type!=="datetime")return e;e.x<r.textRect.width/(n.layout.rotateXLabels?Math.max(Math.abs(n.config.xaxis.labels.rotate),1)/12:1.01)+r.x&&(e.text="")}return e}
27checkForReversedLabels(t,e){const s=this.w;return s.config.yaxis[t]&&s.config.yaxis[t].reversed&&e.reverse(),e}yAxisAllSeriesCollapsed(t){const e=this.w.globals;return!e.seriesYAxisMap[t].some(s=>e.collapsedSeriesIndices.indexOf(s)===-1)}translateYAxisIndex(t){const e=this.w,s=e.globals,i=e.config.yaxis;return e.seriesData.series.length>i.length||i.some(n=>Array.isArray(n.seriesName))?t:s.seriesYAxisReverseMap[t]}isYAxisHidden(t){const e=this.w,s=e.config.yaxis[t];if(!s.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!s.showForNullSeries){const i=e.globals.seriesYAxisMap[t],a=new rt(this.w);return i.every(n=>a.isSeriesNull(n))}return!1}getYAxisForeColor(t,e){var s;const i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&((s=this.theme)==null||s.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1)),t}drawYAxisTicks(t,e,s,i,a,n,r){const o=this.w,l=new I(this.w);let c=o.layout.translateY+o.config.yaxis[a].labels.offsetY;if(o.globals.isBarHorizontal?c=0:o.config.chart.type==="heatmap"&&(c+=n/2),i.show&&e>0){o.config.yaxis[a].opposite===!0&&(t=t+i.width);for(let h=e;h>=0;h--){const d=l.drawLine(t+s.offsetX-i.width+i.offsetX,c+i.offsetY,t+s.offsetX+i.offsetX,c+i.offsetY,i.color);r.add(d),c+=n}}}}class ie{constructor(t,e,s){this.w=t,this.ctx=e,this.elgrid=s,this.axesUtils=new Pt(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=[],t.config.xaxis.position==="top"?this.offY=0:this.offY=t.layout.gridHeight,this.offY=this.offY+t.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=t.config.chart.type==="bar"&&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 I(this.w),s=e.group({class:"apexcharts-xaxis",transform:`translate(${t.config.xaxis.offsetX}, ${t.config.xaxis.offsetY})`}),i=e.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${t.layout.translateXAxisX}, ${t.layout.translateXAxisY})`});s.add(i);let a=[];for(let n=0;n<this.xaxisLabels.length;n++)a.push(this.xaxisLabels[n]);if(this.drawXAxisLabelAndGroup(!0,e,i,a,t.axisFlags.isXNumeric,(n,r)=>r),t.labelData.hasXaxisGroups){const n=t.labelData.groups;a=[];for(let o=0;o<n.length;o++)a.push(n[o].title);const r={};t.config.xaxis.group.style&&(r.xaxisFontSize=t.config.xaxis.group.style.fontSize,r.xaxisFontFamily=t.config.xaxis.group.style.fontFamily,r.xaxisForeColors=t.config.xaxis.group.style.colors,r.fontWeight=t.config.xaxis.group.style.fontWeight,r.cssClass=t.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,e,i,a,!1,(o,l)=>n[o].cols*l,r)}if(t.config.xaxis.title.text!==void 0){const n=e.group({class:"apexcharts-xaxis-title"}),r=e.drawText({x:t.layout.gridWidth/2+t.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(t.config.xaxis.position==="bottom"?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});n.add(r),s.add(n)}if(t.config.xaxis.axisBorder.show){const n=t.globals.barPadForNumericAxis,r=e.drawLine(t.globals.padHorizontal+t.config.xaxis.axisBorder.offsetX-n,this.offY,this.xaxisBorderWidth+n,this.offY,t.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(r):s.add(r)}return s}drawXAxisLabelAndGroup(t,e,s,i,a,n,r={}){var o,l;const c=[],h=[],d=this.w,f=r.xaxisFontSize||this.xaxisFontSize,u=r.xaxisFontFamily||this.xaxisFontFamily,g=r.xaxisForeColors||this.xaxisForeColors,p=r.fontWeight||d.config.xaxis.labels.style.fontWeight,b=r.cssClass||d.config.xaxis.labels.style.cssClass;let m,A=d.globals.padHorizontal;const v=i.length;
27let y=d.config.xaxis.type==="category"?d.globals.dataPoints:v;if(y===0&&v>y&&(y=v),a){const w=Math.max(Number(d.config.xaxis.tickAmount)||1,y>1?y-1:y);m=d.layout.gridWidth/Math.min(w,v-1),A=A+n(0,m)/2+d.config.xaxis.labels.offsetX}else m=d.layout.gridWidth/y,A=A+n(0,m)+d.config.xaxis.labels.offsetX;for(let w=0;w<=v-1;w++){let _=A-n(w,m)/2+d.config.xaxis.labels.offsetX;w===0&&v===1&&m/2===A&&y===1&&(_=d.layout.gridWidth/2);let C=this.axesUtils.getLabel(i,d.labelData.timescaleLabels,_,w,c,f,t),S=28;d.layout.rotateXLabels&&t&&(S=22),d.config.xaxis.title.text&&d.config.xaxis.position==="top"&&(S+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(S=S+parseFloat(f)+(d.layout.xAxisLabelsHeight-d.layout.xAxisGroupLabelsHeight)+(d.layout.rotateXLabels?10:0)),typeof d.config.xaxis.tickAmount<"u"&&d.config.xaxis.tickAmount!=="dataPoints"&&d.config.xaxis.type!=="datetime"?C=this.axesUtils.checkLabelBasedOnTickamount(w,C,v):C=this.axesUtils.checkForOverflowingLabels(w,C,v,c,h);const M=()=>t&&d.config.xaxis.convertedCatToNumeric?g[d.globals.minX+w-1]:g[w],E=((l=(o=C.textRect)==null?void 0:o.width)!=null?l:0)/2,D=C.x+E<0;if(d.config.xaxis.labels.show&&!D){const T=e.drawText({x:C.x,y:this.offY+d.config.xaxis.labels.offsetY+S-(d.config.xaxis.position==="top"?d.layout.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:C.text,textAnchor:"middle",fontWeight:p,fontSize:f,fontFamily:u,foreColor:Array.isArray(g)?M():g,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+b});if(s.add(T),T.on("click",F=>{if(typeof d.config.chart.events.xAxisLabelClick=="function"){const P=Object.assign({},d,{labelIndex:w});d.config.chart.events.xAxisLabelClick(F,this.ctx,P)}}),t){const F=B.createElementNS(tt,"title");F.textContent=Array.isArray(C.text)?C.text.join(" "):C.text,T.node.appendChild(F),C.text!==""&&(c.push(C.text),h.push(C))}}w<v-1&&(A=A+n(w+1,m))}}drawXaxisInversed(t){const e=this.w,s=new I(this.w),i=e.config.yaxis[0].opposite?e.globals.translateYAxisX[t]:0,a=s.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:t}),n=s.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+i+", 0)"});a.add(n);const r=[];if(e.config.yaxis[t].show)for(let u=0;u<this.xaxisLabels.length;u++)r.push(this.xaxisLabels[u]);const o=e.layout.gridHeight/r.length;let l=-(o/2.2);const c=e.formatters.yLabelFormatters[0],h=e.config.yaxis[0].labels;if(h.show)for(let u=0;u<=r.length-1;u++){let g=typeof r[u]>"u"?"":r[u];g=c(g,{seriesIndex:t,dataPointIndex:u,w:e});const p=this.axesUtils.getYAxisForeColor(h.style.colors,t),b=()=>Array.isArray(p)?p[u]:p;let m=0;Array.isArray(g)&&(m=g.length/2*parseInt(h.style.fontSize,10));let A=h.offsetX-15,v="end";this.yaxis.opposite&&(v="start"),e.config.yaxis[0].labels.align==="left"?(A=h.offsetX,v="start"):e.config.yaxis[0].labels.align==="center"?(A=h.offsetX,v="middle"):e.config.yaxis[0].labels.align==="right"&&(v="end");const y=s.drawText({x:A,y:l+o+h.offsetY-m,text:g,textAnchor:v,foreColor:b(),fontSize:h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+h.style.cssClass,maxWidth:h.maxWidth});n.add(y),y.on("click",_=>{if(typeof e.config.chart.events.xAxisLabelClick=="function"){const C=Object.assign({},e,{labelIndex:u});e.config.chart.events.xAxisLabelClick(_,this.ctx,C)}});const w=B.createElementNS(tt,"title");if(w.textContent=Array.isArray(g)?g.join(" "):g,y.node.appendChild(w),e.config.yaxis[t].labels.rotate!==0){const _=s.rotateAroundCenter(y.node);y.node.setAttribute("transform",`rotate(${e.config.yaxis[t].labels.rotate} 0 ${_.y})`)}l=l+o}if(e.config.yaxis[0].title.text!==void 0){const u=s.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+i+", 0)"}),g=s.drawText({x:e.config.yaxis[0].title.offsetX,y:e.layout.gridHeight/2+e.config.yaxis[0].title.offsetY,text:e.config.yaxis[0].title.text,textAnchor:"middle",foreColor:e.config.yaxis[0].title.style.color,fontSize:e.config.yaxis[0].title.style.fontSize,fontWeight:e.config.yaxis[0].title.style.fontWeight,fontFamily:e.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+e.config.yaxis[0].title.style.cssClass});u.add(g),a.add(u)}let d=0;this.isCategoryBarHorizontal&&e.config.yaxis[0].opposite&&(d=e.layout.gridWidth);const f=e.config.xaxis.axisBorder;if(f.show){const u=s.drawLine(e.globals.padHorizontal+f.offsetX+d,1+f.offsetY,e.globals.padHorizontal+f.offsetX+d,e.layout.gridHeight+f.offsetY,f.color,0);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(u):a.add(u)}return e.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(d,r.length,e.config.yaxis[0].axisBorder,e.config.yaxis[0].axisTicks,0,o,a),a}drawXaxisTicks(t,e,s){const i=this.w,a=t;if(t<0||t-2>i.layout.gridWidth)return;const n=this.offY+i.config.xaxis.axisTicks.offsetY;if(e=e+n+i.config.xaxis.axisTicks.height,i.config.xaxis.position==="top"&&(e=n-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){const o=new I(this.w).drawLine(t+i.config.xaxis.axisTicks.offsetX,n+i.config.xaxis.offsetY,a+i.config.xaxis.axisTicks.offsetX,e+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);s.add(o),o.node.classList.add("apexcharts-xaxis-tick")}}getXAxisTicksPositions(){const t=this.w,e=[],s=this.xaxisLabels.length;let i=t.globals.padHorizontal;if(t.labelData.timescaleLabels.length>0)for(let a=0;a<s;a++)i=this.xaxisLabels[a].position,e.push(i);else{const a=s;for(let n=0;n<a;n++){let r=a;t.axisFlags.isXNumeric&&t.config.chart.type!=="bar"&&(r-=1),i=i+t.layout.gridWidth/r,e.push(i)}}return e}xAxisLabelCorrections(){var t,e,s;const i=this.w,a=new I(this.w),n=i.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),r=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),o=i.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),l=i.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(i.layout.rotateXLabels||i.config.xaxis.labels.rotateAlways)for(let c=0;c<r.length;
27c++){const h=a.rotateAroundCenter(r[c]);h.y=h.y-1,h.x=h.x+1,r[c].setAttribute("transform",`rotate(${i.config.xaxis.labels.rotate} ${h.x} ${h.y})`),r[c].setAttribute("text-anchor","end"),n?.setAttribute("transform","translate(0, -10)");const d=r[c].childNodes;i.config.xaxis.labels.trim&&Array.prototype.forEach.call(d,f=>{a.placeTextWithEllipsis(f,f.textContent,i.layout.xAxisLabelsHeight-(i.config.legend.position==="bottom"?20:10))})}else{const c=i.layout.gridWidth/(i.labelData.labels.length+1);for(let h=0;h<r.length;h++){const d=r[h].childNodes;i.config.xaxis.labels.trim&&i.config.xaxis.type!=="datetime"&&Array.prototype.forEach.call(d,f=>{a.placeTextWithEllipsis(f,f.textContent,c)})}}if(o.length>0){const c=o[o.length-1].getBBox(),h=o[0].getBBox();c.x<-20&&((t=o[o.length-1].parentNode)==null||t.removeChild(o[o.length-1])),h.x+h.width>i.layout.gridWidth&&!i.globals.isBarHorizontal&&((e=o[0].parentNode)==null||e.removeChild(o[0]));for(let d=0;d<l.length;d++)a.placeTextWithEllipsis(l[d],(s=l[d].textContent)!=null?s:"",i.config.yaxis[0].labels.maxWidth-(i.config.yaxis[0].title.text?parseFloat(i.config.yaxis[0].title.style.fontSize)*2:0)-15)}}}class ls{constructor(t,e){this.w=t,this.ctx=e,this.xaxisLabels=t.labelData.labels.slice(),this.axesUtils=new Pt(e.w,{theme:e.theme,timeScale:e.timeScale}),this.isRangeBar=t.rangeData.seriesRange.length&&t.globals.isBarHorizontal,t.labelData.timescaleLabels.length>0&&(this.xaxisLabels=t.labelData.timescaleLabels.slice())}drawGridArea(t=null){const e=this.w,s=new I(this.w);t||(t=s.group({class:"apexcharts-grid"}));const i=s.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.layout.gridHeight,"transparent"),a=s.drawLine(e.globals.padHorizontal,e.layout.gridHeight,e.layout.gridWidth,e.layout.gridHeight,"transparent");return t.add(a),t.add(i),t}drawGrid(){if(this.w.globals.axisCharts){const e=this.renderGrid();return this.drawGridArea(e.el),e}return null}createGridMask(){const t=this.w,e=t.globals,s=new I(this.w),i=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,a=h=>{const d=B.createElementNS(tt,"clipPath");return d.setAttribute("id",h),d};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}`);const n=["bar","rangeBar","candlestick","boxPlot","violin"].includes(t.config.chart.type)||t.globals.comboBarCount>0;let r=0,o=0;n&&t.axisFlags.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.config.grid.padding.left,e.barPadForNumericAxis),o=Math.max(t.config.grid.padding.right,e.barPadForNumericAxis)),t.dom.elGridRect=s.drawRect(-i/2-2,-i/2-2,t.layout.gridWidth+i+4,t.layout.gridHeight+i+4,0,"#fff"),t.dom.elGridRectBar=s.drawRect(-i/2-r-2,-i/2-2,t.layout.gridWidth+i+o+r+4,t.layout.gridHeight+i+4,0,"#fff");const l=t.globals.markers.largestSize;t.dom.elGridRectMarker=s.drawRect(Math.min(-i/2-r-2,-l),-l,t.layout.gridWidth+Math.max(i+o+r+4,l*2),t.layout.gridHeight+l*2,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 c=t.dom.elDefs.node;c.appendChild(t.dom.elGridRectMask),c.appendChild(t.dom.elGridRectBarMask),c.appendChild(t.dom.elGridRectMarkerMask),c.appendChild(t.dom.elForecastMask),c.appendChild(t.dom.elNonForecastMask)}_drawGridLines({i:t,x1:e,y1:s,x2:i,y2:a,xCount:n,parent:r}){const o=this.w;if(!(t===0&&o.globals.skipFirstTimelinelabel||t===n-1&&o.globals.skipLastTimelinelabel&&!o.config.xaxis.labels.formatter||o.config.chart.type==="radar")){o.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:e,y1:s,x2:i,y2:a,xCount:n,parent:r});let c=0;if(o.labelData.hasXaxisGroups&&o.config.xaxis.tickPlacement==="between"){const d=o.labelData.groups;if(d){let f=0;for(let u=0;f<t&&u<d.length;u++)f+=d[u].cols;f===t&&(c=o.layout.xAxisLabelsHeight*.6)}}new ie(this.w,this.ctx).drawXaxisTicks(e,c,o.dom.elGraphical)}}_drawGridLine({i:t,x1:e,y1:s,x2:i,y2:a,xCount:n,parent:r}){const o=this.w,l=r.node.classList.contains("apexcharts-gridlines-h
27orizontal"),c=o.globals.barPadForNumericAxis,h=s===0&&a===0||e===0&&i===0||s===o.layout.gridHeight&&a===o.layout.gridHeight||o.globals.isBarHorizontal&&(t===0||t===n-1),f=new I(this.w).drawLine(e-(l?c:0),s,i+(l?c:0),a,o.config.grid.borderColor,o.config.grid.strokeDashArray);f.node.classList.add("apexcharts-gridline"),h&&o.config.grid.show?this.elGridBorders.add(f):r.add(f)}_drawGridBandRect({c:t,x1:e,y1:s,x2:i,y2:a,type:n}){const r=this.w,o=new I(this.w),l=r.globals.barPadForNumericAxis,c=r.config.grid[n].colors[t],h=o.drawRect(e-(n==="row"?l:0),s,i+(n==="row"?l*2:0),a,0,c,r.config.grid[n].opacity);this.elg.add(h),h.attr("clip-path",`url(#gridRectMask${r.globals.cuid})`),h.node.classList.add(`apexcharts-grid-${n}`)}_drawXYLines({xCount:t,tickAmount:e}){var s;const i=this.w,a=({xC:r,x1:o,y1:l,x2:c,y2:h})=>{for(let d=0;d<r;d++)o=this.xaxisLabels[d].position,c=this.xaxisLabels[d].position,this._drawGridLines({i:d,x1:o,y1:l,x2:c,y2:h,xCount:t,parent:this.elgridLinesV})},n=({xC:r,x1:o,y1:l,x2:c,y2:h})=>{for(let d=0;d<r+(i.axisFlags.isXNumeric?0:1);d++)d===0&&r===1&&i.globals.dataPoints===1&&(o=i.layout.gridWidth/2,c=o),this._drawGridLines({i:d,x1:o,y1:l,x2:c,y2:h,xCount:t,parent:this.elgridLinesV}),o+=i.layout.gridWidth/(i.axisFlags.isXNumeric?r-1:r),c=o};if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show){const r=i.globals.padHorizontal,o=0;let l;const c=i.layout.gridHeight;i.labelData.timescaleLabels.length?a({xC:t,x1:r,y1:o,x2:l,y2:c}):(i.axisFlags.isXNumeric&&(t=(s=i.globals.xAxisScale)==null?void 0:s.result.length),n({xC:t,x1:r,y1:o,x2:l,y2:c}))}if(i.config.grid.yaxis.lines.show){let o=0,l=0;const c=i.layout.gridWidth;let h=e+1;this.isRangeBar&&(h=i.labelData.labels.length);for(let d=0;d<h+(this.isRangeBar?1:0);d++)this._drawGridLine({i:d,xCount:h+(this.isRangeBar?1:0),x1:0,y1:o,x2:c,y2:l,parent:this.elgridLinesH}),o+=i.layout.gridHeight/(this.isRangeBar?h:e),l=o}}_drawInvertedXYLines({xCount:t}){const e=this.w;if(e.config.grid.xaxis.lines.show||e.config.xaxis.axisTicks.show){let s=e.globals.padHorizontal;const i=0;let a;const n=e.layout.gridHeight;for(let r=0;r<t+1;r++)e.config.grid.xaxis.lines.show&&this._drawGridLine({i:r,xCount:t+1,x1:s,y1:i,x2:a,y2:n,parent:this.elgridLinesV}),new ie(this.w,this.ctx).drawXaxisTicks(s,0,e.dom.elGraphical),s+=e.layout.gridWidth/t,a=s}if(e.config.grid.yaxis.lines.show){let i=0,a=0;const n=e.layout.gridWidth;for(let r=0;r<e.globals.dataPoints+1;r++)this._drawGridLine({i:r,xCount:e.globals.dataPoints+1,x1:0,y1:i,x2:n,y2:a,parent:this.elgridLinesH}),i+=e.layout.gridHeight/e.globals.dataPoints,a=i}}renderGrid(){var t,e,s;const i=this.w,a=i.globals,n=new I(this.w);this.elg=n.group({class:"apexcharts-grid"}),this.elgridLinesH=n.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=n.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=n.group({class:"apexcharts-grid-borders"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),i.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());let r=0;for(;r<a.seriesYAxisMap.length&&a.ignoreYAxisIndexes.includes(r);)r++;r===a.seriesYAxisMap.length&&(r=0);let o=a.yAxisScale[r].result.length-1,l;return!a.isBarHorizontal||this.isRangeBar?(l=this.xaxisLabels.length,this.isRangeBar&&(o=i.labelData.labels.length,i.config.xaxis.tickAmount&&i.config.xaxis.labels.formatter&&(l=i.config.xaxis.tickAmount),((s=(e=(t=a.yAxisScale)==null?void 0:t[r])==null?void 0:e.result)==null?void 0:s.length)>0&&i.config.xaxis.type!=="datetime"&&(l=a.yAxisScale[r].result.length-1)),this._drawXYLines({xCount:l,tickAmount:o})):(l=o,o=a.xTickAmount,this._drawInvertedXYLines({xCount:l,tickAmount:o})),this.drawGridBands(l,o),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:i.layout.gridWidth/l}}drawGridBands(t,e){var s,i,a,n,r;const o=this.w,l=(c,h,d,f,u,g)=>{for(let p=0,b=0;p<h;p++,b++)b>
27=o.config.grid[c].colors.length&&(b=0),this._drawGridBandRect({c:b,x1:d,y1:f,x2:u,y2:g,type:c}),f+=o.layout.gridHeight/e};if(((s=o.config.grid.row.colors)==null?void 0:s.length)>0&&l("row",e,0,0,o.layout.gridWidth,o.layout.gridHeight/e),((i=o.config.grid.column.colors)==null?void 0:i.length)>0){let c=!o.globals.isBarHorizontal&&o.config.xaxis.tickPlacement==="on"&&(o.config.xaxis.type==="category"||o.config.xaxis.convertedCatToNumeric)?t-1:t;o.axisFlags.isXNumeric&&(c=((n=(a=o.globals.xAxisScale)==null?void 0:a.result.length)!=null?n:1)-1);let h=o.globals.padHorizontal;const d=0;let f=o.globals.padHorizontal+o.layout.gridWidth/c;const u=o.layout.gridHeight;for(let g=0,p=0;g<t;g++,p++)p>=o.config.grid.column.colors.length&&(p=0),o.config.xaxis.type==="datetime"&&(h=this.xaxisLabels[g].position,f=(((r=this.xaxisLabels[g+1])==null?void 0:r.position)||o.layout.gridWidth)-this.xaxisLabels[g].position),this._drawGridBandRect({c:p,x1:h,y1:d,x2:f,y2:u,type:"column"}),h+=o.layout.gridWidth/c}}}class qi{constructor(t){this.w=t,this.coreUtils=new rt(this.w)}niceScale(t,e,s=0){const a=this.w,n=a.globals;let r,o,l,c;n.isBarHorizontal?(r=a.config.xaxis,o=Math.max((n.svgWidth-100)/25,2)):(r=a.config.yaxis[s],o=Math.max((n.svgHeight-100)/15,2)),R.isNumber(o)||(o=10),l=r.min!==void 0&&r.min!==null,c=r.max!==void 0&&r.max!==null;let h=r.stepSize!==void 0&&r.stepSize!==null,d=r.tickAmount!==void 0&&r.tickAmount!==null,f=d?r.tickAmount:rs[Math.min(Math.round(o/2),rs.length-1)];if(n.isMultipleYAxis&&!d&&n.multiAxisTickAmount>0&&(f=n.multiAxisTickAmount,d=!0),f==="dataPoints"?f=n.dataPoints-1:f=Math.abs(Math.round(f)),(t===Number.MIN_VALUE&&e===0||!R.isNumber(t)&&!R.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=R.isNumber(r.min)?r.min:0,e=R.isNumber(r.max)?r.max:t+f,n.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");const L=e;e=t,t=L}else t===e&&(t=t===0?0:t-1,e=e===0?2:e+1);const u=[];f<1&&(f=1);let g=f,p=Math.abs(e-t);const b=.15;!l&&t>0&&t/p<b&&(t=0,l=!0),!c&&e<0&&-e/p<b&&(e=0,c=!0),p=Math.abs(e-t);let m=p/g,A=m;const v=Math.floor(Math.log10(A)),y=Math.pow(10,v);let w=Math.ceil(A/y);if(w=Hi[n.yValueDecimal===0?0:1][w],A=w*y,m=A,n.isBarHorizontal&&r.stepSize&&r.type!=="datetime"?(m=r.stepSize,h=!0):h&&(m=r.stepSize),h&&r.forceNiceScale){const L=Math.floor(Math.log10(m));m*=Math.pow(10,v-L)}if(l&&c){let L=p/g;if(d)if(h)if(R.mod(p,m)!=0){const E=R.getGCD(m,L);L/E<10?m=E:m=L}else R.mod(m,L)==0?m=L:(L=m,d=!1);else m=L;else if(h)R.mod(p,m)==0?L=m:m=L;else if(R.mod(p,m)==0)L=m;else{g=Math.ceil(p/m),L=p/g;const E=R.getGCD(p,m);p/E<o&&(L=E),m=L}g=Math.round(p/m)}else{if(!l&&!c)if(n.isMultipleYAxis&&d){const L=m*Math.floor(t/m);let E=L+m*g;E<e&&(m*=2),t=L,E=e,e=t+m*g,p=Math.abs(e-t),t>0&&t<Math.abs(E-e)&&(t=0,e=m*g),e<0&&-e<Math.abs(L-t)&&(e=0,t=-m*g)}else t=m*Math.floor(t/m),e=m*Math.ceil(e/m);else if(c)if(d)t=e-m*g;else{const L=t;t=m*Math.floor(t/m),Math.abs(e-t)/R.getGCD(p,m)>o&&(t=e-m*f,t+=m*Math.floor((L-t)/m))}else if(l)if(d)e=t+m*g;else{const L=e;e=m*Math.ceil(e/m),Math.abs(e-t)/R.getGCD(p,m)>o&&(e=t+m*f,e+=m*Math.ceil((L-e)/m))}p=Math.abs(e-t),m=R.getGCD(p,m),g=Math.round(p/m)}if(!d&&!(l||c)&&(g=Math.ceil((p-1e-11)/(m+1e-11)),g>16&&R.getPrimeFactors(g).length<2&&g++),!d&&r.forceNiceScale&&n.yValueDecimal===0&&g>p&&(g=p,m=Math.round(p/g)),g>o&&(!(d||h)||r.forceNiceScale)){const L=R.getPrimeFactors(g),E=L.length-1;let D=g;t:for(var _=0;_<E;_++)for(var C=0;C<=E-_;C++){const T=Math.min(C+_,E);let F=D,P=1;for(var S=C;S<=T;S++)P*=L[S];if(F/=P,F<o){D=F;break t}}D===g?m=p:m=p/D,g=Math.round(p/m)}n.isMultipleYAxis&&n.multiAxisTickAmount==0&&n.ignoreYAxisIndexes.indexOf(s)<0&&(n.multiAxisTickAmount=g);let k=t-m;const M=m*1e-11;do k+=m,u.push(R.stripNumber(k,7));while(e-k>M);return{result:u,niceMin:u[0],niceMax:u[u.length-1]}}linearScale(t,e,s=10,i=0,a=void 0){const n=Math.abs(e-t);let r=[];if(t===e)return r=[t],{result:r,niceMin:r[0],niceMax:r[r.length-1]};s=this._adjustTicksForSmallRange(s,i,n),s==="dataPoints"&&(s=this.w.globals.dataPoints-1);const o=s;a||(a=n/o);const l=2;if(a!==0&&isFinite(a)){const d=Math.floor(Math.log10(Math.abs(a)
27)),f=Math.max(l,-d+l),u=Math.pow(10,f);a=Math.round((a+Number.EPSILON)*u)/u}let c=s===Number.MAX_VALUE?5:o;s===Number.MAX_VALUE&&(a=1);let h=t;for(;c>=0;)r.push(h),h=R.preciseAddition(h,a),c-=1;return{result:r,niceMin:r[0],niceMax:r[r.length-1]}}logarithmicScaleNice(t,e,s){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));const i=[],a=Math.ceil(Math.log(e)/Math.log(s)+1),n=Math.floor(Math.log(t)/Math.log(s));for(let r=n;r<a;r++)i.push(Math.pow(s,r));return{result:i,niceMin:i[0],niceMax:i[i.length-1]}}logarithmicScale(t,e,s){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));const i=[],a=Math.log(e)/Math.log(s),n=Math.log(t)/Math.log(s),r=a-n,o=Math.round(r),l=r/o;for(let c=0,h=n;c<o;c++,h+=l)i.push(Math.pow(s,h));return i.push(Math.pow(s,a)),{result:i,niceMin:t,niceMax:e}}_adjustTicksForSmallRange(t,e,s){let i=t;if(typeof e<"u"&&this.w.config.yaxis[e].labels.formatter&&this.w.config.yaxis[e].tickAmount===void 0){const a=Number(this.w.config.yaxis[e].labels.formatter(1));R.isNumber(a)&&this.w.globals.yValueDecimal===0&&(i=Math.ceil(s))}return i<t?i:t}setYScaleForIndex(t,e,s){const i=this.w.globals,a=this.w.config,n=i.isBarHorizontal?a.xaxis:a.yaxis[t];typeof i.yAxisScale[t]>"u"&&(i.yAxisScale[t]=[]);const r=Math.abs(s-e);n.logarithmic&&r<=5&&(i.invalidLogScale=!0),n.logarithmic&&r>5?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=n.forceNiceScale?this.logarithmicScaleNice(e,s,n.logBase):this.logarithmicScale(e,s,n.logBase)):s===-Number.MAX_VALUE||!R.isNumber(s)||e===Number.MAX_VALUE||!R.isNumber(e)?i.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t):(i.allSeriesCollapsed=!1,i.yAxisScale[t]=this.niceScale(e,s,t))}setXScale(t,e){const s=this.w,i=s.globals;if(e===-Number.MAX_VALUE||!R.isNumber(e))i.xAxisScale=this.linearScale(0,10,10);else{const a=i.xTickAmount;i.xAxisScale=this.linearScale(t,e,a,0,s.config.xaxis.max===void 0?s.config.xaxis.stepSize:void 0)}return i.xAxisScale}scaleMultipleYAxes(){const t=this.w.config,e=this.w.globals;this.coreUtils.setSeriesYAxisMappings();const s=e.seriesYAxisMap,i=e.minYArr,a=e.maxYArr,n=[],r=!e.isBarHorizontal;if(e.allSeriesCollapsed=!0,e.barGroups=[],s.forEach((o,l)=>{const c=[];if(o.forEach(h=>{var d;const f=(d=t.series[h])==null?void 0:d.group;c.indexOf(f)<0&&c.push(f)}),o.length>0){let h=Number.MAX_VALUE,d=-Number.MAX_VALUE,f=h,u=d,g,p;if(t.chart.stacked){const A=new Array(e.dataPoints).fill(0),v=[],y=[],w=[];c.forEach(()=>{v.push(A.map(()=>Number.MIN_VALUE)),y.push(A.map(()=>Number.MIN_VALUE)),w.push(A.map(()=>Number.MIN_VALUE))});for(let _=0;_<o.length;_++){!g&&t.series[o[_]].type&&(g=t.series[o[_]].type);const C=o[_];t.series[C].group?p=t.series[C].group:p="axis-".concat(l.toString()),!(e.collapsedSeriesIndices.indexOf(C)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(C)<0)||(e.allSeriesCollapsed=!1,c.forEach((k,M)=>{if(t.series[C].group===k)for(let L=0;L<this.w.seriesData.series[C].length;L++){const E=this.w.seriesData.series[C][L];E>=0?y[M][L]+=E:w[M][L]+=E,v[M][L]+=E,f=Math.min(f,E),u=Math.max(u,E)}})),(g==="bar"||g==="column")&&e.barGroups.push(p)}g||(g=t.chart.type),g==="bar"||g==="column"?c.forEach((_,C)=>{h=Math.min(h,Math.min.apply(null,w[C])),d=Math.max(d,Math.max.apply(null,y[C]))}):(c.forEach((_,C)=>{f=Math.min(f,Math.min.apply(null,v[C])),u=Math.max(u,Math.max.apply(null,v[C]))}),h=f,d=u),h===Number.MIN_VALUE&&d===Number.MIN_VALUE&&(d=-Number.MAX_VALUE)}else for(let A=0;A<o.length;A++){const v=o[A];h=Math.min(h,i[v]),d=Math.max(d,a[v]),!(e.collapsedSeriesIndices.indexOf(v)<0&&e.ancillaryCollapsedSeriesIndices.indexOf(v)<0)||(e.allSeriesCollapsed=!1)}t.yaxis[l].min!==void 0&&(typeof t.yaxis[l].min=="function"?h=t.yaxis[l].min(h):h=t.yaxis[l].min),t.yaxis[l].max!==void 0&&(typeof t.yaxis[l].max=="function"?d=t.yaxis[l].max(d):d=t.yaxis[l].max),e.barGroups=e.barGroups.filter((A,v,y)=>y.indexOf(A)===v);const b=t.yaxis[l];r&&b.alignZero===!0&&!b.logarithmic&&b.min===void 0&&b.max===void 0&&e.ignoreYAxisIndexes.indexOf(l)<0&&R.isNumber(h)&&R.isNumber(d)?n.push({ai:l,minY:h,maxY:d}):(this.setYScaleForIndex(l,h,d),o.forEach(A=>{i[A]=e.yAxisScale[l].niceMin,a[A]=e.yAxisScale[l].niceMax}))}else this.setYScaleForIndex(l,0,-Number.MAX_VALUE)}),n.length>
27=2){n.forEach(c=>{this.setYScaleForIndex(c.ai,c.minY,c.maxY),s[c.ai].forEach(h=>{i[h]=e.yAxisScale[c.ai].niceMin,a[h]=e.yAxisScale[c.ai].niceMax})});let o=0;n.forEach(c=>{const h=e.yAxisScale[c.ai],d=h.niceMax-h.niceMin;if(d>0){const f=-h.niceMin/d;f>o&&(o=f)}}),o>1&&(o=1),o<0&&(o=0);const l=c=>{if(c<=0)return 1;const h=Math.floor(Math.log10(c)),d=Math.pow(10,h),f=c/d;let u;return f<=1+1e-9?u=1:f<=2+1e-9?u=2:f<=2.5+1e-9?u=2.5:f<=5+1e-9?u=5:u=10,u*d};n.forEach(c=>{const h=e.yAxisScale[c.ai];if(!h.result||h.result.length<2)return;const d=h.niceMax-h.niceMin;if(d<=0)return;const f=-h.niceMin/d;if(Math.abs(f-o)<=1e-9)return;const u=f<o&&o<1-1e-9,g=!u&&f>o&&o>1e-9;if(!u&&!g)return;const p=u?-o*h.niceMax/(1-o):h.niceMin,b=g?-h.niceMin*(1-o)/o:h.niceMax,m=b-p;if(m<=0)return;const A=Math.max(h.result.length,5),v=l(m/Math.max(A-1,1));if(v<=0)return;let y,w;if(u){y=Math.floor(p/v+1e-9)*v;const _=o>1e-9?y*(o-1)/o:h.niceMax,C=Math.max(_,h.niceMax);w=Math.ceil(C/v-1e-9)*v}else{w=Math.ceil(b/v-1e-9)*v;const _=o<1-1e-9?-o*w/(1-o):h.niceMin,C=Math.min(_,h.niceMin);y=Math.floor(C/v+1e-9)*v}h.result=[];for(let _=y;_<=w+v*1e-9;_=R.preciseAddition(_,v))h.result.push(R.stripNumber(_,7));h.niceMin=y,h.niceMax=w,s[c.ai].forEach(_=>{i[_]=h.niceMin,a[_]=h.niceMax})})}else if(n.length===1){const o=n[0];this.setYScaleForIndex(o.ai,o.minY,o.maxY),s[o.ai].forEach(l=>{i[l]=e.yAxisScale[o.ai].niceMin,a[l]=e.yAxisScale[o.ai].niceMax})}}}class cs{constructor(t){this.w=t,this.scales=new qi(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}getMinYMaxY(t,e=Number.MAX_VALUE,s=-Number.MAX_VALUE,i=null){var a,n,r,o,l,c,h,d,f;const u=this.w.config,g=this.w.globals;let p=-Number.MAX_VALUE,b=Number.MIN_VALUE;i===null&&(i=t+1);const m=this.w.seriesData.series;let A=m,v=m;u.chart.type==="candlestick"?(A=this.w.candleData.seriesCandleL,v=this.w.candleData.seriesCandleH):u.chart.type==="boxPlot"?(A=this.w.candleData.seriesCandleO,v=this.w.candleData.seriesCandleC):u.chart.type==="violin"?(A=this.w.violinData.seriesViolinMin,v=this.w.violinData.seriesViolinMax):this.w.axisFlags.isRangeData&&(A=this.w.rangeData.seriesRangeStart,v=this.w.rangeData.seriesRangeEnd);let y=!1;if(this.w.seriesData.seriesX.length>=i){const w=(a=g.brushSource)==null?void 0:a.w.config.chart.brush;(u.chart.zoom.enabled&&u.chart.zoom.autoScaleYaxis||w?.enabled&&w?.autoScaleYaxis)&&(y=!0)}for(let w=t;w<i;w++){g.dataPoints=Math.max(g.dataPoints,m[w].length);const _=u.series[w].type;this.w.labelData.categoryLabels.length&&(g.dataPoints=this.w.labelData.categoryLabels.filter(M=>typeof M<"u").length),this.w.labelData.labels.length&&u.xaxis.type!=="datetime"&&this.w.seriesData.series.reduce((M,L)=>M+L.length,0)!==0&&(g.dataPoints=Math.max(g.dataPoints,this.w.labelData.labels.length));let C=0,S=m[w].length-1;if(y){if(u.xaxis.min)for(;C<S&&this.w.seriesData.seriesX[w][C]<u.xaxis.min;C++);if(u.xaxis.max)for(;S>C&&this.w.seriesData.seriesX[w][S]>u.xaxis.max;S--);}if(A===m&&v===m&&u.chart.type!=="boxPlot"&&_!=="candlestick"&&_!=="boxPlot"&&_!=="violin"&&_!=="rangeArea"&&_!=="rangeBar"&&!(this.w.seriesData.seriesGoals[w]&&this.w.seriesData.seriesGoals[w].length)){const M=m[w],L=Math.min(S,M.length-1),E=(n=this.w.seriesData._parsedExtrema)==null?void 0:n[w];if(E&&E.ref===M&&E.len===M.length&&C===0&&L===M.length-1)E.maxY>p&&(p=E.maxY),E.lowestY<e&&(e=E.lowestY),E.negMinY<0&&E.negMinY<b&&(b=E.negMinY),E.yDec>g.yValueDecimal&&(g.yValueDecimal=E.yDec),E.hasNulls&&(g.hasNullValues=!0);else{let D=g.yValueDecimal,T=!1;for(let F=C;F<=L;F++){const P=M[F];if(P!==null&&typeof P=="number"&&P===P&&P!==1/0&&P!==-1/0){if(P>p&&(p=P),P<e&&(e=P),b>P&&P<0&&(b=P),!Number.isInteger(P)){const Y=P<0?-P:P;if(Y>=1e-6&&Y<1e21){const z=""+P,W=z.indexOf("."),O=W===-1?0:z.length-W-1;O>D&&(D=O)}else{const z=R.noExponents(P);R.isFloat(z)&&(D=Math.max(D,z.toString().split(".")[1].length))}}}else T=!0}g.yValueDecimal=D,T&&(g.hasNullValues=!0)}s=p,(_==="bar"||_==="column")&&(b<0&&p<0&&(p=0,s=Math.max(s,0)),b===Number.MIN_VALUE&&(b=0,e=Math.min(e,0)));continue}for(let M=C;M<=S&&M<this.w.seriesData.series[w].length;M++){let L=m[w][M];if(L!==null&&R.isNumber(L)){switch(typeof((r=v[w])==null?void 0:r[M])<"u"&&(p=Math.max(p,v[w][M]),e=Math.min(e,v[w][M])),typeof((o=A[w])==null?void 0:o[M])<"u"&&(e=Math.min(e,A[w][M]),s=Math.max(s,A[w][M])),_){case"candlestick":typeof this.w.candleData.seriesCandleC[w][M]<"u"&&(p=Math.max(p,this.w.candleData.seriesCandleH[w][M]),e=Math.min(e,this.w.candleData.seriesCandleL[w][M]));break;case"boxPlot":typeof this.w.candleData.seriesCandleC[w][M]<"u"&&(p=Math.max(p,this.w.candleData.seriesCandleC[w][M]),e=Math.min(e,this.w.candleData.seriesCandleO[w][M]));break;case"violin":typeof((l=this.w.violinData.seriesViolinMax[w])==null?void 0:l[M
27])<"u"&&(p=Math.max(p,this.w.violinData.seriesViolinMax[w][M]),e=Math.min(e,this.w.violinData.seriesViolinMin[w][M]));break}if(_&&_!=="candlestick"&&_!=="boxPlot"&&_!=="violin"&&_!=="rangeArea"&&_!=="rangeBar"&&(p=Math.max(p,this.w.seriesData.series[w][M]),e=Math.min(e,this.w.seriesData.series[w][M])),this.w.seriesData.seriesGoals[w]&&this.w.seriesData.seriesGoals[w][M]&&Array.isArray(this.w.seriesData.seriesGoals[w][M])&&this.w.seriesData.seriesGoals[w][M].forEach(E=>{p=Math.max(p,E.value),e=Math.min(e,E.value)}),this.w.config.chart.type==="boxPlot"||_==="boxPlot"){const E=(h=(c=this.w.candleData.seriesBoxPoints)==null?void 0:c[w])==null?void 0:h[M];if(E)for(let D=0;D<E.length;D++){const T=E[D];typeof T=="number"&&(p=Math.max(p,T),e=Math.min(e,T))}}s=p,L=R.noExponents(L),R.isFloat(L)&&(g.yValueDecimal=Math.max(g.yValueDecimal,L.toString().split(".")[1].length)),b>((d=A[w])==null?void 0:d[M])&&((f=A[w])==null?void 0:f[M])<0&&(b=A[w][M])}else g.hasNullValues=!0}(_==="bar"||_==="column")&&(b<0&&p<0&&(p=0,s=Math.max(s,0)),b===Number.MIN_VALUE&&(b=0,e=Math.min(e,0)))}return u.chart.type==="rangeBar"&&this.w.rangeData.seriesRangeStart.length&&g.isBarHorizontal&&(b=e),u.chart.type==="bar"&&(b<0&&p<0&&(p=0),b===Number.MIN_VALUE&&(b=0)),{minY:b,maxY:p,lowestY:e,highestY:s}}setYRange(){const t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;let s=Number.MAX_VALUE,i;if(t.isMultipleYAxis){s=Number.MAX_VALUE;for(let a=0;a<this.w.seriesData.series.length;a++)i=this.getMinYMaxY(a),t.minYArr[a]=i.lowestY,t.maxYArr[a]=i.highestY,s=Math.min(s,i.lowestY)}return i=this.getMinYMaxY(0,s,void 0,this.w.seriesData.series.length),e.chart.type==="bar"?(t.minY=i.minY,t.maxY=i.maxY):(t.minY=i.lowestY,t.maxY=i.highestY),s=i.lowestY,e.chart.stacked&&this._setStackedMinMax(),e.chart.type==="line"||e.chart.type==="area"||e.chart.type==="scatter"||e.chart.type==="candlestick"||e.chart.type==="boxPlot"||e.chart.type==="violin"||e.chart.type==="rangeBar"&&!t.isBarHorizontal?t.minY===Number.MIN_VALUE&&s!==-Number.MAX_VALUE&&s!==t.maxY&&(t.minY=s):t.minY=t.minY!==Number.MIN_VALUE?Math.min(i.minY,t.minY):i.minY,e.yaxis.forEach((a,n)=>{a.max!==void 0&&(typeof a.max=="number"?t.maxYArr[n]=a.max:typeof a.max=="function"&&(t.maxYArr[n]=a.max(t.isMultipleYAxis?t.maxYArr[n]:t.maxY)),t.maxY=t.maxYArr[n]),a.min!==void 0&&(typeof a.min=="number"?t.minYArr[n]=a.min:typeof a.min=="function"&&(t.minYArr[n]=a.min(t.isMultipleYAxis?t.minYArr[n]===Number.MIN_VALUE?0:t.minYArr[n]:t.minY)),t.minY=t.minYArr[n])}),t.isBarHorizontal&&["min","max"].forEach(n=>{e.xaxis[n]!==void 0&&typeof e.xaxis[n]=="number"&&(n==="min"?t.minY=e.xaxis[n]:t.maxY=e.xaxis[n])}),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(a=>{const n=a;switch(n.type||e.chart.type){case"bar":case"column":t.barGroups.push(n.group);break;case"line":t.lineGroups.push(n.group);break;case"area":t.areaGroups.push(n.group);break}}),t.barGroups=t.barGroups.filter((a,n,r)=>r.indexOf(a)===n),t.lineGroups=t.lineGroups.filter((a,n,r)=>r.indexOf(a)===n),t.areaGroups=t.areaGroups.filter((a,n,r)=>r.indexOf(a)===n),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}setXRange(){const t=this.w.globals,e=this.w.config,s=e.xaxis.type==="numeric"||e.xaxis.type==="datetime"||e.xaxis.type==="category"&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric,i=()=>{var a;let n=t.minX,r=t.maxX;for(let o=0;o<this.w.seriesData.series.length;o++){const l=this.w.labelData.labels[o];if(!l)continue;const c=(a=this.w.seriesData._parsedExtrema)==null?void 0:a[o];if(c&&c.xNumeric&&c.xref===l&&c.len===l.length){c.maxX>r&&(r=c.maxX),c.minX<n&&(n=c.minX);continue}for(let h=0;h<l.length;h++){const d=l[h];d!==null&&typeof d=="number"&&d===d&&(d>r&&(r=d),d<n&&(n=d))}}t.maxX=r,t.initialMaxX=r,t.minX=n,t.initialMinX=n};if(this.w.axisFlags.isXNumeric&&i(),this.w.axisFlags.noLabelsProvi
27ded&&e.xaxis.categories.length===0&&(t.maxX=this.w.labelData.labels[this.w.labelData.labels.length-1],t.initialMaxX=this.w.labelData.labels[this.w.labelData.labels.length-1],t.minX=1,t.initialMinX=1),this.w.axisFlags.isXNumeric||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.dataFormatXNumeric){let a=10;if(e.xaxis.tickAmount===void 0)a=Math.round(t.svgWidth/150),e.xaxis.type==="numeric"&&t.dataPoints<30&&(a=t.dataPoints-1),a>t.dataPoints&&t.dataPoints!==0&&(a=t.dataPoints-1);else if(e.xaxis.tickAmount==="dataPoints"){if(this.w.seriesData.series.length>1&&(a=this.w.seriesData.series[t.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){const n=Math.round(t.maxX-t.minX);n<30&&(a=n)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,e.xaxis.max!==void 0&&typeof e.xaxis.max=="number"&&(t.maxX=e.xaxis.max),e.xaxis.min!==void 0&&typeof e.xaxis.min=="number"&&(t.minX=e.xaxis.min),e.xaxis.range!==void 0&&(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 n=[];for(let r=t.minX-1;r<t.maxX;r++)n.push(r+1);t.xAxisScale={result:n,niceMin:n[0],niceMax:n[n.length-1]}}else t.xAxisScale=this.scales.setXScale(t.minX,t.maxX);else t.xAxisScale=this.scales.linearScale(0,a,a,0,e.xaxis.stepSize),this.w.axisFlags.noLabelsProvided&&this.w.labelData.labels.length>0&&(t.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,a-1,0,e.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());s&&(this.w.labelData.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&this.w.labelData.labels.length&&(t.xTickAmount=this.w.labelData.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}setZRange(){const t=this.w.globals;if(this.w.axisFlags.isDataXYZ){for(let e=0;e<this.w.seriesData.series.length;e++)if(typeof this.w.seriesData.seriesZ[e]<"u")for(let s=0;s<this.w.seriesData.seriesZ[e].length;s++)this.w.seriesData.seriesZ[e][s]!==null&&R.isNumber(this.w.seriesData.seriesZ[e][s])&&(t.maxZ=Math.max(t.maxZ,this.w.seriesData.seriesZ[e][s]),t.minZ=Math.min(t.minZ,this.w.seriesData.seriesZ[e][s]))}}_handleSingleDataPoint(){const t=this.w.globals,e=this.w.config;if(t.minX===t.maxX){const s=new xt(this.w);if(e.xaxis.type==="datetime"){const i=s.getDate(t.minX);e.xaxis.labels.datetimeUTC?i.setUTCDate(i.getUTCDate()-2):i.setDate(i.getDate()-2),t.minX=new Date(i).getTime();const a=s.getDate(t.maxX);e.xaxis.labels.datetimeUTC?a.setUTCDate(a.getUTCDate()+2):a.setDate(a.getDate()+2),t.maxX=new Date(a).getTime()}else(e.xaxis.type==="numeric"||e.xaxis.type==="category"&&!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,s)=>{var i;if(e.length){e.length===1&&e.push(this.w.seriesData.seriesX[t.maxValsInArrayIndex][this.w.seriesData.seriesX[t.maxValsInArrayIndex].length-1]);const a=(i=this.w.seriesData._parsedExtrema)==null?void 0:i[s];if(a&&a.xNumeric&&a.xSorted&&a.xref===e&&a.len===e.length){a.minXDiff<t.minXDiff&&(t.minXDiff=a.minXDiff),(t.dataPoints===1||t.minXDiff===Number.MAX_VALUE)&&(t.minXDiff=.5);return}let n=!0,r=t.minXDiff;for(let l=1;l<e.length;l++){const c=e[l]-e[l-1];if(c>0)c<r&&(r=c);else if(c<0){n=!1;break}}if(n){t.minXDiff=r,(t.dataPoints===1||t.minXDiff===Number.MAX_VALUE)&&(t.minXDiff=.5);return}const o=e.slice();o.sort((l,c)=>l-c),o.forEach((l,c)=>{if(c>0){const h=l-o[c-1];h>0&&(t.minXDiff=Math.min(h,t.minXDiff))}}),(t.dataPoints===1||t.minXDiff===Number.MAX_VALUE)&&(t.minXDiff=.5)}})}_setStackedMinMax(){const t=this.w.globals;if(!this.w.seriesData.series.length)return;let e=this.w.labelData.seriesGroups;e.length||(e=[this.w.seriesData.seriesNames.map(a=>a)]);const s={},i={};e.forEach(a=>{s[a]=[],i[a]=[],this.w.config.series.map((r,o)=>a.indexOf(this.w.seriesData.seriesNames[o])>-1?o:null).filter(r=>r!==null).forEach(r=>{var o,l,c,h;for(let d=0;d<this.w.seriesData.series[t.maxValsInArrayIndex].length;d++)typeof s[a][d]>"u"&&(s[a][d]=0,i[a][d]=0),(this.w.config.chart.stacked&&!t.comboCharts||this.w.config.chart.stacked&&t.comboCharts&&(!this.w.config.chart.stackOnlyBar||((l=(o=this.w.config.series)==null?void 0:o[r])==null?void 0:l.type)==="bar"||((h=(c=this.w.config.series)==null?void 0:c[r])==null?void 0:h.type)==="column"))&&this.w.seriesData.series[r][d]!==null&&R.isNumber(this.w.seriesData.series[r][d])&&(this.w.seriesData.series[r][d]>0?s[a][d]+=parseFloat(String(this.w.seriesData.series[r][d]))+1e-4:i[a][d]+=parseFloat(String(this.w.seriesData.series[r][d])))})}
27),Object.entries(s).forEach(([a])=>{s[a].forEach((n,r)=>{t.maxY=Math.max(t.maxY,s[a][r]),t.minY=Math.min(t.minY,i[a][r])})})}}function hs(){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 Pe{constructor(t,{theme:e=null,timeScale:s=null}={},i){this.w=t,this.elgrid=i,this.xaxisFontSize=t.config.xaxis.labels.style.fontSize,this.axisFontFamily=t.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=t.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=t.config.chart.type==="bar"&&t.config.plotOptions.bar.horizontal,this.xAxisoffX=t.config.xaxis.position==="bottom"?t.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Pt(t,{theme:e,timeScale:s})}drawYaxis(t){const e=this.w,s=new I(this.w),i=e.config.yaxis[t].labels.style,{fontSize:a,fontFamily:n,fontWeight:r}=i,o=s.group({class:"apexcharts-yaxis",rel:t,transform:`translate(${e.globals.translateYAxisX[t]}, 0)`});if(this.axesUtils.isYAxisHidden(t))return o;const l=s.group({class:"apexcharts-yaxis-texts-g"});o.add(l);const c=e.globals.yAxisScale[t].result.length-1,h=e.layout.gridHeight/c,d=e.formatters.yLabelFormatters[t],f=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());let u=1;if(e.config.chart.type==="heatmap"&&!e.config.yaxis[t].labels.formatter){const g=parseInt(a,10)||11,p=Math.max(1,Math.floor(e.layout.gridHeight/(g*1.4))),b=c+1;b>p&&(u=Math.ceil(b/p))}if(e.config.yaxis[t].labels.show){let g=e.layout.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?g=0:e.config.chart.type==="heatmap"&&(g-=h/2),g+=parseInt(a,10)/3;let p=null;for(let b=c;b>=0;b--){const A=u>1&&b%u!==0?"":d(f[b],b,e);let v=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&e.config.yaxis.length!==0&&(v*=-1);const y=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),w=this.axesUtils.getYAxisForeColor(i.colors,t),_=Array.isArray(w)?w[b]:w,C=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-label tspan`)).map(k=>k.textContent),S=s.drawText({x:v,y:g,text:C.includes(A)&&!e.config.yaxis[t].labels.showDuplicates?"":A,textAnchor:y,fontSize:a,fontFamily:n,fontWeight:r,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:_,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${i.cssClass}`});l.add(S),this.addTooltip(S,A),p===null&&(p=S),e.config.yaxis[t].labels.rotate!==0&&this.rotateLabel(s,S,p,e.config.yaxis[t].labels.rotate),g+=h}}return this.addYAxisTitle(s,o,t),this.addAxisBorder(s,o,t,c,h),o}getTextAnchor(t,e){return t==="left"?"start":t==="center"?"middle":t==="right"?"end":e?"start":"end"}addTooltip(t,e){const s=B.createElementNS(tt,"title");s.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(s)}rotateLabel(t,e,s,i){const a=t.rotateAroundCenter(s.node),n=t.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(${i} ${a.x} ${n.y})`)}addYAxisTitle(t,e,s){const i=this.w;if(i.config.yaxis[s].title.text!==void 0){const a=t.group({class:"apexcharts-yaxis-title"}),n=i.config.yaxis[s].opposite?i.globals.translateYAxisX[s]:0,r=t.drawText({x:n,y:i.layout.gridHeight/2+i.layout.translateY+i.config.yaxis[s].title.offsetY,text:i.config.yaxis[s].title.text,textAnchor:"end",foreColor:i.config.yaxis[s].title.style.color,fontSize:i.config.yaxis[s].title.style.fontSize,fontWeight:i.config.yaxis[s].title.style.fontWeight,fontFamily:i.config.yaxis[s].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text ${i.config.yaxis[s].title.style.cssClass}`});a.add(r),e.add(a)}}addAxisBorder(t,e,s,i,a){const n=this.w,r=n.config.yaxis[s].axisBorder;let o=31+r.offsetX;if(n.config.yaxis[s].opposite&&(o=-31-r.offsetX),r.show){const l=t.drawLine(o,n.layout.translateY+r.offsetY-2,o,n.layout.gridHeight+n.layout.translateY+r.offsetY+2,r.color,0,r.width);e.add(l)}n.config.yaxis[s].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,i,r,n.config.yaxis[s].axisTicks,s,a,e)}drawYaxisInversed(t){const e=this.w,s=new I(this.w),i=s.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),a=s.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${e.layout.translateXAxisX}, ${e.layout.translateXAxisY})`});i.add(a);let n=e.globals.yAxisScale[t].result.length-1;const r=e.layout.gridWidth/n+.1;let o=r+e.config.xaxis.labels.offsetX;const l=e.formatters.xLabelFormatter;
27let c=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice());const h=e.labelData.timescaleLabels;if(h.length>0&&(this.xaxisLabels=h.slice(),c=h.slice(),n=c.length),e.config.xaxis.labels.show)for(let d=h.length?0:n;h.length?d<h.length:d>=0;h.length?d++:d--){let f=l?.(c[d],d,e),u=e.layout.gridWidth+e.globals.padHorizontal-(o-r+e.config.xaxis.labels.offsetX);if(h.length){const p=this.axesUtils.getLabel(c,h,u,d,this.drawnLabels,this.xaxisFontSize);u=p.x,f=p.text,this.drawnLabels.push(p.text),d===0&&e.globals.skipFirstTimelinelabel&&(f=""),d===c.length-1&&e.globals.skipLastTimelinelabel&&(f="")}const g=s.drawText({x:u,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-(e.config.xaxis.position==="top"?e.layout.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.axisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:`apexcharts-xaxis-label ${e.config.xaxis.labels.style.cssClass}`});a.add(g),this.addTooltip(g,f),o+=r}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}inversedYAxisBorder(t){const e=this.w,s=new I(this.w),i=e.config.xaxis.axisBorder;if(i.show){let a=0;e.config.chart.type==="bar"&&e.axisFlags.isXNumeric&&(a-=15);const n=s.drawLine(e.globals.padHorizontal+a+i.offsetX,this.xAxisoffX,e.layout.gridWidth,this.xAxisoffX,i.color,0,i.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(n):t.add(n)}}inversedYAxisTitleText(t){const e=this.w,s=new I(this.w);if(e.config.xaxis.title.text!==void 0){const i=s.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),a=s.drawText({x:e.layout.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:`apexcharts-xaxis-title-text ${e.config.xaxis.title.style.cssClass}`});i.add(a),t.add(i)}}yAxisTitleRotate(t,e){const s=this.w,i=new I(this.w),a=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),n=a?a.getBoundingClientRect():{width:0,height:0},r=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-title text`),o=r?r.getBoundingClientRect():{width:0,height:0};if(r){const l=this.xPaddingForYAxisTitle(t,n,o,e);r.setAttribute("x",String(l.xPos-(e?10:0)));const c=i.rotateAroundCenter(r);r.setAttribute("transform",`rotate(${e?s.config.yaxis[t].title.rotate*-1:s.config.yaxis[t].title.rotate} ${c.x} ${c.y})`)}}xPaddingForYAxisTitle(t,e,s,i){const a=this.w;let n=0,r=10;return a.config.yaxis[t].title.text===void 0||t<0?{xPos:n,padd:0}:(i?n=e.width+a.config.yaxis[t].title.offsetX+s.width/2+r/2:(n=e.width*-1+a.config.yaxis[t].title.offsetX+r/2+s.width/2,a.globals.isBarHorizontal&&(r=25,n=e.width*-1-a.config.yaxis[t].title.offsetX-r)),{xPos:n,padd:r})}setYAxisXPosition(t,e){const s=this.w;let i=0,a=0,n=18,r=1;s.config.yaxis.length>1&&(this.multipleYs=!0),s.config.yaxis.forEach((o,l)=>{const c=s.globals.ignoreYAxisIndexes.includes(l)||!o.show||o.floating||t[l].width===0,h=t[l].width+e[l].width;o.opposite?s.globals.isBarHorizontal?(a=s.layout.gridWidth+s.layout.translateX-1,s.globals.translateYAxisX[l]=a-o.labels.offsetX):(a=s.layout.gridWidth+s.layout.translateX+r,c||(r+=h+20),s.globals.translateYAxisX[l]=a-o.labels.offsetX+20):(i=s.layout.translateX-n,c||(n+=h+20),s.globals.translateYAxisX[l]=i+o.labels.offsetX)})}setYAxisTextAlignments(){const t=this.w;Array.from(t.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((s,i)=>{const a=t.config.yaxis[i];if(a&&!a.floating&&a.labels.align!==void 0){const n=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-texts-g`),r=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-label`)),o=n.getBoundingClientRect();r.forEach(l=>{l.setAttribute("text-anchor",a.labels.align)}),a.labels.align==="left"&&!a.opposite?n.setAttribute("transform",`translate(-${o.width}, 0)`):a.labels.align==="center"?n.setAttribute("transform",`translate(${o.width/2*(a.opposite?1:-1)}, 0)`):a.labels.align==="right"&&a.opposite&&n.setAttribute("transform",`translate(${o.width}, 0)`)}})}}class ja{constructor(t,e){this.w=t,this.ctx=e,this.documentEvent=this.documentEvent.bind(this)}addEventListener(t,e){const s=this.w;Object.prototype.hasOwnProperty.call(s.globals.events,t)?s.globals.events[t].push(e):s.globals.events[t]=[e]}removeEventListener(t,e){const s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;const i=s.globals.events[t].indexOf(e);i!==-1&&s.globals.events[t].splice(i,1)}fireEvent(t,e){const s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;(!e||!e.length)&&(e=[]);const i=s.globals.events[t],a=i.length;for(let n=0;n<a;n++)i[n].apply(null,e)}setupEventHandlers(){const t=this.w,e=this.ctx,s=t.dom.baseEl.querySelector(t.globals.chartClass);this.ctx.eventList.forEach(i=>
27{s?.addEventListener(i,a=>{const n=a.target.getAttribute("i")===null&&t.interact.capturedSeriesIndex!==-1?t.interact.capturedSeriesIndex:a.target.getAttribute("i"),r=a.target.getAttribute("j")===null&&t.interact.capturedDataPointIndex!==-1?t.interact.capturedDataPointIndex:a.target.getAttribute("j"),o=Object.assign({},t,{seriesIndex:t.globals.axisCharts?n:0,dataPointIndex:r});a.type==="keydown"?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&(e.ctx.keyboardNavigation&&e.ctx.keyboardNavigation.handleKey(a),typeof t.config.chart.events.keyDown=="function"&&t.config.chart.events.keyDown(a,e,o),e.ctx.events.fireEvent("keydown",[a,e,o])):a.type==="keyup"?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&(typeof t.config.chart.events.keyUp=="function"&&t.config.chart.events.keyUp(a,e,o),e.ctx.events.fireEvent("keyup",[a,e,o])):a.type==="mousemove"||a.type==="touchmove"?typeof t.config.chart.events.mouseMove=="function"&&t.config.chart.events.mouseMove(a,e,o):a.type==="mouseleave"||a.type==="touchleave"?typeof t.config.chart.events.mouseLeave=="function"&&t.config.chart.events.mouseLeave(a,e,o):(a.type==="mouseup"&&a.which===1||a.type==="touchend")&&(typeof t.config.chart.events.click=="function"&&t.config.chart.events.click(a,e,o),e.ctx.events.fireEvent("click",[a,e,o]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(i=>{t.dom.baseEl.addEventListener(i,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(t){const e=this.w,s=t.target.className;if(t.type==="click"){const i=e.dom.baseEl.querySelector(".apexcharts-menu");i&&i.classList.contains("apexcharts-menu-open")&&s!=="apexcharts-menu-icon"&&i.classList.remove("apexcharts-menu-open")}e.interact.clientX=t.type==="touchmove"?t.touches[0].clientX:t.clientX,e.interact.clientY=t.type==="touchmove"?t.touches[0].clientY:t.clientY}}class Za{constructor(t){this.w=t}setCurrentLocaleValues(t){let e=this.w.config.chart.locales;const s=H.getApex();s.chart&&s.chart.locales&&s.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(s.chart.locales));const i=e.filter(a=>a.name===t)[0];if(i){const a=R.extend(Oi,i);this.w.globals.locale=a.options}else throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options")}}class Ka{constructor(t,e){this.w=t,this.ctx=e}drawAxis(t,e){const s=this.w.globals,i=this.w.config,a=new ie(this.w,this.ctx,e),n=new Pe(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},e);if(s.axisCharts&&t!=="radar"){let r,o;s.isBarHorizontal?(o=n.drawYaxisInversed(0),r=a.drawXaxisInversed(0),this.w.dom.elGraphical.add(r),this.w.dom.elGraphical.add(o)):(r=a.drawXaxis(),this.w.dom.elGraphical.add(r),i.yaxis.map((l,c)=>{if(s.ignoreYAxisIndexes.indexOf(c)===-1&&(o=n.drawYaxis(c),this.w.dom.Paper.add(o),this.w.config.grid.position==="back")){const h=this.w.dom.Paper.children()[1];h&&(h.remove(),this.w.dom.Paper.add(h))}}))}}}class ds{constructor(t){this.w=t}drawXCrosshairs(){const t=this.w;t.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-xcrosshairs").forEach(v=>v.remove());const e=new I(this.w),s=new dt(this.w),i=t.config.xaxis.crosshairs.fill.gradient,a=t.config.xaxis.crosshairs.dropShadow,n=t.config.xaxis.crosshairs.fill.type,r=i.colorFrom,o=i.colorTo,l=i.opacityFrom,c=i.opacityTo,h=i.stops,d="none",f=a.enabled,u=a.left,g=a.top,p=a.blur,b=a.color,m=a.opacity;let A=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){n==="gradient"&&(A=e.drawGradient("vertical",r,o,l,c,null,h,[]));let v=t.config.xaxis.crosshairs.width===1?e.drawLine(0,0,0,0):e.drawRect(),y=t.layout.gridHeight;(!R.isNumber(y)||y<0)&&(y=0);let w=t.config.xaxis.crosshairs.width;(!R.isNumber(w)||Number(w)<0)&&(w=0),v.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:w,height:y,fill:A,filter:d,"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}),f&&(v=s.dropShadow(v,{left:u,top:g,blur:p,color:b,opacity:m})),t.dom.elGraphical.add(v)}}drawYCrosshairs(){const t=this.w;t.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-ycrosshairs, :scope > .apexcharts-ycrosshairs-hidden").forEach(n=>n.remove());const e=new I(this.w),s=t.config.yaxis[0].crosshairs,i=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){const n=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,s.stroke.dashArray,s.stroke.width);n.attr({class:"apexcharts-ycrosshairs"}),t.dom.elGraphical.add(n)}const a=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,0,0);a.attr({class:"apexcharts-ycrosshairs-hidden"}),t.dom.elGraphical.add(a)}}function ji(x,t){if(!R.isObject(x)||!R.isObject(t))return t!==void 0?t:x;const e=G({},x);for(const s of Object.keys(t)){const i=t[s];i!==void 0&&(R.isObject(i)&&R.isObject(x[s])?e[s]=ji(x[s],i):e[s]=i)}return e}class Ja{constructor(t){this.w=t,this._activeBreakpoint=null}checkResponsiveConfig(t){const e=this.w,s=e.config;if(s.responsive.length===0)return;const i=s.responsive.slice();i.sort((r,o)=>r.breakpoint>o.breakpoint?1:o.breakpoint>r.breakpoint?-1:0).reverse();const a=new me({}),n=(r={})=>{var o;const l=i[0].breakpoint,c=H.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(c>l){if(this._activeBreakpoint!==null){if(!e.globals.initialConfig)return;const h=R.clone(e.globals.initialConfig);h.series=R.clone(e.config.series);const d=rt.extendArrayProps(a,h,e);r=R.extend(d,r),this.overrideResponsiveOptions(r),this._activeBreakpoint=null}}else for(let h=0;h<i.length;h++)if(c<i[h].breakpoint){const d=(o=i[h].options)!=null&&o.yaxis?R.clone(i[h].options.yaxis):null;
27if(r=rt.extendArrayProps(a,i[h].options,e),r=R.extend(e.config,r),Array.isArray(e.config.yaxis)&&d){const f=Array.isArray(d)?d:[d];r=Z(G({},r),{yaxis:e.config.yaxis.map((u,g)=>ji(u,f[g]))})}this.overrideResponsiveOptions(r),this._activeBreakpoint=i[h].breakpoint}};if(t){let r=rt.extendArrayProps(a,t,e);r=R.extend(e.config,r),r=R.extend(r,t),n(r)}else n({})}overrideResponsiveOptions(t){const e=new me(t).init({responsiveOverride:!0});this.w.config=e}}function Qa(x){var t,e,s;const i=x.globals;if(!i.axisCharts||!x.seriesData||!Array.isArray(x.seriesData.series)||x.seriesData.series.length===0){i.prevStreamFrame=null;return}const a=[];(e=(t=x.dom)==null?void 0:t.baseEl)!=null&&e.querySelectorAll&&x.dom.baseEl.querySelectorAll(".apexcharts-marker").forEach(n=>{var r,o,l,c,h;const d=parseInt((r=n.getAttribute("index"))!=null?r:"",10),f=parseInt((l=(o=n.getAttribute("j"))!=null?o:n.getAttribute("rel"))!=null?l:"",10),u=parseFloat((h=(c=n.getAttribute("r"))!=null?c:n.getAttribute("default-marker-size"))!=null?h:"");isFinite(d)&&isFinite(f)&&isFinite(u)&&((a[d]=a[d]||[])[f]=u)}),i.prevStreamFrame={seriesX:(x.seriesData.seriesX||[]).slice(),seriesY:x.seriesData.series.slice(),xPixels:(i.seriesXvalues||[]).slice(),yPixels:(i.seriesYvalues||[]).slice(),rPixels:a,labels:(i.labels||[]).slice(),isXNumeric:!!((s=x.axisFlags)!=null&&s.isXNumeric)}}function tn(x,t,e,s){var i;const a=x.globals,n=a.prevStreamFrame;if(!n||!a.dataChanged||!((i=x.axisFlags)!=null&&i.isXNumeric))return null;const r=n.seriesX[t],o=n.seriesY[t],l=x.seriesData.seriesX[t],c=x.seriesData.series[t];if(!r||!o||!l||!c||r.length<3||l.length<3)return null;let h=-1;for(let T=0;T<r.length;T++)if(r[T]===l[0]){h=T;break}if(h===-1)return null;const d=Math.min(r.length-h,l.length);if(d<2)return null;const f=l.length-d;if(h===0&&f===0)return null;for(let T=0;T<d;T++){if(r[h+T]!==l[T])return null;const F=o[h+T],P=c[T];if(F!==P&&!(F==null&&P==null))return null}const u=n.xPixels[t],g=n.yPixels[t];if(!u||!g)return null;let p=-1,b=-1;for(let T=0;T<d;T++)u[h+T]==null||g[h+T]==null||e[T]==null||s[T]==null||(p===-1&&(p=T),b=T);if(p===-1||b<=p)return null;const m=e[p],A=e[b],v=u[h+p],y=u[h+b];if(Math.abs(A-m)<1e-6)return null;const w=(y-v)/(A-m),_=v-w*m;if(!isFinite(w)||!isFinite(_)||Math.abs(w-1)>.02||Math.abs(_)<.5)return null;let C=p,S=p;for(let T=p;T<=b;T++){const F=s[T];F==null||g[h+T]==null||(F<s[C]&&(C=T),F>s[S]&&(S=T))}let k=1,M=0;const L=s[C],E=s[S];if(Math.abs(E-L)>1e-6?(k=(g[h+S]-g[h+C])/(E-L),M=g[h+C]-k*L):M=g[h+C]-L,!isFinite(k)||!isFinite(M)||k<.2||k>5)return null;const D=Math.floor((p+b)/2);if(D!==p&&D!==b&&e[D]!=null&&u[h+D]!=null){const T=w*e[D]+_;if(Math.abs(T-u[h+D])>1.5)return null;if(s[D]!=null&&g[h+D]!=null){const F=k*s[D]+M;if(Math.abs(F-g[h+D])>1.5)return null}}return{ax:w,bx:_,ay:k,by:M}}const en=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function js(x,t){const{ax:e,bx:s,ay:i,by:a}=t,n=[],r=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g;let o;for(;(o=r.exec(x))!==null;){const l=o[1].toUpperCase(),c=(o[2].match(en)||[]).map(parseFloat);if(l==="Z"){n.push("z");continue}if(l==="H"){for(const d of c)n.push(`H ${e*d+s}`);continue}if(l==="V"){for(const d of c)n.push(`V ${i*d+a}`);continue}if(l==="A"){for(let d=0;d+6<c.length;d+=7)n.push(`A ${c[d]} ${c[d+1]} ${c[d+2]} ${c[d+3]} ${c[d+4]} ${e*c[d+5]+s} ${i*c[d+6]+a}`);continue}const h=[];for(let d=0;d+1<c.length;d+=2)h.push(`${e*c[d]+s} ${i*c[d+1]+a}`);h.length&&n.push(`${l} ${h.join(" ")}`)}return n.join(" ")}function sn(x,t){const e=t.config.chart.streaming;if(!e||!e.enabled)return;const s=e.maxPoints,i=t.config.xaxis.range,a=n=>n==null?null:Array.isArray(n)?typeof n[0]=="number"?n[0]:null:typeof n=="object"&&typeof n.x=="number"?n.x:null;x.forEach(n=>{var r;const o=n?.data;if(!Array.isArray(o)||o.length<2)return;if(typeof s=="number"&&s>0){o.length>s&&(n.data=o.slice(o.length-s));return}if(!i)return;const l=a(o[o.length-1]),c=a(o[0]);if(l==null||c==null||l<=c)return;const h=(l-c)/(o.length-1),d=l-i-2*h;let f=0;for(;f<o.length&&((r=a(o[f]))!=null?r:d)<d;)f++;f>0&&(n.data=o.slice(f))})}function an(x,t){const e=new Set(x.exits),s=[];let i=0;for(let a=0;a<x.toOld.length;a++){const n=x.toOld[a];if(n!==-1){for(;i<n;)e.has(i)&&s.push({oldJ:i,newJ:-1}),i++;s.push({oldJ:n,newJ:a}),i=n+1}else s.push({oldJ:-1,newJ:a})}for(;i<t;)e.has(i)&&s.push({oldJ:i,newJ:-1}),i++;return s}function Zs(x,t,e){if(!x||typeof x!="string")return null;const s=Vt(x);if(!s.length||s[0][0]!=="M")return null;for(let o=1;o<s.length;o++)if(s[o][0]==="M")return null;let i=s,a=null;if(e){if(s.length<5||(a=s.slice(-3),i=s.slice(0,-3),a[2][0]!=="Z")||a[1][0]!=="L"||a[0][0]!=="L"&&a[0][0]!=="C")return null}else if(s[s.length-1][0]==="Z")return null;if(i.length!==t||i.length<2)return null;const n=i[1][0];if(n!=="L"&&n!=="C")return null;for(let o=2;o<i.length;o++)if(i[o][0]!==n)return null;const r=i.map(o=>o[0]==="C"?[Number(o[5]),Number(o[6])]:[Number(o[1]),Number(o[2])]);for(const o of r)if(!isFinite(o[0])||!isFinite(o[1]))return null;return{body:i,closing:a,segType:n,anchors:r}}function Yt(x,t,e){return[x[0]+(t[0]-x[0])*e,x[1]+(t[1]-x[1])*e]}function nn(x,t,e){const s=x,i=[t[1],t[2]],a=[t[3],t[4]],n=[t[5],t[6]],r=Yt(s,i,e),o=Yt(i,a,e),l=Yt(a,n,e),c=Yt(r,o,e),h=Yt(o,l,e),d=Yt(c,h,e);
27return{first:["C",r[0],r[1],c[0],c[1],d[0],d[1]],second:["C",h[0],h[1],l[0],l[1],n[0],n[1]],mid:d}}function rn(x,t,e){const s=[t[1],t[2]],i=Yt(x,s,e);return{first:["L",i[0],i[1]],second:["L",s[0],s[1]],mid:i}}function Ks(x,t){const{body:e,closing:s,segType:i,anchors:a}=x,n=a.length,r=t.length,o=d=>i==="C"?["C",d[0],d[1],d[0],d[1],d[0],d[1]]:["L",d[0],d[1]],l=[["M",a[0][0],a[0][1]]];let c=0;for(;c<r&&t[c]!==0;)c++;for(let d=1;d<=c;d++)l.push(o(a[0]));let h=c+1;for(let d=0;d<n-1;d++){let f=0;for(;h+f<r&&t[h+f]===-1;)f++;const u=e[d+1];if(!f)l.push(u.slice());else{const g=f+1;let p=a[d],b=u;for(let m=0;m<f;m++){const A=1/(g-m),v=i==="C"?nn(p,b,A):rn(p,b,A);l.push(v.first),p=v.mid,b=v.second}l.push(b)}h+=f+1}for(;h<r;)l.push(o(a[n-1])),h++;return s&&s.forEach(d=>l.push(d.slice())),l}function Js(x,t,e,s,i,a){const n=Zs(x,s,a);if(!n)return null;const r=Zs(t,i,a);if(!r||n.segType!==r.segType||(n.closing||r.closing)&&(!n.closing||!r.closing||n.closing[0][0]!==r.closing[0][0]))return null;const o=e.map(c=>c.oldJ),l=e.map(c=>c.newJ);return{from:os(Ks(n,o)),toInterp:os(Ks(r,l))}}function Wt(x){var t;const e=x.config.chart.animations;if(!e||e.enabled===!1||!e.dynamicAnimation||e.dynamicAnimation.enabled===!1)return!1;const s=(t=e.largeDatasetThreshold)!=null?t:0;return s>0&&x.globals.dataPoints>s?!1:!!(H.isBrowser()&&x.globals.dataChanged&&x.globals.shouldAnimate)}function Qt(x,t,e){var s,i,a,n;if((s=x.axisFlags)!=null&&s.isXNumeric){const o=(a=(i=x.seriesData)==null?void 0:i.seriesX)==null?void 0:a[t];if(o&&o.length&&o[e]!=null)return"x:"+o[e]}const r=(n=x.globals.labels)==null?void 0:n[e];return r!=null&&String(r)!==""?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+e}function on(x,t,e){var s,i;if(x.isXNumeric){const n=(s=x.seriesX)==null?void 0:s[t];if(n&&n.length&&n[e]!=null)return"x:"+n[e]}const a=(i=x.labels)==null?void 0:i[e];return a!=null&&String(a)!==""?"c:"+(Array.isArray(a)?a.join(" "):String(a)):"j:"+e}function ln(x,t){const e=new Map;x.forEach((l,c)=>{e.has(l)||e.set(l,c)});const s=new Array(t.length),i=new Set;let a=-1,n=!0,r=x.length===t.length;t.forEach((l,c)=>{const h=e.has(l)&&!i.has(e.get(l))?e.get(l):-1;s[c]=h,h!==-1&&(i.add(h),h<a&&(n=!1),a=h),h!==c&&(r=!1)});const o=[];for(let l=0;l<x.length;l++)i.has(l)||o.push(l);return{toOld:s,exits:o,ordered:n,changed:!r}}function Qs(x){const t=new Map;return x.map(e=>{const s=t.get(e)||0;return t.set(e,s+1),s===0?e:`${e}#${s}`})}function ye(x,t,e=!1,s=!1){var i,a;if(!Wt(x))return null;const n=x.globals.prevStreamFrame;if(!n)return null;const r=(i=n.seriesY)==null?void 0:i[t],o=(a=x.seriesData.series)==null?void 0:a[t];if(!Array.isArray(r)||!Array.isArray(o)||!r.length||!o.length)return null;const l=Qs(r.map((d,f)=>on(n,t,f))),c=Qs(o.map((d,f)=>Qt(x,t,f))),h=ln(l,c);return!h.ordered&&!s||!h.changed&&!e?null:{join:h,oldKeys:l,newKeys:c}}function Rs(x){var t,e;const s=x.config.chart.animations;return Te((e=(t=s.dynamicAnimation)==null?void 0:t.easing)!=null?e:s.easing)}function Mt(x,t,e,s,i){const a=performance.now(),n=r=>{if(x.globals.isDestroyed)return;const o=Math.max(0,Math.min(1,(r-a)/t));s(e(o),o),o<1?B.requestAnimationFrame(n):i&&i()};B.requestAnimationFrame(n)}function ti(x,{elPointsMain:t,realIndex:e,speed:s}){var i,a,n,r;if(!t?.node)return!1;const o=ye(x,e,!0);if(!o)return!1;const l=x.globals.prevStreamFrame;if(!l)return!1;const c=(i=l.xPixels)==null?void 0:i[e],h=(a=l.yPixels)==null?void 0:a[e];if(!c||!h)return!1;const d=t.node.querySelectorAll(".apexcharts-marker");if(!d.length)return!1;const f=((n=x.globals.seriesXvalues)==null?void 0:n[e])||[],u=((r=x.globals.seriesYvalues)==null?void 0:r[e])||[],g=Rs(x),p=Math.max(1,s||1);return t.node.classList.remove("apexcharts-element-hidden"),d.forEach(b=>{var m,A,v,y,w,_,C,S,k;const M=parseInt((A=(m=b.getAttribute("j"))!=null?m:b.getAttribute("rel"))!=null?A:"",10);if(!isFinite(M)||M<0||M>=o.join.toOld.length)return;const L=o.join.toOld[M],E=f[M]!=null&&u[M]!=null?[f[M],u[M]]:null;if(L===-1||!E){const O=b.style;O.opacity="0",Mt(x,p,g,N=>{O.opacity=String(N)},()=>{O.opacity=""});return}const D=((v=c[L])!=null?v:NaN)-E[0],T=((y=h[L])!=null?y:NaN)-E[1];if(!isFinite(D)||!isFinite(T))return;const F=(C=(_=(w=l.rPixels)==null?void 0:w[e])==null?void 0:_[L])!=null?C:NaN,P=parseFloat((k=(S=b.getAttribute("r"))!=null?S:b.getAttribute("default-marker-size"))!=null?k:""),Y=isFinite(F)&&isFinite(P)&&P>0&&Math.abs(F-P)>.25;if(!(Math.abs(D)>=.5||Math.abs(T)>=.5)&&!Y)return;const W=O=>{const N=D*(1-O),X=T*(1-O);if(Y){const V=(F+(P-F)*O)/P;b.setAttribute("transform",`translate(${N+E[0]*(1-V)}, ${X+E[1]*(1-V)}) scale(${V})`)}else b.setAttribute("transform",`translate(${N}, ${X})`)};W(0),Mt(x,p,g,W,()=>{b.removeAttribute("transform")})}),!0}function cn(x,{type:t,realIndex:e,pathFromLine:s,pathFromArea:i,linePaths:a,areaPaths:n}){var r,o;const l=ye(x,e);if(!l)return null;const{join:c,oldKeys:h,newKeys:d}=l,f=x.globals.prevStreamFrame;if(!f)return null;const u=(r=f.seriesY)==null?void 0:r[e],g=(o=x.seriesData.series)==null?void 0:o[e];if(u.length<2||g.length<2||u.some(m=>m===null)||g.some(m=>m===null))return null;const p=an(c,h.length),b={};return Array.isArray(a)&&a.length===1&&s&&(b.line=Js(s,a[0],p,h.length,d.length,!1)),t==="area"&&Array.isArray(n)&&n.length===1&&i&&(b.area=Js(i,n[0],p,h.length,d.length,!0)),!b.line&&!b.area?null:b}function hn(x){const t=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(x||"");if(!t)return null;const e=parseFloat(t[1]),s=parseFloat(t[2]);return isFinite(e)&&isFinite(s)?{x:e,y:s}:null}
27function dn({w:x,elSeries:t,record:e,newKeys:s,isHorizontal:i,speed:a}){var n;if(!Wt(x)||!e||!Array.isArray(e.paths)||!t?.node)return;const r=new Set(s),o=e.paths.filter(h=>h&&h.d&&h.key!=null&&!r.has(h.key));if(!o.length)return;const l=new I(x),c=(n=x.globals.colors)==null?void 0:n[parseInt(String(e.realIndex),10)];o.forEach(h=>{let d=h.fill||c||"#c8c8c8";String(d).indexOf("url(")===0&&(d=c||"#c8c8c8");const f=l.drawPath({d:h.d,stroke:"none",strokeWidth:0,fill:d,fillOpacity:1,classes:"apexcharts-bar-ghost"}),u=f.node;u.setAttribute("pointer-events","none"),f.attr("clip-path",`url(#gridRectBarMask${x.globals.cuid})`),t.node.insertBefore(u,t.node.firstChild);const g=hn(h.d);let p=i?"left center":"center bottom";try{const y=u.getBBox();g&&y&&(i?p=Math.abs(g.x-y.x)<=Math.abs(g.x-(y.x+y.width))?"left center":"right center":p=Math.abs(g.y-(y.y+y.height))<=Math.abs(g.y-y.y)?"center bottom":"center top")}catch{}const b=u.style;b.transformBox="fill-box",b.transformOrigin=p;const m=Math.max(1,a||1),A=performance.now(),v=y=>{if(x.globals.isDestroyed||!u.parentNode)return;const w=Math.max(0,Math.min(1,(y-A)/m)),_=1-Math.pow(1-w,3),C=1-_;b.transform=i?`scaleX(${C})`:`scaleY(${C})`,b.opacity=String(1-_),w<1?B.requestAnimationFrame(v):u.parentNode.removeChild(u)};B.requestAnimationFrame(v)})}function ei(x,t,e){return[...x.querySelectorAll(t)].map(s=>{var i,a,n;return{text:s.textContent||"",display:(n=(a=(i=s.querySelector("tspan"))==null?void 0:i.textContent)!=null?a:s.textContent)!=null?n:"",pos:parseFloat(s.getAttribute(e)||""),transform:s.getAttribute("transform")}})}function si(x,t,e){return[...x.querySelectorAll(t)].map(s=>parseFloat(s.getAttribute(e)||""))}const Ye=":not(.apexcharts-tick-ghost)",Zi=`.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)${Ye}`,Ki=`.apexcharts-yaxis-texts-g text${Ye}`,Ji=`.apexcharts-gridlines-vertical line${Ye}`,Qi=`.apexcharts-gridlines-horizontal line${Ye}`;function ta(x){var t,e;const s=x.globals;if(!((t=x.axisFlags)!=null&&t.isXNumeric)||s.isBarHorizontal||(e=x.config.xaxis)!=null&&e.reversed)return null;const i=s.minX,a=s.maxX,n=x.layout.gridWidth;return!isFinite(i)||!isFinite(a)||!(a>i)||!(n>0)?null:{min:i,max:a,width:n}}function ea(x,t){var e;const s=x.globals;if(s.isBarHorizontal||!Array.isArray(x.config.yaxis)||x.config.yaxis.length!==1||(e=x.config.yaxis[0])!=null&&e.logarithmic)return null;const i=s.minY,a=s.maxY;if(!isFinite(i)||!isFinite(a)||!(a>i))return null;const n=t.map(r=>r.pos).filter(r=>isFinite(r));return n.length<2?null:{min:i,max:a,pLo:Math.max(...n),pHi:Math.min(...n)}}function fn(x,t){if(!x||!t)return null;const e=x.max-x.min,s=t.max-t.min;return!(e>0)||!(s>0)||!(x.width>0)||!(t.width>0)?null:{toNew:i=>(x.min+i/x.width*e-t.min)/s*t.width,toOld:i=>(t.min+i/t.width*s-x.min)/e*x.width}}function un(x,t){if(!x||!t)return null;const e=x.pHi-x.pLo,s=t.pHi-t.pLo,i=x.max-x.min,a=t.max-t.min;if(!e||!s||!(i>0)||!(a>0))return null;const n=o=>x.min+(o-x.pLo)/e*i,r=o=>t.min+(o-t.pLo)/s*a;return{toNew:o=>t.pLo+(n(o)-t.min)/a*s,toOld:o=>x.pLo+(r(o)-x.min)/i*e}}function gn(x){const t=x.globals;if(t.prevChromeFrame=null,!t.axisCharts||!H.isBrowser())return;const e=x.dom.baseEl;if(R.elementExists(e))try{const s=ei(e,Ki,"y");t.prevChromeFrame={xLabels:ei(e,Zi,"x"),yLabels:s,vGrid:si(e,Ji,"x1"),hGrid:si(e,Qi,"y1"),xScale:ta(x),yAnchors:ea(x,s)}}catch{t.prevChromeFrame=null}}function ii(x,t,e,s){const i=t.style;i.opacity="0",Mt(x,e,s,a=>{i.opacity=String(a)},()=>{i.opacity=""})}function ve(x,t,e,s,i,a,n){e.forEach(r=>t.setAttribute(r,String(s))),Mt(x,a,n,r=>{const o=String(s+(i-s)*r);e.forEach(l=>t.setAttribute(l,o))},()=>{e.forEach(r=>t.setAttribute(r,String(i)))})}function ai(x,{template:t,display:e,attrs:s,from:i,to:a,duration:n,ease:r}){const o=t.parentNode;if(!o)return;const l=t.cloneNode(!0);if(l.classList.add("apexcharts-tick-ghost"),l.setAttribute("pointer-events","none"),l.removeAttribute("id"),e!==void 0){const h=l.querySelector("tspan");h?h.textContent=e:l.textContent=e;const d=l.querySelector("title");d&&(d.textContent=e)}s.forEach(h=>l.setAttribute(h,String(i)));const c=l.style;c.opacity="1",o.appendChild(l),Mt(x,n,r,h=>{const d=String(i+(a-i)*h);
27s.forEach(f=>l.setAttribute(f,d)),c.opacity=String(1-h)},()=>{l.parentNode&&l.parentNode.removeChild(l)})}const pn=20;function ni(x,{newLabels:t,oldLabels:e,posAttr:s,newLines:i,oldLines:a,lineAttrs:n,duration:r,ease:o,project:l}){const c=new Map;e.forEach((y,w)=>{c.has(y.text)||c.set(y.text,Z(G({},y),{i:w}))});const h=new Set,d=i.length===t.length,f=a.length===e.length,u=e.map(y=>y.pos).concat(t.map(y=>parseFloat(y.getAttribute(s)||""))).filter(y=>isFinite(y)),g=Math.min(...u),p=Math.max(...u),b=Math.max(40,(p-g)*.25),m=y=>Math.max(g-b,Math.min(p+b,y)),A=(y,w)=>{if(!y)return;const _=parseFloat(y.getAttribute(n[0])||""),C=a[w.i];isFinite(_)&&isFinite(C)&&ve(x,y,n,C,_,r,o)};if(t.forEach((y,w)=>{const _=parseFloat(y.getAttribute(s)||""),C=c.get(y.textContent||""),S=d?i[w]:null;C&&h.add(C.i);const k=y.getAttribute("transform");if(!C||!isFinite(C.pos)){if(!C){if(l&&isFinite(_)&&!k){const M=isFinite(l.toOld(_))?m(l.toOld(_)):NaN;isFinite(M)&&Math.abs(M-_)>.5&&(ve(x,y,[s],M,_,r,o),S&&ve(x,S,n,M,_,r,o))}ii(x,y,r,o),S&&ii(x,S,r,o)}return}if(!(!isFinite(_)||Math.abs(C.pos-_)<.5)){if(k||C.transform){const M=C.pos-_;if(isFinite(M)){const L=k||"";Mt(x,r,o,E=>{const D=M*(1-E),T=s==="x"?`translate(${D} 0)`:`translate(0 ${D})`;y.setAttribute("transform",`${T} ${L}`.trim())},()=>{L?y.setAttribute("transform",L):y.removeAttribute("transform")})}A(S,C);return}ve(x,y,[s],C.pos,_,r,o),A(S,C)}}),!l||!t.length)return;let v=0;e.forEach((y,w)=>{if(h.has(w)||!isFinite(y.pos)||y.transform||v>=pn)return;const _=l.toNew(y.pos);!isFinite(_)||Math.abs(_-y.pos)<.5||(v++,ai(x,{template:t[0],display:y.display,attrs:[s],from:y.pos,to:m(_),duration:r,ease:o}),f&&i.length&&isFinite(a[w])&&ai(x,{template:i[0],attrs:n,from:a[w],to:m(l.toNew(a[w])),duration:r,ease:o}))})}function xn(x){const t=x.globals,e=t.prevChromeFrame;if(t.prevChromeFrame=null,!e||!t.axisCharts||!H.isBrowser()||!Wt(x)||!(x.seriesData.series||[]).some((r,o)=>ye(x,o,!0,!0)!==null))return;const i=x.dom.baseEl;if(!R.elementExists(i))return;const a=Math.max(1,x.config.chart.animations.dynamicAnimation.speed||1),n=Rs(x);try{const r=[...i.querySelectorAll(Ki)],o=fn(e.xScale,ta(x)),l=un(e.yAnchors,ea(x,r.map(c=>({pos:parseFloat(c.getAttribute("y")||"")}))));ni(x,{newLabels:[...i.querySelectorAll(Zi)],oldLabels:e.xLabels,posAttr:"x",newLines:[...i.querySelectorAll(Ji)],oldLines:e.vGrid,lineAttrs:["x1","x2"],duration:a,ease:n,project:o}),ni(x,{newLabels:r,oldLabels:e.yLabels,posAttr:"y",newLines:[...i.querySelectorAll(Qi)],oldLines:e.hGrid,lineAttrs:["y1","y2"],duration:a,ease:n,project:l})}catch{}}const sa=".apexcharts-data-labels[data\\:dlKey]",ia=".apexcharts-datalabel";function aa(x){var t,e;const s=x.config.dataLabels;return!!((t=s?.animate)!=null&&t.enabled||(e=s?.countUp)!=null&&e.enabled)}function ri(x){if(!isFinite(x))return 0;const t=String(Math.abs(x)),e=t.indexOf("e");if(e!==-1){const i=t.slice(0,e),a=parseInt(t.slice(e+1),10),n=i.indexOf("."),r=n===-1?0:i.length-n-1;return Math.min(6,Math.max(0,r-a))}const s=t.indexOf(".");return s===-1?0:Math.min(6,t.length-s-1)}function oi(x,t){const e=x.querySelector("tspan");e?e.textContent=t:x.textContent=t}function mn(x){const t=x.globals;if(t.prevDataLabels=null,!t.axisCharts||!H.isBrowser()||!aa(x))return;const e=x.dom.baseEl;if(R.elementExists(e))try{const s=new Map;e.querySelectorAll(sa).forEach(i=>{const a=i.getAttribute("data:dlKey");if(!a)return;const n=i.querySelector(ia);n&&s.set(a,{cx:parseFloat(n.getAttribute("cx")||""),cy:parseFloat(n.getAttribute("cy")||""),val:parseFloat(i.getAttribute("data:dlVal")||"")})}),t.prevDataLabels=s.size?s:null}catch{t.prevDataLabels=null}}function bn(x,t,e,s){const i=t.style;i.opacity="0",Mt(x,e,s,a=>{i.opacity=String(a)},()=>{i.opacity=""})}function yn(x){var t,e;const s=x.globals,i=s.prevDataLabels;if(s.prevDataLabels=null,!i||!s.axisCharts||!H.isBrowser()||!aa(x)||!Wt(x))return;const a=x.dom.baseEl;if(!R.elementExists(a))return;const n=x.config.dataLabels,r=!!((t=n.animate)!=null&&t.enabled),o=!!((e=n.countUp)!=null&&e.enabled),l=n.formatter,c=Math.max(1,x.config.chart.animations.dynamicAnimation.speed||1),h=Rs(x);
27try{a.querySelectorAll(sa).forEach(d=>{const f=d.getAttribute("data:dlKey");if(!f)return;const u=d.querySelector(ia);if(!u)return;const g=i.get(f);if(r)if(g&&isFinite(g.cx)&&isFinite(g.cy)){const p=parseFloat(u.getAttribute("cx")||""),b=parseFloat(u.getAttribute("cy")||""),m=g.cx-p,A=g.cy-b;if(isFinite(m)&&isFinite(A)&&Math.abs(m)+Math.abs(A)>.5){const v=d.getAttribute("transform")||"";Mt(x,c,h,y=>{const w=1-y;d.setAttribute("transform",`translate(${m*w} ${A*w}) ${v}`.trim())},()=>{d.setAttribute("transform",v)})}}else g||bn(x,d,c,h);if(o&&g&&isFinite(g.val)){const p=parseFloat(d.getAttribute("data:dlVal")||"");if(isFinite(p)&&Math.abs(p-g.val)>1e-9){const b=g.val,m=Math.max(ri(b),ri(p)),A=parseInt(f,10),v=parseInt(d.getAttribute("data:dlJ")||"",10),y=Z(G({},x),{seriesIndex:A,dataPointIndex:isFinite(v)?v:0,w:x}),w=_=>{const C=Number(_.toFixed(m));let S=C;if(typeof l=="function")try{S=l(C,y)}catch{S=C}return String(S)};Mt(x,c,h,_=>{oi(u,w(b+(p-b)*_))},()=>{oi(u,w(p))})}}})}catch{}}class nt{constructor(t,{toggleDataSeries:e=void 0,revertDefaultAxisMinMax:s=void 0,updateSeries:i=void 0}={}){this.w=t,this._toggleDataSeries=e||null,this._revertDefaultAxisMinMax=s||null,this._updateSeries=i||null,this.legendInactiveClass="legend-mouseover-inactive"}clearSeriesCache(){const t=this.w;t.globals.cachedSelectors&&(delete t.globals.cachedSelectors.allSeriesEls,delete t.globals.cachedSelectors.highlightSeriesEls)}getAllSeriesEls(){const t=this.w,e="allSeriesEls";return t.globals.cachedSelectors[e]||(t.globals.cachedSelectors[e]=t.dom.baseEl.getElementsByClassName("apexcharts-series")),t.globals.cachedSelectors[e]}getSeriesByName(t){return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${R.escapeString(t)}']`)}isSeriesHidden(t){var e;const i=this.getSeriesByName(t),a=parseInt((e=i.getAttribute("data:realIndex"))!=null?e:"0",10);return{isHidden:i.classList.contains("apexcharts-series-collapsed"),realIndex:a}}addCollapsedClassToSeries(t,e){nt.addCollapsedClassToSeries(this.w,t,e)}static addCollapsedClassToSeries(t,e,s){function i(a){for(let n=0;n<a.length;n++)a[n].index===s&&e.node.classList.add("apexcharts-series-collapsed")}i(t.globals.collapsedSeries),i(t.globals.ancillaryCollapsedSeries)}toggleSeries(t){var e;const s=this.isSeriesHidden(t);return(e=this._toggleDataSeries)==null||e.call(this,s.realIndex,s.isHidden),s.isHidden}showSeries(t){var e;const s=this.isSeriesHidden(t);s.isHidden&&((e=this._toggleDataSeries)==null||e.call(this,s.realIndex,!0))}hideSeries(t){var e;const s=this.isSeriesHidden(t);s.isHidden||(e=this._toggleDataSeries)==null||e.call(this,s.realIndex,!1)}prepareDataUpdate(){const t=this.w;this.clearSeriesCache(),t.globals.previousPaths=[],t.globals.collapsedSeries=[],t.globals.ancillaryCollapsedSeries=[],t.globals.collapsedSeriesIndices=[],t.globals.ancillaryCollapsedSeriesIndices=[]}resetSeries(t=!0,e=!0,s=!0){var i,a;const n=this.w;this.clearSeriesCache();let r=R.clone(n.globals.initialSeries);n.globals.previousPaths=[],s?(n.globals.collapsedSeries=[],n.globals.ancillaryCollapsedSeries=[],n.globals.collapsedSeriesIndices=[],n.globals.ancillaryCollapsedSeriesIndices=[]):r=this.emptyCollapsedSeries(r),n.config.series=r,t&&(e&&(n.interact.zoomed=!1,(i=this._revertDefaultAxisMinMax)==null||i.call(this)),(a=this._updateSeries)==null||a.call(this,r,n.config.chart.animations.dynamicAnimation.enabled))}emptyCollapsedSeries(t){const e=this.w;for(let s=0;s<t.length;s++)e.globals.collapsedSeriesIndices.indexOf(s)>-1&&(t[s]&&typeof t[s]=="object"?t[s].data=[]:t[s]=0);return t}_deriveSeriesNames(){const t=this.w,e=t.config.series||[],s=t.config.labels||[];return e.map((i,a)=>i&&typeof i=="object"&&i.name!=null?String(i.name):s[a]!=null?String(s[a]):`series-${a+1}`)}reconcileCollapsedByName(){const t=this.w,e=t.globals,s=this._deriveSeriesNames(),i=r=>{const o=[],l=[];return r.forEach(c=>{const h=c&&c.name!=null?s.indexOf(c.name):c.index;if(h==null||h<0||h>=t.config.series.length)return;const d=t.config.series[h];c.index=h,c.data=e.axisCharts?d&&d.data?d.data.slice():[]:d,o.push(c),l.push(h)}),{records:o,indices:l}},a=i(e.collapsedSeries);e.collapsedSeries=a.records,e.collapsedSeriesIndices=a.indices;const n=i(e.ancillaryCollapsedSeries);e.ancillaryCollapsedSeries=n.records,e.ancillaryCollapsedSeriesIndices=n.indices,e.allSeriesCollapsed=e.collapsedSeries.length+e.ancillaryCollapsedSeries.length===t.config.series.length,this.emptyCollapsedSeries(t.config.series)}canvasRestyle(t){const e=this.w.globals.activeRenderer;e&&e.kind==="canvas"&&typeof e.restyle=="function"&&e.restyle(t)}highlightSeries(t){var e;const s=this.w,i=this.getSeriesByName(t),a=parseInt((e=i?.getAttribute("data:realIndex"))!=null?e:"",10),n="highlightSeriesEls";let r=s.globals.cachedSelectors[n];r||(r=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),s.globals.cachedSelectors[n]=r);let o=null,l=null,c=null;if(s.globals.axisCharts||s.config.chart.type==="radialBar")if(s.globals.axisCharts){o=s.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${a}']`),l=s.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${a}']`);const h=s.globals.seriesYAxisReverseMap[a];c=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${h}']`)}else o=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}']`);else o=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}'] path`);for(let h=0;h<r.length;h++)r[h].classList.add(this.legendInactiveClass);if(o){if(!s.globals.axisCharts){const h=o.parentNode;h?.classList.remove(this.legendInactiveClass)}o.classList.remove(this.legendInactiveClass),l!==null&&l.classList.remove(this.legendInactiveClass),c!==null&&c.classList.remove(this.legendInactiveClass)}else for(let h=0;h<r.length;h++)r[h].classList.remove(this.legendInactiveClass);this.canvasRestyle(o&&!Number.isNaN(a)?{active:a,opacity:.2}:null)}toggleSeriesOnHover(t,e){const s=this.w;e||(e=t.target);const i=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");
27if(t.type==="mousemove"){const a=parseInt(e.getAttribute("rel"),10)-1;this.highlightSeries(s.seriesData.seriesNames[a])}else if(t.type==="mouseout"){for(let a=0;a<i.length;a++)i[a].classList.remove(this.legendInactiveClass);this.canvasRestyle(null)}}highlightRangeInSeries(t,e){const s=this.w,i=s.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),a=o=>{for(let l=0;l<i.length;l++){const c=i[l].classList;typeof c[o]=="function"&&c[o](this.legendInactiveClass)}};if(e==="reset"){a("remove");return}const n=s.config.plotOptions.heatmap.colorScale.ranges,r=n&&n[t];if(r){a("add");for(let o=0;o<i.length;o++){const l=Number(i[o].getAttribute("val"));l>=r.from&&l<=r.to&&i[o].classList.remove(this.legendInactiveClass)}}}getActiveConfigSeriesIndex(t="asc",e=[]){const s=this.w;let i=0;if(s.config.series.length>1){const a=s.config.series.map((n,r)=>{const o=()=>s.globals.comboCharts?e.length===0||e.length&&e.indexOf(s.config.series[r].type)>-1:!0;return n.data&&n.data.length>0&&s.globals.collapsedSeriesIndices.indexOf(r)===-1&&o()?r:-1});for(let n=t==="asc"?0:a.length-1;t==="asc"?n<a.length:n>=0;t==="asc"?n++:n--)if(a[n]!==-1){i=a[n];break}}return i}getBarSeriesIndices(){return this.w.globals.comboCharts?this.w.config.series.map((e,s)=>e.type==="bar"||e.type==="column"?s:-1).filter(e=>e!==-1):this.w.config.series.map((e,s)=>s)}getPreviousPaths(){var t,e,s,i;const a=this.w;if(Qa(a),gn(a),mn(a),!a.globals.axisCharts){a.globals.previousPaths=a.seriesData.series;return}if(!R.elementExists(a.dom.baseEl)){a.globals.previousPaths=[];return}a.globals.previousPaths=[];function n(c,h,d){const f=c[h].childNodes,u={type:d,paths:[],realIndex:c[h].getAttribute("data:realIndex")};for(let g=0;g<f.length;g++)if(f[g].hasAttribute("pathTo")){const p=f[g].getAttribute("pathTo");u.paths.push({d:p,key:f[g].getAttribute("data:pathKey"),fill:f[g].getAttribute("fill")})}a.globals.previousPaths.push(u)}const r=c=>a.dom.baseEl.querySelectorAll(`.apexcharts-${c}-series .apexcharts-series`);["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(c=>{const h=r(c);for(let d=0;d<h.length;d++)n(h,d,c)});const l=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series`);if(l.length>0)for(let c=0;c<l.length;c++){const h=a.dom.baseEl.querySelectorAll(`.apexcharts-${a.config.chart.type} .apexcharts-series[data\\:realIndex='${c}'] rect`),d=[];for(let f=0;f<h.length;f++){const u=p=>h[f].getAttribute(p),g={x:parseFloat((t=u("x"))!=null?t:"0"),y:parseFloat((e=u("y"))!=null?e:"0"),width:parseFloat((s=u("width"))!=null?s:"0"),height:parseFloat((i=u("height"))!=null?i:"0")};d.push({rect:g,color:h[f].getAttribute("color")})}a.globals.previousPaths.push(d)}}clearPreviousPaths(){const t=this.w;t.globals.previousPaths=[],t.globals.allSeriesCollapsed=!1}handleNoData(){const t=this.w,e=this,s=t.config.noData,i=new I(e.w);let a=t.globals.svgWidth/2,n=t.globals.svgHeight/2,r="middle";if(t.globals.noData=!0,t.globals.animationEnded=!0,s.align==="left"?(a=10,r="start"):s.align==="right"&&(a=t.globals.svgWidth-10,r="end"),s.verticalAlign==="top"?n=50:s.verticalAlign==="bottom"&&(n=t.globals.svgHeight-50),a=a+s.offsetX,n=n+parseInt(s.style.fontSize,10)+2+s.offsetY,s.text!==void 0&&s.text!==""){const o=i.drawText({x:a,y:n,text:s.text,textAnchor:r,fontSize:s.style.fontSize,fontFamily:s.style.fontFamily,foreColor:s.style.color,opacity:1,cssClass:"apexcharts-text-nodata"});t.dom.Paper.add(o)}}setNullSeriesToZeroValues(t){const e=this.w;for(let s=0;s<t.length;s++)if(t[s].length===0)for(let i=0;i<t[e.globals.maxValsInArrayIndex].length;i++)t[s].push(0);return t}hasAllSeriesEqualX(){let t=!0;const e=this.w,s=this.filteredSeriesX();for(let i=0;i<s.length-1;i++)if(s[i][0]!==s[i+1][0]){t=!1;break}return e.globals.allSeriesHasEqualX=t,t}filteredSeriesX(){return this.w.seriesData.seriesX.map(s=>s.length>0?s:[])}}const li={accent:"--apx-accent",fore:"--apx-fore",grid:"--apx-grid",surface:"--apx-surface"},wn=24;function vn(x){if(!H.isBrowser())return{};const t=x.dom&&(x.dom.elWrap||x.dom.baseEl)||null;if(!t)return{};const e=B.getComputedStyle(t);if(!e||typeof e.getPropertyValue!="function")return{};const s=n=>{const r=e.getPropertyValue(n);
27return r?String(r).trim():""},i={};for(const n in li){const r=s(li[n]);r&&(i[n]=r)}const a=[];for(let n=1;n<=wn;n++){const r=s(`--apx-series-${n}`);if(!r)break;a.push(r)}return a.length&&(i.series=a),i}const fs="__apexcharts_themes__";globalThis[fs]||(globalThis[fs]={});function Ts(){return globalThis[fs]}function An(x,t){if(!x||typeof x!="string"){console.warn("ApexCharts: registerTheme requires a non-empty name.");return}if(t!=null&&(typeof t!="object"||Array.isArray(t))){console.warn(`ApexCharts: registerTheme("${x}") expects an object like { mode, palette, tokens, monochrome, accessibility }.`);return}Ts()[x]=t||{}}function _n(x){return x&&Ts()[x]||null}function Sn(x){x&&delete Ts()[x]}const Ge="#373d3f",Ue="#f6f7f8",qe="#e0e0e0";class Cn{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 t.type==="treemap"&&e.treemap&&e.treemap.distributed||t.type==="heatmap"&&e.heatmap&&e.heatmap.distributed}checkBarDistributed(){const{chart:t,plotOptions:e}=this.w.config;return e.bar&&e.bar.distributed&&(t.type==="bar"||t.type==="rangeBar")}init(){this.setDefaultColors()}setDefaultColors(){var t;const e=this.w,s=new R;this._namedTheme=_n(e.config.theme.name),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 i=(t=e.config.theme.accessibility)==null?void 0:t.colorBlindMode;if(i){e.globals.colors=this.getColorBlindColors(i),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors);const r=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],r),this.applyDataLabelsColors(r),this.applyRadarPolygonsColors(),this.applyMarkersColors(r),i==="highContrast"&&e.dom.elWrap.classList.add("apexcharts-high-contrast");return}const a=[...e.config.colors||e.config.fill.colors||[]];e.globals.colors=this.getColors(a),this.applySeriesColors(e.seriesData.seriesColors,e.globals.colors),e.config.theme.monochrome.enabled&&(e.globals.colors=this.getMonochromeColors(e.config.theme.monochrome,e.seriesData.series,s));const 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;e==="dark"?(t.config.chart.foreColor===Ge&&(t.config.chart.foreColor=Ue),t.config.theme.palette==="palette1"&&(t.config.theme.palette="palette4"),t.config.tooltip&&t.config.tooltip.theme!=="light"&&(t.config.tooltip.theme="dark")):e==="light"&&(t.config.chart.foreColor===Ue&&(t.config.chart.foreColor=Ge),t.config.theme.palette==="palette4"&&(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=G(G({},e.monochrome),t.monochrome))}_resolveTokens(){const t=this._namedTheme&&this._namedTheme.tokens||{},e=this._shouldUseTokens()?vn(this.w):{};return G(G({},t),e)}_shouldUseTokens(){return this.w.config.theme.tokens!==!1}applyTokenChrome(t){if(!t)return;const e=this.w;if(t.fore&&(e.config.chart.foreColor===Ge||e.config.chart.foreColor===Ue)&&(e.config.chart.foreColor=t.fore),t.grid){e.config.grid.borderColor===qe&&(e.config.grid.borderColor=t.grid);const s=i=>{i&&(i.axisBorder&&i.axisBorder.color===qe&&(i.axisBorder.color=t.grid),i.axisTicks&&i.axisTicks.color===qe&&(i.axisTicks.color=t.grid))};s(e.config.xaxis),Array.isArray(e.config.yaxis)?e.config.yaxis.forEach(s):s(e.config.yaxis)}if(t.surface&&!e.config.chart.background){e.config.chart.background=t.surface;const s=e.dom.Paper&&e.dom.Paper.node;s&&s.style&&(s.style.background=t.surface)}}getColors(t){const e=this.w;return!t||t.length===0?this.predefined():Array.isArray(t)&&t.length>0&&typeof t[0]=="function"?(this.isColorFn=!0,e.config.series.map((s,i)=>{const a=t[i]||t[0];return typeof a=="function"?a({value:e.globals.axisCharts?e.seriesData.series[i][0]||0:e.seriesData.series[i],seriesIndex:i,dataPointIndex:i,w:this.w}):a})):t}applySeriesColors(t,e){t.forEach((s,i)=>{s&&(e[i]=s)})}getMonochromeColors(t,e,s){const{color:i,shadeIntensity:a,shadeTo:n}=t,r=this.isBarDistributed||this.isHeatmapDistributed?e[0].length*e.length:e.length,o=1/(r/a);let l=0;return Array.from({length:r},()=>{const c=n==="dark"?s.shadeColor(l*-1,i):s.shadeColor(l,i);return l+=o,c})}applyColorTypes(t,e){const s=this.w;t.forEach(i=>
27{s.globals[i].colors=s.config[i].colors===void 0?this.isColorFn?s.config.colors:e:s.config[i].colors.slice(),this.pushExtraColors(s.globals[i].colors)})}applyDataLabelsColors(t){const e=this.w;e.globals.dataLabels.style.colors=e.config.dataLabels.style.colors===void 0?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=t.config.plotOptions.radar.polygons.fill.colors===void 0?[t.config.theme.mode==="dark"?"#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=e.config.markers.colors===void 0?t:e.config.markers.colors.slice(),this.pushExtraColors(e.globals.markers.colors)}pushExtraColors(t,e,s=null){const i=this.w;let a=e||i.seriesData.series.length;if(s===null&&(s=this.isBarDistributed||this.isHeatmapDistributed||i.config.chart.type==="heatmap"&&i.config.plotOptions.heatmap&&i.config.plotOptions.heatmap.colorScale.inverse),s&&i.seriesData.series.length&&(a=i.seriesData.series[i.globals.maxValsInArrayIndex].length*i.seriesData.series.length),t.length<a){const n=a-t.length;for(let r=0;r<n;r++)t.push(t[r])}}getColorBlindColors(t){const e=hs();return({deuteranopia:e.cvdDeuteranopia,protanopia:e.cvdProtanopia,tritanopia:e.cvdTritanopia,highContrast:e.highContrast}[t]||e.palette1).slice()}updateThemeOptions(t){t.chart=t.chart||{},t.tooltip=t.tooltip||{};const e=t.theme.mode,s=e==="dark"?"palette4":e==="light"?"palette1":t.theme.palette||"palette1",i=e==="dark"?"#f6f7f8":e==="light"?"#373d3f":t.chart.foreColor||"#373d3f";return t.tooltip.theme=e||"light",t.chart.foreColor=i,t.theme.palette=s,t}predefined(){const t=this.w.config.theme.palette,e=hs(),s=e[t]||e.palette1,i=this._tokens||{};if(Array.isArray(i.series)&&i.series.length)return i.series.slice();if(i.accent)return[i.accent,...s];const a=this._namedTheme;return a&&Array.isArray(a.palette)&&a.palette.length?a.palette.slice():s}}class kn{constructor(t){this.w=t}draw(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}drawTitleSubtitle(t){const e=this.w,s=t==="title"?e.config.title:e.config.subtitle;let i=e.globals.svgWidth/2,a=s.offsetY,n="middle";if(s.align==="left"?(i=10,n="start"):s.align==="right"&&(i=e.globals.svgWidth-10,n="end"),i=i+s.offsetX,a=a+parseInt(s.style.fontSize,10)+s.margin/2,s.text!==void 0){const o=new I(this.w).drawText({x:i,y:a,text:s.text,textAnchor:n,fontSize:s.style.fontSize,fontFamily:s.style.fontFamily,fontWeight:s.style.fontWeight,foreColor:s.style.color,opacity:1});o.node.setAttribute("class",`apexcharts-${t}-text`),e.dom.Paper.add(o)}}}let Mn=class{constructor(t){this.w=t.w,this.dCtx=t}getTitleSubtitleCoords(t){const e=this.w;let s=0,i=0;const a=t==="title"?e.config.title.floating:e.config.subtitle.floating,n=e.dom.baseEl.querySelector(`.apexcharts-${t}-text`);if(n!==null&&!a){const r=n.getBoundingClientRect();s=r.width,i=e.globals.axisCharts?r.height+5:r.height}return{width:s,height:i}}getLegendsRect(){const t=this.w,e=t.dom.elLegendWrap;!t.config.legend.height&&(t.config.legend.position==="top"||t.config.legend.position==="bottom")&&e&&(e.style.maxHeight=t.globals.svgHeight/2+"px");const s=Object.assign({},R.getBoundingClientRect(e));return e!==null&&!t.config.legend.floating&&t.config.legend.show?this.dCtx.lgRect={x:s.x,y:s.y,height:s.height,width:s.height===0?0:s.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},(t.config.legend.position==="left"||t.config.legend.position==="right")&&this.dCtx.lgRect.width*1.5>t.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}getDatalabelsRect(){const t=this.w,e=[];t.config.series.forEach((r,o)=>{r.data.forEach((l,c)=>{const d=(f=>t.config.dataLabels.formatter(f,{seriesIndex:o,dataPointIndex:c,w:t}))(t.seriesData.series[o][c]);e.push(d)})});const s=R.getLargestStringFromArr(e),i=new I(this.w),a=t.config.dataLabels.style,n=i.getTextRects(s,parseInt(a.fontSize).toString(),a.fontFamily);return{width:n.width*1.05,height:n.height}}getLargestStringFromMultiArr(t,e){const s=this.w;let i=t;if(s.axisFlags.isMultiLineX){const a=e.map(o=>Array.isArray(o)?o.length:1),n=Math.max(...a),r=a.indexOf(n);i=e[r]}return i}};class Ln{constructor(t){this.w=t.w,this.dCtx=t}getxAxisLabelsCoords(){const t=this.w;let e=t.labelData.labels.slice();t.config.xaxis.convertedCatToNumeric&&e.length===0&&(e=t.labelData.categoryLabels);let s;if(t.labelData.timescaleLabels.length>0){const i=this.getxAxisTimeScaleLabelsCoords();s={width:i.width,height:i.height},t.layout.rotateXLabels=!1}
27else{this.dCtx.lgWidthForSideLegends=(t.config.legend.position==="left"||t.config.legend.position==="right")&&!t.config.legend.floating?this.dCtx.lgRect.width:0;const i=t.formatters.xLabelFormatter;let a=R.getLargestStringFromArr(e),n=this.dCtx.dimHelpers.getLargestStringFromMultiArr(a,e);t.globals.isBarHorizontal&&(a=t.globals.yAxisScale[0].result.reduce((d,f)=>d.length>f.length?d:f,0),n=a);const r=new be(this.w),o=a;a=r.xLabelFormat(i,a,o,{i:void 0,dateFormatter:new xt(this.w).formatDate,w:t}),n=r.xLabelFormat(i,n,o,{i:void 0,dateFormatter:new xt(this.w).formatDate,w:t}),(t.config.xaxis.convertedCatToNumeric&&typeof a>"u"||String(a).trim()==="")&&(a="1",n=a);const l=new I(this.w);let c=l.getTextRects(a,t.config.xaxis.labels.style.fontSize),h=c;if(a!==n&&(h=l.getTextRects(n,t.config.xaxis.labels.style.fontSize)),s={width:c.width>=h.width?c.width:h.width,height:c.height>=h.height?c.height:h.height},s.width*e.length>t.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&t.config.xaxis.labels.rotate!==0||t.config.xaxis.labels.rotateAlways){if(!t.globals.isBarHorizontal){t.layout.rotateXLabels=!0;const d=f=>l.getTextRects(f,t.config.xaxis.labels.style.fontSize,t.config.xaxis.labels.style.fontFamily,`rotate(${t.config.xaxis.labels.rotate} 0 0)`,!1);c=d(a),a!==n&&(h=d(n)),s.height=(c.height>h.height?c.height:h.height)/1.5,s.width=c.width>h.width?c.width:h.width}}else t.layout.rotateXLabels=!1}return t.config.xaxis.labels.show||(s={width:0,height:0}),{width:s.width,height:s.height}}getxAxisGroupLabelsCoords(){var t;const e=this.w;if(!e.labelData.hasXaxisGroups)return{width:0,height:0};const s=((t=e.config.xaxis.group.style)==null?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,i=e.labelData.groups.map(h=>h.title);let a;const n=R.getLargestStringFromArr(i),r=this.dCtx.dimHelpers.getLargestStringFromMultiArr(n,i),o=new I(this.w),l=o.getTextRects(n,s);let c=l;return n!==r&&(c=o.getTextRects(r,s)),a={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},e.config.xaxis.labels.show||(a={width:0,height:0}),{width:a.width,height:a.height}}getxAxisTitleCoords(){const t=this.w;let e=0,s=0;if(t.config.xaxis.title.text!==void 0){const a=new I(this.w).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=a.width,s=a.height}return{width:e,height:s}}getxAxisTimeScaleLabelsCoords(){const t=this.w;this.dCtx.timescaleLabels=t.labelData.timescaleLabels.slice();const e=this.dCtx.timescaleLabels.map(r=>r.value),s=e.reduce((r,o)=>typeof r>"u"?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):r.length>o.length?r:o,0),a=new I(this.w).getTextRects(s,t.config.xaxis.labels.style.fontSize);return a.width*1.05*e.length>t.layout.gridWidth&&t.config.xaxis.labels.rotate!==0&&(t.globals.overlappingXLabels=!0),a}additionalPaddingXLabels(t){const e=this.w,s=e.globals,i=e.config,a=i.xaxis.type,n=t.width;s.skipLastTimelinelabel=!1,s.skipFirstTimelinelabel=!1;const r=e.config.yaxis[0].opposite&&e.globals.isBarHorizontal,o=h=>s.collapsedSeriesIndices.indexOf(h)!==-1,l=h=>{if(this.dCtx.timescaleLabels&&this.dCtx.timescaleLabels.length){const d=this.dCtx.timescaleLabels[0],u=this.dCtx.timescaleLabels[this.dCtx.timescaleLabels.length-1].position+n/1.75-this.dCtx.yAxisWidthRight,g=d.position-n/1.75+this.dCtx.yAxisWidthLeft,p=e.config.legend.position==="right"&&this.dCtx.lgRect.width>0?this.dCtx.lgRect.width:0;u>s.svgWidth-e.layout.translateX-p&&(s.skipLastTimelinelabel=!0),g<-((!h.show||h.floating)&&(i.chart.type==="bar"||i.chart.type==="candlestick"||i.chart.type==="rangeBar"||i.chart.type==="boxPlot"||i.chart.type==="violin")?n/1.75:10)&&(s.skipFirstTimelinelabel=!0)}else a==="datetime"?this.dCtx.gridPad.right<n&&!e.layout.rotateXLabels&&(s.skipLastTimelinelabel=!0):a!=="datetime"&&this.dCtx.gridPad.right<n/2-this.dCtx.yAxisWidthRight&&!e.layout.rotateXLabels&&!e.config.xaxis.labels.trim&&(this.dCtx.xPadRight=n/2+1)},c=(h,d)=>{i.yaxis.length>1&&o(d)||l(h)};i.yaxis.forEach((h,d)=>{r?(this.dCtx.gridPad.left<n&&(this.dCtx.xPadLeft=n/2+1),this.dCtx.xPadRight=n/2+1):c(h,d)})}}class Dn{constructor(t){this.w=t.w,this.dCtx=t}getyAxisLabelsCoords(){const t=this.w,e=0,s=0,i=[];let a=10;const n=new Pt(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});return t.config.yaxis.map((r,o)=>{const l={seriesIndex:o,dataPointIndex:-1,w:t},c=t.globals.yAxisScale[o];let h=0;if(!n.isYAxisHidden(o)&&r.labels.show&&r.labels.minWidth!==void 0&&(h=r.labels.minWidth),!n.isYAxisHidden(o)&&r.labels.show&&c.result.length){const d=t.formatters.yLabelFormatters[o],f=c.niceMin===Number.MIN_VALUE?0:c.niceMin;let u=c.result.reduce((v,y)=>{var w,_;return((w=String(d(v,l)))==null?void 0:w.length)>((_=String(d(y,l)))==null?void 0:_.length)?v:y},f);u=d(u,l);let g=u;if((typeof u>"u"||u.length===0)&&(u=c.niceMax),String(u).length===1&&(u=u+".0",g=u),t.globals.isBarHorizontal){a=0;const v=t.labelData.labels.slice();u=R.getLargestStringFromArr(v),u=d(u,{seriesIndex:o,dataPointIndex:-1,w:t}),g=this.dCtx.dimHelpers.getLargestStringFromMultiArr(u,v)}const p=new I(this.w),b="rotate(".concat(r.labels.rotate," 0 0)"),m=p.getTextRects(u,r.labels.style.fontSize,r.labels.style.fontFamily,b,!1);let A=m;u!==g&&(A=p.getTextRects(g,r.labels.style.fontSize,r.labels.style.fontFamily,b,!1)),i.push({width:(h>A.width||h>m.width?h:A.width>m.width?A.width:m.width)+a,height:A.height>m.height?A.height:m.height})}else i.push({width:e,height:s})}),i}getyAxisTitleCoords(){const t=this.w,e=[];return t.config.yaxis.map(s=>{if(s.show&&s.title.text!==void 0){const i=new I(this.w),a="rotate(".concat(s.title.rotate," 0 0)"),n=i.getTextRects(s.title.text,s.title.style.fontSize,s.title.style.fontFamily,a,!1);e.push({width:n.width,height:n.height})}else e.push({width:0,height:0})}),e}getTotalYAxisWidth(){const t=this.w;let e=0,s=0,i=0;const a=t.globals.yAxisScale.length>1?10:0,n=new Pt(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale}),r=function(l){return t.globals.ignoreYAxisIndexes.indexOf(l)>-1},o=(l,c)=>{const h=t.config.yaxis[c].floating;let d=0;l.width>0&&!h?(d=l.width+a,r(c)&&(d=d-l.width-a)):d=h||n.isYAxisHidden(c)?0:5,t.config.yaxis[c].opposite?i=i+d:s=s+d,e=e+d};return t.layout.yLabelsCoords.map((l,c)=>{o(l,c)}),t.layout.yTitleCoords.map((l,c)=>{o(l,c)}),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.layout.yLabelsCoords[0].width+t.layout.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=s,this.dCtx.yAxisWidthRight=i,e}}class En{constructor(t){this.w=t.w,this.dCtx=t}gridPadForColumnsInNumericAxis(t){const{w:e}=this,{config:s,globals:i}=e;if(i.noData||i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.series.length)return 0;const a=h=>["bar","rangeBar","candlestick","boxPlot","violin"].includes(h),n=s.chart.type;let r=0,o=a(n)?s.series.length:1;i.comboBarCount>
270&&(o=i.comboBarCount),i.collapsedSeries.forEach(h=>{a(h.type)&&(o-=1)}),s.chart.stacked&&(o=1);const l=a(n)||i.comboBarCount>0;let c=Math.abs(i.initialMaxX-i.initialMinX);if(l&&e.axisFlags.isXNumeric&&!i.isBarHorizontal&&o>0&&c!==0){c<=3&&(c=i.dataPoints);const h=c/t;let d=i.minXDiff&&i.minXDiff/h>0?i.minXDiff/h:0;d>t/2&&(d/=2),r=d*parseInt(s.plotOptions.bar.columnWidth,10)/100,r<1&&(r=1),i.barPadForNumericAxis=r}return r}gridPadFortitleSubtitle(){const{w:t}=this,{globals:e}=t;let s=this.dCtx.isSparkline||!e.axisCharts?0:10;["title","subtitle"].forEach(r=>{t.config[r].text!==void 0?s+=t.config[r].margin:s+=this.dCtx.isSparkline||!e.axisCharts?0:5}),t.config.legend.show&&t.config.legend.position==="bottom"&&!t.config.legend.floating&&!e.axisCharts&&(s+=10);const a=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),n=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");t.layout.gridHeight-=a.height+n.height+s,t.layout.translateY+=a.height+n.height+s}setGridXPosForDualYAxis(t,e){const{w:s}=this,i=new Pt(this.w,{theme:this.dCtx.theme,timeScale:this.dCtx.timeScale});s.config.yaxis.forEach((a,n)=>{s.globals.ignoreYAxisIndexes.indexOf(n)===-1&&!a.floating&&!i.isYAxisHidden(n)&&(a.opposite&&(s.layout.translateX-=e[n].width+t[n].width+parseInt(a.labels.style.fontSize,10)/1.2+12),s.layout.translateX<2&&(s.layout.translateX=2))})}}class Fe{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 Mn(this),this.dimYAxis=new Dn(this),this.dimXAxis=new Ln(this),this.dimGrid=new En(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0,this.datalabelsCoords={width:0,height:0},this.xAxisWidth=0,this.timescaleLabels=[]}plotCoords(){const t=this.w,e=t.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};const s=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width;this.isSparkline&&((t.config.markers.discrete.length>0||t.config.markers.size>0)&&Object.entries(this.gridPad).forEach(([a,n])=>{this.gridPad[a]=Math.max(n,this.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(s/2,this.gridPad.top),this.gridPad.bottom=Math.max(s/2,this.gridPad.bottom)),e.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),t.layout.gridHeight=t.layout.gridHeight-this.gridPad.top-this.gridPad.bottom,t.layout.gridWidth=t.layout.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;const i=this.dimGrid.gridPadForColumnsInNumericAxis(t.layout.gridWidth);return t.layout.gridWidth=t.layout.gridWidth-i*2,t.layout.translateX=t.layout.translateX+this.gridPad.left+this.xPadLeft+(i>0?i:0),t.layout.translateY=t.layout.translateY+this.gridPad.top,{layout:{gridHeight:t.layout.gridHeight,gridWidth:t.layout.gridWidth,translateX:t.layout.translateX,translateY:t.layout.translateY,translateXAxisX:t.layout.translateXAxisX,translateXAxisY:t.layout.translateXAxisY,rotateXLabels:t.layout.rotateXLabels,xAxisHeight:t.layout.xAxisHeight,xAxisLabelsHeight:t.layout.xAxisLabelsHeight,xAxisGroupLabelsHeight:t.layout.xAxisGroupLabelsHeight,xAxisLabelsWidth:t.layout.xAxisLabelsWidth,yLabelsCoords:t.layout.yLabelsCoords,yTitleCoords:t.layout.yTitleCoords}}}setDimensionsForAxisCharts(){const t=this.w,e=t.globals,s=this.dimYAxis.getyAxisLabelsCoords(),i=this.dimYAxis.getyAxisTitleCoords();e.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),t.layout.yLabelsCoords=[],t.layout.yTitleCoords=[],t.config.yaxis.map((f,u)=>{t.layout.yLabelsCoords.push({width:s[u].width,index:u}),t.layout.yTitleCoords.push({width:i[u].width,index:u})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();const a=this.dimXAxis.getxAxisLabelsCoords(),n=this.dimXAxis.getxAxisGroupLabelsCoords(),r=this.dimXAxis.getxAxisTitleCoords();
27this.conditionalChecksForAxisCoords(a,r,n),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=-1*(parseInt(t.config.xaxis.labels.style.fontSize,10)/1.5)),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-r.height,t.layout.xAxisGroupLabelsHeight=t.layout.xAxisLabelsHeight-a.height,t.layout.xAxisLabelsWidth=this.xAxisWidth,t.layout.xAxisHeight=this.xAxisHeight;let c=10;(t.config.chart.type==="radar"||this.isSparkline)&&(o=0,l=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||t.config.chart.type==="treemap")&&(o=0,l=0,c=0),!this.isSparkline&&t.config.chart.type!=="treemap"&&this.dimXAxis.additionalPaddingXLabels(a);const h=()=>{t.layout.translateX=o+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-this.lgRect.height-l-(!this.isSparkline&&t.config.chart.type!=="treemap"?t.layout.rotateXLabels?10:15:0),t.layout.gridWidth=e.svgWidth-o-this.datalabelsCoords.width*2};switch(t.config.xaxis.position==="top"&&(c=t.layout.xAxisHeight-t.config.xaxis.axisTicks.height-5),t.config.legend.position){case"bottom":t.layout.translateY=c,h();break;case"top":t.layout.translateY=this.lgRect.height+c,h();break;case"left":t.layout.translateY=c,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-this.datalabelsCoords.width*2;break;case"right":t.layout.translateY=c,t.layout.translateX=o+this.datalabelsCoords.width,t.layout.gridHeight=e.svgHeight-l-12,t.layout.gridWidth=e.svgWidth-this.lgRect.width-o-this.datalabelsCoords.width*2-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(i,s),new Pe(this.w,{theme:this.theme,timeScale:this.timeScale}).setYAxisXPosition(s,i)}setDimensionsForNonAxisCharts(){const t=this.w,e=t.globals,s=t.config;let i=0;if(t.config.legend.show&&!t.config.legend.floating&&(i=20),s.chart.type==="unit"){const o=s.legend.show&&!s.legend.floating,l=s.legend.position;let c=0,h=0;o&&(l==="bottom"||l==="top"?c=this.lgRect.height:h=this.lgRect.width+i),t.layout.gridWidth=e.svgWidth-h,t.layout.gridHeight=e.svgHeight-c,t.layout.translateX=l==="left"?h:0,t.layout.translateY=l==="top"?c:0;return}const a=s.chart.type==="sunburst"?"sunburst":s.chart.type==="pie"||s.chart.type==="polarArea"||s.chart.type==="donut"?"pie":"radialBar",n=s.plotOptions[a].offsetY,r=s.plotOptions[a].offsetX;if(!s.legend.show||s.legend.floating){t.layout.gridHeight=e.svgHeight;const o=t.dom.elWrap.getBoundingClientRect().width;t.layout.gridWidth=Math.min(o,t.layout.gridHeight),t.layout.translateY=n,t.layout.translateX=r+(e.svgWidth-t.layout.gridWidth)/2;return}switch(s.legend.position){case"bottom":t.layout.gridHeight=e.svgHeight-this.lgRect.height,t.layout.gridWidth=e.svgWidth,t.layout.translateY=n-10,t.layout.translateX=r+(e.svgWidth-t.layout.gridWidth)/2;break;case"top":t.layout.gridHeight=e.svgHeight-this.lgRect.height,t.layout.gridWidth=e.svgWidth,t.layout.translateY=this.lgRect.height+n+10,t.layout.translateX=r+(e.svgWidth-t.layout.gridWidth)/2;break;case"left":t.layout.gridWidth=e.svgWidth-this.lgRect.width-i,t.layout.gridHeight=s.chart.height!=="auto"?e.svgHeight:t.layout.gridWidth,t.layout.translateY=n,t.layout.translateX=r+this.lgRect.width+i;break;case"right":t.layout.gridWidth=e.svgWidth-this.lgRect.width-i-5,t.layout.gridHeight=s.chart.height!=="auto"?e.svgHeight:t.layout.gridWidth,t.layout.translateY=n,t.layout.translateX=r+10;break;default:throw new Error("Legend position not supported")}}conditionalChecksForAxisCoords(t,e,s){const i=this.w,a=i.labelData.hasXaxisGroups?2:1,n=s.height+t.height+e.height,r=i.axisFlags.isMultiLineX?1.2:zi,o=i.layout.rotateXLabels?22:10,c=i.layout.rotateXLabels&&i.config.legend.position==="bottom"?10:0;this.xAxisHeight=n*r+a*o+c,this.xAxisWidth=t.width,this.xAxisHeight-e.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeight<i.config.xaxis.labels.minHeight&&(this.xAxisHeight=i.config.xaxis.labels.minHeight),i.config.xaxis.floating&&(this.xAxisHeight=0);let h=0,d=0;i.config.yaxis.forEach(f=>{h+=f.labels.minWidth,d+=f.labels.maxWidth}),this.yAxisWidth<h&&(this.yAxisWidth=h),this.yAxisWidth>d&&(this.yAxisWidth=d)}}const de=1e3,fe=60*de,ue=60*fe,ae=24*ue,ci=7*ae,je=30*ae,Bt=365*ae,Rn=10/(1440*60),Ze=[{unit:"second",step:1,approxMs:de},{unit:"second",step:5,approxMs:5*de},{unit:"second",step:15,approxMs:15*de},{unit:"second",step:30,approxMs:30*de},{unit:"minute",step:1,approxMs:fe},{unit:"minute",step:5,approxMs:5*fe},{unit:"minute",step:15,approxMs:15*fe},{unit:"minute",step:30,approxMs:30*fe},{unit:"hour",step:1,approxMs:ue},{unit:"hour",step:3,approxMs:3*ue},{unit:"hour",step:6,approxMs:6*ue},{unit:"hour",step:12,approxMs:12*ue},{unit:"day",step:1,approxMs:ae},{unit:"day",step:2,approxMs:2*ae},{unit:"week",step:1,approxMs:ci},{unit:"week",step:2,approxMs:2*ci},{unit:"month",step:1,approxMs:je},{unit:"month",step:3,approxMs:3*je},{unit:"month",step:6,approxMs:6*je},{unit:"year",step:1,approxMs:Bt},{unit:"year",step:2,approxMs:2*Bt},{unit:"year",step:5,approxMs:5*Bt},{unit:"year",step:10,approxMs:10*Bt},{unit:"year",step:25,approxMs:25*Bt},{unit:"year",step:50,approxMs:50*Bt},{unit:"year",step:100,approxMs:100*Bt}],na=10;class Tn{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 s=this.w;if(s.globals.allSeriesCollapsed)return s.labelData.labels=[],s.labelData.timescaleLabels=[],this.timeScaleArray=[],[];const i=e-t,a=i/ae;s.interact.disableZoomIn=!1,s.interact.disableZoomOut=!1,a<Rn?s.interact.disableZoomIn=!0:a>5e4&&(s.interact.disableZoomOut=!0);const n=Number.isFinite(s.config.xaxis.tickAmount)?s.config.xaxis.tickAmount:na;this.tickInterval=Pn(i,n);const r=this.generateBaseTicks(t,e,this.tickInterval);return this.timeScaleArray=r,r}generateBaseTicks(t,e,s){const i=this.w,a=new xt(i),n=this.utc,r=i.layout.gridWidth,o=e-t,l=[];let c=a.ceilToBoundary(t,s.unit,s.step,n),h=0;const d=5e3;for(;c<=e&&h<d;){const f=a.getDateFields(c,n),u=o>0?(c-t)/o*r:0;l.push({timestamp:c,position:u,unit:s.unit,year:f.year,month:f.month+1,day:f.date,hour:f.hour,minute:f.minute,second:f.second,value:c}),c=a.addInterval(c,s.unit,s.step,n),h++}return l}recalcDimensionsBasedOnFormat(t){const e=this.w,s=this.formatDates(t),i=this.removeOverlappingTS(s);e.labelData.timescaleLabels=i.slice();const n=new Fe(this.w,this.ctx).plotCoords();this.ctx._writeLayoutCoords(n.layout)}formatDates(t){const e=this.w,s=new xt(e),i=e.config.xaxis.labels.format,a=e.config.xaxis.labels.datetimeFormatter,n=this.utc,r=(l,c=2)=>String(l).padStart(c,"0"),o=i||this._effectiveFormat(t,a);return t.map(l=>{const c=s.getDate(l.timestamp),h=s.formatDate(c,o);return{dateString:`${l.year}-${r(l.month)}-${r(l.day)}T${r(l.hour)}:${r(l.minute)}:${r(l.second)}.000${n?"Z":""}`,position:l.position,value:h,unit:l.unit,year:l.year,month:l.month}})}_effectiveFormat(t,e){if(t.length===0)return e.day||"dd MMM";const s=this.tickInterval&&this.tickInterval.unit||t[0].unit,i=e[s==="week"?"day":s]||e.day||"dd MMM",a=t[0],n=t[t.length-1],r=a.year!==n.year,l=r||a.month!==n.month||a.day!==n.day,c=/y/i.test(i),h=/M/.test(i),d=/d/i.test(i);return s==="month"||s==="week"||s==="day"?r&&!c?i+" yyyy":i:(s==="hour"||s==="minute"||s==="second")&&l&&!d&&!h?(r?"dd MMM yyyy":"dd MMM")+" "+i:i}removeOverlappingTS(t){if(t.length===0)return[];const e=this.w,s=new I(e);let i=!1,a;t[0].value&&t.every(o=>o.value.length===t[0].value.length)&&(i=!0,a=s.getTextRects(t[0].value,e.config.xaxis.labels.style.fontSize).width);let n=0;return t.map((o,l)=>{if(l===0||!e.config.xaxis.labels.hideOverlappingLabels)return o;const c=i?a:s.getTextRects(t[n].value,e.config.xaxis.labels.style.fontSize).width,h=t[n].position;return o.position>h+c+10?(n=l,o):null}).filter(o=>o!==null)}}function Pn(x,t){if((!Number.isFinite(t)||t<=0)&&(t=na),x<=0)return Ze[0];const e=x/t;let s=Ze[0],i=1/0;for(const a of Ze){const n=Math.abs(Math.log(a.approxMs/e));n<i&&(i=n,s=a)}return s}const us="__apexcharts_registry__",gs="__apexcharts_custom_types__";globalThis[us]||(globalThis[us]={});globalThis[gs]||(globalThis[gs]=new Set);function Oe(){return globalThis[us]}function Ps(){return globalThis[gs]}function Fn(x){Ps().add(x)}function Tt(x){return Ps().has(x)}function Xn(x){return!!Oe()[x]}function In(x){delete Oe()[x],Ps().delete(x)}function hi(x){Object.assign(Oe(),x)}function ht(x){const t=Oe()[x];if(!t)throw new Error(`ApexCharts: chart type "${x}" is not registered. Import it via ApexCharts.use() or use the full apexcharts bundle.`);return t}class Nn{constructor(t,e,s){this.w=e,this.ctx=s,this.el=t}setupElements(){const{globals:t,config:e}=this.w,s=e.chart.type,i=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","violin","scatter","bubble"],a=[...i,"radar","heatmap","treemap"],n=!a.includes(s)&&!["pie","donut","polarArea","radialBar"].includes(s)&&Tt(s);t.axisCharts=a.includes(s)||n,t.xyCharts=i.includes(s)||n,t.isBarHorizontal=["bar","rangeBar","boxPlot","violin"].includes(s)&&e.plotOptions.bar.horizontal,t.chartClass=`.apexcharts${t.chartID}`,this.w.dom.baseEl=this.el,this.w.dom.elWrap=B.createElementNS("http://www.w3.org/1999/xhtml","div"),I.setAttrs(this.w.dom.elWrap,{id:t.chartClass.substring(1),class:`apexcharts-canvas ${t.chartClass.substring(1)}`}),this.el.appendChild(this.w.dom.elWrap);const r=globalThis.SVG;if(this.w.dom.Paper=r().addTo(this.w.dom.elWrap),this.w.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:`translate(${e.chart.offsetX}, ${e.chart.offsetY})`}),this.w.dom.Paper.node.style.background=e.theme.mode==="dark"&&!e.chart.background?"#343A3F":e.theme.mode==="light"&&!e.chart.background?"#fff":e.chart.background,this.setSVGDimensions(),this.w.dom.elLegendForeign=B.createElementNS(tt,"foreignObject"),I.setAttrs(this.w.dom.elLegendForeign,{x:0,y:0,width:t.svgWidth,height:t.svgHeight}),this.w.dom.elLegendWrap=B.createElementNS("http://www.w3.org/1999/xhtml","div"),this.w.dom.elLegendWrap.classList.add("apexcharts-legend"),this.w.dom.elWrap.appendChild(this.w.dom.elLegendWrap),this.w.dom.Paper.node.appendChild(this.w.dom.elLegendForeign),e.chart.accessibility.enabled&&e.chart.accessibility.announcements.enabled){const o=B.createElement("div");o.className="apexcharts-sr-status",o.setAttribute("role","status"),o.setAttribute("aria-live","polite"),o.setAttribute("aria-atomic","true"),this.w.dom.elWrap.appendChild(o)}if(e.chart.accessibility.enabled){const o=this.getAccessibleChartLabel(),l=e.chart.accessibility.keyboard.enabled&&e.chart.accessibility.keyboard.navigation.enabled?"application":"img";if(this.w.dom.Paper.attr({role:l,"aria-label":o}),e.chart.accessibility.description){const c=B.createElementNS(tt,"desc");c.textContent=e.chart.accessibility.description,this.w.dom.Paper.node.insertBefore(c,this.w.dom.elLegendForeign.nextSibling)}}this.w.dom.elGraphical=this.w.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}
27),this.w.dom.elDefs=this.w.dom.Paper.defs(),this.w.dom.Paper.add(this.w.dom.elGraphical),this.w.dom.elGraphical.add(this.w.dom.elDefs)}_classifySeriesByType(t){const{w:e}=this,{config:s,globals:i}=e,a={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},violin:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},n={},r=s.chart.type||"line";let o=null,l=0;return this.w.seriesData.series.forEach((c,h)=>{var d,f;const u=((d=t[h])==null?void 0:d.type)==="column"?"bar":((f=t[h])==null?void 0:f.type)||(r==="column"?"bar":r),g=a;g[u]?(u==="rangeArea"?(g[u].series.push(this.w.rangeData.seriesRangeStart[h]),g[u].seriesRangeEnd.push(this.w.rangeData.seriesRangeEnd[h])):g[u].series.push(c),g[u].i.push(h),u==="bar"&&(e.globals.columnSeries=a.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar","unit","sunburst"].includes(u)?o=u:Tt(u)?(n[u]||(n[u]={series:[],i:[]}),n[u].series.push(c),n[u].i.push(h)):console.warn(`You have specified an unrecognized series type (${u}).`),r!==u&&u!=="scatter"&&l++}),l>0&&(o&&console.warn(`Chart or series type ${o} cannot appear with other chart or series types.`),a.bar.series.length>0&&s.plotOptions.bar.horizontal&&(l-=a.bar.series.length,a.bar={series:[],i:[]},e.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),i.comboCharts||(i.comboCharts=l>0),{seriesTypes:a,customBuckets:n}}plotChartType(t,e){const{w:s,ctx:i}=this,a=i.renderer&&i.renderer.kind==="canvas";a&&i.renderer.beginSeries();const{seriesTypes:n,customBuckets:r}=this._classifySeriesByType(t),o=this._instantiateSeriesRenderers(n,e),l=this._assembleSeriesGraphics(n,r,o,e);if(a){const c=i.renderer;if(c&&c._repaintHostInPlace){c._repaintHostInPlace=!1;const d=this.w.dom.elGraphical.node.querySelector(".apexcharts-canvas-series-wrap");if(d&&c.canRepaintInPlace&&c.canRepaintInPlace())return c.repaintInPlace(),(Array.isArray(l)?l:[l]).forEach(u=>{u&&u.node&&d.appendChild(u.node)}),[]}const h=i.renderer.present();if(h){const d=new I(s).group({class:"apexcharts-canvas-series-wrap"});return d.add(h),(Array.isArray(l)?l:[l]).forEach(u=>{u&&d.add(u)}),d}}return l}_instantiateSeriesRenderers(t,e){const{w:s,ctx:i}=this,{config:a,globals:n}=s,o=t.line.series.length>0||t.area.series.length>0||t.scatter.series.length>0||t.bubble.series.length>0||t.rangeArea.series.length>0||!n.comboCharts&&["line","area","scatter","bubble","rangeArea"].includes(a.chart.type)?new(ht("line"))(i.w,i,e):null,c=t.candlestick.series.length>0||t.boxPlot.series.length>0||!n.comboCharts&&["candlestick","boxPlot"].includes(a.chart.type)?new(ht("candlestick"))(i.w,i,e):null,d=t.violin.series.length>0||!n.comboCharts&&a.chart.type==="violin"?new(ht("violin"))(i.w,i,e):null,f=!n.comboCharts&&["pie","donut","polarArea"].includes(a.chart.type);i.pie=f?new(ht("pie"))(i.w,i):null;const u=t.rangeBar.series.length>0||!n.comboCharts&&a.chart.type==="rangeBar";return i.rangeBar=u?new(ht("rangeBar"))(i.w,i,e):null,{line:o,boxCandlestick:c,violin:d}}_assembleSeriesGraphics(t,e,s,i){const{w:a,ctx:n}=this,{config:r,globals:o}=a,{line:l,boxCandlestick:c,violin:h}=s;let d=[];if(o.comboCharts){const f=new rt(this.w);if(t.area.series.length>0&&d.push(...f.drawSeriesByGroup(t.area,o.areaGroups,"area",l)),t.bar.series.length>0)if(r.chart.stacked){const u=new(ht("barStacked"))(n.w,n,i);d.push(u.draw(t.bar.series,t.bar.i))}else n.bar=new(ht("bar"))(n.w,n,i),d.push(n.bar.draw(t.bar.series,t.bar.i));if(t.rangeArea.series.length>0&&d.push(l.draw(t.rangeArea.series,"rangeArea",t.rangeArea.i,t.rangeArea.seriesRangeEnd)),t.line.series.length>0&&d.push(...f.drawSeriesByGroup(t.line,o.lineGroups,"line",l)),t.candlestick.series.length>0&&d.push(c.draw(t.candlestick.series,"candlestick",t.candlestick.i)),t.boxPlot.series.length>0&&d.push(c.draw(t.boxPlot.series,"boxPlot",t.boxPlot.i)),t.violin.series.length>0&&d.push(h.draw(t.violin.series,"violin",t.violin.i)),t.rangeBar.series.length>0&&d.push(n.rangeBar.draw(t.rangeBar.series,t.rangeBar.i)),t.scatter.series.length>0){const u=new(ht("line"))(n.w,n,i,!0);d.push(u.draw(t.scatter.series,"scatter",t.scatter.i))}if(t.bubble.series.length>0){const u=new(ht("line"))(n.w,n,i,!0);d.push(u.draw(t.bubble.series,"bubble",t.bubble.i))}Object.keys(e).forEach(u=>{const g=e[u];if(g.series.length>0){const p=new(ht(u))(n.w,n,i);d.push(p.draw(g.series,u,g.i))}})}else{const f=r.chart.type;switch(f){case"line":d=l.draw(this.w.seriesData.series,"line");break;case"area":d=l.draw(this.w.seriesData.series,"area");break;case"bar":r.chart.stacked?d=new(ht("barStacked"))(n.w,n,i).draw(this.w.seriesData.series):(n.bar=new(ht("bar"))(n.w,n,i),d=n.bar.draw(this.w.seriesData.series));break;case"candlestick":d=c.draw(this.w.seriesData.series,"candlestick");break;case"boxPlot":d=c.draw(this.w.seriesData.series,f);break;case"violin":d=h.draw(this.w.seriesData.series,"violin");break;case"rangeBar":d=n.rangeBar.draw(this.w.seriesData.series);break;case"rangeArea":d=l.draw(this.w.rangeData.seriesRangeStart,"rangeArea",void 0,this.w.rangeData.seriesRangeEnd);break;case"heatmap":{d=new(ht("heatmap"))(n.w,n,i).draw(this.w.seriesData.series);break}case"treemap":{d=new(ht("treemap"))(n.w,n).draw(this.w.seriesData.series);break}case"unit":{d=new(ht("unit"))(n.w,n).draw(this.w.seriesData.series);break}case"sunburst":{d=new(ht("sunburst"))(n.w,n).draw(this.w.seriesData.series);break}case"pie":case"donut":case"polarArea":d=n.pie.draw(this.w.seriesData.series);break;case"radialBar":{d=new(ht("radialBar"))(n.w,n).draw(this.w.seriesData.series);break}case"radar":{d=new(ht("radar"))(n.w,n).draw(this.w.seriesData.series);break}default:Tt(f)?d=new(ht(f))(n.w,n,i).draw(this.w.seriesData.series,f):d=l.draw(this.w.seriesData.series)}}return d}_extractDimensionUnit(t){return String(t).split(/[0-9]+/g).pop()}setSVGDimensions(){var t;const{globals:e,config:s}=this.w;s.chart.width=s.chart.width||"100%",s.chart.height=s.chart.height||"auto";const i=s.chart.width,a=s.chart.height;e.svgWidth=NaN,e.svgHeight=NaN;let n=R.getDimensions(this.el);const r=this._extractDimensionUnit(i);r==="%"?R.isNumber(n[0])&&(n[0].width===0&&(n=R.getDimensions(this.el.parentNode)),e.svgWidth=n[0]*parseInt(i,10)/100):(r==="px"||r==="")&&(e.svgWidth=parseInt(i,10));const o=this._extractDimensionUnit(a);if(a!=="auto"&&a!=="")if(o==="%"){const l=R.getDimensions(this.el.parentNode);e.svgHeight=l[1]*parseInt(a,10)/100}else e.svgHeight=parseInt(a,10);else e.svgHeight=e.axisCharts?e.svgWidth/1.61:e.svgWidth/1.2;if(e.svgWidth=Math.max(e.svgWidth,0),e.svgHeight=Math.max(e.svgHeight,0),I.setAttrs(this.w.dom.Paper.node,{width:e.svgWidth,height:e.svgHeight}),o!=="%"&&H.isBrowser()){const l=e.axisCharts&&(s.grid.show||s.dataLabels.enabled||s.xaxis.labels.show||s.xaxis.axisBorder.show||s.xaxis.axisTicks.show||s.yaxis.some(d=>d.show&&(d.labels.show||d.axisBorder.show||d.axisTicks.show))),c=s.chart.sparkline.enabled||!l?0:s.chart.parentHeightOffset,h=this.w.dom.Paper.node;(t=h.parentNode)!=null&&t.parentNode&&(h.parentNode.parentNode.style.minHeight=`${e.svgHeight+c}px`)}this.w.dom.elWrap.style.width=`${e.svgWidth}px`,this.w.dom.elWrap.style.height=`${e.svgHeight}px`,e.lastResizeSignature=this.getResizeSignature()}getResizeSignature(){const{config:t}=this.w,e=(t.chart.width||"100%").toString().trim(),s=(t.chart.height||"auto").toString().trim();let i=0,a=0;if(e.endsWith("%")){let r=R.getDimensions(this.el);r[0]||(r=R.getDimensions(this.el.parentNode)),i=r[0]||0}s.endsWith("%")&&(a=R.getDimensions(this.el.parentNode)[1]||0);const n={w:Math.round(i),h:Math.round(a)};return t.responsive&&t.responsive.length&&H.isBrowser()&&(n.iw=window.innerWidth),n}shiftGraphPosition(){const{globals:t}=this.w,{translateY:e,translateX:s}=t;I.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${s}, ${e})`})}resizeNonAxisCharts(){var t,e,s,i,a,n,r,o;const{w:l}=this,c=l.config.chart.height?String(l.config.chart.height):"",h=c!==""&&c!=="auto",d=c.includes("%");let f=0,u=l.config.chart.sparkline.enabled?1:15;u+=l.config.grid.padding.bottom,["top","bottom"].includes(l.config.legend.position)&&l.config.legend.show&&!l.config.legend.floating&&(f=((e=(t=this.ctx.legend)==null?void 0:t.legendHelpers.getLegendDimensions().clwh)!=null?e:0)+
277);const g=l.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),p=l.globals.pieExternalLabelMarginY||0;let b=p>0?l.globals.radialSize*2+p*2:l.globals.radialSize*2.05;const m=Math.abs(l.config.plotOptions.radialBar.endAngle-l.config.plotOptions.radialBar.startAngle);if(g&&!l.config.chart.sparkline.enabled&&m<360){const v=R.getBoundingClientRect(this.w.dom.Paper.node);let y=1/0,w=-1/0;const _=D=>{var T,F,P,Y;if((T=D.classList)!=null&&T.contains("apexcharts-radialbar-hollow"))return;const z=(P=(F=D.tagName)==null?void 0:F.toLowerCase)==null?void 0:P.call(F);if(z==="text"||z==="tspan")return;const W=Array.from((Y=D.children)!=null?Y:[]);if(W.length>0){W.forEach(X=>_(X));return}const O=R.getBoundingClientRect(D);if(O.bottom-O.top>0){const X=O.top-v.top,V=O.bottom-v.top;X<y&&(y=X),V>w&&(w=V)}};Array.from((s=g.children)!=null?s:[]).forEach(D=>_(D)),Number.isFinite(y)||(y=0),Number.isFinite(w)||(w=R.getBoundingClientRect(g).bottom-v.top);const C=Math.max(u,l.globals.radialSize*.2),S=Math.max(C-y,0);S!==0&&(l.layout.translateY=((i=l.layout.translateY)!=null?i:0)+S,I.setAttrs(this.w.dom.elGraphical.node,{transform:`translate(${(a=l.layout.translateX)!=null?a:0}, ${l.layout.translateY})`}),w+=S),b=w>0?w:l.globals.radialSize*2.05;const k=Math.max(C,y),M=Math.ceil(b+f+k),L=(n=l.config.chart.offsetY)!=null?n:0,E=M+Math.max(L,0);if(!d&&(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(E)),this.w.dom.elWrap.style.height=`${E}px`,I.setAttrs(this.w.dom.Paper.node,{height:M}),H.isBrowser())){const D=(r=this.w.dom.Paper.node.parentNode)==null?void 0:r.parentNode;D&&(D.style.minHeight=`${E}px`)}return}const A=Math.ceil(b+this.w.layout.translateY+f+u);if(!h&&(this.w.dom.elLegendForeign&&this.w.dom.elLegendForeign.setAttribute("height",String(A)),this.w.dom.elWrap.style.height=`${A}px`,I.setAttrs(this.w.dom.Paper.node,{height:A}),H.isBrowser())){const v=(o=this.w.dom.Paper.node.parentNode)==null?void 0:o.parentNode;v&&(v.style.minHeight=`${A}px`)}}coreCalculations(){new cs(this.w).init()}resetGlobals(){const t=()=>this.w.config.series.map(()=>[]),e=new Wi,{globals:s}=this.w,i={dataWasParsed:this.w.axisFlags.dataWasParsed,originalSeries:s.originalSeries};e.initGlobalVars(s),s.seriesXvalues=t(),s.seriesYvalues=t(),i.dataWasParsed&&(this.w.axisFlags.dataWasParsed=i.dataWasParsed,s.originalSeries=i.originalSeries)}isMultipleY(){return Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1?(this.w.globals.isMultipleYAxis=!0,!0):!1}xySettings(){const{w:t}=this;let e=null;if(t.globals.axisCharts){if(t.config.xaxis.crosshairs.position==="back"&&new ds(this.w).drawXCrosshairs(),t.config.yaxis[0].crosshairs.position==="back"&&new ds(this.w).drawYCrosshairs(),t.config.xaxis.type==="datetime"&&t.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new Tn(this.w,this.ctx);let i=[];isFinite(t.globals.minX)&&isFinite(t.globals.maxX)&&!t.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minX,t.globals.maxX):t.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(t.globals.minY,t.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}e=new rt(this.w).getCalculatedRatios()}return e}updateSourceChart(t){this.ctx.w.interact.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}setupBrushHandler(){const{ctx:t,w:e}=this;if(e.config.chart.brush.enabled&&typeof e.config.chart.events.selection!="function"){const s=Array.isArray(e.config.chart.brush.targets)?e.config.chart.brush.targets:[e.config.chart.brush.target];s.forEach(i=>{const a=t.constructor.getChartByID(i);if(!a){console.warn(`ApexCharts: brush target "${i}" was not found. Ensure the target chart is rendered (and its chart.id matches) before the brush chart.`);return}a.w.globals.brushSource=this.ctx,typeof a.w.config.chart.events.zoomed!="function"&&(a.w.config.chart.events.zoomed=()=>this.updateSourceChart(a)),typeof a.w.config.chart.events.scrolled!="function"&&(a.w.config.chart.events.scrolled=()=>this.updateSourceChart(a))}),e.config.chart.events.selection=(i,a)=>
27{s.forEach(n=>{const r=t.constructor.getChartByID(n);r&&r.ctx.updateHelpers._updateOptions({xaxis:{min:a.xaxis.min,max:a.xaxis.max}},!1,!1,!1,!1)})}}}getAccessibleChartLabel(){const t=this.w,e=t.config;if(e.chart.accessibility&&e.chart.accessibility.description)return e.chart.accessibility.description;const s=e.chart.type,i=[];if(e.title.text)i.push(`${e.title.text}. ${s} chart`),e.subtitle.text&&i.push(e.subtitle.text);else{const a=Array.isArray(t.seriesData.seriesNames)&&t.seriesData.seriesNames.length?t.seriesData.seriesNames.filter(Boolean):Array.isArray(e.series)?e.series.map(r=>typeof r=="object"&&r!==null?r.name:null).filter(Boolean):[],n=t.seriesData.series.length||(e.series?e.series.length:0);a.length?i.push(`${s} chart with ${n} data series: ${a.join(", ")}`):i.push(`${s} chart with ${n} data series`)}return i.join(". ")}}class yt{constructor(t,{resetGlobals:e=()=>{},isMultipleY:s=()=>{}}={}){this.w=t,this.resetGlobals=e,this.isMultipleY=s,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new rt(this.w),this.activeSeriesIndex=0}getFirstDataPoint(){const t=this.w.config.series,e=new nt(this.w);this.activeSeriesIndex=e.getActiveConfigSeriesIndex();const s=t[this.activeSeriesIndex];return s&&s.data&&s.data.length>0&&s.data[0]!==null&&typeof s.data[0]<"u"?s.data[0]:null}isMultiFormat(){return this.isFormatXY()||this.isFormat2DArray()}isFormatXY(){var t;const e=this.getFirstDataPoint();if(!e||typeof e.x>"u")return!1;const s=(t=this.w.config.series[this.activeSeriesIndex])==null?void 0:t.data;if(s){const i=a=>a&&typeof a.x<"u";for(let a=1;a<Math.min(3,s.length);a++)if(i(s[a])!==!0){console.warn(`ApexCharts: series data has mixed formats starting at index ${a}`);break}}return!0}isFormat2DArray(){const t=this.getFirstDataPoint();return t&&Array.isArray(t)}_fast2DArrayParse(t,e){var s,i;const a=t.length;if(a===0)return!1;const n=new Array(a),r=new Array(a);let o=-Number.MAX_VALUE,l=Number.MAX_VALUE,c=1/0,h=!1,d=0,f=!0,u=1/0,g=-1/0,p=!0,b=1/0,m=NaN;for(let v=0;v<a;v++){const y=t[v];if(!Array.isArray(y)||y.length>2)return!1;const w=y[0],_=y[1];if(f)if(typeof w=="number"){w===w&&(w<u&&(u=w),w>g&&(g=w));const C=w-m;C>0?C<b&&(b=C):C<0&&(p=!1),m=w}else f=!1;if(typeof _=="number")if(_===_&&_!==1/0&&_!==-1/0){if(_>o&&(o=_),_<l&&(l=_),_<0&&_<c&&(c=_),!Number.isInteger(_)){const C=_<0?-_:_;if(C>=1e-6&&C<1e21){const S=""+_,k=S.indexOf("."),M=k===-1?0:S.length-k-1;M>d&&(d=M)}else{const S=R.noExponents(_);R.isFloat(S)&&(d=Math.max(d,S.toString().split(".")[1].length))}}}else h=!0;else if(_===null)h=!0;else return!1;n[v]=_,r[v]=w}this.twoDSeries=n,this.twoDSeriesX=r,this.w.axisFlags.dataFormatXNumeric=!0;const A=(i=(s=this.w.seriesData)._parsedExtrema)!=null?i:s._parsedExtrema=[];return A[e]={ref:n,len:a,maxY:o,lowestY:l,negMinY:c,hasNulls:h,yDec:d,xref:r,xNumeric:f,minX:u,maxX:g,xSorted:p,minXDiff:b},!0}handleFormat2DArray(t,e){const s=this.w.config,i=t[e].data,a=s.chart.type==="boxPlot"||s.series[e].type==="boxPlot";if(!(!a&&s.xaxis.type!=="datetime"&&this._fast2DArrayParse(i,e)))for(let n=0;n<i.length;n++){const r=i[n],o=r[0],l=r[1],c=r[2];if(typeof l<"u"&&(Array.isArray(l)&&l.length===4&&!a?this.twoDSeries.push(R.parseNumber(l[3])):r.length>=5?this.twoDSeries.push(R.parseNumber(r[4])):this.twoDSeries.push(R.parseNumber(l)),this.w.axisFlags.dataFormatXNumeric=!0),s.xaxis.type==="datetime"){const h=new Date(o).getTime();this.twoDSeriesX.push(h)}else this.twoDSeriesX.push(o);typeof c<"u"&&(this.threeDSeries.push(c),this.w.axisFlags.isDataXYZ=!0)}}handleFormatXY(t,e){const s=this.w.config,i=this.w.globals,a=new xt(this.w),n=t[e].data;let r=e;i.collapsedSeriesIndices.indexOf(e)>-1&&(r=this.activeSeriesIndex);const o=t[r].data;for(let l=0;l<n.length;l++){const c=n[l];if(typeof c.y<"u"){const h=Array.isArray(c.y)?R.parseNumber(c.y[c.y.length-1]):R.parseNumber(c.y);this.twoDSeries.push(h)}typeof this.seriesGoals[e]>"u"&&(this.seriesGoals[e]=[]),typeof c.goals<"u"&&Array.isArray(c.goals)?this.seriesGoals[e].push(c.goals):this.seriesGoals[e].push(null),typeof c.z<"u"&&(this.threeDSeries.push(c.z),this.w.axisFlags.isDataXYZ=!0)}for(let l=0;l<o.length;l++){const h=o[l].x,d=typeof h=="string",f=Array.isArray(h),u=!f&&!!a.isValidDate(h);if(d||u)if(d||s.xaxis.convertedCatToNumeric){const g=i.isBarHorizontal&&this.w.axisFlags.isRangeData;s.xaxis.type==="datetime"&&!g?this.twoDSeriesX.push(a.parseDate(h)):(this.fallbackToCategory=!0,this.twoDSeriesX.push(h),!isNaN(h)&&this.w.config.xaxis.type!=="category"&&typeof h!="string"&&(this.w.axisFlags.isXNumeric=!0))}else s.xaxis.type==="datetime"?this.twoDSeriesX.push(a.parseDate(h.toString())):(this.w.axisFlags.dataFormatXNumeric=!0,this.w.axisFlags.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(h)));else f?(this.fallbackToCategory=!0,this.twoDSeriesX.push(h)):(this.w.axisFlags.isXNumeric=!0,this.w.axisFlags.dataFormatXNumeric=!0,this.twoDSeriesX.push(h))}}handleRangeData(t,e){let s={start:[],end:[],rangeUniques:[]};return this.isFormat2DArray()?s=this.handleRangeDataFormat("array",t,e):this.isFormatXY()&&(s=this.handleRangeDataFormat("xy",t,e)),this.w.rangeData.seriesRangeStart[e]=s.start===void 0?[]:s.start,this.w.rangeData.seriesRangeEnd[e]=s.end===void 0?[]:s.end,this.w.rangeData.seriesRange[e]=s.rangeUniques,this.w.rangeData.seriesRange.forEach(i=>
27{i&&i.forEach(a=>{const n=a.y,r=n.length;if(!(r<=1))for(let o=0;o<r;o++){const l=n[o],c=l.y1,h=l.y2;for(let d=o+1;d<r;d++){const f=n[d],u=f.y1,g=f.y2;if(c<=g&&u<=h){const p=a;p.overlaps.add(l.rangeName),p.overlaps.add(f.rangeName)}}}})}),s}handleCustomRangeData(t,e,s){const i=t[e].data||[],a=[],n=[];for(let r=0;r<i.length;r++){const o=i[r];let l,c;if(typeof s=="function"){let h=s(o,r);Array.isArray(h)||(h=[h]);const d=h.map(f=>R.parseNumber(f)).filter(f=>f!==null&&!isNaN(f));l=d.length?Math.min(...d):null,c=d.length?Math.max(...d):null}else{const h=o==null?null:o.y;Array.isArray(h)?(l=R.parseNumber(h[0]),c=R.parseNumber(h[h.length-1])):l=c=R.parseNumber(h)}a.push(l),n.push(c)}this.w.rangeData.seriesRangeStart[e]=a,this.w.rangeData.seriesRangeEnd[e]=n}handleCandleStickBoxData(t,e){let s={o:[],h:[],m:[],l:[],c:[]};return this.isFormat2DArray()?s=this.handleCandleStickBoxDataFormat("array",t,e):this.isFormatXY()&&(s=this.handleCandleStickBoxDataFormat("xy",t,e)),this.w.candleData.seriesCandleO[e]=s.o,this.w.candleData.seriesCandleH[e]=s.h,this.w.candleData.seriesCandleM[e]=s.m,this.w.candleData.seriesCandleL[e]=s.l,this.w.candleData.seriesCandleC[e]=s.c,this.w.candleData.seriesBoxPoints[e]=s.points||[],s}handleViolinData(t,e){var s,i,a,n,r,o;const l=this.w,c=t[e].data,h=[],d=[],f=[],u=[],g=[];for(let p=0;p<c.length;p++){const b=c[p],m=(a=(i=(s=b?.y)==null?void 0:s.density)!=null?i:b?.[1])!=null?a:[],A=(o=(r=(n=b?.y)==null?void 0:n.points)!=null?r:b?.[2])!=null?o:[],v=[],y=[];let w=0,_=null,C=1/0,S=-1/0;for(let M=0;M<m.length;M++){const L=R.parseNumber(m[M][0]),E=R.parseNumber(m[M][1]);L===null||E===null||(v.push(L),y.push(E),E>w&&(w=E,_=L),L<C&&(C=L),L>S&&(S=L))}const k=[];for(let M=0;M<A.length;M++){const L=R.parseNumber(A[M]);L!==null&&(k.push(L),L<C&&(C=L),L>S&&(S=L))}h.push({values:v,weights:y,maxWeight:w}),d.push(k),f.push(C===1/0?0:C),u.push(S===-1/0?0:S),g.push(_!==null?_:k.length?k[Math.floor(k.length/2)]:0)}l.violinData.seriesViolinDensity[e]=h,l.violinData.seriesViolinPoints[e]=d,l.violinData.seriesViolinMin[e]=f,l.violinData.seriesViolinMax[e]=u,this.twoDSeries=g}handleRangeDataFormat(t,e,s){const i=[],a=[],n=new Map,r=[];if(e[s].data.forEach(o=>{if(!n.has(o.x)){const l={x:o.x,overlaps:new Set,y:[]};n.set(o.x,l),r.push(l)}}),t==="array")for(let o=0;o<e[s].data.length;o++)Array.isArray(e[s].data[o])?(i.push(e[s].data[o][1][0]),a.push(e[s].data[o][1][1])):(i.push(e[s].data[o]),a.push(e[s].data[o]));else if(t==="xy")for(let o=0;o<e[s].data.length;o++){const l=Array.isArray(e[s].data[o].y),c=R.randomId(),h=e[s].data[o].x,d={y1:l?e[s].data[o].y[0]:e[s].data[o].y,y2:l?e[s].data[o].y[1]:e[s].data[o].y,rangeName:c},f=this.w.globals;f.seriesRangeName||(f.seriesRangeName={}),f.seriesRangeName[s]||(f.seriesRangeName[s]={}),f.seriesRangeName[s][o]=c;const u=n.get(h);u&&u.y.push(d),i.push(d.y1),a.push(d.y2)}return{start:i,end:a,rangeUniques:r}}handleCandleStickBoxDataFormat(t,e,s){const i=this.w,a=i.config.chart.type==="boxPlot"||i.config.series[s].type==="boxPlot",n=[],r=[],o=[],l=[],c=[],h=[],d=e[s].data;let f;if(t==="array"){const u=d[0];a&&u&&u.length===6||!a&&u&&u.length===5?f=p=>p.slice(1):f=p=>Array.isArray(p[1])?p[1]:[]}else f=u=>Array.isArray(u.y)?u.y:[];for(let u=0;u<d.length;u++){const g=f(d[u]);g&&g.length>=2&&(n.push(g[0]),r.push(g[1]),a?(o.push(g[2]),l.push(g[3]),c.push(g[4])):(l.push(g[2]),c.push(g[3])));const p=d[u]&&d[u].points;h.push(Array.isArray(p)?p:[])}return{o:n,h:r,m:o,l,c,points:h}}parseDataAxisCharts(t){var e,s,i,a,n,r;const o=this.w.config,l=this.w.globals,c=new xt(this.w);this.w.seriesData._parsedExtrema=[];const h=o.labels.length>0?o.labels.slice():o.xaxis.categories.slice();this.w.axisFlags.isRangeBar=o.chart.type==="rangeBar"&&l.isBarHorizontal,this.w.labelData.hasXaxisGroups=o.xaxis.type==="category"&&o.xaxis.group.groups.length>0,this.w.labelData.hasXaxisGroups&&(this.w.labelData.groups=o.xaxis.group.groups),t.forEach((g,p)=>{g.name!==void 0?this.w.seriesData.seriesNames.push(g.name):this.w.seriesData.seriesNames.push("series-"+parseInt(String(p+1),10))}),this.coreUtils.setSeriesYAxisMappings();const d=[],f=[...new Set(o.series.map(g=>g.group))];
27o.series.forEach((g,p)=>{const b=f.indexOf(g.group);d[b]||(d[b]=[]),d[b].push(this.w.seriesData.seriesNames[p])}),this.w.labelData.seriesGroups=d;const u=()=>{for(let g=0;g<h.length;g++)if(typeof h[g]=="string")if(c.isValidDate(h[g]))this.twoDSeriesX.push(c.parseDate(h[g]));else throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");else this.twoDSeriesX.push(h[g])};for(let g=0;g<t.length;g++){this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],typeof t[g].data>"u"&&(console.error("It is a possibility that you may have not included 'data' property in series."),t[g]=Z(G({},t[g]),{data:[]}));const p=o.chart.dataReducer,b=(s=(e=l.dataReducerRawSeries)==null?void 0:e[g])==null?void 0:s.data;if(p?.enabled&&this.isMultiFormat()&&Array.isArray(b)&&b.length>((i=p.threshold)!=null?i:500)){const A=(a=p.targetPoints)!=null?a:250,v=o.xaxis.min,y=o.xaxis.max,w=v==null&&y==null?b:yt.sliceByXRange(b,v,y);let _=w;if(w.length>A){const C=Array.isArray(w[0])?(r=w[0])==null?void 0:r[1]:(n=w[0])==null?void 0:n.y;Array.isArray(C)?C.length===4?_=yt.ohlcAggregate(w,A):C.length===2&&(_=yt.rangeAggregate(w,A)):_=yt.lttbDownsample(w,A)}t[g]=Z(G({},t[g]),{data:_})}(o.chart.type==="rangeBar"||o.chart.type==="rangeArea"||t[g].type==="rangeBar"||t[g].type==="rangeArea")&&(this.w.axisFlags.isRangeData=!0,this.handleRangeData(t,g));const m=t[g].type||o.chart.type;if(Tt(m)){const A=ht(m),v=A&&A.yExtent;(A&&A.dataType==="rangeXY"||typeof v=="function")&&(this.w.axisFlags.isRangeData=!0,this.handleCustomRangeData(t,g,v))}if(this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(t,g):this.isFormatXY()&&this.handleFormatXY(t,g),(o.chart.type==="candlestick"||t[g].type==="candlestick"||o.chart.type==="boxPlot"||t[g].type==="boxPlot")&&this.handleCandleStickBoxData(t,g),(o.chart.type==="violin"||t[g].type==="violin")&&this.handleViolinData(t,g),this.w.seriesData.series.push(this.twoDSeries),this.w.labelData.labels.push(this.twoDSeriesX),this.w.seriesData.seriesX.push(this.twoDSeriesX),this.w.seriesData.seriesGoals=this.seriesGoals,g===this.activeSeriesIndex&&!this.fallbackToCategory&&(this.w.axisFlags.isXNumeric=!0);else{o.xaxis.type==="datetime"?(this.w.axisFlags.isXNumeric=!0,u(),this.w.seriesData.seriesX.push(this.twoDSeriesX)):o.xaxis.type==="numeric"&&(this.w.axisFlags.isXNumeric=!0,h.length>0&&(this.twoDSeriesX=h,this.w.seriesData.seriesX.push(this.twoDSeriesX))),this.w.labelData.labels.push(this.twoDSeriesX);
27const A=t[g].data.map(v=>R.parseNumber(v));this.w.seriesData.series.push(A)}this.w.seriesData.seriesZ.push(this.threeDSeries),t[g].color!==void 0?this.w.seriesData.seriesColors.push(t[g].color):this.w.seriesData.seriesColors.push(void 0)}return this.w}parseDataNonAxisCharts(t){const e=this.w.config;this.w.seriesData.unitData=[];const s=Array.isArray(t)&&t.every(n=>typeof n=="number")&&e.labels.length>0,i=Array.isArray(t)&&t.some(n=>n&&typeof n=="object"&&n.data||n&&typeof n=="object"&&n.parsing);if(e.chart.type==="unit"&&i&&!s)return this.parseUnitSeries(t);if(s&&i&&console.warn("ApexCharts: Both old format (numeric series + labels) and new format (series objects with data/parsing) detected. Using old format for backward compatibility."),s){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=e.labels.slice();for(let n=0;n<this.w.seriesData.series.length;n++)this.w.seriesData.seriesNames[n]===void 0&&this.w.seriesData.seriesNames.push("series-"+(n+1));return this.w}if(Array.isArray(t)&&t.every(n=>typeof n=="number")){this.w.seriesData.series=t.slice(),this.w.seriesData.seriesNames=[];for(let n=0;n<this.w.seriesData.series.length;n++)this.w.seriesData.seriesNames.push(e.labels[n]||`series-${n+1}`);return this.w}const a=this.extractPieDataFromSeries(t);this.w.seriesData.series=a.values,this.w.seriesData.seriesNames=a.labels,e.chart.type==="radialBar"&&(this.w.seriesData.series=this.w.seriesData.series.map(n=>{const r=R.parseNumber(n);return r>100&&console.warn(`ApexCharts: RadialBar value ${r} > 100, consider using percentage values (0-100)`),r}));for(let n=0;n<this.w.seriesData.series.length;n++)this.w.seriesData.seriesNames[n]===void 0&&this.w.seriesData.seriesNames.push("series-"+(n+1));return this.w}parseUnitSeries(t){const e=this.w.config,s=[],i=[],a=[];return t.forEach((n,r)=>{var o;const l=n&&Array.isArray(n.data)?n.data:[];s.push(l.length);const c=n&&n.name!==void 0&&n.name!==null?n.name:void 0;i.push((o=c??e.labels[r])!=null?o:`series-${r+1}`),a.push(l.slice())}),this.w.seriesData.series=s,this.w.seriesData.seriesNames=i,this.w.seriesData.unitData=a,this.w}resetParsingFlags(){const t=this.w;t.axisFlags.dataWasParsed=!1,t.globals.originalSeries=null,t.config.series&&t.config.series.forEach(e=>{e.__apexParsed&&delete e.__apexParsed})}extractPieDataFromSeries(t){const e=[],s=[];if(!Array.isArray(t))return console.warn("ApexCharts: Expected array for series data"),{values:[],labels:[]};if(t.length===0)return console.warn("ApexCharts: Empty series array"),{values:[],labels:[]};const i=t[0];if(typeof i=="object"&&i!==null&&i.data)this.extractPieDataFromSeriesObjects(t,e,s);else return console.warn("ApexCharts: Unsupported series format for pie/donut/radialBar. Expected series objects with data property."),{values:[],labels:[]};return{values:e,labels:s}}extractPieDataFromSeriesObjects(t,e,s){t.forEach((i,a)=>{if(!i.data||!Array.isArray(i.data)){console.warn(`ApexCharts: Series ${a} has no valid data array`);return}i.data.forEach(n=>{typeof n=="object"&&n!==null?n.x!==void 0&&n.y!==void 0?(s.push(String(n.x)),e.push(R.parseNumber(n.y))):console.warn("ApexCharts: Invalid data point format for pie chart. Expected {x, y} format:",n):console.warn("ApexCharts: Expected object data point, got:",typeof n)})})}handleExternalLabelsData(t){const e=this.w.config;if(e.xaxis.categories.length>0)this.w.labelData.labels=e.xaxis.categories;else if(e.labels.length>0)this.w.labelData.labels=e.labels.slice();else if(this.fallbackToCategory){if(this.w.labelData.labels=this.w.labelData.labels[0],this.w.rangeData.seriesRange.length){this.w.rangeData.seriesRange.map(i=>{i.forEach(a=>{this.w.labelData.labels.indexOf(a.x)<0&&a.x&&this.w.labelData.labels.push(a.x)})});const s=this.w.labelData.labels;if(s.length>0&&(typeof s[0]=="number"||typeof s[0]=="string"))this.w.labelData.labels=[...new Set(s)];else{const i=new Map;for(const a of s){const n=JSON.stringify(a);i.has(n)||i.set(n,a)}this.w.labelData.labels=Array.from(i.values())}}e.xaxis.convertedCatToNumeric&&(new xe(e).convertCatToNumericXaxis(e,this.w.seriesData.seriesX[0]),this._generateExternalLabels(t))}else this._generateExternalLabels(t)}_generateExternalLabels(t){const e=this.w.globals,s=this.w.config;let i=[];if(e.axisCharts){if(this.w.seriesData.series.length>0)if(this.isFormatXY()){const a=s.series.map(r=>{const o=new Map;for(const l of r.data)o.has(l.x)||o.set(l.x,l);return Array.from(o.values())}),n=a.reduce((r,o,l,c)=>c[r].length>o.length?r:l,0);for(let r=0;r<a[n].length;r++)i.push(r+1)}else for(let a=0;a<this.w.seriesData.series[e.maxValsInArrayIndex].length;a++)i.push(a+1);this.w.seriesData.seriesX=[];for(let a=0;a<t.length;a++)this.w.seriesData.seriesX.push(i);this.w.globals.isBarHorizontal||(this.w.axisFlags.isXNumeric=!0)}if(i.length===0){i=e.axisCharts?[]:this.w.seriesData.series.map((a,n)=>n+1);for(let a=0;a<t.length;a++)this.w.seriesData.seriesX.push(i)}this.w.labelData.labels=i,s.xaxis.convertedCatToNumeric&&(this.w.labelData.categoryLabels=i.map(a=>
27s.xaxis.labels.formatter(a))),this.w.axisFlags.noLabelsProvided=!0}parseRawDataIfNeeded(t){const e=this.w.config,s=this.w.globals,i=e.parsing;if(this.w.axisFlags.dataWasParsed)return t;const a=!!(i&&(i.x||i.y||i.z)),n=t.some(o=>o.parsing&&(o.parsing.x||o.parsing.y||o.parsing.z));if(!a&&!n)return t;const r=t.map((o,l)=>{var c,h,d,f,u;if(!o.data||!Array.isArray(o.data)||o.data.length===0)return o;const g={x:((c=o.parsing)==null?void 0:c.x)||i?.x,y:((h=o.parsing)==null?void 0:h.y)||i?.y,z:((d=o.parsing)==null?void 0:d.z)||i?.z};if(!g.x&&!g.y)return o;const p=o.data[0];if(typeof p=="object"&&p!==null&&(Object.prototype.hasOwnProperty.call(p,"x")||Object.prototype.hasOwnProperty.call(p,"y"))||Array.isArray(p))return o;if(!g.x||!g.y||Array.isArray(g.y)&&g.y.length===0){const m=[];g.x||m.push("x"),(!g.y||Array.isArray(g.y)&&g.y.length===0)&&m.push("y");const A=(f=o.name)!=null?f:`series[${l}]`;return console.warn(`ApexCharts [${this.w.globals.chartID}]: "${A}" has a parseData config but is missing the '${m.join("', '")}' field specification.`,{parsing:(u=o.parsing)!=null?u:i}),o}const b=o.data.map((m,A)=>{if(typeof m!="object"||m===null)return console.warn(`ApexCharts: Series ${l}, data point ${A} is not an object, skipping parsing`),m;const v=this.getNestedValue(m,g.x);let y,w;if(Array.isArray(g.y)){const C=g.y.map(S=>this.getNestedValue(m,S));this.w.config.chart.type==="bubble"?(C.length<2&&console.warn(`ApexCharts: series[${l}] bubble chart requires parseData.y to have at least 2 fields (y and z). Got: ${JSON.stringify(g.y)}`),y=C[0]):y=C}else y=this.getNestedValue(m,g.y);g.z&&(w=this.getNestedValue(m,g.z)),v===void 0&&console.warn(`ApexCharts: Series ${l}, data point ${A} missing field '${g.x}'`),y===void 0&&console.warn(`ApexCharts: Series ${l}, data point ${A} missing field '${g.y}'`);const _={x:v,y,z:void 0};if(this.w.config.chart.type==="bubble"&&Array.isArray(g.y)&&g.y.length===2){const C=this.getNestedValue(m,g.y[1]);C!==void 0&&(_.z=C)}return w!==void 0&&(_.z=w),_});return Z(G({},o),{data:b,__apexParsed:!0})});return this.w.axisFlags.dataWasParsed=!0,s.originalSeries||(s.originalSeries=R.clone(t)),r}getNestedValue(t,e){if(!t||typeof t!="object"||!e)return;if(e.indexOf(".")===-1)return t[e];const s=e.split(".");let i=t;for(let a=0;a<s.length;a++){if(i==null||typeof i!="object")return;i=i[s[a]]}return i}expandScatterJitterData(t){var e,s;const i=this.w.config,a=i.chart.type==="scatter"||i.chart.type==="bubble",n=(s=(e=i.plotOptions)==null?void 0:e.scatter)==null?void 0:s.jitter;if(!a||!n||!n.enabled||!Array.isArray(t))return t;if(!t.some(d=>Array.isArray(d?.data)&&d.data.some(f=>f&&!Array.isArray(f)&&Array.isArray(f.y))))return i.xaxis.type!=="datetime"&&(Array.isArray(i.xaxis.categories)&&i.xaxis.categories.length?this._applyBandAxis(i.xaxis.categories.slice()):Array.isArray(i.xaxis._scatterBandLabels)&&i.xaxis._scatterBandLabels.length&&this._applyBandAxis(i.xaxis._scatterBandLabels)),t;const o=[],l=new Map;t.forEach(d=>{Array.isArray(d?.data)&&d.data.forEach(f=>{if(f&&Array.isArray(f.y)){const u=String(f.x);l.has(u)||(l.set(u,o.length),o.push(f.x))}})});const c=n.maxPoints||5e3,h=t.map(d=>{if(!Array.isArray(d?.data))return d;const f=[];return d.data.forEach(u=>{if(u&&Array.isArray(u.y)){const g=l.get(String(u.x)),p=u.y,b=p.length>c?Math.ceil(p.length/c):1;for(let m=0;m<p.length;m+=b){const A=R.parseNumber(p[m]);A!==null&&f.push({x:g,y:A})}}else if(u&&typeof u=="object"&&!Array.isArray(u)){const g=String(u.x);f.push({x:l.has(g)?l.get(g):u.x,y:u.y})}else f.push(u)}),Z(G({},d),{data:f})});return this._applyBandAxis(o),h}_applyBandAxis(t){var e;const s=this.w.config.xaxis,i=t.length;if(!i)return;const a=s._scatterBand=s._scatterBand||{};if(s._scatterBandLabels=t.slice(),s.type="numeric",(e=this.w.interact)!=null&&e.zoomed&&typeof s.min=="number"&&typeof s.max=="number"&&isFinite(s.min)&&isFinite(s.max)){const r=c=>Math.max(0,Math.min(i-1,c));let o=r(Math.round(s.min+.49)),l=r(Math.round(s.max-.49));l<o&&(o=l=r(Math.round((s.min+s.max)/2))),s.min=o-1,s.max=l+1,s.tickAmount=l-o+2,a.min=!0,a.max=!0,a.tick=!0}else(s.min==null||a.min)&&(s.min=-1,a.min=!0),(s.max==null||a.max)&&(s.max=i,a.max=!0),(s.tickAmount==null||s.tickAmount==="dataPoints"||a.tick)&&(s.tickAmount=i+1,a.tick=!0);s.labels=s.labels||{};const n=s.labels.formatter;if(typeof n!="function"||n._scatterBand){const r=(o=>{const l=Math.round(o);return Math.abs(o-l)<1e-6&&t[l]!==void 0?t[l]:""});r._scatterBand=!0,s.labels.formatter=r}}parseData(t){var e,s,i,a,n,r,o;const l=this.w,c=l.config,h=l.globals;if(t=this.parseRawDataIfNeeded(t),t=this.expandScatterJitterData(t),(e=c.chart.dataReducer)!=null&&e.enabled&&h.axisCharts&&!h.dataReducerRawSeries
27){h.dataReducerRawSeries=t.map(g=>({data:Array.isArray(g?.data)?g.data.slice():g?.data}));let f=1/0,u=-1/0;for(const g of t){const p=g?.data;if(!Array.isArray(p)||p.length===0)continue;const b=!Array.isArray(p[0]),m=b?(s=p[0])==null?void 0:s.x:(i=p[0])==null?void 0:i[0],A=b?(a=p[p.length-1])==null?void 0:a.x:(n=p[p.length-1])==null?void 0:n[0];typeof m=="number"&&(f=Math.min(f,m)),typeof A=="number"&&(u=Math.max(u,A))}f!==1/0&&(h.dataReducerRawMinX=f,h.dataReducerRawMaxX=u)}if(h.dataReducerRawSeries&&((r=c.chart.dataReducer)!=null&&r.enabled)&&(t=t.map(f=>G({},f))),c.series=t,h.dataReducerRawSeries&&((o=c.chart.dataReducer)!=null&&o.enabled)){const f=h.dataReducerRawSeries;h.initialSeries=t.map((u,g)=>{var p,b,m;return Z(G({},u),{data:(m=(b=(p=f[g])==null?void 0:p.data)==null?void 0:b.slice())!=null?m:u.data})})}else h.initialSeries=t;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.resetGlobals(),this.isMultipleY(),h.axisCharts?(this.parseDataAxisCharts(t),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(t),c.chart.stacked){const f=new nt(this.w);this.w.seriesData.series=f.setNullSeriesToZeroValues(this.w.seriesData.series)}this.coreUtils.getSeriesTotals(),h.axisCharts?(yt._defineLazyResult(this.w.seriesData,"stackedSeriesTotals",()=>this.coreUtils.getStackedSeriesTotals()),yt._defineLazyResult(this.w.seriesData,"stackedSeriesTotalsByGroups",()=>this.coreUtils.getStackedSeriesTotalsByGroups()),yt._defineLazyResult(h,"seriesPercent",()=>(this.coreUtils.getPercentSeries(),h.seriesPercent))):this.coreUtils.getPercentSeries(),!this.w.axisFlags.dataFormatXNumeric&&(!this.w.axisFlags.isXNumeric||c.xaxis.type==="numeric"&&c.labels.length===0&&c.xaxis.categories.length===0)&&this.handleExternalLabelsData(t);const d=this.coreUtils.getCategoryLabels(this.w.labelData.labels);for(let f=0;f<d.length;f++)if(Array.isArray(d[f])){this.w.axisFlags.isMultiLineX=!0;break}return{seriesData:{series:this.w.seriesData.series,seriesNames:this.w.seriesData.seriesNames,seriesX:this.w.seriesData.seriesX,seriesZ:this.w.seriesData.seriesZ,seriesColors:this.w.seriesData.seriesColors,seriesGoals:this.w.seriesData.seriesGoals,unitData:this.w.seriesData.unitData,noLabelsProvided:this.w.axisFlags.noLabelsProvided},rangeData:{seriesRangeStart:this.w.rangeData.seriesRangeStart,seriesRangeEnd:this.w.rangeData.seriesRangeEnd,seriesRange:this.w.rangeData.seriesRange},candleData:{seriesCandleO:this.w.candleData.seriesCandleO,seriesCandleH:this.w.candleData.seriesCandleH,seriesCandleM:this.w.candleData.seriesCandleM,seriesCandleL:this.w.candleData.seriesCandleL,seriesCandleC:this.w.candleData.seriesCandleC,seriesBoxPoints:this.w.candleData.seriesBoxPoints},labelData:{labels:this.w.labelData.labels,categoryLabels:this.w.labelData.categoryLabels},axisFlags:{isXNumeric:this.w.axisFlags.isXNumeric,dataFormatXNumeric:this.w.axisFlags.dataFormatXNumeric,isDataXYZ:this.w.axisFlags.isDataXYZ,isRangeData:this.w.axisFlags.isRangeData,isRangeBar:this.w.axisFlags.isRangeBar,isMultiLineX:this.w.axisFlags.isMultiLineX,dataWasParsed:this.w.axisFlags.dataWasParsed,hasXaxisGroups:this.w.labelData.hasXaxisGroups,groups:this.w.labelData.groups,seriesGroups:this.w.labelData.seriesGroups}}}static _defineLazyResult(t,e,s){let i=!1,a;Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get(){return i||(i=!0,a=s()),a},set(n){i=!0,a=n}})}static sliceByXRange(t,e,s){const i=t.length;if(i===0)return t;const n=!Array.isArray(t[0])?l=>l.x:l=>l[0];let r=0;if(e!=null){let l=0,c=i-1;for(;l<=c;){const h=l+c>>1;n(t[h])<e?l=h+1:c=h-1}r=Math.max(0,l-1)}let o=i;if(s!=null){let l=0,c=i-1;for(;l<=c;){const h=l+c>>1;n(t[h])>s?c=h-1:l=h+1}o=Math.min(i,l+1)}return r===0&&o===i?t.slice():t.slice(r,o)}static lttbDownsample(t,e){const s=t.length;if(e>=s||e<3)return t;const i=!Array.isArray(t[0]),a=i?c=>c.x:c=>c[0],n=i?c=>c.y:c=>c[1],r=[];r.push(t[0]);const o=(s-2)/(e-2);let l=0;for(let c=0;c<e-2;c++){const h=Math.floor((c+1)*o)+1,d=Math.min(Math.floor((c+2)*o)+1,s);let f=0,u=0;const g=d-h;for(let w=h;w<d;w++)f+=a(t[w]),u+=n(t[w]);f/=g,u/=g;const p=Math.floor(c*o)+1,b=Math.min(Math.floor((c+1)*o)+1,s),m=a(t[l]),A=n(t[l]);let v=-1,y=p;for(let w=p;w<b;w++){const _=Math.abs((m-f)*(n(t[w])-A)-(m-a(t[w]))*(u-A))*.5;_>v&&(v=_,y=w)}r.push(t[y]),l=y}return r.push(t[s-1]),r}static ohlcAggregate(t,e){const s=t.length;if(e>=s||e<1)return t;const i=!Array.isArray(t[0]),a=i?c=>c.x:c=>c[0],n=i?c=>c.y:c=>c[1],r=i?(c,h)=>({x:c,y:h}):(c,h)=>[c,h],o=[],l=s/e;for(let c=0;c<e;c++){const h=Math.floor(c*l),d=c===e-1?s:Math.floor((c+1)*l);
27if(d<=h)continue;const f=n(t[h]),u=f[0];let g=f[1],p=f[2],b=f[3];for(let m=h+1;m<d;m++){const A=n(t[m]);A[1]>g&&(g=A[1]),A[2]<p&&(p=A[2]),b=A[3]}o.push(r(a(t[h]),[u,g,p,b]))}return o}static rangeAggregate(t,e){const s=t.length;if(e>=s||e<1)return t;const i=!Array.isArray(t[0]),a=i?c=>c.x:c=>c[0],n=i?c=>c.y:c=>c[1],r=i?(c,h)=>({x:c,y:h}):(c,h)=>[c,h],o=[],l=s/e;for(let c=0;c<e;c++){const h=Math.floor(c*l),d=c===e-1?s:Math.floor((c+1)*l);if(d<=h)continue;let f=1/0,u=-1/0;for(let g=h;g<d;g++){const p=n(t[g]);if(p!=null)for(let b=0;b<2;b++){const m=p[b];m==null||!isFinite(m)||(m<f&&(f=m),m>u&&(u=m))}}o.push(r(a(t[h]),f===1/0?[null,null]:[f,u]))}return o}excludeCollapsedSeriesInYAxis(){const t=this.w,e=[];t.globals.seriesYAxisMap.forEach((s,i)=>{let a=0;s.forEach(n=>{t.globals.collapsedSeriesIndices.indexOf(n)!==-1&&a++}),a>0&&a==s.length&&e.push(i)}),t.globals.ignoreYAxisIndexes=e.map(s=>s)}}class Bn{constructor(t,e){this.w=t,this.ctx=e}_updateOptions(t,e=!1,s=!0,i=!0,a=!1){return new Promise((n,r)=>{let o=[this.ctx];i&&(o=this.ctx.getSyncedCharts()),this.w.globals.isExecCalled&&(o=[this.ctx],this.w.globals.isExecCalled=!1),o.forEach((l,c)=>{var h,d;const f=l.w;if(f.globals.shouldAnimate=s,e||(f.globals.resized=!0,f.globals.dataChanged=!0,s&&f.config.chart.animations.enabled&&l.series.getPreviousPaths()),s&&t&&typeof t=="object"){const u=(h=t?.chart)==null?void 0:h.type,g=f.config.chart.requestedType||f.config.chart.type;u&&u!==g&&((d=l.morphTypeChange)==null||d.captureBeforeDestroy({fromType:g,toType:u,newSeries:t.series||f.config.series}))}if(t&&typeof t=="object"){l.config=new me(t);const u=t.chart&&t.chart.type,g=u==="funnel"||u==="pyramid"||u==="gauge",p=!!f.config.chart.requestedType;if(u&&!g&&p){t.chart=t.chart||{},t.chart.requestedType=u;const b=f.config.chart.requestedType;(b==="funnel"||b==="pyramid")&&(t.plotOptions=t.plotOptions||{},t.plotOptions.bar=t.plotOptions.bar||{},t.plotOptions.bar.isFunnel===void 0&&(t.plotOptions.bar.isFunnel=!1),t.plotOptions.bar.isPyramid===void 0&&(t.plotOptions.bar.isPyramid=!1))}l.config.normalizeAliasedChartType(t),t=rt.extendArrayProps(l.config,t,f),l.w.globals.chartID!==this.w.globals.chartID&&(delete t.series,delete t.yaxis),f.config=R.extend(f.config,t),a&&(f.globals.lastXAxis=t.xaxis?R.clone(t.xaxis):[],f.globals.lastYAxis=t.yaxis?R.clone(t.yaxis):[],f.globals.initialConfig=R.extend({},f.config),f.globals.initialSeries=f.config.series),t.series&&(f.globals.collapsedSeriesIndices.length>0||f.globals.ancillaryCollapsedSeriesIndices.length>0)&&l.series.reconcileCollapsedByName()}return l.update(t).then(()=>{c===o.length-1&&n(l)}).catch(r)})})}_updateSeries(t,e,s=!1){return new Promise((i,a)=>{const n=this.w;n.globals.shouldAnimate=e,n.globals.dataChanged=!0;const r=JSON.stringify({y:(n.globals.yAxisScale||[]).map(h=>h?h.result:null),xMin:n.globals.minX,xMax:n.globals.maxX});Es.invalidateSelectors(n),e&&n.config.chart.animations.enabled&&this.ctx.series.getPreviousPaths();const o=n.config.series.length,l=n.config.series.map(h=>{var d,f;return(f=(d=h?.data)==null?void 0:d.length)!=null?f:0});n.globals.dataReducerRawSeries=null,this.ctx.data.resetParsingFlags();const c=this.ctx.data.parseData(t);return this.ctx._writeParsedSeriesData(c.seriesData),this.ctx._writeParsedRangeData(c.rangeData),this.ctx._writeParsedCandleData(c.candleData),this.ctx._writeParsedLabelData(c.labelData),this.ctx._writeParsedAxisFlags(c.axisFlags),s&&(n.globals.initialConfig&&(n.globals.initialConfig.series=n.config.series),n.globals.initialSeries=n.config.series),this._canUseFastPath(t,o,l,n)?this.ctx.fastUpdate(e,r).then(()=>{i(this.ctx)}).catch(a):(this.ctx._updateStats&&this.ctx._updateStats.full++,this.ctx.update().then(()=>{i(this.ctx)}).catch(a))})}_canUseFastPath(t,e,s,i){return!(!i.dom.elGraphical||!i.globals.axisCharts||t.length!==e||t.some((a,n)=>{var r,o;return((o=(r=a?.data)==null?void 0:r.length)!=null?o:0)!==s[n]})||i.globals.collapsedSeries.length>0||i.globals.ancillaryCollapsedSeries.length>0||i.globals.risingSeries.length>0||i.globals.comboCharts||i.interact.zoomed)}_extendSeries(t,e){const s=this.w,i=s.config.series[e];return Z(G({}
27,s.config.series[e]),{name:t.name?t.name:i?.name,color:t.color?t.color:i?.color,type:t.type?t.type:i?.type,group:t.group?t.group:i?.group,hidden:typeof t.hidden<"u"?t.hidden:i?.hidden,data:t.data?t.data:i?.data,zIndex:typeof t.zIndex<"u"?t.zIndex:e})}toggleDataPointSelection(t,e){const s=this.w;let i=null;const a=`.apexcharts-series[data\\:realIndex='${t}']`;if(s.globals.axisCharts?i=s.dom.Paper.findOne(`${a} path[j='${e}'], ${a} circle[j='${e}'], ${a} rect[j='${e}']`):typeof e>"u"&&(i=s.dom.Paper.findOne(`${a} path[j='${t}']`),(s.config.chart.type==="pie"||s.config.chart.type==="polarArea"||s.config.chart.type==="donut")&&this.ctx.pie.pieClicked(t)),i)new I(this.w).pathMouseDown(i,null);else return console.warn("toggleDataPointSelection: Element not found"),null;return i.node?i.node:null}forceXAxisUpdate(t){const e=this.w;return["min","max"].forEach(i=>{typeof t.xaxis[i]<"u"&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])}),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric&&(t=new xe(t).convertCatToNumericXaxis(t,this.ctx)),t}forceYAxisUpdate(t){return t.chart&&t.chart.stacked&&t.chart.stackType==="100%"&&(Array.isArray(t.yaxis)?t.yaxis.forEach((e,s)=>{t.yaxis[s].min=0,t.yaxis[s].max=100}):(t.yaxis.min=0,t.yaxis.max=100)),t}revertDefaultAxisMinMax(t){const e=this.w;let s=e.globals.lastXAxis,i=e.globals.lastYAxis;t&&t.xaxis&&(s=t.xaxis),t&&t.yaxis&&(i=t.yaxis);const a=s;e.config.xaxis.min=a.min,e.config.xaxis.max=a.max;const n=r=>{if(typeof i[r]<"u"){const o=i[r];e.config.yaxis[r].min=o.min,e.config.yaxis[r].max=o.max}};e.config.yaxis.map((r,o)=>{e.interact.zoomed||typeof i[o]<"u"?n(o):typeof this.ctx.opts.yaxis[o]<"u"&&(r.min=this.ctx.opts.yaxis[o].min,r.max=this.ctx.opts.yaxis[o].max)})}}class ra{constructor(t){this.w=t.w,this.ttCtx=t}getNearestValues({hoverArea:t,elGrid:e,clientX:s,clientY:i}){var a,n;const r=this.w,o=e.getBoundingClientRect(),l=o.width,c=o.height;let h=l/(r.globals.dataPoints-1);const d=c/r.globals.dataPoints,f=this.hasBars();(r.globals.comboCharts||f)&&!r.config.xaxis.convertedCatToNumeric&&(h=l/r.globals.dataPoints);const u=s-o.left-r.globals.barPadForNumericAxis,g=i-o.top;u<0||g<0||u>l||g>c?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):r.interact.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):r.interact.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));let b=Math.round(u/h);const m=Math.floor(g/d);f&&!r.config.xaxis.convertedCatToNumeric&&(b=Math.ceil(u/h),b=b-1);let A=null,v=null,y=r.globals.seriesXvalues.map(_=>_.filter(C=>R.isNumber(C)));const w=r.globals.seriesYvalues.map(_=>_.filter(C=>R.isNumber(C)));if(r.axisFlags.isXNumeric){const _=this.ttCtx.getElGrid();if(!_)return{hoverX:u,hoverY:g};const C=_.getBoundingClientRect(),S=u*(C.width/l),k=g*(C.height/c);v=this.closestInMultiArray(S,k,y,w),A=v.index,b=(a=v.j)!=null?a:0,A!==null&&r.globals.hasNullValues&&(y=r.globals.seriesXvalues[A],v=this.closestInArray(S,y),b=(n=v.j)!=null?n:0)}return r.interact.capturedSeriesIndex=A===null?-1:A,(!b||b<1)&&(b=0),r.globals.isBarHorizontal?r.interact.capturedDataPointIndex=m:r.interact.capturedDataPointIndex=b,{capturedSeries:A,j:r.globals.isBarHorizontal?m:b,hoverX:u,hoverY:g}}getFirstActiveXArray(t){const e=this.w;let s=0;const i=t.map((a,n)=>a.length>0?n:-1);for(let a=0;a<i.length;a++)if(i[a]!==-1&&e.globals.collapsedSeriesIndices.indexOf(a)===-1&&e.globals.ancillaryCollapsedSeriesIndices.indexOf(a)===-1){s=i[a];break}return s}closestInMultiArray(t,e,s,i){const a=this.w,n=d=>a.globals.collapsedSeriesIndices.indexOf(d)===-1&&a.globals.ancillaryCollapsedSeriesIndices.indexOf(d)===-1,r=a.config.chart.type,o=!a.globals.comboCharts&&(r==="line"||r==="area");let l=1/0,c=null,h=null;if(a.globals.allSeriesHasEqualX){let d=1/0;for(let f=0;f<s.length;f++){if(!n(f))continue;const u=s[f],g=i[f],p=Math.min(u.length,g.length);for(let b=0;b<p;b++){const m=Math.abs(t-u[b]);m<d&&(d=m,h=b)}}if(h!==null)if(o){let f=1/0;for(let u=0;u<s.length;u++){if(!n(u))continue;const g=s[u],p=i[u],b=Math.min(g.length,p.length);if(b<2){const m=p[h];if(typeof m!="number")continue;const A=Math.abs(e-m);A<f&&(f=A,c=u);continue}for(let m=0;m<b-1;m++){const A=this._distanceToSegment(t,e,g[m],p[m],g[m+1],p[m+1]);A.dist<f&&(f=A.dist,c=u)}}}else{let f=1/0;for(let u=0;u<s.length;u++){if(!n(u))continue;const g=i[u][h];if(typeof g!="number")continue;const p=Math.abs(e-g);p<f&&(f=p,c=u)}}return{index:c,j:h}}for(let d=0;d<s.length;d++){if(!n(d))continue;const f=s[d],u=i[d],g=Math.min(f.length,u.length);if(o&&g>=2){for(let p=0;p<g-1;p++){const b=this._distanceToSegment(t,e,f[p],u[p],f[p+1],u[p+1]);b.dist<l&&(l=b.dist,c=d,h=b.t<.5?p:p+1)}continue}for(let p=0;p<g;p++){const b=f[p],m=t-b,A=u[p],v=e-A,y=Math.sqrt(m*m+v*v);y<l&&(l=y,c=d,h=p)}}return{index:c,j:h}}_distanceToSegment(t,e,s,i,a,n){const r=a-s,o=n-i,l=r*r+o*o;let c=l===0?0:((t-s)*r+(e-i)*o)/l;c<0?c=0:c>1&&(c=1);const h=s+c*r,d=i+c*o,f=t-h,u=e-d;return{dist:Math.sqrt(f*f+u*u),t:c}}closestInArray(t,e){const s=e[0];let i=null,a=Math.abs(t-s);for(let n=0;n<e.length;n++){const r=Math.abs(t-e[n]);r<a&&(a=r,i=n)}return{j:i}}isXoverlap(t){const e=this.w,s=[],i=e.seriesData.seriesX.filter(a=>typeof a[0]<"u");if(i.length>0)for(let a=0;a<i.length-1;a++)typeof i[a][t]<"u"&&typeof i[a+1][t]<"u"&&i[a][t]!==i[a+1][t]&&s.push("unEqual");return s.length===0}isInitialSeriesSameLen(){var t,e,s,i;let a=!0;const n=((e=(t=this.w.globals._initialSeriesPeek)!=null?t:this.w.globals.initialSeries)==null?void 0:e.filter((r,o)=>{var l;return!((l=this.w.globals.collapsedSeriesIndices)!=null&&l.includes(o))}))||[];for(let r=0;r<n.length-1;r++){if(!((s=n[r])!=null&&s.data)||!((i=n[r+1])!=null&&i.data))return!0;
27if(n[r].data.length!==n[r+1].data.length){a=!1;break}}return a}getBarsHeight(t){return[...t].reduce((i,a)=>i+a.getBBox().height,0)}getElMarkers(t){return typeof t=="number"?this.w.dom.baseEl.querySelectorAll(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-series-markers-wrap > *`):this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}getAllMarkers(t=!1){let e=[...this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap")];t&&(e=e.filter(i=>{const a=Number(i.getAttribute("data:realIndex"));return this.w.globals.collapsedSeriesIndices.indexOf(a)===-1})),e.sort((i,a)=>{var n=Number(i.getAttribute("data:realIndex")),r=Number(a.getAttribute("data:realIndex"));return r<n?1:r>n?-1:0});const s=[];return e.forEach(i=>{s.push(i.querySelector(".apexcharts-marker"))}),s}hasMarkers(t){return this.getElMarkers(t).length>0}getPathFromPoint(t,e){const s=Number(t.getAttribute("cx")),i=Number(t.getAttribute("cy")),a=t.getAttribute("shape");return new I(this.w).getMarkerPath(s,i,a,e)}getElBars(){return this.w.dom.baseEl.querySelectorAll(".apexcharts-bar-series,  .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-violin-series, .apexcharts-rangebar-series")}hasBars(){return this.getElBars().length>0}getHoverMarkerSize(t){const e=this.w;let s=e.config.markers.hover.size;return s===void 0&&(s=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),s}toggleAllTooltipSeriesGroups(t){const e=this.w,s=this.ttCtx;s.allTooltipSeriesGroups.length===0&&(s.allTooltipSeriesGroups=e.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));const i=s.allTooltipSeriesGroups;for(let a=0;a<i.length;a++)t==="enable"?(i[a].classList.add("apexcharts-active"),i[a].style.display=e.config.tooltip.items.display):(i[a].classList.remove("apexcharts-active"),i[a].style.display="none")}}class Yn{constructor(t){this.w=t.w,this.ttCtx=t,this.tooltipUtil=new ra(t)}drawSeriesTexts({shared:t=!0,ttItems:e,i:s=0,j:i=null,y1:a,y2:n,e:r}){const o=this.w;o.config.tooltip.custom!==void 0?this.handleCustomTooltip({i:s,j:i,y1:a,y2:n,w:o}):this.toggleActiveInactiveSeries(t,s);const l=this.getValuesToPrint({i:s,j:i});this.printLabels({i:s,j:i,values:l,ttItems:e,shared:t,e:r});const c=this.ttCtx.getElTooltip();c&&(this.ttCtx.tooltipRect.ttWidth=c.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=c.getBoundingClientRect().height)}printLabels({i:t,j:e,values:s,ttItems:i,shared:a,e:n}){const r=this.w,{xVal:o,zVal:l,xAxisTTVal:c}=s,h=r.seriesData.series.length,d=e!==null&&r.config.plotOptions.bar.distributed?r.globals.colors[e]:r.globals.colors[t];for(let f=0;f<h;f++){const u=r.config.tooltip.inverseOrder?h-1-f:f,g=this.computeSeriesRow({i:t,j:e,t:f,tIndex:u,shared:a,e:n,basePColor:d});this.DOMHandling({i:t,t:u,j:e,ttItems:i,values:{val:g.val,goalVals:g.goalVals,xVal:o,xAxisTTVal:c,zVal:l},seriesName:g.seriesName,shared:a,pColor:g.pColor})}}computeSeriesRow({i:t,j:e,tIndex:s,shared:i,e:a,basePColor:n}){const r=this.w;let o=this.getFormatters(t),l=n,c,h=[],d=r.config.chart.type==="treemap"?o.yLbTitleFormatter(String(r.config.series[t].data[e].x),{series:r.seriesData.series,seriesIndex:t,dataPointIndex:e,w:r}):this.getSeriesName({fn:o.yLbTitleFormatter,index:t,seriesIndex:t,j:e});return r.globals.axisCharts&&(i?(o=this.getFormatters(s),d=this.getSeriesName({fn:o.yLbTitleFormatter,index:s,seriesIndex:t,j:e}),l=r.globals.colors[s],c=this.formatYValue(o,s,e),h=this.formatGoalVals(o,s,e)):(l=this.resolvePatternColor(a,l),c=this.formatYValue(o,t,e),h=this.formatGoalVals(o,t,e))),e===null&&(c=o.yLbFormatter(r.seriesData.series[t],Z(G({},r),{seriesIndex:t,dataPointIndex:t}))),{seriesName:d,val:c,goalVals:h,pColor:l}}formatYValue(t,e,s){var i,a,n,r;const o=this.w;return o.axisFlags.isRangeData?t.yLbFormatter((a=(i=o.rangeData.seriesRangeStart)==null?void 0:i[e])==null?void 0:a[s],{series:o.rangeData.seriesRangeStart,seriesIndex:e,dataPointIndex:s,w:o})+" - "+t.yLbFormatter((r=(n=o.rangeData.seriesRangeEnd)==null?void 0:n[e])==null?void 0:r[s],{series:o.rangeData.seriesRangeEnd,seriesIndex:e,dataPointIndex:s,w:o}):t.yLbFormatter(o.seriesData.series[e][s],{series:o.seriesData.series,seriesIndex:e,dataPointIndex:s,w:o})}formatGoalVals(t,e,s){var i;const a=this.w,n=(i=a.seriesData.seriesGoals[e])==null?void 0:i[s];return Array.isArray(n)?n.map(r=>({attrs:r,val:t.yLbFormatter(r.value,{seriesIndex:e,dataPointIndex:s,w:a})})):[]}resolvePatternColor(t,e){var s,i,a;const n=this.w,r=(s=t?.target)==null?void 0:s.getAttribute("fill");if(!r)return e;if(r.indexOf("url")===-1)return r;if(r.indexOf("Pattern")===-1)return e;const o=n.dom.baseEl.querySelector(r.substr(4).slice(0,-1));return(a=(i=o?.childNodes[0])==null?void 0:i.getAttribute("stroke"))!=null?a:e}getFormatters(t){const e=this.w;let s=e.formatters.yLabelFormatters[t],i;return e.formatters.ttVal!==void 0?Array.isArray(e.formatters.ttVal)?(s=e.formatters.ttVal[t]&&e.formatters.ttVal[t].formatter,i=e.formatters.ttVal[t]&&e.formatters.ttVal[t].title&&e.formatters.ttVal[t].title.formatter):(s=e.formatters.ttVal.formatter,typeof e.formatters.ttVal.title.formatter=="function"&&(i=e.formatters.ttVal.title.formatter)):i=e.config.tooltip.y.title.formatter,typeof s!="function"&&(e.formatters.yLabelFormatters[
270]?s=e.formatters.yLabelFormatters[0]:s=function(a){return a}),typeof i!="function"&&(i=function(a){return a?a+": ":""}),{yLbFormatter:s,yLbTitleFormatter:i}}getSeriesName({fn:t,index:e,seriesIndex:s,j:i}){const a=this.w;return t(String(a.seriesData.seriesNames[e]),{series:a.seriesData.series,seriesIndex:s,dataPointIndex:i,w:a})}DOMHandling({t,j:e,ttItems:s,values:i,seriesName:a,shared:n,pColor:r}){const o=this.w,l=this.ttCtx,{val:c,goalVals:h,xVal:d,xAxisTTVal:f,zVal:u}=i;if(!s||!s[t])return;let g=null;g=s[t].children,o.config.tooltip.fillSeriesColor&&(s[t].style.backgroundColor=r,g[0].style.display="none"),l.showTooltipTitle&&(l.tooltipTitle===null&&(l.tooltipTitle=o.dom.baseEl.querySelector(".apexcharts-tooltip-title")),l.tooltipTitle&&(l.tooltipTitle.innerHTML=d)),l.isXAxisTooltipEnabled&&l.xaxisTooltipText&&(l.xaxisTooltipText.innerHTML=f!==""?f:d);const p=s[t].querySelector(".apexcharts-tooltip-text-y-label");p&&(p.innerHTML=a||"");const b=s[t].querySelector(".apexcharts-tooltip-text-y-value");b&&(b.innerHTML=typeof c<"u"?c:""),g[0]&&g[0].classList.contains("apexcharts-tooltip-marker")&&(o.config.tooltip.marker.fillColors&&Array.isArray(o.config.tooltip.marker.fillColors)&&(r=o.config.tooltip.marker.fillColors[t]),o.config.tooltip.fillSeriesColor?g[0].style.backgroundColor=r:g[0].style.color=r),o.config.tooltip.marker.show||(g[0].style.display="none");const m=s[t].querySelector(".apexcharts-tooltip-text-goals-label"),A=s[t].querySelector(".apexcharts-tooltip-text-goals-value");if(h.length&&o.seriesData.seriesGoals[t]){const v=()=>{let y="<div>",w="<div>";h.forEach(_=>{y+=` <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: ${_.attrs.strokeColor}; height: 3px; border-radius: 0; top: 5px;"></span> ${_.attrs.name}</div>`,w+=`<div>${_.val}</div>`}),m.innerHTML=y+"</div>",A.innerHTML=w+"</div>"};n?o.seriesData.seriesGoals[t][e]&&Array.isArray(o.seriesData.seriesGoals[t][e])?v():(m.innerHTML="",A.innerHTML=""):v()}else m.innerHTML="",A.innerHTML="";if(u!==null){const v=s[t].querySelector(".apexcharts-tooltip-text-z-label");v.innerHTML=o.config.tooltip.z.title;const y=s[t].querySelector(".apexcharts-tooltip-text-z-value");y.innerHTML=typeof u<"u"?u:""}if(n&&g[0]){if(o.config.tooltip.hideEmptySeries){const v=s[t].querySelector(".apexcharts-tooltip-marker"),y=s[t].querySelector(".apexcharts-tooltip-text");parseFloat(c)==0?(v.style.display="none",y.style.display="none"):(v.style.display="block",y.style.display="block")}typeof c>"u"||c===null||o.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||o.globals.collapsedSeriesIndices.indexOf(t)>-1||Array.isArray(l.tConfig.enabledOnSeries)&&l.tConfig.enabledOnSeries.indexOf(t)===-1?g[0].parentNode.style.display="none":g[0].parentNode.style.display=o.config.tooltip.items.display}else Array.isArray(l.tConfig.enabledOnSeries)&&l.tConfig.enabledOnSeries.indexOf(t)===-1&&(g[0].parentNode.style.display="none")}toggleActiveInactiveSeries(t,e){const s=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");const i=s.dom.baseEl.querySelector(`.apexcharts-tooltip-series-group-${e}`);if(i){const a=i;a.classList.add("apexcharts-active"),a.style.display=s.config.tooltip.items.display}}}getValuesToPrint({i:t,j:e}){var s,i,a,n,r,o,l,c;const h=this.w,d=h.seriesData.seriesX.map(v=>v.length>0?v:[]);let f="",u="",g=null,p=null;const b={series:h.seriesData.series,seriesIndex:t,dataPointIndex:e,w:h},m=h.formatters.ttZFormatter;if(e===null)p=h.seriesData.series[t];else if(h.axisFlags.isXNumeric&&h.config.chart.type!=="treemap"){if(f=d[t][e],d[t].length===0){const v=this.tooltipUtil.getFirstActiveXArray(d);f=d[v][e]}}else new yt(this.w).isFormatXY()?f=typeof h.config.series[t].data[e]<"u"?h.config.series[t].data[e].x:"":f=typeof h.labelData.labels[e]<"u"?h.labelData.labels[e]:"";const A=f;return h.axisFlags.isXNumeric&&h.config.xaxis.type==="datetime"?f=new be(this.w).xLabelFormat(h.formatters.ttKeyFormatter,A,A,{i:void 0,dateFormatter:new xt(this.w).formatDate,w:this.w}
27):h.globals.isBarHorizontal?f=h.formatters.yLabelFormatters[0](A,b):f=(a=(i=(s=h.formatters).xLabelFormatter)==null?void 0:i.call(s,A,b))!=null?a:A,h.config.tooltip.x.formatter!==void 0&&(f=(o=(r=(n=h.formatters).ttKeyFormatter)==null?void 0:r.call(n,A,b))!=null?o:A),h.seriesData.seriesZ.length>0&&h.seriesData.seriesZ[t].length>0&&(g=m?.(h.seriesData.seriesZ[t][e],h)),typeof h.config.xaxis.tooltip.formatter=="function"?u=(c=(l=h.formatters).xaxisTooltipFormatter)==null?void 0:c.call(l,A,b):u=f,{val:Array.isArray(p)?p.join(" "):p,xVal:Array.isArray(f)?f.join(" "):f,xAxisTTVal:Array.isArray(u)?u.join(" "):u,zVal:g}}handleCustomTooltip({i:t,j:e,y1:s,y2:i,w:a}){const n=this.ttCtx.getElTooltip();let r=a.config.tooltip.custom;if(Array.isArray(r)&&(r=r[t]),typeof r!="function")return;const o=r({series:a.seriesData.series,seriesIndex:t,dataPointIndex:e,y1:s,y2:i,w:a});if(n){const l=n.querySelector(".apexcharts-tooltip-arrow");typeof o=="string"||typeof o=="number"?n.innerHTML=String(o):o!=null&&(o instanceof Element||typeof o.nodeName=="string")&&(n.innerHTML="",n.appendChild(o.cloneNode(!0))),l&&n.appendChild(l)}}}const Et=7;class oa{constructor(t){this.ttCtx=t,this.w=t.w}moveXCrosshairs(t,e=null){const s=this.ttCtx,i=this.w,a=s.getElXCrosshairs();let n=t-s.xcrosshairsWidth/2;const r=i.labelData.labels.slice().length;if(e!==null&&(n=i.layout.gridWidth/r*e),a!==null&&!i.globals.isBarHorizontal&&(a.setAttribute("x",String(n)),a.setAttribute("x1",String(n)),a.setAttribute("x2",String(n)),a.setAttribute("y2",String(i.layout.gridHeight)),a.classList.add("apexcharts-active")),n<0&&(n=0),n>i.layout.gridWidth&&(n=i.layout.gridWidth),s.isXAxisTooltipEnabled){let o=n;(i.config.xaxis.crosshairs.width==="tickWidth"||i.config.xaxis.crosshairs.width==="barWidth")&&(o=n+s.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}moveYCrosshairs(t){const e=this.ttCtx;e.ycrosshairs!==null&&I.setAttrs(e.ycrosshairs,{y1:t,y2:t}),e.ycrosshairsHidden!==null&&I.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}moveXAxisTooltip(t){var e,s;const i=this.w,a=this.ttCtx;if(a.xaxisTooltip!==null&&a.xcrosshairsWidth!==0){a.xaxisTooltip.classList.add("apexcharts-active");const n=a.xaxisOffY+i.config.xaxis.tooltip.offsetY+i.layout.translateY+5+i.config.xaxis.offsetY,o=a.xaxisTooltip.getBoundingClientRect().width;if(t=t-o/2,!isNaN(t)){t=t+i.layout.translateX;const c=new I(this.w).getTextRects((s=(e=a.xaxisTooltipText)==null?void 0:e.innerHTML)!=null?s:"",i.config.xaxis.labels.style.fontSize);a.xaxisTooltipText&&(a.xaxisTooltipText.style.minWidth=c.width+"px"),a.xaxisTooltip.style.left=t+"px",a.xaxisTooltip.style.top=n+"px"}}}moveYAxisTooltip(t){var e,s;const i=this.w,a=this.ttCtx;a.yaxisTTEls===null&&(a.yaxisTTEls=[...i.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);const n=parseInt((s=(e=a.ycrosshairsHidden)==null?void 0:e.getAttribute("y1"))!=null?s:"0",10);let r=i.layout.translateY+n;if(a.yaxisTTEls){const o=a.yaxisTTEls[t].getBoundingClientRect(),l=o.height;let c;const h=i.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),d=i.dom.elWrap.getBoundingClientRect();if(h){const f=h.getBoundingClientRect();f.width>0&&(c=f.left+f.width/2-d.left-o.width/2)}c==null&&(c=i.config.yaxis[t].opposite?i.globals.translateYAxisX[t]+4:i.globals.translateYAxisX[t]-o.width-4),r=r-l/2,i.globals.ignoreYAxisIndexes.indexOf(t)===-1&&r>0&&r<i.layout.gridHeight?(a.yaxisTTEls[t].classList.add("apexcharts-active"),a.yaxisTTEls[t].style.top=r+"px",a.yaxisTTEls[t].style.left=c+i.config.yaxis[t].tooltip.offsetX+"px"):a.yaxisTTEls[t].classList.remove("apexcharts-active")}}moveTooltip(t,e,s=null){const a=this.ttCtx.getElTooltip();if(!a)return;const n=this.computeTooltipPosition(t,e,s);n!==null&&this.applyTooltipPosition(a,n)}computeTooltipPosition(t,e,s=null){var i,a,n,r,o,l,c;const h=this.w,d=this.ttCtx,f=d.tooltipRect,u=!!h.config.tooltip.arrow,g=s!==null?parseFloat(String(s)):1,p=f.ttHeight||0,b=f.ttWidth||0,m=parseFloat(String(t)),A=parseFloat(String(e));if(isNaN(m)||isNaN(A))return null;let v=m+g+5;const y=A+h.layout.translateY;let w=u?y-p/2+g/2:A+g/2,_="right";if(v>h.layout.gridWidth/2&&(v=v-b-g-10,_="left"),v>h.layout.gridWidth-b-10&&(v=h.layout.gridWidth-b),v<-20&&(v=-20),h.config.tooltip.followCursor){const k=d.getElGrid();if(!k)return null;const M=k.getBoundingClientRect();v=d.e.clientX-M.left,v>h.layout.gridWidth/2?(v=v-b,_="left"):_="right",w=d.e.clientY+h.layout.translateY-M.top,w>h.layout.gridHeight/2&&(w=w-p)}else if(!h.globals.isBarHorizontal)if(u){const k=h.layout.translateY,M=h.layout.translateY+h.layout.gridHeight;w+p>M&&(w=M-p),w<k&&(w=k)}else p/2+w>h.layout.gridHeight&&(w=h.layout.gridHeight-p+h.layout.translateY);if(isNaN(v))return null;v=v+h.layout.translateX;const C=(a=(i=h.config)==null?void 0:i.chart)==null?void 0:a.accessibility;if(C?.enabled&&((r=(n=C?.keyboard)==null?void 0:n.navigation)!=null&&r.enabled)&&((c=(l=(o=h.dom)==null?void 0:o.baseEl)==null?void 0:l.querySelector)!=null&&c.call(l,".apexcharts-keyboard-focused"))){const k=u?y:A,M=(g||1)+12,L=w,E=w+p;!isNaN(k)&&p>0&&L<k+M&&E>k-M&&(w=k-p-M,w<0&&(w=k+M))}let S=null;if(u&&p>0){const k=y-w,M=10,L=p-10;S=Math.max(M,Math.min(L,k))}return{x:v,y:w,placement:_,arrowY:S}}applyTooltipPosition(t,e){if(!t)return;const s=t.dataset.positioned!=="true";s&&(t.style.transitionProperty="none"),t.style.left=e.x+"px",t.style.top=e.y+"px",e.placement&&(t.dataset.placement=e.placement),e.arrowY!=null&&t.style.setProperty("--apx-tt-arrow-y",e.arrowY+"px"),e.arrowX!=null&&t.style.setProperty("--apx-tt-arrow-x",e.arrowX+"px"),s&&(t.offsetWidth,t.dataset.positioned="true",requestAnimationFrame(()=>{t.style.transitionProperty=""}))}moveMarkers(t,e){var s;const i=this.w,a=this.ttCtx;if(i.globals.markers.size[t]>0){const n=i.dom.baseEl.querySelectorAll(` .apexcharts-series[data\\:realIndex='${t}'] .apexcharts-marker`);for(let r=0;r<n.length;r++)parseInt((s=n[r].getAttribute("rel"))!=null?s:"0",10)===e&&(a.marker.resetPointsSize(),a.marker.enlargeCurrentPoint(e,n[r]))}else a.marker.resetPointsSize(),this.moveDynamicPointOnHover(e,t)}moveDynamicPointOnHover(t,e){var s,i,a,n,r;const o=this.w,l=this.ttCtx;let c=0,h=0;const d=new I(this.w),f=o.globals.pointsArray,u=l.tooltipUtil.getHoverMarkerSize(e),g=o.config.series[e].type;if(g&&(g==="column"||g==="candlestick"||g==="boxPlot"||g==="violin"))return;c=(i=(s=f[e])==null?void 0:s[t])==null?void 0:i[0],h=((n=(a=f[e])==null?void 0:a[t])==null?void 0:n[1])||0;const p=o.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${e}'] .apexcharts-series-markers path`);if(p&&h<o.layout.gridHeight&&h>0){const b=(r=p.getAttribute("shape"))!=null?r:"circle",m=d.getMarkerPath(c,h,b,u*1.5);p.setAttribute("d",m)}this.moveXCrosshairs(c),l.fixedTooltip||this.moveTooltip(c,h,u)}moveDynamicPointsOnHover(t){var e,s;const i=this.ttCtx,a=i.w;let n=0,r=0,o=0;const l=a.globals.pointsArray,c=new nt(this.w),h=new I(this.w);o=c.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);const d=i.tooltipUtil.getHoverMarkerSize(o);if((e=l[o])!=null&&e[t]&&(n=l[o][t][0],r=l[o][t][1]),isNaN(n))return;const f=i.tooltipUtil.getAllMarkers();if(f.length)for(let u=0;u<a.seriesData.series.length;u++){const g=l[u];if(a.globals.comboCharts&&typeof g>"u"&&f.splice(u,0,null),f[u]&&g&&g.length){let p=l[u][t][1],b;f[u].setAttribute("cx",n);const m=(s=f[u].getAttribute("shape"))!=null?s:"circle";if(a.config.chart.type==="rangeArea"&&!a.globals.comboCharts){const A=t+a.seriesData.series[u].length;b=l[u][A][1];const v=Math.abs(p-b)/2;p=p-v}if(p!==null&&!isNaN(p)&&p<a.layout.gridHeight+d&&p+d>0){const A=h.getMarkerPath(n,p,m,d);f[u].setAttribute("d",A)}else f[u].setAttribute("d","")}}this.moveXCrosshairs(n),i.fixedTooltip||this.moveTooltip(n,r||a.layout.gridHeight,d)}moveStickyTooltipOverBars(t,e){var s,i,a,n,r;const o=this.w,l=this.ttCtx;let c=o.globals.columnSeries?o.globals.columnSeries.length:o.seriesData.series.length;o.config.chart.stacked&&(c=o.globals.barGroups.length);let h=c>=2&&c%2===0?Math.floor(c/2):Math.floor(c/2)+1;o.globals.isBarHorizontal&&(h=new nt(this.w).getActiveConfigSeriesIndex("desc")+1);let d=o.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[rel='${h}'] path[j='${t}'], .apexcharts-candlestick-series .apexcharts-series[rel='${h}'] path[j='${t}'], .apexcharts-boxPlot-series .apexcharts-series[rel='${h}'] path[j='${t}'], .apexcharts-violin-series .apexcharts-series[rel='${h}'] path[j='${t}'], .apexcharts-rangebar-series .apexcharts-series[rel='${h}'] path[j='${t}']`);!d&&typeof e=="number"&&(d=o.dom.baseEl.querySelector(`.apexcharts-bar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],
28        .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],
29        .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],
30        .apexcharts-violin-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}'],
31        .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='${e}'] path[j='${t}']`));let f=null;const u=o.globals.barCanvasCoords;if(!d&&u&&(f=typeof e=="number"&&((s=u[e])==null?void 0:s[t])||null,!f)){for(const y in u)if((i=u[y])!=null&&i[t]){f=u[y][t];break}}let g=d?parseFloat((a=d.getAttribute("cx"))!=null?a:"0"):f?f.cx:0,p=d?parseFloat((n=d.getAttribute("cy"))!=null?n:"0"):f?f.cy:0;const b=d?parseFloat((r=d.getAttribute("barWidth"))!=null?r:"0"):f?f.barWidth:0,m=l.getElGrid();if(!m)return;const A=m.getBoundingClientRect(),v=d&&(d.classList.contains("apexcharts-candlestick-area")||d.classList.contains("apexcharts-boxPlot-area"));if(o.axisFlags.isXNumeric){if(d&&!v){const y=this._datapointCenterXFromBars(t,A);y!=null?g=y:g=g-(c%2!==0?b/2:0)}d&&v&&(g=g-b/2)}
31else!o.globals.isBarHorizontal&&!f&&(g=l.xAxisTicksPositions[t-1]+l.dataPointsDividedWidth/2,isNaN(g)&&(g=l.xAxisTicksPositions[t]-l.dataPointsDividedWidth/2));if(o.globals.isBarHorizontal?p=p-l.tooltipRect.ttHeight:o.config.tooltip.followCursor?p=l.e.clientY-A.top-l.tooltipRect.ttHeight/2:p+l.tooltipRect.ttHeight+15>o.layout.gridHeight&&(p=o.layout.gridHeight),o.globals.isBarHorizontal||this.moveXCrosshairs(g),!l.fixedTooltip){if(o.globals.isBarHorizontal&&!o.config.tooltip.followCursor&&this.placeHorizontalSharedTooltip(t))return;this.moveTooltip(g,p||o.layout.gridHeight)}}_datapointCenterXFromBars(t,e){var s,i;const a=this.w,n=a.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}']`);if(!n.length)return null;let r=1/0,o=-1/0;for(const l of n){const c=l.parentNode;if((i=(s=c?.classList)==null?void 0:s.contains)!=null&&i.call(s,"apexcharts-series-collapsed"))continue;const h=l.getBoundingClientRect();h.width===0&&h.height===0||(h.left<r&&(r=h.left),h.right>o&&(o=h.right))}return isFinite(r)?(r+o)/2-e.left-(a.globals.barPadForNumericAxis||0):null}placeHorizontalSharedTooltip(t){var e,s;const i=this.w,a=this.ttCtx,n=a.getElTooltip();if(!n)return!1;const r=a.getElGrid();if(!r)return!1;const o=r.getBoundingClientRect(),l=i.dom.baseEl.querySelectorAll(`.apexcharts-bar-series path[j='${t}'],.apexcharts-rangebar-series path[j='${t}'],.apexcharts-boxPlot-series path[j='${t}']`);if(!l.length)return!1;let c=1/0,h=-1/0,d=1/0,f=-1/0;for(const M of l){const L=M.parentNode;if((s=(e=L?.classList)==null?void 0:e.contains)!=null&&s.call(e,"apexcharts-series-collapsed"))continue;const E=M.getBoundingClientRect();E.width===0&&E.height===0||(E.left<c&&(c=E.left),E.right>h&&(h=E.right),E.top<d&&(d=E.top),E.bottom>f&&(f=E.bottom))}if(!isFinite(c))return!1;const u=a.tooltipRect.ttWidth||0,g=a.tooltipRect.ttHeight||0,p=(c+h)/2-o.left+i.layout.translateX,b=d-o.top+i.layout.translateY,m=f-o.top+i.layout.translateY,A=i.layout.translateY,v=i.layout.translateY+i.layout.gridHeight,y=i.layout.translateX,w=i.layout.translateX+i.layout.gridWidth;let _="top",C=b-g-Et;if(C<A){const M=m+Et;M+g<=v&&(_="bottom",C=M)}let S=p-u/2;S<y&&(S=y),S+u>w&&(S=w-u);const k=Math.max(10,Math.min(u-10,p-S));return this.applyTooltipPosition(n,{x:S,y:C,placement:_,arrowY:null,arrowX:k}),!0}}function On(x){const t=e=>`<svg viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">${e}</svg>`;switch(x){case"square":case"rect":return t('<rect x="1" y="1" width="10" height="10" rx="1" fill="currentColor"/>');case"line":return t('<rect x="0" y="5" width="12" height="2" rx="1" fill="currentColor"/>');case"diamond":return t('<path d="M6 0.5 L11.5 6 L6 11.5 L0.5 6 Z" fill="currentColor"/>');case"triangle":return t('<path d="M6 1 L11.2 10.5 L0.8 10.5 Z" fill="currentColor"/>');case"cross":return t('<path d="M2 2 L10 10 M10 2 L2 10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>');case"plus":return t('<path d="M6 1 L6 11 M1 6 L11 6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>');case"star":return t('<path d="M6 0.5 L7.5 4.4 L11.5 4.7 L8.4 7.2 L9.5 11.1 L6 8.9 L2.5 11.1 L3.6 7.2 L0.5 4.7 L4.5 4.4 Z" fill="currentColor"/>');case"sparkle":return t('<path d="M6 0.5 L7 5 L11.5 6 L7 7 L6 11.5 L5 7 L0.5 6 L5 5 Z" fill="currentColor"/>');default:return t('<circle cx="6" cy="6" r="5" fill="currentColor"/>')}}class zn{constructor(t){this.w=t.w,this.ttCtx=t,this.ctx=t.ctx,this.tooltipPosition=new oa(t)}drawDynamicPoints(){const t=this.w,e=new I(this.w),s=new re(this.w,this.ctx),i=[...t.dom.baseEl.querySelectorAll(".apexcharts-series")];t.config.chart.stacked&&i.sort((a,n)=>parseFloat(a.getAttribute("data:realIndex"))-parseFloat(n.getAttribute("data:realIndex")));for(let a=0;a<i.length;a++){const n=i[a].querySelector(".apexcharts-series-markers-wrap");if(n!==null){let r=`apexcharts-marker w${(Math.random()+1).toString(36).substring(4)}`;(t.config.chart.type==="line"||t.config.chart.type==="area")&&!t.globals.comboCharts&&!t.config.tooltip.intersect&&(r+=" no-pointer-events");const o=s.getMarkerConfig({cssClass:r,seriesIndex:Number(n.getAttribute("data:realIndex"))}),l=e.drawMarker(0,0,o);l.node.setAttribute("default-marker-size",0);const c=B.createElementNS(tt,"g");c.classList.add("apexcharts-series-markers"),c.appendChild(l.node),n.appendChild(c)}}}enlargeCurrentPoint(t,e,s=null,i=null){const a=this.w;
31a.config.chart.type!=="bubble"&&this.newPointSize(t,e);let n=e.getAttribute("cx"),r=e.getAttribute("cy");if(s!==null&&i!==null&&(n=s,r=i),this.tooltipPosition.moveXCrosshairs(n),!this.fixedTooltip){if(a.config.chart.type==="radar"){const o=this.ttCtx.getElGrid();if(!o)return;const l=o.getBoundingClientRect();n=this.ttCtx.e.clientX-l.left}this.tooltipPosition.moveTooltip(n,r,a.config.markers.hover.size)}}enlargePoints(t){var e,s;const i=this.w,a=this,n=this.ttCtx,r=t,o=i.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");let l=i.config.markers.hover.size;for(let c=0;c<o.length;c++){const h=o[c].getAttribute("rel"),d=o[c].getAttribute("index");if(l===void 0&&(l=i.globals.markers.size[d]+i.config.markers.hover.sizeOffset),r===parseInt(h??"0",10)){a.newPointSize(r,o[c]);const f=(e=o[c].getAttribute("cx"))!=null?e:"0",u=(s=o[c].getAttribute("cy"))!=null?s:"0";a.tooltipPosition.moveXCrosshairs(parseFloat(f)),n.fixedTooltip||a.tooltipPosition.moveTooltip(parseFloat(f),parseFloat(u),l)}else a.oldPointSize(o[c])}}newPointSize(t,e){const s=this.w;let i=s.config.markers.hover.size;const a=t===0?e.parentNode.firstChild:e.parentNode.lastChild;if(a.getAttribute("default-marker-size")!=="0"){const n=parseInt(a.getAttribute("index"),10);i===void 0&&(i=s.globals.markers.size[n]+s.config.markers.hover.sizeOffset),i<0&&(i=0);const r=this.ttCtx.tooltipUtil.getPathFromPoint(e,i);e.setAttribute("d",r)}}oldPointSize(t){const e=parseFloat(t.getAttribute("default-marker-size")),s=this.ttCtx.tooltipUtil.getPathFromPoint(t,e);t.setAttribute("d",s)}resetPointsSize(){var t;const s=this.w.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker");for(let i=0;i<s.length;i++){const a=parseFloat((t=s[i].getAttribute("default-marker-size"))!=null?t:"0");if(R.isNumber(a)&&a>0){const n=this.ttCtx.tooltipUtil.getPathFromPoint(s[i],a);s[i].setAttribute("d",n)}else s[i].setAttribute("d","M0,0")}}}class Hn{constructor(t){this.w=t.w;const e=this.w;this.ttCtx=t,this.isVerticalGroupedRangeBar=!e.globals.isBarHorizontal&&e.config.chart.type==="rangeBar"&&e.config.plotOptions.bar.rangeBarGroupRows}getAttr(t,e){var s;return parseFloat((s=t.target.getAttribute(e))!=null?s:"")}handleHeatTreeTooltip({e:t,opt:e,x:s,y:i,type:a}){var n,r;const o=this.ttCtx,l=this.w,c=l.globals.activeRenderer,h=a==="heatmap"&&c&&c.kind==="canvas"&&typeof c.hitTest=="function";let d,f,u,g,p,b;if(h){const A=e.elGrid.getBoundingClientRect(),v=t.type==="touchmove"?t.touches[0].clientX:t.clientX,y=t.type==="touchmove"?t.touches[0].clientY:t.clientY,w=c.hitTest(v-A.left,y-A.top);if(!w)return{x:s,y:i,noHit:!0};d=w.seriesIndex,f=w.dataPointIndex,u=w.x,g=w.y,p=w.width,b=w.height}else if(t.target.classList.contains(`apexcharts-${a}-rect`))d=this.getAttr(t,"i"),f=this.getAttr(t,"j"),u=this.getAttr(t,"cx"),g=this.getAttr(t,"cy"),p=this.getAttr(t,"width"),b=this.getAttr(t,"height");else return{x:s,y:i};o.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:d,j:f,shared:!1,e:t}),l.interact.capturedSeriesIndex=d,l.interact.capturedDataPointIndex=f,o.tooltipPosition.moveXCrosshairs(u+p/2);const m=o.getElTooltip();if(a==="heatmap"&&l.config.tooltip.arrow&&!l.config.tooltip.followCursor&&m){const A=e.elGrid.getBoundingClientRect(),v=l.dom.elWrap.getBoundingClientRect(),y=A.left-v.left;let w,_,C,S;if(h)w=u,_=g,C=u+p,S=g+b;else{const X=t.target.getBoundingClientRect();w=X.left-A.left,_=X.top-A.top,C=X.right-A.left,S=X.bottom-A.top}const k=o.tooltipRect.ttWidth||0,M=o.tooltipRect.ttHeight||0,L=(w+C)/2+y,E=_+l.layout.translateY,D=S+l.layout.translateY,T=l.layout.translateY,F=l.layout.translateY+l.layout.gridHeight,P=y,Y=y+l.layout.gridWidth;let z="top",W=E-M-Et;if(W<T){const X=D+Et;X+M<=F?(z="bottom",W=X):W=T}let O=L-k/2;O<P&&(O=P),O+k>Y&&(O=Y-k);const N=Math.max(10,Math.min(k-10,L-O));return o.tooltipPosition.applyTooltipPosition(m,{x:O,y:W,placement:z,arrowY:null,arrowX:N}),{x:O,y:W,positioned:!0}}if(s=u+o.tooltipRect.ttWidth/2+p,i=g+o.tooltipRect.ttHeight/2-b/2,s>l.layout.gridWidth/2&&(s=u-o.tooltipRect.ttWidth/2+p),o.w.config.tooltip.followCursor){const A=l.dom.elWrap.getBoundingClientRect();s=((n=l.interact.clientX)!=null?n:0)-A.left-(s>l.layout.gridWidth/2?o.tooltipRect.ttWidth:0),i=((r=l.interact.clientY)!=null?r:0)-A.top-(i>l.layout.gridHeight/2?o.tooltipRect.ttHeight:0)}return{x:s,y:i}}handleMarkerTooltip({e:t,opt:e,x:s,y:i}){const a=this.w,n=this.ttCtx;let r,o;if(t.target.classList.contains("apexcharts-marker")){const l=parseInt(e.paths.getAttribute("cx"),10),c=parseInt(e.paths.getAttribute("cy"),10),h=
31parseFloat(e.paths.getAttribute("val"));if(o=parseInt(e.paths.getAttribute("rel"),10),r=parseInt(e.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,n.intersect){const f=R.findAncestor(e.paths,"apexcharts-series");f&&(r=parseInt(f.getAttribute("data:realIndex"),10))}n.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:r,j:o,shared:n.showOnIntersect?!1:a.config.tooltip.shared,e:t}),t.type==="mouseup"&&n.markerClick(t,r,o),a.interact.capturedSeriesIndex=r,a.interact.capturedDataPointIndex=o;const d=!!a.config.tooltip.arrow;if(s=l,d?i=c:(i=c+a.layout.translateY-n.tooltipRect.ttHeight*1.4,h<0&&(i=c)),n.w.config.tooltip.followCursor){const f=n.getElGrid();if(!f)return{x:s,y:i};const u=f.getBoundingClientRect();i=n.e.clientY+a.layout.translateY-u.top}n.marker.enlargeCurrentPoint(o,e.paths,s,i)}return{x:s,y:i}}handleBarTooltip({e:t,opt:e}){var s,i,a;const n=this.w,r=this.ttCtx,o=r.getElTooltip();let l=0,c=0,h=0,d=0,f;const u=this.getBarTooltipXY({e:t,opt:e});if(u.j===null&&u.barHeight===0&&u.barWidth===0)return;d=u.i;const g=u.j;if(n.interact.capturedSeriesIndex=d,n.interact.capturedDataPointIndex=g!==null?g:n.interact.capturedDataPointIndex,n.globals.isBarHorizontal&&r.tooltipUtil.hasBars()||!n.config.tooltip.shared?(c=u.x,h=u.y,f=Array.isArray(n.config.stroke.width)?n.config.stroke.width[d]:n.config.stroke.width,l=c):!n.globals.comboCharts&&!n.config.tooltip.shared&&(l=l/2),isNaN(h)&&(h=n.globals.svgHeight-r.tooltipRect.ttHeight),c+r.tooltipRect.ttWidth>n.layout.gridWidth?c=c-r.tooltipRect.ttWidth:c<0&&(c=0),!(r.w.config.tooltip.followCursor&&!r.getElGrid())&&(r.tooltip===null&&(r.tooltip=n.dom.baseEl.querySelector(".apexcharts-tooltip:not(.apexcharts-annotation-tooltip)")),n.config.tooltip.shared||(n.globals.comboBarCount>0?r.tooltipPosition.moveXCrosshairs(l+f/2):r.tooltipPosition.moveXCrosshairs(l)),!r.fixedTooltip&&(!n.config.tooltip.shared||n.globals.isBarHorizontal&&r.tooltipUtil.hasBars())&&(h=h+n.layout.translateY-r.tooltipRect.ttHeight/2,o))){const p=r.tooltipRect.ttWidth||0,b=r.tooltipRect.ttHeight||0,m=!!n.config.tooltip.arrow,{barAnchorXInGrid:A,barAnchorYInGrid:v,barRectInGrid:y}=u,w=(s=r.getElGrid())==null?void 0:s.getBoundingClientRect(),_=n.dom.elWrap.getBoundingClientRect(),C=w?w.left-_.left:n.layout.translateX;let S,k=null,M=null,L=c+C,E=h;if(m&&n.globals.isBarHorizontal&&y!=null){const D=n.layout.translateY,T=n.layout.translateY+n.layout.gridHeight,F=C,P=C+n.layout.gridWidth,Y=(y.left+y.right)/2+C,z=y.top+n.layout.translateY,W=y.bottom+n.layout.translateY;let O=z-b-Et;if(S="top",O<D){const N=W+Et;N+b<=T&&(S="bottom",O=N)}E=O,L=Y-p/2,L<F&&(L=F),L+p>P&&(L=P-p),M=Math.max(10,Math.min(p-10,Y-L))}else if(m&&A!=null&&v!=null){const D=A+C,T=C+n.layout.gridWidth/2,F=((i=y?.left)!=null?i:A)+C,P=((a=y?.right)!=null?a:A)+C;if(D<T?(S="right",L=P+Et):(S="left",L=F-p-Et),y){E=(y.top+y.bottom)/2+n.layout.translateY-b/2;const z=n.layout.translateY,W=n.layout.translateY+n.layout.gridHeight;E<z&&(E=z),E+b>W&&(E=W-b)}if(b>0&&y){const Y=(y.top+y.bottom)/2+n.layout.translateY;k=Math.max(10,Math.min(b-10,Y-E))}}r.tooltipPosition.applyTooltipPosition(o,{x:L,y:E,placement:S,arrowY:k,arrowX:M})}}getBarTooltipXY({e:t,opt:e}){const s=this.w;let i=null;const a=this.ttCtx;let n=0,r=0,o=0,l=0,c=0,h=null,d=null,f=null,u=null,g=null;const p=t.target.classList;if(p.contains("apexcharts-bar-area")||p.contains("apexcharts-candlestick-area")||p.contains("apexcharts-boxPlot-area")||p.contains("apexcharts-rangebar-area")){const b=t.target,m=b.getBoundingClientRect(),A=e.elGrid.getBoundingClientRect(),v=m.height;c=m.height;const y=m.width,w=parseInt(b.getAttribute("cx"),10),_=parseInt(b.getAttribute("cy"),10);h=w,d=_,l=parseFloat(b.getAttribute("barWidth"));const C=m.left-A.left,S=m.top-A.top,k=C+y/2,M=S+v/2;f=k,u=s.globals.isBarHorizontal?M:S,g={left:C,top:S,right:C+y,bottom:S+v};const L=t.type==="touchmove"?t.touches[0].clientX:t.clientX;i=parseInt(b.getAttribute("j"),10),n=parseInt(b.parentNode.getAttribute("rel"),10)-1;const E=b.getAttribute("data-range-y1"),D=b.getAttribute("data-range-y2");s.globals.comboCharts&&(n=parseInt(b.parentNode.getAttribute("data:realIndex"),10));const T=P=>(s.axisFlags.isXNumeric?P=w-y/2:this.isVerticalGroupedRangeBar?P=w+y/2:P=w-a.dataPointsDividedWidth+y/2,P),F=()=>_-a.dataPointsDividedHeight+v/2-a.tooltipRect.ttHeight/2;a.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:n,j:i,y1:E?parseInt(E,10):null,y2:D?parseInt(D,10):null,shared:a.showOnIntersect?!1:s.config.tooltip.shared,e:t}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(r=L-A.left+15,o=F()):(r=T(r),o=t.clientY-A.top-a.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?(r=w,a.xyRatios&&r<a.xyRatios.baseLineInvertedY&&(r=w-a.tooltipRect.ttWidth),o=F()):(r=T(r),o=_)}return{x:r,y:o,barHeight:c,barWidth:l,i:n,j:i,barCx:h,barCy:d,barAnchorXInGrid:f,barAnchorYInGri
31d:u,barRectInGrid:g}}}class Wn{constructor(t){this.w=t.w,this.ttCtx=t}drawXaxisTooltip(){const t=this.w,e=this.ttCtx,s=t.config.xaxis.position==="bottom";e.xaxisOffY=s?t.layout.gridHeight+1:-t.layout.xAxisHeight-t.config.xaxis.axisTicks.height+3;const i=s?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",a=t.dom.elWrap;e.isXAxisTooltipEnabled&&t.dom.baseEl.querySelector(".apexcharts-xaxistooltip")===null&&(e.xaxisTooltip=B.createElementNS("http://www.w3.org/1999/xhtml","div"),e.xaxisTooltip.setAttribute("class",i+" apexcharts-theme-"+t.config.tooltip.theme),a.appendChild(e.xaxisTooltip),e.xaxisTooltipText=B.createElementNS("http://www.w3.org/1999/xhtml","div"),e.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),e.xaxisTooltipText.style.fontFamily=t.config.xaxis.tooltip.style.fontFamily||t.config.chart.fontFamily,e.xaxisTooltipText.style.fontSize=t.config.xaxis.tooltip.style.fontSize,e.xaxisTooltip.appendChild(e.xaxisTooltipText))}drawYaxisTooltip(){const t=this.w,e=this.ttCtx;for(let s=0;s<t.config.yaxis.length;s++){const i=t.config.yaxis[s].opposite||t.config.yaxis[s].crosshairs.opposite;e.yaxisOffX=i?t.layout.gridWidth+1:1;const a=i?`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-right`:`apexcharts-yaxistooltip apexcharts-yaxistooltip-${s} apexcharts-yaxistooltip-left`,n=t.dom.elWrap;t.dom.baseEl.querySelector(`.apexcharts-yaxistooltip.apexcharts-yaxistooltip-${s}`)===null&&(e.yaxisTooltip=B.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltip.setAttribute("class",a+" apexcharts-theme-"+t.config.tooltip.theme),n.appendChild(e.yaxisTooltip),s===0&&(e.yaxisTooltipText=[]),e.yaxisTooltipText[s]=B.createElementNS("http://www.w3.org/1999/xhtml","div"),e.yaxisTooltipText[s].classList.add("apexcharts-yaxistooltip-text"),e.yaxisTooltip.appendChild(e.yaxisTooltipText[s]))}}setXCrosshairWidth(){var t,e;const s=this.w,i=this.ttCtx,a=i.getElXCrosshairs();if(i.xcrosshairsWidth=parseInt(s.config.xaxis.crosshairs.width,10),s.globals.comboCharts){const n=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(n!==null&&s.config.xaxis.crosshairs.width==="barWidth"){const r=parseFloat((e=n.getAttribute("barWidth"))!=null?e:"0");i.xcrosshairsWidth=r}else if(s.config.xaxis.crosshairs.width==="tickWidth"){const r=s.labelData.labels.length;i.xcrosshairsWidth=s.layout.gridWidth/r}}else if(s.config.xaxis.crosshairs.width==="tickWidth"){const n=s.labelData.labels.length;i.xcrosshairsWidth=s.layout.gridWidth/n}else if(s.config.xaxis.crosshairs.width==="barWidth"){const n=s.dom.baseEl.querySelector(".apexcharts-bar-area");if(n!==null){const r=parseFloat((t=n.getAttribute("barWidth"))!=null?t:"0");i.xcrosshairsWidth=r}else i.xcrosshairsWidth=1}s.globals.isBarHorizontal&&(i.xcrosshairsWidth=0),a!==null&&i.xcrosshairsWidth>0&&a.setAttribute("width",String(i.xcrosshairsWidth))}handleYCrosshair(){const t=this.w,e=this.ttCtx;e.ycrosshairs=t.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}drawYaxisTooltipText(t,e,s){const i=this.ttCtx,a=this.w,n=a.globals,r=n.seriesYAxisMap[t];if(i.yaxisTooltips[t]&&r.length>0){const o=a.formatters.yLabelFormatters[t],l=i.getElGrid();if(!l)return;const c=l.getBoundingClientRect(),h=r[0];let d=0;s.yRatio.length>1&&(d=h);const f=(e-c.top)*s.yRatio[d],u=n.maxYArr[h]-n.minYArr[h];let g=n.minYArr[h]+(u-f);a.config.yaxis[t].reversed&&(g=n.maxYArr[h]-(u-f)),i.tooltipPosition.moveYCrosshairs(e-c.top),i.yaxisTooltipText[t].innerHTML=o(g),i.tooltipPosition.moveYAxisTooltip(t)}}}class $n{constructor(t,e){this.w=t,this.ctx=e,this.tConfig=t.config.tooltip,this.tooltipUtil=new ra(this),this.tooltipLabels=new Yn(this),this.tooltipPosition=new oa(this),this.marker=new zn(this),this.intersect=new Hn(this),this.axesTooltip=new Wn(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.xaxisTooltipText=null,this.yaxisTooltip=null,this.yaxisTooltipText=null,this.yaxisTTEls=null,this.xaxisOffY=0,this.yaxisOffX=0,this.xcrosshairsWidth=0,this.ycrosshairs=null,this.ycrosshairsHidden=null,this.tooltip=null,this.e=null,this.isBarShared=!t.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now(),this.dimensionUpdateScheduled=!1,this.xyRatios=null,this.isXAxisTooltipEnabled=!1,this.yaxisTooltips=[],this.allTooltipSeriesGroups=[],this.xAxisTicksPositions=null,this.dataPointsDividedHeight=0,this.dataPointsDividedWidth=0,this.tooltipTitle=null,this.legendLabels=null,this.ttItems=null,this.seriesBound=null,this.seriesHoverTimeout=void 0,this.clientX=0,this.clientY=0,this.barSeriesHeight=0,this.tooltipRect={x:0,y:0,ttWidth:0,ttHeight:0}}setupDimensionCache(){const t=this.w,e=this.getElTooltip();e&&(this.updateDimensionCache(),typeof ResizeObserver<"u"&&!t.globals.resizeObserver&&(t.globals.resizeObserver=new ResizeObserver(()=>{this.dimensionUpdateScheduled||(this.dimensionUpdateScheduled=!0,requestAnimationFrame(()=>{this.updateDimensionCache(),this.dimensionUpdateScheduled=!1}))}),t.globals.resizeObserver.observe(e)))}updateDimensionCache(){const t=this.w,e=this.getElTooltip();if(!e)return;const s=e.getBoundingClientRect();t.globals.dimensionCache.tooltip={width:s.width,height:s.height,lastUpdate:Date.now()}}getCachedDimensions(){const t=this.w;if(t.globals.dimensionCache.tooltip){const s=t.globals.dimensionCache.tooltip;if(Date.now()-s.lastUpdate<1e3)return{ttWidth:s.width,ttHeight:s.height}}this.updateDimensionCache();const e=t.globals.dimensionCache.tooltip;
31return e?{ttWidth:e.width,ttHeight:e.height}:{ttWidth:0,ttHeight:0}}getElTooltip(t){return t||(t=this),t.w.dom.baseEl?t.w.dom.baseEl.querySelector(".apexcharts-tooltip:not(.apexcharts-annotation-tooltip)"):null}getElXCrosshairs(){return this.w.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}getElGrid(){return this.w.dom.baseEl.querySelector(".apexcharts-grid")}drawTooltip(t){const e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map(o=>!!(o.show&&o.tooltip.enabled&&e.globals.axisCharts)),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);const s=this.getElTooltip();s?.parentNode&&s.parentNode.removeChild(s),this.tooltipTitle=null;const i=B.createElementNS("http://www.w3.org/1999/xhtml","div");i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add(`apexcharts-theme-${this.tConfig.theme||"light"}`),this.tConfig.fillSeriesColor&&i.classList.add("apexcharts-tooltip-fill-series"),this.tConfig.style&&this.tConfig.style.background&&i.style.setProperty("--apx-tt-bg",this.tConfig.style.background);const a=this.tConfig.shared&&e.config.series.length>1&&!e.globals.isBarHorizontal&&e.config.chart.type!=="heatmap";if(this.tConfig.arrow&&!this.tConfig.followCursor&&!this.tConfig.fixed.enabled&&!a&&!this.tConfig.fillSeriesColor&&e.globals.axisCharts){const o=B.createElementNS("http://www.w3.org/1999/xhtml","div");o.classList.add("apexcharts-tooltip-arrow"),i.appendChild(o)}if(e.config.chart.accessibility.enabled&&e.config.chart.accessibility.announcements.enabled&&(i.setAttribute("role","tooltip"),i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true"),i.setAttribute("aria-hidden","true")),e.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();const o=new ie(this.w,this.ctx,void 0);this.xAxisTicksPositions=o.getXAxisTicksPositions()}if((e.globals.comboCharts||this.tConfig.intersect||e.config.chart.type==="rangeBar")&&!this.tConfig.shared&&(this.showOnIntersect=!0),(e.config.markers.size===0||e.globals.markers.largestSize===0)&&this.marker.drawDynamicPoints(),e.globals.collapsedSeries.length===e.seriesData.series.length)return;this.dataPointsDividedHeight=e.layout.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.layout.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=B.createElementNS("http://www.w3.org/1999/xhtml","div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));let r=e.seriesData.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(this.showOnIntersect?r=1:r=e.seriesData.series.length),this.legendLabels=e.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(r),this.addSVGEvents(),this.setupDimensionCache()}createTTElements(t){const e=this.w,s=[],i=this.getElTooltip();if(!i)return s;for(let a=0;a<t;a++){const n=B.createElementNS("http://www.w3.org/1999/xhtml","div");n.classList.add("apexcharts-tooltip-series-group",`apexcharts-tooltip-series-group-${a}`),n.style.order=String(e.config.tooltip.inverseOrder?t-a:a+1);const r=B.createElementNS("http://www.w3.org/1999/xhtml","span");r.classList.add("apexcharts-tooltip-marker"),e.config.tooltip.fillSeriesColor?r.style.backgroundColor=e.globals.colors[a]:r.style.color=e.globals.colors[a];const o=e.config.markers.shape;let l=o;Array.isArray(o)&&(l=o[a]),r.setAttribute("shape",l),r.innerHTML=On(l),n.appendChild(r);const c=B.createElementNS("http://www.w3.org/1999/xhtml","div");c.classList.add("apexcharts-tooltip-text"),c.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,c.style.fontSize=this.tConfig.style.fontSize,["y","goals","z"].forEach(h=>{const d=B.createElementNS("http://www.w3.org/1999/xhtml","div");d.classList.add(`apexcharts-tooltip-${h}-group`);const f=B.createElementNS("http://www.w3.org/1999/xhtml","span");f.classList.add(`apexcharts-tooltip-text-${h}-label`),d.appendChild(f);const u=B.createElementNS("http://www.w3.org/1999/xhtml","span");u.classList.add(`apexcharts-tooltip-text-${h}-value`),d.appendChild(u),c.appendChild(d)}),n.appendChild(c),i.appendChild(n),s.push(n)}return s}addSVGEvents(){const t=this.w,e=t.config.chart.type,s=this.getElTooltip();if(!s)return;const i=e==="bar"||e==="candlestick"||e==="boxPlot"||e==="violin"||e==="rangeBar",a=e==="area"||e==="line"||e==="scatter"||e==="bubble"||e==="radar",n=t.dom.Paper.node,r=this.getElGrid();r&&(this.seriesBound=r.getBoundingClientRect());const o=[],l=[],c={hoverArea:n,elGrid:r,tooltipEl:s,tooltipY:o,tooltipX:l,ttItems:this.ttItems};let h;if(t.globals.axisCharts&&(a?h=t.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):i?h=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-violin-area, .apexcharts-series .apexcharts-rangebar-area"):(e==="heatmap"||e==="treemap")&&(h=t.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),h&&h.length))for(let f=0;f<h.length;f++)o.push(h[f].getAttribute("cy")),l.push(h[f].getAttribute("cx"));
31if(t.globals.xyCharts&&!this.showOnIntersect||t.globals.comboCharts&&!this.showOnIntersect||i&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([n],c);else if(i&&!t.globals.comboCharts||a&&this.showOnIntersect)this.addDatapointEventsListeners(c);else if(e==="heatmap"&&t.globals.activeRenderer&&t.globals.activeRenderer.kind==="canvas")this.addPathsEventListeners([n],c);else if(!t.globals.axisCharts||e==="heatmap"||e==="treemap"){const f=t.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(f,c)}if(this.showOnIntersect){const f=t.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");f.length>0&&this.addPathsEventListeners(f,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}drawFixedTooltipRect(){const t=this.w,e=this.getElTooltip();if(!e)return{x:0,y:0,ttWidth:0,ttHeight:0};const s=e.getBoundingClientRect(),i=s.width+10,a=s.height+10;let n=this.tConfig.fixed.offsetX,r=this.tConfig.fixed.offsetY;const o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(n=n+t.globals.svgWidth-i+10),o.indexOf("bottom")>-1&&(r=r+t.globals.svgHeight-a-10),this.tooltipPosition.applyTooltipPosition(e,{x:n,y:r}),{x:n,y:r,ttWidth:i,ttHeight:a}}addDatapointEventsListeners(t){const s=this.w.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(s,t)}addPathsEventListeners(t,e){const s=this;for(let i=0;i<t.length;i++){const a={paths:t[i],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(r=>t[i].addEventListener(r,s.onSeriesHover.bind(s,a),{capture:!1,passive:!0}))}}onSeriesHover(t,e){const i=Date.now()-this.lastHoverTime;i>=20?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(()=>{this.seriesHover(t,e)},20-i))}seriesHover(t,e){if(this.w.globals.isDestroyed)return;this.lastHoverTime=Date.now();let s=[];const i=this.w,a=n=>{var r,o,l;const c=(l=(o=(r=n?.w)==null?void 0:r.config)==null?void 0:o.chart)==null?void 0:l.link;return!!(c&&typeof c.dimension=="function")};i.config.chart.group&&!a(this.ctx)&&(s=this.ctx.getSyncedCharts().filter(n=>!a(n))),!(i.globals.axisCharts&&(i.globals.minX===-1/0&&i.globals.maxX===1/0||i.globals.dataPoints===0))&&(s.length?s.forEach(n=>{const r=this.getElTooltip(n),o={paths:t.paths,tooltipEl:r,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:n.w.globals.tooltip.ttItems};n.w.globals.minX===this.w.globals.minX&&n.w.globals.maxX===this.w.globals.maxX&&n.w.globals.tooltip.seriesHoverByContext({chartCtx:n,ttCtx:n.w.globals.tooltip,opt:o,e})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e}))}seriesHoverByContext({chartCtx:t,ttCtx:e,opt:s,e:i}){const a=t.w;if(!this.getElTooltip(t))return;const r=e.getCachedDimensions();e.tooltipRect={x:0,y:0,ttWidth:r.ttWidth,ttHeight:r.ttHeight},e.e=i,e.tooltipUtil.hasBars()&&!a.globals.comboCharts&&!e.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new nt(t.w).toggleSeriesOnHover(i,i.target.parentNode),a.globals.axisCharts?e.axisChartsTooltips({e:i,opt:s,tooltipRect:e.tooltipRect}):e.nonAxisChartsTooltips({e:i,opt:s,tooltipRect:e.tooltipRect}),e.fixedTooltip&&e.drawFixedTooltipRect()}axisChartsTooltips({e:t,opt:e}){var s;const i=this.w;let a,n;const r=e.elGrid.getBoundingClientRect(),o=t.type==="touchmove"?t.touches[0].clientX:t.clientX,l=t.type==="touchmove"?t.touches[0].clientY:t.clientY;if(this.clientY=l,this.clientX=o,i.interact.capturedSeriesIndex=-1,i.interact.capturedDataPointIndex=-1,l<r.top||l>r.top+r.height){this.handleMouseOut(e);return}if(i.dom.elWrap.querySelector(".apexcharts-annotation-tooltip.apexcharts-active")){this.handleMouseOut(e);return}if(Array.isArray(this.tConfig.enabledOnSeries)&&!i.config.tooltip.shared){const u=parseInt(e.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(u)<0){this.handleMouseOut(e);return}}const c=this.getElTooltip();if(!c)return;const h=this.getElXCrosshairs();let d=[];i.config.chart.group&&(d=this.ctx.getSyncedCharts());
31const f=i.globals.xyCharts||i.config.chart.type==="bar"&&!i.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||i.globals.comboCharts&&this.tooltipUtil.hasBars();if(t.type==="mousemove"||t.type==="touchmove"||t.type==="mouseup"){if(i.globals.collapsedSeries.length+i.globals.ancillaryCollapsedSeries.length===i.seriesData.series.length)return;h!==null&&h.classList.add("apexcharts-active");const u=(s=this.yaxisTooltips)==null?void 0:s.filter(p=>p===!0),g=this.ycrosshairs;if(g!==null&&u?.length&&g.classList.add("apexcharts-active"),f&&!this.showOnIntersect||d.length>1)this.handleStickyTooltip(t,o,l,e);else if(i.config.chart.type==="heatmap"||i.config.chart.type==="treemap"){const p=this.intersect.handleHeatTreeTooltip({e:t,opt:e,x:a,y:n,type:i.config.chart.type});if(p.noHit){this.handleMouseOut(e);return}a=p.x,n=p.y,p.positioned||(c.style.left=a+"px",c.style.top=n+"px")}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:t,opt:e}),this.tooltipUtil.hasMarkers(0)&&this.intersect.handleMarkerTooltip({e:t,opt:e,x:a,y:n});if(this.yaxisTooltips&&this.yaxisTooltips.length)for(let p=0;p<i.config.yaxis.length;p++)this.axesTooltip.drawYaxisTooltipText(p,l,this.xyRatios);i.dom.baseEl.classList.add("apexcharts-tooltip-active"),e.tooltipEl.classList.add("apexcharts-active"),i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&e.tooltipEl.removeAttribute("aria-hidden")}else(t.type==="mouseout"||t.type==="touchend")&&this.handleMouseOut(e)}nonAxisChartsTooltips({e:t,opt:e,tooltipRect:s}){var i,a,n,r;const o=this.w,l=e.paths.getAttribute("rel"),c=this.getElTooltip();if(!c)return;const h=o.dom.elWrap.getBoundingClientRect();if(t.type==="mousemove"||t.type==="touchmove"){if(o.dom.baseEl.classList.add("apexcharts-tooltip-active"),c.classList.add("apexcharts-active"),o.config.chart.accessibility.enabled&&o.config.chart.accessibility.announcements.enabled&&c.removeAttribute("aria-hidden"),o.config.chart.type==="unit"){const g=t.target&&typeof t.target.closest=="function"?t.target.closest(".apexcharts-unit-area"):null;if(!g)return;this.renderUnitTooltip(g)}else this.tooltipLabels.drawSeriesTexts({ttItems:e.ttItems,i:parseInt(l,10)-1,shared:!1});let d,f;const u=e.paths.querySelector("path[data\\:cx]")||e.paths;if(o.config.tooltip.intersect&&u.hasAttribute("data:cx")&&u.hasAttribute("data:cy")){const g=o.dom.Paper.node.getBoundingClientRect();d=g.left-h.left+parseFloat(u.getAttribute("data:cx"))-s.ttWidth/2,f=g.top-h.top+parseFloat(u.getAttribute("data:cy"))-s.ttHeight-10}else d=((i=o.interact.clientX)!=null?i:0)-h.left-s.ttWidth/2,f=((a=o.interact.clientY)!=null?a:0)-h.top-s.ttHeight-10;if(c.style.left=d+"px",c.style.top=f+"px",o.config.legend.tooltipHoverFormatter){const g=o.config.legend.tooltipHoverFormatter,p=l-1,b=(n=this.legendLabels)==null?void 0:n[p];if(!b)return;const m=b.getAttribute("data:default-text"),A=g(m,{seriesIndex:p,dataPointIndex:p,w:o});b.innerHTML=A}}else(t.type==="mouseout"||t.type==="touchend")&&(c.classList.remove("apexcharts-active"),o.dom.baseEl.classList.remove("apexcharts-tooltip-active"),o.config.legend.tooltipHoverFormatter&&((r=this.legendLabels)==null||r.forEach(d=>{const f=d.getAttribute("data:default-text");d.innerHTML=decodeURIComponent(f??"")})))}renderUnitTooltip(t){var e,s,i,a,n;const r=this.w,o=this.getElTooltip();if(!o)return;const l=parseInt(t.getAttribute("i")||"0",10),c=parseInt(t.getAttribute("j")||"0",10);if(typeof r.config.tooltip.custom=="function"){this.tooltipLabels.handleCustomTooltip({i:l,j:c,y1:null,y2:null,w:r});return}const h=r.seriesData.seriesNames[l]||`series-${l+1}`,d=Math.round(Number(r.seriesData.series[l])||0),f=t.parentNode,u=f&&f.querySelectorAll?f.querySelectorAll(".apexcharts-unit-area").length:d,g=r.config.plotOptions.unit||{},p=g.unitValue>0?g.unitValue:1,b=r.seriesData.unitData&&r.seriesData.unitData[l],m=b?b[c]:void 0,A=m&&typeof m=="object"?m:null,v=A&&A.fillColor||r.globals.colors&&r.globals.colors[l]||"#008FFB";let y;const w=g.tooltip&&g.tooltip.formatter;if(typeof w=="function")y=w({seriesName:h,seriesIndex:l,dataPointIndex:c,count:u,value:d,unitValue:p,datum:m,color:v,w:r});else if(m!=null){const M=A&&(i=(s=(e=A.name)!=null?e:A.label)!=null?s:A.x)!=null?i:null,L=A?(n=(a=A.value)!=null?a:A.y)!=null?n:null:m;y=M!=null&&L!=null?`${M}: ${L}
31`:M!=null?String(M):L!=null?String(L):`#${(c+1).toLocaleString()} of ${u.toLocaleString()}`}else y=`#${(c+1).toLocaleString()} of ${u.toLocaleString()}`,p!==1&&(y+=` &middot; ${p.toLocaleString()} per dot`);const _=r.config.chart.fontFamily||"inherit",C=r.config.tooltip.style&&r.config.tooltip.style.fontSize||"12px",S=o.querySelector(".apexcharts-tooltip-arrow");o.innerHTML=`<div class="apexcharts-tooltip-title" style="font-family: ${_}; font-size: ${C};">${h}</div><div class="apexcharts-tooltip-series-group apexcharts-active" style="display: flex;"><span class="apexcharts-tooltip-marker" style="background-color: ${v};"></span><div class="apexcharts-tooltip-text" style="font-family: ${_}; font-size: ${C};"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-value">${y}</span></div></div></div>`,S&&o.appendChild(S);const k=o.getBoundingClientRect();this.tooltipRect.ttWidth=k.width,this.tooltipRect.ttHeight=k.height}handleStickyTooltip(t,e,s,i){const a=this.w,n=this.tooltipUtil.getNearestValues({context:this,hoverArea:i.hoverArea,elGrid:i.elGrid,clientX:e,clientY:s}),r=n.j;let o=n.capturedSeries;o!==null&&a.globals.collapsedSeriesIndices.includes(o??-1)&&(o=null);const l=i.elGrid.getBoundingClientRect();if(n.hoverX<0||n.hoverX>l.width){this.handleMouseOut(i);return}if(o!==null)this.handleStickyCapturedSeries(t,o??-1,i,r??0);else if(this.tooltipUtil.isXoverlap(r??0)||a.globals.isBarHorizontal){const c=a.seriesData.series.findIndex((h,d)=>!a.globals.collapsedSeriesIndices.includes(d));this.create(t,this,c,r??0,i.ttItems)}}handleStickyCapturedSeries(t,e,s,i){const a=this.w;if(!this.tConfig.shared&&a.seriesData.series[e][i]===null){this.handleMouseOut(s);return}if(typeof a.seriesData.series[e][i]<"u")this.tConfig.shared&&this.tooltipUtil.isXoverlap(i)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,i,s.ttItems):this.create(t,this,e,i,s.ttItems,!1);else if(this.tooltipUtil.isXoverlap(i)){const n=a.seriesData.series.findIndex((r,o)=>!a.globals.collapsedSeriesIndices.includes(o));this.create(t,this,n,i,s.ttItems)}}deactivateHoverFilter(){const t=this.w,e=new I(this.w,this.ctx),s=t.dom.Paper.find(".apexcharts-bar-area");for(let i=0;i<s.length;i++)e.pathMouseLeave(s[i],void 0)}handleMouseOut(t){var e,s;const i=this.w,a=this.getElXCrosshairs();i.dom.baseEl.classList.remove("apexcharts-tooltip-active"),t.tooltipEl.classList.remove("apexcharts-active"),delete t.tooltipEl.dataset.positioned,i.config.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&t.tooltipEl.setAttribute("aria-hidden","true"),this.deactivateHoverFilter(),i.config.chart.type!=="bubble"&&this.marker.resetPointsSize(),a!==null&&a.classList.remove("apexcharts-active");const n=this.ycrosshairs;if(n!==null&&n.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&((e=this.xaxisTooltip)==null||e.classList.remove("apexcharts-active")),this.yaxisTooltips&&this.yaxisTooltips.length){this.yaxisTTEls===null&&(this.yaxisTTEls=[...i.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip")]);for(let r=0;r<this.yaxisTTEls.length;r++)this.yaxisTTEls[r].classList.remove("apexcharts-active")}i.config.legend.tooltipHoverFormatter&&((s=this.legendLabels)==null||s.forEach(r=>{const o=r.getAttribute("data:default-text");r.innerHTML=decodeURIComponent(o??"")}))}markerClick(t,e,s){const i=this.w;typeof i.config.chart.events.markerClick=="function"&&i.config.chart.events.markerClick(t,this.ctx,{seriesIndex:e,dataPointIndex:s,w:i}),this.ctx.events.fireEvent("markerClick",[t,this.ctx,{seriesIndex:e,dataPointIndex:s,w:i}])}_hasCustomSeries(){const t=this.w;return Tt(t.config.chart.type)?!0:(t.config.series||[]).some(s=>s&&s.type&&Tt(s.type))}create(t,e,s,i,a,n=null){var r,o,l,c,h,d,f,u,g,p,b,m,A,v,y,w,_,C,S,k,M;const L=this.w,E=e;t.type==="mouseup"&&this.markerClick(t,s,i),n===null&&(n=this.tConfig.shared);const D=this.tooltipUtil.hasMarkers(s),T=((o=(r=this.ctx)==null?void 0:r.renderer)==null?void 0:o.kind)==="canvas",F=T&&!this.tooltipUtil.hasBars(),P=!T&&!D&&!this.tooltipUtil.hasBars()&&this._hasCustomSeries(),Y=F||P,z=this.tooltipUtil.getElBars(),W=()=>{L.globals.markers.largestSize>0&&!T?E.marker.enlargePoints(i):E.tooltipPosition.moveDynamicPointsOnHover(i)};if(L.config.legend.tooltipHoverFormatter){const X=L.config.legend.tooltipHoverFormatter,V=Array.from((l=this.legendLabels)!=null?l:[]);
31V.forEach(U=>{const $=U.getAttribute("data:default-text");U.innerHTML=decodeURIComponent($??"")});for(let U=0;U<V.length;U++){const $=V[U],q=parseInt((c=$.getAttribute("i"))!=null?c:"",10),K=decodeURIComponent((h=$.getAttribute("data:default-text"))!=null?h:""),Q=X(K,{seriesIndex:n?q:s,dataPointIndex:i,w:L});if(n)$.innerHTML=L.globals.collapsedSeriesIndices.indexOf(q)<0?Q:K;else if($.innerHTML=q===s?Q:K,s===q)break}}const O=L.rangeData,N=G(G({ttItems:a,i:s,j:i},((g=(u=(f=(d=O.seriesRange)==null?void 0:d[s])==null?void 0:f[i])==null?void 0:u.y[0])==null?void 0:g.y1)!==void 0&&{y1:(A=(m=(b=(p=O.seriesRange)==null?void 0:p[s])==null?void 0:b[i])==null?void 0:m.y[0])==null?void 0:A.y1}),((_=(w=(y=(v=O.seriesRange)==null?void 0:v[s])==null?void 0:y[i])==null?void 0:w.y[0])==null?void 0:_.y2)!==void 0&&{y2:(M=(k=(S=(C=O.seriesRange)==null?void 0:C[s])==null?void 0:S[i])==null?void 0:k.y[0])==null?void 0:M.y2});if(n){if(E.tooltipLabels.drawSeriesTexts(Z(G({},N),{shared:this.showOnIntersect?!1:this.tConfig.shared})),D||Y)W();else if(this.tooltipUtil.hasBars()&&(T&&E.tooltipPosition.moveStickyTooltipOverBars(i,s),this.barSeriesHeight=this.tooltipUtil.getBarsHeight([...z]),this.barSeriesHeight>0)){const X=new I(this.w,this.ctx),V=L.dom.Paper.find(`.apexcharts-bar-area[j='${i}']`);this.deactivateHoverFilter(),E.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&W(),E.tooltipPosition.moveStickyTooltipOverBars(i,s);for(let $=0;$<V.length;$++)X.pathMouseEnter(V[$],void 0)}}else E.tooltipLabels.drawSeriesTexts(G({shared:!1},N)),this.tooltipUtil.hasBars()&&E.tooltipPosition.moveStickyTooltipOverBars(i,s),D?E.tooltipPosition.moveMarkers(s,i):Y&&E.tooltipPosition.moveDynamicPointOnHover(i,s)}}class Vn{constructor(t,e){this.w=t,this.ctx=e,this.kind="svg"}beginSeries(){}present(){return null}clear(){}group(t){return this.ctx.graphics.group(t)}drawPath(t){return this.ctx.graphics.drawPath(t)}drawLine(...t){return this.ctx.graphics.drawLine(...t)}drawRect(...t){return this.ctx.graphics.drawRect(...t)}drawCircle(t,e){return this.ctx.graphics.drawCircle(t,e)}drawText(t){return this.ctx.graphics.drawText(t)}renderPaths(t){return this.ctx.graphics.renderPaths(t)}drawMarker(t,e,s={}){return this.ctx.graphics.drawMarker(t,e,s)}supports(t){return!0}hitTest(){return null}restyle(){}toBitmap(){return null}destroy(){}}const Ke="__apexcharts_renderers__";function Ae(){const x=globalThis;return x[Ke]||(x[Ke]=new Map),x[Ke]}class la{static get _rendererRegistry(){return Ae()}static registerRenderer(t,e){Ae().set(t,e)}static unregisterRenderer(t){Ae().delete(t)}constructor(t,e){this.w=t,this.ctx=e,this.svg=new Vn(t,e),this.active=this.svg,this._activeKind="svg",this._instances={}}_desiredKind(){const t=this.w.config.chart,e=t.renderer||"svg";if(!H.isBrowser()||e==="svg"||qs(this.w))return"svg";if(e==="canvas")return"canvas";const s=qa(this.w),i=t.rendererThreshold||8e3;return s>=i?"canvas":"svg"}resolve(){const t=this.w.config.chart.renderer||"svg",e=this._desiredKind();if(e!=="svg"){const s=Ae().get(e);if(s)return this._instances[e]||(this._instances[e]=s(this.w,this.ctx)),this.active=this._instances[e],this._activeKind=e,this.ctx.renderer=this.active,this.w.globals.activeRenderer=this.active,this._activeKind;t===e&&console.warn(`[apexcharts] renderer:"${e}" requested but that renderer is not bundled (import 'apexcharts/features/renderer-${e}'); falling back to SVG.`)}else t==="canvas"&&qs(this.w)&&console.warn('[apexcharts] renderer:"canvas" requested but this chart uses a feature the canvas renderer does not render yet (gradient/pattern/image fill or a state color-matrix filter); falling back to SVG.');return this.active=this.svg,this._activeKind="svg",this.ctx.renderer=this.active,this.w.globals.activeRenderer=this.active,this._activeKind}getActiveKind(){return this._activeKind}teardown(){for(const t in this._instances){const e=this._instances[t];e&&typeof e.destroy=="function"&&e.destroy()}this._instances={},this.active=this.svg,this._activeKind="svg"}}class ot{constructor(t){this.node=t,t&&(t.instance=this),this._listeners=[],this._filter=null}attr(t,e){if(typeof t=="string"&&e===void 0)return this.node.getAttribute(t);const s=typeof t=="string"?{[t]:e}:t;for(const i in s){let a=s[i];a===null?this.node.removeAttribute(i):a!==void 0&&(typeof a=="number"&&isNaN(a)&&(a=0),this.node.setAttribute(i,a))}if(this.node.nodeName==="text"&&s.x!=null){const i=this.node.querySelectorAll("tspan[data-newline]");for(let a=0;a<i.length;a++)i[a].setAttribute("x",s.x)}return this}css(t){for(const e in t)this.node.style[e]=t[e];return this}fill(t){return typeof t=="object"?this.attr(t):this.attr("fill",t)}stroke(t){return typeof t=="object"?(t.color!==void 0&&this.attr("stroke",t.color),t.width!==void 0&&this.attr("stroke-width",t.width),t.dasharray!==void 0&&this.attr("stroke-dasharray",t.dasharray),t.linecap!==void 0&&this.attr("stroke-linecap",t.linecap),t.opacity!==void 0&&this.attr("stroke-opacity",t.opacity),this):this.attr("stroke",t)}size(t,e){return this.attr({width:t,height:e})}move(t,e){return this.attr({x:t,y:e})}center(t,e){if(this.node.nodeName==="g"){const s=this.bbox(),i=t-(s.x+s.width/2),a=e-(s.y+s.height/2);return this.attr("transform",`translate(${i}, ${a})`)}return this.attr({cx:t,cy:e})}add(t){return t&&t.__isCanvasMark?this:(this.node.appendChild(t.node||t),this)}addTo(t){return(t.node||t).appendChild(this.node),this}remove(){return this.node.parentNode&&this.node.parentNode.removeChild(this.node),this}clear(){for(;this.node.firstChild;)this.node.removeChild(this.node.firstChild);return this}find(t){return Array.from(this.node.querySelectorAll(t)).map(e=>e.instance||new ot(e))}findOne(t){const e=this.node.querySelector(t);return e?e.instance||new ot(e):null}on(t,e){const s=t.split(".")[0];return this._listeners.push({event:t,eventType:s,handler:e}),this.node.addEventListener(s,e),this}
31off(t,e){if(!t&&!e)this._listeners.forEach(s=>{this.node.removeEventListener(s.eventType,s.handler)}),this._listeners=[];else if(t&&!e){const s=t.split(".")[0];this._listeners=this._listeners.filter(i=>i.eventType===s?(this.node.removeEventListener(i.eventType,i.handler),!1):!0)}else{const s=t.split(".")[0];this._listeners=this._listeners.filter(i=>i.eventType===s&&i.handler===e?(this.node.removeEventListener(i.eventType,i.handler),!1):!0)}return this}each(t,e){return Array.from(this.node.children).forEach(i=>{const a=i.instance||new ot(i);t.call(a),e&&a.each(t,e)}),this}removeClass(t){return t==="*"?this.node.removeAttribute("class"):this.node.classList.remove(t),this}children(){return Array.from(this.node.childNodes).filter(t=>t.nodeType===1).map(t=>t.instance||new ot(t))}hide(){return this.node.style.display="none",this}show(){return this.node.style.display="",this}bbox(){if(typeof this.node.getBBox=="function")try{return this.node.getBBox()}catch{}return{x:0,y:0,width:0,height:0}}tspan(t){const e=B.createElementNS("http://www.w3.org/2000/svg","tspan");return e.textContent=t,this.node.appendChild(e),new ot(e)}plot(t){return typeof t=="string"&&this.attr("d",t),this}animate(){throw new Error("Animation module not loaded")}filterWith(){throw new Error("Filter module not loaded")}}let Gn=0;class Un extends ot{constructor(t,e,s){const i=e==="radial"?"radialGradient":"linearGradient",a=B.createElementNS(tt,i);super(a),this._id="SvgjsGradient"+ ++Gn,this.attr("id",this._id),typeof s=="function"&&s(new qn(this));let n=t.node.querySelector("defs");n||(n=B.createElementNS(tt,"defs"),t.node.appendChild(n)),n.appendChild(this.node)}stop(t,e,s){const i=B.createElementNS(tt,"stop");return i.setAttribute("offset",t),i.setAttribute("stop-color",e),s!==void 0&&i.setAttribute("stop-opacity",String(s)),this.node.appendChild(i),this}from(t,e){return this.attr({x1:t,y1:e})}to(t,e){return this.attr({x2:t,y2:e})}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}}class qn{constructor(t){this.gradient=t}stop(t,e,s){return this.gradient.stop(t,e,s),this}}let jn=0;class Zn extends ot{constructor(t,e,s,i){const a=B.createElementNS(tt,"pattern");if(super(a),this._id="SvgjsPattern"+ ++jn,this.attr({id:this._id,width:e,height:s,patternUnits:"userSpaceOnUse"}),typeof i=="function"){const r=new we(this.node);i(r)}let n=t.node.querySelector("defs");n||(n=B.createElementNS(tt,"defs"),t.node.appendChild(n)),n.appendChild(this.node)}url(){return"url(#"+this._id+")"}toString(){return this.url()}valueOf(){return this.url()}fill(){return this.url()}}class we extends ot{line(t,e,s,i){const a=this._make("line");return t!==void 0&&a.attr({x1:t,y1:e,x2:s,y2:i}),a}rect(t,e){const s=this._make("rect");return t!==void 0&&s.attr({width:t,height:e}),s}circle(t){const e=this._make("circle");return t!==void 0&&e.attr({r:t/2,cx:t/2,cy:t/2}),e}path(t){const e=this._make("path");return t&&e.attr("d",t),e}polygon(t){const e=this._make("polygon");return t&&e.attr("points",t),e}group(){return this._makeContainer("g")}defs(){return this._makeContainer("defs")}plain(t){const e=B.createElementNS(tt,"text");e.textContent=t;const s=new ot(e);return this.node.appendChild(e),s}text(t){const e=B.createElementNS(tt,"text"),s=new ot(e);return this.node.appendChild(e),typeof t=="function"&&t(new Kn(e)),s}image(t,e){const s=B.createElementNS(tt,"image");s.setAttributeNS("http://www.w3.org/1999/xlink","href",t);const i=new ot(s);if(this.node.appendChild(s),typeof e=="function"&&H.isBrowser()){const a=new Image;a.onload=function(){i.size(a.width,a.height),e.call(i,{width:a.width,height:a.height})},a.src=t}return i}gradient(t,e){return new Un(this,t,e)}pattern(t,e,s){return new Zn(this,t,e,s)}_make(t){const e=B.createElementNS(tt,t);return this.node.appendChild(e),new ot(e)}_makeContainer(t){const e=B.createElementNS(tt,t);return this.node.appendChild(e),new we(e)}}class Kn{constructor(t){this.textNode=t}tspan(t){const e=B.createElementNS(tt,"tspan");return e.textContent=t,this.textNode.appendChild(e),new Jn(e,this.textNode)}}class Jn{constructor(t,e){this.node=t,this.textNode=e}newLine(){return this.node.setAttribute("dy","1.1em"),this.node.dataset.newline="1",this}}let Qn=0;class tr extends ot{constructor(){const t=B.createElementNS(tt,"filter");super(t),this._id="SvgjsFilter"+ ++Qn,this.attr("id",this._id)}}class er{constructor(t){this.filter=t}colorMatrix(t){return this._primitive("feColorMatrix",t)}offset(t){return this._primitive("feOffset",t)}gaussianBlur(t){return this._primitive("feGaussianBlur",t)}flood(t){return this._primitive("feFlood",t)}composite(t){return this._primitive("feComposite",t)}merge(t){const e=B.createElementNS(tt,"feMerge");return t.forEach(s=>{const i=B.createElementNS(tt,"feMergeNode");i.setAttribute("in",s),e.appendChild(i)}),this.filter.node.appendChild(e),new ot(e)}_primitive(t,e){const s=B.createElementNS(tt,t);for(const i in e)s.setAttribute(i,e[i]);return this.filter.node.appendChild(s),new ot(s)}}function sr(x){x.prototype.filterWith=function(t){const e=new tr;this._filter=e;let s=this.node;for(;s&&s.nodeName!=="svg";)s=s.parentNode;if(s){let i=s.querySelector("defs");i||(i=B.createElementNS(tt,"defs"),s.insertBefore(i,s.firstChild)),i.appendChild(e.node)}return t(new er(e)),this.attr("filter","url(#"+e._id+")"),this},x.prototype.unfilter=function(t){return this._filter&&(this.node.removeAttribute("filter"),t&&this._filter.node&&this._filter.node.parentNode&&this._filter.node.parentNode.removeChild(this._filter.node),this._filter=null),this},x.prototype.filterer=function(){return this._filter}}function ir(x){x.prototype.draggable=function(t){if(t===!1)return this._dragCleanup&&(this._dragCleanup(),this._dragCleanup=null),this;const e=this,s=t||{},i=a=>
31{if(a.button&&a.button!==0)return;a.stopPropagation();const r=a.type==="touchstart"?a.touches[0]:a,o=e.node,l=parseFloat(o.getAttribute("x"))||0,c=parseFloat(o.getAttribute("y"))||0,h=r.clientX,d=r.clientY,f=o.ownerSVGElement;let u=null;f&&(u=f.getScreenCTM());const g=b=>{const m=b.type==="touchmove"?b.touches[0]:b;let A=m.clientX-h,v=m.clientY-d;u&&(A=A/u.a,v=v/u.d);let y=l+A,w=c+v;const _=parseFloat(o.getAttribute("width"))||0,C=parseFloat(o.getAttribute("height"))||0;s.minX!==void 0&&y<s.minX&&(y=s.minX),s.minY!==void 0&&w<s.minY&&(w=s.minY),s.maxX!==void 0&&y+_>s.maxX&&(y=s.maxX-_),s.maxY!==void 0&&w+C>s.maxY&&(w=s.maxY-C);const S={x:y,y:w,w:_,h:C,x2:y+_,y2:w+C},k=new CustomEvent("dragmove",{detail:{handler:{move:function(M,L){o.setAttribute("x",M),o.setAttribute("y",L)}},box:S}});o.dispatchEvent(k)},p=()=>{H.isBrowser()&&(document.removeEventListener("mousemove",g),document.removeEventListener("touchmove",g),document.removeEventListener("mouseup",p),document.removeEventListener("touchend",p)),e._activeDrag=null};H.isBrowser()&&(document.addEventListener("mousemove",g),document.addEventListener("touchmove",g),document.addEventListener("mouseup",p),document.addEventListener("touchend",p),e._activeDrag={onMove:g,onUp:p})};return e.node.addEventListener("mousedown",i),e.node.addEventListener("touchstart",i),e._dragCleanup=()=>{e.node.removeEventListener("mousedown",i),e.node.removeEventListener("touchstart",i),e._activeDrag&&H.isBrowser()&&(document.removeEventListener("mousemove",e._activeDrag.onMove),document.removeEventListener("touchmove",e._activeDrag.onMove),document.removeEventListener("mouseup",e._activeDrag.onUp),document.removeEventListener("touchend",e._activeDrag.onUp),e._activeDrag=null)},e}}function ar(x){x.prototype.select=function(t){if(t===!1)return this._selectCleanup&&(this._selectCleanup(),this._selectCleanup=null),this;const e=this,{createHandle:s,updateHandle:i}=t,a=document.createElementNS(tt,"g");a.setAttribute("class","svg_select_points");const n=e.node.parentNode;n&&n.appendChild(a);const r={},o=["t","b","l","r","lt","rt","lb","rb"];o.forEach((c,h)=>{const d=new we(document.createElementNS(tt,"g"));a.appendChild(d.node);const f=s(d,[0,0],h,[],c);r[c]={group:d,handle:f}});const l=()=>{const c=parseFloat(e.attr("x"))||0,h=parseFloat(e.attr("y"))||0,d=parseFloat(e.attr("width"))||0,f=parseFloat(e.attr("height"))||0,u=e.node.getAttribute("transform");u?a.setAttribute("transform",u):a.removeAttribute("transform");const g={t:[c+d/2,h],b:[c+d/2,h+f],l:[c,h+f/2],r:[c+d,h+f/2],lt:[c,h],rt:[c+d,h],lb:[c,h+f],rb:[c+d,h+f]};o.forEach(p=>{r[p]&&g[p]&&i(r[p].group,g[p])})};return l(),e._selectHandles=a,e._selectHandlesMap=r,e._updateSelectPositions=l,e._selectCleanup=()=>{a.parentNode&&a.parentNode.removeChild(a),e._selectHandles=null,e._selectHandlesMap=null,e._updateSelectPositions=null},e},x.prototype.resize=function(t){if(t===!1)return this._resizeCleanup&&(this._resizeCleanup(),this._resizeCleanup=null),this;const e=this,s=e._selectHandlesMap;if(!s)return e;const i=[],a=n=>{const r=s[n];if(!r||!r.group||!r.group.node)return;const o=r.group.node,l=c=>{if(c.button&&c.button!==0)return;c.stopPropagation();const f=(c.type==="touchstart"?c.touches[0]:c).clientX,u=e.node.ownerSVGElement;let g=null;u&&(g=u.getScreenCTM());const p=parseFloat(e.attr("x"))||0,b=parseFloat(e.attr("width"))||0,m=v=>{let w=(v.type==="touchmove"?v.touches[0]:v).clientX-f;g&&(w=w/g.a);let _=p,C=b;n==="l"?(_=p+w,C=b-w):n==="r"&&(C=b+w),C<0&&(C=0),e.attr({x:_,width:C}),e._updateSelectPositions&&e._updateSelectPositions();const S=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(S)},A=()=>{H.isBrowser()&&(document.removeEventListener("mousemove",m),document.removeEventListener("touchmove",m),document.removeEventListener("mouseup",A),document.removeEventListener("touchend",A));const v=new CustomEvent("resize",{detail:{el:e}});e.node.dispatchEvent(v)};H.isBrowser()&&(document.addEventListener("mousemove",m),document.addEventListener("touchmove",m),document.addEventListener("mouseup",A),document.addEventListener("touchend",A))};o.addEventListener("mousedown",l),o.addEventListener("touchstart",l),i.push(()=>{o.removeEventListener("mousedown",l),o.removeEventListener("touchstart",l)})};return a("l"),a("r"),e._resizeCleanup=()=>
31{i.forEach(n=>n())},e}}sr(ot);Ha(ot);ir(ot);ar(ot);function Xe(){const x=B.createElementNS(tt,"svg"),t=new we(x);return t.attr({xmlns:tt}),t}Xe.xlink="http://www.w3.org/1999/xlink";H.isBrowser()&&typeof window.SVG>"u"&&(window.SVG=Xe);H.isBrowser()?(typeof window.SVG>"u"&&(window.SVG=Xe),typeof window.Apex>"u"&&(window.Apex={})):typeof global<"u"&&(typeof global.Apex>"u"&&(global.Apex={}),typeof global.SVG>"u"&&(global.SVG=Xe));const ca=class ps{static registerFeatures(t){for(const[e,s]of Object.entries(t))ps._featureRegistry.set(e,s)}constructor(t){this.ctx=t,this.w=t.w}initModules(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","drillDown","drillUp","drillToRoot","paper","getActiveRenderer","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend","keydown","keyup"],this.ctx.animations=new ne(this.w,this.ctx),this.ctx.axes=new Ka(this.w,this.ctx),this.ctx.core=new Nn(this.ctx.el,this.w,this.ctx),this.ctx.config=new me({}),this.ctx.data=new yt(this.w,{resetGlobals:()=>this.ctx.core.resetGlobals(),isMultipleY:()=>this.ctx.core.isMultipleY()}),this.ctx.grid=new ls(this.w,this.ctx),this.ctx.graphics=new I(this.w,this.ctx),this.ctx.coreUtils=new rt(this.w),this.ctx.crosshairs=new ds(this.w),this.ctx.events=new ja(this.w,this.ctx),this.ctx.fill=new pt(this.w),this.ctx.localization=new Za(this.w),this.ctx.options=new St,this.ctx.responsive=new Ja(this.w),this.ctx.series=new nt(this.w,{toggleDataSeries:(...e)=>{var s;return(s=this.ctx.legend)==null?void 0:s.legendHelpers.toggleDataSeries(...e)},revertDefaultAxisMinMax:()=>this.ctx.updateHelpers.revertDefaultAxisMinMax(),updateSeries:(...e)=>this.ctx.updateHelpers._updateSeries(...e)}),this.ctx.theme=new Cn(this.w),this.ctx.formatters=new be(this.w),this.ctx.titleSubtitle=new kn(this.w),this.ctx.dimensions=new Fe(this.w,this.ctx),this.ctx.updateHelpers=new Bn(this.w,this.ctx),this.ctx.rendererController=new la(this.w,this.ctx),this.ctx.renderer=this.ctx.rendererController.active;const t=new $n(this.w,this.ctx);this.w.globals.tooltip=t,Object.defineProperty(this.ctx,"tooltip",{get(){return this.w.globals.tooltip},configurable:!0}),this._initOptionalModules()}_initOptionalModules(){const t=ps._featureRegistry,e=this.w,s=this.ctx,i=t.get("exports");s.exports=i?new i(e,s):null;const a=t.get("legend");s.legend=a?new a(e,s):null;const n=t.get("morphTypeChange");s.morphTypeChange=n?new n(e,s):null;const r=t.get("drilldown");s.drilldown=r?new r(e,s):null;const o=t.get("perspectives");s.perspectives=o?new o(e,s):null;const l=t.get("storyboard");s.storyboard=l?new l(e,s):null;const c=t.get("history");s.history=c?new c(e,s):null;const h=t.get("linkedViews");s.linkedViews=h?new h(e,s):null;const d=t.get("ink");s.ink=d?new d(e,s):null;const f=t.get("measure");s.measure=f?new f(e,s):null;const u=t.get("contextMenu");s.contextMenu=u?new u(e,s):null;const g=t.get("weave");s.weave=g?new g(e,s):null;const p=t.get("osThemeWatcher");s.osThemeWatcher=p?new p(e,s):null;const b=t.get("toolbar");Object.defineProperty(s,"toolbar",{get(){var v;return!this._toolbar&&b&&(this._toolbar=new b(e,this)),(v=this._toolbar)!=null?v:null},configurable:!0});const m=t.get("zoomPanSelection");Object.defineProperty(s,"zoomPanSelection",{get(){var v;return!this._zoomPanSelection&&m&&(this._zoomPanSelection=new m(e,this)),(v=this._zoomPanSelection)!=null?v:null},configurable:!0});const A=t.get("keyboardNavigation");Object.defineProperty(s,"keyboardNavigation",{get(){var v;return!this._keyboardNavigation&&A&&(this._keyboardNavigation=new A(e,this)),(v=this._keyboardNavigation)!=null?v:null},configurable:!0})}};j(ca,"_featureRegistry",new Map);let _e=ca;class di{constructor(t){this.ctx=t,this.w=t.w}clear({isUpdating:t}){var e,s,i,a,n,r,o,l,c,h,d,f;(e=this.ctx.weave)==null||e.teardown(t),t||(this.w.globals.isDestroyed=!0),this.ctx._zoomPanSelection&&this.ctx._zoomPanSelection.destroy(),this.ctx._toolbar&&this.ctx._toolbar.destroy(),this.w.globals.resizeObserver&&typeof this.w.globals.resizeObserver.disconnect=="function"&&(this.w.globals.resizeObserver.disconnect(),this.w.globals.resizeObserver=null),Es.invalidateAll(this.w),t?(this.ctx._zoomPanSelection=null,this.ctx._toolbar=null,(s=this.ctx._keyboardNavigation)==null||s.destroy(),this.ctx._keyboardNavigation=null):((i=this.ctx.perspectives)==null||i.teardown(),this.ctx.perspectives=null,(a=this.ctx.storyboard)==null||a.teardown(),this.ctx.storyboard=null,(n=this.ctx.history)==null||n.teardown(),this.ctx.history=null,(r=this.ctx.linkedViews)==null||r.teardown(),this.ctx.linkedViews=null,(o=this.ctx.ink)==null||o.teardown(),this.ctx.ink=null,(l=this.ctx.measure)==null||l.teardown(),this.ctx.measure=null,(c=this.ctx.contextMenu)==null||c.teardown(),this.ctx.contextMenu=null,(h=this.ctx.osThemeWatcher)==null||h.teardown(),this.ctx.osThemeWatcher=null,this.ctx.weave=null,(f=(d=this.ctx.rendererController)==null?void 0:d.teardown)==null||f.call(d),this.ctx.rendererController=null,this.ctx.renderer=null,this.ctx.drilldown=null,this.ctx.morphTypeChange=null,this.ctx.exports=null,this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx._zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx._toolbar=null,this.ctx.localization=null,this.ctx._keyboardNavigation=null,this.ctx.w.globals.tooltip=null),this.clearDomElements({isUpdating:t})}killSVG(t){t.each(function(){this.removeClass("*"),this.off()},!0),t.clear()}clearDomElements({isUpdating:t}){const e=this.w.dom;if(H.isBrowser()&&e.Paper){const s=e.Paper.node;s.parentNode&&s.parentNode.parentNode&&!t&&(s.parentNode.parentNode.style.minHeight="unset");const i=e.baseEl;if(i&&this.ctx.eventList.forEach(a=>{i.removeEventListener(a,this.ctx.events.documentEvent)}),this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(e.Paper),e.Paper.remove()}e.Paper=null,e.elWrap=null,e.elGraphical=null,e.elLegendWrap=null,e.elLegendForeign=null,e.baseEl=null,e.elGridRect=null,e.elGridRectMask=null,e.elGridRectBarMask=null,e.elGridRectMarkerMask=null,e.elForecastMask=null,e.elNonForecastMask=null,e.elDefs=null}}const Je="__apexcharts_plugins__";function Fs(){const x=globalThis;return x[Je]||(x[Je]={}),x[Je]}function nr(x){if(!x||typeof x.name!="string"||typeof x.setup!="function"){console.error("[apexcharts] registerPlugin: a plugin needs a { name, setup } shape.");return}Fs()[x.name]=x}function rr(x){return Fs()[x]||null}function or(x){delete Fs()[x]}const xs=new WeakMap;function lr(x,t){if(H.isSSR())return;let e=!1;if(x.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){const i=x.getBoundingClientRect();(x.style.display==="none"||i.width===0)&&(e=!0)}const s=new ResizeObserver(i=>{e&&t.call(x,i),e=!0});x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(x.children).forEac
31h(i=>s.observe(i)):s.observe(x),xs.set(t,s)}function cr(x,t){if(H.isSSR())return;const e=xs.get(t);e&&(e.disconnect(),xs.delete(t))}const hr=`@keyframes opaque {
32  0% {
33    opacity: 0
34  }
35
36  to {
37    opacity: 1
38  }
39}
40
41@keyframes resizeanim {
42
43  0%,
44  to {
45    opacity: 0
46  }
47}
48
49.apexcharts-canvas {
50  position: relative;
51  direction: ltr !important;
52  user-select: none;
53  /* Focus indicator colour. Themes override below. */
54  --apexcharts-focus-color: #008FFB;
55}
56
57/* Dark theme & high-contrast: brighter focus colour for sufficient contrast. */
58.apexcharts-canvas .apexcharts-theme-dark,
59.apexcharts-theme-dark.apexcharts-canvas {
60  --apexcharts-focus-color: #FFD500;
61}
62.apexcharts-canvas.apexcharts-high-contrast,
63.apexcharts-high-contrast.apexcharts-canvas {
64  --apexcharts-focus-color: #FFFF00;
65}
66
67/* Visually-hidden aria-live status region (WCAG 4.1.3 Status Messages). */
68.apexcharts-sr-status {
69  position: absolute;
70  width: 1px;
71  height: 1px;
72  padding: 0;
73  margin: -1px;
74  overflow: hidden;
75  clip: rect(0, 0, 0, 0);
76  white-space: nowrap;
77  border: 0;
78}
79
80/* Respect OS-level reduced-motion preference (WCAG 2.3.3). */
81@media (prefers-reduced-motion: reduce) {
82  .apexcharts-canvas *,
83  .apexcharts-canvas *::before,
84  .apexcharts-canvas *::after {
85    animation-duration: 0.01ms !important;
86    animation-iteration-count: 1 !important;
87    transition-duration: 0.01ms !important;
88  }
89}
90
91.apexcharts-canvas ::-webkit-scrollbar {
92  -webkit-appearance: none;
93  width: 6px
94}
95
96.apexcharts-canvas ::-webkit-scrollbar-thumb {
97  border-radius: 4px;
98  background-color: rgba(0, 0, 0, .5);
99  box-shadow: 0 0 1px rgba(255, 255, 255, .5);
100  -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)
101}
102
103.apexcharts-inner {
104  position: relative
105}
106
107.apexcharts-text tspan {
108  font-family: inherit
109}
110
111rect.legend-mouseover-inactive,
112.legend-mouseover-inactive rect,
113.legend-mouseover-inactive path,
114.legend-mouseover-inactive circle,
115.legend-mouseover-inactive line,
116.legend-mouseover-inactive text.apexcharts-yaxis-title-text,
117.legend-mouseover-inactive text.apexcharts-yaxis-label {
118  transition: .15s ease all;
119  opacity: .2
120}
121
122/* Linked Views (#4): per-mark crossfilter dim. Applied to individual data
123   marks (not whole series) whose x is outside the brushed range. Opacity is
124   overridable per chart via the --apx-cf-dim custom property. */
125.apexcharts-crossfilter-dimmed {
126  transition: opacity .25s ease;
127  opacity: var(--apx-cf-dim, .2)
128}
129
130/* Linked Views (#4): default styling for the built-in crossfilter data table
131   (cf.dataTable). Deliberately light so host styles can override. */
132.apexcharts-cf-table {
133  border-collapse: collapse;
134  width: 100%;
135  font-size: 13px;
136}
137.apexcharts-cf-table caption {
138  caption-side: bottom;
139  text-align: right;
140  padding: 6px 2px;
141  font-size: 12px;
142  opacity: .7
143}
144.apexcharts-cf-table th,
145.apexcharts-cf-table td {
146  padding: 6px 10px;
147  text-align: left;
148  border-bottom: 1px solid rgba(0, 0, 0, .08)
149}
150.apexcharts-cf-table th {
151  font-weight: 600;
152  border-bottom-width: 2px
153}
154.apexcharts-cf-table tbody tr:hover {
155  background: rgba(99, 102, 241, .06)
156}
157
158/* Measure ruler (#18): measure / delta ruler.
159   Theme via these classes or the --apx-measure-* custom properties below
160   (config \`chart.measure.colors\` overrides both). The ruler group also carries
161   a direction class: apexcharts-measure-up | -down | -flat.
162   Element classes:
163     .apexcharts-measure-band     shaded span band
164     .apexcharts-measure-vline    vertical guide lines
165     .apexcharts-measure-line     free-mode diagonal line
166     .apexcharts-measure-label-bg readout box     .apexcharts-measure-label text
167   Colors are applied as SVG presentation attributes, so any rule you write on
168   these classes overrides them. */
169.apexcharts-canvas {
170  --apx-measure-up: #16a34a;
171  --apx-measure-down: #dc2626;
172  --apx-measure-neutral: #64748b;
173  --apx-measure-guide: #94a3b8;
174}
175.apexcharts-measure-capture {
176  cursor: crosshair;
177}
178
179/* Radial Actions (#chrome): right-click context menu. Theme via these classes
180   or the --apx-menu-* custom properties. */
181.apexcharts-canvas {
182  --apx-menu-bg: #ffffff;
183  --apx-menu-fg: #1e293b;
184  --apx-menu-border: #e2e8f0;
185  --apx-menu-hover: #f1f5f9;
186  --apx-menu-shadow: rgba(15, 23, 42, 0.18);
187}
188.apexcharts-context-menu {
189  min-width: 168px;
190  padding: 4px;
191  border-radius: 8px;
192  background: var(--apx-menu-bg);
193  border: 1px solid var(--apx-menu-border);
194  box-shadow: 0 6px 22px var(--apx-menu-shadow);
195  font-family: Helvetica, Arial, sans-serif;
196  font-size: 13px;
197  z-index: 20;
198  user-select: none;
199}
200.apexcharts-context-menu-item {
201  display: block;
202  width: 100%;
203  box-sizing: border-box;
204  text-align: left;
205  padding: 7px 12px;
206  border: 0;
207  border-radius: 5px;
208  background: transparent;
209  color: var(--apx-menu-fg);
210  font: inherit;
211  cursor: pointer;
212}
213.apexcharts-context-menu-item:hover,
214.apexcharts-context-menu-item--active {
215  background: var(--apx-menu-hover);
216}
217.apexcharts-context-menu-item:focus {
218  outline: none;
219}
220
221/* Ink Layer (#7): the floating note editor card, opened by clicking an
222   ink-managed annotation. Theme via these classes or the --apx-ink-* vars. */
223.apexcharts-canvas {
224  --apx-ink-card-bg: #ffffff;
225  --apx-ink-card-fg: #1e293b;
226  --apx-ink-card-border: #e2e8f0;
227  --apx-ink-card-hover: #f1f5f9;
228  --apx-ink-card-accent: #6366f1;
229  --apx-ink-card-shadow: rgba(15, 23, 42, 0.18);
230}
231.apexcharts-ink-card {
232  position: absolute;
233  z-index: 25;
234  display: flex;
235  flex-direction: column;
236  gap: 6px;
237  padding: 8px;
238  border-radius: 8px;
239  background: var(--apx-ink-card-bg);
240  border: 1px solid var(--apx-ink-card-border);
241  box-shadow: 0 6px 22px var(--apx-ink-card-shadow);
242  font-family: Helvetica, Arial, sans-serif;
243  font-size: 12px;
244  color: var(--apx-ink-card-fg);
245  user-select: none;
246}
247.apexcharts-ink-card-row {
248  display: flex;
249  align-items: center;
250  gap: 4px;
251}
252.apexcharts-ink-card input.apexcharts-ink-editor {
253  flex: 1 1 auto;
254  width: 150px;
255  min-width: 0;
256  box-sizing: border-box;
257  padding: 4px 6px;
258  font: inherit;
259  color: inherit;
260  background: transparent;
261  border: 1px solid var(--apx-ink-card-border);
262  border-radius: 5px;
263}
264.apexcharts-ink-card input.apexcharts-ink-editor:focus {
265  outline: none;
266  border-color: var(--apx-ink-card-accent);
267}
268.apexcharts-ink-btn {
269  flex: 0 0 auto;
270  width: 24px;
271  height: 24px;
272  display: inline-flex;
273  align-items: center;
274  justify-content: center;
275  padding: 0;
276  border: 0;
277  border-radius: 5px;
278  background: transparent;
279  color: inherit;
280  font: inherit;
281  font-size: 12px;
282  line-height: 1;
283  cursor: pointer;
284}
285.apexcharts-ink-btn:hover,
286.apexcharts-ink-btn--active {
287  background: var(--apx-ink-card-hover);
288}
289.apexcharts-ink-btn:focus-visible,
290.apexcharts-ink-swatch:focus-visible {
291  outline: 2px solid var(--apx-ink-card-accent);
292  outline-offset: 1px;
293}
294.apexcharts-ink-btn--bold {
295  font-weight: 700;
296}
297.apexcharts-ink-btn--delete:hover {
298  color: #dc2626;
299}
300.apexcharts-ink-swatch {
301  flex: 0 0 auto;
302  width: 16px;
303  height: 16px;
304  padding: 0;
305  border: 1px solid rgba(100, 116, 139, 0.45);
306  border-radius: 50%;
307  cursor: pointer;
308}
309.apexcharts-ink-swatch--active {
310  box-shadow:
311    0 0 0 2px var(--apx-ink-card-bg),
312    0 0 0 4px var(--apx-ink-card-accent);
313}
314.apexcharts-ink-sep {
315  flex: 0 0 auto;
316  width: 1px;
317  height: 16px;
318  margin: 0 2px;
319  background: var(--apx-ink-card-border);
320}
321.apexcharts-ink-cardlabel {
322  flex: 0 0 auto;
323  font-size: 10px;
324  letter-spacing: 0.4px;
325  text-transform: uppercase;
326  opacity: 0.65;
327  margin-right: 2px;
328}
329.apexcharts-ink-marker-size {
330  flex: 0 0 auto;
331  min-width: 16px;
332  text-align: center;
333  font-variant-numeric: tabular-nums;
334}
335
336.apexcharts-legend-text {
337  padding-left: 15px;
338  margin-left: -15px;
339}
340
341.apexcharts-legend-series[role="button"]:focus {
342  outline: 2px solid var(--apexcharts-focus-color, #008FFB);
343  outline-offset: 2px;
344}
345
346.apexcharts-legend-series[role="button"]:focus:not(:focus-visible) {
347  outline: none;
348}
349
350.apexcharts-legend-series[role="button"]:focus-visible {
351  outline: 2px solid var(--apexcharts-focus-color, #008FFB);
352  outline-offset: 2px;
353}
354
355.apexcharts-series-collapsed {
356  opacity: 0
357}
358
359.apexcharts-canvas svg:focus:not(:focus-visible) {
360  outline: none;
361}
362
363/* Keyboard navigation focus indicator on SVG data elements.
364   SVG elements don't support CSS outline, so we use stroke. */
365.apexcharts-bar-area.apexcharts-keyboard-focused,
366.apexcharts-candlestick-area.apexcharts-keyboard-focused,
367.apexcharts-boxPlot-area.apexcharts-keyboard-focused,
368.apexcharts-rangebar-area.apexcharts-keyboard-focused,
369.apexcharts-pie-area.apexcharts-keyboard-focused,
370.apexcharts-heatmap-rect.apexcharts-keyboard-focused,
371.apexcharts-treemap-rect.apexcharts-keyboard-focused {
372  stroke: var(--apexcharts-focus-color, #008FFB);
373  stroke-width: 2;
374  stroke-opacity: 1;
375}
376
377.apexcharts-tooltip {
378  --apx-tt-bg: #ffffff;
379  --apx-tt-border: rgba(15, 23, 42, 0.06);
380  /* Layered shadow: tight inner contact + soft outer drop. The two Y
381   * offsets are exposed as variables so they flip in sync with the
382   * arrow when the tooltip is below the data point — see the
383   * \`[data-placement="bottom"]\` rule further down. */
384  --apx-tt-shadow-y-mid: 8px;
385  --apx-tt-shadow-y-far: 16px;
386  --apx-tt-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04), 0 var(--apx-tt-shadow-y-mid) 16px -6px rgba(15, 23, 42, 0.12), 0 var(--apx-tt-shadow-y-far) 36px -12px rgba(15, 23, 42, 0.18);
387  --apx-tt-arrow-bg: var(--apx-tt-bg);
388  /* Two stacked drop-shadows: the first is a tight contact halo for
389   * edge definition against light chart backgrounds; the second is a
390   * softer directional drop that lifts the arrow off the surface.
391   * \`--apx-tt-arrow-drop-y\` is the Y offset of the directional drop;
392   * a per-placement rule below flips it to negative when the tooltip
393   * is below the data point (arrow on top) so the shadow always
394   * casts outward instead of into the tooltip body. */
395  --apx-tt-arrow-drop-y: 2px;
396  --apx-tt-arrow-shadow: drop-shadow(0 0 0.5px rgba(15, 23, 42, 0.2)) drop-shadow(0 var(--apx-tt-arrow-drop-y) 4px rgba(15, 23, 42, 0.2));
397  --apx-tt-color: #0f172a;
398  --apx-tt-color-muted: rgba(15, 23, 42, 0.55);
399  border-radius: 8px;
400  background: var(--apx-tt-bg);
401  border: 1px solid var(--apx-tt-border);
402  box-shadow: var(--apx-tt-shadow);
403  color: var(--apx-tt-color);
404  cursor: default;
405  font-size: 13px;
406  left: 0;
407  top: 0;
408  opacity: 0;
409  pointer-events: none;
410  position: absolute;
411  display: flex;
412  flex-direction: column;
413  padding: 2px 0;
414  white-space: nowrap;
415  z-index: 12;
416  transition: opacity .12s ease
417}
418
419/* While the tooltip is visible, smoothly animate position changes
420 * between data points. Kept short (160 ms) and ease-out so it stays
421 * responsive — too long would feel laggy when sweeping across many
422 * points fast. The position transition is only attached after the
423 * first paint (Position.applyTooltipPosition flips \`data-positioned\`
424 * once the tooltip has been placed) so the *first* show doesn't slide
425 * the tooltip in from the previously-stale (0,0) coordinates. */
426.apexcharts-tooltip.apexcharts-active {
427  opacity: 1;
428  transition: opacity .12s ease
429}
430.apexcharts-tooltip.apexcharts-active[data-positioned="true"] {
431  transition: opacity .12s ease, left .16s ease-out, top .16s ease-out
432}
433
434.apexcharts-tooltip.apexcharts-theme-light {
435  /* defaults already set above; class kept for backward-compat selectors */
436}
437
438.apexcharts-tooltip.apexcharts-theme-dark {
439  --apx-tt-bg: #1c1c1f;
440  --apx-tt-border: rgba(255, 255, 255, 0.08);
441  --apx-tt-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4), 0 var(--apx-tt-shadow-y-mid) 16px -6px rgba(0, 0, 0, 0.45), 0 var(--apx-tt-shadow-y-far) 36px -12px rgba(0, 0, 0, 0.55);
442  --apx-tt-arrow-shadow: drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.55)) drop-shadow(0 var(--apx-tt-arrow-drop-y) 4px rgba(0, 0, 0, 0.45));
443  --apx-tt-color: #f3f4f6;
444  --apx-tt-color-muted: rgba(243, 244, 246, 0.55);
445}
446
447.apexcharts-tooltip * {
448  font-family: inherit
449}
450
451/* Point-annotation hover tooltip (apexcharts/apexcharts.js#2424). Reuses the
452 * glass body/border/shadow from \`.apexcharts-tooltip\` but holds free-form
453 * content, so it needs its own padding, wrapping and a sane max width. */
454.apexcharts-tooltip.apexcharts-annotation-tooltip {
455  padding: 6px 10px;
456  max-width: 240px;
457  white-space: normal;
458  line-height: 1.4;
459  pointer-events: none;
460  z-index: 13
461}
462
463.apexcharts-tooltip-title {
464  padding: 8px 12px 4px;
465  font-size: 12px;
466  font-weight: 600;
467  letter-spacing: 0.01em;
468  color: var(--apx-tt-color-muted);
469  background: transparent;
470  border-bottom: none;
471  margin-bottom: 0
472}
473
474.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title,
475.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
476  background: transparent;
477  border-bottom: none
478}
479
480/* \`fillSeriesColor\`: each series-group already paints itself with the
481 * series colour. Drop the glass body entirely (transparent bg, no
482 * border, no backdrop-filter, no padding) and clip the coloured
483 * series-group(s) to the tooltip's rounded corners so they fill the
484 * shell edge-to-edge. Text inside the coloured group is forced to
485 * white for contrast. */
486.apexcharts-tooltip.apexcharts-tooltip-fill-series {
487  background: transparent;
488  -webkit-backdrop-filter: none;
489  backdrop-filter: none;
490  border: none;
491  padding: 0;
492  overflow: hidden;
493  color: #fff
494}
495
496.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-title {
497  background: rgba(0, 0, 0, 0.22);
498  color: #fff;
499  opacity: 1;
500  padding: 6px 12px
501}
502
503.apexcharts-tooltip.apexcharts-tooltip-fill-series .apexcharts-tooltip-series-group {
504  color: #fff
505}
506
507/* Arrow connector — sits *entirely outside* the tooltip body. Shares
508 * the body's solid fill so it reads as a single shape. \`filter:
509 * drop-shadow\` traces the clipped triangle outline (a regular
510 * \`box-shadow\` would be erased by the \`clip-path\`). */
511.apexcharts-tooltip-arrow {
512  position: absolute;
513  width: 7px;
514  height: 14px;
515  background: var(--apx-tt-arrow-bg);
516  /* The variable already contains the full \`drop-shadow(...) ...\` filter
517   * chain (stacked shadows) so it's applied raw. */
518  -webkit-filter: var(--apx-tt-arrow-shadow);
519  filter: var(--apx-tt-arrow-shadow);
520  pointer-events: none;
521  top: calc(var(--apx-tt-arrow-y, 50%) - 7px)
522}
523
524.apexcharts-tooltip[data-placement="right"] .apexcharts-tooltip-arrow {
525  left: -7px;
526  clip-path: polygon(0 50%, 100% 0, 100% 100%)
527}
528
529.apexcharts-tooltip[data-placement="left"] .apexcharts-tooltip-arrow {
530  right: -7px;
531  clip-path: polygon(100% 50%, 0 0, 0 100%)
532}
533
534/* Vertical arrow variants: tooltip is above/below the data point and the
535 * arrow points down/up. The base rule above uses \`--apx-tt-arrow-y\` for
536 * left/right placement; for top/bottom we re-orient the rectangle and
537 * use \`--apx-tt-arrow-x\` (set by applyTooltipPosition). */
538.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow,
539.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow {
540  width: 14px;
541  height: 7px;
542  top: auto;
543  left: calc(var(--apx-tt-arrow-x, 50%) - 7px)
544}
545
546.apexcharts-tooltip[data-placement="top"] .apexcharts-tooltip-arrow {
547  bottom: -7px;
548  clip-path: polygon(50% 100%, 0 0, 100% 0)
549}
550
551.apexcharts-tooltip[data-placement="bottom"] .apexcharts-tooltip-arrow {
552  top: -7px;
553  clip-path: polygon(50% 0, 0 100%, 100% 100%)
554}
555
556/* When the tooltip is flipped below the data point (arrow on top
557 * pointing up), the default downward-biased shadows leave the top
558 * edge of both the body *and* the arrow undefined. Flipping every
559 * Y offset to negative casts the entire elevation upward so the
560 * shadow falls between the tooltip and the bar above. */
561.apexcharts-tooltip[data-placement="bottom"] {
562  --apx-tt-shadow-y-mid: -8px;
563  --apx-tt-shadow-y-far: -16px;
564  --apx-tt-arrow-drop-y: -2px
565}
566
567.apexcharts-tooltip-text-goals-value,
568.apexcharts-tooltip-text-y-value,
569.apexcharts-tooltip-text-z-value {
570  display: inline-block;
571  margin-left: 5px;
572  font-weight: 600
573}
574
575.apexcharts-tooltip-text-goals-label:empty,
576.apexcharts-tooltip-text-goals-value:empty,
577.apexcharts-tooltip-text-y-label:empty,
578.apexcharts-tooltip-text-y-value:empty,
579.apexcharts-tooltip-text-z-value:empty,
580.apexcharts-tooltip-title:empty {
581  display: none
582}
583
584.apexcharts-tooltip-text-goals-label,
585.apexcharts-tooltip-text-goals-value {
586  padding: 6px 0 5px
587}
588
589.apexcharts-tooltip-goals-group,
590.apexcharts-tooltip-text-goals-label,
591.apexcharts-tooltip-text-goals-value {
592  display: flex
593}
594
595.apexcharts-tooltip-text-goals-label:not(:empty),
596.apexcharts-tooltip-text-goals-value:not(:empty) {
597  margin-top: -6px
598}
599
600.apexcharts-tooltip-marker {
601  display: inline-flex;
602  align-items: center;
603  justify-content: center;
604  position: relative;
605  width: 12px;
606  height: 12px;
607  margin-right: 6px;
608  vertical-align: middle;
609  color: inherit;
610}
611
612.apexcharts-tooltip-marker svg {
613  width: 100%;
614  height: 100%;
615  display: block;
616}
617
618.apexcharts-tooltip-series-group {
619  padding: 4px 12px;
620  display: none;
621  gap: 8px;
622  text-align: left;
623  justify-content: left;
624  align-items: center
625}
626
627.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {
628  opacity: 1
629}
630
631.apexcharts-tooltip-series-group.apexcharts-active:last-child,
632.apexcharts-tooltip-series-group:last-child {
633  padding-bottom: 8px
634}
635
636.apexcharts-tooltip-y-group {
637  padding: 6px 0 5px
638}
639
640.apexcharts-custom-tooltip,
641.apexcharts-tooltip-box {
642  padding: 4px 8px
643}
644
645.apexcharts-tooltip-boxPlot {
646  display: flex;
647  flex-direction: column-reverse
648}
649
650.apexcharts-tooltip-box>div {
651  margin: 4px 0
652}
653
654.apexcharts-tooltip-box span.value {
655  font-weight: 700
656}
657
658.apexcharts-tooltip-rangebar {
659  padding: 5px 8px
660}
661
662.apexcharts-tooltip-rangebar .category {
663  font-weight: 600;
664  color: #777
665}
666
667.apexcharts-tooltip-rangebar .series-name {
668  font-weight: 700;
669  display: block;
670  margin-bottom: 5px
671}
672
673/* X/Y axis tooltips — small popovers that label the crosshair on the
674 * axes. Restyled to match the modern data-tooltip palette: solid white
675 * body with a subtle border + soft drop-shadow, smaller font, rounded
676 * corners. The arrows still use the CSS border-triangle technique
677 * (cheap, crisp at small sizes); their colours flow from CSS variables
678 * so light/dark themes only need one override per axis. */
679.apexcharts-xaxistooltip,
680.apexcharts-yaxistooltip {
681  --apx-axt-bg: #ffffff;
682  --apx-axt-border: rgba(15, 23, 42, 0.08);
683  --apx-axt-color: #0f172a;
684  --apx-axt-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.18), 0 1px 3px -1px rgba(15, 23, 42, 0.12);
685  opacity: 0;
686  pointer-events: none;
687  color: var(--apx-axt-color);
688  font-size: 12px;
689  font-weight: 500;
690  text-align: center;
691  border-radius: 6px;
692  position: absolute;
693  z-index: 10;
694  background: var(--apx-axt-bg);
695  border: 1px solid var(--apx-axt-border);
696  box-shadow: var(--apx-axt-shadow)
697}
698
699.apexcharts-xaxistooltip.apexcharts-theme-dark,
700.apexcharts-yaxistooltip.apexcharts-theme-dark {
701  --apx-axt-bg: #1c1c1f;
702  --apx-axt-border: rgba(255, 255, 255, 0.1);
703  --apx-axt-color: #f3f4f6;
704  --apx-axt-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.55), 0 1px 3px -1px rgba(0, 0, 0, 0.45)
705}
706
707.apexcharts-xaxistooltip {
708  padding: 4px 8px;
709  transition: .15s ease all
710}
711
712.apexcharts-xaxistooltip:after,
713.apexcharts-xaxistooltip:before {
714  left: 50%;
715  border: solid transparent;
716  content: " ";
717  height: 0;
718  width: 0;
719  position: absolute;
720  pointer-events: none
721}
722
723/* :before paints the 1px border outline of the triangle (slightly larger
724 * than :after); :after sits inside and paints the fill — leaves a 1px
725 * ring of :before visible at the edges. */
726.apexcharts-xaxistooltip:after {
727  border-color: transparent;
728  border-width: 5px;
729  margin-left: -5px
730}
731
732.apexcharts-xaxistooltip:before {
733  border-color: transparent;
734  border-width: 6px;
735  margin-left: -6px
736}
737
738.apexcharts-xaxistooltip-bottom:after,
739.apexcharts-xaxistooltip-bottom:before {
740  bottom: 100%
741}
742
743.apexcharts-xaxistooltip-top:after,
744.apexcharts-xaxistooltip-top:before {
745  top: 100%
746}
747
748.apexcharts-xaxistooltip-bottom:after {
749  border-bottom-color: var(--apx-axt-bg)
750}
751
752.apexcharts-xaxistooltip-bottom:before {
753  border-bottom-color: var(--apx-axt-border)
754}
755
756.apexcharts-xaxistooltip-top:after {
757  border-top-color: var(--apx-axt-bg)
758}
759
760.apexcharts-xaxistooltip-top:before {
761  border-top-color: var(--apx-axt-border)
762}
763
764.apexcharts-xaxistooltip.apexcharts-active {
765  opacity: 1;
766  transition: .15s ease all
767}
768
769.apexcharts-yaxistooltip {
770  padding: 3px 8px
771}
772
773.apexcharts-yaxistooltip:after,
774.apexcharts-yaxistooltip:before {
775  top: 50%;
776  border: solid transparent;
777  content: " ";
778  height: 0;
779  width: 0;
780  position: absolute;
781  pointer-events: none
782}
783
784.apexcharts-yaxistooltip:after {
785  border-color: transparent;
786  border-width: 5px;
787  margin-top: -5px
788}
789
790.apexcharts-yaxistooltip:before {
791  border-color: transparent;
792  border-width: 6px;
793  margin-top: -6px
794}
795
796.apexcharts-yaxistooltip-left:after,
797.apexcharts-yaxistooltip-left:before {
798  left: 100%
799}
800
801.apexcharts-yaxistooltip-right:after,
802.apexcharts-yaxistooltip-right:before {
803  right: 100%
804}
804
805
806.apexcharts-yaxistooltip-left:after {
807  border-left-color: var(--apx-axt-bg)
808}
809
810.apexcharts-yaxistooltip-left:before {
811  border-left-color: var(--apx-axt-border)
812}
813
814.apexcharts-yaxistooltip-right:after {
815  border-right-color: var(--apx-axt-bg)
816}
817
818.apexcharts-yaxistooltip-right:before {
819  border-right-color: var(--apx-axt-border)
820}
821
822.apexcharts-yaxistooltip.apexcharts-active {
823  opacity: 1
824}
825
826.apexcharts-yaxistooltip-hidden {
827  display: none
828}
829
830.apexcharts-xcrosshairs,
831.apexcharts-ycrosshairs {
832  pointer-events: none;
833  opacity: 0;
834  transition: .15s ease all
835}
836
837.apexcharts-xcrosshairs.apexcharts-active,
838.apexcharts-ycrosshairs.apexcharts-active {
839  opacity: 1;
840  transition: .15s ease all
841}
842
843.apexcharts-ycrosshairs-hidden {
844  opacity: 0
845}
846
847.apexcharts-selection-rect {
848  cursor: move
849}
850
851.svg_select_shape {
852  stroke-width: 1;
853  stroke-dasharray: 10 10;
854  stroke: black;
855  stroke-opacity: 0.1;
856  pointer-events: none;
857  fill: none;
858}
859
860.svg_select_handle {
861  stroke-width: 3;
862  stroke: black;
863  fill: none;
864}
865
866.svg_select_handle_r {
867  cursor: e-resize;
868}
869
870.svg_select_handle_l {
871  cursor: w-resize;
872}
873
874.apexcharts-svg.apexcharts-zoomable.hovering-zoom {
875  cursor: crosshair
876}
877
878.apexcharts-svg.apexcharts-zoomable.hovering-pan {
879  cursor: move
880}
881
882.apexcharts-menu-icon,
883.apexcharts-measure-icon,
884.apexcharts-pan-icon,
885.apexcharts-reset-icon,
886.apexcharts-selection-icon,
887.apexcharts-toolbar-custom-icon,
888.apexcharts-zoom-icon,
889.apexcharts-zoomin-icon,
890.apexcharts-zoomout-icon {
891  cursor: pointer;
892  /* WCAG 2.5.8 Target Size (Minimum): 24×24 CSS px hit target. */
893  width: 26px;
894  height: 24px;
895  line-height: 24px;
896  color: #6e8192;
897  text-align: center;
898  /* Reset native <button> chrome — these are styled via SVG icons. */
899  padding: 0;
900  margin: 0;
901  background: transparent;
902  border: 0;
903  border-radius: 5px;
904  display: inline-flex;
905  align-items: center;
906  justify-content: center;
907  transition: background-color .12s ease, color .12s ease;
908}
909
910.apexcharts-menu-icon svg,
911.apexcharts-measure-icon svg,
912.apexcharts-pan-icon svg,
913.apexcharts-reset-icon svg,
914.apexcharts-selection-icon svg,
915.apexcharts-zoom-icon svg,
916.apexcharts-zoomin-icon svg,
917.apexcharts-zoomout-icon svg {
918  width: 18px;
919  height: 18px;
920  fill: none;
921  stroke: currentColor;
922  stroke-width: 2;
923  stroke-linecap: round;
924  stroke-linejoin: round
925}
926
927.apexcharts-theme-dark .apexcharts-menu-icon,
928.apexcharts-theme-dark .apexcharts-measure-icon,
929.apexcharts-theme-dark .apexcharts-pan-icon,
930.apexcharts-theme-dark .apexcharts-reset-icon,
931.apexcharts-theme-dark .apexcharts-selection-icon,
932.apexcharts-theme-dark .apexcharts-toolbar-custom-icon,
933.apexcharts-theme-dark .apexcharts-zoom-icon,
934.apexcharts-theme-dark .apexcharts-zoomin-icon,
935.apexcharts-theme-dark .apexcharts-zoomout-icon {
936  color: #d4d6dc
937}
938
939.apexcharts-canvas .apexcharts-measure-icon.apexcharts-selected,
940.apexcharts-canvas .apexcharts-pan-icon.apexcharts-selected,
941.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected,
942.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected,
943.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected {
944  background: rgba(0, 143, 251, 0.12);
945  color: #008ffb
946}
947
948.apexcharts-theme-light .apexcharts-menu-icon:hover,
949.apexcharts-theme-light .apexcharts-measure-icon:not(.apexcharts-selected):hover,
950.apexcharts-theme-light .apexcharts-pan-icon:not(.apexcharts-selected):hover,
951.apexcharts-theme-light .apexcharts-reset-icon:hover,
952.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover,
953.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover,
954.apexcharts-theme-light .apexcharts-zoomin-icon:hover,
955.apexcharts-theme-light .apexcharts-zoomout-icon:hover {
956  background: rgba(15, 23, 42, 0.06);
957  color: #1f2937
958}
959
960.apexcharts-theme-dark .apexcharts-menu-icon:hover,
961.apexcharts-theme-dark .apexcharts-measure-icon:not(.apexcharts-selected):hover,
962.apexcharts-theme-dark .apexcharts-pan-icon:not(.apexcharts-selected):hover,
963.apexcharts-theme-dark .apexcharts-reset-icon:hover,
964.apexcharts-theme-dark .apexcharts-selection-icon:not(.apexcharts-selected):hover,
965.apexcharts-theme-dark .apexcharts-zoom-icon:not(.apexcharts-selected):hover,
966.apexcharts-theme-dark .apexcharts-zoomin-icon:hover,
967.apexcharts-theme-dark .apexcharts-zoomout-icon:hover {
968  background: rgba(255, 255, 255, 0.08);
969  color: #fff
970}
971
972.apexcharts-menu-icon,
973.apexcharts-selection-icon {
974  position: relative
975}
976
977.apexcharts-toolbar {
978  position: absolute;
979  z-index: 11;
980  display: inline-flex;
981  align-items: center;
982  gap: 1px;
983  padding: 3px;
984  border-radius: 8px;
985  background: rgba(255, 255, 255, 0.85);
986  backdrop-filter: blur(8px);
987  -webkit-backdrop-filter: blur(8px);
988}
989
990.apexcharts-theme-dark .apexcharts-toolbar {
991  background: rgba(28, 28, 31, 0.82);
992}
993
994.apexcharts-menu {
995  background: rgba(255, 255, 255, 0.95);
996  backdrop-filter: blur(8px);
997  -webkit-backdrop-filter: blur(8px);
998  position: absolute;
999  top: calc(100% + 4px);
1000  border: 1px solid rgba(15, 23, 42, 0.08);
1001  border-radius: 8px;
1002  padding: 4px;
1003  right: 0;
1004  opacity: 0;
1005  min-width: 120px;
1006  transition: opacity .15s ease, transform .15s ease;
1007  transform: translateY(-2px);
1008  pointer-events: none;
1009  box-shadow: 0 4px 16px -4px rgba(15, 23, 42, 0.12), 0 2px 4px -1px rgba(15, 23, 42, 0.06)
1010}
1011
1012.apexcharts-menu.apexcharts-menu-open {
1013  opacity: 1;
1014  transform: translateY(0);
1015  pointer-events: all
1016}
1017
1018.apexcharts-menu-item {
1019  padding: 6px 9px;
1020  font-size: 12px;
1021  border-radius: 5px;
1022  cursor: pointer
1023}
1024
1025.apexcharts-theme-light .apexcharts-menu-item:hover {
1026  background: rgba(15, 23, 42, 0.06)
1027}
1028
1029.apexcharts-theme-dark .apexcharts-menu {
1030  background: rgba(28, 28, 31, 0.92);
1031  border-color: rgba(255, 255, 255, 0.08);
1032  color: #f3f4f6;
1033  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4)
1034}
1035
1036.apexcharts-theme-dark .apexcharts-menu-item:hover {
1037  background: rgba(255, 255, 255, 0.08)
1038}
1039
1040@media screen and (min-width:768px) {
1041  .apexcharts-canvas:hover .apexcharts-toolbar {
1042    opacity: 1
1043  }
1044}
1045
1046/* Toolbar keyboard accessibility: show toolbar when any button inside it is focused */
1047.apexcharts-toolbar:focus-within {
1048  opacity: 1
1049}
1050
1051/* Focus indicator for toolbar icon buttons */
1052.apexcharts-menu-icon:focus-visible,
1053.apexcharts-measure-icon:focus-visible,
1054.apexcharts-pan-icon:focus-visible,
1055.apexcharts-reset-icon:focus-visible,
1056.apexcharts-selection-icon:focus-visible,
1057.apexcharts-toolbar-custom-icon:focus-visible,
1058.apexcharts-zoom-icon:focus-visible,
1059.apexcharts-zoomin-icon:focus-visible,
1060.apexcharts-zoomout-icon:focus-visible {
1061  outline: 2px solid var(--apexcharts-focus-color, #008FFB);
1062  outline-offset: 1px;
1063  border-radius: 5px
1064}
1065
1066/* Focus indicator for hamburger menu items */
1067.apexcharts-menu-item:focus-visible {
1068  outline: 2px solid var(--apexcharts-focus-color, #008FFB);
1069  outline-offset: -2px;
1070  background: #eee
1071}
1072
1073.apexcharts-canvas .apexcharts-element-hidden,
1074.apexcharts-datalabel.apexcharts-element-hidden,
1075.apexcharts-hide .apexcharts-series-points {
1076  opacity: 0;
1077}
1078
1079.apexcharts-hidden-element-shown {
1080  opacity: 1;
1081  transition: 0.25s ease all;
1082}
1083
1084.apexcharts-datalabel,
1085.apexcharts-datalabel-label,
1086.apexcharts-datalabel-value,
1087.apexcharts-datalabels,
1088.apexcharts-pie-label,
1089.apexcharts-pie-name-label,
1090.apexcharts-pie-name-label-group,
1091.apexcharts-pie-label-connector {
1092  cursor: default;
1093  pointer-events: none
1094}
1095
1096.apexcharts-pie-label-connector {
1097  fill: none
1098}
1099
1100.apexcharts-pie-label-delay {
1101  opacity: 0;
1102  animation-name: opaque;
1103  animation-duration: .3s;
1104  animation-fill-mode: forwards;
1105  animation-timing-function: ease
1106}
1107
1108.apexcharts-radialbar-label {
1109  cursor: pointer;
1110}
1111
1112.apexcharts-annotation-rect,
1113.apexcharts-area-series .apexcharts-area,
1114.apexcharts-gridline,
1115.apexcharts-line,
1116.apexcharts-point-annotation-label,
1117.apexcharts-radar-series path:not(.apexcharts-marker),
1118.apexcharts-radar-series polygon,
1119.apexcharts-toolbar svg,
1120.apexcharts-tooltip .apexcharts-marker,
1121.apexcharts-xaxis-annotation-label,
1122.apexcharts-yaxis-annotation-label,
1123.apexcharts-zoom-rect,
1124.no-pointer-events {
1125  pointer-events: none
1126}
1127
1128.apexcharts-tooltip-active .apexcharts-marker {
1129  transition: .15s ease all
1130}
1131
1132.apexcharts-radar-series .apexcharts-yaxis {
1133  pointer-events: none;
1134}
1135
1136.resize-triggers {
1137  animation: 1ms resizeanim;
1138  visibility: hidden;
1139  opacity: 0;
1140  height: 100%;
1141  width: 100%;
1142  overflow: hidden
1143}
1144
1145.contract-trigger:before,
1146.resize-triggers,
1147.resize-triggers>div {
1148  content: " ";
1149  display: block;
1150  position: absolute;
1151  top: 0;
1152  left: 0
1153}
1154
1155.resize-triggers>div {
1156  height: 100%;
1157  width: 100%;
1158  background: #eee;
1159  overflow: auto
1160}
1161
1162.contract-trigger:before {
1163  overflow: hidden;
1164  width: 200%;
1165  height: 200%
1166}
1167
1168.apexcharts-bar-goals-markers {
1169  pointer-events: none
1170}
1171
1172.apexcharts-bar-shadows {
1173  pointer-events: none
1174}
1175
1176.apexcharts-rangebar-goals-markers {
1177  pointer-events: none
1178}
1179
1180.apexcharts-drilldown-target {
1181  cursor: pointer
1182}
1183
1184.apexcharts-breadcrumb {
1185  position: absolute;
1186  z-index: 11;
1187  display: inline-flex;
1188  align-items: center;
1189  gap: 2px;
1190  font-size: 12px;
1191  font-family: inherit;
1192  padding: 2px 4px
1193}
1194
1195.apexcharts-breadcrumb-item {
1196  background: transparent;
1197  border: none;
1198  padding: 2px 6px;
1199  border-radius: 3px;
1200  font: inherit;
1201  color: inherit;
1202  cursor: pointer;
1203  line-height: 1.2
1204}
1205
1206.apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {
1207  background: rgba(0, 0, 0, 0.08)
1208}
1209
1210.apexcharts-breadcrumb-arrow {
1211  margin-right: 4px;
1212  font-weight: 600;
1213  user-select: none
1214}
1215
1216.apexcharts-breadcrumb-current {
1217  cursor: default;
1218  font-weight: 600;
1219  opacity: 0.85
1220}
1221
1222.apexcharts-breadcrumb-separator {
1223  opacity: 0.5;
1224  user-select: none
1225}
1226
1227.apexcharts-theme-dark .apexcharts-breadcrumb-item:hover:not(.apexcharts-breadcrumb-current) {
1228  background: rgba(255, 255, 255, 0.12)
1229}
1230
1231.apexcharts-disable-transitions * {
1232  transition: none !important;
1233}`,dr=["MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEQIaK9UMD6n0oR/FIy8QdL0uSzKMQlf1BB+tOrji4/WuHsyRNxeDhVykoSsNURozMi1xhmqWvBH1L//xIfugTPA=="],fr=new Date("2027-07-31T00:00:00Z"),fi="APEX-",Ie=new Map,ge=new Set,ms=new Set;let bs=!1;function Xs(x){if(typeof atob=="function")return atob(x);if(typeof Buffer<"u")return Buffer.from(x,"base64").toString("binary");throw new Error("no base64 decoder available")}function ui(x){const t=x.replace(/-/g,"+").replace(/_/g,"/"),e=t.padEnd(Math.ceil(t.length/4)*4,"="),s=Xs(e),i=new Uint8Array(s.length);for(let a=0;a<s.length;a++)i[a]=s.charCodeAt(a);return i}function ur(x){const t=x.domains&&x.domains.length>0?x.domains.join(","):"";return`v1|${x.issueDate}|${x.expiryDate}|${x.plan}|${t}`}function gr(){return typeof window<"u"&&window.location?window.location.hostname:""}function pr(x){try{const t=JSON.parse(Xs(x));return typeof t.sig=="string"&&t.sig?t.sig:null}catch{return null}}function xr(x){ms.forEach(t=>{try{t(x)}catch{}})}function mr(x,t,e){return Yi(this,null,function*(){if(ge.has(x)||Ie.has(x))return;ge.add(x);const s=globalThis.crypto?globalThis.crypto.subtle:void 0,i=wt.publicKeysSpki;if(!s||i.length===0){ge.delete(x),bs||(bs=!0,console.warn(s?"[Apex] No license signing key is configured in this build, so license signatures cannot be verified.":"[Apex] Web Crypto is unavailable (a secure context is required), so the license signature cannot be verified."));return}const a=new TextEncoder().encode(ur(t));let n=!1;for(const r of i){try{const o=yield s.importKey("spki",ui(r),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]);n=yield s.verify({hash:"SHA-256",name:"ECDSA"},o,ui(e),a)}catch{n=!1}if(n)break}ge.delete(x),Ie.set(x,n),n||console.error("[Apex] Invalid license key. The license signature does not verify."),xr(wt.validateKey(x))})}class wt{static decodeLicenseData(t){try{const e=JSON.parse(Xs(t));return!e.issueDate||!e.expiryDate||!e.plan?null:{domains:Array.isArray(e.domains)?e.domains:void 0,expiryDate:e.expiryDate,issueDate:e.issueDate,plan:e.plan,valid:!0}}catch{return null}}static getKey(){return this.licenseKey}static getLicenseStatus(){return this.licenseKey?(this.validationResult=this.validateKey(this.licenseKey),this.validationResult):{expired:!1,valid:!1}}static isKeyValid(t){return t?this.validateKey(t).valid:!1}static isLicenseValid(){return this.licenseKey?this.getLicenseStatus().valid:!1}static onChange(t){return ms.add(t),()=>{ms.delete(t)}}static setLicense(t){this.licenseKey=t,this.validationResult=this.validateKey(t),this.validationResult.valid||console.error(`[Apex] ${this.validationResult.message}`)}static validateKey(t){try{if(typeof t!="string"||!t.startsWith(fi))return{expired:!1,message:'Invalid license key format. License key must start with "APEX-".',signatureVerified:!1,valid:!1};const e=t.slice(fi.length);if(!e)return{expired:!1,message:"Invalid license key format. Expected format: APEX-{encoded-data}.",signatureVerified:!1,valid:!1};const s=this.decodeLicenseData(e);if(!s)return{expired:!1,message:"Invalid license key. Unable to decode license data.",signatureVerified:!1,valid:!1};const i=pr(e);if(!i&&new Date>=fr)return{data:s,expired:!1,message:"This license key is in the old unsigned format, which is no longer accepted. Please request a replacement key.",signatureVerified:!1,valid:!1};const a=new Date;if(new Date(s.expiryDate)<a)return{data:s,expired:!0,message:`License expired on ${s.expiryDate}. Please renew your license.`,signatureVerified:!1,valid:!1};if(s.domains&&s.domains.length>0){const r=gr();if(!s.domains.some(l=>r===l||r.endsWith(`.${l}
1233`)))return{data:s,expired:!1,message:`License is not valid for this domain (${r}). Allowed domains: ${s.domains.join(", ")}.`,signatureVerified:!1,valid:!1}}if(i){const r=Ie.get(t);return r===!1?{data:s,expired:!1,message:"Invalid license key. The license signature does not verify.",signatureVerified:!0,valid:!1}:(r===void 0&&mr(t,s,i),{data:s,expired:!1,signatureVerified:r===!0,valid:!0})}return{data:s,expired:!1,signatureVerified:!1,valid:!0}}catch{return{expired:!1,message:"Invalid license key format or corrupted data.",signatureVerified:!1,valid:!1}}}static _resetSignatureState(){Ie.clear(),ge.clear(),bs=!1}}j(wt,"licenseKey",null);j(wt,"publicKeysSpki",dr);j(wt,"validationResult",null);const ys="data-apexcharts-watermark",br="APEXCHARTS",yr={position:"absolute",top:"0",right:"0",bottom:"0",left:"0",pointerEvents:"none",userSelect:"none",webkitUserSelect:"none",msUserSelect:"none",zIndex:"10000",display:"block",visibility:"visible",opacity:"1"};function wr(){const x=`
1234    <svg xmlns="http://www.w3.org/2000/svg" width="300" height="200">
1235      <text
1236        x="50%"
1237        y="50%"
1238        dominant-baseline="middle"
1239        text-anchor="middle"
1240        font-family="-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Arial, sans-serif"
1241        font-size="18"
1242        font-weight="600"
1243        fill="rgba(134, 134, 134, 0.1)"
1244        transform="rotate(-35, 100, 60)"
1245      >${br}</text>
1246    </svg>
1247  `;return`url("data:image/svg+xml,${encodeURIComponent(x.trim())}")`}class ee{static applyStyles(t){Object.assign(t.style,yr,{backgroundImage:wr(),backgroundRepeat:"repeat"})}static add(t){if(!t||typeof document>"u")return null;let e=this.node(t);return e||(e=document.createElement("div"),e.setAttribute(ys,""),t.appendChild(e)),this.applyStyles(e),typeof getComputedStyle=="function"&&getComputedStyle(t).position==="static"&&(t.style.position="relative"),e}static node(t){return t?t.querySelector(`[${ys}]`):null}static exists(t){return!!this.node(t)}static remove(t){const e=this.node(t);e&&e.remove()}}j(ee,"ATTR",ys);const gi="https://apexcharts.com/pricing";let ha=!1;const se=new Set;function vr(x){se.delete(x)}function pi(){ha=!0,Ne()}function Ar(x,t){const e=x&&x.config&&x.config.chart||{},s=[];e.type==="unit"&&s.push("unit"),t.storyboard&&t.storyboard._used&&s.push("storyboard");const i=e.link;return t.linkedViews&&i&&(i.enabled===!0||typeof i.dimension=="function")&&s.push("link"),t.ink&&e.ink&&e.ink.enabled===!0&&s.push("ink"),t.measure&&e.measure&&e.measure.enabled===!0&&s.push("measure"),t.contextMenu&&e.contextMenu&&e.contextMenu.enabled===!0&&s.push("context-menu"),t.perspectives&&(t.perspectives._used||ha)&&s.push("perspectives"),t.history&&e.history&&e.history.enabled===!0&&s.push("history"),s}function _r(x){const t=x&&x.config&&x.config.chart&&x.config.chart.license;if(t)return t;const e=wt.getKey();if(e)return e;const s=H.getApex();return s&&s.license?s.license:null}const Sr=new Set(["premium","enterprise"]);function Cr(x){if(!x)return!1;const t=wt.validateKey(x);if(!t.valid)return!1;const e=t.data&&t.data.plan;return typeof e=="string"&&Sr.has(e.toLowerCase())}function xi(x,t){const e=ee.add(t);if(!e||typeof MutationObserver>"u"||x._wmNodeObserver&&x._wmObservedNode===e)return;x._wmNodeObserver&&x._wmNodeObserver.disconnect();const s=new MutationObserver(()=>{const i=ee.node(t);i&&(s.disconnect(),ee.applyStyles(i),s.takeRecords(),s.observe(i,{attributes:!0,attributeFilter:["style"]}))});s.observe(e,{attributes:!0,attributeFilter:["style"]}),x._wmNodeObserver=s,x._wmObservedNode=e}function kr(x,t){if(xi(x,t),typeof MutationObserver>"u"||x._wmWrapObserver)return;const e=new MutationObserver(()=>{ee.node(t)||xi(x,t)});e.observe(t,{childList:!0}),x._wmWrapObserver=e}function ws(x,t){x._wmWrapObserver&&(x._wmWrapObserver.disconnect(),x._wmWrapObserver=null),x._wmNodeObserver&&(x._wmNodeObserver.disconnect(),x._wmNodeObserver=null),x._wmObservedNode=null;const e=t||x.w&&x.w.dom&&x.w.dom.elWrap;e&&ee.remove(e)}function Mr(x,t,e){if(x._premiumLicenseNotified)return;x._premiumLicenseNotified=!0;const s=e.length>1;if(!t){console.warn(`[ApexCharts] Premium feature${s?"s":""} in use (${e.join(", ")}) without a license. Running in trial mode with a watermark. Get a license: ${gi}`);return}const i=wt.validateKey(t);if(i.valid){const a=i.data&&i.data.plan||"current";console.warn(`[ApexCharts] Premium feature${s?"s":""} in use (${e.join(", ")}) require a Premium or Enterprise license; the ${a} plan does not include ${s?"them":"it"}. Running in trial mode with a watermark. Upgrade: ${gi}`);return}t!==wt.getKey()&&console.error(`[Apex] ${i.message}`)}function Ft(x,t){try{if(!H.isBrowser())return;if(x&&x.globals&&x.globals.isDestroyed){se.delete(t);return}const e=x&&x.dom&&x.dom.elWrap;if(!e)return;const s=Ar(x,t);if(s.length===0){se.delete(t),ws(t,e);return}se.add(t);const i=_r(x);if(Cr(i)){ws(t,e);return}kr(t,e),Mr(t,i,s)}catch{}}function Ne(){if(!H.isBrowser())return;const x=new Set,t=H.getApex(),e=t&&t._chartInstances;Array.isArray(e)&&e.forEach(s=>{const i=s&&s.chart;i&&i.w&&!i.w.globals.isDestroyed&&(x.add(i),Ft(i.w,i))}),Array.from(se).forEach(s=>{const i=s&&s.w,a=i&&i.dom&&i.dom.elWrap;if(!i||i.globals.isDestroyed||!a||a.isConnected===!1){se.delete(s);return}x.has(s)||Ft(i,s)})}wt.onChange(Ne);const da=class st{constructor(t,e){j(this,"core"),j(this,"responsive"),j(this,"axes"),j(this,"grid"),j(this,"graphics"),j(this,"coreUtils"),j(this,"crosshairs"),j(this,"events"),j(this,"fill"),j(this,"localization"),j(this,"options"),j(this,"series"),j(this,"theme"),j(this,"formatters"),j(this,"titleSubtitle"),j(this,"dimensions"),j(this,"updateHelpers"),j(this,"tooltip"),j(this,"data"),j(this,"animations"),j(this,"exports"),j(this,"legend"),j(this,"toolbar"),j(this,"zoomPanSelection"),j(this,"keyboardNavigation"),j(this,"annotations"),j(this,"morphTypeChange"),j(this,"timeScale"),j(this,"_keyboardNavigation"),j(this,"_zoomPanSelection"),j(this,"windowResizeHandler"),j(this,"parentResizeHandler"),j(this,"publicMethods",[]),j(this,"eventList",[]),j(this,"_renderPromise",null),j(this,"config"),j(this,"perspectives"),j(this,"storyboard"),j(this,"history"),j(this,"linkedViews"),j(this,"ink"),j(this,"measure"),j(this,"contextMenu"),j(this,"weave"),j(this,"renderer"),j(this,"rendererController"),this.opts=e,this.ctx=this,this.w=new Pa(e).init(),this.el=t,this.w.globals.cuid=R.randomId(),this.w.globals.chartID=this.w.config.chart.id?R.escapeString(this.w.config.chart.id):this.w.globals.cuid,Vs(this.w),new _e(this).initModules(),this.lastUpdateOptions=null,this._updateStats={fast:0,fastWithAxes:0,full:0},this.create=this.create.bind(this),H.isBrowser()&&(this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this))}render(){var t,e;if(!((e=(t=this.w)==null?void 0:t.config)!=null&&e.chart))return Promise.reject(new Error("ApexCharts: chart configuration is missing or invalid. Ensure the options object includes a `chart` property."));if(this._renderPromise)return this._renderPromise;const s=new Promise((i,a)=>{var n;if(R.elementExists(this.el)){typeof Apex._chartInstances>"u"&&(Apex._chartInstances=[]),this.w.config.chart.id&&Apex._chartInstances.push({id:this.w.globals.chartID,group:this.w.config.chart.group,chart:this}),this.setLocale(this.w.config.chart.defaultLocale);const r=this.w.config.chart.events.beforeMount;if(typeof r=="function"&&r(this,this.w),this.events.fireEvent("beforeMount",[this,this.w]),H.isBrowser()){window.addEventListener("resize",this.windowResizeHandler),lr(this.el.parentNode,this.parentResizeHandler);const l=this.el.getRootNode&&this.el.getRootNode(),c=R.is("ShadowRoot",l),h=this.el.ownerDocument;let d=c?l.getElementById("apexcharts-css"):h.getElementById("apexcharts-css");if(!d){d=B.createElementNS("http://www.w3.org/1999/xhtml","style"),d.id="apexcharts-css",d.textContent=hr;const f=((n=this.opts.chart)==null?void 0:n.nonce)||this.w.config.chart.nonce;
1247f&&d.setAttribute("nonce",f),c?l.prepend(d):this.w.config.chart.injectStyleSheet!==!1&&h.head.appendChild(d)}}const o=this.create(this.w.config.series,{});if(!o)return i(this);this.mount(o).then(()=>{typeof this.w.config.chart.events.mounted=="function"&&this.w.config.chart.events.mounted(this,this.w),this.events.fireEvent("mounted",[this,this.w]),i(o)}).catch(l=>{var c,h;const d=l instanceof Error?l:new Error(String(l)),f=d;f.chartId=(h=(c=this.w)==null?void 0:c.globals)==null?void 0:h.chartID,f.el=this.el,a(d)})}else a(new Error("Element not found"))});return this._renderPromise=s,s.catch(()=>{this._renderPromise===s&&(this._renderPromise=null)}),s}create(t,e){var s,i,a,n,r,o;const l=this.w;this.core||new _e(this).initModules();const c=this.w.globals;if(c.noData=!1,c.animationEnded=!1,!R.elementExists(this.el)||(this.responsive.checkResponsiveConfig(e),Vs(l),l.config.xaxis.convertedCatToNumeric&&new xe(l.config).convertCatToNumericXaxis(l.config,this.ctx),this.core.setupElements(),l.config.chart.type==="treemap"&&(l.config.grid.show=!1,l.config.yaxis[0].show=!1),c.svgWidth===0))return c.animationEnded=!0,null;let h=t;t.forEach((w,_)=>{w.hidden&&(h=this.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:_}))});const d=rt.checkComboSeries(h,l.config.chart.type);c.comboCharts=d.comboCharts,c.comboBarCount=d.comboBarCount;const f=h.every(w=>w.data&&w.data.length===0);(h.length===0||f&&c.collapsedSeries.length<1)&&this.series.handleNoData(),H.isBrowser()&&this.events.setupEventHandlers();const u=this.data.parseData(h);this._writeParsedSeriesData(u.seriesData),this._writeParsedRangeData(u.rangeData),this._writeParsedCandleData(u.candleData),this._writeParsedLabelData(u.labelData),this._writeParsedAxisFlags(u.axisFlags),(s=this.rendererController)==null||s.resolve(),(i=this.weave)==null||i.dispatch("afterParse"),this.theme.init(),new re(this.w,this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),(!c.noData||c.collapsedSeries.length===l.seriesData.series.length||l.config.legend.showForSingleSeries)&&((a=this.legend)==null||a.init()),this.series.hasAllSeriesEqualX(),c.axisCharts&&(this.core.coreCalculations(),l.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar&&(this.ctx.toolbar.minX=l.globals.minX,this.ctx.toolbar.maxX=l.globals.maxX)),this.formatters.heatmapLabelFormatters(),new rt(this.w).getLargestMarkerSize();const b=this.dimensions.plotCoords();this._writeLayoutCoords(b.layout);const m=this.core.xySettings();(n=this.weave)==null||n.dispatch("afterScales",{xyRatios:m}),this.grid.createGridMask();const A=this.core.plotChartType(h,m),v=new Ut(this.w,this);v.bringForward(),l.config.dataLabels.background.enabled&&v.dataLabelsBackground(),this.core.shiftGraphPosition(),(o=(r=this.legend)==null?void 0:r.heatmapGradientLegend)==null||o.repositionToPlot(),l.globals.dataPoints>50&&l.dom.elWrap.classList.add("apexcharts-disable-transitions");const y={plot:{left:l.layout.translateX,top:l.layout.translateY,width:l.layout.gridWidth,height:l.layout.gridHeight}};return{elGraph:A,xyRatios:m,dimensions:y}}mount(t=null){const e=this,s=e.w;return new Promise((i,a)=>{var n,r,o,l,c,h,d,f,u,g;if(e.el===null)return a(new Error("Not enough data to display or target element not found"));s.globals.allSeriesCollapsed&&e.series.handleNoData(),e.grid=new ls(e.w,e);const p=e.grid.drawGrid(),b=_e._featureRegistry.get("annotations");if(e.annotations=b?new b(e.w,{theme:e.theme,timeScale:e.timeScale}):null,(n=e.annotations)==null||n.drawImageAnnos(),(r=e.annotations)==null||r.drawTextAnnos(),s.config.grid.position==="back"&&(p&&s.dom.elGraphical.add(p.el),(o=p?.elGridBorders)!=null&&o.node&&s.dom.elGraphical.add(p.elGridBorders)),Array.isArray(t.elGraph))for(let v=0;v<t.elGraph.length;v++)s.dom.elGraphical.add(t.elGraph[v]);else s.dom.elGraphical.add(t.elGraph);s.config.grid.position==="front"&&(p&&s.dom.elGraphical.add(p.el),(l=p?.elGridBorders)!=null&&l.node&&s.dom.elGraphical.add(p.elGridBorders)),s.config.xaxis.crosshairs.position==="front"&&e.crosshairs.drawXCrosshairs(),s.config.yaxis[0].crosshairs.position==="front"&&e.crosshairs.drawYCrosshairs(),s.config.chart.type!=="treemap"&&e.axes.drawAxis(s.config.chart.type,p);const m=new ie(this.w,this.ctx,p),A=new Pe(this.w,{theme:this.theme,timeScale:this.timeScale},p);if(p!==null&&(m.xAxisLabelCorrections(),A.setYAxisTextAlignments(),s.config.yaxis.map((v,y)=>{s.globals.ignoreYAxisIndexes.indexOf(y)===-1&&A.yAxisTitleRotate(y,v.opposite)})),(c=e.annotations)==null||c.drawAxesAnnotations(),!s.globals.noData){if(H.isBrowser()&&s.config.tooltip.enabled&&!s.globals.noData&&((h=e.w.globals.tooltip)==null||h.drawTooltip(t.xyRatios)),s.config.chart.accessibility.enabled&&s.c
1247onfig.chart.accessibility.keyboard.enabled&&s.config.chart.accessibility.keyboard.navigation.enabled&&((d=e.keyboardNavigation)==null||d.init()),H.isBrowser()&&s.globals.axisCharts&&(s.axisFlags.isXNumeric||s.config.xaxis.convertedCatToNumeric||s.axisFlags.isRangeBar))(s.config.chart.zoom.enabled||s.config.chart.selection&&s.config.chart.selection.enabled||s.config.chart.pan&&s.config.chart.pan.enabled)&&((f=e.zoomPanSelection)==null||f.init({xyRatios:t.xyRatios}));else{const v=s.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(w=>{v[w]=!1})}s.config.chart.toolbar.show&&!s.globals.allSeriesCollapsed&&((u=e.toolbar)==null||u.createToolbar())}(g=e.weave)==null||g.dispatch("draw",{pass:"full",xyRatios:t?.xyRatios}),s.globals.memory.methodsToExec.length>0&&s.globals.memory.methodsToExec.forEach(v=>{v.method(v.params,!1,v.context)}),!s.globals.axisCharts&&!s.globals.noData&&e.core.resizeNonAxisCharts(),Ft(s,e),i(e)})}destroy(){var t;this._renderPromise=null,H.isBrowser()&&(window.removeEventListener("resize",this.windowResizeHandler),cr(this.el.parentNode,this.parentResizeHandler),clearTimeout((t=this.w.globals.resizeTimer)!=null?t:void 0));const e=this.w.config.chart.id;e&&Array.isArray(Apex._chartInstances)&&Apex._chartInstances.forEach((s,i)=>{s.id===R.escapeString(e)&&Apex._chartInstances.splice(i,1)}),this._keyboardNavigation&&this._keyboardNavigation.destroy(),ws(this),vr(this),new di(this.ctx).clear({isUpdating:!1})}updateOptions(t,e=!1,s=!0,i=!0,a=!0){const n=this.w;if(n.interact.selection=void 0,this.lastUpdateOptions){if(R.shallowEqual(this.lastUpdateOptions,t))return Promise.resolve(this);if(t.series&&this.lastUpdateOptions.series&&!st._optionsTooBigToCompare(t)&&JSON.stringify(this.lastUpdateOptions.series)===JSON.stringify(t.series)){const r=G({},t),o=G({},this.lastUpdateOptions);if(delete r.series,delete o.series,R.shallowEqual(r,o))return Promise.resolve(this)}}return t.series&&(this.data.resetParsingFlags(),this.series.resetSeries(!1,!0,!1),t.series.length&&t.series[0].data&&(t.series=t.series.map((r,o)=>this.updateHelpers._extendSeries(r,o))),this.updateHelpers.revertDefaultAxisMinMax()),t.xaxis&&(t=this.updateHelpers.forceXAxisUpdate(t)),t.yaxis&&(t=this.updateHelpers.forceYAxisUpdate(t)),n.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),t.theme&&(t=this.theme.updateThemeOptions(t)),this.updateHelpers._updateOptions(t,e,s,i,a)}updateSeries(t=[],e=!0,s=!0){return this.data.resetParsingFlags(),this.series.prepareDataUpdate(),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(t,e,s)}appendSeries(t,e=!0,s=!0){this.data.resetParsingFlags();const i=this.w.config.series.slice();return i.push(t),this.series.prepareDataUpdate(),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,e,s)}appendData(t,e=!0){const s=this;s.data.resetParsingFlags(),s.w.globals.dataChanged=!0,s.w.config.chart.animations.enabled&&s.series.getPreviousPaths();const i=s.w.config.series.slice();for(let a=0;a<i.length;a++)if(t[a]!==null&&typeof t[a]<"u"){const n=t[a],r=i[a];for(let o=0;o<n.data.length;o++)r.data.push(n.data[o])}return sn(i,s.w),s.w.config.series=i,e&&(s.w.globals.initialSeries=s.w.config.series),this.update()}static _optionsTooBigToCompare(t){const e=t&&t.series;if(!Array.isArray(e))return!1;let s=0;for(let i=0;i<e.length;i++){const a=e[i]&&e[i].data;if(s+=Array.isArray(a)?a.length:1,s>1e3)return!0}return!1}update(t){return new Promise((e,s)=>{if(t&&this.lastUpdateOptions&&!st._optionsTooBigToCompare(t)&&JSON.stringify(this.lastUpdateOptions)===JSON.stringify(t))return e(this);this.lastUpdateOptions=t&&!st._optionsTooBigToCompare(t)?R.clone(t):null,new di(this.ctx).clear({isUpdating:!0});const i=this.create(this.w.config.series,t??{});if(!i)return e(this);this.mount(i).then(()=>{var a;(a=this.morphTypeChange)==null||a.applyChromeFade(),xn(this.w),yn(this.w),typeof this.w.config.chart.events.updated=="function"&&this.w.config.chart.events.updated(this,this.w),this.events.fireEvent("updated",[this,this.w]),this.w.globals.isDirty=!0,e(this)}).catch(a=>{s(a)})})}_fastAxisChromeRefresh(t){const e=this.w,s=e.globals;this._fastAxisBailReason="";try{if(s.isBarHorizontal)return this._fastAxisBailReason="barHorizontal",!1;
1247if(e.config.chart.sparkline.enabled)return!0;const i=e.config.annotations;if(i&&(i.yaxis&&i.yaxis.length||i.xaxis&&i.xaxis.length||i.points&&i.points.length||i.texts&&i.texts.length||i.images&&i.images.length))return this._fastAxisBailReason="annotations",!1;if(e.config.chart.ink&&e.config.chart.ink.enabled)return this._fastAxisBailReason="ink",!1;const a=this.dimensions;if(!a||!a.dimYAxis)return this._fastAxisBailReason="noDimensions",!1;const n=e.layout.yLabelsCoords,r=e.layout.yTitleCoords,o=a.dimYAxis.getyAxisLabelsCoords(),l=a.dimYAxis.getyAxisTitleCoords();e.layout.yLabelsCoords=[],e.layout.yTitleCoords=[],e.config.yaxis.map((v,y)=>{e.layout.yLabelsCoords.push({width:o[y].width,index:y}),e.layout.yTitleCoords.push({width:l[y].width,index:y})});const c=a.dimYAxis.getTotalYAxisWidth();if(c>a.yAxisWidth+2)return e.layout.yLabelsCoords=n,e.layout.yTitleCoords=r,this._fastAxisBailReason=`labelWidth ${c} > ${a.yAxisWidth}`,!1;const h=e.dom.elGraphical.node,d=h.querySelector(".apexcharts-grid"),f=h.querySelector(".apexcharts-grid-borders");if(!d)return this._fastAxisBailReason="missingGridNode",!1;const u=d.parentNode,g=f?f.nextSibling:d.nextSibling;d.remove(),f&&f.remove(),h.querySelectorAll(".apexcharts-xaxis-tick").forEach(v=>v.remove()),this.grid=new ls(e,this);const p=this.grid.drawGrid();p&&p.el&&(u.insertBefore(p.el.node,g),p.elGridBorders&&p.elGridBorders.node&&u.insertBefore(p.elGridBorders.node,g));const b=new ie(this.w,this.ctx,p),m=h.querySelector(".apexcharts-xaxis");if(m){const v=m.parentNode,y=m.nextSibling;m.remove();const w=b.drawXaxis();v.insertBefore(w.node,y)}const A=new Pe(this.w,{theme:this.theme,timeScale:this.timeScale},p);for(let v=0;v<e.config.yaxis.length;v++){if(s.ignoreYAxisIndexes.indexOf(v)!==-1)continue;const y=e.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${v}']`);if(!y)return this._fastAxisBailReason="missingYAxisNode",!1;const w=y.parentNode;if(!w)return this._fastAxisBailReason="missingYAxisParent",!1;const _=y.nextSibling;y.remove();const C=A.drawYaxis(v);w.insertBefore(C.node,_)}return p!==null&&(b.xAxisLabelCorrections(),A.setYAxisTextAlignments(),e.config.yaxis.map((v,y)=>{s.ignoreYAxisIndexes.indexOf(y)===-1&&A.yAxisTitleRotate(y,v.opposite)})),!0}catch(i){return this._fastAxisBailReason="error: "+(i&&i.message),!1}}fastUpdate(t,e){return new Promise((s,i)=>{var a,n,r;try{const o=this.w,l=o.globals;l.shouldAnimate=t,l.dataChanged=!0,l.animationEnded=!1,Es.invalidateSelectors(o);const c=o.globals;c.maxY=-Number.MAX_VALUE,c.minY=Number.MIN_VALUE,c.minYArr=[],c.maxYArr=[],c.maxX=-Number.MAX_VALUE,c.minX=Number.MAX_VALUE,c.initialMaxX=-Number.MAX_VALUE,c.initialMinX=Number.MAX_VALUE,c.yAxisScale=[],c.xAxisScale=null,c.xAxisTicksPositions=[],c.xRange=0,c.yRange=[],c.zRange=0,c.xTickAmount=0,c.multiAxisTickAmount=0,c.pointsArray=[],c.barCanvasCoords=null,c.dataLabelsRects=[],c.lastDrawnDataLabelsIndexes=[],c.textRectsCache=new Map,c.domCache=new Map,c.cachedSelectors={},c.disableZoomIn=!1,c.disableZoomOut=!1,l.axisCharts&&(this.core.coreCalculations(),o.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters()),this.formatters.heatmapLabelFormatters();const h=this.core.xySettings();this._zoomPanSelection&&(this._zoomPanSelection.xyRatios=h);const d=JSON.stringify({y:(l.yAxisScale||[]).map(C=>C?C.result:null),xMin:l.minX,xMax:l.maxX}),f=l.axisCharts&&e!=null&&d!==e;if(f&&!this._fastAxisChromeRefresh(h))return this._updateStats.full++,this.update().then(()=>s(this)).catch(i);f?this._updateStats.fastWithAxes++:this._updateStats.fast++,(a=this.weave)==null||a.dispatch("afterScales",{pass:"fast",xyRatios:h});const u=this.ctx.renderer,g=!!(u&&u.kind==="canvas"&&u.canRepaintInPlace&&u.canRepaintInPlace());g&&(u._repaintHostInPlace=!0);const p=o.dom.elGraphical.node;p.querySelectorAll((g?"":".apexcharts-canvas-series-wrap, ")+".apexcharts-plot-series, .apexcharts-series, .apexcharts-datalabels, .apexcharts-datalabels-background").forEach(C=>{var S;return(S=C.parentNode)==null?void 0:S.removeChild(C)});const m=this.core.plotChartType(o.config.series,h),A=p.querySelector(".apexcharts-grid"),v=p.querySelector(".apexcharts-xaxis"),y=Array.isArray(m)?m:[m],w=A&&o.config.grid.position==="front"?A:v;
1247w?y.forEach(C=>{const S=C&&C.node?C.node:C;S&&p.insertBefore(S,w)}):y.forEach(C=>{o.dom.elGraphical.add(C)});const _=new Ut(o,this);_.bringForward(),o.config.dataLabels.background.enabled&&_.dataLabelsBackground(),H.isBrowser()&&o.config.tooltip.enabled&&!l.noData&&((n=o.globals.tooltip)==null||n.drawTooltip(h)),(r=this.weave)==null||r.dispatch("draw",{pass:"fast",xyRatios:h}),typeof o.config.chart.events.updated=="function"&&o.config.chart.events.updated(this,o),this.events.fireEvent("updated",[this,o]),Ft(o,this),l.isDirty=!0,s(this)}catch(o){i(o)}})}getSyncedCharts(){const t=this.getGroupedCharts();return t.splice(0,0,this),t}getGroupedCharts(){return Apex._chartInstances.filter(t=>this!==t.chart&&!!this.w.config.chart.group&&this.w.config.chart.group===t.group).map(t=>t.chart)}static getChartByID(t){const e=R.escapeString(t);if(!Apex._chartInstances)return;const s=Apex._chartInstances.filter(i=>i.id===e)[0];return s&&s.chart}static initOnLoad(){var t;const e=document.querySelectorAll("[data-apexcharts]");for(let s=0;s<e.length;s++){const i=e[s],a=JSON.parse((t=e[s].getAttribute("data-options"))!=null?t:"");new st(i,a).render()}}static exec(t,e,...s){const i=this.getChartByID(t);if(!i)return;i.w.globals.isExecCalled=!0;let a=null;return i.publicMethods.indexOf(e)!==-1&&(a=i[e](...s)),a}static merge(t,e){return R.extend(t,e)}static getThemePalettes(){return hs()}static use(t){hi(t)}static registerFeatures(t){_e.registerFeatures(t)}static setLicense(t){return wt.setLicense(t),Ne(),st}static registerPlugin(t){return nr(t),st}static unregisterPlugin(t){return or(t),st}static registerRenderer(t,e){la.registerRenderer(t,e)}static registerSeriesType(t,e){const s=st._customSeriesFactory;return s?!e||typeof e.renderItem!="function"?(console.warn(`[apexcharts] registerSeriesType("${t}") needs a def with a renderItem() function.`),st):Xn(t)&&!Tt(t)?(console.warn(`[apexcharts] registerSeriesType("${t}
1247") would override the built-in "${t}" chart type; pick another name.`),st):(hi({[t]:s(t,e)}),Fn(t),st):(console.warn(`[apexcharts] registerSeriesType("${t}") requires the Marks feature: import 'apexcharts/features/marks'.`),st)}static unregisterSeriesType(t){return Tt(t)&&In(t),st}static registerTheme(t,e){return An(t,e),st}static unregisterTheme(t){return Sn(t),st}static registerEasing(t,e){return Va(t,e),st}static crossfilter(t){const e=st._crossfilterFactory;if(!e)return console.warn("[apexcharts] ApexCharts.crossfilter(...) requires the link feature: import 'apexcharts/features/link'."),null;const s=e(t);return Ne(),s}static getCrossfilter(t){const e=st._crossfilterGet;return e?e(t):null}clearCrossfilter(){var t;(t=this.linkedViews)==null||t.clearGroup()}startMeasure(){var t;(t=this.measure)==null||t.startMeasure()}stopMeasure(){var t;(t=this.measure)==null||t.stopMeasure()}clearMeasures(){var t;(t=this.measure)==null||t.clearMeasures()}toggleSeries(t){return this.series.toggleSeries(t)}highlightSeriesOnLegendHover(t,e){return this.series.toggleSeriesOnHover(t,e)}showSeries(t){this.series.showSeries(t)}hideSeries(t){this.series.hideSeries(t)}highlightSeries(t){this.series.highlightSeries(t)}isSeriesHidden(t){return this.series.isSeriesHidden(t)}resetSeries(t=!0,e=!0){this.series.resetSeries(t,e)}addEventListener(t,e){this.events.addEventListener(t,e)}removeEventListener(t,e){this.events.removeEventListener(t,e)}addXaxisAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),(i=a.annotations)==null||i.addXaxisAnnotationExternal(t,e,a)}addYaxisAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),(i=a.annotations)==null||i.addYaxisAnnotationExternal(t,e,a)}addPointAnnotation(t,e=!0,s=void 0){var i;let a=this;s&&(a=s),(i=a.annotations)==null||i.addPointAnnotationExternal(t,e,a)}clearAnnotations(t=void 0){var e;let s=this;t&&(s=t),s.lastUpdateOptions=null,(e=s.annotations)==null||e.clearAnnotations(s)}removeAnnotation(t,e=void 0){var s;let i=this;e&&(i=e),i.lastUpdateOptions=null,(s=i.annotations)==null||s.removeAnnotation(i,t)}getChartArea(){return this.w.dom.baseEl.querySelector(".apexcharts-inner")}getSeriesTotalXRange(t,e){return this.coreUtils.getSeriesTotalsXRange(t,e)}getHighestValueInSeries(t=0){return new cs(this.w).getMinYMaxY(t).highestY}getLowestValueInSeries(t=0){return new cs(this.w).getMinYMaxY(t).lowestY}getSeriesTotal(){return this.w.globals.seriesTotals}getState(){const t=this.w,e=t.globals;return{series:t.seriesData.series,seriesNames:t.seriesData.seriesNames,colors:e.colors,labels:t.labelData.labels,seriesTotals:e.seriesTotals,seriesPercent:e.seriesPercent,seriesXvalues:e.seriesXvalues,seriesYvalues:e.seriesYvalues,minX:e.minX,maxX:e.maxX,minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,minXDiff:e.minXDiff,dataPoints:e.dataPoints,xAxisScale:e.xAxisScale,yAxisScale:e.yAxisScale,xTickAmount:e.xTickAmount,isXNumeric:t.axisFlags.isXNumeric,seriesYAxisMap:e.seriesYAxisMap,seriesYAxisReverseMap:e.seriesYAxisReverseMap,svgWidth:e.svgWidth,svgHeight:e.svgHeight,gridWidth:t.layout.gridWidth,gridHeight:t.layout.gridHeight,selectedDataPoints:t.interact.selectedDataPoints,collapsedSeriesIndices:e.collapsedSeriesIndices,zoomed:t.interact.zoomed,seriesX:t.seriesData.seriesX,seriesZ:t.seriesData.seriesZ,seriesCandleO:t.candleData.seriesCandleO,seriesCandleH:t.candleData.seriesCandleH,seriesCandleM:t.candleData.seriesCandleM,seriesCandleL:t.candleData.seriesCandleL,seriesCandleC:t.candleData.seriesCandleC,seriesRangeStart:t.rangeData.seriesRangeStart,seriesRangeEnd:t.rangeData.seriesRangeEnd,seriesGoals:t.seriesData.seriesGoals}}toggleDataPointSelection(t,e){return this.updateHelpers.toggleDataPointSelection(t,e)}zoomX(t,e){var s;(s=this.ctx.toolbar)==null||s.zoomUpdateOptions(t,e)}setLocale(t){this.localization.setCurrentLocaleValues(t)}dataURI(t){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.dataURI(t)}getSvgString(t){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.getSvgString(t)}exportToCSV(t={}
1247){if(!this.ctx.exports)throw new Error("apexcharts: Exports feature is not registered. Import apexcharts/features/exports.");return this.ctx.exports.exportToCSV(t)}paper(){return this.w.dom.Paper}getActiveRenderer(){return this.rendererController?this.rendererController.getActiveKind():"svg"}refreshTokens(){return this.lastUpdateOptions=null,this.update()}drillDown(t){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillDown(t)}drillUp(){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillUp()}drillToRoot(){if(!this.ctx.drilldown)throw new Error("apexcharts: Drilldown feature is not registered. Import apexcharts/features/drilldown.");return this.ctx.drilldown.drillToRoot()}static _writeDataProps(t,e){for(const s of Object.keys(e)){const i=Object.getOwnPropertyDescriptor(e,s);i&&"value"in i&&(t[s]=i.value)}}_writeParsedSeriesData(t){st._writeDataProps(this.w.seriesData,t)}_writeParsedRangeData(t){st._writeDataProps(this.w.rangeData,t)}_writeParsedCandleData(t){st._writeDataProps(this.w.candleData,t)}_writeParsedLabelData(t){st._writeDataProps(this.w.labelData,t)}_writeParsedAxisFlags(t){st._writeDataProps(this.w.axisFlags,t)}_writeLayoutCoords(t){st._writeDataProps(this.w.layout,t)}_parentResizeCallback(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}_windowResize(){this.w.globals.resizeTimer=window.setTimeout(()=>{const t=this.w.globals;if(this.core&&t.lastResizeSignature){const e=this.core.getResizeSignature();if(e.w===t.lastResizeSignature.w&&e.h===t.lastResizeSignature.h&&e.iw===t.lastResizeSignature.iw)return}t.resized=!0,t.dataChanged=!1,this.ctx.update()},150)}_windowResizeHandler(){var t;clearTimeout((t=this.w.globals.resizeTimer)!=null?t:void 0);let{redrawOnWindowResize:e}=this.w.config.chart;typeof e=="function"&&(e=e()),e&&this._windowResize()}};j(da,"perspectives",null);let lt=da;const fa=`.apexcharts-flip-y {
1248  transform: scaleY(-1) translateY(-100%);
1249  transform-origin: top;
1250  transform-box: fill-box;
1251}
1252.apexcharts-flip-x {
1253  transform: scaleX(-1);
1254  transform-origin: center;
1255  transform-box: fill-box;
1256}
1257.apexcharts-legend {
1258  display: flex;
1259  overflow: auto;
1260  padding: 0 10px;
1261}
1262.apexcharts-legend.apexcharts-legend-group-horizontal {
1263  flex-direction: column;
1264}
1265.apexcharts-legend-group {
1266  display: flex;
1267}
1268.apexcharts-legend-group-vertical {
1269  flex-direction: column-reverse;
1270}
1271.apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {
1272  flex-wrap: wrap
1273}
1274.apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
1275  flex-direction: column;
1276  bottom: 0;
1277}
1278.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
1279  justify-content: flex-start;
1280  align-items: flex-start;
1281}
1282.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {
1283  justify-content: center;
1284  align-items: center;
1285}
1286.apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {
1287  justify-content: flex-end;
1288  align-items: flex-end;
1289}
1290.apexcharts-legend-series {
1291  cursor: pointer;
1292  line-height: normal;
1293  display: flex;
1294  align-items: center;
1295}
1296.apexcharts-legend-text {
1297  position: relative;
1298  font-size: 14px;
1299}
1300.apexcharts-legend-text *, .apexcharts-legend-marker * {
1301  pointer-events: none;
1302}
1303.apexcharts-legend-marker {
1304  position: relative;
1305  display: flex;
1306  align-items: center;
1307  justify-content: center;
1308  cursor: pointer;
1309  margin-right: 1px;
1310}
1311
1312.apexcharts-legend-series.apexcharts-no-click {
1313  cursor: auto;
1314}
1315.apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {
1316  display: none !important;
1317}
1318.apexcharts-inactive-legend {
1319  opacity: 0.45;
1320} `;class ua{constructor(t,e){this.w=t,this.ctx=e}svgStringToNode(t){return new DOMParser().parseFromString(t,"image/svg+xml").documentElement}scaleSvgNode(t,e){const s=parseFloat(t.getAttributeNS(null,"width")),i=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",s*e),t.setAttributeNS(null,"height",i*e),t.setAttributeNS(null,"viewBox","0 0 "+s+" "+i)}inlineCanvasLayers(t){const e=this.w,s="http://www.w3.org/1999/xlink",i=e.dom.elWrap.querySelectorAll(".apexcharts-series-canvas");if(!i.length)return;const a=t.querySelectorAll(".apexcharts-canvas-series");for(let n=0;n<i.length&&n<a.length;n++){let r;try{r=i[n].toDataURL()}catch{continue}const o=a[n],l=document.createElementNS(tt,"image");l.setAttribute("x",o.getAttribute("x")||"0"),l.setAttribute("y",o.getAttribute("y")||"0"),l.setAttribute("width",o.getAttribute("width")||"0"),l.setAttribute("height",o.getAttribute("height")||"0"),l.setAttribute("href",r),l.setAttributeNS(s,"xlink:href",r),o.parentNode&&o.parentNode.replaceChild(l,o)}}getSvgString(t){return new Promise(e=>{const s=this.w;let i=t||s.config.chart.toolbar.export.scale||s.config.chart.toolbar.export.width/s.globals.svgWidth;i||(i=1);const a=s.globals.svgWidth*i,n=s.globals.svgHeight*i,r=s.dom.elWrap.cloneNode(!0);r.style.width=a+"px",r.style.height=n+"px",this.inlineCanvasLayers(r);const o=new XMLSerializer().serializeToString(r),l=s.config.legend.show&&s.dom.elLegendWrap&&s.dom.elLegendWrap.children.length>0;let c=`
1321        .apexcharts-tooltip, .apexcharts-toolbar, .apexcharts-xaxistooltip, .apexcharts-yaxistooltip, .apexcharts-xcrosshairs, .apexcharts-ycrosshairs, .apexcharts-zoom-rect, .apexcharts-selection-rect {
1322          display: none;
1323        }
1324      `;l&&(c+=fa);let h=`
1325        <svg xmlns="http://www.w3.org/2000/svg"
1326          version="1.1"
1327          xmlns:xlink="http://www.w3.org/1999/xlink"
1328          class="apexcharts-svg"
1329          xmlns:data="ApexChartsNS"
1330          transform="translate(0, 0)"
1331          width="${s.globals.svgWidth}px" height="${s.globals.svgHeight}px">
1332          <foreignObject width="100%" height="100%">
1333            <div xmlns="http://www.w3.org/1999/xhtml" style="width:${a}px; height:${n}px;">
1334            <style type="text/css">
1335              ${c}
1336            </style>
1337              ${o}
1338            </div>
1339          </foreignObject>
1340        </svg>
1341      `;const d=this.svgStringToNode(h);i!==1&&this.scaleSvgNode(d,i),this.convertImagesToBase64(d).then(()=>{h=new XMLSerializer().serializeToString(d),e(h.replace(/&nbsp;/g,"&#160;"))})})}convertImagesToBase64(t){const e=t.getElementsByTagName("image"),s=Array.from(e).map(i=>{const a=i.getAttributeNS("http://www.w3.org/1999/xlink","href");return a&&!a.startsWith("data:")?this.getBase64FromUrl(a).then(n=>{i.setAttributeNS("http://www.w3.org/1999/xlink","href",n)}).catch(n=>{console.error("Error converting image to base64:",n)}):Promise.resolve()});return Promise.all(s)}getBase64FromUrl(t){return H.isSSR()?Promise.resolve(t):new Promise((e,s)=>{const i=new Image;i.crossOrigin="Anonymous",i.onload=()=>{const a=document.createElement("canvas");a.width=i.width,a.height=i.height;const n=a.getContext("2d");n&&n.drawImage(i,0,0),e(a.toDataURL())},i.onerror=s,i.src=t})}svgUrl(){return new Promise(t=>
1341{this.getSvgString().then(e=>{const s=new Blob([e],{type:"image/svg+xml;charset=utf-8"});t(URL.createObjectURL(s))})})}dataURI(t){return H.isSSR()?Promise.resolve({imgURI:""}):new Promise(e=>{const s=this.w,i=t?t.scale||t.width/s.globals.svgWidth:1,a=document.createElement("canvas");a.width=s.globals.svgWidth*i,a.height=parseInt(s.dom.elWrap.style.height,10)*i;const n=s.config.chart.background==="transparent"||!s.config.chart.background?"#fff":s.config.chart.background,r=a.getContext("2d");r&&(r.fillStyle=n,r.fillRect(0,0,a.width,a.height),this.getSvgString(i).then(o=>{const l="data:image/svg+xml,"+encodeURIComponent(o),c=new Image;c.crossOrigin="anonymous",c.onload=()=>{r.drawImage(c,0,0);const h=a;if(h.msToBlob){const d=h.msToBlob();e({blob:d})}else{const d=a.toDataURL("image/png");e({imgURI:d})}},c.src=l}))})}exportToSVG(){this.svgUrl().then(t=>{this.triggerDownload(t,this.w.config.chart.toolbar.export.svg.filename,".svg")})}exportToPng(){const t=this.w.config.chart.toolbar.export.scale,e=this.w.config.chart.toolbar.export.width,s=t?{scale:t}:e?{width:e}:void 0;this.dataURI(s).then(({imgURI:i,blob:a})=>{a?navigator.msSaveOrOpenBlob(a,this.w.globals.chartID+".png"):this.triggerDownload(i,this.w.config.chart.toolbar.export.png.filename,".png")})}exportToCSV({series:t,fileName:e,columnDelimiter:s=",",lineDelimiter:i=`
1342`}){const a=this.w;t||(t=a.config.series);let n=[];const r=[];let o="";const l="\uFEFF",c=a.seriesData.series.map((y,w)=>a.globals.collapsedSeriesIndices.indexOf(w)===-1?y:[]),h=y=>{if(y==null||R.isNumber(y))return y;const w=String(y);return/^[=+\-@\t\r]/.test(w)?`'${w}`:w},d=y=>typeof a.config.chart.toolbar.export.csv.categoryFormatter=="function"?a.config.chart.toolbar.export.csv.categoryFormatter(y):a.config.xaxis.type==="datetime"&&String(y).length>=10?new Date(y).toDateString():R.isNumber(y)?y:h(y.split(s).join("")),f=y=>typeof a.config.chart.toolbar.export.csv.valueFormatter=="function"?a.config.chart.toolbar.export.csv.valueFormatter(y):h(y),u=Math.max(...t.map(y=>y.data?y.data.length:0)),g=new yt(this.w),p=new Pt(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale}),b=y=>{let w="";if(!a.globals.axisCharts)w=a.config.labels[y];else{if(a.config.xaxis.type==="category"||a.config.xaxis.convertedCatToNumeric)if(a.globals.isBarHorizontal){const _=a.formatters.yLabelFormatters[0],S=new nt(this.ctx.w).getActiveConfigSeriesIndex();w=_(a.labelData.labels[y],{seriesIndex:S,dataPointIndex:y,w:a})}else w=p.getLabel(a.labelData.labels,a.labelData.timescaleLabels,0,y).text;a.config.xaxis.type==="datetime"&&(a.config.xaxis.categories.length?w=a.config.xaxis.categories[y]:a.config.labels.length&&(w=a.config.labels[y]))}return w===null?"nullvalue":(Array.isArray(w)&&(w=w.join(" ")),R.isNumber(w)?w:w.split(s).join(""))},m=()=>[...Array(u)].map(()=>""),A=(y,w)=>{var _,C,S,k,M,L;if(n.length&&w===0&&r.push(n.join(s)),y.data){const E=y.data.length?y.data:m();for(let D=0;D<E.length;D++){n=[];let T=b(D);if(T!=="nullvalue"){if(T||(g.isFormatXY()?T=t[w].data[D].x:g.isFormat2DArray()&&(T=t[w].data[D]?t[w].data[D][0]:"")),w===0){n.push(d(T));for(let F=0;F<a.seriesData.series.length;F++){const P=g.isFormatXY()?(_=t[F].data[D])==null?void 0:_.y:c[F][D];n.push(f(P))}}(a.config.chart.type==="candlestick"||y.type&&y.type==="candlestick")&&(n.pop(),n.push(a.candleData.seriesCandleO[w][D]),n.push(a.candleData.seriesCandleH[w][D]),n.push(a.candleData.seriesCandleL[w][D]),n.push(a.candleData.seriesCandleC[w][D])),(a.config.chart.type==="boxPlot"||y.type&&y.type==="boxPlot")&&(n.pop(),n.push(a.candleData.seriesCandleO[w][D]),n.push(a.candleData.seriesCandleH[w][D]),n.push(a.candleData.seriesCandleM[w][D]),n.push(a.candleData.seriesCandleL[w][D]),n.push(a.candleData.seriesCandleC[w][D])),a.config.chart.type==="rangeBar"&&(n.pop(),n.push(a.rangeData.seriesRangeStart[w][D]),n.push(a.rangeData.seriesRangeEnd[w][D])),(a.config.chart.type==="violin"||y.type&&y.type==="violin")&&(n.pop(),n.push((C=a.violinData.seriesViolinMin[w])==null?void 0:C[D]),n.push((S=a.violinData.seriesViolinMax[w])==null?void 0:S[D]),n.push((L=(M=(k=a.violinData.seriesViolinPoints[w])==null?void 0:k[D])==null?void 0:M.length)!=null?L:0)),n.length&&r.push(n.join(s))}}}},v=()=>{const y=new Set,w={};t.forEach((_,C)=>{_?.data.forEach(S=>{let k,M;
1342if(g.isFormatXY())k=S.x,M=S.y;else if(g.isFormat2DArray())k=S[0],M=S[1];else return;w[k]||(w[k]=Array(t.length).fill("")),w[k][C]=f(M),y.add(k)})}),n.length&&r.push(n.join(s)),Array.from(y).sort().forEach(_=>{r.push([d(_),w[_].join(s)])})};n.push(a.config.chart.toolbar.export.csv.headerCategory),a.config.chart.type==="boxPlot"?(n.push("minimum"),n.push("q1"),n.push("median"),n.push("q3"),n.push("maximum")):a.config.chart.type==="candlestick"?(n.push("open"),n.push("high"),n.push("low"),n.push("close")):a.config.chart.type==="rangeBar"?(n.push("minimum"),n.push("maximum")):a.config.chart.type==="violin"?(n.push("minimum"),n.push("maximum"),n.push("observations")):t.map((y,w)=>{const _=(y.name?y.name:`series-${w}`)+"";a.globals.axisCharts&&n.push(_.split(s).join("")?_.split(s).join(""):`series-${w}`)}),a.globals.axisCharts||(n.push(a.config.chart.toolbar.export.csv.headerValue),r.push(n.join(s))),!a.globals.allSeriesHasEqualX&&a.globals.axisCharts&&!a.config.xaxis.categories.length&&!a.config.labels.length?v():t.map((y,w)=>{a.globals.axisCharts?A(y,w):(n=[],n.push(d(a.labelData.labels[w])),n.push(f(c[w])),r.push(n.join(s)))}),o+=r.join(i),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent(l+o),e||a.config.chart.toolbar.export.csv.filename,".csv")}triggerDownload(t,e,s){if(H.isSSR())return;const i=document.createElement("a");i.href=t,i.download=(e||this.w.globals.chartID)+s,document.body.appendChild(i),i.click(),document.body.removeChild(i)}}lt.registerFeatures({exports:ua});let Lr=class{constructor(t){this.w=t.w,this.lgCtx=t}getLegendStyles(){if(H.isSSR())return null;const t=document.createElement("style");t.setAttribute("type","text/css");const e=this.w.config.chart.nonce;e&&t.setAttribute("nonce",e);const s=document.createTextNode(fa);return t.appendChild(s),t}getLegendDimensions(){const e=this.w.dom.baseEl.querySelector(".apexcharts-legend");if(!e)return{clwh:0,clww:0};const{width:s,height:i}=e.getBoundingClientRect();return{clwh:i,clww:s}}appendToForeignObject(){var t;const e=this.getLegendStyles();this.w.config.chart.injectStyleSheet!==!1&&e&&((t=this.w.dom.elLegendForeign)==null||t.appendChild(e))}toggleDataSeries(t,e){var s,i,a;const n=this.w;if(n.globals.axisCharts||n.config.chart.type==="radialBar"){n.globals.resized=!0;let r=null,o=null;if(n.globals.risingSeries=[],n.globals.axisCharts){if(r=(s=Array.prototype.find.call(n.dom.baseEl.querySelectorAll(".apexcharts-series"),l=>l.getAttribute("data:realIndex")===String(t)))!=null?s:null,!r)return;o=parseInt((i=r.getAttribute("data:realIndex"))!=null?i:"",10)}else{if(r=n.dom.baseEl.querySelector(`.apexcharts-series[rel='${t+1}']`),!r)return;o=parseInt((a=r.getAttribute("rel"))!=null?a:"",10)-1}if(e?[{cs:n.globals.collapsedSeries,csi:n.globals.collapsedSeriesIndices},{cs:n.globals.ancillaryCollapsedSeries,csi:n.globals.ancillaryCollapsedSeriesIndices}].forEach(c=>{const h=c.cs,d=c.csi;this.riseCollapsedSeries(h,d,o)}):this.hideSeries({seriesEl:r,realIndex:o}),n.config.chart.accessibility.enabled){const l=n.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${t+1}"]`);if(l){const c=n.globals.collapsedSeriesIndices.includes(o)||n.globals.ancillaryCollapsedSeriesIndices.includes(o);l.setAttribute("aria-pressed",c?"true":"false");const h=l.querySelector(".apexcharts-legend-text"),d=h?h.textContent:n.seriesData.seriesNames[t],f=c?"hidden":"visible";l.setAttribute("aria-label",`${d}, ${f}. Press Enter or Space to toggle.`)}}}else{if(n.globals.resized=!0,n.globals.risingSeries=[],e)this.riseCollapsedSeries(n.globals.collapsedSeries,n.globals.collapsedSeriesIndices,t);else{const r=this.getSeriesAfterCollapsing({realIndex:t});this.lgCtx.updateSeries(r,n.config.chart.animations.dynamicAnimation.enabled)}if(n.config.chart.accessibility.enabled){const r=n.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${t+1}"]`);if(r){const o=n.globals.collapsedSeriesIndices.includes(t);r.setAttribute("aria-pressed",o?"true":"false");const l=r.querySelector(".apexcharts-legend-text"),c=l?l.textContent:n.seriesData.seriesNames[t],h=o?"hidden":"visible";r.setAttribute("aria-label",`${c}, ${h}. Press Enter or Space to toggle.`)}}}}_nonAxisSliceContainer(t){const e=this.w.config.chart.type;return(e==="pie"||e==="donut"||e==="polarArea"||e==="sunburst")&&t.length===1&&t[0]&&typeof t[0]=="object"&&Array.isArray(t[0].data)?t[0].data:t}_readSliceValue(t){return this.w.config.chart.type==="unit"&&t&&Array.isArray(t.data)?t.data:t&&typeof t=="object"?t.y:t}_writeSliceValue(t,e,s){const i=t[e];if(this.w.config.chart.type==="unit"&&i&&Array.isArray(i.data)){i.data=Array.isArray(s)?s:[];return}i&&typeof i=="object"?i.y=s:t[e]=s}getSeriesAfterCollapsing({realIndex:t}){var e,s;const i=this.w,a=i.globals,n=R.clone(i.config.series);if(a.axisCharts){const o=i.config.yaxis[a.seriesYAxisReverseMap[t]],l={index:t,data:n[t].data.slice(),type:n[t].type||i.config.chart.type,name:(a.seriesNames||[])[t]};if(o&&o.show&&o.showAlways)a.ancillaryCollapsedSeriesIndices.indexOf(t)<0&&(a.ancillaryCollapsedSeries.push(l),a.ancillaryCollapsedSeriesIndices.push(t));else if(a.collapsedSeriesIndices.indexOf(t)<0){a.collapsedSeries.push(l),a.collapsedSeriesIndices.push(t);const c=a.risingSeries.indexOf(t);a.risingSeries.splice(c,1)}}else if(a.collapsedSeriesIndices.indexOf(t)<0){const o=this._nonAxisSliceContainer(n);
1342a.collapsedSeries.push({index:t,data:this._readSliceValue(o[t]),type:(s=(e=i.config.series[t])==null?void 0:e.type)!=null?s:"line",name:(a.seriesNames||[])[t]}),a.collapsedSeriesIndices.push(t)}const r=a.axisCharts?i.config.series.length:this._nonAxisSliceContainer(n).length;return a.allSeriesCollapsed=a.collapsedSeries.length+a.ancillaryCollapsedSeries.length===r,this._getSeriesBasedOnCollapsedState(n)}hideSeries({seriesEl:t,realIndex:e}){const s=this.w,i=this.getSeriesAfterCollapsing({realIndex:e}),a=t.childNodes;for(let n=0;n<a.length;n++)a[n].classList.contains("apexcharts-series-markers-wrap")&&(a[n].classList.contains("apexcharts-hide")?a[n].classList.remove("apexcharts-hide"):a[n].classList.add("apexcharts-hide"));this.lgCtx.updateSeries(i,s.config.chart.animations.dynamicAnimation.enabled)}riseCollapsedSeries(t,e,s){const i=this.w;let a=R.clone(i.config.series);if(t.length>0){for(let n=0;n<t.length;n++)if(t[n].index===s){if(i.globals.axisCharts)a[s].data=t[n].data.slice(),a[s].hidden=!1;else{const r=this._nonAxisSliceContainer(a);this._writeSliceValue(r,s,t[n].data)}t.splice(n,1),e.splice(n,1),i.globals.risingSeries.push(s),n--}a=this._getSeriesBasedOnCollapsedState(a),this.lgCtx.updateSeries(a,i.config.chart.animations.dynamicAnimation.enabled)}}_getSeriesBasedOnCollapsedState(t){const e=this.w;let s=0;if(e.globals.axisCharts)t.forEach((a,n)=>{e.globals.collapsedSeriesIndices.indexOf(n)<0&&e.globals.ancillaryCollapsedSeriesIndices.indexOf(n)<0||(t[n].data=[],s++)});else{const a=this._nonAxisSliceContainer(t);a.forEach((n,r)=>{e.globals.collapsedSeriesIndices.indexOf(r)<0||(this._writeSliceValue(a,r,0),s++)})}const i=e.globals.axisCharts?t.length:this._nonAxisSliceContainer(t).length;return e.globals.allSeriesCollapsed=s===i,t}};const Lt="http://www.w3.org/2000/svg";class mi{constructor(t,e){this.w=t,this.ctx=e,this.svgEl=null,this.arrowEl=null,this.hoverValueEl=null,this._min=0,this._max=0,this._geom=null,this._bandHitEls=[],this._activeBandIndex=-1,this._onCellEnter=this._onCellEnter.bind(this),this._onCellLeave=this._onCellLeave.bind(this),this._onBandEnter=this._onBandEnter.bind(this),this._onBandLeave=this._onBandLeave.bind(this)}_getFormatter(){const t=this.w.config.plotOptions.heatmap.colorScale.gradientLegend;return typeof t.formatter=="function"?t.formatter:e=>{if(!Number.isFinite(e))return String(e);const s=Math.abs(e);return s>=1e3?e.toFixed(0):s>=10?e.toFixed(1):e.toFixed(2)}}static isEnabled(t){var e,s,i,a;const n=(a=(i=(s=(e=t?.config)==null?void 0:e.plotOptions)==null?void 0:s.heatmap)==null?void 0:i.colorScale)==null?void 0:a.gradientLegend;return!!(n&&n.enabled)}draw(){var t,e,s,i,a,n,r,o;const l=this.w,c=l.dom.elLegendWrap;if(!c)return;const h=l.config.plotOptions.heatmap.colorScale.gradientLegend,d=l.config.legend.position,f=d==="left"||d==="right",u=(e=(t=h.arrow)==null?void 0:t.size)!=null?e:8,g=u+4,p=h.showLabels?28:4,b=h.showLabels?20:4,m=h.showLabels?44:0,A=this._resolveStripLength(f?h.height:h.width,f),v=h.thickness,y=f?Math.max(v+g+4,m):A+p*2,w=f?A+b*2:v+g+4,_=v+g,C=(y-_)/2,S=f?d==="left"?C:C+g:p,k=f?b:d==="top"?g:4,M=B.createElementNS(Lt,"svg");M.setAttribute("class","apexcharts-heatmap-gradient-legend"),M.setAttribute("width",String(y)),M.setAttribute("height",String(w)),M.setAttribute("overflow","visible");
1342const L=B.createElementNS(Lt,"defs"),E=`apexcharts-heatmap-gradient-${l.globals.cuid}`,D=B.createElementNS(Lt,"linearGradient");D.setAttribute("id",E),f?(D.setAttribute("x1","0"),D.setAttribute("y1","1"),D.setAttribute("x2","0"),D.setAttribute("y2","0")):(D.setAttribute("x1","0"),D.setAttribute("y1","0"),D.setAttribute("x2","1"),D.setAttribute("y2","0"));const{min:T,max:F,stops:P,bands:Y}=this._computeStops();this._min=T,this._max=F,P.forEach(N=>{const X=B.createElementNS(Lt,"stop");X.setAttribute("offset",`${(N.percent*100).toFixed(2)}%`),X.setAttribute("stop-color",N.color),D.appendChild(X)}),L.appendChild(D),M.appendChild(L);const z=B.createElementNS(Lt,"rect");if(z.setAttribute("x",String(S)),z.setAttribute("y",String(k)),z.setAttribute("width",String(f?v:A)),z.setAttribute("height",String(f?A:v)),z.setAttribute("rx","2"),z.setAttribute("fill",`url(#${E})`),M.appendChild(z),h.showLabels){const N=((s=h.labelStyle)==null?void 0:s.colors)||(Array.isArray(l.config.legend.labels.colors)?l.config.legend.labels.colors[0]:l.config.legend.labels.colors)||l.config.chart.foreColor,X=((i=h.labelStyle)==null?void 0:i.fontSize)||"11px",V=((a=h.labelStyle)==null?void 0:a.fontFamily)||l.config.chart.fontFamily,U=this._getFormatter(),$=(q,K,Q,et)=>{const J=B.createElementNS(Lt,"text");return J.setAttribute("x",String(K)),J.setAttribute("y",String(Q)),J.setAttribute("text-anchor",et),J.setAttribute("dominant-baseline","middle"),J.setAttribute("fill",N),J.setAttribute("font-size",X),V&&J.setAttribute("font-family",V),J.textContent=String(q),J};if(f){const q=S+v/2;M.appendChild($(U(T),q,k+A+10,"middle")),M.appendChild($(U(F),q,k-10,"middle"))}else{const q=k+v/2;M.appendChild($(U(T),S-6,q,"end")),M.appendChild($(U(F),S+A+6,q,"start"))}}const W=((n=h.arrow)==null?void 0:n.color)||l.config.chart.foreColor,O=this._buildArrow(u,W,d);if(M.appendChild(O),this.arrowEl=O,this._bandHitEls=[],l.config.legend.onItemHover.highlightDataSeries&&Y.length>0&&Y.forEach(N=>{const X=B.createElementNS(Lt,"rect");if(f){const V=k+A-N.p2*A,U=k+A-N.p1*A;X.setAttribute("x",String(S)),X.setAttribute("y",String(V)),X.setAttribute("width",String(v)),X.setAttribute("height",String(Math.max(0,U-V)))}else X.setAttribute("x",String(S+N.p1*A)),X.setAttribute("y",String(k)),X.setAttribute("width",String(Math.max(0,(N.p2-N.p1)*A))),X.setAttribute("height",String(v));X.setAttribute("fill","transparent"),X.setAttribute("class","apexcharts-heatmap-gradient-band"),X.setAttribute("data:range-index",String(N.index)),X.style.cursor="pointer",M.appendChild(X),this._bandHitEls.push(X)}),this._geom={isVertical:f,position:d,stripX:S,stripY:k,stripLength:A,stripThickness:v,arrowSize:u,svgWidth:y,svgHeight:w},h.showHoverValue){const N=B.createElement("div");N.classList.add("apexcharts-heatmap-gradient-legend-value"),N.style.position="absolute",N.style.fontSize=((r=h.labelStyle)==null?void 0:r.fontSize)||"11px",N.style.fontFamily=((o=h.labelStyle)==null?void 0:o.fontFamily)||l.config.chart.fontFamily||"",N.style.color=l.config.chart.foreColor,N.style.background="rgba(0,0,0,0.65)",N.style.color="#fff",N.style.padding="2px 6px",N.style.borderRadius="3px",N.style.pointerEvents="none",N.style.whiteSpace="nowrap",N.style.opacity="0",N.style.transition="opacity 120ms ease",this.hoverValueEl=N}c.classList.add("apexcharts-heatmap-gradient-legend-wrap"),c.classList.add("apx-legend-position-"+d),c.appendChild(M),this.hoverValueEl&&c.appendChild(this.hoverValueEl),this.svgEl=M,this._applyWrapAlignment(c,d,f,y,w),this._attachHoverListeners(),this._attachBandHoverListeners()}_resolveStripLength(t,e){const s=this.w,i=e?s.globals.svgHeight||s.config.chart.height||300:s.globals.svgWidth||s.config.chart.width||600;if(typeof t=="string"){const a=t.trim();if(a.endsWith("%")){const r=parseFloat(a)||0;return Math.max(20,i*r/100)}const n=parseFloat(a);return Number.isFinite(n)?n:200}return typeof t=="number"&&Number.isFinite(t)?t:200}_applyWrapAlignment(t,e,s,i,a){const n=this.w,o=n.config.plotOptions.heatmap.colorScale.gradientLegend.align||"center",l=12,c=n.globals.svgWidth||n.config.chart.width||600,h=n.globals.svgHeight||n.config.chart.height||300,d=n.config.legend.offsetX||0,f=n.config.legend.offsetY||0;if(t.style.position="absolute",t.style.display="block",t.style.overflow="visible",t.style.padding="0",t.style.width=i+"px",t.style.height=a+"px",t.style.right="auto",t.style.bottom="auto",s){const u=h-a-l*2;let g;o==="start"?g=l:o==="end"?g=l+Math.max(0,u):g=l+Math.max(0,u)/2,t.style.top=g+f+"px",e==="left"?t.style.left=l+d+"px":t.style.left=c-i-l+d+"px"}else{const u=c-i-l*2;let g;o==="start"?g=l:o==="end"?g=l+Math.max(0,u):g=l+Math.max(0,u)/2,t.style.left=g+d+"px",e==="top"?t.style.top=l+f+"px":t.
1342style.top=h-a-l+f+"px"}}repositionToPlot(){var t,e;if(!H.isBrowser())return;const s=this.w,i=s.globals,a=s.dom.elLegendWrap;if(!a||!this._geom||!Number.isFinite(i.gridWidth)||!Number.isFinite(i.gridHeight))return;const{isVertical:n,position:r,svgWidth:o,svgHeight:l,stripX:c,stripY:h,stripThickness:d}=this._geom,f=s.config.plotOptions.heatmap.colorScale.gradientLegend.align||"center",u=s.config.legend.offsetX||0,g=s.config.legend.offsetY||0,p=(e=(t=this.ctx)==null?void 0:t.dimensions)==null?void 0:e.dimHelpers,b=p?p.getTitleSubtitleCoords("title").height+p.getTitleSubtitleCoords("subtitle").height:0,m=s.layout.xAxisHeight||0,A=(v,y)=>{const w=Math.max(0,v-y);return f==="start"?0:f==="end"?w:w/2};if(n){a.style.top=i.translateY+A(i.gridHeight,l)+g+"px";const v=r==="left"?0:i.translateX+i.gridWidth,y=r==="left"?i.translateX:i.svgWidth,w=(v+y)/2;a.style.left=w-c-d/2+u+"px"}else{a.style.left=i.translateX+A(i.gridWidth,o)+u+"px";const v=r==="top"?b:i.translateY+i.gridHeight+m,y=r==="top"?i.translateY:i.svgHeight,w=(v+y)/2;a.style.top=w-h-d/2+g+"px"}B.requestAnimationFrame(()=>this._enforceMinPlotGap())}_enforceMinPlotGap(){const t=this.w,e=t.dom.elLegendWrap,s=this.svgEl&&this.svgEl.querySelector("rect"),i=t.dom.baseEl.querySelector(".apexcharts-grid");if(!e||!s||!i||!this._geom)return;const a=s.getBoundingClientRect(),n=i.getBoundingClientRect();if(!a.width||!a.height||!n.width||!n.height)return;const r=16,{isVertical:o,position:l}=this._geom;if(o){const c=l==="left"?n.left-a.right:a.left-n.right;if(c<r){const h=parseFloat(e.style.left)||0,d=r-c;e.style.left=h+(l==="left"?-d:d)+"px"}}else{const c=l==="top"?n.top-a.bottom:a.top-n.bottom;if(c<r){const h=parseFloat(e.style.top)||0,d=r-c;e.style.top=h+(l==="top"?-d:d)+"px"}}}destroy(){var t,e,s,i,a,n,r;for(let o=0;o<this._bandHitEls.length;o++){const l=this._bandHitEls[o];(t=l.removeEventListener)==null||t.call(l,"mousemove",this._onBandEnter),(e=l.removeEventListener)==null||e.call(l,"mouseout",this._onBandLeave)}if(this._bandHitEls=[],this._activeBandIndex=-1,!!((s=this.ctx)!=null&&s.events))try{(a=(i=this.ctx.events).removeEventListener)==null||a.call(i,"dataPointMouseEnter",this._onCellEnter),(r=(n=this.ctx.events).removeEventListener)==null||r.call(n,"dataPointMouseLeave",this._onCellLeave)}catch{}}_attachBandHoverListeners(){if(H.isBrowser())for(let t=0;t<this._bandHitEls.length;t++){const e=this._bandHitEls[t];e.addEventListener("mousemove",this._onBandEnter),e.addEventListener("mouseout",this._onBandLeave)}}_onBandEnter(t){var e,s,i,a;const n=this.w,r=t.currentTarget,o=parseInt((e=r.getAttribute("data:range-index"))!=null?e:"-1",10);o<0||o===this._activeBandIndex||(this._activeBandIndex=o,(a=(i=(s=this.ctx)==null?void 0:s.events)==null?void 0:i.fireEvent)==null||a.call(i,"legendHover",[this.ctx,o,n]),new nt(n).highlightRangeInSeries(o,"highlight"))}_onBandLeave(){if(this._activeBandIndex<0)return;const t=this._activeBandIndex;this._activeBandIndex=-1,new nt(this.w).highlightRangeInSeries(t,"reset")}_attachHoverListeners(){var t,e;H.isBrowser()&&(e=(t=this.ctx)==null?void 0:t.events)!=null&&e.addEventListener&&(this.ctx.events.addEventListener("dataPointMouseEnter",this._onCellEnter),this.ctx.events.addEventListener("dataPointMouseLeave",this._onCellLeave))}_onCellEnter(...t){var e,s;const i=this.w;if(!this.arrowEl)return;const a=t[t.length-1];if(!a||typeof a!="object")return;const n=a.seriesIndex,r=a.dataPointIndex;if(typeof n!="number"||typeof r!="number"||i.config.chart.type!=="heatmap")return;const o=(s=(e=i.seriesData)==null?void 0:e.series)==null?void 0:s[n],l=o?.[r];l==null||Number.isNaN(l)||this._positionArrow(l)}_onCellLeave(){this.arrowEl&&(this.arrowEl.setAttribute("opacity","0"),this.hoverValueEl&&(this.hoverValueEl.style.opacity="0"))}_positionArrow(t){if(!this.arrowEl||!this._geom)return;const{isVertical:e,position:s,stripX:i,stripY:a,stripLength:n,stripThickness:r,arrowSize:o}=this._geom,l=this._min,h=this._max-l;let d;if(h===0?d=.5:d=(t-l)/h,d<0&&(d=0),d>1&&(d=1),e){const f=a+n-d*n;let u,g;s==="left"?(u=i+r,g=u+o):(u=i,g=u-o);const p=[`${u},${f}`,`${g},${f-o/2}`,`${g},${f+o/2}`].join(" ");this.arrowEl.setAttribute("points",p)}else{const f=i+d*n;let u,g;s==="top"?(u=a+r,g=u+o):(u=a,g=u-o);const p=[`${f},${u}`,`${f-o/2},${g}`,`${f+o/2},${g}`].join(" ");this.arrowEl.setAttribute("points",p)}
1342if(this.arrowEl.setAttribute("opacity","1"),this.hoverValueEl){const f=this._getFormatter();if(this.hoverValueEl.textContent=f(t),e){const u=a+n-d*n;s==="left"?this.hoverValueEl.style.left=`${i+r+o+8}px`:(this.hoverValueEl.style.left=`${i-o-8}px`,this.hoverValueEl.style.transform="translateX(-100%)"),this.hoverValueEl.style.top=`${u-9}px`}else{const u=i+d*n;this.hoverValueEl.style.left=`${u}px`,this.hoverValueEl.style.transform="translateX(-50%)",s==="top"?this.hoverValueEl.style.top=`${a+r+o+8}px`:this.hoverValueEl.style.top=`${a-o-18}px`}this.hoverValueEl.style.opacity="1"}}_buildArrow(t,e,s){const i=B.createElementNS(Lt,"polygon");return i.setAttribute("fill",e),i.setAttribute("opacity","0"),i.setAttribute("class","apexcharts-heatmap-gradient-arrow"),i.setAttribute("points","0,0 0,0 0,0"),i.setAttribute("pointer-events","none"),i}_computeStops(){var t,e;const s=this.w,i=s.config.plotOptions.heatmap.colorScale,a=i.gradientLegend;let n=1/0,r=-1/0;const o=((t=s.seriesData)==null?void 0:t.series)||[];for(let f=0;f<o.length;f++){const u=o[f];if(u)for(let g=0;g<u.length;g++){const p=u[g];p==null||Number.isNaN(p)||(p<n&&(n=p),p>r&&(r=p))}}Number.isFinite(n)||(n=0),Number.isFinite(r)||(r=0);let l=n,c=r;typeof i.min<"u"&&(l=i.min<n?i.min:n),typeof i.max<"u"&&(c=i.max>r?i.max:r);const h=[],d=[];if(i.ranges&&i.ranges.length>0){const f=i.ranges.map((b,m)=>Z(G({},b),{_originalIndex:m})).sort((b,m)=>b.from-m.from),u=f[0].from,g=f[f.length-1].to;l=u,c=g;const p=g-u||1;f.forEach(b=>{const m=(b.from-u)/p,A=(b.to-u)/p;h.push({percent:(m+A)/2,color:b.color}),d.push({index:b._originalIndex,p1:m,p2:A})})}else{const f=s.globals.colors[0]||"#008FFB",u=new R,g=(e=s.config.plotOptions.heatmap.shadeIntensity)!=null?e:.5,p=s.globals.hasNegs,b=Math.max(2,a.stops||16);for(let m=0;m<b;m++){const A=m/(b-1),v=l+A*(c-l),y=Math.abs(c)+Math.abs(l),w=y===0?0:100*v/y;let _;p?s.config.plotOptions.heatmap.reverseNegativeShade?_=w<0?w/100*(g*1.25):(1-w/100)*(g*1.25):_=w<=0?1-(1+w/100)*g:(1-w/100)*g:_=1-w/100,_>1&&(_=1),_<-1&&(_=-1);const C=s.config.plotOptions.heatmap.enableShades?u.shadeColor(s.config.theme.mode==="dark"?_*-1:_,f):f;h.push({percent:A,color:C})}}return{min:l,max:c,stops:h,bands:d}}}class Dr{constructor(t,e){this.w=t,this.ctx=e,this.updateSeries=(...s)=>e.updateHelpers._updateSeries(...s),this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed=this.w.config.chart.type==="bar"&&this.w.config.plotOptions.bar.distributed&&this.w.config.series.length===1,this.legendHelpers=new Lr(this)}init(){const t=this.w,e=t.globals,s=t.config;this.isBarsDistributed=s.chart.type==="bar"&&s.plotOptions.bar.distributed&&s.series.length===1;const i=s.legend.showForSingleSeries&&this.w.seriesData.series.length===1||this.isBarsDistributed||s.chart.type==="heatmap"||this.w.seriesData.series.length>1;if(this.legendHelpers.appendToForeignObject(),(i||!e.axisCharts)&&s.legend.show){const a=t.dom.elLegendWrap;for(;a.firstChild;)a.removeChild(a.firstChild);this.heatmapGradientLegend&&(this.heatmapGradientLegend.destroy(),this.heatmapGradientLegend=null),s.chart.type==="heatmap"&&mi.isEnabled(t)?(this.heatmapGradientLegend=new mi(t,this.ctx),this.heatmapGradientLegend.draw()):(this.drawLegends(),s.legend.position==="bottom"||s.legend.position==="top"?this.legendAlignHorizontal():(s.legend.position==="right"||s.legend.position==="left")&&this.legendAlignVertical())}}createLegendMarker({i:t,fillcolor:e}){const s=this.w,i=B.createElement("span");i.classList.add("apexcharts-legend-marker");const a=s.config.legend.markers.shape||s.config.markers.shape;let n=a;Array.isArray(a)&&(n=a[t]);const r=Array.isArray(s.config.legend.markers.size)?parseFloat(s.config.legend.markers.size[t]):parseFloat(s.config.legend.markers.size),o=Array.isArray(s.config.legend.markers.offsetX)?parseFloat(s.config.legend.markers.offsetX[t]):parseFloat(s.config.legend.markers.offsetX),l=Array.isArray(s.config.legend.markers.offsetY)?parseFloat(s.config.legend.markers.offsetY[t]):parseFloat(s.config.legend.markers.offsetY),c=Array.isArray(s.config.legend.markers.strokeWidth)?parseFloat(s.config.legend.markers.strokeWidth[t]):parseFloat(s.config.legend.markers.strokeWidth),h=i.style;
1342if(h.height=(r+c)*2+"px",h.width=(r+c)*2+"px",h.left=o+"px",h.top=l+"px",s.config.legend.markers.customHTML)h.background="transparent",h.color=e[t],Array.isArray(s.config.legend.markers.customHTML)?s.config.legend.markers.customHTML[t]&&(i.innerHTML=s.config.legend.markers.customHTML[t]()):i.innerHTML=s.config.legend.markers.customHTML();else{const f=new re(this.ctx.w,this.ctx).getMarkerConfig({cssClass:`apexcharts-legend-marker apexcharts-marker apexcharts-marker-${n}`,seriesIndex:t,strokeWidth:c,size:r}),g=(H.isBrowser()?window.SVG:global.SVG)().addTo(i).size("100%","100%"),p=new I(this.w).drawMarker(0,0,Z(G({},f),{pointFillColor:Array.isArray(e)?e[t]:f.pointFillColor,shape:n}));s.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach(m=>{m.node.classList.contains("apexcharts-marker-triangle")?m.node.style.transform="translate(50%, 45%)":m.node.style.transform="translate(50%, 50%)"}),g.add(p)}return i}drawLegends(){var t;const e=this,s=this.w,i=s.dom.elLegendWrap,a=s.config.legend.fontFamily;let n=s.seriesData.seriesNames,r=s.config.legend.markers.fillColors?s.config.legend.markers.fillColors.slice():s.globals.colors.slice();if(s.config.chart.type==="heatmap"){const h=s.config.plotOptions.heatmap.colorScale.ranges;n=h.map(d=>d.name?d.name:d.from+" - "+d.to),r=h.map(d=>d.color)}else this.isBarsDistributed&&(n=s.labelData.labels.slice());s.config.legend.customLegendItems.length&&(n=s.config.legend.customLegendItems);const o=s.formatters.legendFormatter,l=s.config.legend.inverseOrder,c=[];s.labelData.seriesGroups.length>1&&s.config.legend.clusterGroupedSeries&&s.labelData.seriesGroups.forEach((h,d)=>{c[d]=B.createElement("div"),c[d].classList.add("apexcharts-legend-group",`apexcharts-legend-group-${d}`),s.config.legend.clusterGroupedSeriesOrientation==="horizontal"?i.classList.add("apexcharts-legend-group-horizontal"):c[d].classList.add("apexcharts-legend-group-vertical")});for(let h=l?n.length-1:0;l?h>=0:h<=n.length-1;l?h--:h++){const d=o(n[h],{seriesIndex:h,w:s});let f=!1,u=!1;if(s.globals.collapsedSeries.length>0)for(let v=0;v<s.globals.collapsedSeries.length;v++)s.globals.collapsedSeries[v].index===h&&(f=!0);if(s.globals.ancillaryCollapsedSeriesIndices.length>0)for(let v=0;v<s.globals.ancillaryCollapsedSeriesIndices.length;v++)s.globals.ancillaryCollapsedSeriesIndices[v]===h&&(u=!0);const g=this.createLegendMarker({i:h,fillcolor:r});I.setAttrs(g,{rel:h+1,"data:collapsed":f||u}),(f||u)&&g.classList.add("apexcharts-inactive-legend");const p=B.createElement("div");if(s.config.chart.accessibility.enabled&&s.config.chart.accessibility.keyboard.enabled){p.setAttribute("role","button"),p.setAttribute("tabindex","0");const v=Array.isArray(d)?d.join(" "):d,y=f||u,w=y?"hidden":"visible";p.setAttribute("aria-label",`${v}, ${w}. Press Enter or Space to toggle.`),p.setAttribute("aria-pressed",y?"true":"false")}const b=B.createElement("span");b.classList.add("apexcharts-legend-text"),b.innerHTML=Array.isArray(d)?d.join(" "):d;let m=s.config.legend.labels.useSeriesColors?s.globals.colors[h]:Array.isArray(s.config.legend.labels.colors)?(t=s.config.legend.labels.colors)==null?void 0:t[h]:s.config.legend.labels.colors;m||(m=s.config.chart.foreColor),b.style.color=m,b.style.fontSize=s.config.legend.fontSize,b.style.fontWeight=s.config.legend.fontWeight,b.style.fontFamily=a||s.config.chart.fontFamily,I.setAttrs(b,{rel:h+1,i:h,"data:default-text":encodeURIComponent(d),"data:collapsed":f||u}),p.appendChild(g),p.appendChild(b);const A=new rt(this.w);s.config.legend.showForZeroSeries||A.getSeriesTotalByIndex(h)===0&&A.seriesHaveSameValues(h)&&!A.isSeriesNull(h)&&s.globals.collapsedSeriesIndices.indexOf(h)===-1&&s.globals.ancillaryCollapsedSeriesIndices.indexOf(h)===-1&&p.classList.add("apexcharts-hidden-zero-series"),s.config.legend.showForNullSeries||A.isSeriesNull(h)&&s.globals.collapsedSeriesIndices.indexOf(h)===-1&&s.globals.ancillaryCollapsedSeriesIndices.indexOf(h)===-1&&p.classList.add("apexcharts-hidden-null-series"),c.length?s.labelData.seriesGroups.forEach((v,y)=>{var w,_;v.includes((_=(w=s.config.series[h])==null?void 0:w.name)!=null?_:"")&&(i.appendChild(c[y]),c[y].appendChild(p))}):i.appendChild(p),i.classList.add(`apexcharts-align-${s.config.legend.horizontalAlign}`),i.classList.add("apx-legend-position-"+s.config.legend.position),p.classList.add("apexcharts-legend-series"),p.style.margin=`${s.config.legend.itemMargin.vertical}px ${s.config.legend.itemMargin.horizontal}px`,i.style.width=s.config.legend.width?s.config.legend.width+"px":"",i.style.height=s.config.legend.height?s.config.legend.height+"px":"",I.setAttrs(p,{rel:h+1,seriesName:R.escapeString(n[h]),"data:collapsed":f||u}),(f||u)&&p.classList.add("apexcharts-inactive-legend"),s.config.legend.onItemClick.toggleDataSeries||p.classList.add("apexcharts-no-click")}s.dom.elWrap.addEventListener("click",e.onLegendClick,!0),s.config.legend.onItemHover.highlightDataSeries&&s.config.legend.customLegendItems.length===0&&(s.dom.elWrap.addEventListener("mousemove",e.onLegendHovered,!0),s.dom.elWrap.addEventListener("mouseout",e.onLegendHovered,!0)),s.config.chart.accessibility.enabled&&s.c
1342onfig.chart.accessibility.keyboard.enabled&&s.dom.elWrap.addEventListener("keydown",e.onLegendKeyDown.bind(e),!0)}setLegendWrapXY(t,e){const s=this.w,i=s.dom.elLegendWrap,a=i.clientHeight;let n=0,r=0;if(s.config.legend.position==="bottom")r=s.globals.svgHeight-Math.min(a,s.globals.svgHeight/2)-5;else if(s.config.legend.position==="top"){const l=new Fe(this.w,this.ctx),c=l.dimHelpers.getTitleSubtitleCoords("title").height,h=l.dimHelpers.getTitleSubtitleCoords("subtitle").height;r=(c>0?c-10:0)+(h>0?h-10:0)}i.style.position="absolute",n=n+t+s.config.legend.offsetX,r=r+e+s.config.legend.offsetY,i.style.left=n+"px",i.style.top=r+"px",s.config.legend.position==="right"&&(i.style.left="auto",i.style.right=25+s.config.legend.offsetX+"px"),["width","height"].forEach(l=>{i&&i.style[l]&&(i.style[l]=parseInt(String(s.config.legend[l]),10)+"px")})}legendAlignHorizontal(){const t=this.w,e=t.dom.elLegendWrap;e.style.right="0";const s=new Fe(this.w,this.ctx),i=s.dimHelpers.getTitleSubtitleCoords("title"),a=s.dimHelpers.getTitleSubtitleCoords("subtitle"),n=20;let r=0;t.config.legend.position==="top"&&(r=i.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(n,r)}legendAlignVertical(){const t=this.w,e=this.legendHelpers.getLegendDimensions(),s=20;let i=0;t.config.legend.position==="left"&&(i=20),t.config.legend.position==="right"&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,s)}onLegendHovered(t){var e;const s=this.w,i=t.target,a=i.classList.contains("apexcharts-legend-series")||i.classList.contains("apexcharts-legend-text")||i.classList.contains("apexcharts-legend-marker");if(s.config.chart.type!=="heatmap"&&!this.isBarsDistributed)!i.classList.contains("apexcharts-inactive-legend")&&a&&new nt(this.ctx.w).toggleSeriesOnHover(t,i);else if(a){const n=parseInt((e=i.getAttribute("rel"))!=null?e:"0",10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,n,this.w]);const r=new nt(this.ctx.w);t.type==="mousemove"?r.highlightRangeInSeries(n,"highlight"):t.type==="mouseout"&&r.highlightRangeInSeries(n,"reset")}}onLegendKeyDown(t){const e=this,s=this.w,i=t.target;if((i.classList.contains("apexcharts-legend-series")||i.classList.contains("apexcharts-legend-text")||i.classList.contains("apexcharts-legend-marker"))&&(t.key==="Enter"||t.key===" ")){t.preventDefault();const n=i.getAttribute("rel");e.onLegendClick(t),n!==null&&s.config.legend.onItemClick.toggleDataSeries&&requestAnimationFrame(()=>{const r=s.dom.baseEl.querySelector(`.apexcharts-legend-series[rel="${n}"]`);r&&r.focus()})}}onLegendClick(t){var e;const s=this.w,i=t.target;if(!s.config.legend.customLegendItems.length&&(i.classList.contains("apexcharts-legend-series")||i.classList.contains("apexcharts-legend-text")||i.classList.contains("apexcharts-legend-marker"))){const a=parseInt((e=i.getAttribute("rel"))!=null?e:"0",10)-1,n=i.getAttribute("data:collapsed")==="true",r=this.w.config.chart.events.legendClick;typeof r=="function"&&r(this.ctx,a,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,a,this.w]);const o=this.w.config.legend.markers.onClick;typeof o=="function"&&i.classList.contains("apexcharts-legend-marker")&&(o(this.ctx,a,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,a,this.w])),s.config.chart.type!=="treemap"&&s.config.chart.type!=="heatmap"&&!this.isBarsDistributed&&s.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(a,n)}}}lt.registerFeatures({legend:Dr});const Er=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1343    <path d="M5 9 2 12l3 3"/>
1344    <path d="M9 5l3-3 3 3"/>
1345    <path d="M15 19l-3 3-3-3"/>
1346    <path d="M19 9l3 3-3 3"/>
1347    <path d="M2 12h20"/>
1348    <path d="M12 2v20"/>
1349</svg>
1350`,Rr=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1351    <circle cx="11" cy="11" r="7"/>
1352    <path d="m21 21-4.3-4.3M8 11h6M11 8v6"/>
1353</svg>
1354`,Tr=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1355    <path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/>
1356    <path d="M3 3v5h5"/>
1357</svg>
1358`,Pr=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1359    <path d="M12 5v14M5 12h14"/>
1360</svg>
1361`,Fr=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1362    <path d="M5 12h14"/>
1363</svg>
1364`,Xr=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1365    <path d="M5 3a2 2 0 0 0-2 2"/>
1366    <path d="M19 3a2 2 0 0 1 2 2"/>
1367    <path d="M21 19a2 2 0 0 1-2 2"/>
1368    <path d="M5 21a2 2 0 0 1-2-2"/>
1369    <path d="M9 3h1M14 3h1M9 21h1M14 21h1M3 9v1M3 14v1M21 9v1M21 14v1"/>
1370</svg>
1371`,Ir=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1372    <path d="M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.4 2.4 0 0 1 0-3.4l2.6-2.6a2.4 2.4 0 0 1 3.4 0Z"/>
1373    <path d="m14.5 12.5 2-2"/>
1374    <path d="m11.5 9.5 2-2"/>
1375    <path d="m8.5 6.5 2-2"/>
1376    <path d="m17.5 15.5 2-2"/>
1377</svg>
1378`,Nr=`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
1379    <path d="M4 6h16M4 12h16M4 18h16"/>
1380</svg>
1381`;class ga{constructor(t,e){this.w=t,this.ctx=e,this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=t.globals.minX,this.maxX=t.globals.maxX,this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elMeasure=null,this.elZoomReset=null,this.elMenuIcon=null,this.elMenu=null,this.elMenuItems=[],this.t=null}createToolbar(){var t,e;const s=this.w,i=()=>B.createElementNS("http://www.w3.org/1999/xhtml","div"),a=()=>{const c=B.createElementNS("http://www.w3.org/1999/xhtml","button");return c.setAttribute("type","button"),c},n=i();
1381if(n.setAttribute("class","apexcharts-toolbar"),n.style.top=s.config.chart.toolbar.offsetY+"px",n.style.right=-s.config.chart.toolbar.offsetX+3+"px",s.dom.elWrap.appendChild(n),this.elZoom=a(),this.elZoomIn=a(),this.elZoomOut=a(),this.elPan=a(),this.elSelection=a(),this.elMeasure=a(),this.elZoomReset=a(),this.elMenuIcon=a(),this.elMenu=i(),this.elCustomIcons=[],this.t=s.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(let c=0;c<this.t.customIcons.length;c++)this.elCustomIcons.push(a());const r=[],o=(c,h,d)=>{const f=c.toLowerCase();this.t[f]&&s.config.chart.zoom.enabled&&r.push({el:h,icon:typeof this.t[f]=="string"?this.t[f]:d,title:this.localeValues[c],class:`apexcharts-${f}-icon`})};o("zoomIn",this.elZoomIn,Pr),o("zoomOut",this.elZoomOut,Fr);const l=c=>{this.t[c]&&s.config.chart[c].enabled&&r.push({el:c==="zoom"?this.elZoom:this.elSelection,icon:typeof this.t[c]=="string"?this.t[c]:c==="zoom"?Rr:Xr,title:this.localeValues[c==="zoom"?"selectionZoom":"selection"],class:`apexcharts-${c}-icon`})};l("zoom"),l("selection"),this.t.pan&&s.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:typeof this.t.pan=="string"?this.t.pan:Er,title:this.localeValues.pan,class:"apexcharts-pan-icon"}),this.t.measure&&s.config.chart.measure&&s.config.chart.measure.enabled&&r.push({el:this.elMeasure,icon:typeof this.t.measure=="string"?this.t.measure:Ir,title:this.localeValues.measure||"Measure",class:"apexcharts-measure-icon"}),o("reset",this.elZoomReset,Tr),this.t.download&&r.push({el:this.elMenuIcon,icon:typeof this.t.download=="string"?this.t.download:Nr,title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(let c=0;c<this.elCustomIcons.length;c++)r.push({el:this.elCustomIcons[c],icon:this.t.customIcons[c].icon,title:this.t.customIcons[c].title,index:this.t.customIcons[c].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[c].class});r.forEach((c,h)=>{c.index&&R.moveIndexInArray(r,h,c.index)});for(let c=0;c<r.length;c++)I.setAttrs(r[c].el,{class:r[c].class,title:r[c].title,"aria-label":r[c].title}),r[c].el.innerHTML=r[c].icon,n.appendChild(r[c].el);this.elZoom.parentNode&&this.elZoom.setAttribute("aria-pressed",String(!!s.interact.zoomEnabled)),this.elSelection.parentNode&&this.elSelection.setAttribute("aria-pressed",String(!!s.interact.selectionEnabled)),this.elPan.parentNode&&this.elPan.setAttribute("aria-pressed",String(!!s.interact.panEnabled)),this.elMeasure.parentNode&&this.elMeasure.setAttribute("aria-pressed",String(!!s.interact.measureEnabled)),this.elMenuIcon.parentNode&&(this.elMenuIcon.setAttribute("aria-haspopup","true"),this.elMenuIcon.setAttribute("aria-expanded","false")),this._createHamburgerMenu(n),s.interact.zoomEnabled?this.elZoom.classList.add(this.selectedClass):s.interact.panEnabled?this.elPan.classList.add(this.selectedClass):s.interact.selectionEnabled?this.elSelection.classList.add(this.selectedClass):s.interact.measureEnabled&&this.elMeasure&&(this.elMeasure.classList.add(this.selectedClass),(e=(t=this.ctx.measure)==null?void 0:t.startMeasure)==null||e.call(t)),this.addToolbarEventListeners()}_createHamburgerMenu(t){this.elMenuItems=[],t.appendChild(this.elMenu),I.setAttrs(this.elMenu,{class:"apexcharts-menu",role:"menu"});const e=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}];for(let s=0;s<e.length;s++)this.elMenuItems.push(B.createElementNS("http://www.w3.org/1999/xhtml","div")),this.elMenuItems[s].innerHTML=e[s].title,I.setAttrs(this.elMenuItems[s],{class:`apexcharts-menu-item ${e[s].name}`,title:e[s].title,role:"menuitem",tabindex:"-1"}),this.elMenu.appendChild(this.elMenuItems[s])}addToolbarEventListeners(){var t,e,s,i,a,n,r,o,l;(t=this.elZoomReset)==null||t.addEventListener("click",this.handleZoomReset.bind(this)),(e=this.elSelection)==null||e.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),(s=this.elZoom)==null||s.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),(i=this.elZoomIn)==null||i.addEventListener("click",this.handleZoomIn.bind(this)),(a=this.elZoomOut)==null||a.addEventListener("click",this.handleZoomOut.bind(this)),(n=this.elPan)==null||n.addEventListener("click",this.togglePanning.bind(this)),(r=this.elMeasure)==null||r.addEventListener("click",this.toggleMeasure.bind(this)),(o=this.elMenuIcon)==null||o.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEac
1381h(h=>{h.classList.contains("exportSVG")?h.addEventListener("click",this.handleDownload.bind(this,"svg")):h.classList.contains("exportPNG")?h.addEventListener("click",this.handleDownload.bind(this,"png")):h.classList.contains("exportCSV")&&h.addEventListener("click",this.handleDownload.bind(this,"csv"))});for(let h=0;h<this.t.customIcons.length;h++)this.elCustomIcons[h].addEventListener("click",this.t.customIcons[h].click.bind(this,this.ctx,this.ctx.w));[this.elZoomReset,this.elSelection,this.elZoom,this.elZoomIn,this.elZoomOut,this.elPan,this.elMeasure,this.elMenuIcon,...this.elCustomIcons].forEach(h=>{h.addEventListener("keydown",d=>{if(d.key==="Enter"||d.key===" "){d.preventDefault();const f=h.className;h.click(),requestAnimationFrame(()=>{const u=this.w.dom.baseEl;if(!u)return;const g=f.split(" ").find(b=>b.startsWith("apexcharts-"));if(!g)return;const p=u.querySelector(`.${g}`);p&&p.focus()})}})}),(l=this.elMenuIcon)==null||l.addEventListener("keydown",h=>{var d;(h.key==="ArrowDown"||h.key==="ArrowUp")&&(h.preventDefault(),(d=this.elMenu)!=null&&d.classList.contains("apexcharts-menu-open")||this.toggleMenu(),window.setTimeout(()=>{const f=h.key==="ArrowDown"?0:this.elMenuItems.length-1;this.elMenuItems[f]&&this.elMenuItems[f].focus()},20))}),this.elMenuItems.forEach((h,d)=>{h.addEventListener("keydown",f=>{var u;f.key==="ArrowDown"?(f.preventDefault(),(this.elMenuItems[d+1]||this.elMenuItems[0]).focus()):f.key==="ArrowUp"?(f.preventDefault(),(this.elMenuItems[d-1]||this.elMenuItems[this.elMenuItems.length-1]).focus()):f.key==="Escape"||f.key==="Tab"?(this._closeMenu(),(u=this.elMenuIcon)==null||u.focus(),f.key==="Tab"||f.preventDefault()):(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),h.click())})})}toggleZoomSelection(t){this.ctx.getSyncedCharts().forEach(s=>{const i=s.ctx.toolbar,a=t==="selection"?"selectionEnabled":"zoomEnabled",n=!!s.w.globals[a];i.toggleOtherControls();const r=t==="selection"?i.elSelection:i.elZoom;n||(s.w.globals[a]=!0,r.classList.add(i.selectedClass)),r.setAttribute("aria-pressed",String(!!s.w.globals[a]))})}toggleMeasure(){var t,e,s,i;const a=this.w,n=!a.interact.measureEnabled;this.toggleOtherControls(),n&&(a.interact.measureEnabled=!0,(t=this.elMeasure)==null||t.classList.add(this.selectedClass),(s=(e=this.ctx.measure)==null?void 0:e.startMeasure)==null||s.call(e)),(i=this.elMeasure)==null||i.setAttribute("aria-pressed",String(a.interact.measureEnabled))}getToolbarIconsReference(){const t=this.w;this.elZoom||(this.elZoom=t.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=t.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=t.dom.baseEl.querySelector(".apexcharts-selection-icon")),this.elMeasure||(this.elMeasure=t.dom.baseEl.querySelector(".apexcharts-measure-icon"))}enableZoomPanFromToolbar(t){this.toggleOtherControls(),t==="pan"?this.w.interact.panEnabled=!0:this.w.interact.zoomEnabled=!0;const e=t==="pan"?this.elPan:this.elZoom,s=t==="pan"?this.elZoom:this.elPan;e&&e.classList.add(this.selectedClass),s&&s.classList.remove(this.selectedClass)}togglePanning(){this.ctx.getSyncedCharts().forEach(e=>{const s=e.ctx.toolbar,i=!!e.w.interact.panEnabled;s.toggleOtherControls(),i||(e.w.interact.panEnabled=!0,s.elPan.classList.add(s.selectedClass)),s.elPan.setAttribute("aria-pressed",String(!!e.w.interact.panEnabled))})}toggleOtherControls(){var t,e,s;const i=this.w;i.interact.panEnabled=!1,i.interact.zoomEnabled=!1,i.interact.selectionEnabled=!1,i.interact.measureEnabled&&(i.interact.measureEnabled=!1,(e=(t=this.ctx.measure)==null?void 0:t.stopMeasure)==null||e.call(t),(s=this.elMeasure)==null||s.setAttribute("aria-pressed","false")),this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom,this.elMeasure].forEach(n=>{n&&n.classList.remove(this.selectedClass)})}_currentXRange(){const t=this.w;return t.axisFlags.isRangeBar?{minX:t.globals.minY,maxX:t.globals.maxY}:{minX:t.globals.minX,maxX:t.globals.maxX}}handleZoomIn(){const t=this.w,{minX:e,maxX:s}=this._currentXRange();this.minX=e,this.maxX=s;const i=(e+s)/2,a=(e+i)/2,n=(s+i)/2,r=this._getNewMinXMaxX(a,n);t.interact.disableZoomIn||this.zoomUpdateOptions(r.minX,r.maxX)}handleZoomOut(){const t=this.w,{minX:e,maxX:s}=this._currentXRange();if(this.minX=e,this.maxX=s,t.config.xaxis.type==="datetime"&&new Date(e).getUTCFullYear()<1e3)return;const i=(e+s)/2,a=e-(i-e),n=s-(i-s),r=this._getNewMinXMaxX(a,n);t.interact.disableZoomOut||this.zoomUpdateOptions(r.minX,r.maxX)}_getNewMinXMaxX(t,e){const s=this.w.config.xaxis.convertedCatToNumeric;return{minX:s?Math.floor(t):t,maxX:s?Math.floor(e):e}}zoomUpdateOptions(t,e){const s=this.w;if(t===void 0&&e===void 0){this.handleZoomReset();return}if(s.config.xaxis.convertedCatToNumeric&&(t<1&&(t=1,e=s.globals.dataPoints),e-t<2))return;let i={min:t,max:e};const a=this.getBeforeZoomRange(i,void 0);a&&(i=a.xaxis);const n={xaxis:i};if(!s.globals.initialConfig)return;const r=R.clone(s.globals.initialConfig.yaxis);s.config.chart.group||(n.yaxis=r),this.w.interact.zoomed=!0,this.ctx.updateHelpers._updateOptions(n,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(i,r)}zoomCallback(t,e){typeof this.ev.zoomed=="function"&&(this.ev.zoomed(this.ctx,{xaxis:t,yaxis:e}),this.ctx.events.fireEvent("zoomed",{xaxis:t,yaxis:e}))}getBeforeZoomRange(t,e){let s=null;return typeof this.ev.beforeZoom=="function"&&(s=this.ev.beforeZoom(this,{xaxis:t,yaxis:e})),s}toggleMenu(){window.setTimeout(()=>{var t,e,s;(t=this.elMenu)!=null&&t.classList.contains("apexcharts-menu-open")?this._closeMenu():((e=this.elMenu)==null||e.classList.add("apexcharts-menu-open"),(s=this.elMenuIcon)==null||s.setAttribute("aria-expanded","true"))},0)}_closeMenu(){var t,e;(t=this.elMenu)==null||t.classList.remove("apexcharts-menu-open"),(e=this.elMenuIcon)==null||e.setAttribute("aria-expanded","fal
1381se")}handleDownload(t){const e=this.w,s=new ua(this.w,this.ctx);switch(t){case"svg":s.exportToSVG();break;case"png":s.exportToPng();break;case"csv":s.exportToCSV({series:e.config.series,columnDelimiter:e.config.chart.toolbar.export.csv.columnDelimiter});break}}handleZoomReset(){this.ctx.getSyncedCharts().forEach(e=>{const s=e.w;if(!s.interact.zoomed)return;if(s.globals.lastXAxis.min=s.globals.initialConfig.xaxis.min,s.globals.lastXAxis.max=s.globals.initialConfig.xaxis.max,e.updateHelpers.revertDefaultAxisMinMax(),typeof s.config.chart.events.beforeResetZoom=="function"){const a=s.config.chart.events.beforeResetZoom(e,s);a&&e.updateHelpers.revertDefaultAxisMinMax(a)}typeof s.config.chart.events.zoomed=="function"&&e.ctx.toolbar.zoomCallback({min:s.config.xaxis.min,max:s.config.xaxis.max});const i=e.ctx.series.emptyCollapsedSeries(R.clone(s.globals.initialSeries));e.updateHelpers._updateSeries(i,s.config.chart.animations.dynamicAnimation.enabled),s.interact.zoomed=!1})}destroy(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elMeasure=null,this.elZoomReset=null,this.elMenuIcon=null}}class _t{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/_t.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*_t.xRatio(t)}}const Br=240,Yr=.05,Or=.92,zr=.02,Hr=16.6667,Se=15;class Wr extends ga{constructor(t,e){super(t,e),this.w=t,this.ctx=e,this.dragged=!1,this.graphics=new I(this.w),this.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend"],this.clientX=0,this.clientY=0,this.startX=0,this.endX=0,this.dragX=0,this.startY=0,this.endY=0,this.dragY=0,this.moveDirection="none"}init({xyRatios:t}){const e=this.w,s=this;this.xyRatios=t,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.constraints=new Fa(0,0,e.layout.gridWidth,e.layout.gridHeight),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),e.dom.Paper.add(this.zoomRect),e.dom.Paper.add(this.selectionRect),e.config.chart.selection.type==="x"?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:e.layout.gridWidth,maxY:e.layout.gridHeight}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):e.config.chart.selection.type==="y"?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:e.layout.gridWidth}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=e.dom.baseEl.querySelector(`${e.globals.chartClass} .apexcharts-svg`),this.hoverArea&&(this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach(i=>{var a;(a=this.hoverArea)==null||a.addEventListener(i,s.svgMouseEvents.bind(s,t),{capture:!1,passive:!0})}),e.config.chart.zoom.enabled&&e.config.chart.zoom.allowMouseWheelZoom&&this.hoverArea.addEventListener("wheel",s.mouseWheelEvent.bind(s),{capture:!1,passive:!1}),this._momentumEnabled()&&["touchstart","touchmove","touchend","touchcancel"].forEach(i=>{var a;(a=this.hoverArea)==null||a.addEventListener(i,s.momentumTouch.bind(s),{capture:!1,passive:!1})}))}destroy(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null}svgMouseEvents(t,e){const s=this.w,i=this.ctx.toolbar;if(s.interact.momentum&&s.interact.momentum.busy||this._momentumEnabled()&&e.touches&&e.touches.length>1)return;const a=s.interact.zoomEnabled?s.config.chart.zoom.type:s.config.chart.selection.type,n=s.config.chart.toolbar.autoSelected;if(n!=="measure"&&(e.shiftKey?(s.interact.shiftWasPressed=!0,i.enableZoomPanFromToolbar(n==="pan"?"zoom":"pan")):s.interact.shiftWasPressed&&(i.enableZoomPanFromToolbar(n),s.interact.shiftWasPressed=!1)),!e.target)return;const r=e.target.classList;let o;if(e.target.parentNode&&e.target.parentNode!==null&&(o=e.target.parentNode.classList),!(r.contains("apexcharts-legend-marker")||r.contains("apexcharts-legend-text")||o&&o.contains("apexcharts-toolbar"))){if(this.clientX=e.type==="touchmove"||e.type==="touchstart"?e.touches[0].clientX:e.type==="touchend"?e.changedTouches[0].clientX:e.clientX,this.clientY=e.type==="touchmove"||e.type==="touchstart"?e.touches[0].clientY:e.type==="touchend"?e.changedTouches[0].clientY:e.clientY,e.type==="mousedown"&&e.which===1||e.type==="touchstart"){const c=this._gridRect();if(!c)return;this.startX=this._screenXToPlotPx(this.clientX),this.startY=this.clientY-c.top,this.dragged=!1,this.w.interact.mousedown=!0}(e.type==="mousemove"&&e.which===1||e.type==="touchmove")&&(this.dragged=!0,s.interact.panEnabled?(s.interact.selection=null,this.w.interact.mousedown&&this.panDragging({context:this,zoomtype:a,xyRatios:this.xyRatios})):(this.w.interact.mousedown&&s.interact.zoomEnabled||this.w.interact.mousedown&&s.interact.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:a}))),(e.type==="mouseup"||e.type==="touchend"||e.type==="mouseleave")&&this.handleMouseUp({zoomtype:a}),this.makeSelectionRectDraggable()}}handleMouseUp({zoomtype:t,isResized:e}){const s=this.w,i=this._gridRect();i&&(this.w.interact.mousedown||e)&&(this.endX=this._screenXToPlotPx(this.clientX),this.endY=this.clientY-i.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(s.interact.zoomEnabled||s.interact.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:t})),s.interact.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.interact.mousedown=!1}_wheel(){const t=this.w.interact;return t.wheel||(t.wheel={factor:1,clientX:0,rafId:null,endTimer:null}),t.wheel}mouseWheelEvent(t){t.preventDefault();const e=this._wheel();let s=t.deltaY;t.deltaMode===1?s*=33:t.deltaMode===2&&(s*=330),e.factor*=Math.pow(2,s/Br),e.clientX=t.clientX,e.rafId==null&&(e.rafId=requestAnimationFrame(()=>this._applyWheelZoom())),e.endTimer&&clearTimeout(e.endTimer),e.endTimer=setTimeout(()=>this._endWheelZoom(),150)}_applyWheelZoom(){const t=this.w,e=this._wheel();e.rafId=null;const s=e.factor;if(e.factor=1,s===1||t.globals.isDestroyed)return;const i=this._gridRect();if(!i||!i.width)return;const{min:a,max:n}=this._currentXWindow(),r=n-a,o=Math.min(Math.max((e.clientX-i.left)/i.width,0),1);let l=r*s;const c=this._clampBounds();if(c){const p=t.globals.minXDiff>0&&isFinite(t.globals.minXDiff)?t.globals.minXDiff:0,b=Math.max(p*2,(c.max-c.min)*1e-6);l<b&&(l=b),l>c.max-c.min&&(l=c.max-c.min)}let d=a+o*r-o*l,f=d+l;const u=r*1e-9;if(Math.abs(d-a)<u&&Math.abs(f-n)<u||isNaN(d)||isNaN(f))return;const g=this.getBeforeZoomRange({min:d,max:f},void 0);g&&g.xaxis&&(d=g.xaxis.min,f=g.xaxis.max),this._applyXRange(d,f,!0)}_endWheelZoom(){const t=this.w,e=this._wheel();if(e.endTimer=null,t.globals.isDestroyed||!t.interact.zoomed)return;const{min:s,max:i}=this._currentXWindow(),a=t.globals.initialConfig?R.clone(t.globals.initialConfig.yaxis):[],n=this.ctx.toolbar;n&&n.zoomCallback({min:s,max:i},a)}makeSelectionRectDraggable(){const t=this.w;if(!this.selectionRect)return;const e=this.selectionRect.node.getBoundingClientRect();e.width>0&&e.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:()=>{},updateRot:()=>{},createHandle:(s,i,a,n,r)=>r==="l"||r==="r"?s.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):s.circle(0),updateHandle:(s,i)=>s.center(i[0],i[1])}).resize().on("resize",()=>{var s;if(t.interact.selectionEnabled)t.interact.selection={x:parseFloat(this.selectionRect.node.getAttribute("x")),y:parseFloat(this.selectionRect.node.getAttribute("y")),width:parseFloat(this.selectionRect.node.getAttribute("width")),height:parseFloat(this.selectionRect.node.getAttribute("height"))},clearTimeout((s=this.w.globals.selectionResizeTimer)!=null?s:void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{this._emitSelectionFromRect()},30);else{const i=t.interact.zoomEnabled?t.config.chart.zoom.type:t.config.chart.selection.type;this.handleMouseUp({zoomtype:i,isResized:!0})}}))}preselectedSelection(){const t=this.w,e=this.xyRatios;if(!t.interact.zoomEnabled){if(typeof t.interact.selection<"u"&&t.interact.selection!==null)this.drawSelectionRect(Z(G({},t.interact.selection),{translateX:t.layout.translateX,translateY:t.layout.translateY}));else if(t.config.chart.selection.xaxis.min!==void 0&&t.config.chart.selection.xaxis.max!==void 0){let s=_t.dataXToPx(t,t.config.chart.selection.xaxis.min),i=_t.dataXToPx(t,t.config.chart.selection.xaxis.max)-s;t.axisFlags.isRangeBar&&(s=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,i=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);const a={x:s,y:0,width:i,height:t.layout.gridHeight,translateX:t.layout.translateX,translateY:t.layout.translateY,selectionEnabled:!0};this.drawSelectionRect(a),this.makeSelectionRectDraggable(),typeof t.config.chart.events.selection=="function"&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}}drawSelectionRect({x:t,y:e,width:s,height:i,translateX:a=0,translateY:n=0}){const r=this.w,o=this.zoomRect,l=this.selectionRect;if(this.dragged||r.interact.selection!==null){const c={transform:"translate("+a+", "+n+")"};r.interact.zoomEnabled&&this.dragged&&(s<0&&(s=1),o.attr({x:t,y:e,width:s,height:i,fill:r.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":r.config.chart.zoom.zoomedArea.fill.opacity,stroke:r.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":r.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":r.config.chart.zoom.zoomedArea.stroke.opacity}),I.setAttrs(o.node,c)),r.interact.selectionEnabled&&(l.attr({x:t,y:e,width:s>0?s:0,height:i>0?i:0,fill:r.config.chart.selection.fill.color,"fill-opacity":r.config.chart.selection.fill.opacity,stroke:r.config.chart.selection.stroke.color,"stroke-width":r.config.chart.selection.stroke.width,"stroke-dasharray":r.config.chart.selection.stroke.dashArray,"stroke-opacity":r.config.chart.selection.stroke.opacity}),I.setAttrs(l.node,c))}}hideSelectionRect(t){t&&t.attr({x:0,y:0,width:0,height:0})}selectionDrawing({context:t,zoomtype:e}){const s=this.w,i=t,a=this._gridRect();if(!a)return;const n=i.startX-1,r=i.startY;let o=!1,l=!1;const c=this._screenXToPlotPx(i.clientX),h=i.clientY-a.top;let d=c-n,f=h-r,u={translateX:s.layout.translateX,translateY:s.layout.translateY};return Math.abs(d+n)>s.layout.gridWidth?d=s.layout.gridWidth-n:c<0&&(d=n),n>c&&(o=!0,d=Math.abs(d)),r>h&&(l=!0,f=Math.abs(f)),e==="x"?u={x:o?n-d:n,y:0,width:d,height:s.layout.gridHeight}:e==="y"?u={x:0,y:l?r-f:r,width:s.layout.gridWidth,height:f}:u={x:o?n-d:n,y:l?r-f:r,width:d,height:f},u=Z(G({},u),{translateX:s.layout.translateX,translateY:s.layout.translateY}),i.drawSelectionRect(u),i.selectionDragging("resizing"),u}selectionDragging(t,e){var s;const i=this.w;if(!e)return;e.preventDefault();const{handler:a,box:n}=e.detail,r=this.constraints;let{x:o,y:l}=n;o<r.x&&(o=r.x),l<r.y&&(l=r.y),n.x2>r.x2&&(o=r.x2-n.w),n.y2>r.y2&&(l=r.y2-n.h),a.move(o,l);const c=this.selectionRect;let h=0;t==="resizing"&&(h=30);const d=p=>parseFloat(c.node.getAttribute(p)),f={x:d("x"),y:d("y"),width:d("width"),height:d("height")};i.interact.selection=f;const u=i.config.chart.link,g=!!(u&&(u.enabled||typeof u.dimension=="function"));(typeof i.config.chart.events.selection=="function"||g)&&i.interact.selectionEnabled&&(clearTimeout((s=this.w.globals.selectionResizeTimer)!=null?s:void 0),this.w.globals.selectionResizeTimer=window.setTimeout(()=>{this._emitSelectionFromRect()},h))}_emitSelectionFromRect(){var t;const e=this.w;if(!e.interact.selectionEnabled)return;const s=e.config.chart.link,i=!!(s&&(s.enabled||typeof s.dimension=="function"));if(typeof e.config.chart.events.selection!="function"&&!i)return;const a=this._gridRect();if(!a)return;const n=this.selectionRect.node.getBoundingClientRect(),r=this.xyRatios;let o,l,c,h;const d=this._screenXToPlotPx(n.left),f=this._screenXToPlotPx(n.right);if(e.axisFlags.isRangeBar)o=e.globals.yAxisScale[0].niceMin+d*r.invertedYRatio,l=e.globals.yAxisScale[0].niceMin+f*r.invertedYRatio,c=0,h=1;else{if(!e.globals.xAxisScale)return;o=_t.pxToDataX(e,d),l=_t.pxToDataX(e,f),c=e.globals.yAxisScale[0].niceMin+(a.bottom-n.bottom)*r.yRatio[0],h=e.globals.yAxisScale[0].niceMax-(n.top-a.top)*r.yRatio[0]}const u={xaxis:{min:o,max:l},yaxis:{min:c,max:h}};typeof e.config.chart.events.selection=="function"&&e.config.chart.events.selection(this.ctx,u),e.config.chart.brush.enabled&&e.config.chart.events.brushScrolled!==void 0&&e.config.chart.events.brushScrolled(this.ctx,u),(t=this.ctx.linkedViews)==null||t.onSourceSelection(u.xaxis)}selectionDrawn({context:t,zoomtype:e}){var s;
1381const i=this.w,a=t,n=this.xyRatios,r=this.ctx.toolbar,o=i.interact.zoomEnabled?a.zoomRect.node.getBoundingClientRect():a.selectionRect.node.getBoundingClientRect(),l=a._gridRect();if(!l)return;const c=this._screenXToPlotPx(o.left),h=this._screenXToPlotPx(o.right),d=o.top-l.top,f=o.bottom-l.top;let u,g;i.axisFlags.isRangeBar?(u=i.globals.yAxisScale[0].niceMin+c*n.invertedYRatio,g=i.globals.yAxisScale[0].niceMin+h*n.invertedYRatio):(u=_t.pxToDataX(i,c),g=_t.pxToDataX(i,h));const p=[],b=[];if(i.config.yaxis.forEach((m,A)=>{const v=i.globals.seriesYAxisMap[A][0],y=i.globals.yAxisScale[A].niceMax-n.yRatio[v]*d,w=i.globals.yAxisScale[A].niceMax-n.yRatio[v]*f;p.push(y),b.push(w)}),a.dragged&&(a.dragX>10||a.dragY>10)&&u!==g){if(i.interact.zoomEnabled){if(!i.globals.initialConfig)return;let m=R.clone(i.globals.initialConfig.yaxis),A=R.clone(i.globals.initialConfig.xaxis);if(i.interact.zoomed=!0,i.config.xaxis.convertedCatToNumeric&&(u=Math.floor(u),g=Math.floor(g),u<1&&(u=1,g=i.globals.dataPoints),g-u<2&&(g=u+1)),(e==="xy"||e==="x")&&(A={min:u,max:g}),(e==="xy"||e==="y")&&m.forEach((y,w)=>{m[w].min=b[w],m[w].max=p[w]}),r){const y=r.getBeforeZoomRange(A,m);y&&(A=y.xaxis?y.xaxis:A,m=y.yaxis?y.yaxis:m)}const v={xaxis:A};i.config.chart.group||(v.yaxis=m),a.ctx.updateHelpers._updateOptions(v,!1,a.w.config.chart.animations.dynamicAnimation.enabled),typeof i.config.chart.events.zoomed=="function"&&r.zoomCallback(A,m)}else if(i.interact.selectionEnabled){let m=null,A=null;if(A={min:u,max:g},e==="xy"||e==="y"){const v=R.clone(i.config.yaxis);m=v,v.forEach((y,w)=>{v[w].min=b[w],v[w].max=p[w]})}i.interact.selection=a.selection,typeof i.config.chart.events.selection=="function"&&i.config.chart.events.selection(a.ctx,{xaxis:A,yaxis:m}),(s=a.ctx.linkedViews)==null||s.onSourceSelection(A)}}}panDragging({context:t}){var e;const s=this.w,i=t;if(typeof s.interact.lastClientPosition.x<"u"){const r=s.interact.lastClientPosition.x-i.clientX,o=((e=s.interact.lastClientPosition.y)!=null?e:0)-i.clientY;Math.abs(r)>Math.abs(o)&&r>0?this.moveDirection="left":Math.abs(r)>Math.abs(o)&&r<0?this.moveDirection="right":Math.abs(o)>Math.abs(r)&&o>0?this.moveDirection="up":Math.abs(o)>Math.abs(r)&&o<0&&(this.moveDirection="down")}s.interact.lastClientPosition={x:i.clientX,y:i.clientY};const a=s.axisFlags.isRangeBar?s.globals.minY:s.globals.minX,n=s.axisFlags.isRangeBar?s.globals.maxY:s.globals.maxX;i.panScrolled(a,n)}panScrolled(t,e){var s,i;const a=this.w,n=this.xyRatios;if(!a.globals.initialConfig)return;const r=R.clone(a.globals.initialConfig.yaxis);let o=n.xRatio,l=a.globals.minX,c=a.globals.maxX;if(a.axisFlags.isRangeBar&&(o=n.invertedYRatio,l=a.globals.minY,c=a.globals.maxY),this.moveDirection==="left"?(t=l+a.layout.gridWidth/Se*o,e=c+a.layout.gridWidth/Se*o):this.moveDirection==="right"&&(t=l-a.layout.gridWidth/Se*o,e=c-a.layout.gridWidth/Se*o),!a.axisFlags.isRangeBar){const f=(s=a.globals.dataReducerRawMinX)!=null?s:a.globals.initialMinX,u=(i=a.globals.dataReducerRawMaxX)!=null?i:a.globals.initialMaxX;(t<f||e>u)&&(t=l,e=c)}const d={xaxis:{min:t,max:e}};
1381a.config.chart.group||(d.yaxis=r),this.updateScrolledChart(d,t,e)}updateScrolledChart(t,e,s){const i=this.w;if(this.ctx.updateHelpers._updateOptions(t,!1,!1),typeof i.config.chart.events.scrolled=="function"){const a={xaxis:{min:e,max:s}};i.config.chart.events.scrolled(this.ctx,a),this.ctx.events.fireEvent("scrolled",a)}}_momentumEnabled(){return this._pinchEnabled()||this._panInertiaEnabled()}_pinchEnabled(){const t=this.w.config.chart;return!!(t.zoom&&t.zoom.enabled&&t.zoom.pinch)}_panInertiaEnabled(){const t=this.w.config.chart;return!!(t.pan&&t.pan.inertia)}_m(){const t=this.w.interact;return t.momentum||(t.momentum={busy:!1,pinch:null,panState:null,samples:[],inertiaRAF:null}),t.momentum}_currentXWindow(){const t=this.w;return t.axisFlags.isRangeBar?{min:t.globals.minY,max:t.globals.maxY}:{min:t.globals.minX,max:t.globals.maxX}}_gridRect(){const t=this.w.dom.baseEl,e=t&&t.querySelector(".apexcharts-grid");return e?e.getBoundingClientRect():null}_screenXToPlotPx(t){const e=this.w.dom.baseEl,s=e&&e.querySelector(".apexcharts-svg"),i=s?s.getBoundingClientRect().left:0;return t-i-this.w.layout.translateX}_clampBounds(){var t,e;const s=this.w;return s.axisFlags.isRangeBar?null:{min:(t=s.globals.dataReducerRawMinX)!=null?t:s.globals.initialMinX,max:(e=s.globals.dataReducerRawMaxX)!=null?e:s.globals.initialMaxX}}_applyXRange(t,e,s){const i=this.w;if(!i.globals.initialConfig)return!1;const a=this._currentXWindow(),n=s&&e-t>a.max-a.min,r=this._clampBounds();if(r){const l=e-t;t<r.min&&(t=r.min,e=t+l),e>r.max&&(e=r.max,t=e-l),t<r.min&&(t=r.min)}if(i.config.xaxis.convertedCatToNumeric&&(t=Math.floor(t),e=n?Math.ceil(e):Math.floor(e),t<1&&(t=1),r&&e>r.max&&(e=Math.floor(r.max)),e-t<2)||!(e>t))return!1;const o={xaxis:{min:t,max:e}};return i.config.chart.group||(o.yaxis=R.clone(i.globals.initialConfig.yaxis)),s&&(i.interact.zoomed=!0),this.ctx.updateHelpers._updateOptions(o,!1,!1),{minX:t,maxX:e}}_cancelInertia(){const t=this._m();t.inertiaRAF!=null&&(cancelAnimationFrame(t.inertiaRAF),t.inertiaRAF=null)}_fireScrolled(){const t=this.w;if(typeof t.config.chart.events.scrolled!="function")return;const{min:e,max:s}=this._currentXWindow(),i={xaxis:{min:e,max:s}};t.config.chart.events.scrolled(this.ctx,i),this.ctx.events.fireEvent("scrolled",i)}_pushSample(t,e){const s=this._m().samples;for(s.push({x:t,t:e});s.length>6;)s.shift()}momentumTouch(t){const e=this.w,s=this._m(),i=t.type;if(i==="touchstart"){this._cancelInertia();const a=this._gridRect();if(!a)return;if(t.touches.length>=2&&this._pinchEnabled())t.preventDefault(),s.busy=!0,s.panState=null,this._beginPinch(t,a);else if(t.touches.length===1&&this._panInertiaEnabled()&&e.interact.panEnabled){s.busy=!0,s.pinch=null;const n=t.touches[0],r=this._currentXWindow(),o=e.layout.gridWidth||1;s.panState={startX:n.clientX,startY:n.clientY,axis:null,minX0:r.min,maxX0:r.max,ratio0:(r.max-r.min)/o},s.samples=[{x:n.clientX,t:t.timeStamp}]}return}if(i==="touchmove"){s.pinch&&t.touches.length>=2?(t.preventDefault(),this._movePinch(t)):s.panState&&t.touches.length===1&&this._movePan(t);return}s.pinch?t.touches.length<2&&this._endPinch():s.panState&&t.touches.length===0&&this._endPan(),t.touches.length===0&&(e.interact.mousedown=!1,this.dragged=!1,s.inertiaRAF==null&&!s.pinch&&!s.panState&&(s.busy=!1))}_beginPinch(t,e){const s=this.w,i=t.touches[0],a=t.touches[1],n=Math.hypot(a.clientX-i.clientX,a.clientY-i.clientY)||1,r=(i.clientX+a.clientX)/2-e.left-s.globals.barPadForNumericAxis,{min:o,max:l}=this._currentXWindow();this._m().pinch={d0:n,cx0:r,minX0:o,maxX0:l,gridWidth:s.layout.gridWidth||1}}_movePinch(t){const e=this.w,s=this._m().pinch;if(!s)return;const i=this._gridRect();if(!i)return;const a=t.touches[0],n=t.touches[1],r=Math.hypot(n.clientX-a.clientX,n.clientY-a.clientY)||1,o=(a.clientX+n.clientX)/2-i.left-e.globals.barPadForNumericAxis,l=s.maxX0-s.minX0,c=l*(s.d0/r);let d=s.minX0+s.cx0/s.gridWidth*l-o/s.gridWidth*c,f=d+c;const u=this._clampBounds();if(u){const g=e.globals.minXDiff>0&&isFinite(e.globals.minXDiff)?e.globals.minXDiff:0,p=Math.max(g*2,(u.max-u.min)*1e-6);if(f-d<p){const b=(d+f)/2;d=b-p/2,f=b+p/2}}this._applyXRange(d,f,!0)}_endPinch(){const t=this.w,e=this._m();e.pinch=null;const{min:s,max:i}=this._currentXWindow(),a={min:s,max:i},n=t.globals.initialConfig?R.clone(t.globals.initialConfig.yaxis):[],r=this.ctx.toolbar;r&&r.zoomCallback(a,n)}_movePan(t){const e=this._m(),s=e.panState,i=t.touches[0];if(!s.axis){const r=Math.abs(i.clientX-s.startX),o=Math.abs(i.clientY-s.startY);if(r<6&&o<6){this._pushSample(i.clientX,t.timeStamp);return}if(o>r){e.busy=!1,e.panState=null;return}s.axis="x"}if(s.axis!=="x")return;t.preventDefault();const n=(i.clientX-s.startX)*s.ratio0;this._pushSample(i.clientX,t.timeStamp),this._applyXRange(s.minX0-n,s.maxX0-n,!1)}_endPan(){const t=this._m(),e=t.panState;t.panState=null;let s=0;const i=t.samples;if(i.length>=2){const a=i[0],n=i[i.length-1],r=n.t-a.t;r>0&&(s=(n.x-a.x)/r)}t.samples=[],e&&e.axis==="x"&&this._panInertiaEnabled()&&Math.abs(s)>Yr?this._startInertia(s):(t.busy=!1,this._fireScrolled())}_startInertia(t){const e=this.w,s=this._m(),i=e.config.chart.pan&&e.config.chart.pan.friction,a=typeof i=="number"?Math.min(Math.max(i,.5),.999):Or;let n=t,r=null;s.busy=!0;const o=l=>{if(e.globals.isDestroyed){s.inertiaRAF=null,s.busy=!1;return}if(r==null){r=l,s.inertiaRAF=requestAnimationFrame(o);return}const c=l-r;if(r=l,n*=Math.pow(a,c/Hr),Math.abs(n)<zr){s.inertiaRAF=null,s.busy=!1,this._fireScrolled();return}const h=this._currentXWindow(),d=e.layout.gridWidth||1,f=(h.max-h.min)/d,u=n*c*f,g=this._applyXRange(h.min-u,h.max-u,!1),p=this._clampBounds();if(!g||p&&(u>0&&g.minX<=p.min+(p.max-p.min)*1e-6||u<0&&g.maxX>=p.max-(p.max-p.min)*1e-6)){s.inertiaRAF=null,s.busy=!1,this._fireScrolled();return}s.inertiaRAF=requestAnimationFrame(o)};s.inertiaRAF=requestAnimationFrame(o)}}lt.registerFeatures({toolbar:ga,zoomPanSelection:Wr});let ze=class{constructor(t){this.w=t.w,this.annoCtx=t}setOrientations(t,e=null){var s,i;const a=this.w;if(t.label.orientation==="vertical"){const n=e!==null?e:0,r=a.dom.baseEl.querySelector(`.apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='${n}']`);if(r!==null){const o=r.getBBox();r.setAttribute("x",String(parseFloat((s=r.getAttribute("x"))!=null?s:"0")-o.height+4));const l=t.label.position==="top"?o.width:-o.width;r.setAttribute("y",String(parseFloat((i=r.getAttribute("y"))!=null?i:"0")+l));const{x:c,y:h}
1381=this.annoCtx.graphics.rotateAroundCenter(r);r.setAttribute("transform",`rotate(-90 ${c} ${h})`)}}}addBackgroundToAnno(t,e){const s=this.w;if(!t||!e.label.text||!String(e.label.text).trim())return null;const i=s.dom.baseEl.querySelector(".apexcharts-grid");if(!i)return null;const a=i.getBoundingClientRect(),n=i.getBBox(),r=a.width/n.width||1,o=t.getBoundingClientRect();let{left:l,right:c,top:h,bottom:d}=e.label.style.padding;e.label.orientation==="vertical"&&([h,d,l,c]=[l,c,h,d]);const f=(o.left-a.left)/r-l,u=(o.top-a.top)/r-h,g=this.annoCtx.graphics.drawRect(f-s.globals.barPadForNumericAxis,u,o.width/r+l+c,o.height/r+h+d,e.label.borderRadius,e.label.style.background,1,e.label.borderWidth,e.label.borderColor,0);return e.id&&g.node.classList.add(e.id),g}annotationsBackground(){const t=this.w,e=(s,i,a)=>{const n=t.dom.baseEl.querySelector(`.apexcharts-${a}-annotations .apexcharts-${a}-annotation-label[rel='${i}']`);if(n){const r=n.parentNode,o=this.addBackgroundToAnno(n,s);if(o){r?.insertBefore(o.node,n);const l=n.getAttribute("x");l!==null&&kt(o,parseFloat(l),t),s.label.mouseEnter&&o.node.addEventListener("mouseenter",s.label.mouseEnter.bind(this,s)),s.label.mouseLeave&&o.node.addEventListener("mouseleave",s.label.mouseLeave.bind(this,s)),s.label.click&&o.node.addEventListener("click",s.label.click.bind(this,s))}}};t.config.annotations.xaxis.forEach((s,i)=>e(s,i,"xaxis")),t.config.annotations.yaxis.forEach((s,i)=>e(s,i,"yaxis")),t.config.annotations.points.forEach((s,i)=>e(s,i,"point"))}getY1Y2(t,e){var s,i;const a=this.w,n=t==="y1"?e.y:e.y2;let r,o=!1;if(this.annoCtx.invertAxis){const l=a.config.xaxis.convertedCatToNumeric?a.labelData.categoryLabels:a.labelData.labels,c=l.indexOf(n),h=a.dom.baseEl.querySelector(`.apexcharts-yaxis-texts-g text:nth-child(${c+1})`);r=h?parseFloat((s=h.getAttribute("y"))!=null?s:"0"):(a.layout.gridHeight/l.length-1)*(c+1)-a.globals.barHeight,e.seriesIndex!==void 0&&a.globals.barHeight&&(r-=a.globals.barHeight/2*(a.seriesData.series.length-1)-a.globals.barHeight*e.seriesIndex)}else{const l=a.globals.seriesYAxisMap[e.yAxisIndex];if(!l||l[0]==null||!a.config.yaxis[e.yAxisIndex])return{yP:0,clipped:!0};const c=l[0],h=a.config.yaxis[e.yAxisIndex].logarithmic?new rt(this.w).getLogVal(a.config.yaxis[e.yAxisIndex].logBase,n,c)/a.globals.yLogRatio[c]:(n-a.globals.minYArr[c])/(a.globals.yRange[c]/a.layout.gridHeight);r=a.layout.gridHeight-Math.min(Math.max(h,0),a.layout.gridHeight),o=h>a.layout.gridHeight||h<0,e.marker&&(e.y===void 0||e.y===null)&&(r=0),(i=a.config.yaxis[e.yAxisIndex])!=null&&i.reversed&&(r=h)}return typeof n=="string"&&n.includes("px")&&(r=parseFloat(n)),{yP:r,clipped:o}}getX1X2(t,e){const s=this.w,i=t==="x1"?e.x:e.x2,a=this.annoCtx.invertAxis?s.globals.minY:s.globals.minX,n=this.annoCtx.invertAxis?s.globals.maxY:s.globals.maxX,r=this.annoCtx.invertAxis?s.globals.yRange[0]:s.globals.xRange;let o=!1,l=this.annoCtx.inversedReversedAxis?(n-i)/(r/s.layout.gridWidth):(i-a)/(r/s.layout.gridWidth);return(s.config.xaxis.type==="category"||s.config.xaxis.convertedCatToNumeric)&&!this.annoCtx.invertAxis&&!s.axisFlags.dataFormatXNumeric&&(s.config.chart.sparkline.enabled||(l=this.getStringX(i))),typeof i=="string"&&i.includes("px")&&(l=parseFloat(i)),i==null&&e.marker&&(l=s.layout.gridWidth),e.seriesIndex!==void 0&&s.globals.barWidth&&!this.annoCtx.invertAxis&&(l-=s.globals.barWidth/2*(s.seriesData.series.length-1)-s.globals.barWidth*e.seriesIndex),typeof l!="number"&&(l=0,o=!0),parseFloat(l.toFixed(10))>parseFloat(s.layout.gridWidth.toFixed(10))?(l=s.layout.gridWidth,o=!0):l<0&&(l=0,o=!0),{x:l,clipped:o}}getStringX(t){var e;const s=this.w;let i=t;if(s.config.xaxis.convertedCatToNumeric&&s.labelData.categoryLabels.length){const r=String(t);t=s.labelData.categoryLabels.findIndex(o=>String(o)===r)+1}const a=s.labelData.labels.map(r=>Array.isArray(r)?r.join(" "):r).indexOf(t),n=s.dom.baseEl.querySelector(`.apexcharts-xaxis-texts-g text:nth-child(${a+1})`);return n&&(i=parseFloat((e=n.getAttribute("x"))!=null?e:"0")),i}};class $r{constructor(t){this.w=t.w,this.annoCtx=t,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new ze(this.annoCtx)}addXaxisAnnotation(t,e,s){const i=this.w,a=this.helpers.getX1X2("x1",t);let n=a.x;const r=a.clipped;let o=!0,l;const c=t.label.text,h=t.strokeDashArray;if(R.isNumber(n)){if(t.x2===null||typeof t.x2>"u"){if(!r){const d=this.annoCtx.graphics.drawLine(n+t.offsetX,0+t.offsetY,n+t.offsetX,i.layout.gridHeight+t.offsetY,t.borderColor,h,t.borderWidth);e.appendChild(d.node),t.id&&d.node.classList.add(t.id),kt(d,n+t.offsetX,i)}}else{const d=this.helpers.getX1X2("x2",t);if(l=d.x,o=d.clipped,l<n){const u=n;n=l,l=u}const f=this.annoCtx.graphics.drawRect(n+t.offsetX,0+t.offsetY,l-n,i.layout.gridHeight+t.offsetY,0,t.fillColor,t.opacity,1,t.borderColor,h);f.node.classList.add("apexcharts-annotation-rect"),f.attr("clip-path",`url(#gridRectMask${i.globals.cuid})`),e.appendChild(f.node),t.id&&f.node.classList.add(t.id),kt(f,n+t.offsetX,i)}if(!(r&&o)){const d=this.annoCtx.graphics.getTextRects(c,t.label.style.fontSize),f=t.label.position==="top"?4:t.label.position==="center"?i.layout.gridHeight/2+(t.label.orientation==="vertical"?d.width/2:0):i.layout.gridHeight,u=this.annoCtx.graphics.drawText({x:n+t.label.offsetX,y:f+t.label.offsetY-(t.label.orientation==="vertical"?t.label.position==="top"?d.width/2-12:-d.width/2:0),text:c,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-xaxis-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});u.attr({rel:s}),e.appendChild(u.node),kt(u,n+t.label.offsetX,i),this.annoCtx.helpers.setOrientations(t,s)}}}drawXAxisAnnotations(){const t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return t.config.annotations.xaxis.map((s,i)=>{this.addXaxisAnnotation(s,e.node,i)}),e}}class Vr{constructor(t){this.w=t.w,this.annoCtx=t,this.helpers=new ze(this.annoCtx),this.axesUtils=new Pt(this.annoCtx.w,{theme:this.annoCtx.theme,timeScale:this.annoCtx.timeScale})}addYaxisAnnotation(t,e,s){const i=this.w,a=t.strokeDashArray;let n=this.helpers.getY1Y2("y1",t),r=n.yP;const o=n.clipped;let l,c=!0,h=!1;const d=t.label.text;if(t.y2===null||typeof t.y2>"u"){if(!o){h=!0;const f=this.annoCtx.graphics.drawLine(0+t.offsetX,r+t.offsetY,this._getYAxisAnnotationWidth(t),r+t.offsetY,t.borderColor,a,t.borderWidth);e.appendChild(f.node),t.id&&f.node.classList.add(t.id)}}else{if(n=this.helpers.getY1Y2("y2",t),l=n.yP,c=n.clipped,l>r){const f=r;r=l,l=f}if(!(o&&c)){h=!0;const f=this.annoCtx.graphics.drawRect(0+t.offsetX,l+t.offsetY,this._getYAxisAnnotationWidth(t),r-l,0,t.fillColor,t.opacity,1,t.borderColor,a);f.node.classList.add("apexcharts-annotation-rect"),f.attr("clip-path",`url(#gridRectMask${i.globals.cuid})`),e.appendChild(f.node),t.id&&f.node.classList.add(t.id)}}if(h){const f=t.label.position==="right"?i.layout.gridWidth:t.label.position==="center"?i.layout.gridWidth/2:0,u=this.annoCtx.graphics.drawText({x:f+t.label.offsetX,y:(l??r)+t.label.offsetY-3,text:d,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-yaxis-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});u.attr({rel:s}),e.appendChild(u.node)}}_getYAxisAnnotationWidth(t){const e=this.w;let s=e.layout.gridWidth;return t.width.indexOf("%")>-1?s=e.layout.gridWidth*parseInt(t.width,10)/100:s=parseInt(t.width,10),s+t.offsetX}drawYAxisAnnotations(){const t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return t.config.annotations.yaxis.forEach((s,i)=>{s.yAxisIndex=this.axesUtils.translateYAxisIndex(s.yAxisIndex),this.axesUtils.isYAxisHidden(s.yAxisIndex)&&this.axesUtils.yAxisAllSeriesCollapsed(s.yAxisIndex)||this.addYaxisAnnotation(s,e.node,i)}),e}}class Gr{constructor(t){this.w=t.w,this.annoCtx=t,this.helpers=new ze(this.annoCtx)}addPointAnnotation(t,e,s){const i=this.w;if(i.globals.collapsedSeriesIndices.indexOf(t.seriesIndex)>-1)return;const a=this.helpers.getX1X2("x1",t),n=a.x,r=a.clipped,o=this.helpers.getY1Y2("y1",t),l=o.yP,c=o.clipped;if(R.isNumber(n)&&!(c||r)){const h={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radiu
1381s,class:`apexcharts-point-annotation-marker ${t.marker.cssClass} ${t.id?t.id:""}`};let d=this.annoCtx.graphics.drawMarker(n+t.marker.offsetX,l+t.marker.offsetY,h);e.appendChild(d.node);const f=[d.node];kt(d,n,i);const u=t.label.text?t.label.text:"",g=this.annoCtx.graphics.drawText({x:n+t.label.offsetX,y:l+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:u,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:`apexcharts-point-annotation-label ${t.label.style.cssClass} ${t.id?t.id:""}`});if(g.attr({rel:s}),e.appendChild(g.node),kt(g,n,i),t.customSVG.SVG){const p=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});p.attr({transform:`translate(${n+t.customSVG.offsetX}, ${l+t.customSVG.offsetY})`}),p.node.innerHTML=t.customSVG.SVG,e.appendChild(p.node),f.push(p.node)}if(t.image.path){const p=t.image.width?t.image.width:20,b=t.image.height?t.image.height:20;d=this.annoCtx.addImage({x:n+t.image.offsetX-p/2,y:l+t.image.offsetY-b/2,width:p,height:b,path:t.image.path,appendTo:".apexcharts-point-annotations"}),f.push(d.node)}t.tooltip&&t.tooltip.enabled&&f.forEach(p=>{p.addEventListener("mouseenter",()=>{this.showPointTooltip(t,p)}),p.addEventListener("mouseleave",()=>{this.hidePointTooltip()})}),t.mouseEnter&&d.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&d.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&d.node.addEventListener("click",t.click.bind(this,t))}}getPointTooltipEl(){const t=this.w;let e=t.dom.elWrap.querySelector(".apexcharts-annotation-tooltip");return e||(e=B.createElementNS("http://www.w3.org/1999/xhtml","div"),e.classList.add("apexcharts-tooltip","apexcharts-annotation-tooltip"),t.dom.elWrap.appendChild(e)),e}getPointTooltipContent(t){const e=this.w,s=t.tooltip||{};if(typeof s.formatter=="function")return s.formatter({annotation:t,seriesIndex:t.seriesIndex,id:t.id,w:e});let i=s.text!=null?s.text:t.label&&t.label.text;return Array.isArray(i)&&(i=i.join("<br/>")),i==null?"":String(i)}showPointTooltip(t,e){const s=this.w,i=this.getPointTooltipContent(t);if(!i)return;const a=this.getPointTooltipEl();a.innerHTML=i;const n=t.tooltip.theme||s.config.tooltip.theme||"light";a.classList.remove("apexcharts-theme-light","apexcharts-theme-dark"),a.classList.add(`apexcharts-theme-${n}`),a.classList.add("apexcharts-active");const r=s.dom.elWrap.getBoundingClientRect(),o=e.getBoundingClientRect(),l=a.getBoundingClientRect(),c=t.tooltip.offsetX||0,h=t.tooltip.offsetY||0;let d=o.left-r.left+o.width/2-l.width/2,f=o.top-r.top-l.height-10;d=Math.max(0,Math.min(d,r.width-l.width)),f<0&&(f=o.top-r.top+o.height+10),a.style.left=d+c+"px",a.style.top=f+h+"px"}hidePointTooltip(){const t=this.w.dom.elWrap.querySelector(".apexcharts-annotation-tooltip");t&&t.classList.remove("apexcharts-active")}drawPointAnnotations(){const t=this.w,e=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return t.config.annotations.points.map((s,i)=>{this.addPointAnnotation(s,e.node,i)}),e}}class Ur{constructor(t,{theme:e=null,timeScale:s=null}={}){this.w=t,this.theme=e,this.timeScale=s,this.invertAxis=void 0,this.inversedReversedAxis=void 0,this.graphics=new I(this.w),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new ze(this),this.xAxisAnnotations=new $r(this),this.yAxisAnnotations=new Vr(this),this.pointsAnnotations=new Gr(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.layout.gridWidth/this.w.globals.dataPoints}drawAxesAnnotations(){const t=this.w;if(t.globals.axisCharts&&t.globals.dataPoints){const e=this.yAxisAnnotations.drawYAxisAnnotations(),s=this.xAxisAnnotations.drawXAxisAnnotations(),i=this.pointsAnnotations.drawPointAnnotations(),a=t.config.chart.animations.enabled,n=[e,s,i],r=[s.node,e.node,i.node],o=t.config.chart.type==="line"||t.config.chart.type==="area"||t.config.chart.type==="rangeArea",l=[o,!1,o];for(let c=0;c<3;c++)t.dom.elGraphical.add(n[c]),a&&!t.globals.resized&&!t.globals.dataChanged&&t.config.chart.type!=="scatter"&&t.config.chart.type!=="bubble"&&t.globals.dataPoints>1&&!l[c]&&r[c].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:r[c],index:0});
1381this.helpers.annotationsBackground()}}drawImageAnnos(){this.w.config.annotations.images.map(e=>{this.addImage(e)})}drawTextAnnos(){this.w.config.annotations.texts.map(e=>{this.addText(e)})}addXaxisAnnotation(t,e,s){this.xAxisAnnotations.addXaxisAnnotation(t,e,s)}addYaxisAnnotation(t,e,s){this.yAxisAnnotations.addYaxisAnnotation(t,e,s)}addPointAnnotation(t,e,s){this.pointsAnnotations.addPointAnnotation(t,e,s)}addText(t){const{x:e,y:s,text:i,textAnchor:a,foreColor:n,fontSize:r,fontFamily:o,fontWeight:l,cssClass:c,backgroundColor:h,borderWidth:d,strokeDashArray:f,borderRadius:u,borderColor:g,appendTo:p=".apexcharts-svg",paddingLeft:b=4,paddingRight:m=4,paddingBottom:A=2,paddingTop:v=2}=t,y=this.w,w=this.graphics.drawText({x:e,y:s,text:i,textAnchor:a||"start",fontSize:r||"12px",fontWeight:l||"regular",fontFamily:o||y.config.chart.fontFamily,foreColor:n||y.config.chart.foreColor,cssClass:"apexcharts-text "+c?c:""}),_=y.dom.baseEl.querySelector(p);_&&_.appendChild(w.node);const C=w.bbox();if(i){const S=this.graphics.drawRect(C.x-b,C.y-v,C.width+b+m,C.height+A+v,u,h||"transparent",1,d,g,f);_.insertBefore(S.node,w.node)}}addImage(t){const e=this.w,{path:s,x:i=0,y:a=0,width:n=20,height:r=20,appendTo:o=".apexcharts-svg"}=t,l=e.dom.Paper.image(s);l.size(n,r).move(i,a);const c=e.dom.baseEl.querySelector(o);return c&&c.appendChild(l.node),l}addXaxisAnnotationExternal(t,e,s){return this.addAnnotationExternal({params:t,pushToMemory:e,context:s,type:"xaxis",contextMethod:s.addXaxisAnnotation}),s}addYaxisAnnotationExternal(t,e,s){return this.addAnnotationExternal({params:t,pushToMemory:e,context:s,type:"yaxis",contextMethod:s.addYaxisAnnotation}),s}addPointAnnotationExternal(t,e,s){return typeof this.invertAxis>"u"&&(this.invertAxis=s.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:s,type:"point",contextMethod:s.addPointAnnotation}),s}addAnnotationExternal({params:t,pushToMemory:e,context:s,type:i,contextMethod:a}){const n=s,r=n.w,o=r.dom.baseEl.querySelector(`.apexcharts-${i}-annotations`),l=o.childNodes.length+1,c=new St,h=Object.assign({},i==="xaxis"?c.xAxisAnnotation:i==="yaxis"?c.yAxisAnnotation:c.pointAnnotation),d=R.extend(h,t);switch(i){case"xaxis":this.addXaxisAnnotation(d,o,l);break;case"yaxis":this.addYaxisAnnotation(d,o,l);break;case"point":this.addPointAnnotation(d,o,l);break}const f=r.dom.baseEl.querySelector(`.apexcharts-${i}-annotations .apexcharts-${i}-annotation-label[rel='${l}']`),u=this.helpers.addBackgroundToAnno(f,d);return u&&o.insertBefore(u.node,f),e&&r.globals.memory.methodsToExec.push({context:n,id:d.id?d.id:R.randomId(),method:a,label:"addAnnotation",params:t}),s}_removeAnnotationTooltip(t){const e=t.dom.elWrap&&t.dom.elWrap.querySelector(".apexcharts-annotation-tooltip");e&&e.parentNode&&e.parentNode.removeChild(e)}clearAnnotations(t){const e=t.w;this._removeAnnotationTooltip(e);const s=e.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");for(let i=e.globals.memory.methodsToExec.length-1;i>=0;i--)(e.globals.memory.methodsToExec[i].label==="addText"||e.globals.memory.methodsToExec[i].label==="addAnnotation")&&e.globals.memory.methodsToExec.splice(i,1);Array.prototype.forEach.call(s,i=>{for(;i.firstChild;)i.removeChild(i.firstChild)})}removeAnnotation(t,e){const s=t.w;this._removeAnnotationTooltip(s);const i=s.dom.baseEl.querySelectorAll(`.${e}`);i&&(s.globals.memory.methodsToExec.map((a,n)=>{a.id===e&&s.globals.memory.methodsToExec.splice(n,1)}),Object.keys(s.config.annotations).forEach(a=>{const n=s.config.annotations[a];Array.isArray(n)&&(s.config.annotations[a]=n.filter(r=>r.id!==e))}),Array.prototype.forEach.call(i,a=>{a.parentElement.removeChild(a)}))}}lt.registerFeatures({annotations:Ur});class qr{constructor(t,e){this.w=t,this.ctx=e,this.seriesIndex=0,this.dataPointIndex=0,this.active=!1,this._tooltipDismissed=!1,this._focusedEl=null,this._hoveredBarEl=null,this._enlargedScatterMarker=null,this._onKeyDown=this._onKeyDown.bind(this),this._onFocus=this._onFocus.bind(this),this._onBlur=this._onBlur.bind(this),this._onLegendClick=this._onLegendClick.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this._lastPointerDownAt=0}init(){const e=this.w.dom.Paper.node;e&&(e.setAttribute("tabindex","0"),e.addEventListener("focus",this._onFocus),e.addEventListener("blur",this._onBlur),e.addEventListener("mousedown",this._onPointerDown,{capture:!0}),e.addEventListener("pointerdown",this._onPointerDown,{capture:!0}),e.addEventListener("touchstart",this._onPointerDown,{capture:!0,passive:!0}),e.addEventListener("keydown",this._onKeyDown,{passive:!1}),this.ctx.events.addEventListener("legendClick",this._onLegendClick))}destroy(){const t=this.w,e=t.dom.Paper&&t.dom.Paper.node;this.ctx.events.removeEventListener("legendClick",this._onLegendClick),e&&(e.removeEventListener("focus",this._onFocus),e.removeEventListener("blur",this._onBlur),e.removeEventListener("keydown",this._onKeyDown),e.removeEventListener("mousedown",this._onPointerDown,{capture:!0}),e.removeEventListener("pointerdown",this._onPointerDown,{capture:!0}),e.removeEventListener("touchstart",this._onPointerDown,{capture:!0}))}_onPointerDown(){this._lastPointerDownAt=Date.now()}handleKey(t){}_onFocus(){this._isNavEnabled()&&(Date.now()-this._lastPointerDownAt<100||(this.active=!0,this._clampCursor(),this._snapToVisibleRange(),this._showCurrentPoint()))}_onBlur(){this.active=!1,this._tooltipDismissed=!1,this._hideFocus()}_onLegendClick(){this.active&&(this.active=!1,this._hideFocus())}_onKeyDown(t){var e,s,i;if(!(!this._isNavEnabled()||!this.active)){if(t.shiftKey&&(t.key==="ArrowRight"||t.key==="ArrowLeft")&&this._canPan()){t.preventDefault(),this._panBy(t.key==="ArrowRight"?1:-1);return}switch(t.key){case"ArrowRight":t.preventDefault(),this._move(0,1);break;case"ArrowLeft":t.preventDefault(),this._move(0,-1);break;case"ArrowUp":t.preventDefault(),this._move(-1,0);break;case"ArrowDown":t.preventDefault(),this._move(1,0);break;case"Home":t.preventDefault(),this.dataPointIndex=0,this._skipNullForward(),this._showCurrentPoint();break;case"End":t.preventDefault(),this.dataPointIndex=this._getDataPointCount(this.seriesIndex)-1,this._skipNullBackward(),this._showCurrentPoint();break;case"Enter":case" ":t.preventDefault(),this._fireClick();break;case"+":case"=":this._canZoom()&&(t.preventDefault(),(e=this.ctx.toolbar)==null||e.handleZoomIn(),this._announce("Zoomed in"));break;case"-":case"_":this._canZoom()&&(t.preventDefault(),(s=this.ctx.toolbar)==null||s.handleZoomOut(),this._announce("Zoomed out"));break;case"0":this._canZoom()&&this.w.interact.zoomed&&(t.preventDefault(),(i=this.ctx.toolbar)==null||i.handleZoomReset(),this._announce("Zoom reset"));break;case"Escape":t.preventDefault(),this._tooltipDismissed?(this.active=!1,this._tooltipDismissed=!1,this._hideFocus()):(this._tooltipDismissed=!0,this._hideFocus());break}}}_canZoom(){const t=this.w;return!!(t.globals.axisCharts&&t.config.chart.zoom&&t.config.chart.zoom.enabled)}_canPan(){return this._canZoom()}_panBy(t){const e=this.w,s=this.ctx.toolbar;if(!s)return;const i=Number(e.globals.minX),a=Number(e.globals.maxX);if(!isFinite(i)||!isFinite(a)||i===a)return;const r=(a-i)*.1*t;s.zoomUpdateOptions(i+r,a+r),this._announce(t>0?"Panned right":"Panned left")}_move(t,e){const s=this.w,i=s.config.chart.accessibility.keyboard.navigation.wrapAround;if(t!==0){const a=this.w.globals.tooltip;if(a&&a.tConfig&&a.tConfig.shared){const c=this.dataPointIndex;if(a.tooltipUtil&&a.tooltipUtil.isXoverlap(c)&&a.tooltipUtil.isInitialSeriesSameLen())return}const n=this._getSeriesCount();let r=this.seriesIndex+t,o=0;for(;o<n&&(r<0&&(r=i?n-1:0),r>=n&&(r=i?0:n-1),!!s.globals.collapsedSeriesIndices.includes(r));)r+=t,o++;this.seriesIndex=r;const l=this._getDataPointCount(r);this.dataPointIndex>=l&&(this.dataPointIndex=l-1)}if(e!==0){const a=this._getDataPointCount(this.seriesIndex);let n=this.dataPointIndex+e;n<0&&(n=i?a-1:0),n>=a&&(n=i?0:a-1),this.dataPointIndex=n,e>0?this._skipNullForward():this._skipNullBackward(),this._isDataPointVisible(this.seriesIndex,this.dataPointIndex)||this._snapToVisibleRangeInDirection(e)}this._showCurrentPoint()}_skipNullForward(){const t=this.w,e=this.seriesIndex,s=this._getDataPointCount(e);let i=this.dataPointIndex,a=0;if(Array.isArray(t.seriesData.series[e])){for(;a<s&&t.seriesData.series[e][i]===null;)i=(i+1)%s,a++;this.dataPointIndex=i}}_skipNullBackward(){const t=this.w,e=this.seriesIndex,s=this._getDataPointCount(e);let i=this.dataPointIndex,a=0;if(Array.isArray(t.seriesData.series[e])){for(;a<s&&t.seriesData.series[e][i]===null;)i=(i-1+s)%s,a++;this.dataPointIndex=i}}_showCurrentPoint(){const{seriesIndex:t,dataPointIndex:e}=this,s=this.w,i=s.globals.tooltip;!i||!i.ttItems||(s.interact.capturedSeriesIndex=t,s.interact.capturedDataPointIndex=e,this._applyFocusClass(t,e),this._showTooltip(t,e,i))}_hideFocus(){const t=this.w,e=t.globals.tooltip;if(this._removeFocusClass(),this._leaveHoveredBar(),!e)return;e.marker&&e.marker.resetPointsSize(),this._enlargedScatterMarker=null;const s=e.getElTooltip();s&&(s.classList.remove("apexcharts-active"),t.config.chart.accessibility.enabled&&t.config.chart.accessibility.announcements.enabled&&s.setAttribute("aria-hidden","true")),t.dom.baseEl.classList.remove("apexcharts-tooltip-active");const i=e.getElXCrosshairs();i&&i.classList.remove("apexcharts-active")}_showTooltip(t,e,s){const i=this.w,a=i.config.chart.type,n=s.getElTooltip();if(!n)return;const r=s.getCachedDimensions();s.tooltipRect={x:0,y:0,ttWidth:r.ttWidth||0,ttHeight:r.ttHeight||0},this._setSyntheticEvent(t,e,s),i.dom.baseEl.classList.add("apexcharts-tooltip-active"),n.classList.add("apexcharts-active"),i.c
1381onfig.chart.accessibility.enabled&&i.config.chart.accessibility.announcements.enabled&&n.removeAttribute("aria-hidden"),a==="pie"||a==="donut"||a==="polarArea"?this._showTooltipNonAxis(t,e,s,n):a==="radialBar"?this._showTooltipRadialBar(t,e,s,n):a==="heatmap"||a==="treemap"?this._showTooltipHeatTree(t,e,s,n,a):a==="bar"||a==="candlestick"||a==="boxPlot"||a==="violin"||a==="rangeBar"?this._showTooltipBar(t,e,s):this._showTooltipAxisLine(t,e,s)}_setSyntheticEvent(t,e,s){const i=this.w,a=i.config.chart.type;let n=0,r=0;const o=this._getFocusableElement(t,e);if(o){const l=o.getBoundingClientRect();n=l.left+l.width/2,r=l.top+l.height/2}else if(i.globals.pointsArray&&i.globals.pointsArray[t]&&i.globals.pointsArray[t][e]){const l=i.globals.pointsArray[t][e],c=s.getElGrid&&s.getElGrid();if(c){const h=c.getBoundingClientRect();n=h.left+(l[0]||0),r=h.top+(l[1]||0)}}else{const l=i.dom.Paper&&i.dom.Paper.node;if(l){const c=l.getBoundingClientRect();n=c.left+c.width/2,r=c.top+c.height/2}}if((a==="line"||a==="area"||a==="rangeArea"||a==="scatter"||a==="bubble"||a==="radar")&&i.globals.pointsArray&&i.globals.pointsArray[t]&&i.globals.pointsArray[t][e]){const l=i.globals.pointsArray[t][e],c=s.getElGrid&&s.getElGrid();if(c){const h=c.getBoundingClientRect();n=h.left+(l[0]||0),r=h.top+(l[1]||0)}}s.e={type:"mousemove",clientX:n,clientY:r}}_showTooltipBar(t,e,s){var i,a,n,r;const o=this.w,l=s.tConfig.shared&&(s.tooltipUtil.isXoverlap(e)||o.globals.isBarHorizontal)&&s.tooltipUtil.isInitialSeriesSameLen(),c=(r=(n=(a=(i=o.rangeData.seriesRange)==null?void 0:i[t])==null?void 0:a[e])==null?void 0:n.y)==null?void 0:r[0];s.tooltipLabels.drawSeriesTexts(Z(G(G({ttItems:s.ttItems,i:t,j:e},c?.y1!==void 0&&{y1:c.y1}),c?.y2!==void 0&&{y2:c.y2}),{shared:l}));const h=`.apexcharts-series[data\\:realIndex='${t}']`,d=o.dom.Paper.findOne(`${h} path[j='${e}'], ${h} circle[j='${e}'], ${h} rect[j='${e}']`);if(d&&(this._leaveHoveredBar(),new I(this.w,this.ctx).pathMouseEnter(d,null),this._hoveredBarEl=d),o.globals.isBarHorizontal){const f=d&&d.node;if(f){const u=o.dom.elWrap.getBoundingClientRect(),g=f.getBoundingClientRect(),p=g.left-u.left,b=g.top-u.top,m=g.height,A=g.width,v=s.tooltipRect.ttWidth||0,y=s.tooltipRect.ttHeight||0,w=b+m/2-y/2;let _=p+A;const C=s.xyRatios&&s.xyRatios.baseLineInvertedY!=null?s.xyRatios.baseLineInvertedY:u.width/2;p<C&&(_=p-v);const S=s.getElTooltip();S&&(S.style.left=_+"px",S.style.top=w+"px")}}else s.tooltipPosition.moveStickyTooltipOverBars(e,t)}_showTooltipAxisLine(t,e,s){const i=this.w,a=i.config.chart.type,r=s.tConfig.shared&&s.tooltipUtil.isXoverlap(e)&&s.tooltipUtil.isInitialSeriesSameLen();s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,j:e,shared:r});const o=a==="scatter"||a==="bubble",l=i.globals.markers.largestSize>0;o?this._showScatterBubblePoint(t,e,s):l?r?s.marker.enlargePoints(e):s.tooltipPosition.moveDynamicPointOnHover(e,t):r?s.tooltipPosition.moveDynamicPointsOnHover(e):s.tooltipPosition.moveDynamicPointOnHover(e,t)}_showScatterBubblePoint(t,e,s){const i=this.w.dom.baseEl;this._enlargedScatterMarker&&(s.marker.oldPointSize(this._enlargedScatterMarker),this._enlargedScatterMarker=null);const a=i.querySelector(`.apexcharts-series[data\\:realIndex='${t}']`);if(!a)return;const n=a.querySelector(`.apexcharts-marker[rel='${e}']`);n&&(s.marker.enlargeCurrentPoint(e,n),this._enlargedScatterMarker=n)}_showTooltipNonAxis(t,e,s,i){var a,n;const r=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:e,shared:!1});const o=i.getBoundingClientRect(),l=o.width||s.tooltipRect.ttWidth||0,c=o.height||s.tooltipRect.ttHeight||0,h=r.dom.baseEl.querySelector(`.apexcharts-pie-area[j='${e}']`);if(h){const d=parseFloat((a=h.getAttribute("data:cx"))!=null?a:""),f=parseFloat((n=h.getAttribute("data:cy"))!=null?n:"");if(!isNaN(d)&&!isNaN(f)){const u=r.dom.Paper.node.getBoundingClientRect(),g=r.dom.elWrap.getBoundingClientRect(),p=u.left-g.left,b=u.top-g.top;i.style.left=p+d-l/2+"px",i.style.top=b+f-c-10+"px"}}}_showTooltipRadialBar(t,e,s,i){var a;const n=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,shared:!1});
1381const{ttWidth:r=0,ttHeight:o=0}=s.getCachedDimensions(),l=n.dom.baseEl.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${t}'] path`);if(l){const c=parseFloat((a=l.getAttribute("data:angle"))!=null?a:"")||0,d=(n.config.plotOptions.radialBar.startAngle||0)+c/2,f=n.layout.gridWidth/2,u=n.layout.gridHeight/2,g=n.globals.radialSize||Math.min(n.layout.gridWidth,n.layout.gridHeight)/2,p=n.seriesData.series.length,b=g/Math.max(p,1),m=g-t*b,A=m-b,v=(m+A)/2,y=R.polarToCartesian(f,u,v,d),w=y.x+(n.layout.translateX||0),_=y.y+(n.layout.translateY||0);i.style.left=w-r/2+"px",i.style.top=_-o-10+"px"}}_showTooltipHeatTree(t,e,s,i,a){var n,r;const o=this.w;s.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,j:e,shared:!1});const l=i.getBoundingClientRect(),c=l.width||s.tooltipRect.ttWidth||0,h=l.height||s.tooltipRect.ttHeight||0,d=a==="heatmap"?"apexcharts-heatmap-rect":"apexcharts-treemap-rect",f=o.dom.baseEl.querySelector(`.${d}[i='${t}'][j='${e}']`);if(f){const u=o.dom.elWrap.getBoundingClientRect(),g=f.getBoundingClientRect(),p=g.left-u.left,b=g.top-u.top,m=g.width,A=g.height,v=parseFloat((n=f.getAttribute("cx"))!=null?n:""),y=parseFloat((r=f.getAttribute("width"))!=null?r:"");s.tooltipPosition.moveXCrosshairs(v+y/2);let w=p+m+c/2;const _=b+A/2-h/2;p+m>o.layout.gridWidth/2&&(w=p-c/2),i.style.left=w+"px",i.style.top=_+"px"}}_applyFocusClass(t,e){this._removeFocusClass();const s=this._getFocusableElement(t,e);if(s){s.classList.add("apexcharts-keyboard-focused"),s.setAttribute("role","img");const i=this._buildPointLabel(t,e);i&&s.setAttribute("aria-label",i),this._focusedEl=s}}_removeFocusClass(){this._focusedEl&&(this._focusedEl.classList.remove("apexcharts-keyboard-focused"),this._focusedEl.removeAttribute("role"),this._focusedEl.removeAttribute("aria-label"),this._focusedEl=null)}_buildPointLabel(t,e){var s,i,a,n,r,o,l,c;const h=this.w,d=h.config.chart.type,f=h.seriesData.seriesNames||[],u=h.seriesData.series||[];if(d==="pie"||d==="donut"||d==="polarArea"){const _=(i=((s=h.labelData)==null?void 0:s.labels)&&h.labelData.labels[e])!=null?i:"",C=Array.isArray(u)?u[e]:"";return _?`${_}: ${C}`:`${C}`}if(d==="radialBar"){const _=f[t]||`Series ${t+1}`,C=Array.isArray(u)?u[t]:"";return`${_}: ${C}`}const g=f[t]||`Series ${t+1}`,b=(Array.isArray(u[t])?u[t]:[])[e];let m=b==null?"":String(b);const A=(n=(a=h.formatters)==null?void 0:a.yLabelFormatters)==null?void 0:n[t];if(typeof A=="function")try{m=A(b,{seriesIndex:t,dataPointIndex:e,w:h})}catch{}let v="";const y=(r=h.labelData)==null?void 0:r.categoryLabels,w=(l=(o=h.seriesData)==null?void 0:o.seriesX)==null?void 0:l[t];if(Array.isArray(y)&&y[e]!=null)v=String(y[e]);else if(Array.isArray(w)&&w[e]!=null){const _=(c=h.formatters)==null?void 0:c.xLabelFormatter;if(typeof _=="function")try{v=String(_(w[e],{seriesIndex:t,dataPointIndex:e,w:h}))}catch{v=String(w[e])}else v=String(w[e])}return v?`${g}: ${m}, ${v}`:`${g}: ${m}`}_leaveHoveredBar(){this._hoveredBarEl&&(new I(this.w,this.ctx).pathMouseLeave(this._hoveredBarEl,null),this._hoveredBarEl=null)}_getFocusableElement(t,e){const s=this.w,i=s.config.chart.type,a=s.dom.baseEl;return i==="pie"||i==="donut"||i==="polarArea"?a.querySelector(`.apexcharts-pie-area[j='${e}']`):i==="heatmap"?a.querySelector(`.apexcharts-heatmap-rect[i='${t}'][j='${e}']`):i==="treemap"?a.querySelector(`.apexcharts-treemap-rect[i='${t}'][j='${e}']`):i==="radialBar"?a.querySelector(`.apexcharts-radialbar-series[data\\:realIndex='${t}'] path`):i==="bar"||i==="candlestick"||i==="boxPlot"||i==="violin"||i==="rangeBar"?a.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] path[j='${e}']`):a.querySelector(`.apexcharts-series[data\\:realIndex='${t}'] .apexcharts-marker[rel='${e}']`)||null}_fireClick(){const e=this.w.globals.tooltip;if(!e)return;const s={type:"mouseup",clientX:0,clientY:0};e.markerClick(s,this.seriesIndex,this.dataPointIndex)}_isNavEnabled(){const t=this.w.config.chart.accessibility;return t.enabled&&t.keyboard.enabled&&t.keyboard.navigation.enabled}_getSeriesCount(){const t=this.w,e=t.config.chart.type;return e==="pie"||e==="donut"||e==="polarArea"?1:t.seriesData.series.length}_getDataPointCount(t){const e=this.w,s=e.config.chart.type;if(s==="pie"||s==="donut"||s==="polarArea")return e.seriesData.series.length;const i=e.seriesData.series;return i[t]&&Array.isArray(i[t])?i[t].length:0}_clampCursor(){const t=this._getSeriesCount();this.seriesIndex>=t&&(this.seriesIndex=t-1),this.seriesIndex<0&&(this.seriesIndex=0);const e=this._getDataPointCount(this.seriesIndex);this.dataPointIndex>=e&&(this.dataPointIndex=e-1),this.dataPointIndex<0&&(this.dataPointIndex=0)}_snapToVisibleRange(){const t=this.w,e=t.globals,s=this.seriesIndex;if(!t.interact.zoomed)return;const i=t.seriesData.seriesX&&t.seriesData.seriesX[s];if(!i||!i.length)return;const a=e.minX,n=e.maxX;if(a===void 0||n===void 0)return;const r=i[this.dataPointIndex];if(r>=a&&r<=n)return;const o=i.length;for(let l=0;l<o;l++)if(i[l]>=a&&i[l]<=n){this.dataPointIndex=l;return}}_snapToVisibleRangeInDirection(t){const e=this.w,s=e.globals,i=this.seriesIndex,a=e.seriesData.seriesX&&e.seriesData.seriesX[i];if(!a||!a.length)return;const n=s.minX,r=s.maxX;if(n===void 0||r===void 0)return;const o=a.length;if(t>=0){for(let l=0;l<o;l++)if(a[l]>=n&&a[l]<=r){this.dataPointIndex=l;return}}else for(let l=o-1;l>=0;
1381l--)if(a[l]>=n&&a[l]<=r){this.dataPointIndex=l;return}}_isDataPointVisible(t,e){const s=this.w,i=s.globals;if(!s.interact.zoomed)return!0;const a=s.seriesData.seriesX&&s.seriesData.seriesX[t];if(!a)return!0;const n=a[e];return n===void 0?!0:n>=i.minX&&n<=i.maxX}_announce(t){const e=this.w;if(!e.config.chart.accessibility.announcements.enabled)return;const s=e.dom.baseEl;if(!s)return;const i=s.querySelector(".apexcharts-sr-status");i&&(i.textContent="",setTimeout(()=>{i.textContent=t},0))}}lt.registerFeatures({keyboardNavigation:qr});const jr=new Set(["bar","funnel","pyramid"]),Zr=new Set(["pie","donut","polarArea","radialBar","gauge"]),Kr=new Set(["unit"]);function qt(x){return jr.has(x)?"bar":Zr.has(x)?"radial":Kr.has(x)?"unit":null}class Jr{constructor(t,e){this.w=t,this.ctx=e,this._snapshot=null}canMorphTypes(t,e){if(t===e)return!1;const s=qt(t),i=qt(e);return!(!s||!i)}isCompatibleSeriesShape(t,e,s){if(!Array.isArray(s)||s.length===0)return!1;const i=qt(t),a=qt(e);return a==="radial"||a==="unit"?s.every(n=>typeof n=="number")?!0:s.length===1&&s[0]&&typeof s[0]=="object"&&Array.isArray(s[0].data):a==="bar"?s.every(n=>n&&typeof n=="object"&&Array.isArray(n.data)):i!==null&&a!==null}captureBeforeDestroy({fromType:t,toType:e,newSeries:s}){if(this._snapshot=null,!H.isBrowser())return!1;const i=this.w.config.chart.animations;if(!i||i.enabled===!1||i.chartTypeMorph&&i.chartTypeMorph.enabled===!1||i.respectReducedMotion&&Be()||!this.canMorphTypes(t,e)||!this.isCompatibleSeriesShape(t,e,s))return!1;const a=this._captureFromDOM(t);if(!a.length)return!1;const n=this._buildMapping(a,t,e,s);return n.size===0?!1:(this._snapshot={fromType:t,toType:e,mapping:n,oldLayout:{translateX:this.w.layout.translateX||0,translateY:this.w.layout.translateY||0}},this.w.globals.previousPaths=[],!0)}_captureFromDOM(t){var e;const s=(e=this.w.globals.dom)==null?void 0:e.baseEl;if(!s)return[];const i=[],a=qt(t);if(a==="bar")s.querySelectorAll(".apexcharts-bar-series .apexcharts-series").forEach(r=>{var o;const l=parseInt((o=r.getAttribute("data:realIndex"))!=null?o:"0",10);r.querySelectorAll("path[pathTo]").forEach((h,d)=>{const f=h.getAttribute("pathTo")||h.getAttribute("d");f&&i.push({realIndex:l,j:d,d:f,fill:h.getAttribute("fill")})})});else if(a==="radial")if(t==="radialBar"||t==="gauge"){const n=this.w.layout.gridWidth/2,r=Math.min(this.w.layout.gridWidth,this.w.layout.gridHeight)/2;s.querySelectorAll(".apexcharts-radial-series .apexcharts-radialbar-area").forEach(l=>{var c;const h=l.parentElement,d=parseInt((c=h?.getAttribute("data:realIndex"))!=null?c:"0",10),f=l.getAttribute("d");if(!f)return;const u=parseFloat(l.getAttribute("stroke-width")||"0"),g=u>1&&this._radialArcToFilledSegment(f,u,n,r)||f;i.push({realIndex:d,j:0,d:g,fill:l.getAttribute("stroke")})})}else s.querySelectorAll(".apexcharts-pie-series .apexcharts-pie-area").forEach((r,o)=>{const l=r.getAttribute("d");l&&i.push({realIndex:o,j:0,d:l,fill:r.getAttribute("fill")})});return i}_radialArcToFilledSegment(t,e,s,i){const a=t.match(/M\s*(-?[\d.]+)\s+(-?[\d.]+)\s+A\s*(-?[\d.]+)\s+(?:-?[\d.]+)\s+(?:-?[\d.]+)\s+(\d)\s+(\d)\s+(-?[\d.]+)\s+(-?[\d.]+)/);if(!a)return null;const n=parseFloat(a[1]),r=parseFloat(a[2]),o=parseFloat(a[3]),l=parseInt(a[4],10),c=parseInt(a[5],10),h=parseFloat(a[6]),d=parseFloat(a[7]);if(!isFinite(o)||o<=0)return null;const f=e/2,u=o+f,g=Math.max(0,o-f),p=(w,_,C)=>{const S=w-s,k=_-i,M=Math.sqrt(S*S+k*k);if(M===0)return{x:s,y:i};const L=C/M;return{x:s+S*L,y:i+k*L}},b=p(n,r,u),m=p(h,d,u),A=p(n,r,g),v=p(h,d,g),y=c?0:1;return`M ${b.x} ${b.y} A ${u} ${u} 0 ${l} ${c} ${m.x} ${m.y} L ${v.x} ${v.y} A ${g} ${g} 0 ${l} ${y} ${A.x} ${A.y} Z`}buildRingSegmentPath(t,e,s,i,a,n){const r=i/2,o=s+r,l=Math.max(0,s-r),c=(a-90)*Math.PI/180,h=(n-90)*Math.PI/180,d={x:t+o*Math.cos(c),y:e+o*Math.sin(c)},f={x:t+o*Math.cos(h),y:e+o*Math.sin(h)},u={x:t+l*Math.cos(c),y:e+l*Math.sin(c)},g={x:t+l*Math.cos(h),y:e+l*Math.sin(h)},p=n>a?1:0,b=Math.abs(n-a)>180?1:0;return`M ${d.x} ${d.y} A ${o} ${o} 0 ${b} ${p} ${f.x} ${f.y} L ${g.x} ${g.y} A ${l} ${l} 0 ${b} ${1-p} ${u.x} ${u.y} Z`}getFromType(){return this._snapshot?this._snapshot.fromType:null}_buildMapping(t,e,s,i){const a=new Map,n=qt(s),r=t.slice().sort((o,l)=>o.realIndex-l.realIndex||o.j-l.j);if(n==="radial"||n==="unit")return r.forEach((o,l)=>{a.set(`${l}:0`,{d:o.d,fill:o.fill})}),a;if(n==="bar"){const o=[];
1381return(Array.isArray(i)?i:[]).forEach((c,h)=>{const d=c&&Array.isArray(c.data)?c.data:[];for(let f=0;f<d.length;f++)o.push({realIndex:h,j:f})}),r.forEach((c,h)=>{const d=o[h];d&&a.set(`${d.realIndex}:${d.j}`,{d:c.d,fill:c.fill})}),a}return a}isActive(){return this._snapshot!==null}getInitialPathFor(t,e){if(!this._snapshot)return null;const s=this._snapshot.mapping.get(`${t}:${e}`);if(!s)return null;const i=this._snapshot.oldLayout.translateX-(this.w.layout.translateX||0),a=this._snapshot.oldLayout.translateY-(this.w.layout.translateY||0);return i===0&&a===0?s.d:this._translatePathD(s.d,i,a)}_translatePathD(t,e,s){return e===0&&s===0?t:Vt(t).map(a=>{const n=a[0];return n==="Z"?"Z":n==="M"||n==="L"||n==="T"?`${n} ${a[1]+e} ${a[2]+s}`:n==="H"?`${n} ${a[1]+e}`:n==="V"?`${n} ${a[1]+s}`:n==="C"?`${n} ${a[1]+e} ${a[2]+s} ${a[3]+e} ${a[4]+s} ${a[5]+e} ${a[6]+s}`:n==="S"||n==="Q"?`${n} ${a[1]+e} ${a[2]+s} ${a[3]+e} ${a[4]+s}`:n==="A"?`${n} ${a[1]} ${a[2]} ${a[3]} ${a[4]} ${a[5]} ${a[6]+e} ${a[7]+s}`:a.join(" ")}).join(" ")}getInitialCenterFor(t){const e=this.getInitialBBoxFor(t);return e?{x:e.x+e.width/2,y:e.y+e.height/2}:null}getInitialBBoxFor(t){if(!this._snapshot)return null;const e=this._snapshot.mapping.get(`${t}:0`);if(!e)return null;const s=this._pathBBox(e.d);if(!s)return null;const i=this._snapshot.oldLayout.translateX-(this.w.layout.translateX||0),a=this._snapshot.oldLayout.translateY-(this.w.layout.translateY||0);return{x:s.minX+i,y:s.minY+a,width:s.maxX-s.minX,height:s.maxY-s.minY}}_pathBBox(t){const e=Vt(t);let s=1/0,i=1/0,a=-1/0,n=-1/0,r=!1;return e.forEach(o=>{const l=o[0];if(l==="Z")return;let c=[];if(l==="H")c=[[o[1],(i+n)/2||o[1]]];else if(l==="V")c=[[(s+a)/2||o[1],o[1]]];else if(l==="A")c=[[o[6],o[7]]];else for(let h=1;h+1<o.length;h+=2)c.push([o[h],o[h+1]]);c.forEach(([h,d])=>{!isFinite(h)||!isFinite(d)||(r=!0,h<s&&(s=h),h>a&&(a=h),d<i&&(i=d),d>n&&(n=d))})}),r?{minX:s,minY:i,maxX:a,maxY:n}:null}getInitialFillFor(t,e){if(!this._snapshot)return null;const s=this._snapshot.mapping.get(`${t}:${e}`);return s?s.fill:null}getSpeed(){const t=this.w.config.chart.animations;return t.chartTypeMorph&&t.chartTypeMorph.speed||t.speed||600}applyChromeFade(){var t;if(!this._snapshot||!H.isBrowser())return;const e=(t=this.w.globals.dom)==null?void 0:t.baseEl;if(!e)return;const s=this.getSpeed();[".apexcharts-xaxis",".apexcharts-yaxis",".apexcharts-grid",".apexcharts-gridlines-horizontal",".apexcharts-gridlines-vertical",".apexcharts-legend",".apexcharts-title-text",".apexcharts-subtitle-text"].forEach(a=>{e.querySelectorAll(a).forEach(n=>{n.style&&(n.style.opacity="0",n.style.transition=`opacity ${s}ms ease-out`,B.requestAnimationFrame(()=>{n.style.opacity="1"}),setTimeout(()=>{n.style.transition="",n.style.opacity=""},s+80))})}),setTimeout(()=>this.cleanup(),s+100)}cleanup(){this._snapshot=null}}lt.registerFeatures({morphTypeChange:Jr});const jt="http://www.w3.org/1999/xhtml";class Qr{constructor(t,e,s){this.w=t,this.ctx=e,this.drilldown=s}render(t){if(!H.isBrowser())return;const e=this.w,s=e.dom.elWrap;if(!s)return;const i=s.querySelector(".apexcharts-breadcrumb");i&&i.parentNode&&i.parentNode.removeChild(i);const a=e.config.drilldown&&e.config.drilldown.breadcrumb;if(!a||a.show===!1||this.drilldown.depth===0)return;const n=B.createElementNS(jt,"nav");n.setAttribute("class","apexcharts-breadcrumb"),n.setAttribute("aria-label","Drilldown breadcrumb"),this._position(n,a);const r=a.separator!=null?a.separator:" / ";t.forEach((o,l)=>{if(l>0){const d=B.createElementNS(jt,"span");d.setAttribute("class","apexcharts-breadcrumb-separator"),d.setAttribute("aria-hidden","true"),d.textContent=r,n.appendChild(d)}const c=this._label(o,l);if(l===t.length-1){const d=B.createElementNS(jt,"span");d.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),d.setAttribute("aria-current","page"),d.textContent=c,n.appendChild(d)}else{const d=B.createElementNS(jt,"button");if(d.setAttribute("type","button"),d.setAttribute("class","apexcharts-breadcrumb-item"),l===0){const u=B.createElementNS(jt,"span");u.setAttribute("class","apexcharts-breadcrumb-arrow"),u.setAttribute("aria-hidden","true"),u.textContent="←",d.appendChild(u)}const f=B.createElementNS(jt,"span");f.setAttribute("class","apexcharts-breadcrumb-label"),f.textContent=c,d.appendChild(f),d.addEventListener("click",()=>this.drilldown.drillToLevel(l)),n.appendChild(d)}}),s.appendChild(n),this._avoidChromeOverlap(n)}_avoidChromeOverlap(t){const e=this.w,s=[".apexcharts-title-text",".apexcharts-subtitle-text"].map(a=>e.dom.baseEl.querySelector(a)).filter(a=>a!==null);if(!s.length)return;const i=e.dom.elWrap.getBoundingClientRect().top;for(let a=0;a<s.length+1;a++){const n=t.getBoundingClientRect(),r=s.find(o=>{const l=o.getBoundingClientRect();return n.left<l.right&&n.right>l.left&&n.top<l.bottom&&n.bottom>l.top});if(!r)break;t.style.top=`${r.getBoundingClientRect().bottom-i+4}px`}}_label(t,e){const s=this.w.config.drilldown.breadcrumb;let i;if(e===0)i=s.rootLabel!=null?s.rootLabel:"All";else{const a=(this.w.config.drilldown.series||[]).find(n=>n&&n.id===t);i=a&&a.name||String(t)}return typeof s.formatter=="function"?s.formatter(i,{index:e,depth:this.drilldown.depth}):i}_position(t,e){const s=e.offsetX||0,i=e.offsetY||0;t.style.position="absolute",t.style.top=i+"px",e.position==="top-right"?t.style.right=-s+3+"px":t.
1381style.left=s+"px"}}const bi=32;class to{constructor(t,e){this.w=t,this.ctx=e,this.stack=[],this.rootSnapshot=null,this._wired=!1,this.breadcrumb=new Qr(t,e,this),this._onPointSelect=this._onPointSelect.bind(this),this._afterRender=this._afterRender.bind(this),this.init()}init(){const t=this.w;!t.config.drilldown||!t.config.drilldown.enabled||this._wired||(this._wired=!0,this.ctx.addEventListener("dataPointSelection",this._onPointSelect),this.ctx.addEventListener("mounted",this._afterRender),this.ctx.addEventListener("updated",this._afterRender))}get path(){return["root",...this.stack.map(t=>t.id)]}get depth(){return this.stack.length}drillDown(t,e,s){const i=this._resolveChild(t);return i?this._drillInto(i,e,s):typeof this.w.config.drilldown.onDrillDown=="function"?this._drillDownAsync(t,e,s):(console.warn(`ApexCharts: drilldown id "${t}" not found in chart.drilldown.series, and no onDrillDown resolver is set.`),Promise.resolve(this.ctx))}drillUp(){return this.drillToLevel(this.stack.length-1)}drillToRoot(){return this.drillToLevel(0)}drillToLevel(t){const e=this.stack.length;if(t<0||t>=e)return Promise.resolve(this.ctx);const s=this.path[this.path.length-1],i=t===0?this.rootSnapshot:this.stack[t].restore;this.stack=this.stack.slice(0,t);const a=this.path[this.path.length-1];return this._apply(this._viewFromSnapshot(i),"up",{from:s,to:a})}_resolveChild(t){const e=this.w.config.drilldown&&this.w.config.drilldown.series;return Array.isArray(e)&&e.find(s=>s&&s.id===t)||null}_drillInto(t,e,s){if(this.stack.length>=bi)return console.warn(`ApexCharts: drilldown max depth (${bi}) reached.`),Promise.resolve(this.ctx);this.rootSnapshot||(this.rootSnapshot=this._snapshot());const i=this.path[this.path.length-1];return this.stack.push({id:t.id,name:t.name,restore:this._snapshot()}),this._apply(this._viewFromChild(t),"down",{from:i,to:t.id,point:e,seriesIndex:s&&s.seriesIndex,dataPointIndex:s&&s.dataPointIndex})}_drillDownAsync(t,e,s){const i=this.w.config.drilldown.onDrillDown;let a;try{a=i({point:e,seriesIndex:s&&s.seriesIndex,dataPointIndex:s&&s.dataPointIndex})}catch(n){return this._fire("drillDownError",{id:t,error:n}),Promise.resolve(this.ctx)}return Promise.resolve(a).then(n=>!n||!n.data?this.ctx:this._drillInto(n,e,s),n=>(this._fire("drillDownError",{id:t,error:n}),this.ctx))}_snapshot(){const t=this.w.config,e=this._overrideFields(),s={series:this._uncollapseSeries(R.clone(t.series))};return Array.isArray(t.labels)&&t.labels.length&&(s.labels=R.clone(t.labels)),s.chart={type:t.chart.type,stacked:t.chart.stacked},e.has("xaxis")&&(s.xaxis=R.clone(t.xaxis)),e.has("yaxis")&&(s.yaxis=R.clone(t.yaxis)),e.has("colors")&&(s.colors=t.colors?R.clone(t.colors):void 0),e.has("plotOptions")&&(s.plotOptions=R.clone(t.plotOptions)),e.has("fill")&&(s.fill=R.clone(t.fill)),e.has("legend")&&(s.legend=R.clone(t.legend)),s}_uncollapseSeries(t){const e=this.w,s=e.globals,i=[...s.collapsedSeries||[],...s.ancillaryCollapsedSeries||[]];if(!i.length)return t;const a=e.config.chart.type,r=(a==="pie"||a==="donut"||a==="polarArea")&&t.length===1&&t[0]&&typeof t[0]=="object"&&Array.isArray(t[0].data)?t[0].data:t;for(const o of i){const l=o.index;s.axisCharts?t[l]&&(t[l].data=Array.isArray(o.data)?o.data.slice():o.data):r[l]&&typeof r[l]=="object"?r[l].y=o.data:r[l]!==void 0&&(r[l]=o.data)}return t}_overrideFields(){const t=new Set,e=this.w.config.drilldown&&this.w.config.drilldown.series||[];for(const s of e)s&&(s.xaxis&&t.add("xaxis"),s.yaxis&&t.add("yaxis"),s.colors&&t.add("colors"),s.plotOptions&&t.add("plotOptions"),s.fill&&t.add("fill"),s.legend&&t.add("legend"));return t}_copyOptionalViewFields(t,e){e.xaxis&&(t.xaxis=e.xaxis),e.yaxis&&(t.yaxis=e.yaxis),e.colors&&(t.colors=e.colors),e.plotOptions&&(t.plotOptions=e.plotOptions),e.fill&&(t.fill=e.fill),e.legend&&(t.legend=e.legend)}_viewFromChild(t){const e={};Array.isArray(t.series)?e.series=t.series:e.series=[{name:t.name||"",data:t.data}];const s={};return t.chart&&t.chart.type&&(s.type=t.chart.type),t.chart&&t.chart.stacked!=null&&(s.stacked=t.chart.stacked),Object.keys(s).length&&(e.chart=s),this._copyOptionalViewFields(e,t),e}_viewFromSnapshot(t){const e={series:t.series,chart:t.chart};return t.labels&&t.labels.length&&(e.labels=t.labels),this._copyOptionalViewFields(e,t),e}_apply(t,e,s){const i=this.w;i.interact.selectedDataPoints=[],i.globals.collapsedSeries=[],i.globals.collapsedSeriesIndices=[],i.globals.ancillaryCollapsedSeries=[],i.globals.ancillaryCollapsedSeriesIndices=[],i.globals.allSeriesCollapsed=!1,i.globals.risingSeries=[];const a=(!i.config.drilldown.animation||i.config.drilldown.animation.enabled!==!1)&&i.config.chart.animations.enabled!==!1;e==="down"&&this._fire("drillDownStart",s);const n=o=>this.ctx.updateOptions(t,!1,o,!1,!1),r=()=>(this._fire(e==="down"?"drillDownEnd":"drillUp",s),this.ctx);if(a&&this._zoomEnabled()){const o=this._triggerOrigin(s);if(o)return this._zoomDrill(o,e,()=>n(!1)).then(r)}return n(a).then(r)}_zoomEnabled(){const t=this.w.config.drilldown&&this.w.config.drilldown.animation;return!!(t&&t.zoomFromPoint)}_svgNode(){const t=this.w.dom&&this.w.dom.Paper;return t&&t.node?t.node:null}_markGroup(){const t=this._svgNode();return!t||typeof t.querySelector!="function"?null:t.querySelector(".apexcharts-plot-series, .apexcharts-heatmap, .apexcharts-treemap")}_triggerOrigin(t){if(!H.isBrowser())return null;const e=this._svgNode(),s=this._markGroup();if(!e||!s||typeof s.animate!="function"||typeof e.getBoundingClientRect!="function")return null;const i=e.getBoundingClientRect();let a=null;if(t&&t.seriesIndex!=null&&t.dataPointIndex!=null&&this.w.dom.baseEl&&(a=this.w.dom.baseEl.querySelector(`[index="${t.seriesIndex}"][j="${t.dataPointIndex}"]`)),a&&typeof a.getBoundingClientRect=="function"){const r=a.getBoundingClientRect();
1381return{x:r.left+r.width/2-i.left,y:r.top+r.height/2-i.top}}const n=s.getBoundingClientRect();return{x:n.left+n.width/2-i.left,y:n.top+n.height/2-i.top}}_zoomDrill(t,e,s){return Yi(this,null,function*(){const i=this._zoomDuration(),a=e==="down",n=Math.round(i*.55),r=a?"scale(1.03)":"scale(0.97)",o=a?"scaleX(0.55) scaleY(0.85)":"scale(1.04)",l=u=>{u.style.transformBox="view-box",u.style.transformOrigin=`${t.x}px ${t.y}px`},c=u=>{u.style.transform="",u.style.opacity="",u.style.transformOrigin="",u.style.transformBox=""},h=this._markGroup();let d=null;if(h){l(h),d=h.animate([{transform:"scale(1)",opacity:1},{transform:r,opacity:0}],{duration:n,easing:"ease-in",fill:"forwards"});try{yield d.finished}catch{}}yield s();const f=this._markGroup();if(f){l(f),f.style.opacity="0",f.style.transform=o,d&&h===f&&d.cancel();const u=f.animate([{transform:o,opacity:0},{transform:"scale(1)",opacity:1}],{duration:i,easing:"cubic-bezier(0.16, 1, 0.3, 1)",fill:"forwards"});try{yield u.finished}catch{}c(f),u.cancel()}})}_zoomDuration(){const t=this.w.config.drilldown&&this.w.config.drilldown.animation,e=t&&typeof t.speed=="number"?t.speed:260;return Math.max(80,e)}_fire(t,e){const s=this.w.config.chart.events&&this.w.config.chart.events[t];typeof s=="function"&&s(e,this.ctx,this.w),this.ctx.events.fireEvent(t,[e,this.ctx,this.w])}_onPointSelect(t,e,s){if(!s)return;const i=this._pointAt(s.seriesIndex,s.dataPointIndex);if(i&&typeof i=="object"&&i.drilldown!=null)return this.drillDown(i.drilldown,i,s);if(typeof this.w.config.drilldown.onDrillDown=="function")return this._drillDownAsync(null,i,s)}_pointAt(t,e){const s=this.w.config.series;if(!Array.isArray(s)||t==null||e==null)return null;const i=s[t];return!i||!Array.isArray(i.data)?null:i.data[e]!=null?i.data[e]:null}_afterRender(){!this.w.config.drilldown||!this.w.config.drilldown.enabled||(this._markDrillableTargets(),this.breadcrumb.render(this.path))}_markDrillableTargets(){if(!H.isBrowser())return;const t=this.w,e=t.dom.baseEl,s=t.config.series;!e||!Array.isArray(s)||s.forEach((i,a)=>{const n=i&&Array.isArray(i.data)?i.data:null;n&&n.forEach((r,o)=>{if(!r||typeof r!="object"||r.drilldown==null)return;e.querySelectorAll(`[index="${a}"][j="${o}"]`).forEach(c=>c.classList.add("apexcharts-drilldown-target"))})})}}lt.registerFeatures({drilldown:to});const vs=1;function yi(x,t){const e=x!=null,s=t!=null;return!e&&!s?null:{min:e?x:null,max:s?t:null}}function pa(x){return Array.isArray(x)?x.map(t=>Array.isArray(t)?t.slice():t):[]}function eo(x,t){return typeof x!="function"||!t?null:x===t.addXaxisAnnotation?"xaxis":x===t.addYaxisAnnotation?"yaxis":x===t.addPointAnnotation?"point":null}function so(x){switch(x){case"xaxis":return"addXaxisAnnotation";case"yaxis":return"addYaxisAnnotation";case"point":return"addPointAnnotation";default:return null}}function io(x,t){const e=x.config.annotations?R.clone(x.config.annotations):null,s=[],i=x.globals.memory&&x.globals.memory.methodsToExec||[];for(const a of i){if(!a||a.label!=="addAnnotation")continue;const n=eo(a.method,t);n&&s.push({kind:n,params:R.clone(a.params)})}return{static:e,dynamic:s}}function ao(x){const t=x&&x.measure;if(!t||typeof t.getPins!="function")return null;const e=t.getPins();return Array.isArray(e)&&e.length?{pins:e}:null}function xa(x,t){var e,s;const i=x.config.xaxis||{},n=(Array.isArray(x.config.yaxis)?x.config.yaxis:x.config.yaxis?[x.config.yaxis]:[]).map(c=>yi(c&&c.min,c&&c.max)),r=n.some(c=>c!==null),o=x.config.theme,l=t&&t.drilldown;return{v:vs,window:{xaxis:yi(i.min,i.max),yaxis:r?n:null},zoomed:!!x.interact.zoomed,collapsed:(x.globals.collapsedSeriesIndices||[]).slice(),ancillaryCollapsed:(x.globals.ancillaryCollapsedSeriesIndices||[]).slice(),selectedDataPoints:pa(x.interact.selectedDataPoints),theme:o?{mode:(e=o.mode)!=null?e:null,palette:(s=o.palette)!=null?s:null}:null,locale:x.config.chart&&x.config.chart.defaultLocale||null,annotations:io(x,t),drill:l&&l.depth>0?{path:l.path.slice()}:null,measure:ao(t)}}function no(x,t,e){const s=x.w;if(t==null&&e==null)return;const i=s.globals.seriesNames||[],a=new Set([...t||[],...e||[]]),n=new Set([...s.globals.collapsedSeriesIndices||[],...s.globals.ancillaryCollapsedSeriesIndices||[]]);for(let r=0;r<i.length;r++){const o=i[r];if(o==null)continue;const l=a.has(r),c=n.has(r);l&&!c?x.hideSeries(o):!l&&c&&x.showSeries(o)}}function ro(x,t){Array.isArray(t)&&(x.w.interact.selectedDataPoints=pa(t))}function oo(x,t,{animate:e=!0,mergeOptions:s}={}){var i,a;if(!x||!t)return;typeof t.v=="number"&&t.v>vs&&console.warn(`[apexcharts] ViewState v${t.v} is newer than this build understands (v${vs}); applying best-effort.`),x.clearAnnotations();const n=s?R.clone(s):{},r=t.window&&t.window.xaxis;n.xaxis=Object.assign({},n.xaxis,r?{min:(i=r.min)!=null?i:void 0,max:(a=r.max)!=null?a:void 0}:{min:void 0,max:void 0});const o=t.window&&t.window.yaxis;
1381if(Array.isArray(o)&&(n.yaxis=o.map(l=>{var c,h;return l?{min:(c=l.min)!=null?c:void 0,max:(h=l.max)!=null?h:void 0}:{}})),t.theme){const l={};t.theme.mode!=null&&(l.mode=t.theme.mode),t.theme.palette!=null&&(l.palette=t.theme.palette),Object.keys(l).length&&(n.theme=Object.assign({},n.theme,l))}t.annotations&&t.annotations.static&&(n.annotations=R.clone(t.annotations.static)),x.updateOptions(n,!1,e,!1,!1),ma(x,t)}function ma(x,t){if(!x||!t)return;const e=x.w;e.interact.zoomed=!!t.zoomed,no(x,t.collapsed,t.ancillaryCollapsed),t.annotations&&Array.isArray(t.annotations.dynamic)&&t.annotations.dynamic.forEach(s=>{const i=so(s.kind);i&&typeof x[i]=="function"&&x[i](s.params,!0)}),ro(x,t.selectedDataPoints),t.locale&&t.locale!==e.config.chart.defaultLocale&&x.setLocale(t.locale),x.measure&&typeof x.measure.setPins=="function"&&x.measure.setPins(t.measure&&t.measure.pins||[])}const Qe=1,wi="apex";function lo(x){if(typeof Buffer<"u")return Buffer.from(x,"utf-8").toString("base64");const t=new TextEncoder().encode(x);let e="";for(let s=0;s<t.length;s++)e+=String.fromCharCode(t[s]);return btoa(e)}function co(x){if(typeof Buffer<"u")return Buffer.from(x,"base64").toString("utf-8");const t=atob(x),e=new Uint8Array(t.length);for(let s=0;s<t.length;s++)e[s]=t.charCodeAt(s);return new TextDecoder().decode(e)}function ho(x){return lo(x).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function fo(x){let t=x.replace(/-/g,"+").replace(/_/g,"/");for(;t.length%4;)t+="=";return co(t)}function uo(x){try{return JSON.parse(JSON.stringify(x))}catch{return}}class $t{constructor(t,e){this.w=t,this.ctx=e,this._saved=[],this._counter=0,this._used=!1}capture(){const t=xa(this.w,this.ctx),e={v:Qe,view:t},s=this._serializableDelta();return s&&Object.keys(s).length&&(e.options=s),e}_serializableDelta(){const t=this.w.config,e=t.chart&&t.chart.perspectives&&t.chart.perspectives.serializeOptions||["theme","xaxis","yaxis","title","subtitle"],s={};return e.forEach(i=>{if(t[i]!==void 0){const a=uo(t[i]);a!==void 0&&(s[i]=a)}}),s}encode(t){const e=t||this.capture();return ho(JSON.stringify(e))}decode(t){return $t.decode(t)}toURL(){if(!H.isBrowser())return"";const t=this.encode(this.capture()),e=new URL(window.location.href);return e.hash=`${wi}=${t}`,e.toString()}apply(t,e={}){const s=typeof t=="string"?$t.decode(t):t;if(!s||!s.view)return;this._used=!0,Ft(this.w,this.ctx);const i=e.animate!==void 0?e.animate:!0,a=R.extend(s.options?R.clone(s.options):{},e.mergeOptions||{}),n=Object.keys(a).length?a:void 0;(this.w.config.chart.group?this.ctx.getSyncedCharts():[this.ctx]).forEach(o=>{oo(o,s.view,{animate:i,mergeOptions:n})})}save(t){const e=`perspective-${++this._counter}`;return this._saved.push({id:e,name:t||e,token:this.capture()}),this._used=!0,Ft(this.w,this.ctx),e}list(){return this._saved.map(t=>({id:t.id,name:t.name,token:t.token}))}delete(t){const e=this._saved.findIndex(s=>s.id===t);e>-1&&this._saved.splice(e,1)}teardown(){this._saved=[],this._counter=0}static decode(t){if(typeof t!="string"||!t)return null;try{const e=JSON.parse(fo(t));return!e||typeof e!="object"?null:e.v!==Qe?(console.warn(`apexcharts: unsupported perspective version ${e.v} (expected ${Qe}).`),null):e}catch(e){return console.warn("apexcharts: failed to decode perspective token.",e),null}}static fromURL(t){try{const e=t||(H.isBrowser()?window.location.href:"");if(!e)return null;const i=new URL(e).hash.replace(/^#/,"");if(!i)return null;const a=i.split("&").map(n=>n.split("=")).find(n=>n[0]===wi);return!a||a[1]==null?null:$t.decode(decodeURIComponent(a[1]))}catch{return null}}}lt.registerFeatures({perspectives:$t});lt.perspectives={decode:x=>(pi(),$t.decode(x)),fromURL:x=>(pi(),$t.fromURL(x))};class go{constructor(t,e){this.w=t,this.ctx=e,this._beats=[],this._observer=null,this._activeIndex=-1,this._animate=!0,this._warnedNoPerspectives=!1,this._used=!1}bind(t={}){var e;if(this.unbind(),!H.isBrowser())return 0;const s=this.ctx.el&&this.ctx.el.ownerDocument;if(!s||typeof IntersectionObserver>"u")return 0;let i=null;if(t.scroller&&(i=typeof t.scroller=="string"?s.querySelector(t.scroller):t.scroller),this._beats=this._resolveBeats(s,i,t.beats),!this._beats.length)return 0;this._animate=t.animate!==!1;const a=Math.min(Math.max((e=t.offset)!=null?e:.5,0),1),n=+(a*100).toFixed(3),r=+(100-a*100).toFixed(3);return this._observer=new IntersectionObserver(o=>this._onIntersect(o),{root:i,rootMargin:`-${n}% 0px -${r}%`,threshold:0}
1381),this._beats.forEach(o=>{var l;return(l=this._observer)==null?void 0:l.observe(o.el)}),this._used=!0,Ft(this.w,this.ctx),this._beats.length}_resolveBeats(t,e,s){const i=[];return Array.isArray(s)?(s.forEach((n,r)=>{var o,l;if(!n)return;const c=n.el&&typeof n.el=="object"?n.el:n.selector?t.querySelector(n.selector):null;if(!c){console.warn(`apexcharts: storyboard beat ${r} has no resolvable element; skipped.`);return}i.push({el:c,key:(l=(o=n.key)!=null?o:c.getAttribute("data-apex-beat"))!=null?l:String(r),view:n.view,options:n.options,announce:n.announce,onEnter:typeof n.onEnter=="function"?n.onEnter:void 0})}),i):((e||t).querySelectorAll("[data-apex-beat]").forEach((n,r)=>{i.push({el:n,key:n.getAttribute("data-apex-beat")||String(r),view:n.getAttribute("data-apex-view")||void 0,options:void 0,announce:n.getAttribute("data-apex-announce")||void 0,onEnter:void 0})}),i)}_onIntersect(t){t.forEach(e=>{const s=this._beats.findIndex(i=>i.el===e.target);s<0||(e.isIntersecting?this._activate(s):s===this._activeIndex&&e.rootBounds&&e.boundingClientRect.top>=e.rootBounds.bottom&&s>0&&this._activate(s-1))})}_activate(t,e={}){var s,i;if(t===this._activeIndex)return;const a=this._beats[t];if(!a)return;const n=t>this._activeIndex?"down":"up";this._activeIndex=t;const r=(e.animate!==void 0?e.animate:this._animate)&&!Be();if(a.view!=null||a.options)if(this.ctx.perspectives){const l=(s=a.view)!=null?s:{},c=typeof l=="string"||l.view?l:{view:this._normalizeView(l)};this.ctx.perspectives.apply(c,{animate:r,mergeOptions:a.options})}else this._warnedNoPerspectives||(this._warnedNoPerspectives=!0,console.warn('apexcharts: storyboard beats carry views but the perspectives feature is not bundled. import "apexcharts/features/storyboard" (which includes it) or drive beats via onEnter.'));const o={index:t,key:a.key,el:a.el,direction:n};a.onEnter&&a.onEnter(this.ctx,o),a.announce&&this._announce(a.announce),typeof this.w.config.chart.events.beatChange=="function"&&this.w.config.chart.events.beatChange(this.ctx,o),(i=this.ctx.events)==null||i.fireEvent("beatChange",[this.ctx,o])}_normalizeView(t){const e=t.annotations&&t.annotations.static||{};return Z(G({},t),{annotations:{static:G({points:[],xaxis:[],yaxis:[],texts:[],images:[]},e),dynamic:t.annotations&&t.annotations.dynamic||[]}})}goTo(t,e={}){const s=typeof t=="number"?t:this._beats.findIndex(i=>i.key===t);s>=0&&s<this._beats.length&&this._activate(s,e)}current(){if(this._activeIndex<0)return null;const t=this._beats[this._activeIndex];return{index:this._activeIndex,key:t?t.key:null}}unbind(){this._observer&&(this._observer.disconnect(),this._observer=null),this._beats=[],this._activeIndex=-1,this._used=!1,Ft(this.w,this.ctx)}teardown(){this.unbind()}_announce(t){const e=this.w;if(!e.config.chart.accessibility.announcements.enabled)return;const s=e.dom.baseEl;if(!s)return;const i=s.querySelector(".apexcharts-sr-status");i&&(i.textContent="",setTimeout(()=>{i.textContent=t},0))}}lt.registerFeatures({storyboard:go});function po(x){if(!x)return!1;const t=x.tagName;return t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||x.isContentEditable===!0}class xo{constructor(t,e){this.w=t,this.ctx=e,this.stack=[],this.pointer=-1,this.applying=!1,this._batching=!1,this._counter=0,this._coalesceTimer=null,this._settleTimer=null,this._pendingLabel=void 0,this._keydownTarget=null,this._pointerTarget=null,this._engaged=!1,this._wired=!1,this._readConfig(),this._onMounted=this._onMounted.bind(this),this._onUpdated=this._onUpdated.bind(this),this._onSelection=this._onSelection.bind(this),this._onKeyDown=this._onKeyDown.bind(this),this._onPointerDown=this._onPointerDown.bind(this),this.init()}_readConfig(){const t=this.w,e=t.config.chart&&t.config.chart.history||{};this.enabled=!!e.enabled,this.maxDepth=e.maxDepth>0?e.maxDepth:100,this.coalesceMs=e.coalesceMs!=null?e.coalesceMs:250,this.keyboard=e.keyboard!==!1}_syncConfig(){this._readConfig(),this.enabled&&this.keyboard?this._wireKeyboard():this._unwireKeyboard()}init(){this._wired||(this._wired=!0,this.ctx.addEventListener("mounted",this._onMounted),this.ctx.addEventListener("updated",this._onUpdated),this.ctx.addEventListener("scrolled",this._onUpdated),this.ctx.addEventListener("dataPointSelection",this._onSelection),this.enabled&&this.keyboard&&this._wireKeyboard())}
1381_wireKeyboard(){if(this._keydownTarget)return;const t=this.ctx.el,e=t&&t.ownerDocument;!H.isBrowser()||!e||(e.addEventListener("keydown",this._onKeyDown),e.addEventListener("pointerdown",this._onPointerDown,!0),e.addEventListener("mousedown",this._onPointerDown,!0),this._keydownTarget=e,this._pointerTarget=e)}_unwireKeyboard(){this._keydownTarget&&(this._keydownTarget.removeEventListener("keydown",this._onKeyDown),this._keydownTarget=null),this._pointerTarget&&(this._pointerTarget.removeEventListener("pointerdown",this._onPointerDown,!0),this._pointerTarget.removeEventListener("mousedown",this._onPointerDown,!0),this._pointerTarget=null),this._engaged=!1}_onMounted(){this._syncConfig(),this.enabled&&this.stack.length===0&&this._commit("initial",!0)}_onUpdated(){if(this._syncConfig(),!!this.enabled){if(this.applying){this._refreshSettle();return}this._schedule("update")}}_onSelection(){!this.enabled||this.applying||this._schedule("selection")}_onPointerDown(t){const e=this.ctx.el;this._engaged=!!(e&&t.target&&e.contains(t.target))}_onKeyDown(t){if(!(t.metaKey||t.ctrlKey))return;const e=(t.key||"").toLowerCase();if(e!=="z"&&e!=="y")return;const s=this.ctx.el;if(!s)return;const i=s.ownerDocument,a=i&&i.activeElement;if(po(a)||!(s.contains(a)||this._engaged))return;const n=e==="y"||t.shiftKey;t.preventDefault(),n?this.redo():this.undo()}_schedule(t){this.applying||this._batching||!this.enabled||(this._pendingLabel=t,this.coalesceMs>0&&H.isBrowser()?(clearTimeout(this._coalesceTimer),this._coalesceTimer=setTimeout(()=>this._commit(this._pendingLabel),this.coalesceMs)):this._commit(t))}_commit(t,e){if(clearTimeout(this._coalesceTimer),this._coalesceTimer=null,!e&&(this.applying||this._batching))return;const s=this._capture(t),i=this.stack[this.pointer];if(!(i&&i.sig===s.sig)){for(this.pointer<this.stack.length-1&&this.stack.splice(this.pointer+1),this.stack.push(s),this.pointer=this.stack.length-1;this.stack.length>this.maxDepth;)this.stack.shift(),this.pointer--;this._emitChange()}}_capture(t){const e=xa(this.w,this.ctx),{config:s,seriesSig:i}=this._cloneConfigCOW();return{id:`hist-${++this._counter}`,view:e,config:s,seriesSig:i,label:t||"change",at:H.isBrowser()?Date.now():0,origin:"local",sig:this._signature(e,s)}}_cloneConfigCOW(){const t=this.w,e=this.stack[this.pointer];let s=null;try{s=JSON.stringify(t.config.series)}catch{s=null}let i;if(e&&s!==null&&e.seriesSig===s){const a=t.config,{series:n}=a,r=La(a,["series"]);i=R.clone(r),i.series=e.config.series}else i=R.clone(t.config);return{config:i,seriesSig:s}}_signature(t,e){try{return JSON.stringify(t)+"|"+JSON.stringify(e)}catch{return`nosig-${this._counter}`}}_restore(t,e){if(!t)return;this.applying=!0;let s;try{this.ctx.clearAnnotations(),s=this.ctx.updateOptions(R.clone(t.config),!1,e,!1,!1)}catch(i){throw this.applying=!1,i}Promise.resolve(s).then(()=>{if(this.w.globals.isDestroyed){this.applying=!1;return}ma(this.ctx,t.view),this._refreshSettle(),this._emitChange()}).catch(()=>{this.applying=!1})}_refreshSettle(){if(!H.isBrowser()){this.applying=!1;return}clearTimeout(this._settleTimer),this._settleTimer=setTimeout(()=>{this.applying=!1},0)}snapshot(t){!this.enabled||this.applying||this._commit(t||"change")}undo(t=!0){this.canUndo()&&(this.pointer--,this._restore(this.stack[this.pointer],t))}redo(t=!0){this.canRedo()&&(this.pointer++,this._restore(this.stack[this.pointer],t))}canUndo(){return this.pointer>0}canRedo(){return this.pointer>-1&&this.pointer<this.stack.length-1}jump(t,e=!0){const s=this.stack.findIndex(i=>i.id===t);s===-1||s===this.pointer||(this.pointer=s,this._restore(this.stack[s],e))}clear(){clearTimeout(this._coalesceTimer),this._coalesceTimer=null;const t=this.stack[this.pointer];this.stack=t?[t]:[],this.pointer=this.stack.length-1,this._emitChange()}transaction(t,e={}){if(typeof t!="function")return Promise.resolve();const s=this._batching;return this._batching=!0,Promise.resolve().then(()=>t()).finally(()=>{this._batching=s,s||this._commit(e.label||"transaction",!0)})}entries(){return this.stack.map(t=>({id:t.id,label:t.label,at:t.at}))}state(){return{canUndo:this.canUndo(),canRedo:this.canRedo(),index:this.pointer,length:this.stack.length}}_emitChange(){this.ctx.events.fireEvent("historyChange",[this.ctx,this.state()])}teardown(){var t,e,s,i,a,n,r,o;clearTimeout(this._coalesceTimer),clearTimeout(this._settleTimer),this._coalesceTimer=null,this._settleTimer=null,this._unwireKeyboard(),this._wired&&((e=(t=this.ctx).removeEventListener)==null||e.call(t,"mounted",this._onMounted),(i=(s=this.ctx).removeEventListener)==null||i.call(s,"updated",this._onUpdated),(n=(a=this.ctx).removeEventListener)==null||n.call(a,"scrolled",this._onUpdated),(o=(r=this.ctx).removeEventListener)==null||o.call(r,"dataPointSelection",this._onSelection)),this.stack=[],this.pointer=-1,this._wired=!1}}lt.registerFeatures({history:xo});const As=1,mo=["updateOptions","updateSeries","appendData","appendSeries","toggleSeries","showSeries","hideSeries","highlightSeries","isSeriesHidden","zoomX","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","dataURI","exportToCSV"];function bo(x){const t={};
1381return mo.forEach(e=>{typeof x[e]=="function"&&(t[e]=x[e].bind(x))}),Object.freeze(t)}function yo(x,t){const e=i=>(i&&x.add(i),i),s={get node(){return x.node},path(i={}){const{d:a="",stroke:n="#000",width:r=1,fill:o="none",opacity:l=1,dash:c=0,className:h=""}=i;return e(t.drawPath({d:a,stroke:n,strokeWidth:r,fill:o,fillOpacity:o==="none"?0:l,strokeOpacity:l,strokeDashArray:c,classes:h}))},line(i={}){const{x1:a,y1:n,x2:r,y2:o,stroke:l="#000",width:c=1,dash:h=0}=i;return e(t.drawLine(a,n,r,o,l,h,c))},rect(i={}){const{x:a=0,y:n=0,w:r=0,h:o=0,r:l=0,fill:c="#000",stroke:h=null,opacity:d=1}=i;return e(t.drawRect(a,n,r,o,l,c,d,h!=null?1:null,h))},circle(i={}){const{cx:a=0,cy:n=0,r=0,fill:o="#000",stroke:l=null}=i;return e(t.drawCircle(r,{cx:a,cy:n,fill:o,stroke:l||"none"}))},text(i={}){const{x:a=0,y:n=0,text:r="",color:o,size:l,anchor:c="start",weight:h}=i;return e(t.drawText({x:a,y:n,text:r,textAnchor:c,fontSize:l,foreColor:o,fontWeight:h}))},clear(){const i=x.node;for(;i.firstChild;)i.removeChild(i.firstChild);return s}};return s}function wo(x,t){const e=x.ctx,s=x.w,i={name:t.def.name,version:As,get options(){return t.options},on(a,n){const r=t.handlers;return r.has(a)||r.set(a,[]),r.get(a).push(n),i},off(a,n){const r=t.handlers.get(a);if(r){const o=r.indexOf(n);o>-1&&r.splice(o,1)}return i},store:{},layer(a){return x._layer(t.def.name,a||{})},get scales(){return x._currentScales},get data(){return x._lastData||(x._lastData=x._dataSnapshot())},theme:Object.freeze({get mode(){return s.config.theme.mode},get foreColor(){return s.config.chart.foreColor},seriesColor(a){return s.globals.colors[a]},token(a){return x._token(a)}}),chart:bo(e),emit(a,n){e.events.fireEvent(`plugin:${t.def.name}:${a}`,[e,n])},get el(){return s.dom.baseEl}};return Object.freeze(i)}class vo{constructor(t,e){this.w=t,this.ctx=e,this.active=[],this._layers=new Map,this._currentScales=null,this._lastPluginsRef=null,this._lastData=null,this._updatedWired=!1,this._onUpdated=this._onUpdated.bind(this),this._init()}_init(){(this.w.config.plugins||[]).map((e,s)=>({entry:e,order:e.order!=null?e.order:s})).sort((e,s)=>e.order-s.order).forEach(e=>this._activate(e.entry)),this._lastPluginsRef=this.w.config.plugins,this._wireUpdated()}_wireUpdated(){this._updatedWired||(this.ctx.addEventListener("updated",this._onUpdated),this._updatedWired=!0)}_onUpdated(){this.dispatch("afterUpdate",{pass:"update"})}_activate(t){const e=rr(t.name);if(!e){console.error(`[apexcharts] plugin "${t.name}" is not registered.`);return}const s=e.apiVersion!=null?e.apiVersion:1;if(Math.trunc(s)!==As){console.error(`[apexcharts] plugin "${e.name}" targets Weave API v${s}, host is v${As}; skipped.`);return}const i={def:e,options:Object.freeze(G({},t.options||{})),handlers:new Map,disabled:!1,failures:0,api:null};i.api=wo(this,i),this.active.push(i),this._guard(i,"setup",()=>e.setup(i.api))}dispatch(t,e){if(t==="draw"&&(this._reconcile(),this._resetLayers()),this._lastData=null,!this.active.length)return;t==="afterParse"?this._currentScales=null:e&&"xyRatios"in e&&this._setScales(e.xyRatios);const s=e&&e.pass||"full";let i=null;for(const a of this.active){if(a.disabled)continue;const n=a.handlers.get(t);if(!n||!n.length)continue;i===null&&(i=this._dataSnapshot(),this._lastData=i);const r={api:a.api,scales:this._currentScales,data:i,pass:s,hook:t};for(const o of n.slice())this._guard(a,t,()=>o(r))}}_guard(t,e,s){if(!t.disabled)try{s()}catch(i){console.error(`[apexcharts] plugin "${t.def.name}" threw in "${e}":`,i),t.failures=(t.failures||0)+1,t.failures>=3&&(t.disabled=!0,console.error(`[apexcharts] plugin "${t.def.name}" disabled after repeated errors.`))}}_setScales(t){const e=this.w,s=e.globals,i=e.layout;if(!t||!s.axisCharts){this._currentScales=null;return}const a=t.xRatio,n=t.yRatio||[],r=c=>n[c]!=null?n[c]:n[0],o=c=>s.maxYArr[c]!=null?s.maxYArr[c]:s.maxY,l=c=>s.minYArr[c]!=null?s.minYArr[c]:s.minY;this._currentScales={x:c=>i.translateX+(c-s.minX)/a,y:(c,h=0)=>i.translateY+(o(h)-c)/r(h),domainX:[s.minX,s.maxX],domainY:(c=0)=>[l(c),o(c)],gridWidth:i.gridWidth,gridHeight:i.gridHeight,ratios:t}}_dataSnapshot(){const t=this.w,e=t.globals,s=t.seriesData.series||[],i=t.seriesData.seriesX||[];return s.map((a,n)=>{const r=i[n]||[],o=(a||[]).map((l,c)=>({x:r[c]!=null?r[c]:c,y:l}));return{name:e.seriesNames?e.seriesNames[n]:void 0,hidden:(e.collapsedSeriesIndices||[]).includes(n),color:e.colors?e.colors[n]:void 0,points:o}})}_token(t){const e=this.w,s=e.globals;switch(t){case"foreColor":return e.config.chart.foreColor;case"background":return e.config.chart.background;case"accent":case"primary":return s.colors?s.colors[0]:void 0;default:return/^series-\d+$/.test(t)&&s.colors?s.colors[Number(t.split("-")[1])]:void 0}}_layer(t,{z:e="front",className:s=""}={}){let i=this._layers.get(t);if(!i){i=this.ctx.graphics.group({class:`apexcharts-plugin-${t} ${s}`.trim()});const a=this.w.dom.elGraphical.node;e==="behind"?a.insertBefore(i.node,a.firstChild):a.appendChild(i.node),i.node.setAttribute("aria-hidden","true"),this._layers.set(t,i)}return yo(i,this.ctx.graphics)}_resetLayers(){const t=this.w.dom.elGraphical,e=t&&t.node;if(e){const s=e.querySelectorAll('g[class*="apexcharts-plugin-"]');Array.prototype.forEach.call(s,i=>i.remove())}this._layers.clear()}_reconcile(){const t=this.w.config.plugins||[];if(t===this._lastPluginsRef)return;this._lastPluginsRef=t;const e=new Map(t.map((a,n)=>[a.name,{entry:a,order:a.order!=null?a.order:n}]));for(let a=this.active.length-1;a>=0;a--){const n=this.active[a],r=e.get(n.def.name);r?n.options=Object.freeze(G({},r.entry.options||{})):(this._guard(n,"destroy",()=>n.def.destroy&&n.def.destroy(n.api)),this.active.splice(a,1))}const s=new Set(this.active.map(a=>a.def.name)),i=[];e.forEach((a,n)=>{s.has(n)||i.push(a)}),i.sort((a,n)=>a.order-n.order).forEach(a=>this._activate(a.entry))}teardown(t){if(!t){this.dispatch("destroy");for(const e of this.active)this._guard(e,"destroy",()=>e.def.destroy&&e.def.destroy(e.api));this.active=[],this._updatedWired&&(this.ctx.removeEventListener&&this.ctx.removeEventListener("updated",this._onUpdated),this._updatedWired=!1)}this._layers.clear()}}lt.registerFeatures({weave:vo});const Ao={fill:"fill",stroke:"stroke","stroke-width":"strokeWidth","stroke-dasharray":"strokeDash","stroke-linecap":"lineCap","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","fill-rule":"fillRule"},it=Symbol("never"),_o={circle:0,square:1,rect:1,triangle:2,diamond:3,star:4,sparkle:5,cross:6,plus:7,line:8},vi=["circle","square","triangle","diamond","star","sparkle","cross","plus","line"],gt={attr(){return gt},plot(){return gt},during(){return gt},after(x){return typeof x=="function"&&x(),gt},animate(){return gt},delay(){return gt},loop(){return gt},finish(){return gt},stop(){return gt}}
1381,ba={nodeName:"path",style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},At={__isCanvasMark:!0,node:{nodeName:"g",instance:null,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(){},getAttribute:()=>null,removeAttribute(){},addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})},attr(){return At},add(){return At},addTo(){return At},remove(){return At},clear(){return At},css(){return At},hide(){return At},show(){return At},removeClass(){return At},animate(){return gt}};class So{constructor(t,e){this.__isCanvasMark=!0,this._g=t,this._i=e}get node(){return ba}attr(t,e){return typeof t=="string"?(t==="fill"&&e!==void 0&&this._g._setMarkerFill(this._i,e),e===void 0?null:this):(t&&t.fill!==void 0&&this._g._setMarkerFill(this._i,t.fill),this)}add(t){return this}addTo(t){return this}remove(){return this}css(t){return this}fill(t){return t!==void 0&&this._g._setMarkerFill(this._i,t),this}stroke(t){return this}hide(){return this}show(){return this}removeClass(t){return this}animate(){return gt}}const Jt={__isCanvasMark:!0,node:ba,attr(){return Jt},add(){return Jt},addTo(){return Jt},remove(){return Jt},css(){return Jt},animate(){return gt}};class Zt{constructor(t){this.__isCanvasMark=!0,this._cmd=t;const e=this;this.node={nodeName:t?t.tag:"g",instance:this,style:{},classList:{add(){},remove(){},toggle(){},contains:()=>!1},setAttribute(s,i){e._applyAttr(s,i)},getAttribute:()=>null,removeAttribute(){},hasAttribute:()=>!1,addEventListener(){},removeEventListener(){},appendChild(){},getBBox:()=>({x:0,y:0,width:0,height:0})}}_applyAttr(t,e){const s=this._cmd;if(!s)return;const i=Ao[t];i!==void 0&&(s[i]=e)}attr(t,e){if(typeof t=="string")return e===void 0?null:(this._applyAttr(t,e),this);for(const s in t)t[s]!==void 0&&this._applyAttr(s,t[s]);return this}add(t){return this}addTo(t){return this}remove(){return this}clear(){return this}css(t){return this}fill(t){return typeof t=="object"?this.attr(t):this.attr("fill",t)}stroke(t){return typeof t=="object"?(t.color!==void 0&&this.attr("stroke",t.color),t.width!==void 0&&this.attr("stroke-width",t.width),this):this.attr("stroke",t)}plot(t){return typeof t=="string"&&this._cmd&&this._cmd.tag==="path"&&(this._cmd.d=t),this}hide(){return this}show(){return this}removeClass(t){return this}bbox(){return{x:0,y:0,width:0,height:0}}animate(){return gt}}class Co{constructor(t){this.w=t,this._g=new I(t),this._list=[],this._mx=new Float64Array(16),this._my=new Float64Array(16),this._msize=new Float64Array(16),this._mshape=new Int16Array(16),this._mstyle=new Int32Array(16),this._msi=new Int32Array(16),this._mn=0,this._mcap=16,this._crx=new Float64Array(16),this._cry=new Float64Array(16),this._crw=new Float64Array(16),this._crh=new Float64Array(16),this._crstyle=new Int32Array(16),this._crsi=new Int32Array(16),this._crdi=new Int32Array(16),this._crn=0,this._crcap=16,this._cellRadius=0,this._styles=[],this._styleMap=new Map,this._lf=it,this._ls=it,this._lsw=it,this._ld=it,this._lfo=it,this._lso=it,this._lid=-1,this._lofFill=it,this._lofBase=-1,this._lofId=-1,this._rlf=it,this._rls=it,this._rlsw=it,this._rlfo=it,this._rlso=it,this._rlid=-1}_resetStyleCache(){this._lf=it,this._ls=it,this._lsw=it,this._ld=it,this._lfo=it,this._lso=it,this._lid=-1,this._lofFill=it,this._lofBase=-1,this._lofId=-1,this._rlf=it,this._rls=it,this._rlsw=it,this._rlfo=it,this._rlso=it,this._rlid=-1}reset(){this._list=[],this._mn=0,this._styles=[],this._styleMap=new Map,this._resetStyleCache();const t=this.w.config.series||[];let e=16;for(let s=0;s<t.length;s++){const i=t[s]&&t[s].data;Array.isArray(i)&&(e+=i.length)}e=Math.ceil(e*1.15)+16,e>this._mcap&&this._allocMarkers(e),this._crn=0,this._cellRadius=0,e>this._crcap&&this._allocRects(e)}_allocRects(t){this._crcap=t,this._crx=new Float64Array(t),this._cry=new Float64Array(t),this._crw=new Float64Array(t),this._crh=new Float64Array(t),this._crstyle=new Int32Array(t),this._crsi=new Int32Array(t),this._crdi=new Int32Array(t)}_growRects(){const t=this._crcap*2,e=new Float64Array(t);e.set(this._crx),this._crx=e;const s=new Float64Array(t);s.set(this._cry),this._cry=s;const i=new Float64Array(t);i.set(this._crw),this._crw=i;const a=new Float64Array(t);a.set(this._crh),this._crh=a;const n=new Int32Array(t);n.set(this._crstyle),this._crstyle=n;const r=new Int32Array(t);r.set(this._crsi),this._crsi=r;const o=new Int32Array(t);o.set(this._crdi),this._crdi=o,this._crcap=t}_allocMarkers(t){this._mcap=t,this._mx=new Float64Array(t),this._my=new Float64Array(t),this._msize=new Float64Array(t),this._mshape=new Int16Array(t),this._mstyle=new Int32Array(t),this._msi=new Int32Array(t)}_growMarkers(){const t=this._mcap*2,e=new Float64Array(t);e.set(this._mx),this._mx=e;const s=new Float64Array(t);s.set(this._my),this._my=s;const i=new Float64Array(t);i.set(this._msize),this._msize=i;const a=new Int16Array(t);a.set(this._mshape),this._mshape=a;const n=new Int32Array(t);n.set(this._mstyle),this._mstyle=n;const r=new Int32Array(t);r.set(this._msi),this._msi=r,this._mcap=t}displayList(){return this._list}markerCount(){return this._mn}_internStyle(t,e,s,i,a,n){const r=`${t}|${e}|${s}|${i}|${a}|${n}`,o=this._styleMap.get(r);if(o!==void 0)return o;const l=this._styles.length;
1381return this._styles.push({fill:t,stroke:e,strokeWidth:s,strokeDash:i,fillOpacity:a,strokeOpacity:n}),this._styleMap.set(r,l),l}_setMarkerFill(t,e){const s=this._mstyle[t];if(e===this._lofFill&&s===this._lofBase){this._mstyle[t]=this._lofId;return}const i=this._styles[s];if(!i||i.fill===e){this._lofFill=e,this._lofBase=s,this._lofId=s;return}const a=this._internStyle(e,i.stroke,i.strokeWidth,i.strokeDash,i.fillOpacity,i.strokeOpacity);this._mstyle[t]=a,this._lofFill=e,this._lofBase=s,this._lofId=a}markerStyle(t){return this._styles[this._mstyle[t]]}markerSeries(t){return this._msi[t]}shapeName(t){return vi[t]||"circle"}drawRectCell(t,e,s,i,a={}){const n=this._rectStyleId(a);this._crn>=this._crcap&&this._growRects();const r=this._crn++;return this._crx[r]=t||0,this._cry[r]=e||0,this._crw[r]=s>0?s:0,this._crh[r]=i>0?i:0,this._crstyle[r]=n,this._crsi[r]=a.seriesIndex==null?-1:a.seriesIndex,this._crdi[r]=a.dataPointIndex==null?-1:a.dataPointIndex,a.radius&&(this._cellRadius=a.radius),Jt}_rectStyleId(t){const e=t.fill,s=t.stroke,i=t.strokeWidth,a=t.fillOpacity,n=t.strokeOpacity;if(e===this._rlf&&s===this._rls&&i===this._rlsw&&a===this._rlfo&&n===this._rlso)return this._rlid;const r=this._internStyle(e,s,i,0,a,n);return this._rlf=e,this._rls=s,this._rlsw=i,this._rlfo=a,this._rlso=n,this._rlid=r,r}rectCount(){return this._crn}rectStyle(t){return this._styles[this._crstyle[t]]}rectSeries(t){return this._crsi[t]}_cmd(t,e){const s={tag:t,z:e||0,fill:void 0,stroke:void 0,strokeWidth:void 0,strokeDash:void 0,lineCap:void 0,fillOpacity:void 0,strokeOpacity:void 0,fillRule:void 0};return this._list.push(s),s}group(t){return At}drawMarker(t,e,s={}){var i;const a=this._markerStyleId(s);this._mn>=this._mcap&&this._growMarkers();const n=this._mn++;return this._mx[n]=t||0,this._my[n]=typeof e=="number"?e:NaN,this._msize[n]=s.pSize||0,this._mshape[n]=(i=_o[s.shape||"circle"])!=null?i:0,this._mstyle[n]=a,this._msi[n]=s.seriesIndex==null?-1:s.seriesIndex,new So(this,n)}_markerStyleId(t){const e=t.shape||"circle",s=e==="line"||e==="plus"||e==="cross",i=s?"none":t.pointFillColor,a=s?t.pointFillColor:t.pointStrokeColor,n=t.pointStrokeWidth,r=t.pointStrokeDashArray,o=t.pointFillOpacity,l=s?t.pointFillOpacity:t.pointStrokeOpacity;if(i===this._lf&&a===this._ls&&n===this._lsw&&r===this._ld&&o===this._lfo&&l===this._lso)return this._lid;const c=this._internStyle(i,a,n,r,o,l);return this._lf=i,this._ls=a,this._lsw=n,this._ld=r,this._lfo=o,this._lso=l,this._lid=c,c}renderPaths(t){const e=this._cmd("path",t.realIndex);return e.d=t.pathTo,t.pathToNumeric&&(e.nxs=t.pathToNumeric.xs,e.nys=t.pathToNumeric.ys,e.ncloseY=t.pathToNumeric.closeY),e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fill=t.fill,e.lineCap=t.strokeLinecap,e.si=t.realIndex,this.w.globals.animationEnded=!0,new Zt(e)}drawPath(t){const e=this._cmd("path",0);return e.d=t.d,e.stroke=t.stroke,e.strokeWidth=t.strokeWidth,e.fill=t.fill,e.fillOpacity=t.fillOpacity,e.strokeOpacity=t.strokeOpacity,e.lineCap=t.strokeLinecap,e.strokeDash=t.strokeDashArray,new Zt(e)}drawLine(t,e,s,i,a="#a8a8a8",n=0,r=1){const o=this._cmd("line",0);return o.lx1=t,o.ly1=e,o.lx2=s,o.ly2=i,o.stroke=a,o.strokeDash=n,o.strokeWidth=r,new Zt(o)}drawRect(t=0,e=0,s=0,i=0,a=0,n="#fefefe",r=1,o=null,l=null,c=0){const h=this._cmd("rect",0);return h.x1=t,h.y1=e,h.rw=s>0?s:0,h.rh=i>0?i:0,h.radius=a,h.fill=n,h.fillOpacity=r,l!=null&&(h.stroke=l,h.strokeWidth=o??1,h.strokeDash=c),new Zt(h)}drawCircle(t,e=null){const s=this._cmd("circle",0);return s.r=t<0?0:t,e&&(s.cx=e.cx,s.cy=e.cy,e.fill!==void 0&&(s.fill=e.fill),e.stroke!==void 0&&(s.stroke=e.stroke)),new Zt(s)}drawText(t){const e=this._cmd("text",0);return e.text=Array.isArray(t.text)?t.text.join(" "):t.text,e.tx=t.x,e.ty=t.y,e.textAnchor=t.textAnchor||"start",e.fontSize=t.fontSize,e.fontFamily=t.fontFamily,e.fill=t.foreColor,new Zt(e)}markerPath(t,e,s,i){return this._g.getMarkerPath(t,e,vi[s]||"circle",i)}}const Ai=Math.PI*2,_i=2;class ko{constructor(t){this.w=t,this._host=null,this._canvas=null,this._c2d=null,this._margin=0,this._dpr=1,this._dim=null,this._alpha=1,this._unitPaths=new Map,this._markerBatches=0}markerBatchCount(){return this._markerBatches}_seriesAlpha(t){const e=this._dim;return!e||e.active==null||e.active<0||t==null||t<0||t===e.active?1:e.opacity==null?.2:e.opacity}_plotDims(){var t;const e=Math.max(0,Math.ceil(this.w.layout.gridWidth||0)),s=Math.max(0,Math.ceil(this.w.layout.gridHeight||0)),i=((t=this.w.globals.markers)==null?void 0:t.largestSize)||0,a=Math.ceil(i+8);return{gw:e,gh:s,margin:a}}createHost(){const t=B.getWindow();this._dpr=Math.min(_i,t&&t.devicePixelRatio||1);const{gw:e,gh:s,margin:i}=this._plotDims();this._margin=i;const a=e+i*2,n=s+i*2,r=B.createElementNS(tt,"foreignObject");r.setAttribute("x",String(-i)),r.setAttribute("y",String(-i)),r.setAttribute("width",String(a)),r.setAttribute("height",String(n)),r.setAttribute("class","apexcharts-canvas-series"),r.style.overflow="visible";const o=B.createElement("canvas");return o.setAttribute("class","apexcharts-series-canvas"),o.width=Math.max(1,Math.round(a*this._dpr)),o.height=Math.max(1,Math.round(n*this._dpr)),o.style.width=a+"px",o.style.height=n+"px",o.style.pointerEvents="none",r.appendChild(o),this._canvas=o,this._c2d=o.getContext("2d"),this._host=new ot(r),this._host}getHost(){return this._host}clear(){!this._c2d||!this._canvas||(this._c2d.setTransform(1,0,0,1,0,0),this._c2d.clearRect(0,0,this._canvas.width,this._canvas.height))}_syncDpr(){if(!this._canvas)return;const t=B.getWindow(),e=Math.min(_i,t&&t.devicePixelRatio||1);if(e===this._dpr)return;this._dpr=e;const s=parseFloat(this._canvas.style.width)||0,i=parseFloat(this._canvas.style.height)||0;this._canvas.width=Math.max(1,Math.round(s*e)),this._canvas.height=Math.max(1,Math.round(i*e))}paint(t,e,s=null){const i=this._c2d;if(!i)return;this._dim=s||null,this._syncDpr(),this.clear();const a=this._dpr,n=this._margin;if(i.setTransform(a,0,0,a,n*a,n*a),t.length){const r=t.length>1?t.map((o,l)=>[o,l]).sort((o,l)=>o[0].z===l[0].z?o[1]-l[1]:o[0].z-l[0].z).map(o=>o[0]):t;
1381for(let o=0;o<r.length;o++){const l=r[o];this._alpha=this._dim?this._seriesAlpha(l.si):1,this._paintOne(i,l)}}this._paintRects(i,e),this._paintMarkers(i,e),this._alpha=1}_paintRects(t,e){const s=e.rectCount?e.rectCount():0;if(!s)return;const i=e._crx,a=e._cry,n=e._crw,r=e._crh,o=e._crstyle,l=e._cellRadius||0,c=t,h=l>0&&typeof c.roundRect=="function",d=!!this._dim,f=Math.max(0,this.w.layout.gridWidth||0),u=Math.max(0,this.w.layout.gridHeight||0);t.save(),t.beginPath(),t.rect(0,0,f,u),t.clip();let g=0;for(;g<s;){const p=o[g],b=e.rectStyle(g);if(!b){g++;continue}const m=b.fill,A=m&&m!=="none"&&!(typeof m=="string"&&m.indexOf("url(")===0),v=b.stroke,y=b.strokeWidth==null?0:Number(b.strokeWidth),w=v&&v!=="none"&&y>0&&!(typeof v=="string"&&v.indexOf("url(")===0);A&&(t.fillStyle=m),w&&(t.strokeStyle=v,t.lineWidth=y,t.setLineDash([]));const _=b.fillOpacity==null?1:Number(b.fillOpacity),C=b.strokeOpacity==null?1:Number(b.strokeOpacity);let S=g;for(;S<s&&o[S]===p;){const k=n[S],M=r[S];if(k>0&&M>0){const L=d?this._seriesAlpha(e.rectSeries(S)):1;h?(t.beginPath(),c.roundRect(i[S],a[S],k,M,l),A&&(t.globalAlpha=_*L,t.fill()),w&&(t.globalAlpha=C*L,t.stroke())):(A&&(t.globalAlpha=_*L,t.fillRect(i[S],a[S],k,M)),w&&(t.globalAlpha=C*L,t.strokeRect(i[S],a[S],k,M)))}S++}g=S}t.globalAlpha=1,t.restore()}_unitPath(t,e,s){const i=e+"|"+s;let a=this._unitPaths.get(i);if(a===void 0){try{a=new Path2D(t.markerPath(0,0,e,s))}catch{a=null}this._unitPaths.set(i,a)}return a}_paintMarkers(t,e){this._markerBatches=0;const s=e.markerCount();if(!s)return;const i=e._mx,a=e._my,n=e._msize,r=e._mshape,o=e._mstyle,l=!!this._dim;l||(this._alpha=1);let c=0;for(;c<s;){const h=o[c],d=r[c],f=e.markerStyle(c);if(!f){c++;continue}const u=this._applyFill(t,f),g=this._applyStroke(t,f);this._markerBatches++;const p=f.fillOpacity==null?1:Number(f.fillOpacity),b=f.strokeOpacity==null?1:Number(f.strokeOpacity);if(d===0){let m=c;for(;m<s&&r[m]===0&&o[m]===h;){const A=n[m]||0,v=a[m];if(A>0&&v===v)if(t.beginPath(),t.arc(i[m],v,A,0,Ai),l){const y=this._seriesAlpha(e.markerSeries(m));u&&(t.globalAlpha=p*y,t.fill()),g&&(t.globalAlpha=b*y,t.stroke())}else u&&t.fill(),g&&t.stroke();m++}t.globalAlpha=1,c=m}else{const m=this._dpr,A=this._margin;let v=c;for(;v<s&&r[v]===d&&o[v]===h;){const y=a[v],w=n[v];if(y===y&&w>0){const _=this._unitPath(e,d,w);if(_){t.setTransform(m,0,0,m,(A+i[v])*m,(A+y)*m);const C=l?this._seriesAlpha(e.markerSeries(v)):1;u&&(t.globalAlpha=p*C,t.fill(_)),g&&(t.globalAlpha=b*C,t.stroke(_))}}v++}t.setTransform(m,0,0,m,A*m,A*m),t.globalAlpha=1,c=v}}}_paintNumericPath(t,e){const s=e.nxs,i=e.nys,a=s.length;if(a){t.beginPath(),t.moveTo(s[0],i[0]);for(let n=1;n<a;n++)t.lineTo(s[n],i[n]);e.ncloseY!=null&&(t.lineTo(s[a-1],e.ncloseY),t.lineTo(s[0],e.ncloseY),t.closePath()),this._applyFill(t,e)&&t.fill(e.fillRule==="evenodd"?"evenodd":"nonzero"),this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}}_paintOne(t,e){switch(e.tag){case"path":{if(e.nxs){this._paintNumericPath(t,e);break}if(!e.d)return;if(!e.path2d)try{e.path2d=new Path2D(e.d)}catch{return}this._fillStrokePath(t,e,e.path2d);break}case"rect":{const s=new Path2D;e.radius&&typeof s.roundRect=="function"?s.roundRect(e.x1,e.y1,e.rw,e.rh,e.radius):s.rect(e.x1,e.y1,e.rw,e.rh),this._fillStrokePath(t,e,s);break}case"circle":{if(!(e.r>0))return;t.beginPath(),t.arc(e.cx,e.cy,e.r,0,Ai),this._fillStroke(t,e);break}case"line":{t.beginPath(),t.moveTo(e.lx1,e.ly1),t.lineTo(e.lx2,e.ly2),this._strokeOnly(t,e);break}case"text":{if(e.text==null)return;t.save(),t.globalAlpha=this._alpha,t.fillStyle=e.fill||"#000";const s=e.fontSize||"11px";t.font=`${typeof s=="number"?s+"px":s} ${e.fontFamily||"Helvetica, Arial, sans-serif"}`,t.textAlign=e.textAnchor==="middle"?"center":e.textAnchor==="end"?"right":"left",t.fillText(String(e.text),e.tx,e.ty),t.restore();break}}}_fillStrokePath(t,e,s){this._applyFill(t,e)&&t.fill(s,e.fillRule==="evenodd"?"evenodd":"nonzero"),this._applyStroke(t,e)&&t.stroke(s),t.globalAlpha=1}_fillStroke(t,e){this._applyFill(t,e)&&t.fill(),this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}_strokeOnly(t,e){this._applyStroke(t,e)&&t.stroke(),t.globalAlpha=1}_applyFill(t,e){const s=e.fill;return!s||s==="none"||typeof s=="string"&&s.indexOf("url(")===0?!1:(t.globalAlpha=(e.fillOpacity==null?1:Number(e.fillOpacity))*this._alpha,t.fillStyle=s,!0)}_applyStroke(t,e){const s=e.stroke,i=e.strokeWidth==null?1:Number(e.strokeWidth);if(!s||s==="none"||!(i>0)||typeof s=="string"&&s.indexOf("url(")===0)return!1;t.globalAlpha=(e.strokeOpacity==null?1:Number(e.strokeOpacity))*this._alpha,t.strokeStyle=s,t.lineWidth=i,t.lineCap=e.lineCap||"butt";const a=e.strokeDash;return a&&a!==0?t.setLineDash(Array.isArray(a)?a:[Number(a)]):t.setLineDash([]),!0}toDataURL(){return this._canvas?this._canvas.toDataURL():null}destroy(){this._host=null,this._canvas=null,this._c2d=null,this._unitPaths.clear()}}class Mo{constructor(t,e){this.w=t,this.ctx=e,this.kind="canvas",this._g=new Co(t),this._compositor=new ko(t)}beginSeries(){this._g.reset()}present(){const t=this._compositor.createHost();return this._compositor.paint(this._g.displayList(),this._g),t}clear(){this._compositor.clear()}canRepaintInPlace(){const t=this._compositor.getHost();return!!(t&&t.node&&t.node.isConnected)}repaintInPlace(){this._compositor.paint(this._g.displayList(),this._g)}group(t){return this._g.group(t)}drawPath(t){return this._g.drawPath(t)}drawLine(...t){return this._g.drawLine(...t)}drawRect(...t){return this._g.drawRect(...t)}drawRectCell(t,e,s,i,a){return this._g.drawRectCell(t,e,s,i,a)}drawCircle(t,e){return this._g.drawCircle(t,e)}drawMarker(t,e,s){return this._g.drawMarker(t,e,s)}renderPaths(t){return this._g.renderPaths(t)}drawText(t){return this._g.drawText(t)}supports(t){return t==="solidFill"||t==="dashArray"}hitTest(t,e){const s=this._g,i=s.rectCount?s.rectCount():0;if(!i)return null;const a=s._crx,n=s._cry,r=s._crw,o=s._crh;for(let l=i-1;l>=0;l--){const c=r[l],h=o[l];if(!(c<=0||h<=0)&&t>=a[l]&&t<a[l]+c&&e>=n[l]&&e<n[l]+h)return{seriesIndex:s._crsi[l],dataPointIndex:s._crdi[l],x:a[l],y:n[l],width:c,height:h}}return null}restyle(t){this._compositor.paint(this._g.displayList(),this._g,t||null)}toBitmap(){const t=this._compositor.toDataURL();if(!t)return null;const e=this.w.globals,s=this.w.config.chart,i=this._compositor._margin;return{dataURL:t,x:(e.translateX||0)+(s.offsetX||0)-i,y:(e.translateY||0)+(s.offsetY||0)-i,w:(this.w.layout.gridWidth||0)+i*2,h:(this.w.layout.gridHeight||0)+i*2}}destroy(){this._compositor.destroy()}}lt.registerRenderer("canvas",(x,t)=>new Mo(x,t));function Lo(x,t){const e=class{constructor(i,a,n){this.w=i,this.ctx=a,this.xyRatios=n,this._warned=!1}draw(i,a,n){var r,o;
1381const l=this.w,c=new I(l,this.ctx),h=Gt(this.ctx,c),d=c.group({class:"apexcharts-marks-series"});return i.forEach((f,u)=>{var g;const p=Array.isArray(n)?n[u]:u,b=c.group({class:"apexcharts-series",rel:p+1,seriesName:R.escapeString(l.seriesData.seriesNames[p]),"data:realIndex":p}),m=this._scales(p,(l.seriesData.series[p]||[]).length),A=l.globals.colors[p],v=((g=l.config.series[p])==null?void 0:g.data)||[],y=l.seriesData.seriesX[p]||[],w=l.seriesData.series[p]||[];l.globals.seriesXvalues[p]=[],l.globals.seriesYvalues[p]=[],typeof l.globals.pointsArray[p]>"u"&&(l.globals.pointsArray[p]=[]);for(let _=0;_<w.length;_++){const C=w[_];if(C===null||typeof C>"u")continue;const S=y[_],k=m.xAt(_,S),M=m.y(C),L=this._api(h,b,p,_);try{t.renderItem({datum:v[_],x:k,y:M,scales:m,api:L,seriesIndex:p,dataPointIndex:_,color:A})}catch(E){this._warned||(console.warn(`[apexcharts] renderItem for series type "${x}" threw; skipping datum:`,E),this._warned=!0)}l.globals.seriesXvalues[p][_]=k,l.globals.seriesYvalues[p][_]=M,l.globals.pointsArray[p][_]=[k,M]}c.setupEventDelegation(b,".apexcharts-marks-mark"),d.add(b)}),(o=(r=this.ctx.animations)==null?void 0:r.animationCompleted)==null||o.call(r,d),d}_scales(i,a){var n,r,o,l;const c=this.w.globals,h=this.w.config,d=this.xyRatios.xRatio,f=this.xyRatios.yRatio,u=(r=(n=c.seriesYAxisReverseMap)==null?void 0:n[i])!=null?r:0,g=Array.isArray(f)?(o=f[u])!=null?o:f[0]:f,p=c.maxYArr,b=Array.isArray(p)&&p.length&&(l=p[u])!=null?l:c.maxY,m=c.gridWidth,A=c.gridHeight,v=!c.isXNumeric,y=a||c.dataPoints||1,w=y>0?m/y:m,_=h.xaxis.tickPlacement==="on",C=E=>d?(E-c.minX)/d:m/2,S=E=>(b-E)/g,k=(E,D)=>v?_&&y>1?E/(y-1)*m:(E+.5)*w:C(D),M=c.minXDiff||1,L=v?w:d?M/d:m;return{x:C,xAt:k,y:S,gridWidth:m,gridHeight:A,band:L}}_api(i,a,n,r){const o=l=>{if(l){try{l.node.setAttribute("index",String(n)),l.node.setAttribute("j",String(r)),l.node.classList.add("apexcharts-marks-mark")}catch{}a.add(l)}return l};return{path:(l={})=>{var c,h,d,f,u,g,p,b,m;return o(i.drawPath({d:l.d||"",stroke:(c=l.stroke)!=null?c:"#000",strokeWidth:(d=(h=l.width)!=null?h:l.strokeWidth)!=null?d:1,fill:(f=l.fill)!=null?f:"none",fillOpacity:(g=l.fillOpacity)!=null?g:l.fill&&l.fill!=="none"?(u=l.opacity)!=null?u:1:0,strokeOpacity:(b=(p=l.strokeOpacity)!=null?p:l.opacity)!=null?b:1,strokeDashArray:(m=l.dash)!=null?m:0,strokeLinecap:l.lineCap}))},line:(l={})=>{var c,h,d,f;return o(i.drawLine(l.x1,l.y1,l.x2,l.y2,(c=l.stroke)!=null?c:"#000",(h=l.dash)!=null?h:0,(f=(d=l.width)!=null?d:l.strokeWidth)!=null?f:1))},rect:(l={})=>{var c,h,d,f,u,g,p,b;return o(i.drawRect((c=l.x)!=null?c:0,(h=l.y)!=null?h:0,(d=l.w)!=null?d:0,(f=l.h)!=null?f:0,(u=l.r)!=null?u:0,(g=l.fill)!=null?g:"#000",(p=l.opacity)!=null?p:1,l.stroke!=null?(b=l.strokeWidth)!=null?b:1:null,l.stroke))},circle:(l={})=>{var c,h,d,f,u;return o(i.drawCircle((c=l.r)!=null?c:0,{cx:(h=l.cx)!=null?h:0,cy:(d=l.cy)!=null?d:0,fill:(f=l.fill)!=null?f:"#000",stroke:l.stroke||"none","stroke-width":(u=l.strokeWidth)!=null?u:l.stroke?1:0}))},text:(l={})=>{var c,h,d,f;return o(i.drawText({x:(c=l.x)!=null?c:0,y:(h=l.y)!=null?h:0,text:(d=l.text)!=null?d:"",textAnchor:(f=l.anchor)!=null?f:"start",fontSize:l.size,foreColor:l.color,fontWeight:l.weight}))}}}};return e.dataType=t.dataType||"xy",e.yExtent=typeof t.yExtent=="function"?t.yExtent:null,e}lt._customSeriesFactory=Lo;const Do="(prefers-color-scheme: dark)",Eo="(prefers-contrast: more)";class te{constructor(t,e){if(this.w=t,this.ctx=e,t.config.theme.follow!=="os"||!H.isBrowser())return;const s=this._ensureMedia();s&&(this._applyToConfig(s),this._ensureListeners(s))}_ensureMedia(){if(!this.ctx._osThemeMedia){const t=B.matchMedia(Do),e=B.matchMedia(Eo);if(!t&&!e)return null;this.ctx._osThemeMedia={dark:t,contrast:e,handler:null}}return this.ctx._osThemeMedia}_applyToConfig(t){const e=this.w.config.theme;t.dark&&(e.mode=t.dark.matches?"dark":"light"),t.contrast&&t.contrast.matches&&(e.accessibility=e.accessibility||{},e.accessibility.colorBlindMode="highContrast")}_ensureListeners(t){if(t.handler)return;const e=this.ctx,s=()=>{const i=e._osThemeMedia;if(!i)return;
1381const a={mode:i.dark&&i.dark.matches?"dark":"light"};i.contrast&&i.contrast.matches?a.accessibility={colorBlindMode:"highContrast"}:a.accessibility={colorBlindMode:""},e.updateOptions({theme:a},!1,!0,!1)};te._add(t.dark,s),te._add(t.contrast,s),t.handler=s}teardown(){const t=this.ctx._osThemeMedia;t&&(t.handler&&(te._remove(t.dark,t.handler),te._remove(t.contrast,t.handler)),this.ctx._osThemeMedia=null)}static _add(t,e){t&&(typeof t.addEventListener=="function"?t.addEventListener("change",e):typeof t.addListener=="function"&&t.addListener(e))}static _remove(t,e){t&&(typeof t.removeEventListener=="function"?t.removeEventListener("change",e):typeof t.removeListener=="function"&&t.removeListener(e))}}lt.registerFeatures({osThemeWatcher:te});const ts="__apexcharts_crossfilters__";function Ot(x){if(!Number.isFinite(x))return x;const t=Number(x.toPrecision(12));return Object.is(t,-0)?0:t}function zt(x){return typeof x=="number"&&Number.isFinite(x)}function Ro(x){if(typeof x=="function")return x;if(x&&typeof x=="object"){if(typeof x.sum=="string"){const t=x.sum;return e=>e.reduce((s,i)=>s+(Number(i[t])||0),0)}if(typeof x.avg=="string"){const t=x.avg;return e=>e.length?e.reduce((s,i)=>s+(Number(i[t])||0),0)/e.length:0}if(typeof x.min=="string"){const t=x.min;return e=>e.length?Math.min(...e.map(s=>Number(s[t])||0)):0}if(typeof x.max=="string"){const t=x.max;return e=>e.length?Math.max(...e.map(s=>Number(s[t])||0)):0}}return t=>t.length}function _s(x,t){return typeof t=="function"?x.slice().sort(t):t==="asc"?x.slice().sort((e,s)=>e>s?1:e<s?-1:0):t==="desc"?x.slice().sort((e,s)=>e<s?1:e>s?-1:0):x}function To(x,t,e){const s=new Set,i=[];for(let a=0;a<x.length;a++){const n=t(x[a]);n!=null&&(s.has(n)||(s.add(n),i.push(n)))}return _s(i,e)}function Po(x,t,e){const s=new Set,i=new Set,a=[],n=[];for(let r=0;r<x.length;r++){const o=t(x[r]);if(!o)continue;const l=o[0],c=o[1];l!=null&&!s.has(l)&&(s.add(l),a.push(l)),c!=null&&!i.has(c)&&(i.add(c),n.push(c))}return{xLabels:_s(a,e),yLabels:_s(n,e)}}function Fo(x,t,e){if(e&&Array.isArray(e.thresholds)&&e.thresholds.length>=2){const o=Array.from(new Set(e.thresholds.filter(zt))).sort((l,c)=>l-c);return o.length>=2?o.map(Ot):[0,1]}let s=1/0,i=-1/0;for(let o=0;o<x.length;o++){const l=t(x[o]);zt(l)&&(l<s&&(s=l),l>i&&(i=l))}if(s===1/0)return[0,1];if(s===i){const o=Math.abs(s)>0?Math.abs(s):1;return[Ot(s),Ot(s+o)]}if(e&&zt(e.width)&&e.width>0){const o=e.width,l=Math.floor(s/o)*o;let c=Math.ceil(i/o)*o;c<=l&&(c=l+o);const h=Math.max(1,Math.round((c-l)/o)),d=new Array(h+1);for(let f=0;f<=h;f++)d[f]=Ot(l+f*o);return d}const a=e&&zt(e.count)&&e.count>=1?Math.floor(e.count):30,n=(i-s)/a,r=new Array(a+1);for(let o=0;o<=a;o++)r[o]=Ot(s+o*n);return r[a]=Ot(i),r}function Xo(x,t){if(!zt(x))return-1;const e=t.length-1;if(x<t[0]||x>t[e])return-1;if(x===t[e])return e-1;for(let s=0;s<e;s++)if(x>=t[s]&&x<t[s+1])return s;return-1}function Si(x){const t=[];for(let e=0;e<x.length-1;e++)t.push(Ot((x[e]+x[e+1])/2));return t}class Rt{constructor(t,e){this.id=t,this.records=Array.isArray(e)?e:[],this.dims=new Map,this._listeners=new Map}static _store(){const t=globalThis;return t[ts]||(t[ts]=new Map),t[ts]}static getOrCreate(t){if(!t||typeof t.id!="string")throw new Error("ApexCharts.crossfilter requires an { id } string.");const e=Rt._store();let s=e.get(t.id);return s?(t.records&&s.setRecords(t.records),s):(s=new Rt(t.id,t.records),e.set(t.id,s),s)}static get(t){return Rt._store().get(t)||null}setRecords(t){return this.records=Array.isArray(t)?t:[],this.dims.forEach(e=>this._recomputeDomain(e)),this._emit("records",this.state()),this._emit("change",this.state()),this}registerDimension(t,e){if(!e||typeof e.dimension!="function")throw new Error(`crossfilter.registerDimension("${t}") needs a dimension function.`);const s=e.type||(e.bins?"range":"category"),i={accessor:e.dimension,reducer:Ro(e.reduce),type:s,bins:e.bins,order:e.order,filter:null,labels:[],edges:null};return this.dims.set(t,i),this._recomputeDomain(i),e.filter!=null&&this._setFilterOn(i,e.filter),this}hasDimension(t){return this.dims.has(t)}removeDimension(t){const e=this.dims.get(t),s=e?this._hasFilter(e):!1;return this.dims.delete(t),s&&this._emit("change",this.state()),this}_recomputeDomain(t){if(t.type==="matrix"){const e=Po(this.records,t.accessor,t.order);t.xLabels=e.xLabels,t.yLabels=e.yLabels,t.edges=null;return}if(t.type==="range")t.edges=Fo(this.records,t.accessor,t.bins),t.labels=Si(t.edges);else if(t.labels=To(this.records,t.accessor,t.order),t.edges=null,t.filter instanceof Set){const e=new Set(t.labels);Array.from(t.filter).forEach(s=>{e.has(s)||t.filter.delete(s)})}}filter(t,e){const s=this.dims.get(t);return s?(this._setFilterOn(s,e),this._emit("change",this.state()),this):this}toggleKey(t,e){const s=this.dims.get(t);if(!s||s.type!=="category")return this;s.filter instanceof Set||(s.filter=new Set);const i=s.filter;return i.has(e)?i.delete(e):i.add(e),i.size===0&&(s.filter=null),this._emit("change",this.state()),this}_setFilterOn(t,e){if(e==null){t.filter=null;return}if(t.type==="range"){Array.isArray(e)&&e.length===2&&e.every(zt)?t.filter=[Math.min(e[0],e[1]),Math.max(e[0],e[1])]:t.filter=null;return}const s=e instanceof Set?new Set(e):new Set(e);t.filter=s.size?s:null}clear(t){const e=this.dims.get(t);return e&&(e.filter=null),this._emit("change",this.state()),this}
1381reset(){return this.dims.forEach(t=>{t.filter=null}),this._emit("change",this.state()),this}_hasFilter(t){return t.filter==null?!1:t.filter instanceof Set?t.filter.size>0:!0}_passes(t,e){if(!this._hasFilter(t))return!0;const s=t.accessor(e);return t.filter instanceof Set?t.filter.has(s):zt(s)?s>=t.filter[0]&&s<=t.filter[1]:!1}filteredRecords(t){const e=[];return this.dims.forEach((s,i)=>{i!==t&&this._hasFilter(s)&&e.push(s)}),e.length===0?this.records:this.records.filter(s=>e.every(i=>this._passes(i,s)))}filteredRows(){return this.filteredRecords(null)}aggregateFor(t){const e=this.dims.get(t);if(!e)return{type:"category",labels:[],values:[],keys:[]};const s=this.filteredRecords(t);if(e.type==="matrix"){const a=new Map(e.xLabels.map((o,l)=>[o,l])),n=new Map(e.yLabels.map((o,l)=>[o,l])),r=e.yLabels.map(()=>e.xLabels.map(()=>[]));for(let o=0;o<s.length;o++){const l=e.accessor(s[o]);if(!l)continue;const c=a.get(l[0]),h=n.get(l[1]);c!=null&&h!=null&&r[h][c].push(s[o])}return{type:"matrix",xLabels:e.xLabels.slice(),yLabels:e.yLabels.slice(),matrix:r.map(o=>o.map(l=>e.reducer(l)))}}if(e.type==="range"){const a=e.edges||[0,1],n=a.length-1,r=Array.from({length:n},()=>[]);for(let o=0;o<s.length;o++){const l=Xo(e.accessor(s[o]),a);l>=0&&r[l].push(s[o])}return{type:"range",labels:Si(a),values:r.map(o=>e.reducer(o)),keys:r.map((o,l)=>[a[l],a[l+1]]),edges:a}}const i=new Map;e.labels.forEach(a=>i.set(a,[]));for(let a=0;a<s.length;a++){const n=e.accessor(s[a]),r=i.get(n);r&&r.push(s[a])}return{type:"category",labels:e.labels.slice(),values:e.labels.map(a=>e.reducer(i.get(a)||[])),keys:e.labels.slice()}}aggregateAll(){const t={};return this.dims.forEach((e,s)=>{t[s]=this.aggregateFor(s)}),t}state(){const t={};return this.dims.forEach((e,s)=>{this._hasFilter(e)&&(t[s]=e.filter instanceof Set?Array.from(e.filter):e.filter.slice())}),{filters:t,filteredCount:this.filteredRows().length,total:this.records.length}}filterOf(t){const e=this.dims.get(t);return!e||!this._hasFilter(e)?null:e.filter instanceof Set?new Set(e.filter):e.filter.slice()}on(t,e){let s=this._listeners.get(t);return s||(s=new Set,this._listeners.set(t,s)),s.add(e),()=>this.off(t,e)}off(t,e){var s;return(s=this._listeners.get(t))==null||s.delete(e),this}_emit(t,e){var s;(s=this._listeners.get(t))==null||s.forEach(i=>{try{i(e)}catch(a){console.error(a)}})}_esc(t){return String(t??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}_resolveColumns(t){if(Array.isArray(t)&&t.length)return t.map(i=>typeof i=="string"?{field:i,label:i}:{field:i.field,label:i.label||i.field,format:i.format});const e=this.records[0];return(e?Object.keys(e):[]).map(i=>({field:i,label:i}))}_tableHTML(t,e,s){const i="<thead><tr>"+t.map(r=>`<th>${this._esc(r.label)}</th>`).join("")+"</tr></thead>",a="<tbody>"+e.map(r=>"<tr>"+t.map(o=>{const l=r[o.field],c=o.format?o.format(l,r):l;return`<td>${this._esc(c)}</td>`}).join("")+"</tr>").join("")+"</tbody>";return`<table class="apexcharts-cf-table">${`<caption>${e.length} of ${s} rows</caption>`}${i}${a}</table>`}dataTable(t,e){if(!t)return{refresh(){},destroy(){}};const s=e||{},i=this._resolveColumns(s.columns),a=s.pageSize||0,n=s.page||0,r=()=>{const l=this.filteredRows(),c=a?l.slice(n*a,n*a+a):l;t.innerHTML=this._tableHTML(i,c,l.length)};r();const o=this.on("change",r);return{refresh:r,destroy:()=>{o(),t.innerHTML=""}}}
1381destroy(){Rt._store().delete(this.id),this.dims.clear(),this._listeners.clear(),this.records=[]}}const Io=[".apexcharts-bar-area",".apexcharts-candlestick-area",".apexcharts-boxPlot-area",".apexcharts-rangebar-area",".apexcharts-marker"].join(", "),No=[".apexcharts-pie-area",".apexcharts-bar-area"].join(", "),Ce="apexcharts-crossfilter-dimmed",Bo=["pie","donut","polarArea","radialBar"];class Yo{constructor(t,e){this.w=t,this.ctx=e,this._dimmed=!1,this._wired=!1,this._pending=!1,this._lastValues=null,this._onPointSelect=this._onPointSelect.bind(this),this._afterRender=this._afterRender.bind(this),this._onChange=this._onChange.bind(this),this._mode()==="filter"&&this._initEngine()}_mode(){const t=this.w.config.chart.link;return t&&typeof t.dimension=="function"?"filter":t&&t.enabled?"highlight":"off"}_enabled(){const t=this.w.config.chart.link;return!!(t&&t.enabled)}onSourceSelection(t){var e;const s=this._mode();if(s==="off"||!t||t.min==null||t.max==null)return;let i=Math.min(t.min,t.max),a=Math.max(t.min,t.max);const n=this.w.globals.minX,r=this.w.globals.maxX;if(isFinite(n)&&isFinite(r)&&r>n){const l=(r-n)*1e-6;i-n<=l&&(i=n),r-a<=l&&(a=r)}if(s==="filter"){const l=this._cf();if(!l)return;l.filter(this._chartId(),[i,a]),this._fireFilterChange(l,[i,a]);return}this._group().forEach(l=>{var c;(c=l?.linkedViews)==null||c.applyDim(i,a)});const o={xaxis:{min:i,max:a},sourceChartID:this.w.globals.chartID};typeof this.w.config.chart.events.crossFilter=="function"&&this.w.config.chart.events.crossFilter(this.ctx,o),(e=this.ctx.events)==null||e.fireEvent("crossFilter",[this.ctx,o])}_group(){const t=typeof this.ctx.getGroupedCharts=="function"?this.ctx.getGroupedCharts():[];return[this.ctx,...t]}applyDim(t,e){if(!this._enabled())return;const s=this.w,i=s.dom.baseEl;if(!i)return;const a=s.config.chart.link.dimOpacity;s.dom.elWrap&&typeof a=="number"&&s.dom.elWrap.style.setProperty("--apx-cf-dim",String(a));const n=s.globals.seriesX||[];i.querySelectorAll(Io).forEach(o=>{const l=o.getAttribute("j");if(l===null)return;const c=parseInt(l,10),h=o.getAttribute("index"),d=h===null?0:parseInt(h,10),f=n[d]||n[0];if(!f)return;const u=f[c];u!=null&&o.classList.toggle(Ce,u<t||u>e)}),this._dimmed=!0}clear(){const t=this.w.dom.baseEl;t&&(t.querySelectorAll("."+Ce).forEach(e=>e.classList.remove(Ce)),this._dimmed=!1)}clearGroup(){if(this._mode()==="filter"){const t=this._cf();t&&t.reset();return}this._group().forEach(t=>{var e;return(e=t?.linkedViews)==null?void 0:e.clear()})}_chartId(){return this.w.globals.chartID}_cf(){const t=this.w.config.chart.link,e=t&&(t.id||this.w.config.chart.group);return e?Rt.get(e):null}_isPie(){return Bo.indexOf(this.w.config.chart.type)!==-1}_isHeatmap(){return this.w.config.chart.type==="heatmap"}_initEngine(){const t=this._cf(),e=this.w.config.chart.link;if(!t){const i=e&&e.id||this.w.config.chart.group;console.warn(`[apexcharts] chart.link.dimension is set but no crossfilter coordinator "${i}" exists. Call ApexCharts.crossfilter({ id, records }) before creating the chart.`);return}const s=this._chartId();t.hasDimension(s)||t.registerDimension(s,{dimension:e.dimension,reduce:e.reduce,type:e.type||(this._isHeatmap()?"matrix":void 0),bins:e.bins,order:e.order}),this._injectSeries(t.aggregateFor(s)),this._wire(t)}_seriesFromAgg(t){if(t.type==="matrix")return t.yLabels.map((s,i)=>({name:String(s),data:t.xLabels.map((a,n)=>({x:String(a),y:t.matrix[i][n]}))}));if(this._isPie())return t.values.slice();const e=this.w.config.chart.link.seriesName||"Count";return t.type==="range"?[{name:e,data:t.labels.map((s,i)=>[s,t.values[i]])}]:[{name:e,data:t.values.slice()}]}_sigOf(t){return JSON.stringify(t.matrix||t.values)}_injectSeries(t){const e=this.w;this._lastValues=this._sigOf(t),e.config.series=this._seriesFromAgg(t),t.type!=="matrix"&&(this._isPie()?e.config.labels=t.labels.map(String):t.type==="category"?(e.config.xaxis||(e.config.xaxis={}),e.config.xaxis.categories=t.labels.map(String)):t.type==="range"&&this._pinRangeDomain(t.edges))}_pinRangeDomain(t){if(!Array.isArray(t)||t.length<2)return;const e=this.w;e.config.xaxis||(e.config.xaxis={}),e.config.xaxis.min==null&&(e.config.xaxis.min=t[0]),e.config.xaxis.max==null&&(e.config.xaxis.max=t[t.length-1])}_wire(t){this._wired||(this._wired=!0,this.ctx.addEventListener("dataPointSelection",this._onPointSelect),this.ctx.addEventListener("mounted",this._afterRender),this.ctx.addEventListener("updated",this._afterRender),t.on("change",this._onChange))}_onPointSelect(t,e,s){if(this._mode()!=="filter"||!s||s.dataPointIndex==null)return;const i=this._cf();if(!i)return;const a=this._chartId(),n=i.aggregateFor(a);if(n.type==="matrix")return;const r=n.keys[s.dataPointIndex];r!=null&&(i.toggleKey(a,r),this._fireFilterChange(i,r))}
1381_onChange(){this._mode()!=="filter"||this._pending||(this._pending=!0,Promise.resolve().then(()=>{this._pending=!1,!this.w.globals.isDestroyed&&this._applyAggregation()}))}_applyAggregation(){if(this._mode()!=="filter")return;const t=this._cf();if(!t)return;const e=t.aggregateFor(this._chartId()),s=this._sigOf(e);if(s===this._lastValues){this._applySelfDim();return}this._lastValues=s,this.ctx.updateSeries(this._seriesFromAgg(e),!0)}_afterRender(){if(this._mode()!=="filter")return;const t=this.w.config.series;if(!t||t.length===0){this._reassertSeries();return}this._applySelfDim()}_reassertSeries(){this._pending||(this._pending=!0,Promise.resolve().then(()=>{if(this._pending=!1,this.w.globals.isDestroyed)return;const t=this._cf();if(!t)return;const e=t.aggregateFor(this._chartId()),s=this._seriesFromAgg(e);s.length&&(this._lastValues=this._sigOf(e),this.ctx.updateSeries(s,!0))}))}_applySelfDim(){const t=this._cf();if(!t)return;const e=this.w,s=e.dom.baseEl;if(!s)return;const i=this._chartId(),a=t.filterOf(i),n=e.config.chart.link.dimOpacity;e.dom.elWrap&&typeof n=="number"&&e.dom.elWrap.style.setProperty("--apx-cf-dim",String(n));const r=a instanceof Set,o=Array.isArray(a),l=t.aggregateFor(i).keys;s.querySelectorAll(No).forEach(c=>{const h=c.getAttribute("j");if(h===null)return;const d=l[parseInt(h,10)];let f=!1;r?f=!a.has(d):o&&Array.isArray(d)&&(f=d[1]<=a[0]||d[0]>=a[1]),c.classList.toggle(Ce,f)}),this._dimmed=!!a}_fireFilterChange(t,e){var s;const i=Z(G({},t.state()),{sourceChartID:this._chartId(),key:e}),a=this.w.config.chart.events;typeof a.filterChange=="function"&&a.filterChange(this.ctx,i),(s=this.ctx.events)==null||s.fireEvent("filterChange",[this.ctx,i])}teardown(){var t,e,s,i,a,n;if(this.clear(),this._wired){(e=(t=this.ctx).removeEventListener)==null||e.call(t,"dataPointSelection",this._onPointSelect),(i=(s=this.ctx).removeEventListener)==null||i.call(s,"mounted",this._afterRender),(n=(a=this.ctx).removeEventListener)==null||n.call(a,"updated",this._afterRender);const r=this._cf();r&&(r.off("change",this._onChange),r.removeDimension(this._chartId())),this._wired=!1}}}lt.registerFeatures({linkedViews:Yo});const ya=lt;ya._crossfilterFactory=x=>Rt.getOrCreate(x);ya._crossfilterGet=x=>Rt.get(x);const Oo="apexcharts-ink-draggable",Ci=["point","xaxis","yaxis"],ki=8,Mi=2,le=[10,11,12,14,17,20],es=["circle","square","diamond","triangle"],ss={circle:"●",square:"■",diamond:"◆",triangle:"▲"},zo=["#ffffff","#334155","#2563eb","#16a34a","#d97706","#dc2626"],Ho='<svg viewBox="0 0 24 24" width="13" height="13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M3 6h18M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/></svg>';class pe{constructor(t,e){this.w=t,this.ctx=e,this._wired=!1,this._drag=null,this._editor=null,this._creating=!1,this._createSeq=0,this._attach=this._attach.bind(this),this._onRerender=this._onRerender.bind(this),this._onMove=this._onMove.bind(this),this._onUp=this._onUp.bind(this),this._onCreateClick=this._onCreateClick.bind(this),this._onDocDownEditor=this._onDocDownEditor.bind(this),(this._enabledGlobally()||this._hasDraggable()||this._paletteEnabled())&&this._wire()}_enabledGlobally(){const t=this.w.config.chart.ink;return!!(t&&t.enabled)}_paletteEnabled(){const t=this.w.config.chart.ink;return!!(t&&t.palette)}_snapEnabled(){const t=this.w.config.chart.ink;return!!(t&&t.snap)}_nearest(t,e){let s=t,i=1/0;for(let a=0;a<e.length;a++){const n=Math.abs(e[a]-t);n<i&&(i=n,s=e[a])}return s}_snapX(t){if(!this._snapEnabled()||typeof t!="number")return t;const e=this.w.globals.xAxisScale;return e&&Array.isArray(e.result)&&e.result.length?this._nearest(t,e.result):t}_snapY(t,e){if(!this._snapEnabled()||typeof t!="number")return t;const s=this.w.globals.yAxisScale,i=s&&s[e];return i&&Array.isArray(i.result)&&i.result.length?this._nearest(t,i.result):t}_annoList(t){const e=this.w.config.annotations;if(!e)return[];const s=t==="point"?"points":t;return Array.isArray(e[s])?e[s]:[]}_isDraggable(t){return t?t.draggable===!0?!0:t.draggable===!1?!1:this._enabledGlobally():!1}_hasDraggable(){return Ci.some(t=>this._annoList(t).some(e=>this._isDraggable(e)))}_wire(){this._wired||(this._wired=!0,this.ctx.addEventListener("mounted",this._onRerender),this.ctx.addEventListener("updated",this._onRerender))}
1381_onRerender(){if(this._closeEditor(!1),this._attach(),this._creating){const t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(t.style.cursor="crosshair",t.addEventListener("click",this._onCreateClick,!0))}}_attach(){const t=this.w,e=t.dom.baseEl;e&&(Ci.forEach(s=>{this._annoList(s).forEach((i,a)=>{this._isDraggable(i)&&(i.id||(i.id="apexcharts-ink-"+s+"-"+a+"-"+t.globals.chartID),e.querySelectorAll("."+i.id).forEach(n=>{n.__inkBound||(n.__inkBound=!0,n.style.cursor="move",n.classList.add(Oo),n.addEventListener("mousedown",r=>this._onDown(r,s,a)),n.addEventListener("touchstart",r=>this._onDown(r,s,a)),n.addEventListener("dblclick",r=>{r.preventDefault(),r.stopPropagation(),this._startEdit(s,a,{select:!0})}))}))})}),this._paletteEnabled()&&this._renderPalette())}_onDown(t,e,s){if(t.button&&t.button!==0)return;const i=this.w,a=i.dom.baseEl&&i.dom.baseEl.ownerDocument;if(!a)return;t.stopPropagation(),t.cancelable&&t.preventDefault();const r=t.type==="touchstart"?t.touches[0]:t,o=i.dom.Paper&&i.dom.Paper.node,l=o&&o.getScreenCTM?o.getScreenCTM():null,c=this._annoList(e)[s];let h="move",d=null,f=0,u=0;if(e==="xaxis"&&c.x2!=null&&(d=i.dom.baseEl.querySelector(".apexcharts-annotation-rect."+c.id),d)){const g=d.getBoundingClientRect();Math.abs(r.clientX-g.left)<=ki?h="resize-x1":Math.abs(r.clientX-g.right)<=ki&&(h="resize-x2"),f=parseFloat(d.getAttribute("x"))||0,u=parseFloat(d.getAttribute("width"))||0}this._drag={type:e,index:s,anno:c,els:Array.from(i.dom.baseEl.querySelectorAll("."+c.id)),mode:h,rect:d,origX:f,origW:u,startX:r.clientX,startY:r.clientY,scaleX:l&&l.a?l.a:1,scaleY:l&&l.d?l.d:1,dxPixel:0,dyPixel:0,moved:!1},a.addEventListener("mousemove",this._onMove),a.addEventListener("touchmove",this._onMove,{passive:!1}),a.addEventListener("mouseup",this._onUp),a.addEventListener("touchend",this._onUp)}_onMove(t){const e=this._drag;if(!e)return;t.cancelable&&t.preventDefault();const s=t.type==="touchmove"?t.touches[0]:t;if(e.dxPixel=(s.clientX-e.startX)/e.scaleX,e.dyPixel=(s.clientY-e.startY)/e.scaleY,(Math.abs(e.dxPixel)>Mi||Math.abs(e.dyPixel)>Mi)&&(e.moved=!0),e.mode==="move"){const i=`translate(${e.dxPixel} ${e.dyPixel})`;e.els.forEach(a=>a.setAttribute("transform",i))}else e.rect&&(e.mode==="resize-x1"?(e.rect.setAttribute("x",e.origX+e.dxPixel),e.rect.setAttribute("width",Math.max(1,e.origW-e.dxPixel))):e.mode==="resize-x2"&&e.rect.setAttribute("width",Math.max(1,e.origW+e.dxPixel)))}_onUp(){const t=this._drag;if(this._drag=null,this._teardownDocListeners(),!t||!t.moved){t&&(t.els.forEach(s=>s.removeAttribute("transform")),this._startEdit(t.type,t.index));return}const e=this._annoList(t.type)[t.index];e&&(this._applyDelta(t,e),t.els.forEach(s=>s.removeAttribute("transform")),this._redrawAnno(t.type,e,t.index),this._checkpoint("ink:drag"),this._fireDragged(t.type,e,t.index))}_checkpoint(t){var e,s;(s=(e=this.ctx.history)==null?void 0:e.snapshot)==null||s.call(e,t)}_applyDelta(t,e){const s=this.w,i=s.layout.gridWidth?t.dxPixel*(s.globals.xRange/s.layout.gridWidth):0;if(t.type==="point"){const{newX:a,newY:n}=this._invertPoint(e,t.dxPixel,t.dyPixel);if(e.x=this._snapX(a),n!=null){const r=e.yAxisIndex||0,o=s.globals.seriesYAxisMap;e.y=this._snapY(n,o&&o[r]?o[r][0]:0)}return}if(t.type==="xaxis"){if(typeof e.x!="number")return;if(t.mode==="move")typeof e.x2=="number"?(e.x+=i,e.x2+=i):e.x=this._snapX(e.x+i);else if(t.mode==="resize-x1"||t.mode==="resize-x2"){const a=e.x2==null||e.x<=e.x2;(t.mode==="resize-x2"?!a:a)?e.x=this._snapX(e.x+i):typeof e.x2=="number"&&(e.x2=this._snapX(e.x2+i))}return}if(t.type==="yaxis"){const a=e.yAxisIndex||0,n=s.globals.seriesYAxisMap,r=n&&n[a]?n[a][0]:0,o=s.globals.yRange?s.globals.yRange[r]:null;if(o==null||!s.layout.gridHeight)return;const l=-t.dyPixel*(o/s.layout.gridHeight);typeof e.y2=="number"?(typeof e.y=="number"&&(e.y+=l),e.y2+=l):typeof e.y=="number"&&(e.y=this._snapY(e.y+l,r))}}_invertPoint(t,e,s){const i=this.w,a=(i.config.xaxis.type==="category"||i.config.xaxis.convertedCatToNumeric)&&!i.axisFlags.dataFormatXNumeric;let n=t.x;!a&&typeof t.x=="number"&&i.layout.gridWidth&&(n=t.x+e*(i.globals.xRange/i.layout.gridWidth));let r=t.y;const o=t.yAxisIndex||0,l=i.globals.seriesYAxisMap,c=l&&l[o]?l[o][0]:0,h=i.globals.yRange?i.globals.yRange[c]:null,d=i.config.yaxis[o]&&i.c
1381onfig.yaxis[o].logarithmic;return typeof t.y=="number"&&h!=null&&!d&&i.layout.gridHeight&&(r=t.y-s*(h/i.layout.gridHeight)),{newX:n,newY:r}}_redrawAnno(t,e,s){const a=this.w.dom.baseEl,n=this.ctx.annotations;if(!a||!n)return;a.querySelectorAll("."+e.id).forEach(l=>l.remove());const r=a.querySelector(".apexcharts-"+t+"-annotations");if(!r)return;t==="point"&&n.pointsAnnotations?n.pointsAnnotations.addPointAnnotation(e,r,s):t==="xaxis"&&n.xAxisAnnotations?n.xAxisAnnotations.addXaxisAnnotation(e,r,s):t==="yaxis"&&n.yAxisAnnotations&&n.yAxisAnnotations.addYaxisAnnotation(e,r,s);const o=a.querySelector(".apexcharts-"+t+"-annotation-label."+e.id);if(o&&n.helpers&&e.label&&e.label.text){const l=n.helpers.addBackgroundToAnno(o,e);l&&o.parentNode&&o.parentNode.insertBefore(l.node,o)}this._attach()}_fireAnnotationEvent(t,e){var s;const i=this.w.config.chart.events;typeof i[t]=="function"&&i[t](this.ctx,e),(s=this.ctx.events)==null||s.fireEvent(t,[this.ctx,e])}_fireDragged(t,e,s){const i={type:t,id:e.id,index:s,x:e.x,y:e.y};e.x2!=null&&(i.x2=e.x2),e.y2!=null&&(i.y2=e.y2),this._fireAnnotationEvent("annotationDragged",i)}startCreate(){if(this._creating)return;const t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(this._creating=!0,t.style.cursor="crosshair",t.addEventListener("click",this._onCreateClick,!0),this._syncPalette())}stopCreate(){if(!this._creating)return;this._creating=!1;const t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(t.style.cursor="",t.removeEventListener("click",this._onCreateClick,!0)),this._syncPalette()}_onCreateClick(t){if(!this._creating)return;t.preventDefault(),t.stopPropagation();const e=this._pixelToData(t.clientX,t.clientY);this.stopCreate(),e&&this.createAt(e.x,e.y)}createAt(t,e,s={}){const i=this.w;this._wire(),this._createSeq+=1;const a="apexcharts-ink-new-"+this._createSeq+"-"+i.globals.chartID,n=R.extend(new St().pointAnnotation,{x:t,y:e,id:a,draggable:!0,label:{text:s.text||"Note"}});i.config.annotations||(i.config.annotations={}),Array.isArray(i.config.annotations.points)||(i.config.annotations.points=[]),i.config.annotations.points.push(n);const r=i.config.annotations.points.length-1;return this._redrawAnno("point",n,r),this._checkpoint("ink:create"),this._fireCreated("point",n,r),this._startEdit("point",r,{select:!0}),n}createLineAt(t,e,s={}){const i=this.w;this._wire(),this._createSeq+=1;const a="apexcharts-ink-new-"+this._createSeq+"-"+i.globals.chartID,n=t==="y"?"yaxis":"xaxis",r=n==="yaxis"?new St().yAxisAnnotation:new St().xAxisAnnotation,o={id:a,draggable:!0,strokeDashArray:s.strokeDashArray!=null?s.strokeDashArray:4,label:{text:s.text||""}};s.color&&(o.borderColor=s.color,o.label.borderColor=s.color),n==="yaxis"?o.y=e:o.x=e;const l=R.extend(r,o);i.config.annotations||(i.config.annotations={}),Array.isArray(i.config.annotations[n])||(i.config.annotations[n]=[]),i.config.annotations[n].push(l);const c=i.config.annotations[n].length-1;return this._redrawAnno(n,l,c),this._checkpoint("ink:create"),this._fireCreated(n,l,c),s.select!==!1&&this._startEdit(n,c,{select:!0}),l}_pixelToData(t,e){const s=this.w,i=s.dom.baseEl&&s.dom.baseEl.querySelector(".apexcharts-grid");if(!i)return null;const a=i.getBoundingClientRect();if(!a.width||!a.height)return null;const n=(t-a.left)/a.width,r=(e-a.top)/a.height,o=s.globals.minX,l=s.globals.xRange,c=s.globals.minYArr&&s.globals.minYArr[0]!=null?s.globals.minYArr[0]:s.globals.minY,h=s.globals.yRange&&s.globals.yRange[0]!=null?s.globals.yRange[0]:s.globals.maxY-s.globals.minY;let d=o+n*l;const f=c+(1-r)*h;return(s.config.xaxis.type==="category"||s.config.xaxis.convertedCatToNumeric)&&!s.axisFlags.dataFormatXNumeric&&(d=Math.round(d)),{x:d,y:f}}_fireCreated(t,e,s){const i={type:t,id:e.id,index:s};typeof e.x<"u"&&(i.x=e.x),typeof e.y<"u"&&(i.y=e.y),this._fireAnnotationEvent("annotationCreated",i)}_renderPalette(){const e=this.w.dom.elWrap;if(!e||e.querySelector(".apexcharts-ink-palette"))return;const s=e.ownerDocument,i=s.createElement("div");i.className="apexcharts-ink-palette";const a=i.style;a.position="absolute",a.top="6px",a.left="6px",a.zIndex="15";const n=s.createElement("button");n.type="button",n.className="apexcharts-ink-add",n.textContent="+ Note";const r=n.style;
1381r.cursor="pointer",r.font="12px sans-serif",r.padding="4px 9px",r.borderRadius="5px",r.border="1px solid #6366f1",r.color="#4338ca",r.background="#fff",n.addEventListener("click",o=>{o.stopPropagation(),this._creating?this.stopCreate():this.startCreate()}),i.appendChild(n),e.appendChild(i),this._syncPalette()}_syncPalette(){const t=this.w.dom.elWrap,e=t&&t.querySelector(".apexcharts-ink-add");e&&(this._creating?(e.style.background="#6366f1",e.style.color="#fff",e.textContent="Click chart..."):(e.style.background="#fff",e.style.color="#4338ca",e.textContent="+ Note"))}_noteColors(){const t=this.w.config.chart.ink;return t&&Array.isArray(t.noteColors)&&t.noteColors.length?t.noteColors:zo}static _isLight(t){const e=String(t||"").replace("#",""),s=e.length===3?e.split("").map(o=>o+o).join(""):e,i=parseInt(s,16);if(isNaN(i)||s.length!==6)return!1;const a=i>>16&255,n=i>>8&255,r=i&255;return(.299*a+.587*n+.114*r)/255>.72}static _isBold(t){const e=t&&t.fontWeight;return e==="bold"||parseInt(String(e),10)>=600}_cardBtn(t,e,s,i,a,n){const r=t.createElement("button");return r.type="button",r.className="apexcharts-ink-btn"+(a?" "+a:""),r.title=s,r.setAttribute("aria-label",s),n?r.innerHTML=e:r.textContent=e,r.addEventListener("mousedown",o=>o.preventDefault()),r.addEventListener("click",o=>{o.stopPropagation(),i()}),r}_cardLabel(t,e){const s=t.createElement("span");return s.className="apexcharts-ink-cardlabel",s.textContent=e,s}_mkSwatch(t,e,s,i){const a=t.createElement("button");return a.type="button",a.className="apexcharts-ink-swatch"+(i?" "+i:""),a.title=e,a.setAttribute("aria-label","Color "+e),a.dataset.color=e,a.style.background=e,a.addEventListener("mousedown",n=>n.preventDefault()),a.addEventListener("click",n=>{n.stopPropagation(),s(e)}),a}_startEdit(t,e,s={}){const i=this.w,a=this._annoList(t)[e],n=i.dom.baseEl,r=i.dom.elWrap;if(!a||!a.id||!n||!r)return;this._closeEditor(!1);const o=n.ownerDocument,l=o.createElement("div");l.className="apexcharts-ink-card",l.setAttribute("role","dialog"),l.setAttribute("aria-label","Edit note"),l.style.visibility="hidden";const c=o.createElement("div");c.className="apexcharts-ink-card-row";const h=o.createElement("input");h.type="text",h.className="apexcharts-ink-editor",h.placeholder="Note text",h.value=a.label&&a.label.text||"",c.appendChild(h),c.appendChild(this._cardBtn(o,Ho,"Delete note",()=>this._deleteAnno(),"apexcharts-ink-btn--delete",!0)),l.appendChild(c);const d=o.createElement("div");d.className="apexcharts-ink-card-row",t!=="point"&&d.appendChild(this._cardLabel(o,"Label")),this._noteColors().forEach(u=>{d.appendChild(this._mkSwatch(o,u,g=>this._applyColor(g)))});const f=o.createElement("span");if(f.className="apexcharts-ink-sep",d.appendChild(f),d.appendChild(this._cardBtn(o,"B","Bold",()=>this._toggleBold(),"apexcharts-ink-btn--bold")),d.appendChild(this._cardBtn(o,"A-","Smaller text",()=>this._stepFont(-1))),d.appendChild(this._cardBtn(o,"A+","Larger text",()=>this._stepFont(1))),l.appendChild(d),t!=="point"){const u=o.createElement("div");u.className="apexcharts-ink-card-row",u.appendChild(this._cardLabel(o,"Line")),this._noteColors().forEach(g=>{u.appendChild(this._mkSwatch(o,g,p=>this._applyLineColor(p),"apexcharts-ink-swatch--line"))}),l.appendChild(u)}if(t==="point"){const u=o.createElement("div");u.className="apexcharts-ink-card-row",u.appendChild(this._cardLabel(o,"Marker")),u.appendChild(this._cardBtn(o,"-","Smaller marker",()=>this._stepMarker(-1)));const g=o.createElement("span");g.className="apexcharts-ink-marker-size",u.appendChild(g),u.appendChild(this._cardBtn(o,"+","Larger marker",()=>this._stepMarker(1))),u.appendChild(this._cardBtn(o,ss.circle,"Marker shape",()=>this._cycleShape(),"apexcharts-ink-btn--shape")),l.appendChild(u)}r.appendChild(l),this._editor={card:l,input:h,type:t,index:e},this._positionCard(),this._syncCard(),l.style.visibility="",h.focus(),s.select&&h.select(),l.addEventListener("keydown",u=>{u.key==="Escape"?(u.preventDefault(),u.stopPropagation(),this._closeEditor(!1)):u.key==="Enter"&&u.target===h&&(u.preventDefault(),this._closeEditor(!0))}),o.addEventListener("mousedown",this._onDocDownEditor,!0),o.addEventListener("touchstart",this._onDocDownEditor,!0)}_onDocDownEditor(t){const e=this._editor;!e||e.card.contains(t.target)||this._closeEditor(!0)}_positionCard(){const t=this._editor;if(!t)return;const e=this.w,s=e.dom.baseEl,i=e.dom.elWrap,a=this._annoList(t.type)[t.index];if(!s||!i||!a)return;const n=s.querySelector(".apexcharts-"+t.type+"-annotation-label."+a.id)||s.querySelector("."+a.id);if(!n)return;const r=i.getBoundingClientRect(),o=n.getBoundingClientRect(),l=t.card.offsetWidth,c=t.card.offsetHeight;let h=Math.round(o.left-r.left),d=Math.round(o.bottom-r.top)+8;d+c>i.clientHeight-4&&(d=Math.round(o.top-r.top)-c-8),h+l>i.clientWidth-4&&(h=i.clientWidth-l-4),t.card.style.left=Math.max(4,h)+"px",t.card.style.top=Math.max(4,d)+"px"}_syncCard(){const t=this._editor;if(!t)return;const e=this._annoList(t.type)[t.index];if(!e)return;const s=e.label&&e.label.style||{},i=String(s.background||"").toLowerCase();t.card.querySelectorAll(".apexcharts-ink-swatch:not(.apexcharts-ink-swatch--line)").forEach(c=>{c.classList.toggle("apexcharts-ink-swatch--active",(c.dataset.color||"").toLowerCase()===i)});const a=String(e.borderColor||"").toLowerCase();t.card.querySelectorAll(".apexcharts-ink-swatch--line").forEach(c=>{c.classList.toggle("apexcharts-ink-swatch--active",(c.dataset.color||"").toLowerCase()===a)});const n=t.card.querySelector(".apexcharts-ink-btn--bold");n&&n.classList.toggle("apexcharts-ink-btn--active",pe._isBold(s));const r=e.marker||{},o=t.card.querySelector(".apexcharts-ink-marker-size");o&&(o.textContent=String(typeof r.size=="number"?r.size:4));const l=t.card.querySelector(".apexcharts-ink-btn--shape");l&&(l.textContent=ss[r.shape]||ss.circle)}_commitTextOf(t){const e=this._annoList(t.type)[t.index];if(!e)return;const s=t.input.value;e.label||(e.label={}),e.label.text!==s&&(e.label.text=s,this._redrawAnno(t.type,e,t.index),this._checkpoint("ink:edit"),this._fireEdited(t.type,e,t.index))}_closeEditor(t){const e=this._editor;if(!e)return;this._editor=null;const s=this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument;s&&(s.removeEventListener("mousedown",this._onDocDownEditor,!0),s.removeEventListener("touchstart",this._onDocDownEditor,!0)),e.card.parentNode&&e.card.parentNode.removeChild(e.card),t&&this._commitTextOf(e)}_applyStyle(t,e){const s=this._editor;if(!s)return;const i=this._annoList(s.type)[s.index];i&&(this._commitTextOf(s),i.label||(i.label={}),i.label.style||(i.label.style={}),e(i),this._redrawAnno(s.type,i,s.index),this._checkpoint(t),this._fireStyled(s.type,i,s.index),this._syncCard(),this._positionCard())}_applyColor(t){const e=this._editor;if(!e)return;const s=pe._isLight(t);this._applyStyle("ink:style",i=>{i.label.style.background=t,i.label.style.color=s?"#334155":"#ffffff",i.label.borderColor=s?"#cbd5e1":t,e.type==="point"&&(i.marker||(i.marker={}),i.marker.strokeColor=s?"#334155":t,i.marker.fillColor=s?"#ffffff"
1381:t)})}_applyLineColor(t){const e=this._editor;!e||e.type==="point"||this._applyStyle("ink:style",s=>{s.borderColor=t,(s.x2!=null||s.y2!=null)&&(s.fillColor=t)})}_stepFont(t){this._applyStyle("ink:style",e=>{const s=parseFloat(e.label.style.fontSize)||11;let i=0;for(let a=1;a<le.length;a++)Math.abs(le[a]-s)<Math.abs(le[i]-s)&&(i=a);i=Math.min(le.length-1,Math.max(0,i+t)),e.label.style.fontSize=le[i]+"px"})}_toggleBold(){this._applyStyle("ink:style",t=>{t.label.style.fontWeight=pe._isBold(t.label.style)?400:700})}_stepMarker(t){this._applyStyle("ink:style",e=>{e.marker||(e.marker={});const s=typeof e.marker.size=="number"?e.marker.size:4;e.marker.size=Math.min(14,Math.max(2,s+t))})}_cycleShape(){this._applyStyle("ink:style",t=>{t.marker||(t.marker={});const e=es.indexOf(t.marker.shape);t.marker.shape=es[(e+1)%es.length]})}_deleteAnno(){const t=this._editor;if(!t)return;const e=this._annoList(t.type),s=e[t.index];if(this._closeEditor(!1),!s)return;const i=this.w.dom.baseEl;i&&s.id&&i.querySelectorAll("."+s.id).forEach(a=>a.remove()),e.splice(t.index,1);for(let a=t.index;a<e.length;a++)this._redrawAnno(t.type,e[a],a);this._checkpoint("ink:delete"),this._fireDeleted(t.type,s,t.index)}_fireEdited(t,e,s){const i={type:t,id:e.id,index:s,text:e.label?e.label.text:""};this._fireAnnotationEvent("annotationEdited",i)}_fireStyled(t,e,s){const i={type:t,id:e.id,index:s,label:e.label,marker:e.marker};this._fireAnnotationEvent("annotationStyled",i)}_fireDeleted(t,e,s){const i={type:t,id:e.id,index:s};this._fireAnnotationEvent("annotationDeleted",i)}_teardownDocListeners(){const t=this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument;t&&(t.removeEventListener("mousemove",this._onMove),t.removeEventListener("touchmove",this._onMove),t.removeEventListener("mouseup",this._onUp),t.removeEventListener("touchend",this._onUp))}teardown(){var t,e,s,i;this._teardownDocListeners(),this._closeEditor(!1),this.stopCreate(),this._drag=null,this._wired&&((e=(t=this.ctx).removeEventListener)==null||e.call(t,"mounted",this._onRerender),(i=(s=this.ctx).removeEventListener)==null||i.call(s,"updated",this._onRerender),this._wired=!1)}}lt.registerFeatures({ink:pe});class Wo{constructor(t,e){this.w=t,this.ctx=e,this.graphics=new I(t),this.pins=[],this.drag=null,this.armed=!1,this.persistent=!1,this.pane=null,this._seedActive=!1,this._onKeyDown=this._onKeyDown.bind(this),this._onKeyUp=this._onKeyUp.bind(this),this._onDown=this._onDown.bind(this),this._onMove=this._onMove.bind(this),this._onUp=this._onUp.bind(this),this._onSeedDown=this._onSeedDown.bind(this),this._onSeedKey=this._onSeedKey.bind(this),this._afterRender=this._afterRender.bind(this),e.addEventListener("mounted",this._afterRender),e.addEventListener("updated",this._afterRender),this._bindKeys()}_cfg(){return this.w.config.chart.measure||{}}_enabled(){return this.w.globals.axisCharts&&this._cfg().enabled===!0}_mode(){return this._cfg().mode==="free"?"free":"span"}_snapToSeries(t){const e=(this.w.config.series||[])[0];if(!e)return null;const s=this._points(e.data||[]);if(!s.length)return null;let i=s[0],a=Math.abs(s[0].x-t);for(let n=1;n<s.length;n++){const r=Math.abs(s[n].x-t);r<a&&(a=r,i=s[n])}return i}_resolve(t){if(this._mode()==="free")return t;const e=this._snapToSeries(t.x);if(!e)return t;const s=this._dataToGrid(e.x,e.y);return{x:e.x,y:e.y,gx:s.gx,gy:s.gy}}_doc(){return this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument}_bindKeys(){if(this._keysBound)return;const t=this._doc();t&&(t.addEventListener("keydown",this._onKeyDown),t.addEventListener("keyup",this._onKeyUp),this._keysBound=!0)}_onKeyDown(t){if(!this._enabled()||this.persistent)return;const e=this._cfg().key||"m";t.key&&t.key.toLowerCase()===String(e).toLowerCase()?this._arm():t.key==="Escape"&&this._cancelDrag()}_onKeyUp(t){if(this.persistent)return;const e=this._cfg().key||"m";t.key&&t.key.toLowerCase()===String(e).toLowerCase()&&(this.drag||this._disarm())}startMeasure(){this._enabled()&&(this.persistent=!0,this._arm())}stopMeasure(){this.persistent=!1,this._cancelDrag(),this._disarm()}seedFromClient(t,e){if(!this._enabled())return;this._cancelDrag(),this._endSeed(!1);const s=this._project(t,e);this.drag={a:s,b:s},this._seedActive=!0;const i=this._doc();i&&(i.addEventListener("mousemove",this._onMove),i.addEventListener("touchmove",this._onMove,{passive:!1}),i.addEventListener("mousedown",this._onSeedDown,!0),i.addEventListener("touchstart",this._onSeedDown,!0),i.addEventListener("keydown",this._onSeedKey,!0)),this._renderLive()}_onSeedDown(t){if(!this._seedActive||!this.drag)return;t.preventDefault(),t.stopPropagation();const{cx:e,cy:s}=this._clientXY(t);this.drag.b=this._project(e,s),this._endSeed(!0)}_onSeedKey(t){t.key==="Escape"&&this._endSeed(!1)}_endSeed(t){var e,s;if(!this._seedActive)return;this._seedActive=!1;const i=this._doc();i&&(i.removeEventListener("mousemove",this._onMove),i.removeEventListener("touchmove",this._onMove),i.removeEventListener("mousedown",this._onSeedDown,!0),i.removeEventListener("touchstart",this._onSeedDown,!0),i.removeEventListener("keydown",this._onSeedKey,!0));const a=this.drag;if(this.drag=null,this._clearLive(),!t||!a)return;const n=this._resolve(a.a),r=this._resolve(a.b);if(Math.abs(n.gx-r.gx)<2&&Math.abs(n.gy-r.gy)<2)return;const o=this._mode();this._cfg().pinOnRelease!==!1&&(this.pins.push({xa:n.x,ya:n.y,xb:r.x,yb:r.y,mode:o}),this._renderPins(),(s=(e=this.ctx.history)==null?void 0:e.snapshot)==null||s.call(e,"measure")),this._fireMeasured(n,r)}clearMeasures(){var t,e;this.pins=[],this._renderPins(),(e=(t=this.ctx.history)==null?void 0:t.snapshot)==null||e.call(t,"clear measures")}getPins(){return this.pins.map(t=>({xa:t.xa,ya:t.ya,xb:t.xb,yb:t.yb,mode:t.mode==="free"?"free":"span"}))}setPins(t){this.pins=Array.isArray(t)?t.filter(e=>e&&isFinite(e.xa)&&isFinite(e.ya)&&isFinite(e.xb)&&isFinite(e.yb)).map(e=>({xa:+e.xa,ya:+e.ya,xb:+e.xb,yb:+e.yb,mode:e.mode==="free"?"free":"span"})):[],this._renderPins()}_points(t){const e=[];for(let s=0;s<t.length;s++){const i=t[s];let a,n;Array.isArray(i)?(a=+i[0],n=+i[1]):i&&typeof i=="object"?(a=+i.x,n=+i.y):(a=s,n=+i),isFinite(a)&&isFinite(n)&&e.push({x:a,y:n})}return e}_arm(){if(this.armed||!this._enabled())return;const t=this.w,e=t.dom.elGraphical;if(!e)return;this.armed=!0;const s=this.graphics.drawRect(0,0,t.layout.gridWidth,t.layout.gridHeight);s.node.setAttribute("class","apexcharts-measure-capture"),s.node.setAttribute("fill","transparent"),s.node.style.cursor="crosshair",s.node.style.pointerEvents="all",s.node.addEventListener("mousedown",this._onDown),s.node.addEventListener("touchstart",this._onDown,{passive:!1}),e.add(s),this.pane=s}_disarm(){if(this.armed=!1,this.pane){this.pane.node.removeEventListener("mousedown",this._onDown),this.pane.node.removeEventListener("touchstart",this._onDown);const t=this.pane.node;t.parentNode&&t.parentNode.removeChild(t),this.pane=null}}_clientXY(t){const e=t.touches&&t.touches[0]?t.touches[0]:t;return{cx:e.clientX,cy:e.clientY}}_gridRect(){const t=this.w.dom.baseEl.querySelector(".apexcharts-grid");return t?t.getBoundingClientRect():null}_yRange(){const t=this.w.globals,e=t.yAxisScale&&t.yAxisScale[0];return e&&isFinite(e.niceMin)&&isFinite(e.niceMax)&&e.niceMax!==e.niceMin?[e.niceMin,e.niceMax]:[t.minY,t.maxY]}_project(t,e){const s=this.w,i=this._gridRect(),a=s.layout.gridWidth,n=s.layout.gridHeight,r=u=>u<0?0:u>1?1:u,o=i?r((t-i.left)/i.width):0,l=i?r((e-i.top)/i.height):0,[c,h]=this._yRange(),d=s.globals.minX+o*(s.globals.maxX-s.globals.minX),f=h-l*(h-c);return{x:d,y:f,gx:o*a,gy:l*n}}_dataToGrid(t,e){const s=this.w,i=s.layout.gridWidth,a=s.layout.gridHeight,n=s.globals.maxX-s.globals.minX||1,[r,o]=this._yRange(),l=o-r||1;return{gx:(t-s.globals.minX)/n*i,gy:a-(e-r)/l*a}}_onDown(t){if(!this.armed)return;t.preventDefault(),t.stopPropagation();const{cx:e,cy:s}=this._clientXY(t),i=this._project(e,s);this.drag={a:i,b:i}
1381;const a=this._doc();a&&(a.addEventListener("mousemove",this._onMove),a.addEventListener("mouseup",this._onUp),a.addEventListener("touchmove",this._onMove,{passive:!1}),a.addEventListener("touchend",this._onUp)),this._renderLive()}_onMove(t){if(!this.drag)return;t.cancelable&&t.preventDefault();const{cx:e,cy:s}=this._clientXY(t);this.drag.b=this._project(e,s),this._renderLive()}_onUp(t){var e,s;const i=this._doc();if(i&&(i.removeEventListener("mousemove",this._onMove),i.removeEventListener("mouseup",this._onUp),i.removeEventListener("touchmove",this._onMove),i.removeEventListener("touchend",this._onUp)),!this.drag)return;const a=this.drag.a,n=this.drag.b;if(this.drag=null,this._clearLive(),Math.abs(a.gx-n.gx)<2&&Math.abs(a.gy-n.gy)<2){this.persistent||this._disarm();return}const r=this._mode(),o=this._resolve(a),l=this._resolve(n);this._cfg().pinOnRelease!==!1&&(this.pins.push({xa:o.x,ya:o.y,xb:l.x,yb:l.y,mode:r}),this._renderPins(),(s=(e=this.ctx.history)==null?void 0:e.snapshot)==null||s.call(e,"measure")),this._fireMeasured(o,l),this.persistent||this._disarm()}_cancelDrag(){const t=this._doc();t&&(t.removeEventListener("mousemove",this._onMove),t.removeEventListener("mouseup",this._onUp),t.removeEventListener("touchmove",this._onMove),t.removeEventListener("touchend",this._onUp)),this.drag=null,this._clearLive()}_stats(t,e){const s=e.x-t.x,i=e.y-t.y;return{dx:s,dy:i,pct:t.y!==0?i/Math.abs(t.y)*100:NaN,slope:s!==0?i/s:NaN}}_fmt(t){if(!isFinite(t))return"n/a";const e=Math.abs(t);return e!==0&&(e<.01||e>=1e6)?t.toExponential(2):String(Math.round(t*100)/100)}_computedStyle(){if(!H.isBrowser())return null;const t=this.w.dom.elGraphical&&this.w.dom.elGraphical.node;if(!t||typeof getComputedStyle!="function")return null;try{return getComputedStyle(t)}catch{return null}}_resolveColor(t,e,s,i){if(t)return t;const a=i!==void 0?i:this._computedStyle();return(a?a.getPropertyValue(e).trim():"")||s}_colors(){const t=this._cfg().colors||{},e=this._computedStyle();return{up:this._resolveColor(t.up,"--apx-measure-up","#16a34a",e),down:this._resolveColor(t.down,"--apx-measure-down","#dc2626",e),neutral:this._resolveColor(t.neutral,"--apx-measure-neutral","#64748b",e),guide:this._resolveColor(t.guide,"--apx-measure-guide","#94a3b8",e)}}_dirColor(t){const e=this._colors();return t===0?e.neutral:t>0?e.up:e.down}_dirClass(t){return t===0?"apexcharts-measure-flat":t>0?"apexcharts-measure-up":"apexcharts-measure-down"}_fmtPct(t){if(!isFinite(t))return"n/a";const e=this._cfg().format&&this._cfg().format.percent;if(typeof e=="function")try{const s=e(t);if(s!=null)return String(s)}catch{}return(t>=0?"+":"")+this._fmt(t)+"%"}_label(t,e,s,i){const a=this._cfg().label;if(typeof a=="function"){const n=a({from:{x:t.x,y:t.y},to:{x:e.x,y:e.y},dx:s.dx,dy:s.dy,percentChange:s.pct,slope:s.slope,mode:i});return Array.isArray(n)?n.map(String):[String(n)]}if(i==="span"){const n=s.dy===0?"":s.dy>0?" ↑":" ↓",r=isFinite(s.pct)?"("+this._fmtPct(s.pct)+")":"";return[this._fmtY(s.dy)+"  "+r+n,this._fmtX(t.x)+"  to  "+this._fmtX(e.x)]}return["Δx "+this._fmtDx(s.dx),"Δy "+this._fmtY(s.dy),this._fmtPct(s.pct)]}_fmtDx(t){if(this.w.config.xaxis.type==="datetime"){const e=t/864e5;return Math.round(e*10)/10+"d"}return this._fmt(t)}_fmtY(t){const e=this._cfg().format&&this._cfg().format.y;if(typeof e=="function")try{const i=e(t);if(i!=null)return String(i)}catch{}const s=this.w.globals.yLabelFormatters&&this.w.globals.yLabelFormatters[0];if(typeof s=="function")try{const i=s(t,{seriesIndex:0,dataPointIndex:-1,w:this.w});if(i!=null&&i!=="")return String(i)}catch{}return this._fmt(t)}_fmtX(t){const e=this.w,s=this._cfg().format&&this._cfg().format.x;if(typeof s=="function")try{const a=s(t);if(a!=null)return String(a)}catch{}if(e.config.xaxis.type==="datetime")return new Date(t).toLocaleDateString(void 0,{day:"numeric",month:"short",year:"numeric"});const i=e.globals.xLabelFormatter;if(typeof i=="function")try{const a=i(t,{w:e});if(a!=null&&a!=="")return String(a)}catch{}return this._fmt(t)}_liveGroup(){const t=this.w;if(this._live&&this._live.node&&this._live.node.parentNode)return this._live;const e=this.graphics.group({class:"apexcharts-measure-live"});
1381return e.node.style.pointerEvents="none",t.dom.elGraphical&&t.dom.elGraphical.add(e),this._live=e,e}_clearLive(){if(this._live&&this._live.node){const t=this._live.node;t.parentNode&&t.parentNode.removeChild(t)}this._live=null}_renderLive(){if(!this.drag)return;const t=this._liveGroup();for(;t.node.firstChild;)t.node.removeChild(t.node.firstChild);const e=this._resolve(this.drag.a),s=this._resolve(this.drag.b);this._drawRuler(t,e,s,!1,this._mode())}_renderPins(){const t=this.w,e=t.dom.baseEl&&t.dom.baseEl.querySelector(".apexcharts-measure-pins");if(e&&e.parentNode&&e.parentNode.removeChild(e),!this.pins.length||!t.dom.elGraphical)return;const s=this.graphics.group({class:"apexcharts-measure-pins"});s.node.style.pointerEvents="none",t.dom.elGraphical.add(s),this.pins.forEach(i=>{const a=Z(G({},this._dataToGrid(i.xa,i.ya)),{x:i.xa,y:i.ya}),n=Z(G({},this._dataToGrid(i.xb,i.yb)),{x:i.xb,y:i.yb});this._drawRuler(s,a,n,!0,i.mode||"span")})}_drawRuler(t,e,s,i,a){const n=this._stats(e,s),r=this.graphics.group({class:"apexcharts-measure-ruler "+this._dirClass(n.dy)+(i?" apexcharts-measure-pinned":"")});(a||this._mode())==="free"?this._drawFree(r,e,s,n):this._drawSpan(r,e,s,n),t.add(r)}_dot(t,e,s){if(this._cfg().markers===!1)return;const i=this.graphics.drawMarker(e.gx,e.gy,{pSize:4,shape:"circle",pointFillColor:s,pointFillOpacity:1,pointStrokeColor:"#fff",pointStrokeWidth:2,pointStrokeOpacity:1});t.add(i)}_readout(t,e,s,i,a,n,r){const o=this.graphics.drawRect(s,i,a,n,4);o.node.setAttribute("class","apexcharts-measure-label-bg"),o.attr({fill:"#ffffff","fill-opacity":.95,stroke:r,"stroke-width":1}),t.add(o);const l=this.graphics.drawText({x:s+9,y:i+15,text:e,textAnchor:"start",fontSize:"11px",foreColor:"#1e293b",cssClass:"apexcharts-measure-label"});t.add(l)}_drawSpan(t,e,s,i){const a=this.w,n=this._cfg(),r=a.layout.gridHeight,o=this._dirColor(i.dy),l=Math.min(e.gx,s.gx),c=Math.max(e.gx,s.gx);if(n.band!==!1){const p=this.graphics.drawRect(l,0,Math.max(0,c-l),r,0);p.node.setAttribute("class","apexcharts-measure-band"),p.attr({fill:o,"fill-opacity":.09,stroke:"none"}),t.add(p)}n.guides!==!1&&[e,s].forEach(p=>{const b=this.graphics.drawLine(p.gx,0,p.gx,r,this._colors().guide,4,1);b.node.setAttribute("class","apexcharts-measure-vline"),t.add(b)}),[e,s].forEach(p=>this._dot(t,p,o));const h=this._label(e,s,i,"span"),d=h.reduce((p,b)=>Math.max(p,b.length),0),f=Math.max(148,d*6.4),u=20+h.length*15;let g=(l+c)/2-f/2;g=Math.max(2,Math.min(g,a.layout.gridWidth-f-2)),this._readout(t,h,g,4,f,u,o)}_drawFree(t,e,s,i){const a=this._dirColor(i.dy),n=this.graphics.drawLine(e.gx,e.gy,s.gx,s.gy,a,0,2);n.node.setAttribute("class","apexcharts-measure-line"),t.add(n),[e,s].forEach(f=>this._dot(t,f,a));const r=this._label(e,s,i,"free"),o=r.reduce((f,u)=>Math.max(f,u.length),0),l=Math.max(72,o*6.2),c=16+r.length*15;let h=(e.gx+s.gx)/2+8,d=(e.gy+s.gy)/2-c/2;h=Math.max(2,Math.min(h,this.w.layout.gridWidth-l-2)),d=Math.max(2,Math.min(d,this.w.layout.gridHeight-c-2)),this._readout(t,r,h,d,l,c,a)}_fireMeasured(t,e){const s=this._stats(t,e),i={from:{x:t.x,y:t.y},to:{x:e.x,y:e.y},dx:s.dx,dy:s.dy,percentChange:s.pct,slope:s.slope},a=this.w.config.chart.events.measured;typeof a=="function"&&a(this.ctx,i),this.ctx.events.fireEvent("measured",[this.ctx,i])}_afterRender(){this._enabled()&&(this.w.interact.measureEnabled&&!this.persistent&&(this.persistent=!0),this.pins.length&&this._renderPins(),this.persistent&&!this.drag&&(this._disarm(),this._arm()))}teardown(){this._cancelDrag(),this._endSeed(!1),this._disarm();const t=this._doc();t&&this._keysBound&&(t.removeEventListener("keydown",this._onKeyDown),t.removeEventListener("keyup",this._onKeyUp)),this._keysBound=!1,this.pins=[]}}lt.registerFeatures({measure:Wo});class $o{constructor(t,e){this.w=t,this.ctx=e,this.menu=null,this._items=[],this._focusIndex=-1,this._trigger=null,this._onContext=this._onContext.bind(this),this._onDocDown=this._onDocDown.bind(this),this._onKey=this._onKey.bind(this),this._afterRender=this._afterRender.bind(this),e.addEventListener("mounted",this._afterRender),e.addEventListener("updated",this._afterRender)}_cfg(){return this.w.config.chart.contextMenu||{}}_enabled(){return this._cfg().enabled===!0}_doc(){return this.w.dom.baseEl&&this.w.dom.baseEl.ownerDocument}
1381_afterRender(){if(this._detachTrigger(),this.close(),!this._enabled()||!H.isBrowser())return;const t=this.w.dom.Paper&&this.w.dom.Paper.node;t&&(t.addEventListener("contextmenu",this._onContext),this._trigger=t)}_detachTrigger(){this._trigger&&(this._trigger.removeEventListener("contextmenu",this._onContext),this._trigger=null)}_onContext(t){this._enabled()&&(t.preventDefault(),this.open(t.clientX,t.clientY))}_clientToData(t,e){const s=this.w,i=s.dom.baseEl&&s.dom.baseEl.querySelector(".apexcharts-grid");if(!i)return null;const a=i.getBoundingClientRect();if(!a.width||!a.height)return null;const n=u=>u<0?0:u>1?1:u,r=n((t-a.left)/a.width),o=n((e-a.top)/a.height),l=s.globals.minX+r*(s.globals.maxX-s.globals.minX),c=s.globals.yAxisScale&&s.globals.yAxisScale[0],h=c&&isFinite(c.niceMin)?c.niceMin:s.globals.minY,d=c&&isFinite(c.niceMax)?c.niceMax:s.globals.maxY,f=d-o*(d-h);return{x:l,y:f}}_resolveItems(t){const e=this._cfg(),s=Array.isArray(e.items)&&e.items.length?e.items:["annotate","xline","yline","measure"],i=e.labels||{},a=[];return s.forEach(n=>{if(typeof n=="string"){if(n==="annotate")a.push({id:"annotate",label:i.annotate||"Add note here",run:()=>this._annotate(t)});else if(n==="xline")a.push({id:"xline",label:i.xline||"Annotate here",run:()=>this._line(t,"x")});else if(n==="yline")a.push({id:"yline",label:i.yline||"Mark this level",run:()=>this._line(t,"y")});else if(n==="measure"){const r=this.ctx.measure;r&&this.w.config.chart.measure&&this.w.config.chart.measure.enabled&&a.push({id:"measure",label:i.measure||"Measure from here",run:()=>r.seedFromClient(t.clientX,t.clientY)})}}else n&&typeof n=="object"&&typeof n.onClick=="function"&&a.push({id:n.id||"custom",label:n.label||"Action",run:()=>n.onClick(this.ctx,t)})}),a}_annotate(t){if(t.x==null||t.y==null)return;const e=this._cfg(),s=this.ctx.ink;if(s&&typeof s.createAt=="function"){s.createAt(t.x,t.y,{text:e.noteText||"Note"});return}this.ctx.addPointAnnotation({x:t.x,y:t.y,marker:{size:5},label:{text:e.noteText||"Note",style:{background:"#fff",color:"#334155"}}},!0)}_line(t,e){const s=this._cfg().line||{},i=e==="x"?t.x:t.y;if(i==null)return;const a=this.ctx.ink;if(a&&typeof a.createLineAt=="function"){a.createLineAt(e,i,{text:s.text,strokeDashArray:s.strokeDashArray,color:s.color});return}const n={strokeDashArray:s.strokeDashArray!=null?s.strokeDashArray:4};s.text&&(n.label={text:s.text}),s.color&&(n.borderColor=s.color,n.label=R.extend(n.label||{},{borderColor:s.color})),e==="x"?this.ctx.addXaxisAnnotation(R.extend(n,{x:i}),!0):this.ctx.addYaxisAnnotation(R.extend(n,{y:i}),!0)}open(t,e){this.close();const s=this.w,i=s.dom.elWrap,a=this._doc();if(!i||!a)return;const n=this._clientToData(t,e),r=s.globals,o={x:n?n.x:null,y:n?n.y:null,seriesIndex:r.capturedSeriesIndex>=0?r.capturedSeriesIndex:null,dataPointIndex:r.capturedDataPointIndex>=0?r.capturedDataPointIndex:null,clientX:t,clientY:e},l=this._resolveItems(o);if(!l.length)return;this._items=l;const c=a.createElement("div");c.className="apexcharts-context-menu",c.setAttribute("role","menu"),c.style.position="absolute",c.style.visibility="hidden",l.forEach((m,A)=>{const v=a.createElement("button");v.type="button",v.className="apexcharts-context-menu-item",v.setAttribute("role","menuitem"),v.tabIndex=-1,v.textContent=m.label,v.addEventListener("click",y=>{y.stopPropagation(),this._activate(A)}),v.addEventListener("mouseenter",()=>this._focus(A)),c.appendChild(v)}),i.appendChild(c),this.menu=c;const h=i.getBoundingClientRect();let d=t-h.left,f=e-h.top;const u=c.offsetWidth,g=c.offsetHeight,p=Math.max(0,i.clientWidth-u),b=Math.max(0,i.clientHeight-g);d>p&&(d=p),f>b&&(f=b),c.style.left=Math.max(0,d)+"px",c.style.top=Math.max(0,f)+"px",c.style.visibility="visible",a.addEventListener("mousedown",this._onDocDown,!0),a.addEventListener("keydown",this._onKey,!0),this._focus(0)}_focus(t){if(!this.menu)return;const e=this.menu.querySelectorAll(".apexcharts-context-menu-item");this._focusIndex>
1381=0&&e[this._focusIndex]&&e[this._focusIndex].classList.remove("apexcharts-context-menu-item--active"),this._focusIndex=t,e[t]&&(e[t].classList.add("apexcharts-context-menu-item--active"),typeof e[t].focus=="function"&&e[t].focus())}_activate(t){const e=this._items[t];this.close(),e&&e.run()}_onDocDown(t){this.menu&&this.menu.contains(t.target)||this.close()}_onKey(t){!this.menu||!this._items.length||(t.key==="Escape"?(t.preventDefault(),this.close()):t.key==="ArrowDown"?(t.preventDefault(),this._focus((this._focusIndex+1)%this._items.length)):t.key==="ArrowUp"?(t.preventDefault(),this._focus((this._focusIndex-1+this._items.length)%this._items.length)):(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),this._activate(this._focusIndex<0?0:this._focusIndex)))}close(){const t=this._doc();t&&(t.removeEventListener("mousedown",this._onDocDown,!0),t.removeEventListener("keydown",this._onKey,!0)),this.menu&&this.menu.parentNode&&this.menu.parentNode.removeChild(this.menu),this.menu=null,this._items=[],this._focusIndex=-1}teardown(){this.close(),this._detachTrigger()}}lt.registerFeatures({contextMenu:$o});class Vo{constructor(t){this.w=t.w,this.barCtx=t,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}handleBarDataLabels(t){const{x:e,y:s,y1:i,y2:a,i:n,j:r,realIndex:o,columnGroupIndex:l,series:c,barHeight:h,barWidth:d,barXPosition:f,barYPosition:u,visibleSeries:g}=t,p=this.w,b=new I(this.barCtx.w),m=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[o]:this.barCtx.strokeWidth;let A,v;p.axisFlags.isXNumeric&&!p.globals.isBarHorizontal?(A=e+d*(g+1),v=s+h*(g+1)-m):(A=e+d*g,v=s+h*g);let y=null,w=null,_=e,C=s,S={};const k=p.config.dataLabels,M=this.barCtx.barOptions.dataLabels,L=this.barCtx.barOptions.dataLabels.total;typeof u<"u"&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(v=u,C=u),typeof f<"u"&&this.barCtx.isVerticalGroupedRangeBar&&(A=f,_=f);const E=k.offsetX,D=k.offsetY;let T={width:0,height:0};if(p.config.dataLabels.enabled){const P=p.seriesData.series[o][r];T=b.getTextRects(p.config.dataLabels.formatter?p.config.dataLabels.formatter(P,Z(G({},p),{seriesIndex:o,dataPointIndex:r,w:p})):p.formatters.yLabelFormatters[0](P),parseFloat(k.style.fontSize).toString())}const F={x:e,y:s,i:n,j:r,realIndex:o,columnGroupIndex:l,bcx:A,bcy:v,barHeight:h,barWidth:d,textRects:T,strokeWidth:m,dataLabelsX:_,dataLabelsY:C,dataLabelsConfig:k,barDataLabelsConfig:M,barTotalDataLabelsConfig:L,offX:E,offY:D};return this.barCtx.isHorizontal?S=this.calculateBarsDataLabelsPosition(F):S=this.calculateColumnsDataLabelsPosition(F),y=this.drawCalculatedDataLabels({x:S.dataLabelsX,y:S.dataLabelsY,val:this.barCtx.isRangeBar?[i,a]:p.config.chart.stackType==="100%"?c[o][r]:p.seriesData.series[o][r],i:o,j:r,barWidth:d,barHeight:h,textRects:T,dataLabelsConfig:k}),p.config.chart.stacked&&L.enabled&&(w=this.drawTotalDataLabels({x:S.totalDataLabelsX,y:S.totalDataLabelsY,barWidth:d,barHeight:h,realIndex:o,textAnchor:S.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:o,j:r}),dataLabelsConfig:k,barTotalDataLabelsConfig:L})),{dataLabelsPos:S,dataLabels:y,totalDataLabels:w}}getStackedTotalDataLabel({realIndex:t,j:e}){const s=this.w;let i=this.barCtx.stackedSeriesTotals[e];return this.totalFormatter&&(i=this.totalFormatter(i,Z(G({},s),{seriesIndex:t,dataPointIndex:e,w:s}))),i}calculateColumnsDataLabelsPosition(t){const e=this.w;let{i:s,j:i,realIndex:a,y:n,bcx:r,barWidth:o,barHeight:l,textRects:c,dataLabelsX:h,dataLabelsY:d,dataLabelsConfig:f,barDataLabelsConfig:u,barTotalDataLabelsConfig:g,strokeWidth:p,offX:b,offY:m}=t,A,v;const y="middle",w=r;l=Math.abs(l);const _=e.config.plotOptions.bar.dataLabels.orientation==="vertical",{zeroEncounters:C}=this.barCtx.barHelpers.getZeroValueEncounters({i:s,j:i});r=r-p/2;const S=e.layout.gridWidth/e.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?h+=o/2:(e.axisFlags.isXNumeric?h=r-o/2+b:h=r-S+o/2+b,!e.config.chart.stacked&&C>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(h-=o*C)),_&&(h=h+c.height/2-p/2-2);const k=e.seriesData.series[s][i]<0;let M=n;switch(this.barCtx.isReversed&&(M=n+(k?l:-l)),u.position){case"center":_?k?d=M-l/2+m:d=M+l/2-m:k?d=M-l/2+c.height/2+m:d=M+l/2+c.height/2-m;break;case"bottom":_?k?d=M-l+m:d=M+l-m:k?d=M-l+c.height+p+m:d=M+l-c.height/2+p-m;break;case"top":_?k?d=M+m:d=M-m:k?d=M-c.height/2-m:d=M+c.height+m;break}let L=M;if(e.labelData.seriesGroups.forEach(E=>{var D;(D=this.barCtx[E.join(",")])==null||D.prevY.forEach(T=>{k?L=Math.max(T[i],L):L=Math.min(T[i],L)})}),this.barCtx.lastActiveBarSerieIndex===a&&g.enabled){const T=new I(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:i}),f.fontSize);k?A=L-T.height/2-m-g.offsetY+18:A=L+T.height+m+g.offsetY-18;const F=S;v=w+(e.axisFlags.isXNumeric?-o*e.globals.barGroups.length/2:e.globals.barGroups.length*o/2-(e.globals.barGroups.length-1)*o-F)+g.offsetX}return e.config.chart.stacked||(d<0?d=0+p:d+c.height/3>e.layout.gridHeight&&(d=e.layout.gridHeight-p)),{bcx:r,bcy:n,dataLabelsX:h,dataLabelsY:d,totalDataLabelsX:v,totalDataLabelsY:A,totalDataLabelsAnchor:y}}calculateBarsDataLabelsPosition(t){var e;const s=this.w;let{x:i,i:a,j:n,realIndex:r,bcy:o,barHeight:l,barWidth:c,textRects:h,dataLabelsX:d,strokeWidth:f,dataLabelsConfig:u,barDataLabelsConfig:g,barTotalDataLabelsConfig:p,offX:b,offY:m}=t;const A=s.layout.gridHeight/s.globals.dataPoints,{zeroEncounters:v}=this.barCtx.barHelpers.getZeroValueEncounters({i:a,j:n});c=Math.abs(c);let y;if(this.barCtx.isPyramid){const L=(e=h.centerOffset)!=null?e:0;y=o+l/2+m-L}
1381else y=o-(this.barCtx.isRangeBar?0:A)+l/2+h.height/2+m-3;!s.config.chart.stacked&&v>0&&s.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(y-=l*v);let w,_,C="start";const S=s.seriesData.series[a][n]<0;let k=i;if(this.barCtx.isReversed&&(k=i+(S?-c:c),C=S?"start":"end"),this.barCtx.isPyramid)d=s.layout.gridWidth/2+b;else switch(g.position){case"center":S?d=k+c/2-b:d=Math.max(h.width/2,k-c/2)+b;break;case"bottom":S?d=k+c-f-b:d=k-c+f+b;break;case"top":S?d=k-f-b:d=k-f+b;break}let M=k;if(s.labelData.seriesGroups.forEach(L=>{var E;(E=this.barCtx[L.join(",")])==null||E.prevX.forEach(D=>{S?M=Math.min(D[n],M):M=Math.max(D[n],M)})}),this.barCtx.lastActiveBarSerieIndex===r&&p.enabled){const E=new I(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:n}),u.fontSize);S?(w=M-f-b-p.offsetX,C="end"):w=M+b+p.offsetX+(this.barCtx.isReversed?-(c+f):f),_=y-h.height/2+E.height/2+p.offsetY+f,s.globals.barGroups.length>1&&(_=_-s.globals.barGroups.length/2*(l/2))}return s.config.chart.stacked||(u.textAnchor==="start"?d-h.width<0?d=S?h.width+f-b:f+b:d+h.width>s.layout.gridWidth&&(d=S?s.layout.gridWidth-f:s.layout.gridWidth-h.width-f):u.textAnchor==="middle"?d-h.width/2<0?d=h.width/2+f:d+h.width/2>s.layout.gridWidth&&(d=s.layout.gridWidth-h.width/2-f):u.textAnchor==="end"&&(d<1?d=h.width+f:d+1>s.layout.gridWidth&&(d=s.layout.gridWidth-h.width-f))),{bcx:i,bcy:o,dataLabelsX:d,dataLabelsY:y,totalDataLabelsX:w,totalDataLabelsY:_,totalDataLabelsAnchor:C}}drawCalculatedDataLabels({x:t,y:e,val:s,i,j:a,textRects:n,barHeight:r,barWidth:o,dataLabelsConfig:l}){var c,h;const d=this.w;let f="rotate(0)";d.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(f=`rotate(-90, ${t}, ${e})`);const u=new Ut(this.barCtx.w,this.barCtx.ctx),g=new I(this.barCtx.w),p=l.formatter;let b=null;const m=d.globals.collapsedSeriesIndices.indexOf(i)>-1;if(l.enabled&&!m){b=g.group({class:"apexcharts-data-labels",transform:f});const A=d.config.dataLabels;((c=A.animate)!=null&&c.enabled||(h=A.countUp)!=null&&h.enabled)&&(b.node.setAttribute("data:dlKey",`${i}::${Qt(d,i,a)}`),b.node.setAttribute("data:dlJ",String(a)),typeof s=="number"&&isFinite(s)&&b.node.setAttribute("data:dlVal",String(s)));let v="";typeof s<"u"&&(v=p(s,Z(G({},d),{seriesIndex:i,dataPointIndex:a,w:d}))),!s&&d.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(v="");const y=d.seriesData.series[i][a]<0,w=d.config.plotOptions.bar.dataLabels.position;if(d.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(w==="top"&&(y?l.textAnchor="end":l.textAnchor="start"),w==="center"&&(l.textAnchor="middle"),w==="bottom"&&(y?l.textAnchor="end":l.textAnchor="start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){const C=g.getTextRects(v,parseFloat(l.style.fontSize).toString());o<C.width&&(v="")}d.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?n.width/1.6>Math.abs(o)&&(v=""):n.height/1.6>Math.abs(r)&&(v=""));const _=G({},l);this.barCtx.isHorizontal&&s<0&&(l.textAnchor==="start"?_.textAnchor="end":l.textAnchor==="end"&&(_.textAnchor="start")),u.plotDataLabelsText({x:t,y:e,text:v,i,j:a,parent:b,dataLabelsConfig:_,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return b}drawTotalDataLabels({x:t,y:e,val:s,realIndex:i,textAnchor:a,barTotalDataLabelsConfig:n}){const r=new I(this.barCtx.w);let o;return n.enabled&&typeof t<"u"&&typeof e<"u"&&this.barCtx.lastActiveBarSerieIndex===i&&(o=r.drawText({x:t,y:e,foreColor:n.style.color,text:s,textAnchor:a,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),o}}let Go=class{constructor(t){this.w=t.w,this.barCtx=t}initVariables(t){const e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let s=0;s<t.length;s++)if(t[s].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[s].length),e.axisFlags.isXNumeric)for(let i=0;i<t[s].length;i++)e.seriesData.seriesX[s][i]>e.globals.minX&&e.seriesData.seriesX[s][i]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(e.seriesData.series),R.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(s=>s.map(i=>"none"))),this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1)}initialPositions(t){const e=this.w;let s,i,a,n,r,o,l,c,h=e.globals.dataPoints;this.barCtx.isRangeBar&&(h=e.labelData.labels.length);let d=this.barCtx.seriesLen;if(e.config.plotOptions.bar.rangeBarGroupRows&&(d=1),this.barCtx.isHorizontal)a=e.layout.gridHeight/h,r=a/d,e.axisFlags.isXNumeric&&(a=e.layout.gridHeight/this.barCtx.totalItems,r=a/this.barCtx.seriesLen),r=r*parseInt(this.barCtx.barOptions.barHeight,10)/100,Str
1381ing(this.barCtx.barOptions.barHeight).indexOf("%")===-1&&(r=parseInt(this.barCtx.barOptions.barHeight,10)),c=this.barCtx.baseLineInvertedY+e.globals.padHorizontal+(this.barCtx.isReversed?e.layout.gridWidth:0)-(this.barCtx.isReversed?this.barCtx.baseLineInvertedY*2:0),this.barCtx.isFunnel&&(c=e.layout.gridWidth/2),i=(a-r*this.barCtx.seriesLen)/2;else{if(n=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(n=e.layout.gridWidth/e.globals.dataPoints),o=n/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const f=this.barCtx.xRatio;e.globals.minXDiff&&e.globals.minXDiff!==.5&&e.globals.minXDiff/f>0&&(n=e.globals.minXDiff/f),o=n/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,o<1&&(o=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(o=parseInt(this.barCtx.barOptions.columnWidth,10)),l=e.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?e.layout.gridHeight:0)+(this.barCtx.isReversed?this.barCtx.baseLineY[this.barCtx.translationsIndex]*2:0),e.axisFlags.isXNumeric?s=this.barCtx.getBarXForNumericXAxis({x:s,j:0,realIndex:t,barWidth:o}).x:s=e.globals.padHorizontal+R.noExponents(n-o*this.barCtx.seriesLen)/2}return e.globals.barHeight=r,e.globals.barWidth=o,{x:s,y:i,yDivision:a,xDivision:n,barHeight:r,barWidth:o,zeroH:l,zeroW:c}}initializeStackedPrevVars(t){t.w.labelData.seriesGroups.forEach(s=>{t[s]||(t[s]={}),t[s].prevY=[],t[s].prevX=[],t[s].prevYF=[],t[s].prevXF=[],t[s].prevYVal=[],t[s].prevXVal=[]})}initializeStackedXYVars(t){t.w.labelData.seriesGroups.forEach(s=>{t[s]||(t[s]={}),t[s].xArrj=[],t[s].xArrjF=[],t[s].xArrjVal=[],t[s].yArrj=[],t[s].yArrjF=[],t[s].yArrjVal=[]})}getPathFillColor(t,e,s,i){var a,n,r,o;const l=this.w,c=new pt(this.barCtx.w);let h=null;const d=this.barCtx.barOptions.distributed?s:e;let f=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(p=>{t[e][s]>=p.from&&t[e][s]<=p.to&&(h=p.color,f=!0)}),{color:c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?d:i,dataPointIndex:s,color:h,value:t[e][s],fillConfig:(a=l.config.series[e].data[s])==null?void 0:a.fill,fillType:(r=(n=l.config.series[e].data[s])==null?void 0:n.fill)!=null&&r.type?(o=l.config.series[e].data[s])==null?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[i]:l.config.fill.type}),useRangeColor:f}}getStrokeWidth(t,e,s){let i=0;const a=this.w;return typeof this.barCtx.series[t][e]>"u"||this.barCtx.series[t][e]===null||a.config.chart.type==="bar"&&!this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,a.config.stroke.show&&(this.barCtx.isNullValue||(i=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth)),i}createBorderRadiusArr(t){var e;const s=this.w,i=!this.w.config.chart.stacked||s.config.plotOptions.bar.borderRadius<=0,a=t.length,n=((e=t[0])==null?void 0:e.length)|0,r=Array.from({length:a},()=>Array(n).fill(i?"top":"none"));if(i)return r;const o=this.w.config.chart.type;for(let l=0;l<n;l++){const c=[],h=[];let d=0;for(let f=0;f<a;f++){const u=t[f][l];u>0?(c.push(f),d++):u<0&&(h.push(f),d++)}if(c.length>0&&h.length===0)if(c.length===1)r[c[0]][l]=o==="bar"&&n===1?"top":"both";else{const f=c[0],u=c[c.length-1];for(const g of c)g===f?r[g][l]=o==="bar"&&n===1?"top":"bottom":g===u?r[g][l]="top":r[g][l]="none"}else if(h.length>0&&c.length===0)if(h.length===1)r[h[0]][l]="both";else{const f=Math.max(...h),u=Math.min(...h);for(const g of h)g===f?r[g][l]="bottom":g===u?r[g][l]="top":r[g][l]="none"}else if(c.length>0&&h.length>0){const f=c[c.length-1];for(const g of c)g===f?r[g][l]="top":r[g][l]="none";const u=Math.max(...h);for(const g of h)g===u?r[g][l]="bottom":r[g][l]="none"}else if(d===1){const f=c[0]||h[0];r[f][l]="both"}}return r}barBackground({j:t,i:e,x1:s,x2:i,y1:a,y2:n,elSeries:r}){const o=this.w,l=new I(this.barCtx.w),h=new nt(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===e){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);const d=this.barCtx.barOptions.colors.backgroundBarColors[t],f=l.drawRect(typeof s<"u"?s:0,typeof a<"u"?a:0,typeof i<"u"?i:o.layout.gridWidth,typeof n<"u"?n:o.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,d,this.barCtx.barOptions.colors.backgroundBarOpacity);r.add(f),f.node.classList.add("apexcharts-backgroundBar")}}getColumnPaths({barWidth:t,barXPosition:e,y1:s,y2:i,strokeWidth:a,isReversed:n,series:r,seriesGroup:o,realIndex:l,i:c,j:h,w:d}){var f,u,g;const p=new I(this.barCtx.w);a=Array.isArray(a)?a[l]:a,a||(a=0);let b=t,m=e;(f=d.config.series[l].data[h])!=null&&f.columnWidthOffset&&(m=e-d.config.series[l].data[h].columnWidthOffset/2,b=t+d.config.series[l].data[h].columnWidthOffset);const A=a/2,v=m+A,y=m+b-A,w=(r[c][h]>=0?1:-1)*(n?-1:1);s+=.001-A*w,i+=.001+A*w;const _=p.line(y,s),C=d.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[l][h]==="both"?" Z":" z";let S=p.move(v,s)+p.line(v,i)+p.line(y,i)+_+C;this.arrBorderRadius[l][h]!=="none"&&(S=p.roundPathCorners(S,d.config.plotOptions.bar.borderRadius));let k=null;const M=(g=(u=this.barCtx.ctx)==null?void 0:u.morphTypeChange)==null?void 0:g.getInitialPathFor(l,h);if(M?k=M:d.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(l,h,S)),k==null&&(k=p.move(v,s)+p.line(v,s)+_+_+_+_+_+p.line(v,s)+C),d.config.chart.stacked){let L=this.barCtx;L=this.barCtx[o],L.yArrj.push(i-A*w),L.yArrjF.push(Math.abs(s-i+a*w)),L.yArrjVal.push(this.barCtx.series[c][h])}return{pathTo:S,pathFrom:k}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:s,i,j:a,realIndex:n,strokeWidth:r,w:o}){var l,c;const h=new I(this.barCtx.w),d=o.layout.gridWidth/2,f=E=>Math.abs(E/this.barCtx.invertedYRatio)/2,u=f(s[i][a]),g=s[i].length-1,p=a===g,b=o.config.plotOptions.funnel.lastShape==="taper"?"taper":"flat";let m;p?m=b==="taper"?0:u:m=f(s[i][a+1]);const A=r/2,v=t+A,y=t+e-A,w=d-u,_=d+u,C=d-m,S=d+m,k=h.move(w,v)+h.line(_,v)+h.line(S,y)+h.line(C,y)+" Z";let M=null;const L=(c=(l=this.barCtx.ctx)==null?void 0:l.morphTypeChange)==null?void 0:c.getInitialPathFor(n,a);return L?M=L:o.globals.previousPaths.length>0&&(M=this.barCtx.getPreviousPath(n,a,k)),M==null&&(M=h.move(d,v)+h.line(d,v)+h.line(d,y)+h.line(d,y)+" Z"),{pathTo:k,pathFrom:M,x:_,x1:w,barXPosition:d}}computePyramidLayout(t){const e=this.w,s=e.layout.gridHeight,i=e.layout.gridWidth,a=t.map(c=>Math.abs(Number(c)||0)),n=a.reduce((c,h)=>c+h,0);if(n===0||s<=0)return a.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));const r=i/2;let o=0;const l=[];for(let c=0;c<a.length;c++){const h=o/n;o+=a[c];const d=o/n,f=h*s,u=d*s;l.push({y:f,height:u-f,topHalf:h*r,bottomHalf:d*r})}return l}getPyramidPaths({barYPosition:t,barHeight:e,topHalf:s,bottomHalf:i,realIndex:a,j:n,strokeWidth:r,w:o}){var l,c;const h=new I(this.barCtx.w),d=o.layout.gridWidth/2,f=r/2,u=t+f,g=t+e-f,p=d-s,b=d+s,m=d-i,A=d+i,v=h.move(p,u)+h.line(b,u)+h.line(A,g)+h.line(m,g)+" Z";let y=null;const w=(c=(l=this.barCtx.ctx)==null?void 0:l.morphTypeChange)==null?void 0:c.getInitialPathFor(a,n);return w?y=w:o.globals.previousPaths.length>0&&(y=this.barCtx.getPreviousPath(a,n,v)),y==null&&(y=h.move(d,u)+h.line(d,u)+h.line(d,g)+h.line(d,g)+" Z"),{pathTo:v,pathFrom:y,x:b,x1:p,barXPosition:d}}getBarpaths({barYPosition:t,barHeight:e,x1:s,x2:i,strokeWidth:a,isReversed:n,series:r,seriesGroup:o,realIndex:l,i:c,j:h,w:d}){var f,u,g;const p=new I(this.barCtx.w);a=Array.isArray(a)?a[l]:a,a||(a=0);let b=t,m=e;(f=d.config.series[l].data[h])!=null&&f.barHeightOffset&&(b=t-d.config.series[l].data[h].barHeightOffset/2,m=e+d.config.series[l].data[h].barHeightOffset);const A=a/2,v=b+A,y=b+m-A,w=(r[c][h]>=0?1:-1)*(n?-1:1);s+=.001+A*w,i+=.001-A*w;const _=this.barCtx.isFunnel,C=_?(s+i)/2:s,S=p.line(s,y),k=d.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[l][h]==="both"?" Z":" z";let M=p.move(s,v)+p.line(i,v)+p.line(i,y)+S+k;this.arrBorderRadius[l][h]!=="none"&&(M=p.roundPathCorners(M,d.config.plotOptions.bar.borderRadius));let L=null;const E=(g=(u=this.barCtx.ctx)==null?void 0:u.morphTypeChange)==null?void 0:g.getInitialPathFor(l,h);if(E?L=E:d.globals.previousPaths.length>0&&(L=this.barCtx.getPreviousPath(l,h,M)),L==null){const D=_?p.line(C,y):S;L=p.move(C,v)+p.line(C,v)+D+D+D+D+D+p.line(C,v)+k}if(d.config.chart.stacked){let D=this.barCtx;D=this.barCtx[o],D.xArrj.push(i+A*w),D.xArrjF.push(Math.abs(s-i-a*w)),D.xArrjVal.push(this.barCtx.series[c][h])}return{pathTo:M,pathFrom:L}}getXForValue(t,e,s=!0){let i=s?e:null;return typeof t<"u"&&t!==null&&(i=e+t/this.barCtx.invertedYRatio-(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)*2),i}getYForValue(t,e,s,i=!0){let a=i?e:null;return typeof t<"u"&&t!==null&&(a=e-t/this.barCtx.yRatio[s]+(this.barCtx.isReversed?t/this.barCtx.yRatio[s]:0)*2),a}getGoalValues(t,e,s,i,a,n){const r=this.w,o=[],l=(c,h)=>{o.push({[t]:t==="x"?this.getXForValue(c,e,!1):this.getYForValue(c,s,n,!1),attrs:h})};if(r.seriesData.seriesGoals[i]&&r.seriesData.seriesGoals[i][a]&&Array.isArray(r.seriesData.seriesGoals[i][a])&&r.seriesData.seriesGoals[i][a].forEac
1381h(c=>{l(c.value,c)}),this.barCtx.barOptions.isDumbbell&&r.rangeData.seriesRange.length){const c=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:r.globals.colors,h={strokeHeight:t==="x"?0:r.globals.markers.size[i],strokeWidth:t==="x"?r.globals.markers.size[i]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(c[i])?c[i][0]:c[i]};l(r.rangeData.seriesRangeStart[i][a],h),l(r.rangeData.seriesRangeEnd[i][a],Z(G({},h),{strokeColor:Array.isArray(c[i])?c[i][1]:c[i]}))}return o}drawGoalLine({barXPosition:t,barYPosition:e,goalX:s,goalY:i,barWidth:a,barHeight:n}){if(!(Array.isArray(s)&&s.length>0||Array.isArray(i)&&i.length>0))return null;const o=new I(this.barCtx.w),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path",`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let c=null;return this.barCtx.isHorizontal?Array.isArray(s)&&s.forEach(h=>{if(h.x>=-1&&h.x<=o.w.layout.gridWidth+1){const d=typeof h.attrs.strokeHeight<"u"?h.attrs.strokeHeight:n/2,f=e+d+n/2;c=o.drawLine(h.x,f-d*2,h.x,f,h.attrs.strokeColor?h.attrs.strokeColor:void 0,h.attrs.strokeDashArray,h.attrs.strokeWidth?h.attrs.strokeWidth:2,h.attrs.strokeLineCap),l.add(c)}}):Array.isArray(i)&&i.forEach(h=>{if(h.y>=-1&&h.y<=o.w.layout.gridHeight+1){const d=typeof h.attrs.strokeWidth<"u"?h.attrs.strokeWidth:a/2,f=t+d+a/2;c=o.drawLine(f-d*2,h.y,f,h.y,h.attrs.strokeColor?h.attrs.strokeColor:void 0,h.attrs.strokeDashArray,h.attrs.strokeHeight?h.attrs.strokeHeight:2,h.attrs.strokeLineCap),l.add(c)}}),l}drawBarShadow({prevPaths:t,currPaths:e,color:s,realIndex:i,j:a}){const n=this.w,{x:r,x1:o,barYPosition:l}=t,{x:c,x1:h,barYPosition:d}=e,f=l+e.barHeight,u=new I(this.barCtx.w),g=new R,p=u.move(o,f)+u.line(r,f)+u.line(c,d)+u.line(h,d)+u.line(o,f)+(n.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[i][a]==="both"?" Z":" z");return u.drawPath({d:p,fill:g.shadeColor(.5,R.rgb2hex(s)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}getZeroValueEncounters({i:t,j:e}){var s;const i=this.w;let a=0,n=0;return(i.config.plotOptions.bar.horizontal?i.seriesData.series.map((o,l)=>l):((s=i.globals.columnSeries)==null?void 0:s.i.map(o=>o))||[]).forEach(o=>{const l=i.globals.seriesPercent[o][e];l&&a++,o<t&&l===0&&n++}),{nonZeroColumns:a,zeroEncounters:n}}getGroupIndex(t){const e=this.w,s=e.labelData.seriesGroups.findIndex(n=>n.indexOf(e.seriesData.seriesNames[t])>-1),i=this.barCtx.columnGroupIndices;let a=i.indexOf(s);return a<0&&(i.push(s),a=i.length-1),{groupIndex:s,columnGroupIndex:a}}};class Ct{constructor(t,e,s){this.ctx=e,this.w=t,this.barOptions=t.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=t.config.stroke.width,this.isNullValue=!1,this.isRangeBar=t.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.rangeData.seriesRange.length&&t.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.isPyramid=this.barOptions.isPyramid,this.pyramidLayout=null,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,this.xyRatios!==null&&(this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.invertedXRatio=s.invertedXRatio,this.invertedYRatio=s.invertedYRatio,this.baseLineY=s.baseLineY,this.baseLineInvertedY=s.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this._prevKeyed=null,this._ltCache=null,this._layoutShiftCache=null,this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;const i=new nt(this.w);this.lastActiveBarSerieIndex=i.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];const a=i.getBarSeriesIndices(),n=new rt(this.w);this.stackedSeriesTotals=n.getStackedSeriesTotals(this.w.config.series.map((r,o)=>a.indexOf(o)===-1?o:-1).filter(r=>r!==-1)),this.barHelpers=new Go(this)}draw(t,e){var s,i,a;const n=this.w,r=new I(this.w),o=new rt(this.w);t=o.getLogSeries(t),this.series=t,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const l=r.group({class:"apexcharts-bar-series apexcharts-plot-series"});n.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(let c=0,h=0;c<t.length;c++,h++){let d,f;const u=[],g=[],p=n.globals.comboCharts?e[c]:c,{columnGroupIndex:b}=this.barHelpers.getGroupIndex(p),m=r.group({class:"apexcharts-series",rel:c+1,seriesName:R.escapeString(n.seriesData.seriesNames[p]),"data:realIndex":p});nt.addCollapsedClassToSeries(this.w,m,p),t[c].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=n.globals.seriesYAxisReverseMap[p],this.translationsIndex=p);const A=this.translationsIndex;this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computeP
1381yramidLayout(t[c]));const v=this.barHelpers.initialPositions(p),{y,yDivision:w,zeroW:_,x:C,xDivision:S,zeroH:k}=v;let M=v.barHeight,L=v.barWidth;f=y,d=C,this.isHorizontal||g.push(d+(L??0)/2);const E=r.group({class:"apexcharts-datalabels","data:realIndex":p});n.globals.delayedElements.push({el:E.node,holdUntilComplete:!((s=n.config.dataLabels.animate)!=null&&s.enabled)&&this.isLengthTransition(p)}),E.node.classList.add("apexcharts-element-hidden");const D=r.group({class:"apexcharts-bar-goals-markers"}),T=r.group({class:"apexcharts-bar-shadows"});n.globals.delayedElements.push({el:T.node}),T.node.classList.add("apexcharts-element-hidden");for(let F=0;F<t[c].length;F++){const P=this.barHelpers.getStrokeWidth(c,F,p);let Y=null;const z={indexes:{i:c,j:F,realIndex:p,translationsIndex:A,bc:h},x:d,y:f,strokeWidth:P,elSeries:m};this.isHorizontal?(Y=this.drawBarPaths(Z(G({},z),{barHeight:M,zeroW:_,yDivision:w})),L=this.series[c][F]/this.invertedYRatio):(Y=this.drawColumnPaths(Z(G({},z),{xDivision:S,barWidth:L,zeroH:k})),M=this.series[c][F]/this.yRatio[A]);const W=this.barHelpers.getPathFillColor(t,c,F,p);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&((i=n.config.plotOptions.funnel)==null?void 0:i.shape)!=="trapezoid"&&this.pathArr.length&&F>0){const N=this.barHelpers.drawBarShadow({color:typeof W.color=="string"&&((a=W.color)==null?void 0:a.indexOf("url"))===-1?W.color:R.hexToRgba(n.globals.colors[c]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:Y,realIndex:p,j:F});T.add(N),n.config.chart.dropShadow.enabled&&new dt(this.w).dropShadow(N,n.config.chart.dropShadow,p)}this.pathArr.push(Y);const O=this.barHelpers.drawGoalLine({barXPosition:Y.barXPosition,barYPosition:Y.barYPosition,goalX:Y.goalX,goalY:Y.goalY,barHeight:M,barWidth:L});O&&D.add(O),f=Y.y,d=Y.x,F>0&&g.push(d+(L??0)/2),u.push(f),this.renderSeries(Z(G({realIndex:p,pathFill:W.color},W.useRangeColor?{lineFill:W.color}:{}),{j:F,i:c,columnGroupIndex:b,pathFrom:Y.pathFrom,pathTo:Y.pathTo,strokeWidth:P,elSeries:m,x:d,y:f,series:t,barHeight:Math.abs(Y.barHeight?Y.barHeight:M),barWidth:Math.abs(Y.barWidth?Y.barWidth:L),elDataLabelsWrap:E,elGoalsMarkers:D,elBarShadows:T,visibleSeries:this.visibleI,type:"bar"}))}if(n.globals.seriesXvalues[p]=g,n.globals.seriesYvalues[p]=u,n.globals.previousPaths.length>0){const F=[];for(let P=0;P<t[c].length;P++)F.push(Qt(n,p,P));dn({w:n,elSeries:m,record:this._prevRecord(p),newKeys:F,isHorizontal:this.isHorizontal,speed:n.config.chart.animations.dynamicAnimation.speed})}l.add(m)}return l}renderSeries({realIndex:t,pathFill:e,lineFill:s,j:i,i:a,columnGroupIndex:n,pathFrom:r,pathTo:o,strokeWidth:l,elSeries:c,x:h,y:d,y1:f,y2:u,series:g,barHeight:p,barWidth:b,barXPosition:m,barYPosition:A,elDataLabelsWrap:v,elGoalsMarkers:y,elBarShadows:w,visibleSeries:_,type:C,classes:S}){var k;const M=this.w,L=new I(this.w,this.ctx),E=Gt(this.ctx,L);let D=!1;if(c._bindingsDelegated||(c._bindingsDelegated=!0,L.setupEventDelegation(c,`.apexcharts-${C}-area`)),!s){let O=function(X){const V=M.config.stroke.colors;let U;return Array.isArray(V)&&V.length>0&&(U=V[X],U||(U=""),typeof U=="function")?U({value:M.seriesData.series[X][i],dataPointIndex:i,w:M}):U};const N=typeof M.globals.stroke.colors[t]=="function"?O(t):M.globals.stroke.colors[t];s=this.barOptions.distributed?M.globals.stroke.colors[i]:N}const F=new Vo(this).handleBarDataLabels({x:h,y:d,y1:f,y2:u,i:a,j:i,series:g,realIndex:t,columnGroupIndex:n,barHeight:p,barWidth:b,barXPosition:m,barYPosition:A,visibleSeries:_});M.globals.isBarHorizontal||(F.dataLabelsPos.dataLabelsX+Math.max(b,M.globals.barPadForNumericAxis)<0||F.dataLabelsPos.dataLabelsX-Math.max(b,M.globals.barPadForNumericAxis)>M.layout.gridWidth)&&(D=!0),M.config.series[a].data[i]&&M.config.series[a].data[i].strokeColor&&(s=M.config.series[a].data[i].strokeColor),this.isNullValue&&(e="none");const P=M.config.chart.animations,Y=P.animateGradually,z=Y&&Y.enabled!==!1&&!(M.globals.dataChanged&&this.isLayoutShift(t));let W=0;if(z){const O=M.globals.dataPoints||1,N=Y.delay||0,X=Math.min(N,P.speed*.5/Math.max(1,O));let V=Ds({style:"sequential",index:i,baseDelay:X});M.config.chart.stacked&&(V+=a*X*.5),W=V/(N||1)}if(!D){const N=((k=this.ctx.morphTypeChange)==null?void 0:k.isActive())===!0?this.ctx.morphTypeChange.getSpeed():M.config.chart.animations.dynamicAnimation.speed,X=E.renderPaths({i:a,j:i,realIndex:t,pathFrom:r,pathTo:o,stroke:s,strokeWidth:l,strokeLineCap:M.config.stroke.lineCap,fill:e,animationDelay:W,initialSpeed:M.config.chart.animations.speed,dataChangeSpeed:N,className:`apexcharts-${C}-area ${S}`,chartType:C,bindEventsOnPaths:!1});X.attr("clip-path",`url(#gridRectBarMask${M.globals.cuid})`);const V=M.config.forecastDataPoints;V.count>0&&i>=M.globals.dataPoints-V.count&&(X.node.setAttribute("stroke-dasharray",V.dashArray),X.node.setAttribute("stroke-width",V.strokeWidth),X.node.setAttribute("fill-opacity",V.fillOpacity)),typeof f<"u"&&typeof u<"u"&&(X.attr("data-range-y1",f),X.attr("data-range-y2",u)),new dt(this.w).setSelectionFilter(X,t,i),c.add(X),X.attr({cy:F.dataLabelsPos.bcy,cx:F.dataLabelsPos.bcx,j:i,val:M.seriesData.series[a][i],barHeight:p,barWidth:b,"data:pathKey":Qt(M,t,i)}),E.kind==="canvas"&&(M.globals.barCanvasCoords||(M.globals.barCanvasCoords={}),M.globals.barCanvasCoords[t]||(M.globals.barCanvasCoords[t]={}),M.globals.barCanvasCoords[t][i]={cx:F.dataLabelsPos.bcx,cy:F.dataLabelsPos.bcy,barWidth:b}),F.dataLabels!==null&&v.add(F.dataLabels),F.totalDataLabels&&v.add(F.totalDataLabels),c.add(v),y&&c.add(y),w&&c.add(w)}return c}drawBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:i,x:a,y:n,yDivision:r,elSeries:o}){const l=this.w,c=t.i,h=t.j;let d;if(l.axisFlags.isXNumeric)n=(l.seriesData.seriesX[c][h]-l.globals.minX)/this.invertedXRatio-e,d=n+e*this.visibleI;else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:b,zeroEncounters:m}=this.barHelpers.getZeroValueEncounters({i:c,j:h});b>0&&(e=this.seriesLen*e/b),d=n+e*this.visibleI,d-=e*m}else d=n+e*this.visibleI;const f=this.isFunnel&&l.config.plotOptions.funnel.shape==="trapezoid",u=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[h]:null,g=!!u;if(u)d=u.y,e=u.height;else if(this.isFunnel&&!f){const b=i??0;i=b-(this.barHelpers.getXForValue(this.series[c][h],b)-b)/2}a=this.barHelpers.getXForValue(this.series[c][h],i??0);let p;return u?p=this.barHelpers.getPyramidPaths({barYPosition:d,barHeight:e,topHalf:u.topHalf,bottomHalf:u.bottomHalf,realIndex:t.realIndex,j:h,strokeWidth:s,w:l}):f?p=this.barHelpers.getFunnelTrapezoidPaths({barYPosition:d,barHeight:e,series:this.series,i:c,j:h,realIndex:t.realIndex,strokeWidth:s,w:l}):p=this.barHelpers.getBarpaths({barYPosition:d,barHeight:e,x1:i,x2:a,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:c,j:h,w:l}),(f||g)&&(i=p.x1,a=p.x),!l.axisFlags.isXNumeric&&!g&&(n=n+r),g&&(n=d),this.barHelpers.barBackgroun
1381d({j:h,i:c,y1:d-e*this.visibleI,y2:e*this.seriesLen,elSeries:o}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x1:i,x:a,y:n,goalX:this.barHelpers.getGoalValues("x",i,null,t.realIndex,h,0),barYPosition:d,barHeight:e}}drawColumnPaths({indexes:t,x:e,y:s,xDivision:i,barWidth:a,zeroH:n,strokeWidth:r,elSeries:o}){const l=this.w,c=t.realIndex,h=t.translationsIndex,d=t.i,f=t.j,u=t.bc;let g;if(l.axisFlags.isXNumeric){const b=this.getBarXForNumericXAxis({x:e,j:f,realIndex:c,barWidth:a});e=b.x,g=b.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:b,zeroEncounters:m}=this.barHelpers.getZeroValueEncounters({i:d,j:f});b>0&&(a=this.seriesLen*a/b),g=e+a*this.visibleI,g-=a*m}else g=e+a*this.visibleI;s=this.barHelpers.getYForValue(this.series[d][f],n,h);const p=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:a,y1:n,y2:s,strokeWidth:r,isReversed:this.isReversed,series:this.series,realIndex:c,i:d,j:f,w:l});return l.axisFlags.isXNumeric||(e=e+i),this.barHelpers.barBackground({bc:u,j:f,i:d,x1:g-r/2-a*this.visibleI,x2:a*this.seriesLen+r/2,elSeries:o}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x:e,y:s,goalY:this.barHelpers.getGoalValues("y",null,n,c,f,h),barXPosition:g,barWidth:a}}getBarXForNumericXAxis({x:t,barWidth:e,realIndex:s,j:i}){const a=this.w;let n=s;return a.seriesData.seriesX[s].length||(n=a.globals.maxValsInArrayIndex),R.isNumber(a.seriesData.seriesX[n][i])&&(t=_t.dataXToPx(a,a.seriesData.seriesX[n][i])-e*this.seriesLen/2),{barXPosition:t+e*this.visibleI,x:t}}_prevRecord(t){const e=this.w;let s=null;for(let i=0;i<e.globals.previousPaths.length;i++){const a=e.globals.previousPaths[i];a.paths&&a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(String(t),10)&&(s=a)}return s}_prevKeyedPaths(t){if(this._prevKeyed||(this._prevKeyed={}),this._prevKeyed[t]!==void 0)return this._prevKeyed[t];const e=this._prevRecord(t);let s=null;if(e&&e.paths.every(i=>i.key!=null)){const i=new Map;e.paths.forEach(a=>{i.set(a.key,a)}),s=i}return this._prevKeyed[t]=s,s}isLengthTransition(t){var e,s;if(this._ltCache||(this._ltCache={}),this._ltCache[t]!==void 0)return this._ltCache[t];const i=this.w;let a=!1;if(Wt(i)&&i.globals.previousPaths.length>0){const n=this._prevRecord(t),r=(s=(e=i.seriesData.series[t])==null?void 0:e.length)!=null?s:0;if(!n)a=r>0;else if(n.paths.length!==r)a=!0;else{const o=this._prevKeyedPaths(t);if(o){for(let l=0;l<r;l++)if(!o.has(Qt(i,t,l))){a=!0;break}}}}return this._ltCache[t]=a,a}isLayoutShift(t){if(this.isLengthTransition(t))return!0;if(this._layoutShiftCache||(this._layoutShiftCache={}),this._layoutShiftCache[t]!==void 0)return this._layoutShiftCache[t];const e=ye(this.w,t,!0,!0),s=!!(e&&e.join.changed);return this._layoutShiftCache[t]=s,s}getPreviousPath(t,e,s){const i=this.w,a=this._prevRecord(t);if(!a)return Wt(i)?null:s;let n=null,r=!1;const o=this._prevKeyedPaths(t);if(o){const l=o.get(Qt(i,t,e));l?n=l.d:r=!0}else typeof a.paths[e]<"u"?n=a.paths[e].d:r=!0;return n&&Ct.pathCommandCount(n)===Ct.pathCommandCount(s)?n:r&&Wt(i)?null:s}static pathCommandCount(t){if(!t)return 0;const e=t.match(/[A-Za-z]/g);return e?e.length:0}}class Uo extends Ct{draw(t,e){const s=this.w;this.graphics=new I(this.w),this.bar=new Ct(this.w,this.ctx,this.xyRatios);const i=new rt(this.w);t=i.getLogSeries(t),this.yRatio=i.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),s.c
1381onfig.chart.stackType==="100%"&&(t=s.globals.comboCharts?e.map(o=>s.globals.seriesPercent[o]):s.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);const a=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"});let n=0,r=0;for(let o=0,l=0;o<t.length;o++,l++){const c=s.globals.comboCharts?e[o]:o,{groupIndex:h,columnGroupIndex:d}=this.barHelpers.getGroupIndex(c);this.groupCtx=this[s.labelData.seriesGroups[h]];const f=[],u=[];let g=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[c][0],g=c),this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed;let p=this.graphics.group({class:"apexcharts-series",seriesName:R.escapeString(s.seriesData.seriesNames[c]),rel:o+1,"data:realIndex":c});nt.addCollapsedClassToSeries(this.w,p,c);const b=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":c}),m=this.graphics.group({class:"apexcharts-bar-goals-markers"}),A=this.initialPositions(n,r,void 0,void 0,void 0,void 0,g),{xDivision:v,yDivision:y,zeroH:w,zeroW:_}=A;let C=A.barHeight,S=A.barWidth;r=A.y,n=A.x,s.globals.barHeight=C,s.globals.barWidth=S,this.barHelpers.initializeStackedXYVars(this),this.groupCtx.prevY.length===1&&this.groupCtx.prevY[0].every(k=>isNaN(k))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>w),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let k=0;k<s.globals.dataPoints;k++){const M=this.barHelpers.getStrokeWidth(o,k,c),L={indexes:{i:o,j:k,realIndex:c,translationsIndex:g,bc:l},strokeWidth:M,x:n,y:r,elSeries:p,columnGroupIndex:d,seriesGroup:s.labelData.seriesGroups[h]};let E=null;this.isHorizontal?(E=this.drawStackedBarPaths(Z(G({},L),{zeroW:_,barHeight:C,yDivision:y})),S=this.series[o][k]/this.invertedYRatio):(E=this.drawStackedColumnPaths(Z(G({},L),{xDivision:v,barWidth:S,zeroH:w})),C=this.series[o][k]/this.yRatio[g]);const D=this.barHelpers.drawGoalLine({barXPosition:E.barXPosition,barYPosition:E.barYPosition,goalX:E.goalX,goalY:E.goalY,barHeight:C,barWidth:S});D&&m.add(D),r=E.y,n=E.x,f.push(n),u.push(r);const T=this.barHelpers.getPathFillColor(t,o,k,c);let F="";const P=s.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";(this.barHelpers.arrBorderRadius[c][k]==="bottom"&&s.seriesData.series[c][k]>0||this.barHelpers.arrBorderRadius[c][k]==="top"&&s.seriesData.series[c][k]<0)&&(F=P),p=this.renderSeries(Z(G({realIndex:c,pathFill:T.color},T.useRangeColor?{lineFill:T.color}:{}),{j:k,i:o,columnGroupIndex:d,pathFrom:E.pathFrom,pathTo:E.pathTo,strokeWidth:M,elSeries:p,x:n,y:r,series:t,barHeight:C,barWidth:S,elDataLabelsWrap:b,elGoalsMarkers:m,type:"bar",visibleSeries:d,classes:F}))}s.globals.seriesXvalues[c]=f,s.globals.seriesYvalues[c]=u,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),a.add(p)}return a}initialPositions(t,e,s,i,a,n,r){const o=this.w;let l,c;if(this.isHorizontal){i=o.layout.gridHeight/o.globals.dataPoints;const d=o.config.plotOptions.bar.barHeight;String(d).indexOf("%")===-1?l=parseInt(d,10):l=i*parseInt(d,10)/100,n=o.globals.padHorizontal+(this.isReversed?o.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),e=(i-l)/2}else{s=o.layout.gridWidth/o.globals.dataPoints,c=s;const d=o.config.plotOptions.bar.columnWidth;o.axisFlags.isXNumeric&&o.globals.dataPoints>1?(s=o.globals.minXDiff/this.xRatio,c=s*parseInt(this.barOptions.columnWidth,10)/100):String(d).indexOf("%")===-1?c=parseInt(d,10):c*=parseInt(d,10)/100,this.isReversed?a=this.baseLineY[r]:a=o.layout.gridHeight-this.baseLineY[r],t=o.globals.padHorizontal+(s-c)/2}const h=o.globals.barGroups.length||1;return{x:t,y:e,yDivision:i,xDivision:s,barHeight:(l??0)/h,barWidth:(c??0)/h,zeroH:a,zeroW:n}}drawStackedBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:i,x:a,y:n,columnGroupIndex:r,seriesGroup:o,yDivision:l,elSeries:c}){var h,d,f,u,g;const p=this.w,b=n+r*e;let m;const A=t.i,v=t.j,y=t.realIndex,w=t.translationsIndex;let _=0;for(let k=0;k<this.groupCtx.prevXF.length;k++)_=_+this.groupCtx.prevXF[k][v];let C=A;if(p.config.series[y].name&&(C=o.indexOf(p.config.series[y].name)),C>0){let k=i;this.groupCtx.prevXVal[C-1][v]<0?k=((h=this.series[A])==null?void 0:h[v])>=0?this.groupCtx.prevX[C-1][v]+_-(this.isReversed?_:0)*2:this.groupCtx.prevX[C-1][v]:this.groupCtx.prevXVal[C-1][v]>=0&&(k=((d=this.series[A])==null?void 0:d[v])>=0?this.groupCtx.prevX[C-1][v]:this.groupCtx.prevX[C-1][v]-_+(this.isReversed?_:0)*2),m=k}else m=i;((f=this.series[A])==null?void 0:f[v])===null?a=m:a=m+((u=this.series[A])==null?void 0:u[v])/this.invertedYRatio-(this.isReversed?((g=this.series[A])==null?void 0:g[v])/this.invertedYRatio:0)*2;const S=this.barHelpers.getBarpaths({barYPosition:b,barHeight:e,x1:m,x2:a,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,seriesGroup:o,i:A,j:v,w:p});
1381return this.barHelpers.barBackground({j:v,i:A,y1:b,y2:e,elSeries:c}),n=n+l,{pathTo:S.pathTo,pathFrom:S.pathFrom,goalX:this.barHelpers.getGoalValues("x",i,null,y,v,w),barXPosition:m,barYPosition:b,x:a,y:n}}drawStackedColumnPaths({indexes:t,x:e,y:s,xDivision:i,barWidth:a,zeroH:n,columnGroupIndex:r,seriesGroup:o,elSeries:l}){var c,h,d,f,u,g,p,b,m;const A=this.w,v=t.i,y=t.j,w=t.bc,_=t.realIndex,C=t.translationsIndex;if(A.axisFlags.isXNumeric){let D=A.seriesData.seriesX[_][y];D||(D=0),e=(D-A.globals.minX)/this.xRatio-a/2*A.globals.barGroups.length}const S=e+r*a;let k,M=0;for(let D=0;D<this.groupCtx.prevYF.length;D++)M=M+(isNaN(this.groupCtx.prevYF[D][y])?0:this.groupCtx.prevYF[D][y]);let L=v;if(o&&(L=o.indexOf(A.seriesData.seriesNames[_])),L>0&&!A.axisFlags.isXNumeric||L>0&&A.axisFlags.isXNumeric&&A.seriesData.seriesX[_-1][y]===A.seriesData.seriesX[_][y]){let D,T;const F=Math.min(this.yRatio.length+1,_+1);if(this.groupCtx.prevY[L-1]!==void 0&&this.groupCtx.prevY[L-1].length){for(let P=1;P<F;P++)if(!isNaN((c=this.groupCtx.prevY[L-P])==null?void 0:c[y])){T=this.groupCtx.prevY[L-P][y];break}}for(let P=1;P<F;P++)if(((h=this.groupCtx.prevYVal[L-P])==null?void 0:h[y])<0){D=((d=this.series[v])==null?void 0:d[y])>=0?T-M+(this.isReversed?M:0)*2:T;break}else if(((f=this.groupCtx.prevYVal[L-P])==null?void 0:f[y])>=0){D=((u=this.series[v])==null?void 0:u[y])>=0?T:T+M-(this.isReversed?M:0)*2;break}typeof D>"u"&&(D=A.layout.gridHeight),(g=this.groupCtx.prevYF[0])!=null&&g.every(P=>P===0)&&this.groupCtx.prevYF.slice(1,L).every(P=>P.every(Y=>isNaN(Y)))?k=n:k=D}else k=n;(p=this.series[v])!=null&&p[y]?s=k-((b=this.series[v])==null?void 0:b[y])/this.yRatio[C]+(this.isReversed?((m=this.series[v])==null?void 0:m[y])/this.yRatio[C]:0)*2:s=k;const E=this.barHelpers.getColumnPaths({barXPosition:S,barWidth:a,y1:k,y2:s,yRatio:this.yRatio[C],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:o,realIndex:t.realIndex,i:v,j:y,w:A});return this.barHelpers.barBackground({bc:w,j:y,i:v,x1:S,x2:a,elSeries:l}),{pathTo:E.pathTo,pathFrom:E.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,n,_,y,0),barXPosition:S,x:A.axisFlags.isXNumeric?e:e+i,y:s}}}function wa({w:x,points:t,seedA:e,seedB:s,center:i,halfExtent:a,alongFn:n,isHorizontal:r,options:o,clampAt:l}){const c=o;if(!c||c.show===!1)return[];if(!t||!t.length)return[];const h=c.maxPoints||3e3,d=t.length>h?Math.ceil(t.length/h):1,f=c.size!=null?c.size:2.5,u=c.jitter!=null?c.jitter:.5,g=a*u,p=c.constrainToViolin!==!1&&typeof l=="function",b=c.shape==="square",m=c.colorScale,A=m&&Array.isArray(m.colors)&&m.colors.length>0,v=A?Math.max(2,m.steps||24):1,y=A&&m.min!=null?m.min:x.globals.minY,_=(A&&m.max!=null?m.max:x.globals.maxY)-y||1,C=A?new Array(v).fill(""):[""];for(let k=0;k<t.length;k+=d){const M=t[k],L=n(M);let E=(Ss(e*7919+s*100003+k)-.5)*2*g;if(p){const P=l(M);E>P&&(E=P),E<-P&&(E=-P)}const D=r?L:i+E,T=r?i+E:L,F=b?Zo(D,T,f):jo(D,T,f);if(A){let P=(M-y)/_;P<0&&(P=0),P>1&&(P=1),C[Math.round(P*(v-1))]+=F}else C[0]+=F}if(!A)return C[0]?[{fill:null,d:C[0]}]:[];const S=[];for(let k=0;k<v;k++)C[k]&&S.push({fill:qo(m.colors,k/(v-1)),d:C[k]});return S}function va({graphics:x,w:t,elSeries:e,pointsByCat:s,options:i,distributed:a,realIndex:n,wrapClass:r,pointClass:o}){if(!i||i.show===!1||!s.length)return;const l=i.opacity!=null?i.opacity:.9,c=i.strokeColor!=null?i.strokeColor:"#fff",h=i.strokeWidth!=null?i.strokeWidth:1,d=t.config.chart.animations.enabled&&!t.globals.resized&&!t.globals.dataChanged,f=x.group({class:d?`${r} apexcharts-element-hidden`:r});d&&t.globals.delayedElements.push({el:f.node}),s.forEach(({groups:u,j:g})=>{const p=a?t.globals.colors[g]:t.globals.colors[n],b=i.fillColor,m=b==="series"?p:b==="series-dark"?Li(p,.45):b||Li(p,.45);u.forEach(A=>{const v=x.drawPath({d:A.d,fill:A.fill!=null?A.fill:m,stroke:h>0?c:"none",strokeWidth:h,fillOpacity:l,classes:o});v.attr("data:realIndex",n),v.attr("j",g),v.attr("clip-path",`url(#gridRectBarMask${t.globals.cuid})`),v.node.style.pointerEvents="none",f.add(v)})}),e.add(f)}function Li(x,t){const e=R.parseHex(x);if(!e)return x;const s=Math.max(0,1-t);return`rgb(${Math.round(e[0]*s)},${Math.round(e[1]*s)},${Math.round(e[2]*s)})`}function qo(x,t){if(!x.length)return"#000";if(x.length===1)return x[0];const e=Math.max(0,Math.min(1,t))*(x.length-1),s=Math.floor(e),i=e-s,a=R.parseHex(x[s])||[0,0,0],n=R.parseHex(x[Math.min(s+1,x.length-1)])||a,r=(o,l)=>Math.round(o+(l-o)*i);return`rgb(${r(a[0],n[0])},${r(a[1],n[1])},${r(a[2],n[2])})`}function Ss(x){let t=(x^2654435769)>>>0;return t=Math.imul(t^t>>>16,73244475),t=Math.imul(t^t>>>16,73244475),((t^t>>>16)>>>0)/4294967296}function jo(x,t,e){return`M ${x-e} ${t} a ${e} ${e} 0 1 0 ${2*e} 0 a ${e} ${e} 0 1 0 ${-2*e} 0 `}function Zo(x,t,e){return`M ${x-e} ${t-e} h ${2*e} v ${2*e} h ${-2*e} z `}class Di extends Ct{draw(t,e,s){var i;const a=this.w,n=new I(this.w),r=a.globals.comboCharts?e:a.config.chart.type,o=new pt(this.w);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=a.config.plotOptions.bar.horizontal,this.isOHLC=this.candlestickOptions&&this.candlestickOptions.type==="ohlc",this.coreUtils=new rt(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const l=n.group({class:`apexcharts-${r}-series apexcharts-plot-series`});for(let c=0;c<t.length;c++){this.isBoxPlot=a.config.chart.type==="boxPlot"||a.config.series[c].type==="boxPlot";let h,d;const f=[],u=[],g=a.globals.comboCharts?s[c]:c,{columnGroupIndex:p}=this.barHelpers.getGroupIndex(g),b=n.group({class:"apexcharts-series",seriesName:R.escapeString(a.seriesData.seriesNames[g]),rel:c+1,"data:realIndex":g});nt.addCollapsedClassToSeries(this.w,b,g),t[c].length>0&&(this.visibleI=this.visibleI+1);let m=0;this.yRatio.length>1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[g][0],m=g);const A=this.barHelpers.initialPositions(g),{y:v,barHeight:y,yDivision:w,zeroW:_,x:C,barWidth:S,xDivision:k,zeroH:M}=A;d=v,h=C,u.push(h+(S??0)/2);const L=n.group({class:"apexcharts-datalabels","data:realIndex":g}),E=n.group({class:"apexcharts-bar-goals-markers"}),D=this.isBoxPlot?this.boxOptions.points:null,T=[],F=a.layout.gridWidth,P=S??0;for(let Y=0;Y<a.globals.dataPoints;Y++){const z=this.barHelpers.getStrokeWidth(c,Y,g);let W=null;const O={indexes:{i:c,j:Y,realIndex:g,translationsIndex:m},x:h,y:d,strokeWidth:z,elSeries:b};if(this.isHorizontal?W=this.drawHorizontalBoxPaths(Z(G({},O),{yDivision:w,barHeight:y,zeroW:_})):W=this.drawVerticalBoxPaths(Z(G({},O),{xDivision:k,barWidth:S,zeroH:M,cullBounds:{lo:-P,hi:F+P}})),d=W.y,h=W.x,Y>0&&u.push(h+(S??0)/2),f.push(d),W.culled)continue;const N=this.barHelpers.drawGoalLine({barXPosition:W.barXPosition,barYPosition:W.barYPosition,goalX:W.goalX,goalY:W.goalY,barHeight:y,barWidth:S});if(N&&E.add(N),W.pathTo.forEach((X,V)=>{const U=!this.isBoxPlot&&this.candlestickOptions.wick.useFillColor?W.color[V]:a.globals.stroke.colors[c],$=o.fillPath({seriesNumber:g,dataPointIndex:Y,color:W.color[V],value:t[c][Y]});this.renderSeries({realIndex:g,pathFill:$,lineFill:U,j:Y,i:c,pathFrom:W.pathFrom,pathTo:X,strokeWidth:z,elSeries:b,x:h,y:d,series:t,columnGroupIndex:p,barHeight:y,barWidth:S,elDataLabelsWrap:L,elGoalsMarkers:E,visibleSeries:this.visibleI,type:a.config.chart.type})}),D&&D.show!==!1){const X=(i=a.candleData.seriesBoxPoints[g])==null?void 0:i[Y];if(X&&X.length){const V=Q=>this.coreUtils.getLogValAtSeriesIndex(Q,g);let U,$,q;if(this.isHorizontal){const Q=this.invertedYRatio,et=y??0,J=_??0;U=W.barYPosition+et/2,$=et/2,q=bt=>J+V(bt)/Q}else{const Q=this.yRatio[m],et=S??0,J=M??0;U=W.barXPosition+et/2,$=et/2,q=bt=>J-V(bt)/Q}const K=wa({w:a,points:X,seedA:g,seedB:Y,center:U,halfExtent:$,alongFn:q,isHorizontal:this.isHorizontal,options:D});K.length&&T.push({groups:K,j:Y})}}}D&&va({graphics:n,w:a,elSeries:b,pointsByCat:T,options:D,distributed:a.config.plotOptions.bar.distributed,realIndex:g,wrapClass:"apexcharts-boxPlot-points-wrap",pointClass:"apexcharts-boxPlot-points"}),a.globals.seriesXvalues[g]=u,a.globals.seriesYvalues[g]=f,l.add(b)}return l}drawVerticalBoxPaths({indexes:t,x:e,xDivision:s,barWidth:i,zeroH:a,strokeWidth:n,cullBounds:r=null}){var o,l;const c=this.w,h=new I(this.w),d=t.i,f=t.j,{colors:u}=c.config.plotOptions.candlestick,{colors:g}=this.boxOptions,p=t.realIndex,b=T=>Array.isArray(T)?T[p]:T,m=b(u.upward),A=b(u.downward),v=this.yRatio[t.translationsIndex],y=this.getOHLCValue(p,f);let w=a,_=a,C=y.o<y.c?[m]:[A];this.isBoxPlot&&(C=[b(g.lower),b(g.upper)]);let S=Math.min(y.o,y.c),k=Math.max(y.o,y.c),M=y.m;c.axisFlags.isXNumeric&&(e=(c.seriesData.seriesX[p][f]-c.globals.minX)/this.xRatio-i/2);const L=e+i*this.visibleI;if(typeof((o=this.series[d])==null?void 0:o[f])>"u"||((l=this.series[d])==null?void 0:l[f])===null?(S=a,k=a):(S=a-S/v,k=a-k/v,w=a-y.h/v,_=a-y.l/v,M=a-y.m/v),r&&(L+i<r.lo||L>r.hi))return{pathTo:null,pathFrom:null,x:c.axisFlags.isXNumeric?e:e+s,y:k,barXPosition:L,color:C,culled:!0};let E;if(this.isOHLC){const T=L+i/2,F=a-y.o/v,P=a-y.c/v;E=[h.move(T,w)+h.line(T,_)+h.move(T,F)+h.line(L,F)+h.move(T,P)+h.line(L+i,P)]}else this.isBoxPlot?E=[h.move(L,S)+h.line(L+i/2,S)+h.line(L+i/2,w)+h.line(L+i/4,w)+h.line(L+i-i/4,w)+h.line(L+i/2,w)+h.line(L+i/2,S)+h.line(L+i,S)+h.line(L+i,M)+h.line(L,M)+h.line(L,S+n/2),h.move(L,M)+h.line(L+i,M)+h.line(L+i,k)+h.line(L+i/2,k)+h.line(L+i/2,_)+h.line(L+i-i/4,_)+h.line(L+i/4,_)+h.line(L+i/2,_)+h.line(L+i/2,k)+h.line(L,k)+h.line(L,M)+"z"]:E=[h.move(L,k)+h.line(L+i/2,k)+h.line(L+i/2,w)+h.line(L+i/2,k)+h.line(L+i,k)+h.line(L+i,S)+h.line(L+i/2,S)+h.line(L+i/2,_)+h.line(L+i/2,S)+h.line(L,S)+h.line(L,k-n/2)];let D=null;return c.globals.previousPaths.length>0&&(D=this.getPreviousPath(p,f,E[0])),D==null&&(D=h.move(L+i/2,S)+h.move(L,S)),c.axisFlags.isXNumeric||(e=e+s),{pathTo:E,pathFrom:D,x:e,y:k,goalY:this.barHelpers.getGoalValues("y",null,a,p,f,t.translationsIndex),barXPosition:L,color:C}}drawHorizontalBoxPaths({indexes:t,y:e,yDivision:s,barHeight:i,zeroW:a,strokeWidth:n}){var r,o;const l=this.w,c=new I(this.w),h=t.i,d=t.j,f=t.realIndex,{colors:u}=l.config.plotOptions.candlestick,{colors:g}=this.boxOptions,p=L=>Array.isArray(L)?L[f]:L,b=this.invertedYRatio,m=this.getOHLCValue(f,d);let A=m.o<m.c?[p(u.upward)]:[p(u.downward)];this.isBoxPlot&&(A=[p(g.lower),p(g.upper)]);let v=a,y=a,w=Math.min(m.o,m.c),_=Math.max(m.o,m.c),C=m.m;l.axisFlags.isXNumeric&&(e=(l.seriesData.seriesX[f][d]-l.globals.minX)/this.invertedXRatio-i/2);const S=e+i*this.visibleI;typeof((r=this.series[h])==null?void 0:r[d])>"u"||((o=this.series[h])==null?void 0:o[d])===null?(w=a,_=a):(w=a+w/b,_=a+_/b,v=a+m.h/b,y=a+m.l/b,C=a+m.m/b);const k=[c.move(w,S)+c.line(w,S+i/2)+c.line(v,S+i/2)+c.line(v,S+i/2-i/4)+c.line(v,S+i/2+i/4)+c.line(v,S+i/2)+c.line(w,S+i/2)+c.line(w,S+i)+c.line(C,S+i)+c.line(C,S)+c.line(w+n/2,S),c.move(C,S)+c.line(C,S+i)+c.line(_,S+i)+c.line(_,S+i/2)+c.line(y,S+i/2)+c.line(y,S+i-i/4)+c.line(y,S+i/4)+c.line(y,S+i/2)+c.line(_,S+i/2)+c.line(_,S)+c.line(C,S)+"z"];let M=null;return l.globals.previousPaths.length>0&&(M=this.getPreviousPath(f,d,k[0])),M==null&&(M=c.move(w,S+i/2)+c.move(w,S)),l.axisFlags.isXNumeric||(e=e+s),{pathTo:k,pathFrom:M,x:_,y:e,goalX:this.barHelpers.getGoalValues("x",a,null,f,d,0),barYPosition:S,color:A}}getOHLCValue(t,e){const s=this.w,i=this.coreUtils,a=h=>h[t]&&h[t][e]!=null?i.getLogValAtSeriesIndex(h[t][e],t):0,n=a(s.candleData.seriesCandleH),r=a(s.candleData.seriesCandleO),o=a(s.candleData.seriesCandleM),l=a(s.candleData.seriesCandleC),c=a(s.candleData.seriesCandleL);return{o:this.isBoxPlot?n:r,h:this.isBoxPlot?r:n,m:o,l:this.isBoxPlot?l:c,c:this.isBoxPlot?c:l}}}const Ko=x=>{const t=Jo(x),e=x.length-1,s=1e-6,i=[];let a,n,r,o;for(let l=0;l<e;l++)r=ks(x[l],x[l+1]),Math.abs(r)<s?t[l]=t[l+1]=0:(a=t[l]/r,n=t[l+1]/r,o=a*a+n*n,o>
13819&&(o=r*3/Math.sqrt(o),t[l]=o*a,t[l+1]=o*n));for(let l=0;l<=e;l++)o=(x[Math.min(e,l+1)][0]-x[Math.max(0,l-1)][0])/(6*(1+t[l]*t[l])),i.push([o||0,t[l]*o||0]);return i},Aa=x=>{let t="";for(let e=0;e<x.length;e++){const s=x[e],i=s.length;i>4?(t+=`C${s[0]}, ${s[1]}`,t+=`, ${s[2]}, ${s[3]}`,t+=`, ${s[4]}, ${s[5]}`):i>2&&(t+=`S${s[0]}, ${s[1]}`,t+=`, ${s[2]}, ${s[3]}`)}return t},Cs={points(x){const t=Ko(x),e=x[1],s=x[0],i=[],a=t[1],n=t[0];i.push(s,[s[0]+n[0],s[1]+n[1],e[0]-a[0],e[1]-a[1],e[0],e[1]]);for(let r=2,o=t.length;r<o;r++){const l=x[r],c=t[r];i.push([l[0]-c[0],l[1]-c[1],l[0],l[1]])}return i},slice(x,t,e){const s=x.slice(t,e);if(t){if(e-t>1&&s[1].length<6){const i=s[0].length;s[1]=[s[0][i-2]*2-s[0][i-4],s[0][i-1]*2-s[0][i-3]].concat(s[1])}s[0]=s[0].slice(-2)}return s}};function ks(x,t){return(t[1]-x[1])/(t[0]-x[0])}function Jo(x){const t=[];let e=x[0],s=x[1],i=t[0]=ks(e,s),a=1;for(let n=x.length-1;a<n;a++)e=s,s=x[a+1],t[a]=(i+(i=ks(e,s)))*.5;return t[a]=i,t}class Qo extends Ct{draw(t,e,s){const i=this.w,a=new I(this.w),n=new pt(this.w);this.violinOptions=i.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||"individual",this.distributed=i.config.plotOptions.bar.distributed,this.isHorizontal=i.config.plotOptions.bar.horizontal,this.coreUtils=new rt(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const r=a.group({class:"apexcharts-violin-series apexcharts-plot-series"});for(let o=0;o<t.length;o++){let l,c;const h=[],d=[],f=i.globals.comboCharts?s[o]:o,{columnGroupIndex:u}
1381=this.barHelpers.getGroupIndex(f),g=a.group({class:"apexcharts-series",seriesName:R.escapeString(i.seriesData.seriesNames[f]),rel:o+1,"data:realIndex":f});nt.addCollapsedClassToSeries(this.w,g,f),t[o].length>0&&(this.visibleI=this.visibleI+1);let p=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[f][0],p=f);const b=this.barHelpers.initialPositions(f),{y:m,barHeight:A,yDivision:v,zeroW:y,x:w,barWidth:_,xDivision:C,zeroH:S}=b;c=m,l=w,d.push(l+(_??0)/2);const k=a.group({class:"apexcharts-datalabels","data:realIndex":f});this.seriesMaxWeight=0,this.normalize==="group"&&(i.violinData.seriesViolinDensity[f]||[]).forEach(E=>{E&&E.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=E.maxWeight)});const M=[];for(let L=0;L<i.globals.dataPoints;L++){const E=this.barHelpers.getStrokeWidth(o,L,f),D=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:o,j:L,realIndex:f,translationsIndex:p},y:c,yDivision:v,barHeight:A,zeroW:y}):this.drawVerticalViolin({indexes:{i:o,j:L,realIndex:f,translationsIndex:p},x:l,xDivision:C,barWidth:_,zeroH:S});l=D.x,c=D.y,L>0&&d.push(D.center),h.push(D.alongRepresentative);const T=this.buildPointsSubPath({realIndex:f,j:L,center:D.center,halfExtent:D.halfExtent,alongFn:D.alongFn,density:D.density,maxWeight:D.maxWeight});T.length&&M.push({groups:T,j:L});const F=n.fillPath({seriesNumber:this.distributed?L:f,dataPointIndex:L,color:this.distributed?i.globals.colors[L]:void 0,value:t[o][L]});this.renderSeries({realIndex:f,pathFill:F,lineFill:i.globals.stroke.colors[f],j:L,i:o,pathFrom:D.pathFrom,pathTo:D.pathTo,strokeWidth:E,elSeries:g,x:l,y:c,series:t,columnGroupIndex:u,barHeight:A,barWidth:_,elDataLabelsWrap:k,visibleSeries:this.visibleI,type:"violin"});const P=g.node.querySelector(`path.apexcharts-violin-area[j='${L}']`);P&&isFinite(D.alongRepresentative)&&P.setAttribute(this.isHorizontal?"cx":"cy",`${D.alongRepresentative}`)}va({graphics:a,w:i,elSeries:g,pointsByCat:M,options:this.pointsOptions,distributed:this.distributed,realIndex:f,wrapClass:"apexcharts-violin-points-wrap",pointClass:"apexcharts-violin-points"}),i.globals.seriesXvalues[f]=d,i.globals.seriesYvalues[f]=h,r.add(g)}return r}drawVerticalViolin({indexes:t,x:e,xDivision:s,barWidth:i,zeroH:a}){var n;const r=this.w,{realIndex:o,j:l,translationsIndex:c}=t,h=this.yRatio[c];r.axisFlags.isXNumeric&&(e=(r.seriesData.seriesX[o][l]-r.globals.minX)/this.xRatio-i/2);const f=e+i*this.visibleI+i/2,u=i/2,g=this.getDensity(o,l),p=this.effectiveMaxWeight(g),b=v=>a-this.logVal(v,o)/h,m=this.buildBodyPath({nodes:g.nodes,center:f,halfExtent:u,maxWeight:p,vertical:!0,alongFn:b,collapsed:!1});let A=null;return r.globals.previousPaths.length>0&&(A=this.getPreviousPath(o,l,m)),A==null&&(A=this.buildBodyPath({nodes:g.nodes,center:f,halfExtent:u,maxWeight:p,vertical:!0,alongFn:b,collapsed:!0})),r.axisFlags.isXNumeric||(e=e+s),{pathTo:m,pathFrom:A,x:e,y:a,center:f,halfExtent:u,alongFn:b,density:g,maxWeight:p,alongRepresentative:b((n=this.series[t.i][l])!=null?n:0)}}drawHorizontalViolin({indexes:t,y:e,yDivision:s,barHeight:i,zeroW:a}){var n;const r=this.w,{realIndex:o,j:l}=t,c=this.invertedYRatio;r.axisFlags.isXNumeric&&(e=(r.seriesData.seriesX[o][l]-r.globals.minX)/this.invertedXRatio-i/2);const d=e+i*this.visibleI+i/2,f=i/2,u=this.getDensity(o,l),g=this.effectiveMaxWeight(u),p=A=>a+this.logVal(A,o)/c,b=this.buildBodyPath({nodes:u.nodes,center:d,halfExtent:f,maxWeight:g,vertical:!1,alongFn:p,collapsed:!1});let m=null;return r.globals.previousPaths.length>0&&(m=this.getPreviousPath(o,l,b)),m==null&&(m=this.buildBodyPath({nodes:u.nodes,center:d,halfExtent:f,maxWeight:g,vertical:!1,alongFn:p,collapsed:!0})),r.axisFlags.isXNumeric||(e=e+s),{pathTo:b,pathFrom:m,x:a,y:e,center:d,halfExtent:f,alongFn:p,maxWeight:g,density:u,alongRepresentative:p((n=this.series[t.i][l])!=null?n:0)}}getDensity(t,e){var s;const a=(s=this.w.violinData.seriesViolinDensity[t])==null?void 0:s[e];if(!a||!a.values.length)return{nodes:[],maxWeight:0};const n=a.values.map((l,c)=>c);n.sort((l,c)=>a.values[l]-a.values[c]);const r=[];let o=null;for(const l of n){const c=a.values[l];o!==null&&c===o||(r.push({v:c,w:a.weights[l]}),o=c)}return{nodes:r,maxWeight:a.maxWeight}}effectiveMaxWeight(t){return this.normalize==="group"&&this.seriesMaxWeight>0?this.seriesMaxWeight:t.maxWeight}buildBodyPath({nodes:t,center:e,halfExtent:s,maxWeight:i,vertical:a,alongFn:n,collapsed:r}){const o=new I(this.w);if(t.length===0){const d=n(0);return a?o.move(e,d)+o.line(e,d):o.move(d,e)+o.line(d,e)}const l=d=>{if(r||i<=0)return 0;const f=d/i*s*this.bandwidthScale;return Math.min(s,Math.max(0,f))},c=[],h=[];for(let d=0;d<t.length;d++){const f=n(t[d].v),u=l(t[d].w);a?(c.push([e+u,f]),h.push([e-u,f])):(c.push([f,e+u]),h.push([f,e-u]))}return h.reverse(),this.smoothSegment(c,a,!1)+this.smoothSegment(h,a,!0)+"z"}smoothSegment(t,e,s){const i=new I(this.w),a=t[0];let n=s?i.line(a[0],a[1]):i.move(a[0],a[1]);if(t.length<3||!this.strictlyMonotonic(t,e)){for(let h=1;h<t.length;h++)n+=i.line(t[h][0],t[h][1]);return n}const o=t.map(([h,d])=>e?[d,h]:[h,d]),l=Cs.points(o),c=e?l.map(tl):l;return n+=Aa(c),n}strictlyMonotonic(t,e){const s=e?1:0;for(let i=1;i<t.length;i++)if(t[i][s]===t[i-1][s])return!1;return!0}buildPointsSubPath({realIndex:t,j:e,center:s,halfExtent:i,alongFn:a,density:n,maxWeight:r}){var o;return wa({w:this.w,points:(o=this.w.violinData.seriesViolinPoints[t])==null?void 0:o[e],seedA:t,seedB:e,center:s,halfExtent:i,alongFn:a,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:l=>this.halfWidthAtValue(l,n,i,r)})}halfWidthAtValue(t,e,s,i){const{nodes:a}=e,n=i??e.maxWeight;if(!a.length||n<=0)return 0;const r=o=>Math.min(s,o/n*s*this.bandwidthScale);if(t<=a[0].v)return r(a[0].w);if(t>=a[a.length-1].v)return r(a[a.length-1].w);for(let o=1;o<a.length;o++)if(t<=a[o].v){const l=a[o-1],c=a[o],h=c.v===l.v?0:(t-l.v)/(c.v-l.v);return r(l.w+(c.w-l.w)*h)}return 0}logVal(t,e){return this.coreUtils.getLogValAtSeriesIndex(t,e)}}function tl(x){const t=[];for(let e=0;e<x.length;e+=2)t.push(x[e+1],x[e]);return t}class _a{constructor(t,e){this.ctx=e,this.w=t}checkColorRange(){const t=this.w;let e=!1;const s=t.config.plotOptions[t.config.chart.type];return s.colorScale.ranges.length>0&&s.colorScale.ranges.map(i=>{i.from<=0&&(e=!0)}),e}getShadeColor(t,e,s,i){const a=this.w;let n=1;const r=a.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,s);a.globals.hasNegs||i?a.config.plotOptions[t].reverseNegativeShade?o.percent<0?n=o.percent/100*(r*1.25):n=(1-o.percent/100)*(r*1.25):o.percent<=0?n=1-(1+o.percent/100)*r:n=(1-o.percent/100)*r:(n=1-o.percent/100,t==="treemap"&&(n=(1-o.percent/100)*(r*1.25)));let l=o.color;const c=new R;if(a.config.plotOptions[t].enableShades)if(this.w.config.theme.mode==="dark"){const h=c.shadeColor(n*-1,o.color);l=R.hexToRgba(R.isColorHex(h)?h:R.rgb2hex(h),a.config.fill.opacity)}else{const h=c.shadeColor(n,o.color);l=R.hexToRgba(R.isColorHex(h)?h:R.rgb2hex(h),a.config.fill.opacity)}return{color:l,colorProps:o}}determineColor(t,e,s){const i=this.w,a=i.seriesData.series[e][s],n=i.
1381config.plotOptions[t];let r=n.colorScale.inverse?s:e;n.distributed&&i.config.chart.type==="treemap"&&(r=s);let o=i.globals.colors[r],l=null,c,h;if(!n.distributed&&t==="heatmap")c=i.globals.minY,h=i.globals.maxY;else{const u=i.seriesData.series[e];c=u.length?u[0]:0,h=c;for(let g=1;g<u.length;g++)u[g]<c&&(c=u[g]),u[g]>h&&(h=u[g])}typeof n.colorScale.min<"u"&&(c=n.colorScale.min<i.globals.minY?n.colorScale.min:i.globals.minY,h=n.colorScale.max>i.globals.maxY?n.colorScale.max:i.globals.maxY);const d=Math.abs(h)+Math.abs(c);let f=d===0?0:100*a/d;return n.colorScale.ranges.length>0&&n.colorScale.ranges.map(g=>{if(a>=g.from&&a<=g.to){o=g.color,l=g.foreColor?g.foreColor:null,c=g.from,h=g.to;const p=Math.abs(h)+Math.abs(c);f=p===0?0:100*a/p}}),{color:o,foreColor:l,percent:f}}calculateDataLabels({text:t,x:e,y:s,i,j:a,colorProps:n,fontSize:r}){const l=this.w.config.dataLabels,c=new I(this.w),h=new Ut(this.w,this.ctx);let d=null;if(l.enabled){d=c.group({class:"apexcharts-data-labels"});const f=l.offsetX,u=l.offsetY,g=e+f,p=s+parseFloat(l.style.fontSize)/3+u;h.plotDataLabelsText({x:g,y:p,text:t,i,j:a,color:n.foreColor,parent:d,fontSize:r,dataLabelsConfig:l})}return d}}
1381class el{constructor(t,e,s){this.ctx=e,this.w=t,this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new _a(t,e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}draw(t){var e,s;const i=this.w,a=new I(this.w,this.ctx),n=Gt(this.ctx,a),r=n!==a&&typeof n.drawRectCell=="function",o=a.group({class:"apexcharts-heatmap"});o.attr("clip-path",`url(#gridRectMask${i.globals.cuid})`);const l=i.layout.gridWidth/i.globals.dataPoints,c=i.layout.gridHeight/i.seriesData.series.length,h=(i.config.xaxis.type==="numeric"||i.config.xaxis.type==="datetime")&&i.axisFlags.isXNumeric&&this.xRatio>0;let d=l;if(h){const m=i.globals.minXDiff;d=Number.isFinite(m)&&m>0?m/this.xRatio:l}const f=Array.isArray(i.config.fill.opacity)?(e=i.config.fill.opacity[0])!=null?e:1:(s=i.config.fill.opacity)!=null?s:1;let u=0,g=!1;this.negRange=this.helpers.checkColorRange();const p=t.slice();i.config.yaxis[0].reversed&&(g=!0,p.reverse());for(let m=g?0:p.length-1;g?m<p.length:m>=0;g?m++:m--){const A=a.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:R.escapeString(i.seriesData.seriesNames[m]),rel:m+1,"data:realIndex":m});if(nt.addCollapsedClassToSeries(this.w,A,m),r||a.setupEventDelegation(A,".apexcharts-heatmap-rect"),i.config.chart.dropShadow.enabled){const _=i.config.chart.dropShadow;new dt(this.w).dropShadow(A,_,m)}let v=0;const y=i.config.plotOptions.heatmap.shadeIntensity;let w=0;for(let _=0;_<i.globals.dataPoints;_++){if(!h&&i.seriesData.seriesX.length&&!i.globals.allSeriesHasEqualX&&i.globals.minX+i.globals.minXDiff*_<i.seriesData.seriesX[m][w]){v=v+l;continue}if(w>=p[m].length)break;const C=h?d:l;if(h){const P=i.seriesData.seriesX[m]?i.seriesData.seriesX[m][w]:null;if(P==null||P!==P){w++;continue}v=(P-i.globals.minX)/this.xRatio-d/2}const S=this.helpers.getShadeColor(i.config.chart.type,m,w,this.negRange);let k=S.color;const M=S.colorProps;i.config.fill.type==="image"&&(k=new pt(this.w).fillPath({seriesNumber:m,dataPointIndex:w,opacity:i.globals.hasNegs?M.percent<0?1-(1+M.percent/100):y+M.percent/100:M.percent/100,patternID:R.randomId(),width:i.config.fill.image.width?i.config.fill.image.width:C,height:i.config.fill.image.height?i.config.fill.image.height:c}));const L=this.rectRadius,E=i.config.plotOptions.heatmap.useFillColorAsStroke?k:i.globals.stroke.colors[0];if(r)n.drawRectCell(v,u,C,c,{fill:k,fillOpacity:f,stroke:E,strokeWidth:this.strokeWidth,radius:L,seriesIndex:m,dataPointIndex:w});else{const P=a.drawRect(v,u,C,c,L);if(P.attr({cx:v,cy:u}),P.node.classList.add("apexcharts-heatmap-rect"),A.add(P),P.attr({fill:k,i:m,index:m,j:w,val:t[m][w],"stroke-width":this.strokeWidth,stroke:E,color:k}),i.config.chart.animations.enabled&&!i.globals.dataChanged){let Y=1;i.globals.resized||(Y=i.config.chart.animations.speed),this.animateHeatMap(P,v,u,C,c,Y,m,w)}if(i.globals.dataChanged){let Y=1;if(this.dynamicAnim.enabled&&i.globals.shouldAnimate){Y=this.dynamicAnim.speed;let z=i.globals.previousPaths[m]&&i.globals.previousPaths[m][w]&&i.globals.previousPaths[m][w].color;z||(z="rgba(255, 255, 255, 0)"),this.animateHeatColor(P,R.isColorHex(z)?z:R.rgb2hex(z),R.isColorHex(k)?k:R.rgb2hex(k),Y)}}}const D=i.config.dataLabels.formatter,T=D(i.seriesData.series[m][w],{value:i.seriesData.series[m][w],seriesIndex:m,dataPointIndex:w,w:i}),F=this.helpers.calculateDataLabels({text:T,x:v+C/2,y:u+c/2,i:m,j:w,colorProps:M,series:p});F!==null&&A.add(F),h||(v=v+l),w++}u=u+c,o.add(A)}const b=i.globals.yAxisScale[0].result.slice();return i.config.yaxis[0].reversed?b.unshift(""):b.push(""),i.globals.yAxisScale[0].result=b,o}animateHeatMap(t,e,s,i,a,n,r=0,o=0){const l=this.w,c=new ne(this.w),d=l.config.chart.animations.animateGradually,f=d&&d.enabled!==!1;let u=0;if(f){const g=(l.seriesData.series||[]).length||1,p=l.globals.dataPoints||1,b=g+p-2,m=Math.min(d.delay||0,n*.5/Math.max(1,b));u=Ds({style:"diagonal",index:o,row:r,col:o,baseDelay:m})}c.animateRect(t,{x:e+i/2,y:s+a/2,width:0,height:0},{x:e,y:s,width:i,height:a},n,()=>{c.animationCompleted(t)},u)}animateHeatColor(t,e,s,i){t.attr({fill:e}).animate(i).attr({fill:s})}}class sl{constructor(t){this.w=t.w,this.lineCtx=t}sameValueSeriesFix(t,e){const s=this.w;if((s.config.fill.type==="gradient"||s.config.fill.type[t]==="gradient")&&new rt(this.lineCtx.w).seriesHaveSameValues(t)){const a=e[t].slice();a[a.length-1]=a[a.length-1]+1e-6,e[t]=a}return e}calculatePoints({series:t,realIndex:e,x:s,y:i,i:a,j:n,prevY:r}){const o=this.w,l=[],c=[];let h=this.lineCtx.categoryAxisCorrection+o.config.markers.offsetX;return o.axisFlags.isXNumeric&&(h=(o.seriesData.seriesX[e][0]-o.globals.minX)/this.lineCtx.xRatio+o.config.markers.offsetX),n===0&&(l.push(h),c.push(R.isNumber(t[a][0])?r+o.config.markers.offsetY:null)),l.push(s+o.c
1381onfig.markers.offsetX),c.push(R.isNumber(t[a][n+1])?i+o.config.markers.offsetY:null),{x:l,y:c}}checkPreviousPaths({pathFromLine:t,pathFromArea:e,realIndex:s}){const i=this.w;for(let a=0;a<i.globals.previousPaths.length;a++){const n=i.globals.previousPaths[a];(n.type==="line"||n.type==="area")&&n.paths.length>0&&parseInt(n.realIndex,10)===parseInt(s,10)&&(n.type==="line"?(this.lineCtx.appendPathFrom=!1,t=i.globals.previousPaths[a].paths[0].d):n.type==="area"&&(this.lineCtx.appendPathFrom=!1,e=i.globals.previousPaths[a].paths[0].d,i.config.stroke.show&&i.globals.previousPaths[a].paths[1]&&(t=i.globals.previousPaths[a].paths[1].d)))}return{pathFromLine:t,pathFromArea:e}}determineFirstPrevY({i:t,realIndex:e,series:s,prevY:i,lineYPosition:a,translationsIndex:n}){var r,o,l;const c=this.w,h=c.config.chart.stacked&&!c.globals.comboCharts||c.config.chart.stacked&&c.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((r=this.w.config.series[e])==null?void 0:r.type)==="bar"||((o=this.w.config.series[e])==null?void 0:o.type)==="column");if(typeof((l=s[t])==null?void 0:l[0])<"u")h?t>
13810?a=this.lineCtx.prevSeriesY[t-1][0]:a=this.lineCtx.zeroY:a=this.lineCtx.zeroY,i=a-s[t][0]/this.lineCtx.yRatio[n]+(this.lineCtx.isReversed?s[t][0]/this.lineCtx.yRatio[n]:0)*2;else if(h&&t>0&&typeof s[t][0]>"u"){for(let d=t-1;d>=0;d--)if(s[d][0]!==null&&typeof s[d][0]<"u"){a=this.lineCtx.prevSeriesY[d][0],i=a;break}}return{prevY:i,lineYPosition:a}}}class ce{constructor(t,e,s,i){this.ctx=e,this.w=t,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.zRatio=0,this.baseLineY=[],this.pointsChart=!(this.w.config.chart.type!=="bubble"&&this.w.config.chart.type!=="scatter")||i,this.scatter=new Ui(this.w,this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new sl(this),this.markers=new re(this.w,this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0,this.xDivision=0,this.zeroY=0,this.areaBottomY=0,this.strokeWidth=0,this.isReversed=!1,this.appendPathFrom=!1,this.elSeries=null,this.elPointsMain=null,this.elDataLabelsWrap=null,this._elLastPointsWrap=null}draw(t,e,s,i){var a;const n=this.w,r=new I(this.w),o=n.globals.comboCharts?e:n.config.chart.type,l=r.group({class:`apexcharts-${o}-series apexcharts-plot-series`}),c=new rt(this.w);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,t=c.getLogSeries(t),this.yRatio=c.getLogYRatios(this.yRatio),this.prevSeriesY=[];const h=[];for(let d=0;d<t.length;d++){t=this.lineHelpers.sameValueSeriesFix(d,t);const f=n.globals.comboCharts?s[d]:d,u=this.yRatio.length>1?f:0;this._initSerieVariables(t,d,f);const g=[],p=[],b=[];let m=n.globals.padHorizontal+this.categoryAxisCorrection;const A=1,v=[],y=[];nt.addCollapsedClassToSeries(this.w,this.elSeries,f),n.axisFlags.isXNumeric&&n.seriesData.seriesX.length>0&&(m=(n.seriesData.seriesX[f][0]-n.globals.minX)/this.xRatio),b.push(m);const w=m;let _;const C=w;let S=this.zeroY,k=this.zeroY;const M=0;S=this.lineHelpers.determineFirstPrevY({i:d,realIndex:f,series:t,prevY:S,lineYPosition:M,translationsIndex:u}).prevY,n.config.stroke.curve==="monotoneCubic"&&t[d][0]===null?g.push(null):g.push(S);const E=S;let D;o==="rangeArea"&&(D=this.lineHelpers.determineFirstPrevY({i:d,realIndex:f,series:i,prevY:k,lineYPosition:M,translationsIndex:u}),k=D.prevY,_=k,p.push(g[0]!==null?k:null));const T=this._calculatePathsFrom({type:o,series:t,i:d,realIndex:f,translationsIndex:u,prevX:C,prevY:S,prevY2:k}),F=[g[0]],P=[p[0]],Y={type:o,series:t,realIndex:f,translationsIndex:u,i:d,x:m,y:A,pX:w,pY:E,pathsFrom:T,linePaths:v,areaPaths:y,seriesIndex:s,lineYPosition:M,xArrj:b,yArrj:g,y2Arrj:p,seriesRangeEnd:i},z=this._iterateOverDataPoints(Z(G({},Y),{iterations:o==="rangeArea"?t[d].length-1:void 0,isRangeStart:!0}));if(o==="rangeArea"){const W=this._calculatePathsFrom({series:i,i:d,realIndex:f,prevX:C,prevY:k}),O=this._iterateOverDataPoints(Z(G({},Y),{series:i,xArrj:[m],yArrj:F,y2Arrj:P,pY:_,areaPaths:z.areaPaths,pathsFrom:W,iterations:i[d].length-1,isRangeStart:!1})),N=z.linePaths.length/2;for(let X=0;X<N;X++)z.linePaths[X]=O.linePaths[X+N]+z.linePaths[X];z.linePaths.splice(N),z.pathFromLine=O.pathFromLine+z.pathFromLine}else/z\s*$/i.test(z.pathFromArea)||(z.pathFromArea+="z");this._handlePaths({type:o,realIndex:f,i:d,paths:z}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),h.push(this.elSeries)}if(typeof((a=n.config.series[0])==null?void 0:a.zIndex)<"u"&&h.sort((d,f)=>Number(d.node.getAttribute("zIndex"))-Number(f.node.getAttribute("zIndex"))),n.config.chart.stacked)for(let d=h.length-1;d>=0;d--)l.add(h[d]);else for(let d=0;d<h.length;d++)l.add(h[d]);return l}_initSerieVariables(t,e,s){const i=this.w,a=new I(this.w);this.xDivision=i.layout.gridWidth/(i.globals.dataPoints-(i.config.xaxis.tickPlacement==="on"?1:0)),this.strokeWidth=Array.isArray(i.config.stroke.width)?i.config.stroke.width[s]:i.config.stroke.width;let n=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[s],n=s),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.layout.gridHeight-this.baseLineY[n]-(this.isReversed?i.layout.gridHeight:0)+(this.isReversed?this.baseLineY[n]*2:0),this.areaBottomY=this.zeroY,(this.zeroY>i.layout.gridHeight||i.config.plotOptions.area.fillTo==="end")&&(this.areaBottomY=i.layout.gridHeight),this.categoryAxisCorrection=this.xDivision/2;const r=i.config.series[s];if(this.elSeries=a.group({class:"apexcharts-series",zIndex:typeof r.zIndex<"u"?r.zIndex:s,seriesName:R.escapeString(i.seriesData.seriesNames[s])}),this.elPointsMain=a.group({class:"apexcharts-series-markers-wrap","data:realIndex":s}),this.markers.resetSeriesWrapCache(),this._elLastPointsWrap=null,i.globals.hasNullValues){const l=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[i.layout.gridHeight+i.globals.markers.largestSize]}
1381,seriesIndex:e,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});l!==null&&this.elPointsMain.add(l)}this.elDataLabelsWrap=a.group({class:"apexcharts-datalabels","data:realIndex":s});const o=t[e].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":o,rel:e+1,"data:realIndex":s}),this.appendPathFrom=!0}_calculatePathsFrom({type:t,series:e,i:s,realIndex:i,translationsIndex:a,prevX:n,prevY:r,prevY2:o}){const l=this.w,c=new I(this.w);let h,d,f,u;if(e[s][0]===null){for(let g=0;g<e[s].length;g++)if(e[s][g]!==null){n=this.xDivision*g,r=this.zeroY-e[s][g]/this.yRatio[a],h=c.move(n,r),d=c.move(n,this.areaBottomY);break}}else h=c.move(n,r),t==="rangeArea"&&(h=c.move(n,o)+c.line(n,r)),d=c.move(n,this.areaBottomY)+c.line(n,r);if(f=c.move(0,this.areaBottomY)+c.line(0,this.areaBottomY),u=c.move(0,this.areaBottomY)+c.line(0,this.areaBottomY),l.globals.previousPaths.length>0){const g=this.lineHelpers.checkPreviousPaths({pathFromLine:f,pathFromArea:u,realIndex:i});f=g.pathFromLine,u=g.pathFromArea}return{prevX:n,prevY:r,linePath:h,areaPath:d,pathFromLine:f,pathFromArea:u}}_handlePaths({type:t,realIndex:e,i:s,paths:i}){var a,n,r,o,l,c,h;const d=this.w,f=new I(this.w),u=Gt(this.ctx,f),g=new pt(this.w);this.prevSeriesY.push(i.yArrj);let p=null;(t==="line"||t==="area")&&d.globals.dataChanged&&(p=tn(d,e,i.xArrj,i.yArrj));let b=null;
1381!p&&(t==="line"||t==="area")&&(b=cn(d,{type:t,realIndex:e,pathFromLine:i.pathFromLine,pathFromArea:i.pathFromArea,linePaths:i.linePaths,areaPaths:i.areaPaths})),d.globals.seriesXvalues[e]=i.xArrj,d.globals.seriesYvalues[e]=i.yArrj;const m=d.config.forecastDataPoints;if(m.count>0&&t!=="rangeArea"){const y=d.globals.seriesXvalues[e][d.globals.seriesXvalues[e].length-m.count-1],w=f.drawRect(y,0,d.layout.gridWidth,d.layout.gridHeight,0);d.dom.elForecastMask.appendChild(w.node);const _=f.drawRect(0,0,y,d.layout.gridHeight,0);d.dom.elNonForecastMask.appendChild(_.node)}this.pointsChart?ti(d,{elPointsMain:this.elPointsMain,realIndex:e,speed:d.config.chart.animations.dynamicAnimation.speed}):(d.globals.delayedElements.push({el:this.elPointsMain.node,index:e}),ti(d,{elPointsMain:this.elPointsMain,realIndex:e,speed:d.config.chart.animations.dynamicAnimation.speed}),ye(d,e)&&((a=this.elDataLabelsWrap)!=null&&a.node)&&(this.elDataLabelsWrap.node.classList.add("apexcharts-element-hidden"),d.globals.delayedElements.push({el:this.elDataLabelsWrap.node,holdUntilComplete:!0})));const A={i:s,realIndex:e,animationDelay:s,initialSpeed:d.config.chart.animations.speed,dataChangeSpeed:d.config.chart.animations.dynamicAnimation.speed,className:`apexcharts-${t}`},v=i.numericXY;if(t==="area"){const y=g.fillPath({seriesNumber:e});for(let w=0;w<i.areaPaths.length;w++){const _=u.renderPaths(Z(G({},A),{pathFrom:p?js(i.areaPaths[w],p):(r=(n=b?.area)==null?void 0:n.from)!=null?r:i.pathFromArea,pathTo:i.areaPaths[w],pathToNumeric:v?{xs:v.xs,ys:v.ys,closeY:v.areaCloseY}:void 0,pathToInterp:(o=b?.area)==null?void 0:o.toInterp,scrollMorph:!!p,stroke:"none",strokeWidth:0,strokeLineCap:null,fill:y}));this.elSeries.add(_)}}if(d.config.stroke.show&&!this.pointsChart){let y=null;if(t==="line")y=g.fillPath({seriesNumber:e,i:s});else if(d.config.stroke.fill.type==="solid")y=d.globals.stroke.colors[e];else{const w=d.config.fill;d.config.fill=d.config.stroke.fill,y=g.fillPath({seriesNumber:e,i:s}),d.config.fill=w}for(let w=0;w<i.linePaths.length;w++){let _=y;t==="rangeArea"&&(_=g.fillPath({seriesNumber:e}));const C=Z(G({},A),{pathFrom:p?js(i.linePaths[w],p):(c=(l=b?.line)==null?void 0:l.from)!=null?c:i.pathFromLine,pathTo:i.linePaths[w],pathToNumeric:v?{xs:v.xs,ys:v.ys}:void 0,pathToInterp:(h=b?.line)==null?void 0:h.toInterp,scrollMorph:!!p,stroke:y,strokeWidth:this.strokeWidth,strokeLineCap:d.config.stroke.lineCap,fill:t==="rangeArea"?_:"none"}),S=u.renderPaths(C);if(this.elSeries.add(S),S.attr("fill-rule","evenodd"),m.count>0&&t!=="rangeArea"){const k=u.renderPaths(C);k.node.setAttribute("stroke-dasharray",m.dashArray),m.strokeWidth&&k.node.setAttribute("stroke-width",m.strokeWidth),this.elSeries.add(k),k.attr("clip-path",`url(#forecastMask${d.globals.cuid})`),S.attr("clip-path",`url(#nonForecastMask${d.globals.cuid})`)}}}}_iterateOverDataPoints({type:t,series:e,iterations:s,realIndex:i,translationsIndex:a,i:n,x:r,y:o,pX:l,pY:c,pathsFrom:h,linePaths:d,areaPaths:f,seriesIndex:u,lineYPosition:g,xArrj:p,yArrj:b,y2Arrj:m,isRangeStart:A,seriesRangeEnd:v}){var y,w;const _=this.w,C=new I(this.w),S=this.yRatio;let{prevY:k,linePath:M,areaPath:L,pathFromLine:E,pathFromArea:D}=h;const T=R.isNumber(_.globals.minYArr[i])?_.globals.minYArr[i]:_.globals.minY;s||(s=_.globals.dataPoints>1?_.globals.dataPoints-1:_.globals.dataPoints);const F=(X,V)=>V-X/S[a]+(this.isReversed?X/S[a]:0)*2;let P=o;const Y=_.config.chart.stacked&&!_.globals.comboCharts||_.config.chart.stacked&&_.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((y=this.w.config.series[i])==null?void 0:y.type)==="bar"||((w=this.w.config.series[i])==null?void 0:w.type)==="column");let z=_.config.stroke.curve;Array.isArray(z)&&(Array.isArray(u)?z=z[u[n]]:z=z[n]);let W=0,O;const N=this.pointsChart?this._scatterJitterPx(i):null;if(z==="straight"&&!this.pointsChart){const X=this._fastStraightPath({type:t,series:e,i:n,realIndex:i,translationsIndex:a,iterations:s,x:r,y:o,pX:l,pY:c,pathsFrom:h,linePaths:d,areaPaths:f,xArrj:p,yArrj:b,y2Arrj:m,stackSeries:Y});if(X)return X}for(let X=0;X<s&&e[n].length!==0;X++){const V=typeof e[n][X+1]>"u"||e[n][X+1]===null;if(_.axisFlags.isXNumeric){let Q=_.seriesData.seriesX[i][X+1];typeof _.seriesData.seriesX[i][X+1]>"u"&&(Q=_.seriesData.seriesX[i][s-1]),r=(Q-_.globals.minX)/this.xRatio}else r=r+this.xDivision;if(Y)if(n>0&&_.globals.collapsedSeries.length<_.config.series.length-1){const Q=et=>{for(let J=et;J>0;J--)if(_.globals.collapsedSeriesIndices.indexOf(u?.[J]||J)>-1)J--;else return J;return 0};g=this.prevSeriesY[Q(n-1)][X+1]}else g=this.zeroY;else g=this.zeroY;V?o=F(T,g):(o=F(e[n][X+1],g),t==="rangeArea"&&(P=F(v[n][X+1],g)));let U=r,$=o;if(N){const Q=i*100003+(X+1);N.x&&(U=r+(Ss(Q*7919+13)-.5)*2*N.x),N.y&&($=o+(Ss(Q*6271+97)-.5)*2*N.y)}p.push(e[n][X+1]===null?null:U),V&&(_.config.stroke.curve==="smooth"||_.config.stroke.curve==="monotoneCubic")?(b.push(null),m.push(null)):(b.push($),m.push(P));const q=this.lineHelpers.calculatePoints({series:e,x:U,y:$,realIndex:i,i:n,j:X,prevY:k}),K=this._createPaths({type:t,series:e,i:n,j:X,x:r,y:o,y2:P,xArrj:p,yArrj:b,y2Arrj:m,pX:l,pY:c,pathState:W,segmentStartX:O,linePath:M,areaPath:L,linePaths:d,areaPaths:f,curve:z,isRangeStart:A});f=K.areaPaths,d=K.linePaths,l=K.pX,c=K.pY,W=K.pathState,O=K.segmentStartX,L=K.areaPath,M=K.linePath,this.appendPathFrom&&!_.globals.hasNullValues&&!(z==="monotoneCubic"&&t==="rangeArea")&&(E+=C.line(r,this.areaBottomY),D+=C.line(r,this.areaBottomY)),this.handleNullDataPoints(e,q,n,X,i),this._handleMarkersAndLabels({type:t,pointsPos:q,i:n,j:X,realIndex:i,isRangeStart:A})}return{yArrj:b,xArrj:p,pathFromArea:D,areaPaths:f,pathFromLine:E,linePaths:d,linePath:M,areaPath:L}}_handleMarkersAndLabels({type:t,pointsPos:e,isRangeStart:s,i,j:a,realIndex:n}){const r=this.w,o=new Ut(this.w,this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,a,{realIndex:n,pointsPos:e,zRatio:this.zRatio,elParent:this.elPointsMain});else{!(!r.globals.dataChanged&&!r.globals.resized)&&r.seriesData.series[i].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");const h=this.markers.plotChartMarkers({pointsPos:e,seriesIndex:n,j:a+1});h!==null&&h!==this._elLastPointsWrap&&(this.elPointsMain.add(h),this._elLastPointsWrap=h)}const l=o.drawDataLabel({type:t,isRangeStart:s,pos:e,i:n,j:a+1});l!==null&&this.elDataLabelsWrap.add(l)}_scatterJitterPx(t){var e;const s=this.w,i=(e=s.config.plotOptions.scatter)==null?void 0:e.jitter;if(!i||!i.enabled||!i.x&&!i.y)return null;const a=s.axisFlags.isXNumeric&&this.xRatio?1/this.xRatio:this.xDivision,n=this.yRatio.length>1?t:0,r=this.yRatio[n]?1/this.yRatio[n]:0;return{x:(i.x||0)*a,y:(i.y||0)*r}}_fastStraightPath({type:t,series:e,i:s,realIndex:i,translationsIndex:a,iterations:n,x:r,y:o,pX:l,pY:c,pathsFrom:h,linePaths:d,areaPaths:f,xArrj:u,yArrj:g,y2Arrj:p,stackSeries:b}){const m=this.w;if(t!=="line"&&t!=="area"||m.globals.comboCharts||b||m.config.dataLabels.enabled||m.config.markers.discrete.length||m.globals.markers.size[i]>0)return null;const A=e[s],v=A.length;if(!n||v<2||v-1!==n)return null;for(let ct=0;ct<=n;ct++){const vt=A[ct];if(vt===null||typeof vt>"u")return null}const y=m.axisFlags.isXNumeric,w=y?m.seriesData.seriesX[i]:null;if(y&&(!w||w.length<v))return null;const _=this.yRatio[a],C=this.isReversed,S=this.zeroY,k=this.areaBottomY,M=this.xRatio,L=m.globals.minX,E=this.xDivision,D=m.config.markers.offsetX,T=m.config.markers.offsetY,F=this.appendPathFrom&&!m.globals.hasNullValues;let{pathFromLine:P,pathFromArea:Y}=h;const z=this.ctx&&this.ctx.renderer,W=!!(z&&z.kind&&z.kind!=="svg"),O=!W||m.globals.dataChanged&&!!m.globals.prevStreamFrame,N=W?new Float64Array(v):null,X=W?new Float64Array(v):null;N&&X&&(N[0]=l,X[0]=c),typeof m.globals.pointsArray[i]>"u"&&(m.globals.pointsArray[i]=[]);const V=m.globals.pointsArray[i],U=w?(w[0]-L)/M+D:this.categoryAxisCorrection+D;V.push([U,h.prevY+T]);const $=O?new Array(n+1):[];O&&($[0]="M "+l+" "+c);const q=O&&F?new Array(n):null;let K=r,Q=l,et=c;for(let ct=0;ct<n;ct++){w?Q=(w[ct+1]-L)/M:(K=K+E,Q=K);const vt=A[ct+1];et=S-vt/_+(C?vt/_:0)*2,u.push(Q),g.push(et),p.push(o),V.push([Q+D,et+T]),O&&($[ct+1]=" L "+Q+" "+et,q&&(q[ct]=" L "+Q+" "+k)),N&&X&&(N[ct+1]=Q,X[ct+1]=et)}let J="",bt="";if(O&&(J=$.join(""),bt=J+" L "+Q+" "+k+" L "+l+" "+k+"z"),q){const ct=q.join("");P+=ct,Y+=ct}else!O&&F&&(P+=" L "+Q+" "+k,Y+=" L "+Q+" "+k);return d.push(J),f.push(bt),{yArrj:g,xArrj:u,pathFromArea:Y,areaPaths:f,pathFromLine:P,linePaths:d,linePath:J,areaPath:bt,numericXY:N?{xs:N,ys:X,areaCloseY:k}:void 0}}_createPaths({type:t,series:e,i:s,j:i,x:a,y:n,xArrj:r,yArrj:o,y2:l,y2Arrj:c,pX:h,pY:d,pathState:f,segmentStartX:u,linePath:g,areaPath:p,linePaths:b,areaPaths:m,curve:A,isRangeStart:v}){const y=new I(this.w),w=this.areaBottomY,_=t==="rangeArea",C=t==="rangeArea"&&v;switch(A){case"monotoneCubic":{const S=v?o:c,k=(E,D)=>E.map((T,F)=>[T,D[F]]).filter(T=>T[1]!==null),M=E=>{const D=[];let T=0;
1381return E.forEach(F=>{F!==null?T++:T>0&&(D.push(T),T=0)}),T>0&&D.push(T),D},L=(E,D)=>{const T=M(E),F=[];for(let P=0,Y=0;P<T.length;Y+=T[P++])F[P]=Cs.slice(D,Y,Y+T[P]);return F};switch(f){case 0:if(S[i+1]===null)break;f=1;case 1:if(!(_?r.length===e[s].length:i===e[s].length-2))break;case 2:{const E=v?r:r.slice().reverse(),D=v?S:S.slice().reverse(),T=k(E,D),F=T.length>1?Cs.points(T):T;let P=[];_&&(C?m=T:P=m.reverse());let Y=0,z=0;if(L(D,F).forEach(W=>{Y++;const O=Aa(W),N=z;z+=W.length;const X=z-1;C?g=y.move(T[N][0],T[N][1])+O:_?g=y.move(P[N][0],P[N][1])+y.line(T[N][0],T[N][1])+O+y.line(P[X][0],P[X][1]):(g=y.move(T[N][0],T[N][1])+O,p=g+y.line(T[X][0],w)+y.line(T[N][0],w)+"z",m.push(p)),b.push(g)}),_&&Y>1&&!C){const W=b.slice(Y).reverse();b.splice(Y),W.forEach(O=>b.push(O))}f=0;break}}break}case"smooth":{const S=(a-h)*.35;if(e[s][i]===null)f=0;else switch(f){case 0:if(u=h,C?g=y.move(h,c[i])+y.line(h,d):g=y.move(h,d),p=y.move(h,d),e[s][i+1]===null||typeof e[s][i+1]>"u"){b.push(g),m.push(p);break}if(f=1,i<e[s].length-2){const k=y.curve(h+S,d,a-S,n,a,n);g+=k,p+=k;break}case 1:if(e[s][i+1]===null)C?g+=y.line(h,l):g+=y.move(h,d),p+=y.line(h,w)+y.line(u,w)+"z",b.push(g),m.push(p),f=-1;
1381else{const k=y.curve(h+S,d,a-S,n,a,n);g+=k,p+=k,i>=e[s].length-2&&(C&&(g+=y.curve(a,n,a,n,a,l)+y.move(a,l)),p+=y.curve(a,n,a,n,a,w)+y.line(u,w)+"z",b.push(g),m.push(p),f=-1)}break}h=a,d=n;break}default:{const S=(k,M,L)=>{let E="";switch(k){case"stepline":E=y.line(M,null,"H")+y.line(null,L,"V");break;case"linestep":E=y.line(null,L,"V")+y.line(M,null,"H");break;case"straight":E=y.line(M,L);break}return E};if(e[s][i]===null)f=0;else switch(f){case 0:if(u=h,C?g=y.move(h,c[i])+y.line(h,d):g=y.move(h,d),p=y.move(h,d),e[s][i+1]===null||typeof e[s][i+1]>"u"){b.push(g),m.push(p);break}if(f=1,i<e[s].length-2){const k=S(A,a,n);g+=k,p+=k;break}case 1:if(e[s][i+1]===null)C?g+=y.line(h,l):g+=y.move(h,d),p+=y.line(h,w)+y.line(u,w)+"z",b.push(g),m.push(p),f=-1;else{const k=S(A,a,n);g+=k,p+=k,i>=e[s].length-2&&(C&&(g+=y.line(a,l)),p+=y.line(a,w)+y.line(u,w)+"z",b.push(g),m.push(p),f=-1)}break}h=a,d=n;break}}return{linePaths:b,areaPaths:m,pX:h,pY:d,pathState:f,segmentStartX:u,linePath:g,areaPath:p}}handleNullDataPoints(t,e,s,i,a){const n=this.w;if(t[s][i]===null&&n.config.markers.showNullDataPoints||t[s].length===1){let r=this.strokeWidth-n.config.markers.strokeWidth/2;r>0||(r=0);const o=this.markers.plotChartMarkers({pointsPos:e,seriesIndex:a,j:i+1,pSize:r,alwaysDrawMarker:!0});o!==null&&this.elPointsMain.add(o)}}}class Me{constructor(t){this.w=t}drawYAxisTexts(t,e,s,i){const a=this.w,n=a.config.yaxis[0],r=a.formatters.yLabelFormatters[0];return new I(this.w).drawText({x:t+n.labels.offsetX,y:e+n.labels.offsetY,text:r(i,s),textAnchor:"middle",fontSize:n.labels.style.fontSize,fontFamily:n.labels.style.fontFamily,foreColor:Array.isArray(n.labels.style.colors)?n.labels.style.colors[s]:n.labels.style.colors})}getMaxLabelWidth(t,{fontSize:e,fontFamily:s}={}){const i=new I(this.w);let a=0;return t.forEach(n=>{if(n===null||typeof n>"u"||n==="")return;const r=i.getTextRects(`${n}`,e||"12px",s,"");a=Math.max(a,r.width)}),a}drawExternalLabel({lines:t,lineHeight:e,anchor:s,elbow:i,labelX:a,labelY:n,side:r,connector:o,style:l,foreColor:c}){const h=new I(this.w),d=h.group({class:"apexcharts-pie-name-label-group"});if(o.show){const b=`M ${s.x} ${s.y} L ${i.x} ${i.y} L ${a} ${n}`,m=h.drawPath({d:b,stroke:o.color,strokeWidth:o.width,fill:"none",strokeLinecap:"round"});m.node.classList.add("apexcharts-pie-label-connector"),d.add(m)}const f=r==="right"?a+4:a-4,u=t.length,g=n-(u-1)*e/2,p=h.drawText({x:f,y:g,text:u===1?t[0]:t,textAnchor:r==="right"?"start":"end",fontSize:l.fontSize,fontFamily:l.fontFamily,fontWeight:l.fontWeight,foreColor:c,dominantBaseline:"central",cssClass:"apexcharts-pie-name-label"});if(u>1){const b=p.node.getElementsByTagName("tspan");for(let m=0;m<b.length;m++)b[m].setAttribute("x",`${f}`),b[m].setAttribute("dy",m===0?"0":`${e}`)}return d.add(p),d}}const Ei=Math.PI/180,Ms=180/Math.PI;function Is(x,t,e,s){return{x:x+e*Math.cos((s-90)*Ei),y:t+e*Math.sin((s-90)*Ei)}}const at=x=>`${x.x} ${x.y}`;function Sa({cx:x,cy:t,rIn:e,rOut:s,a0:i,a1:a,r:n,spanDeg:r}){const o=(S,k)=>Is(x,t,S,k),l=n/s*Ms,c=n/e*Ms,h=o(s,i+l),d=o(s,a-l),f=r-2*l>180?1:0,u=o(s,a),g=o(s-n,a),p=o(s,i),b=o(s-n,i),m=o(e,a-c),A=o(e,i+c),v=r-2*c>180?1:0,y=o(e,a),w=o(e+n,a),_=o(e,i),C=o(e+n,i);return["M",at(h),"A",s,s,0,f,1,at(d),"Q",at(u),at(g),"L",at(w),"Q",at(y),at(m),"A",e,e,0,v,0,at(A),"Q",at(_),at(C),"L",at(b),"Q",at(p),at(h),"Z"].join(" ")}function il({cx:x,cy:t,rOut:e,a0:s,a1:i,r:a,spanDeg:n}){const r=(p,b)=>Is(x,t,p,b),o=a/e*Ms,l=r(e,s+o),c=r(e,i-o),h=n-2*o>180?1:0,d=r(e,i),f=r(e-a,i),u=r(e,s),g=r(e-a,s);return["M",at(l),"A",e,e,0,h,1,at(c),"Q",at(d),at(f),"L",`${x} ${t}`,"L",at(g),"Q",at(u),at(l),"Z"].join(" ")}function al({cx:x,cy:t,rIn:e,rOut:s,a0:i,a1:a,spanDeg:n}){const r=(f,u)=>Is(x,t,f,u),o=n>180?1:0,l=r(s,i),c=r(s,a),h=r(e,a),d=r(e,i);return["M",at(l),"A",s,s,0,o,1,at(c),"L",at(h),"A",e,e,0,o,0,at(d),"Z"].join(" ")}class Le{constructor(t,e){this.ctx=e,this.w=t,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=t.globals.stroke.colors!==void 0?t.globals.stroke.colors:t.globals.colors,this.defaultSize=Math.min(t.layout.gridWidth,t.layout.gridHeight),this.centerY=this.defaultSize/2,this.centerX=t.layout.gridWidth/2,t.config.chart.type==="radialBar"?this.fullAngle=360:this.fullAngle=Math.abs(t.config.plotOptions.pie.endAngle-t.config.plotOptions.pie.startAngle),this.initialAngle=t.config.plotOptions.pie.startAngle%this.fullAngle,t.globals.radialSize=this.defaultSize/2.05-t.config.stroke.width-(t.config.chart.sparkline.enabled?0:t.config.chart.dropShadow.blur),this.externalCfg=t.config.plotOptions.pie.dataLabels.external;const s=t.config.dataLabels.style;this.externalLabelStyle={fontSize:this.externalCfg.fontSize||s.fontSize,fontFamily:this.externalCfg.fontFamily||s.fontFamily,fontWeight:this.externalCfg.fontWeight||s.fontWeight},this.externalLabels=[],this.externalLabelMaxLines=1,this.externalLabelLineH=parseFloat(this.externalLabelStyle.fontSize)||12,t.globals.pieExternalLabelMarginY=0,this.showExternalLabels=this.externalCfg.show&&this.chartType!=="polarArea",this.showExternalLabels&&!t.globals.noData&&this.reserveExter
1381nalLabelSpace(),this.donutSize=t.globals.radialSize*parseInt(t.config.plotOptions.pie.donut.size,10)/100;const i=t.config.plotOptions.pie.customScale,a=t.layout.gridWidth/2,n=t.layout.gridHeight/2;this.translateX=a-a*i,this.translateY=n-n*i,this.dataLabelsGroup=new I(this.w).group({class:"apexcharts-datalabels-group",transform:`translate(${this.translateX}, ${this.translateY}) scale(${i})`}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}getExternalLabelText(t){var e,s,i;const a=this.w,n=a.seriesData.seriesNames[t],r=this.externalCfg.formatter;return typeof r=="function"?r(n,{seriesIndex:t,percent:(s=(e=a.globals.seriesPercent)==null?void 0:e[t])==null?void 0:s[0],value:(i=a.globals.seriesTotals)==null?void 0:i[t],w:a}):n==null?"":`${n}`}getExternalLabelLines(t){const e=this.getExternalLabelText(t);return(Array.isArray(e)?e:`${e??""}`.split(`
1382`)).map(i=>i==null?"":`${i}`)}reserveExternalLabelSpace(){const t=this.w,e=new Me(t),s=(t.seriesData.seriesNames||[]).map((d,f)=>this.getExternalLabelLines(f)),i=e.getMaxLabelWidth(s.flat(),{fontSize:this.externalLabelStyle.fontSize,fontFamily:this.externalLabelStyle.fontFamily});this.externalLabelMaxLines=s.reduce((d,f)=>Math.max(d,f.length),1),this.externalLabelLineH=Math.round((parseFloat(this.externalLabelStyle.fontSize)||12)*1.35);const a=this.externalCfg.connector,n=this.externalLabelMaxLines*this.externalLabelLineH,r=i+(a.length||0)+(a.gap||0)+12,o=n/2+(a.gap||0)+6,l=Math.min(t.globals.radialSize,t.layout.gridWidth/2-r,t.layout.gridHeight/2-o);t.globals.radialSize=Math.max(l,this.defaultSize*.15),t.globals.pieExternalLabelMarginY=o;const c=t.config.chart.height?String(t.config.chart.height):"",h=c!==""&&c!=="auto";this.centerY=h?t.layout.gridHeight/2:t.globals.radialSize+o}draw(t){var e;const s=this,i=this.w,a=new I(this.w),n=a.group({class:"apexcharts-pie"});if(i.globals.noData)return n;let r=0;for(let d=0;d<t.length;d++)r+=R.negToZero(t[d]);const o=[],l=a.group();r===0&&(r=1e-5),t.forEach(d=>{this.maxY=Math.max(this.maxY,d)}),i.config.yaxis[0].max&&(this.maxY=i.config.yaxis[0].max),i.config.grid.position==="back"&&this.chartType==="polarArea"&&this.drawPolarElements(n);for(let d=0;d<t.length;d++){const f=this.fullAngle*R.negToZero(t[d])/r;o.push(f),this.chartType==="polarArea"?(o[d]=this.fullAngle/t.length,this.sliceSizes.push(i.globals.radialSize*t[d]/(this.maxY||1))):this.sliceSizes.push(i.globals.radialSize)}const c=((e=this.ctx.morphTypeChange)==null?void 0:e.isActive())===!0;if(i.globals.dataChanged&&!c){let d=0;for(let u=0;u<i.globals.previousPaths.length;u++)d+=R.negToZero(i.globals.previousPaths[u]);let f;for(let u=0;u<i.globals.previousPaths.length;u++)f=this.fullAngle*R.negToZero(i.globals.previousPaths[u])/d,this.prevSectorAngleArr.push(f)}if(this.donutSize<0&&(this.donutSize=0),this.chartType==="donut"){const d=a.drawCircle(this.donutSize);d.attr({cx:this.centerX,cy:this.centerY,fill:i.config.plotOptions.pie.donut.background?i.config.plotOptions.pie.donut.background:"transparent"}),l.add(d)}const h=s.drawArcs(o,t);
1382if(this.sliceLabels.forEach(d=>{h.add(d)}),l.attr({transform:`translate(${this.translateX}, ${this.translateY}) scale(${i.config.plotOptions.pie.customScale})`}),l.add(h),n.add(l),this.donutDataLabels.show){const d=this.initialAnim&&!i.globals.resized&&!i.globals.dataChanged&&this.animDur>0,f=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:d?0:this.donutDataLabels.show});if(d){const u=this.dataLabelsGroup.node;u.style.transition="opacity 280ms ease-out",setTimeout(()=>{u.style.opacity="1"},this.animDur)}n.add(f)}return i.config.grid.position==="front"&&this.chartType==="polarArea"&&this.drawPolarElements(n),n}drawArcs(t,e){var s,i;const a=this.w,n=new dt(this.w),r=new I(this.w),o=new pt(this.w),l=r.group({class:"apexcharts-slices"});let c=this.initialAngle,h=this.initialAngle,d=this.initialAngle,f=this.initialAngle;this.strokeWidth=a.config.stroke.show?a.config.stroke.width:0;const u=((s=this.ctx.morphTypeChange)==null?void 0:s.isActive())===!0;for(let g=0;g<t.length;g++){const p=r.group({class:"apexcharts-series apexcharts-pie-series",seriesName:R.escapeString(a.seriesData.seriesNames[g]),rel:g+1,"data:realIndex":g});l.add(p),c=d,h=f,d=c+t[g],f=h+this.prevSectorAngleArr[g];const b=d<c?this.fullAngle+d-c:d-c,m=o.fillPath({seriesNumber:g,size:this.sliceSizes[g],value:e[g]}),A=u?this.ctx.morphTypeChange.getInitialPathFor(g,0):null,v=A||this.getChangedPath(h,f),y=r.drawPath({d:v,stroke:Array.isArray(this.lineColorArr)?(i=this.lineColorArr[g])!=null?i:this.lineColorArr[g%this.lineColorArr.length]:this.lineColorArr,strokeWidth:0,fill:m,fillOpacity:a.config.fill.opacity,classes:`apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${g}`});if(y.attr({index:0,j:g}),n.setSelectionFilter(y,0,g),a.config.chart.dropShadow.enabled){const k=a.config.chart.dropShadow;n.dropShadow(y,k,g)}this.addListeners(y,this.donutDataLabels);let w={x:0,y:0};const _=(c+b/2)%this.fullAngle;let C={x:this.centerX,y:this.centerY};this.chartType==="pie"||this.chartType==="polarArea"?(w=R.polarToCartesian(this.centerX,this.centerY,a.globals.radialSize/1.25+a.config.plotOptions.pie.dataLabels.offset,_),C=R.polarToCartesian(this.centerX,this.centerY,a.globals.radialSize/2,_)):this.chartType==="donut"&&(w=R.polarToCartesian(this.centerX,this.centerY,(a.globals.radialSize+this.donutSize)/2+a.config.plotOptions.pie.dataLabels.offset,_),C=R.polarToCartesian(this.centerX,this.centerY,(a.globals.radialSize+this.donutSize)/2,_)),I.setAttrs(y.node,{"data:angle":b,"data:startAngle":c,"data:strokeWidth":this.strokeWidth,"data:value":e[g],"data:cx":C.x,"data:cy":C.y}),p.add(y);let S=0;if(this.initialAnim&&!a.globals.resized&&!a.globals.dataChanged?(S=b/this.fullAngle*a.config.chart.animations.speed,S===0&&(S=1),this.animDur=S+this.animDur,this.animBeginArr.push(this.animDur)):this.animBeginArr.push(0),u&&A){const k=this.getPiePath({me:this,startAngle:c,angle:b,size:this.sliceSizes[g]}),M=this.ctx.morphTypeChange.getSpeed(),L=this.ctx.animations;y.node.setAttribute("data:pathOrig",k);const E=y.animate(M).plot(k,"polygons").attr({"stroke-width":this.strokeWidth});E&&typeof E.after=="function"?E.after(()=>L.animationCompleted(y)):L.animationCompleted(y)}else this.dynamicAnim&&a.globals.dataChanged?this.animatePaths(y,{size:this.sliceSizes[g],endAngle:d,startAngle:c,prevStartAngle:h,prevEndAngle:f,animateStartingPos:!0,i:g,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:
1382a.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(y,{size:this.sliceSizes[g],endAngle:d,startAngle:c,i:g,totalItems:t.length-1,animBeginArr:this.animBeginArr,dur:S});if(a.config.plotOptions.pie.expandOnClick&&this.chartType!=="polarArea"&&y.node.addEventListener("mouseup",this.pieClicked.bind(this,g)),typeof a.interact.selectedDataPoints[0]<"u"&&a.interact.selectedDataPoints[0].indexOf(g)>-1)if(this.initialAnim&&!a.globals.resized&&!a.globals.dataChanged&&this.animDur>0){const k=this,M=g;setTimeout(()=>k.pieClicked(M),this.animDur)}else this.pieClicked(g);if(a.config.dataLabels.enabled){const k=w.x,M=w.y;let L=100*b/this.fullAngle+"%";if(b!==0&&a.config.plotOptions.pie.dataLabels.minAngleToShowLabel<t[g]){const E=a.config.dataLabels.formatter;E!==void 0&&(L=E(a.globals.seriesPercent[g][0],{seriesIndex:g,w:a}));const D=a.globals.dataLabels.style.colors[g],T=r.group({class:"apexcharts-datalabels"}),F=r.drawText({x:k,y:M,text:L,textAnchor:"middle",fontSize:a.config.dataLabels.style.fontSize,fontFamily:a.config.dataLabels.style.fontFamily,fontWeight:a.config.dataLabels.style.fontWeight,foreColor:D});if(T.add(F),a.config.dataLabels.dropShadow.enabled){const P=a.config.dataLabels.dropShadow;n.dropShadow(F,P)}F.node.classList.add("apexcharts-pie-label"),a.config.chart.animations.animate&&a.globals.resized===!1&&(F.node.classList.add("apexcharts-pie-label-delay"),F.node.style.animationDelay=a.config.chart.animations.speed/940+"s"),this.sliceLabels.push(T)}}if(this.showExternalLabels&&b!==0){const k=this.getExternalLabelLines(g);if(k.some(M=>M!=="")){const M=R.polarToCartesian(this.centerX,this.centerY,a.globals.radialSize,_),L=R.polarToCartesian(this.centerX,this.centerY,a.globals.radialSize+(this.externalCfg.connector.gap||0),_),E=L.x>=this.centerX,D=E?L.x+(this.externalCfg.connector.length||0):L.x-(this.externalCfg.connector.length||0);this.externalLabels.push({lines:k,anchor:M,elbow:L,side:E?"right":"left",labelX:D+parseFloat(this.externalCfg.offsetX||0),idealY:L.y+parseFloat(this.externalCfg.offsetY||0),connectorColor:this.externalCfg.connector.color||a.globals.colors[g],foreColor:this.externalCfg.color||a.config.chart.foreColor})}}}if(this.showExternalLabels&&this.externalLabels.length){this.placeExternalLabels();const g=H.isBrowser()&&(u||this.dynamicAnim&&a.globals.dataChanged||this.initialAnim&&!a.globals.resized&&!a.globals.dataChanged);
1382this.externalLabels.forEach(p=>{const b=new Me(a).drawExternalLabel({lines:p.lines,lineHeight:this.externalLabelLineH,anchor:p.anchor,elbow:p.elbow,labelX:p.labelX,labelY:p.labelY,side:p.side,connector:{show:this.externalCfg.connector.show,width:this.externalCfg.connector.width,color:p.connectorColor},style:this.externalLabelStyle,foreColor:p.foreColor});g&&(b.node.classList.add("apexcharts-element-hidden"),a.globals.delayedElements.push({el:b.node})),l.add(b)})}return l}placeExternalLabels(){const t=this.w,e=this.externalLabelMaxLines*this.externalLabelLineH+2,s=this.centerY+t.globals.radialSize+t.globals.pieExternalLabelMarginY;["left","right"].forEach(i=>{const a=this.externalLabels.filter(o=>o.side===i).sort((o,l)=>o.idealY-l.idealY);a.forEach(o=>{o.labelY=o.idealY});for(let o=1;o<a.length;o++)a[o].labelY-a[o-1].labelY<e&&(a[o].labelY=a[o-1].labelY+e);const n=a[a.length-1],r=n?n.labelY-s:0;if(r>0)for(let o=a.length-1;o>=0;o--)a[o].labelY-=r,o<a.length-1&&a[o+1].labelY-a[o].labelY<e&&(a[o].labelY=a[o+1].labelY-e)})}addListeners(t,e){const s=new I(this.w);t.node.addEventListener("mouseenter",s.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",s.pathMouseLeave.bind(this,t)),t.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this)),t.node.addEventListener("mousedown",s.pathMouseDown.bind(this,t)),this.donutDataLabels.total.showAlways||(t.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,t.node,e)),t.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,t.node,e)))}animatePaths(t,e){const s=this.w,i=this;let a=e.endAngle<e.startAngle?this.fullAngle+e.endAngle-e.startAngle:e.endAngle-e.startAngle,n=a,r=e.startAngle;const o=e.startAngle;e.prevStartAngle!==void 0&&e.prevEndAngle!==void 0&&(r=e.prevEndAngle,n=e.prevEndAngle<e.prevStartAngle?this.fullAngle+e.prevEndAngle-e.prevStartAngle:e.prevEndAngle-e.prevStartAngle),e.i===s.config.series.length-1&&(a+o>this.fullAngle?e.endAngle=e.endAngle-(a+o):a+o<this.fullAngle&&(e.endAngle=e.endAngle+(this.fullAngle-(a+o)))),a===this.fullAngle&&(a=this.fullAngle-.01),i.animateArc(t,r,o,a,n,e)}animateArc(t,e,s,i,a,n){const r=this,o=this.w,l=new ne(this.w),c=n.size;let h;(isNaN(e)||isNaN(a))&&(e=s,a=i,n.dur=0);let d=i,f=s;const u=e<s?this.fullAngle+e-s:e-s;o.globals.dataChanged&&n.shouldSetPrevPaths&&n.prevEndAngle&&(h=r.getPiePath({me:r,startAngle:n.prevStartAngle,angle:n.prevEndAngle<n.prevStartAngle?this.fullAngle+n.prevEndAngle-n.prevStartAngle:n.prevEndAngle-n.prevStartAngle,size:c}),t.attr({d:h})),n.dur!==0?t.animate(n.dur,n.animBeginArr[n.i]).after(function(){(r.chartType==="pie"||r.chartType==="donut"||r.chartType==="polarArea")&&this.animate(o.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":r.strokeWidth}),n.i===o.config.series.length-1&&l.animationCompleted(t)}).during(g=>{d=u+(i-u)*g,n.animateStartingPos&&(d=a+(i-a)*g,f=e-a+(s-(e-a))*g),h=r.getPiePath({me:r,startAngle:f,angle:d,size:c}),t.node.setAttribute("data:pathOrig",h),t.attr({d:h})}):(h=r.getPiePath({me:r,startAngle:f,angle:i,size:c}),n.isTrack||(o.globals.animationEnded=!0),t.node.setAttribute("data:pathOrig",h),t.attr({d:h,"stroke-width":r.strokeWidth}))}pieClicked(t){const e=this.w,s=this,i=s.sliceSizes[t]+(e.config.plotOptions.pie.expandOnClick?4:0),a=e.dom.Paper.findOne(`.apexcharts-${s.chartType.toLowerCase()}-slice-${t}`);if(a.attr("data:pieClicked")==="true"){a.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner();const l=a.attr("data:pathOrig");a.attr({d:l});return}else{const l=e.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(l,c=>{c.setAttribute("data:pieClicked","false");const h=c.getAttribute("data:pathOrig");h&&c.setAttribute("d",h)}),e.interact.capturedDataPointIndex=t,a.attr("data:pieClicked","true")}const n=parseInt(a.attr("data:startAngle"),10),r=parseInt(a.attr("data:angle"),10),o=s.getPiePath({me:s,startAngle:n,angle:r,size:i});r!==360&&a.plot(o)}getChangedPath(t,e){let s="";return this.dynamicAnim&&this.w.globals.dataChanged&&(s=this.getPiePath({me:this,startAngle:t,angle:e-t,size:this.size})),s}getPiePath({me:t,startAngle:e,angle:s,size:i}){let a;const n=this.w,r=new I(this.w);let o=e,l=s+e;Math.ceil(l)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(l=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01);let c=l-o;const h=t.chartType==="pie"||t.chartType==="donut"||t.chartType==="polarArea",d=n.config.plotOptions.pie.spacing;if(h&&d>0&&c>0){const C=t.chartType==="donut"?(i+t.donutSize)/2:i,S=C>0?d/C*(180/Math.PI):0,k=Math.min(S/2,Math.max(0,c/2-.5));o+=k,c-=2*k}l=o+c,Math.ceil(l)>this.fullAngle&&(l-=this.fullAngle);const f=Math.PI*(o-90)/180,u=n.config.plotOptions.pie.borderRadius;if(u>0&&h){const C=this.getRoundedSlicePath({me:t,startDeg:o,spanDeg:c,size:i,borderRadius:u});if(C)return C}const g=Math.PI*(l-90)/180,p=t.centerX+i*Math.cos(f),b=t.centerY+i*Math.sin(f),m=t.centerX+i*Math.cos(g),A=t.centerY+i*Math.sin(g),v=R.polarToCartesian(t.centerX,t.centerY,t.donutSize,l),y=R.polarToCartesian(t.centerX,t.centerY,t.donutSize,o),w=c>180?1:0,_=["M",p,b,"A",i,i,0,w,1,m,A];return t.chartType==="donut"?a=[..._,"L",v.x,v.y,"A",t.donutSize,t.donutSize,0,w,0,y.x,y.y,"L",p,b,"z"].join(" "):t.chartType==="pie"||t.chartType==="polarArea"?a=[..._,"L",t.centerX,t.centerY,"L",p,b].join(" "):a=[..._].join(" "),r.roundPathCorners(a,this.strokeWidth*2)}getRoundedSlicePath({me:t,startDeg:e,spanDeg:s,size:i,borderRadius:a}){if(!(s>0))return null;const n=Math.PI/180,r=t.centerX,o=t.centerY,l=t.chartType==="donut",c=i,h=l?t.donutSize:0,d=s*n;let f=a;if(f=Math.min(f,d*c/2),l?(f=Math.min(f,d*h/2),f=Math.min(f,(c-h)/2)):f=Math.min(f,c/2),!(f>.5))return null;const u=e,g=e+s;return l?Sa({cx:r,cy:o,rIn:h,rOut:c,a0:u,a1:g,r:f,spanDeg:s}):il({cx:r,cy:o,rOut:c,a0:u,a1:g,r:f,spanDeg:s})}drawPolarElements(t){const e=this.w,s=new qi(this.w),i=new I(this.w),a=new Me(this.w),n=i.group(),r=i.group(),o=s.niceScale(0,Math.ceil(this.maxY),0),l=o.result.reverse(),c=o.result.length;this.maxY=o.niceMax;let h=e.globals.radialSize;const d=h/(c-1);for(let f=0;f<c-1;f++){const u=i.drawCircle(h);if(u.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":e.config.plotOptions.polarArea.r
1382ings.strokeWidth,stroke:e.config.plotOptions.polarArea.rings.strokeColor}),e.config.yaxis[0].show){const g=a.drawYAxisTexts(this.centerX,this.centerY-h+parseInt(e.config.yaxis[0].labels.style.fontSize,10)/2,f,l[f]);r.add(g)}n.add(u),h=h-d}this.drawSpokes(t),t.add(n),t.add(r)}renderInnerDataLabels(t,e,s){const i=this.w,a=new I(this.w),n=e.total.show;t.node.innerHTML="",t.node.style.opacity=s.opacity;const r=s.centerX,o=this.donutDataLabels.total.label?s.centerY:s.centerY-s.centerY/6;let l,c;e.name.color===void 0?l=i.globals.colors[0]:l=e.name.color;let h=e.name.fontSize,d=e.name.fontFamily,f=e.name.fontWeight;e.value.color===void 0?c=i.config.chart.foreColor:c=e.value.color;const u=e.value.formatter;let g="",p="";if(n?(l=e.total.color,h=e.total.fontSize,d=e.total.fontFamily,f=e.total.fontWeight,p=this.donutDataLabels.total.label?e.total.label:"",g=e.total.formatter(i)):i.seriesData.series.length===1&&(g=u(i.seriesData.series[0],i),p=i.seriesData.seriesNames[0]),p&&(p=e.name.formatter(p,e.total.show,i)),e.name.show){const b=a.drawText({x:r,y:o+parseFloat(e.name.offsetY),text:p,textAnchor:"middle",foreColor:l,fontSize:h,fontWeight:f,fontFamily:d});b.node.classList.add("apexcharts-datalabel-label"),t.add(b)}if(e.value.show){const b=e.name.show?parseFloat(e.value.offsetY)+16:e.value.offsetY,m=a.drawText({x:r,y:o+b,text:g,textAnchor:"middle",foreColor:c,fontWeight:e.value.fontWeight,fontSize:e.value.fontSize,fontFamily:e.value.fontFamily});m.node.classList.add("apexcharts-datalabel-value"),t.add(m)}return t}printInnerLabels(t,e,s,i){const a=this.w;let n;i?t.name.color===void 0?n=a.globals.colors[parseInt(i.parentNode.getAttribute("rel"),10)-1]:n=t.name.color:a.seriesData.series.length>1&&t.total.show&&(n=t.total.color);const r=a.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=a.dom.baseEl.querySelector(".apexcharts-datalabel-value"),l=t.value.formatter;s=l(s,a),!i&&typeof t.total.formatter=="function"&&(s=t.total.formatter(a));const c=e===t.total.label;if(e=this.donutDataLabels.total.label?t.name.formatter(e,c,a):"",r!==null&&(r.textContent=e),o!==null&&(o.textContent=s),r!==null){const h=r;h.style.fill=n}}printDataLabelsInner(t,e){const s=this.w,i=t.getAttribute("data:value"),a=s.seriesData.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];s.seriesData.series.length>1&&this.printInnerLabels(e,a,i,t);const n=s.dom.baseEl.querySelector(".apexcharts-datalabels-group");if(n!==null){const r=n;r.style.opacity="1"}}drawSpokes(t){const e=this.w,s=new I(this.w),i=e.config.plotOptions.polarArea.spokes;if(i.strokeWidth===0)return;const a=[],n=360/e.seriesData.series.length;for(let r=0;r<e.seriesData.series.length;r++)a.push(R.polarToCartesian(this.centerX,this.centerY,e.globals.radialSize,e.config.plotOptions.pie.startAngle+n*r));a.forEach((r,o)=>{const l=s.drawLine(r.x,r.y,this.centerX,this.centerY,Array.isArray(i.connectorColors)?i.connectorColors[o]:i.connectorColors);t.add(l)})}revertDataLabelsInner(){const t=this.w;if(this.donutDataLabels.show){const e=t.dom.Paper.findOne(".apexcharts-datalabels-group"),s=this.renderInnerDataLabels(e,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});t.dom.Paper.findOne(".apexcharts-radialbar, .apexcharts-pie").add(s)}}}class nl{constructor(t,e){this.ctx=e,this.w=t,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0,this.graphics=new I(this.w),this.lineColorArr=t.globals.stroke.colors!==void 0?t.globals.stroke.colors:t.globals.colors,this.defaultSize=t.globals.svgHeight<t.globals.svgWidth?t.layout.gridHeight:t.layout.gridWidth,this.isLog=t.config.yaxis[0].logarithmic,this.logBase=t.config.yaxis[0].logBase,this.coreUtils=new rt(this.w),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,t.globals.maxY,0):t.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):t.globals.minY,this.polygons=t.config.plotOptions.radar.polygons,this.strokeWidth=t.config.stroke.show?t.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-t.config.chart.dropShadow.blur,t.config.xaxis.labels.show&&(this.size=this.size-t.layout.xAxisLabelsWidth/1.75),t.config.plotOptions.radar.size!==void 0&&(this.size=t.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.dataPointsLen=0,this.disAngle=0,this.yaxisLabelsTextsPos=[]}draw(t){const e=this.w,s=new pt(this.w),i=[],a=new Ut(this.w,this.ctx);t.length&&(this.dataPointsLen=t[e.globals.maxValsInArrayIndex].length),this.disAngle=Math.PI*2/this.dataPointsLen;const n=e.layout.gridWidth/2,r=e.layout.gridHeight/2,o=n+e.config.plotOptions.radar.offsetX,l=r+e.config.plotOptions.radar.offsetY,c=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:`translate(${o||0}, ${l||0})`});let h=[],d=null,f=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),t.forEach((u,g)=>{const p=u.length===e.globals.dataPoints,b=this.graphics.group().attr({class:"apexcharts-series","data:longestSeries":p,seriesName:R.escapeString(e.seriesData.seriesNames[g]),rel:g+1,"data:realIndex":g});this.dataRadiusOfPercent[g]=[],this.dataRadius[g]=[],this.angleArr[g]=[],u.forEach((y,w)=>{const _=Math.abs(this.maxValue-this.minValue);y=y-this.minValue,this.isLog&&(y=this.coreUtils.getLogVal(this.logBase,y,0)),this.dataRadiusOfPercent[g][w]=y/_,this.dataRadius[g][w]=this.dataRadiusOfPercent[g][w]*this.size,this.angleArr[g][w]=w*this.disAngle}),h=this.getDataPointsPos(this.dataRadius[g],this.angleArr[g]);const m=this.createPaths(h,{x:0,y:0});d=this.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),f=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":g}),e.globals.delayedElements.push({el:d.node,index:g});const A={i:g,realIndex:g,animationDelay:g,initialSpeed:e.config.chart.animations.speed,dataChangeSpeed:e.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:e.globals.stroke.colors[g],strokeLineCap:e.config.stroke.lineCap};let v=null;e.globals.previousPaths.length>0&&(v=this.getPreviousPath(g));for(let y=0;y<m.linePathsTo.length;y++){const w=this.graphics.renderPaths(Z(G({},A),{pathFrom:v===null?m.linePathsFrom[y]:v,pathTo:m.linePathsTo[y],strokeWidth:Array.isArray(this.strokeWidth)?this.strokeWidth[g]:this.strokeWidth,fill:"none",drawShadow:!1}));b.add(w);const _=s.fillPath({seriesNumber:g}),C=this.graphics.renderPaths(Z(G({},A),{pathFrom:v===null?m.areaPathsFrom[y]:v,pathTo:m.areaPathsTo[y],strokeWidth:0,fill:_,drawShadow:!1,drawMask:{type:"radial",cx:0,cy:0,r:this.size}}));if(e.config.chart.dropShadow.enabled){const S=new dt(this.w),k=e.config.chart.dropShadow;S.dropShadow(C,Object.assign({},k,{noUserSpaceOnUse:!0}),g)}b.add(C)}u.forEach((y,w)=>{const C=new re(this.w,this.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:g,dataPointIndex:w}),S=this.graphics.drawMarker(h[w].x,h[w].y,C);S.attr("rel",w),S.attr("j",w),S.attr("index",g),S.node.setAttribute("default-marker-size",C.pSize);const k=this.graphics.group({class:"apexcharts-series-markers"});k&&k.add(S),d.add(k),b.add(d);const M=e.config.dataLabels;if(M.enabled){const L=M.formatter(e.seriesData.series[g][w],{seriesIndex:g,dataPointIndex:w,w:e});a.plotDataLabelsText({x:h[w].x,y:h[w].y,text:L,textAnchor:"middle",i:g,j:g,parent:f,offsetCorrection:!1,dataLabelsConfig:G({},M)})}b.add(f)}),i.push(b)}),this.drawPolygons({parent:c}),e.config.xaxis.labels.show){const u=this.drawXAxisTexts();c.add(u)}
1382return i.forEach(u=>{c.add(u)}),c.add(this.yaxisLabels),c}drawPolygons(t){const e=this.w,{parent:s}=t,i=new Me(this.w),a=e.globals.yAxisScale[0].result.reverse(),n=a.length,r=[],o=this.size/(n-1);for(let h=0;h<n;h++)r[h]=o*h;r.reverse();const l=[],c=[];r.forEach((h,d)=>{const f=R.getPolygonPos(h,this.dataPointsLen);let u="";f.forEach((g,p)=>{if(d===0){const b=this.graphics.drawLine(g.x,g.y,0,0,Array.isArray(this.polygons.connectorColors)?this.polygons.connectorColors[p]:this.polygons.connectorColors);c.push(b)}p===0&&this.yaxisLabelsTextsPos.push({x:g.x,y:g.y}),u+=g.x+","+g.y+" "}),l.push(u)}),l.forEach((h,d)=>{const f=this.polygons.strokeColors,u=this.polygons.strokeWidth,g=this.graphics.drawPolygon(h,Array.isArray(f)?f[d]:f,Array.isArray(u)?u[d]:u,e.globals.radarPolygons.fill.colors[d]);s.add(g)}),c.forEach(h=>{s.add(h)}),e.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach((h,d)=>{const f=i.drawYAxisTexts(h.x,h.y,d,a[d]);this.yaxisLabels.add(f)})}drawXAxisTexts(){const t=this.w,e=t.config.xaxis.labels,s=this.graphics.group({class:"apexcharts-xaxis"}),i=R.getPolygonPos(this.size,this.dataPointsLen);return t.labelData.labels.forEach((a,n)=>{const r=t.config.xaxis.labels.formatter,o=new Ut(this.w,this.ctx);if(i[n]){const l=this.getTextPos(i[n],this.size),c=r(a,{seriesIndex:-1,dataPointIndex:n,w:t});o.plotDataLabelsText({x:l.newX,y:l.newY,text:c,textAnchor:l.textAnchor,i:n,j:n,parent:s,className:"apexcharts-xaxis-label",color:Array.isArray(e.style.colors)&&e.style.colors[n]?e.style.colors[n]:"#a8a8a8",dataLabelsConfig:G({textAnchor:l.textAnchor,dropShadow:{enabled:!1}},e),offsetCorrection:!1}).on("click",d=>{if(typeof t.config.chart.events.xAxisLabelClick=="function"){const f=Object.assign({},t,{labelIndex:n});t.config.chart.events.xAxisLabelClick(d,this.ctx,f)}})}}),s}createPaths(t,e){const s=[];let i=[];const a=[];let n=[];if(t.length){i=[this.graphics.move(e.x,e.y)],n=[this.graphics.move(e.x,e.y)];let r=this.graphics.move(t[0].x,t[0].y),o=this.graphics.move(t[0].x,t[0].y);t.forEach((l,c)=>{r+=this.graphics.line(l.x,l.y),o+=this.graphics.line(l.x,l.y),c===t.length-1&&(r+="Z",o+="Z")}),s.push(r),a.push(o)}return{linePathsFrom:i,linePathsTo:s,areaPathsFrom:n,areaPathsTo:a}}getTextPos(t,e){let i="middle",a=t.x,n=t.y;return Math.abs(t.x)>=10?t.x>0?(i="start",a+=10):t.x<0&&(i="end",a-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?n-=10:t.y>0&&(n+=10)),{textAnchor:i,newX:a,newY:n}}getPreviousPath(t){const e=this.w;let s=null;for(let i=0;i<e.globals.previousPaths.length;i++){const a=e.globals.previousPaths[i];a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(String(t),10)&&typeof e.globals.previousPaths[i].paths[0]<"u"&&(s=e.globals.previousPaths[i].paths[0].d)}return s}getDataPointsPos(t,e,s=this.dataPointsLen){t=t||[],e=e||[];const i=[];for(let a=0;a<s;a++){const n={};n.x=t[a]*Math.sin(e[a]),n.y=-t[a]*Math.cos(e[a]),i.push(n)}return i}}class rl extends Le{constructor(t,e){super(t,e),this.ctx=e,this.w=t,this.animBeginArr=[0],this.animDur=0,this.startAngle=t.config.plotOptions.radialBar.startAngle,this.endAngle=t.config.plotOptions.radialBar.endAngle,this.totalAngle=Math.abs(t.config.plotOptions.radialBar.endAngle-t.config.plotOptions.radialBar.startAngle),this.trackStartAngle=t.config.plotOptions.radialBar.track.startAngle,this.trackEndAngle=t.config.plotOptions.radialBar.track.endAngle,this.barLabels=this.w.config.plotOptions.radialBar.barLabels,this.donutDataLabels=this.w.config.plotOptions.radialBar.dataLabels,this.radialDataLabels=this.donutDataLabels,this.trackStartAngle||(this.trackStartAngle=this.startAngle),this.trackEndAngle||(this.trackEndAngle=this.endAngle),this.endAngle===360&&(this.endAngle=359.99),this.margin=parseInt(t.config.plotOptions.radialBar.track.margin,10),this.onBarLabelClick=this.onBarLabelClick.bind(this)}draw(t){var e;const s=this.w,i=new I(this.w),a=i.group({class:"apexcharts-radialbar"});if(s.globals.noData)return a;const n=i.group(),r=this.defaultSize/2,o=s.layout.gridWidth/2;let l=this.defaultSize/2.05;s.config.chart.sparkline.enabled||(l=l-s.config.stroke.width-s.config.chart.dropShadow.blur);const c=s.globals.fill.colors,h=s.config.plotOptions.radialBar,d=Array.isArray(h.bands)&&h.bands.length>
13820,f=d&&h.bandsStyle&&h.bandsStyle.hideTrackWhenPresent,u=h.shape==="needle";if(h.track.show&&!f){const m=this.drawTracks({size:l,centerX:o,centerY:r,colorArr:c,series:t});n.add(m)}if(d){const m=this.drawBands({size:l,centerX:o,centerY:r,series:t});n.add(m)}const g=this.drawArcs({size:l,centerX:o,centerY:r,colorArr:c,series:t,skipValueArc:u&&!((e=h.needle)!=null&&e.showValueArc)});if(h.ticks&&h.ticks.show){const m=this.drawTicks({size:l,centerX:o,centerY:r,series:t});if(this.initialAnim&&!s.globals.dataChanged&&!s.globals.resized&&H.isBrowser()&&s.globals.shouldAnimate){const v=m.node;v.style.opacity="0",v.style.transition="opacity 280ms ease-out";const y=s.config.chart.animations.speed||800;setTimeout(()=>{v.style.opacity="1"},y)}n.add(m)}if(u){const m=this.drawNeedle({size:l,centerX:o,centerY:r,series:t});n.add(m)}let p=360;s.config.plotOptions.radialBar.startAngle<0&&(p=this.totalAngle);const b=(360-p)/360;if(s.globals.radialSize=l-l*b,this.radialDataLabels.value.show){const m=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);s.globals.radialSize+=m*b}return n.add(g.g),s.config.plotOptions.radialBar.hollow.position==="front"&&(g.g.add(g.elHollow),g.dataLabels&&g.g.add(g.dataLabels)),a.add(n),a}drawTracks(t){const e=this.w,s=new I(this.w),i=s.group({class:"apexcharts-tracks"}),a=new dt(this.w),n=new pt(this.w),r=this.getStrokeWidth(t);t.size=t.size-r/2;for(let o=0;o<t.series.length;o++){const l=s.group({class:"apexcharts-radialbar-track apexcharts-track"});i.add(l),l.attr({rel:o+1}),t.size=t.size-r-this.margin;const c=e.config.plotOptions.radialBar.track,h=n.fillPath({seriesNumber:0,size:t.size,fillColors:Array.isArray(c.background)?c.background[o]:c.background,solid:!0}),d=this.trackStartAngle;let f=this.trackEndAngle;Math.abs(f)+Math.abs(d)>=360&&(f=360-Math.abs(this.startAngle)-.1);const u=s.drawPath({d:"",stroke:h,strokeWidth:r*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){const g=c.dropShadow;a.dropShadow(u,g)}l.add(u),u.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(u,{centerX:t.centerX,centerY:t.centerY,endAngle:f,startAngle:d,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return i}drawArcs(t){var e;const s=this.w,i=new I(this.w),a=new pt(this.w),n=new dt(this.w),r=i.group(),o=this.getStrokeWidth(t);t.size=t.size-o/2;let l=s.config.plotOptions.radialBar.hollow.background;const c=t.size-o*t.series.length-this.margin*t.series.length-o*parseInt(s.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=c-s.config.plotOptions.radialBar.hollow.margin;s.config.plotOptions.radialBar.hollow.image!==void 0&&(l=this.drawHollowImage(t,r,c,l));const d=this.drawHollow({size:h,centerX:t.centerX,centerY:t.centerY,fill:l||"transparent"});if(s.config.plotOptions.radialBar.hollow.dropShadow.enabled){const b=s.config.plotOptions.radialBar.hollow.dropShadow;n.dropShadow(d,b)}let f=1;!this.radialDataLabels.total.show&&s.seriesData.series.length>1&&(f=0);let u=null;if(this.radialDataLabels.show){const b=s.dom.Paper.findOne(".apexcharts-datalabels-group");u=this.renderInnerDataLabels(b,this.radialDataLabels,{hollowSize:c,centerX:t.centerX,centerY:t.centerY,opacity:f})}s.config.plotOptions.radialBar.hollow.position==="back"&&(r.add(d),u&&r.add(u));let g=!1;s.config.plotOptions.radialBar.inverseOrder&&(g=!0);const p=((e=this.ctx.morphTypeChange)==null?void 0:e.isActive())===!0;for(let b=g?t.series.length-1:0;g?b>=0:b<t.series.length;g?b--:b++){const m=i.group({class:"apexcharts-series apexcharts-radial-series",seriesName:R.escapeString(s.seriesData.seriesNames[b])});r.add(m),m.attr({rel:b+1,"data:realIndex":b}),nt.addCollapsedClassToSeries(this.w,m,b),t.size=t.size-o-this.margin;const A=a.fillPath({seriesNumber:b,size:t.size,value:t.series[b]}),v=this.startAngle;let y;const w=s.config.plotOptions.radialBar,_=typeof w.min=="number"?w.min:0,C=typeof w.max=="number"?w.max:100,S=C===_?1:C-_,k=U=>{const $=Math.min(Math.max(U,_),C);return Math.max(0,($-_)/S)},M=k(R.negToZero(t.series[b]));let L=Math.round(this.totalAngle*M)+this.startAngle,E;s.globals.dataChanged&&(y=this.startAngle,E=Math.round(this.totalAngle*k(R.negToZero(s.globals.previousPaths[b])))+y),Math.abs(L)+Math.abs(v)>360&&(L=L-.01),Math.abs(E)+Math.abs(y)>360&&(E=E-.01);const F=L-v,P=Array.isArray(s.config.stroke.dashArray)?s.config.stroke.dashArray[b]:s.config.stroke.dashArray,Y=p?this.ctx.morphTypeChange.getInitialPathFor(b,0):null,z=p?this.ctx.morphTypeChange.getFromType():null,W=!!Y&&(z==="bar"||z==="funnel"||z==="pyramid"||z==="pie"||z==="donut"||z==="polarArea"),O=i.drawPath({d:Y||"",stroke:W||t.skipValueArc?"transparent":A,strokeWidth:W||t.skipValueArc?0:o,fill:W?A:"none",fillOpacity:s.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+b,strokeDashArray:P}),N=v+F/2,X=R.polarToCartesian(t.centerX,t.centerY,t.size,N);if(I.setAttrs(O.node,{"data:angle":F,"data:value":t.series[b],"data:cx":X.x,"data:cy":X.y}),s.config.chart.dropShadow.enabled){const U=s.config.chart.dropShadow;n.dropShadow(O,U,b)}if(n.setSelectionFilter(O,0,b),this.addListeners(O,this.radialDataLabels),m.add(O),O.attr({index:0,j:b}),this.barLabels.enabled){const U=R.polarToCartesian(t.centerX,t.centerY,t.size,v),$=this.barLabels.formatter(s.seriesData.seriesNames[b],{seriesIndex:b,w:s}),q=["apexcharts-radialbar-label"];this.barLabels.onClick||q.push("apexcharts-no-click");let K=this.barLabels.useSeriesColors?s.globals.colors[b]:s.config.chart.foreColor;K||(K=s.config.chart.foreColor);const Q=U.x+this.barLabels.offsetX,et=U.y+this.barLabels.offsetY,J=i.drawText({x:Q,y:et,text:$,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:K,cssClass:q.join(" ")});J.on("click",this.onBarLabelClick),J.attr({rel:b+1}),v!==0&&J.attr({"transform-origin":`${Q} ${et}`,transform:`rotate(${v} 0 0)`}),m.add(J)}let V=0;if(this.initialAnim&&!s.globals.resized&&!s.globals.dataChanged&&(V=s.config.chart.animations.speed),s.globals.dataChanged&&(V=s.config.chart.animations.dynamicAnimation.speed),this.animDur=V/(t.series.length*1.2)+this.animDur,this.animBeginArr.push(this.animDur),p&&Y){const U=this.ctx.morphTypeChange.getSpeed(),$=this.getPiePath({me:this,startAngle:v,angle:F,size:t.size});if(W){const q=this.ctx.morphTypeChange.buildRingSegmentPath(t.centerX,t.centerY,t.size,o,v,v+F);O.animate(U).plot(q,"polygons").after(function(){this.attr({d:$,fill:"none",stroke:t.skipValueArc?"transparent":A,"stroke-width":t.skipValueArc?0:o})})}else O.animate(U).plot($,"polygons").attr({"stroke-width":o})}else this.animatePaths(O,{centerX:t.centerX,centerY:t.centerY,endAngle:L,startAngle:v,prevEndAngle:E,prevStartAngle:y,size:t.size,i:b,totalItems:2,animBeginArr:this.animBeginArr,dur:V,shouldSetPrevPaths:!0})}return{g:r,elHollow:d,dataLabels:u}}_angleAtValue(t){const e=this.w.config.plotOptions.radialBar,s=typeof e.min=="number"?e.min:0,i=typeof e.max=="number"?e.max:100,a=i===s?s+1:i,r=(Math.max(s,Math.min(a,Number(t)))-s)/(a-s);return this.startAngle+r*(this.endAngle-this.startAngle)}_describeArc(t,e,s,i,a){const n=R.polarToCartesian(t,e,s,a),r=R.polarToCartesian(t,e,s,i),o=a-i,l=Math.abs(o)>180?1:0;return`M ${n.x} ${n.y} A ${s} ${s} 0 ${l} 0 ${r.x} ${r.y}`}drawBands(t){const e=this.w,s=new I(this.w),i=e.config.plotOptions.radialBar,a=i.bands||[],n=s.group({class:"apexcharts-gauge-bands"}),r=this.getStrokeWidth(t),o=t.size-r/2-r-this.margin,l=r*parseInt(i.bandsStyle.strokeWidth,10)/100,c=typeof i.min=="number"?i.min:0,h=typeof i.max=="number"?i.max:100,d=h===c?0:(i.bandsStyle.gap||0)*((this.endAngle-this.startAngle)/(h-c));for(let f=0;f<a.length;f++){const u=a[f];if(u.from===void 0||u.to===void 0)continue;const g=this._angleAtValue(u.from),p=this._angleAtValue(u.to),b=Math.min(g,p)+d/2,m=Math.max(g,p)-d/2;if(m-b<=0)continue;const A=s.drawPath({d:this._describeArc(t.centerX,t.centerY,o,b,m),stroke:u.color||"#ccc",strokeWidth:l,fill:"none",strokeLinecap:i.bandsStyle.linecap||"butt",classes:"apexcharts-gauge-band"});
1382A.node.setAttribute("data-band-index",String(f)),n.add(A)}return n}drawTicks(t){var e,s,i,a;const n=this.w,r=new I(this.w),o=n.config.plotOptions.radialBar,l=o.ticks,c=r.group({class:"apexcharts-gauge-ticks"}),h=this.getStrokeWidth(t),d=t.size-h/2-h-this.margin,f=typeof o.min=="number"?o.min:0,u=typeof o.max=="number"?o.max:100,g=Math.max(2,(s=(e=l.major)==null?void 0:e.count)!=null?s:11),p=Math.max(0,(a=(i=l.minor)==null?void 0:i.count)!=null?a:0),b=(m,A,v)=>{var y,w,_;const C=this._angleAtValue(m),S=(y=A.length)!=null?y:8,k=A.placement==="inside"?d-S:d,M=A.placement==="inside"?d:d+S,L=R.polarToCartesian(t.centerX,t.centerY,k,C),E=R.polarToCartesian(t.centerX,t.centerY,M,C),D=r.drawLine(L.x,L.y,E.x,E.y,A.color||(v?"#666":"#999"),0,A.width||(v?2:1));if(c.add(D),v&&((w=l.labels)!=null&&w.show)){const T=(A.placement==="inside"?k:M)+(A.placement==="inside"?-1:1)*((_=l.labels.offset)!=null?_:6),F=R.polarToCartesian(t.centerX,t.centerY,T,C),P=typeof l.labels.formatter=="function"?l.labels.formatter(m):String(m),Y=r.drawText({x:F.x,y:F.y,text:P,textAnchor:"middle",dominantBaseline:"middle",fontFamily:l.labels.fontFamily,fontSize:l.labels.fontSize,fontWeight:l.labels.fontWeight,foreColor:l.labels.color,cssClass:"apexcharts-gauge-tick-label"});c.add(Y)}};for(let m=0;m<g;m++){const A=m/(g-1),v=f+A*(u-f);if(b(v,l.major||{},!0),m<g-1&&p>0)for(let y=1;y<=p;y++){const w=(m+y/(p+1))/(g-1),_=f+w*(u-f);b(_,l.minor||{},!1)}}return c}drawNeedle(t){var e,s,i,a,n;const r=this.w,o=new I(this.w),c=r.config.plotOptions.radialBar.needle||{},h=o.group({class:"apexcharts-gauge-needle"});if(!t.series||t.series.length===0)return h;const d=this.getStrokeWidth(t),f=t.size-d/2-d-this.margin,u=typeof c.length=="string"&&c.length.endsWith("%")?f*parseInt(c.length,10)/100:Number(c.length||f*.85),g=(e=c.baseWidth)!=null?e:4,p=(s=c.tipWidth)!=null?s:1,b=c.color||"#333",m=t.centerX,A=Number((i=c.offsetY)!=null?i:0),v=t.centerY+A,y=`M ${m+g/2} ${v} A ${g/2} ${g/2} 0 0 1 ${m-g/2} ${v} L ${m-p/2} ${v-u} L ${m+p/2} ${v-u} Z`,w=o.drawPath({d:y,stroke:b,strokeWidth:0,fill:b,classes:"apexcharts-gauge-needle-shape"});h.add(w);const _=Number(t.series[0]),C=this._angleAtValue(_),S=this.initialAnim&&!r.globals.dataChanged&&!r.globals.resized,k=this.ctx,M=typeof k._lastNeedleAngle=="number"?k._lastNeedleAngle:this.startAngle;if(k._lastNeedleAngle=C,H.isBrowser()&&r.globals.shouldAnimate&&(S||r.globals.dataChanged)&&M!==C){const E=h.node;E.setAttribute("transform-origin",`${m} ${v}`),E.setAttribute("transform",`rotate(${M})`);const D=((a=c.animation)==null?void 0:a.duration)&&Number(c.animation.duration)||c.animationSpeed&&Number(c.animationSpeed)||((n=r.config.chart.animations.dynamicAnimation)==null?void 0:n.speed)||r.config.chart.animations.speed||800,T=1.70158,F=T+1,z=S?N=>1+F*Math.pow(N-1,3)+T*Math.pow(N-1,2):N=>1-Math.pow(1-N,3);r.globals.radialNeedleRAF!=null&&(B.cancelAnimationFrame(r.globals.radialNeedleRAF),r.globals.radialNeedleRAF=null);const W=performance.now(),O=N=>{if(this.w.globals.isDestroyed){r.globals.radialNeedleRAF=null;return}const X=Math.max(0,Math.min(1,(N-W)/D)),V=M+(C-M)*z(X);E.setAttribute("transform",`rotate(${V})`),X<1?r.globals.radialNeedleRAF=B.requestAnimationFrame(O):r.globals.radialNeedleRAF=null};r.globals.radialNeedleRAF=B.requestAnimationFrame(O)}else h.attr({"transform-origin":`${m} ${v}`,transform:`rotate(${C})`});return h}drawHollow(t){var e;const s=new I(this.w),i=this.w.config.plotOptions.radialBar.hollow,a=s.drawCircle(t.size*2),n={class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill};return(i.stroke||i.strokeDasharray)&&(n.stroke=i.stroke||"transparent",n["stroke-width"]=(e=i.strokeWidth)!=null?e:1,i.strokeDasharray&&(n["stroke-dasharray"]=i.strokeDasharray)),a.attr(n),a}drawHollowImage(t,e,s,i){const a=this.w,n=new pt(this.w),r=R.randomId(),o=a.config.plotOptions.radialBar.hollow.image;if(a.config.plotOptions.radialBar.hollow.imageClipped)n.clippedImgArea({width:s,height:s,image:o,patternID:`pattern${a.globals.cuid}${r}`}),i=`url(#pattern${a.globals.cuid}${r})`;else{const l=a.config.plotOptions.radialBar.hollow.imageWidth,c=a.config.plotOptions.radialBar.hollow.imageHeight;if(l===void 0&&c===void 0){const h=a.dom.Paper.image(o,function(d){this.move(t.centerX-d.width/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-d.height/2+a.config.plotOptions.radialBar.hollow.imageOffsetY)});e.add(h)}else{const h=a.dom.Paper.image(o,function(){this.move(t.centerX-l/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-c/2+a.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)});e.add(h)}}return i}getStrokeWidth(t){const e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}onBarLabelClick(t){var e;
1382const s=t.target,i=parseInt((e=s.getAttribute("rel"))!=null?e:"",10)-1,a=this.barLabels.onClick,n=this.w;a&&a(n.seriesData.seriesNames[i],{w:n,seriesIndex:i})}}class ol extends Ct{draw(t,e){var s,i,a,n,r,o,l,c,h;const d=this.w,f=new I(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=d.rangeData.seriesRangeStart,this.seriesRangeEnd=d.rangeData.seriesRangeEnd,this.barHelpers.initVariables(t);const u=f.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let g=0;g<t.length;g++){let p,b;const m=d.globals.comboCharts?e[g]:g,{columnGroupIndex:A}=this.barHelpers.getGroupIndex(m),v=f.group({class:"apexcharts-series",seriesName:R.escapeString(d.seriesData.seriesNames[m]),rel:g+1,"data:realIndex":m});nt.addCollapsedClassToSeries(this.w,v,m),t[g].length>0&&(this.visibleI=this.visibleI+1);let y=0;this.yRatio.length>1&&(this.yaxisIndex=d.globals.seriesYAxisReverseMap[m][0],y=m);const w=this.barHelpers.initialPositions(m),{y:_,zeroW:C,x:S,zeroH:k}=w;let M=(s=w.barWidth)!=null?s:0,L=(i=w.barHeight)!=null?i:0;const E=(a=w.yDivision)!=null?a:0,D=(n=w.xDivision)!=null?n:0;b=_,p=S;const T=f.group({class:"apexcharts-datalabels","data:realIndex":m}),F=f.group({class:"apexcharts-rangebar-goals-markers"});for(let P=0;P<d.globals.dataPoints;P++){const Y=this.barHelpers.getStrokeWidth(g,P,m),z=this.seriesRangeStart[g][P],W=this.seriesRangeEnd[g][P];let O=null,N=null,X=null;const V={x:p,y:b,strokeWidth:Y,elSeries:v};let U=this.seriesLen;if(d.config.plotOptions.bar.rangeBarGroupRows&&(U=1),typeof((r=d.config.series[g].data)==null?void 0:r[P])>"u")break;if(this.isHorizontal){X=b+L*this.visibleI;const K=(E-L*U)/2;if((l=(o=d.config.series[g].data)==null?void 0:o[P])!=null&&l.x){const Q=this.detectOverlappingBars({i:g,j:P,barYPosition:X,srty:K,barHeight:L,yDivision:E,initPositions:w});L=Q.barHeight,X=Q.barYPosition}O=this.drawRangeBarPaths(G({indexes:{i:g,j:P,realIndex:m},barHeight:L,barYPosition:X,zeroW:C,yDivision:E,y1:z,y2:W},V)),M=O.barWidth}else{d.axisFlags.isXNumeric&&(p=(d.seriesData.seriesX[g][P]-d.globals.minX)/this.xRatio-M/2),N=p+M*this.visibleI;const K=(D-M*U)/2;if((h=(c=d.config.series[g].data)==null?void 0:c[P])!=null&&h.x){const Q=this.detectOverlappingBars({i:g,j:P,barXPosition:N,srtx:K,barWidth:M,xDivision:D,initPositions:w});M=Q.barWidth,N=Q.barXPosition}O=this.drawRangeColumnPaths(G({indexes:{i:g,j:P,realIndex:m,translationsIndex:y},barWidth:M,barXPosition:N,zeroH:k,xDivision:D},V)),L=O.barHeight}const $=this.barHelpers.drawGoalLine({barXPosition:O.barXPosition,barYPosition:X,goalX:O.goalX,goalY:O.goalY,barHeight:L,barWidth:M});$&&F.add($),b=O.y,p=O.x;const q=this.barHelpers.getPathFillColor(t,g,P,m);this.renderSeries({realIndex:m,pathFill:q.color,lineFill:q.useRangeColor?q.color:d.globals.stroke.colors[m],j:P,i:g,x:p,y:b,y1:z,y2:W,pathFrom:O.pathFrom,pathTo:O.pathTo,strokeWidth:Y,elSeries:v,series:t,barHeight:L,barWidth:M,barXPosition:N,barYPosition:X,columnGroupIndex:A,elDataLabelsWrap:T,elGoalsMarkers:F,visibleSeries:this.visibleI,type:"rangebar"})}u.add(v)}return u}detectOverlappingBars({i:t,j:e,barYPosition:s,barXPosition:i,srty:a,srtx:n,barHeight:r,barWidth:o,yDivision:l,xDivision:c,initPositions:h}){var d,f,u,g;const p=this.w;let b=[];const m=(f=(d=p.globals.seriesRangeName)==null?void 0:d[t])==null?void 0:f[e],A=(g=(u=p.config.series[t].data)==null?void 0:u[e])==null?void 0:g.x,v=Array.isArray(A)?A.join(" "):A,y=p.labelData.labels.map(_=>Array.isArray(_)?_.join(" "):_).indexOf(v),w=p.rangeData.seriesRange[t].findIndex(_=>{var C;return _.x===v&&((C=_.overlaps)==null?void 0:C.size)>0});return this.isHorizontal?(p.config.plotOptions.bar.rangeBarGroupRows?s=a+l*y:s=a+r*this.visibleI+l*y,w>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(b=Array.from(p.rangeData.seriesRange[t][w].overlaps),b.indexOf(m)>-1&&(r=h.barHeight/b.length,s=r*this.visibleI+l*(100-parseInt(this.barOptions.barHeight,10))/100/2+r*(this.visibleI+b.indexOf(m))+l*y))):(y>-1&&!p.labelData.timescaleLabels.length&&(p.config.plotOptions.bar.rangeBarGroupRows?i=n+c*y:i=n+o*this.visibleI+c*y),w>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(b=Array.from(p.rangeData.seriesRange[t][w].overlaps),b.indexOf(m)>-1&&(o=h.barWidth/b.length,i=o*this.visibleI+c*(100-parseInt(this.barOptions.barWidth,10))/100/2+o*(this.visibleI+b.indexOf(m))+c*y))),{barYPosition:s,barXPosition:i,barHeight:r,barWidth:o}}drawRangeColumnPaths({indexes:t,x:e,xDivision:s,barWidth:i,barXPosition:a,zeroH:n}){var r,o;const l=this.w,{i:c,j:h,realIndex:d,translationsIndex:f}=t,u=this.yRatio[f],g=this.getRangeValue(d,h);let p=Math.min(g.start,g.end),b=Math.max(g.start,g.end);typeof((r=this.series[c])==null?void 0:r[h])>"u"||((o=this.series[c])==null?void 0:o[h])===null?p=n:(p=n-p/u,b=n-b/u);const m=Math.abs(b-p),A=this.barHelpers.getColumnPaths({barXPosition:a,barWidth:i,y1:p,y2:b,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:d,i:d,j:h,w:l});if(!l.axisFlags.isXNumeric)e=e+s;else{const v=this.getBarXForNumericXAxis({x:e,j:h,realIndex:d,barWidth:i});e=v.x,a=v.barXPosition}return{pathTo:A.pathTo,pathFrom:A.pathFrom,barHeight:m,x:e,y:g.start<0&&g.end<0?p:b,goalY:this.barHelpers.getGoalValues("y",null,n,d,h,f),barXPosition:a}}preventBarOverflow(t){const e=this.w;return t<0&&(t=0),t>e.layout.gridWidth&&(t=e.layout.gridWidth),t}drawRangeBarPaths({indexes:t,y:e,y1:s,y2:i,yDivision:a,barHeight:n,barYPosition:r,zeroW:o}){const l=this.w,{realIndex:c,j:h}=t,d=this.preventBarOverflow(o+s/this.invertedYRatio),f=this.preventBarOverflow(o+i/this.invertedYRatio),u=this.getRangeValue(c,h),g=Math.abs(f-d),p=this.barHelpers.getBarpaths({barYPosition:r,barHeight:n,x1:d,x2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:c,realIndex:c,j:h,w:l});return l.axisFlags.isXNumeric||(e=e+a),{pathTo:p.pathTo,pathFrom:p.pathFrom,barWidth:g,x:u.start<0&&u.end<0?d:f,goalX:this.barHelpers.getGoalValues("x",o,null,c,h,0),y:e}}getRangeValue(t,e){const s=this.w;return{start:s.rangeData.seriesRangeStart[t][e],end:s.rangeData.seriesRangeEnd[t][e]}}}function Ri(x,t){let e=0;for(let a=0;a<x.length;a++)e+=x[a];const s=t/e,i=new Array(x.length);for(let a=0;a<x.length;a++)i[a]=x[a]*s;return i}function Ti(x,t,e,s){const i=s*s,a=e*e;return Math.max(i*t/a,a/(i*x))}function ll(x,t,e,s,i,a){if(x===0)return!0;const n=Ti(t,e,s,a),r=Ti(Math.min(t,i),Math.max(e,i),s+i,a);return n>=r}function Pi(x,t,e,s,i,a,n,r){if(n>=r){const o=s/r;let l=a;for(let c=0;c<e;c++){const h=t[c]/o;x.push([i,l,i+o,l+h]),l+=h}}else{const o=s/n;let l=i;for(let c=0;c<e;c++){const h=t[c]/o;x.push([l,a,l+h,a+o]),l+=h}}}function Fi(x,t,e,s,i){const a=[],n=x.length;if(n===0)return a;const r=new Array(n);let o=0,l=0,c=1/0,h=-1/0,d=0;for(;d<n;){const f=Math.min(s,i),u=x[d];if(ll(o,c,h,l,u,f))r[o]=u,o++,l+=u,u<c&&(c=u),u>
1382h&&(h=u),d++;else{if(Pi(a,r,o,l,t,e,s,i),s>=i){const g=l/i;t+=g,s-=g}else{const g=l/s;e+=g,i-=g}o=0,l=0,c=1/0,h=-1/0}}return o>0&&Pi(a,r,o,l,t,e,s,i),a}function cl(x,t,e){const s=x.length,i=new Array(s);for(let r=0;r<s;r++){let o=0;const l=x[r];for(let c=0;c<l.length;c++)o+=l[c];i[r]=o}const a=Fi(Ri(i,t*e),0,0,t,e),n=new Array(s);for(let r=0;r<s;r++){const o=a[r],l=o[0],c=o[1],h=o[2]-l,d=o[3]-c;n[r]=Fi(Ri(x[r],h*d),l,c,h,d)}return n}const hl={generate:cl};class dl{constructor(t,e){this.ctx=e,this.w=t,this.strokeWidth=this.w.config.stroke.width,this.helpers=new _a(t,e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}draw(t){const e=this.w,s=new I(this.w,this.ctx),i=new pt(this.w),a=s.group({class:"apexcharts-treemap"});if(e.globals.noData)return a;const n=[];return t.forEach(o=>{const l=o.map(c=>Math.abs(c));n.push(l)}),this.negRange=this.helpers.checkColorRange(),e.config.series.forEach((o,l)=>{o.data.forEach(c=>{Array.isArray(this.labels[l])||(this.labels[l]=[]),this.labels[l].push(c.x)})}),hl.generate(n,e.layout.gridWidth,e.layout.gridHeight).forEach((o,l)=>{var c;const h=s.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:R.escapeString(e.seriesData.seriesNames[l]),rel:l+1,"data:realIndex":l});if(s.setupEventDelegation(h,".apexcharts-treemap-rect"),e.config.chart.dropShadow.enabled){const A=e.config.chart.dropShadow;new dt(this.w).dropShadow(a,A,l)}const d=s.group({class:"apexcharts-data-labels"}),f={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0},u=e.config.chart.animations,g=u.animateGradually,p=g&&g.enabled!==!1,b=new Array(o.length).fill(0);if(p){const A=o.length||1,v=Math.min(g.delay||0,u.speed*.5/A);o.map((w,_)=>({j:_,area:(w[2]-w[0])*(w[3]-w[1])})).sort((w,_)=>_.area-w.area).forEach((w,_)=>{b[w.j]=_*v})}o.forEach((A,v)=>{const y=A[0],w=A[1],_=A[2],C=A[3];f.xMin=Math.min(f.xMin,y),f.yMin=Math.min(f.yMin,w),f.xMax=Math.max(f.xMax,_),f.yMax=Math.max(f.yMax,C);const S=this.helpers.getShadeColor(e.config.chart.type,l,v,this.negRange),k=S.color,M=i.fillPath({color:k,seriesNumber:l,dataPointIndex:v}),L=s.drawRect(y,w,_-y,C-w,e.config.plotOptions.treemap.borderRadius,"#fff",1,this.strokeWidth,e.config.plotOptions.treemap.useFillColorAsStroke?k:e.globals.stroke.colors[l]);L.attr({cx:y,cy:w,index:l,i:l,j:v,width:_-y,height:C-w,fill:M}),L.node.classList.add("apexcharts-treemap-rect");let E={x:y+(_-y)/2,y:w+(C-w)/2,width:0,height:0};const D={x:y,y:w,width:_-y,height:C-w};if(e.config.chart.animations.enabled&&!e.globals.dataChanged){let Y=1;e.globals.resized||(Y=e.config.chart.animations.speed),this.animateTreemap(L,E,D,Y,b[v]||0)}if(e.globals.dataChanged){let Y=1;this.dynamicAnim.enabled&&e.globals.shouldAnimate&&(Y=this.dynamicAnim.speed,e.globals.previousPaths[l]&&e.globals.previousPaths[l][v]&&e.globals.previousPaths[l][v].rect&&(E=e.globals.previousPaths[l][v].rect),this.animateTreemap(L,E,D,Y))}let T=this.getFontSize(A),F=e.config.dataLabels.formatter(this.labels[l][v],{value:e.seriesData.series[l][v],seriesIndex:l,dataPointIndex:v,w:e});e.config.plotOptions.treemap.dataLabels.format==="truncate"&&(T=parseInt(String(e.config.dataLabels.style.fontSize),10),F=this.truncateLabels(String(F),T,y,w,_,C));let P=null;e.seriesData.series[l][v]&&(P=this.helpers.calculateDataLabels({text:F,x:(y+_)/2,y:(w+C)/2+this.strokeWidth/2+T/3,i:l,j:v,colorProps:S,fontSize:T,series:t})),e.config.dataLabels.enabled&&P&&this.rotateToFitLabel(P,T,F,y,w,_,C),h.add(L),P!==null&&h.add(P)});const m=e.config.plotOptions.treemap.seriesTitle;if(e.config.series.length>1&&m&&m.show){const A=e.config.series[l].name||"";if(A&&f.xMin<1/0&&f.yMin<1/0){const{offsetX:v,offsetY:y,borderColor:w,borderWidth:_,borderRadius:C,style:S}=m,k=S.color||e.config.chart.foreColor,M={left:S.padding.left,right:S.padding.right,top:S.padding.top,bottom:S.padding.bottom},L=s.getTextRects(A,S.fontSize,S.fontFamily),E=L.width+M.left+M.right,D=L.height+M.top+M.bottom,T=f.xMin+(v||0),F=f.yMin+(y||0),P=s.drawRect(T,F,E,D,C,S.background,1,_,w),Y=s.drawText({x:T+M.left,y:F+M.top+((c=L?.height)!=null?c:0)*.75,text:A,fontSize:S.fontSize,fontFamily:S.fontFamily,fontWeight:S.fontWeight,foreColor:k,cssClass:S.cssClass||""});h.add(P),h.add(Y)}}h.add(d),a.add(h)}),a}getFontSize(t){const e=this.w;function s(r){let o,l=0;if(Array.isArray(r[0]))for(o=0;o<r.length;o++)l+=s(r[o]);else for(o=0;o<r.length;o++)l+=r[o].length;return l}function i(r){let o,l=0;if(Array.isArray(r[0]))for(o=0;o<r.length;o++)l+=i(r[o]);else for(o=0;o<r.length;o++)l+=1;return l}const a=s(this.labels)/i(this.labels);function n(r,o){const l=r*o,c=Math.pow(l,.5);return Math.min(c/a,parseInt(e.config.dataLabels.style.fontSize,10))}return n(t[2]-t[0],t[3]-t[1])}rotateToFitLabel(t,e,s,i,a,n,r){const o=new I(this.w),l=o.getTextRects(s,String(e));if(l.width+this.w.config.stroke.width+5>
1382n-i&&l.width<=r-a){const c=o.rotateAroundCenter(t.node);t.node.setAttribute("transform",`rotate(-90 ${c.x} ${c.y}) translate(${l.height/3})`)}}truncateLabels(t,e,s,i,a,n){const r=new I(this.w),l=r.getTextRects(t,String(e)).width+this.w.config.stroke.width+5>a-s&&n-i>a-s?n-i:a-s,c=r.getTextBasedOnMaxWidth({text:t,maxWidth:l,fontSize:e});return t.length!==c.length&&l/e<5?"":c}animateTreemap(t,e,s,i,a=0){const n=new ne(this.w);n.animateRect(t,e,s,i,()=>{n.animationCompleted(t)},a)}}const Xi=Math.PI*(3-Math.sqrt(5));function is(x){return 1-Math.pow(1-x,3)}function fl(x){return t=>1+(x+1)*Math.pow(t-1,3)+x*Math.pow(t-1,2)}function ul(x){return x<.5?4*x*x*x:1-Math.pow(-2*x+2,3)/2}class gl{constructor(t,e){this.ctx=e,this.w=t,this._lastDotR=1,this._gridTrack=null,this._gridDenom=1,this._scatterAxis=null}draw(t){const e=this.w,s=new I(e,this.ctx),i=s.group({class:"apexcharts-unit"});if(e.globals.noData||!Array.isArray(t)||t.length===0)return i;const a=e.config.plotOptions.unit,n=a.layout==="packed"?"packed":a.layout==="columns"?"columns":a.layout==="grid"?"grid":a.layout==="scatter"?"scatter":a.layout==="arc"?"arc":"grouped",r=a.transition,o=r==="flow",l=r==="identity",c=a.unitValue>0?a.unitValue:1;let h=t.map(S=>{const k=Math.abs(R.parseNumber(S))/c;return k>0?Math.max(1,Math.round(k)):0});h=this._applyMaxUnits(h,a.maxUnits);const d=h.reduce((S,k)=>S+k,0),f=n==="packed"?this._layoutPacked(h,a):n==="columns"?this._layoutColumns(h,a):n==="grid"?this._layoutGrid(h,a):n==="scatter"?this._layoutScatter(a):n==="arc"?this._layoutArc(h,a):this._layoutGrouped(h,a),u=n==="grid"&&!!(a.grid&&a.grid.split);u&&this._drawGridTrack(i,s,a),n==="scatter"&&this._drawScatterAxes(i,s);const g=this._lastDotR,p=this._shouldAnimate(),b=this.ctx&&this.ctx.morphTypeChange,m=p&&!!b&&typeof b.isActive=="function"&&b.isActive()&&typeof b.getInitialCenterFor=="function",A=p&&!m&&this.ctx?this.ctx._unitPrevDots:null,v=new Map,y=[],w=e.seriesData.unitData||[],_=this._bubbleStats(w,a,g);let C=0;if(f.forEach(S=>{const k=e.globals.colors[S.i]||e.globals.colors[0]||"#008FFB",M=s.group({class:"apexcharts-series",seriesName:R.escapeString(e.seriesData.seriesNames[S.i]||`series-${S.i+1}`),rel:S.i+1,"data:realIndex":S.i}),L=m?b.getInitialCenterFor(S.i):null,E=w[S.i];if(S.dots.forEach((D,T)=>{const F=E?E[T]:void 0,P=F&&typeof F=="object"&&F.fillColor?F.fillColor:k,Y=D.r!=null?D.r:_?this._radiusForValue(this._unitValueOf(F),_):g,z=this._drawDot(s,a,Y,P,S.i,T);M.add(z);let W;if(l){const O=F&&typeof F=="object"?F.id!=null?F.id:F.name:void 0;W=O!=null?`id:${O}`:`g:${C}`}else o?W=String(C):D.slot!=null?W=`slot:${D.slot}`:W=`${S.i}:${T}`;if(C++,v.set(W,{x:D.x,y:D.y,fill:P,r:Y}),p){const O=A&&A.get(W),N=O||L,X=a.gather&&a.gather.enter||"burst",V=u||X==="fade"||X==="rise",U=N?N.x:V?D.x:S.cx,$=N?N.y:X==="rise"&&!u?D.y+14:V?D.y:S.cy;
1382z.node.style.opacity=N?"1":"0",this._placeDot(z.node,a,U,$),y.push({node:z.node,x:D.x,y:D.y,cx0:U,cy0:$,r0:O&&O.r!=null?O.r:Y,r1:Y,fill0:O?O.fill:P,fill1:P,delay:0,isEnter:!N})}else this._placeDot(z.node,a,D.x,D.y)}),(n==="grouped"||n==="columns"||u)&&a.clusterLabels&&a.clusterLabels.show&&h[S.i]>0){const D=u?this._gridDenom:d;this._drawClusterLabel(M,S,h[S.i],D,a,k)}i.add(M)}),A){const S=this._collectExits(A,v,a);if(S.length){const k=s.group({class:"apexcharts-unit-exits"});i.add(k),this._runExits(k,S,a)}}return this.ctx&&(this.ctx._unitPrevDots=v),p&&y.length&&this._runGather(y),i}_applyMaxUnits(t,e){const s=t.reduce((a,n)=>a+n,0);if(!e||e<=0||s<=e)return t;const i=e/s;return console.warn(`[ApexCharts] unit chart: ${s} dots exceeds maxUnits (${e}); counts were scaled down proportionally. Raise plotOptions.unit.maxUnits or use plotOptions.unit.unitValue to represent more units per dot.`),t.map(a=>a>0?Math.max(1,Math.round(a*i)):0)}_layoutGrouped(t,e){const s=this.w,i=s.layout.gridWidth,a=s.layout.gridHeight,n=e.clusterLabels&&e.clusterLabels.show?30:6,r=t.map((_,C)=>C).filter(_=>t[_]>0),o=Math.max(1,r.length),l=new Array(t.length).fill(-1);r.forEach((_,C)=>l[_]=C);const c=i/o,h=a-n,d=Math.max(1,...t),f=Math.min(c,h)*.08,u=Math.max(4,Math.min(c,h)/2-f),g=this._resolveStep(e,u,d);this._lastDotR=this._dotRadiusFromStep(g,e);const p=this._lastDotR,b=n+h/2,m=t.map(_=>g*Math.sqrt(Math.max(1,_))+p),A=_=>l[_]>=0?c*(l[_]+.5):i/2;let v=t.map((_,C)=>A(C));const y=r.map(_=>m[_]);let w=!1;for(let _=1;_<o;_++)if(v[r[_]]-v[r[_-1]]<y[_]+y[_-1]){w=!0;break}if(w){const _=Math.max(2*p,8),C=y.reduce((k,M)=>k+2*M,0)+_*(o-1);let S;if(C<=i){let k=(i-C)/2;S=y.map(M=>{const L=k+M;return k+=2*M+_,L})}else if(o===1)S=[i/2];
1382else{const k=y[0],M=i-y[o-1];S=y.map((L,E)=>k+(M-k)*E/(o-1))}v=t.map((k,M)=>l[M]>=0?S[l[M]]:i/2)}return t.map((_,C)=>({i:C,cx:v[C],cy:b,outerR:m[C],dots:this._spiral(v[C],b,_,g,0)}))}_layoutPacked(t,e){const s=this.w,i=s.layout.gridWidth,a=s.layout.gridHeight,n=6,r=Math.max(1,t.reduce((g,p)=>g+p,0)),o=Math.max(4,Math.min(i,a-n)/2-Math.min(i,a)*.06),l=this._resolveStep(e,o,r);this._lastDotR=this._dotRadiusFromStep(l,e);const c=i/2,h=n+(a-n)/2,d=t.map((g,p)=>p);e.sortByGroup!==!1&&d.sort((g,p)=>t[g]-t[p]);const f=t.map((g,p)=>({i:p,cx:c,cy:h,outerR:l*Math.sqrt(r)+this._lastDotR,dots:[]}));let u=0;return d.forEach(g=>{for(let p=0;p<t[g];p++){const b=l*Math.sqrt(u+.5),m=u*Xi;f[g].dots.push({x:c+b*Math.cos(m),y:h+b*Math.sin(m),slot:u}),u++}}),f}_layoutArc(t,e){const s=this.w,i=s.layout.gridWidth,a=s.layout.gridHeight,n=Math.max(1,t.reduce((E,D)=>E+D,0)),r=e.arc||{},o=typeof r.startAngle=="number"?r.startAngle:-90,l=typeof r.endAngle=="number"?r.endAngle:90,c=o*Math.PI/180,h=l*Math.PI/180,d=h-c||Math.PI,f=Math.max(0,Math.min(.95,typeof r.innerRadiusRatio=="number"?r.innerRadiusRatio:.4)),u=E=>Math.sin(E),g=E=>-Math.cos(E),p=this._arcBounds(c,h),b=Math.min(i,a)*.04,m=Math.max(1e-6,p.maxX-p.minX),A=Math.max(1e-6,p.maxY-p.minY),v=Math.max(4,Math.min((i-2*b)/m,(a-2*b)/A)),y=v*f,w=i/2-(p.minX+p.maxX)/2*v,_=a/2-(p.minY+p.maxY)/2*v,C=this._arcAllocate(n,y,v,d,e);this._lastDotR=C.dotR;const S=[];for(let E=0;E<C.R;E++){const D=C.radii[E],T=C.seatsPerRow[E];for(let F=0;F<T;F++){const P=T===1?(c+h)/2:c+d*(F+.5)/T;S.push({a:P,x:w+D*u(P),y:_+D*g(P)})}}S.sort((E,D)=>E.a-D.a);const k=t.map((E,D)=>({i:D,cx:w,cy:_,outerR:v,dots:[]}));let M=0,L=0;return S.forEach((E,D)=>{for(;M<t.length&&L>=t[M];)M++,L=0;M>=t.length||(k[M].dots.push({x:E.x,y:E.y,slot:D}),L++)}),k}_arcBounds(t,e){const s=c=>Math.sin(c),i=c=>-Math.cos(c),a=Math.min(t,e),n=Math.max(t,e),r=[0,s(t),s(e)],o=[0,i(t),i(e)],l=Math.PI/2;for(let c=Math.ceil(a/l);c*l<=n;c++)r.push(s(c*l)),o.push(i(c*l));return{minX:Math.min(...r),maxX:Math.max(...r),minY:Math.min(...o),maxY:Math.max(...o)}}_arcAllocate(t,e,s,i,a){const n=a.spacing>0?a.spacing:1.05,r=Math.abs(i)||Math.PI,o=this._fixedRadius(a),l=d=>{d=Math.max(1,Math.round(d));const f=[];for(let y=0;y<d;y++)f.push(d===1?(e+s)/2:e+(s-e)*(y/(d-1)));const u=f.reduce((y,w)=>y+w,0)||1,g=f.map(y=>t*y/u),p=g.map(y=>Math.floor(y));let b=t-p.reduce((y,w)=>y+w,0);for(g.map((y,w)=>({idx:w,frac:y-Math.floor(y)})).sort((y,w)=>w.frac-y.frac).forEach(y=>{b>0&&(p[y.idx]++,b--)});b>0;)p[d-1]++,b--;const m=d===1?s-e||s:(s-e)/(d-1);let A=1/0;for(let y=0;y<d;y++){const w=p[y];if(w<=0)continue;const _=f[y]*r/w;_<A&&(A=_)}const v=Math.min(m,A);return{R:d,radii:f,seatsPerRow:p,dotR:Math.max(1,v/(2*n))}},c=a.arc&&a.arc.rows;let h;if(typeof c=="number"&&c>=1)h=l(c);else if(o){const d=2*o*n;h=l((s-e)/d+1)}else{const d=Math.max(1,Math.min(40,Math.ceil(Math.sqrt(t))+6));h=l(1);for(let f=2;f<=d;f++){const u=l(f);u.dotR>h.dotR&&(h=u)}}return o&&(h.dotR=o),h}_layoutColumns(t,e){const s=this.w,i=s.layout.gridWidth,a=s.layout.gridHeight,n=!!(e.clusterLabels&&e.clusterLabels.show),r=n&&e.clusterLabels.position==="bottom",o=n&&!r?30:6,l=t.map((k,M)=>M).filter(k=>t[k]>0),c=Math.max(1,l.length),h=new Array(t.length).fill(-1);l.forEach((k,M)=>h[k]=M);const d=i/c,f=d*.62,u=Math.max(8,a*.04)+(r?30:0),g=Math.max(4,a-o-u),p=Math.max(1,...t),b=e.spacing>0?e.spacing:1,m=e.columns?e.columns.size:void 0;let A;e.shape!=="image"&&m==="auto"?A=null:e.shape!=="image"&&typeof m=="number"&&m>0?A=m:A=this._fixedRadius(e);let v=1,y=0;if(A){y=2*A*b,this._lastDotR=A;const k=Math.max(1,Math.floor(g/y)),M=Math.max(1,Math.floor(f/y));v=Math.max(1,Math.min(M,Math.ceil(p/k)))}else{let k=0;const M=Math.max(1,Math.min(40,Math.round(f/4)));for(let L=1;L<=M;L++){const E=Math.ceil(p/L),D=Math.min(f/L,g/E);D>k&&(k=D,v=L)}y=k,this._lastDotR=Math.max(1,y/(2*b))}const w=this._lastDotR,_=Math.ceil(p/v),C=Math.min(g,_*y),S=o+(g+C)/2;return t.map((k,M)=>{const L=h[M]>=0?d*(h[M]+.5):i/2,D=Math.ceil(Math.max(1,k)/v)*y,T=L-v*y/2+y/2,F=[];for(let P=0;P<k;P++){const Y=Math.floor(P/v),z=P%v;F.push({x:T+z*y,y:S-w-Y*y})}return{i:M,cx:L,cy:S-D/2,outerR:D/2,flat:!0,dots:F}})}_layoutGrid(t,e){if(e.grid&&e.grid.split)return this._layoutGridSplit(t,e);this._gridTrack=null;const s=this.w,i=s.layout.gridWidth,a=s.layout.gridHeight,n=e.grid||{},r=Math.max(1,Math.round(n.columns>
13820?n.columns:10)),o=n.fillFrom==="top"?"top":"bottom",l=n.total>0?this._largestRemainder(t,Math.round(n.total)):t.slice(),c=l.reduce((S,k)=>S+k,0),h=Math.max(1,Math.ceil(Math.max(1,c)/r)),d=6,f=e.spacing>0?e.spacing:1,u=Math.max(4,i),g=Math.max(4,a-d),p=this._fixedRadius(e);let b=0;p?(b=2*p*f,this._lastDotR=p):(b=Math.min(u/r,g/h),this._lastDotR=Math.max(1,b/(2*f)));const m=r*b,A=h*b,v=(i-m)/2+b/2,y=d+(g-A)/2,w=S=>o==="bottom"?y+A-b/2-S*b:y+b/2+S*b,_=t.map((S,k)=>({i:k,cx:i/2,cy:d+g/2,outerR:Math.max(m,A)/2,dots:[]}));let C=0;for(let S=0;S<l.length;S++)for(let k=0;k<l[S];k++){const M=C%r,L=Math.floor(C/r);_[S].dots.push({x:v+M*b,y:w(L),slot:C}),C++}return _}_layoutGridSplit(t,e){const s=this.w,i=s.layout.gridWidth,a=s.layout.gridHeight,n=e.grid||{},r=Math.max(1,Math.round(n.columns>0?n.columns:10)),o=n.fillFrom==="top"?"top":"bottom",l=Math.max(1,Math.round(n.total>0?n.total:100)),c=Math.max(1,Math.ceil(l/r)),h=t.map((F,P)=>P).filter(F=>t[F]>0),d=Math.max(1,h.length),f=n.max>0?n.max:Math.max(1,...t),u=Math.max(1,Math.round(n.tileColumns>0?n.tileColumns:Math.ceil(Math.sqrt(d)))),g=Math.max(1,Math.ceil(d/u)),p=!(e.clusterLabels&&e.clusterLabels.show===!1),b=p&&e.clusterLabels&&e.clusterLabels.position==="bottom",m=p&&!b?22:4,A=p&&b?22:4,v=i/u,y=a/g,w=Math.max(4,v*.86),_=Math.max(4,y-m-A),C=e.spacing>0?e.spacing:1,S=this._fixedRadius(e);let k=0;S?(k=2*S*C,this._lastDotR=S):(k=Math.min(w/r,_/c),this._lastDotR=Math.max(1,k/(2*C)));const M=r*k,L=c*k,E=(F,P)=>o==="bottom"?F+L-k/2-P*k:F+k/2+P*k,D=[],T=[];return h.forEach((F,P)=>{const Y=P%u,z=Math.floor(P/u),W=Y*v,O=z*y,N=W+(v-M)/2+k/2,X=O+m+(_-L)/2,V=q=>({x:N+q%r*k,y:E(X,Math.floor(q/r))});for(let q=0;q<l;q++)D.push(V(q));const U=Math.max(0,Math.min(l,Math.round(t[F]/f*l))),$=[];for(let q=0;q<U;q++){const K=V(q);$.push({x:K.x,y:K.y,slot:P*l+q})}T.push({i:F,cx:W+v/2,cy:X+L/2,outerR:L/2,flat:!0,split:!0,dots:$})}),this._gridDenom=f,this._gridTrack={cells:D},T}_drawGridTrack(t,e,s){const i=this._gridTrack;if(!i||!i.cells||!i.cells.length)return;const a=this._lastDotR,r=(s.grid||{}).trackColor||"rgba(128,128,128,0.14)",o=e.group({class:"apexcharts-unit-track"});i.cells.forEach(l=>{let c;if(s.shape==="square"){const h=a*2;c=e.drawRect(0,0,h,h,s.borderRadius||0,r,1,0,"none"),c.node.setAttribute("fill",r),c.node.setAttribute("x",String(l.x-a)),c.node.setAttribute("y",String(l.y-a))}else c=e.drawCircle(a,{fill:r,"stroke-width":0,stroke:"none"}),c.node.setAttribute("fill",r),c.node.setAttribute("cx",String(l.x)),c.node.setAttribute("cy",String(l.y));c.node.classList.add("apexcharts-unit-track-cell"),o.add(c)}),t.add(o)}_layoutScatter(t){const e=this.w,s=t.scatter||{};if(s.y==="value")return this._layoutScatter2D(t);const i=e.layout.gridWidth,a=e.layout.gridHeight,n=e.seriesData.unitData||[],r=e.seriesData.seriesNames||[],o=$=>this._unitValueOf($),l=this._scatterSizeStats(s,n),c=n.map($=>Array.isArray($)?$.map(o):[]),h=$=>$!=null&&isFinite($),d=c.map(($,q)=>q).filter($=>c[$].some(h)),f=Math.max(1,d.length);let u=1/0,g=-1/0;c.forEach($=>$.forEach(q=>{q!=null&&isFinite(q)&&(q<u&&(u=q),q>g&&(g=q))})),u===1/0&&(u=0,g=1);const p=Math.max(2,Math.round(s.tickAmount>0?s.tickAmount:5)),b=this._niceScale(s.xMin!=null?s.xMin:u,s.xMax!=null?s.xMax:g,p),m=s.xMin!=null?s.xMin:b.min,A=s.xMax!=null?s.xMax:b.max,v=A-m||1,y=s.laneLabelWidth!=null?Math.max(0,s.laneLabelWidth):f>1?92:8,w=30+(s.xTitle?20:0),_=y,C=i-8,S=10,k=a-w,M=Math.max(4,C-_),L=Math.max(4,k-S),E=$=>_+($-m)/v*M,D=L/f,T=$=>S+D*($+.5);let F=0;const P=this._fixedRadius(t);if(P)F=P;else{const $=Math.max(1,...d.map(q=>c[q].filter(h).length));F=Math.max(2,Math.min(6,D*.12,M/(2.5*Math.sqrt($))))}this._lastDotR=F;const Y=t.spacing>0?t.spacing:1,z=Math.max(.5,F*Y),W=s.spread==="jitter",O=[],N=[],X=l?l.rMax:F;d.forEach(($,q)=>{const K=T(q);N.push({i:$,cy:K,name:r[$]||`series-${$+1}`});const et=(n[$]||[]).map((J,bt)=>{const ct=o(J),vt={j:bt,px:E(h(ct)?ct:m),y:K};return l&&(vt.r=this._scatterRadius(J,l,F)),vt});if(W){const J=Math.max(X,D/2-X);et.forEach((bt,ct)=>{const vt=(ct*9301+49297)%233280/233280;bt.y=K+(vt*2-1)*J})}else this._beeswarm(et,K,F,z,X);O.push({i:$,cx:(_+C)/2,cy:K,outerR:D/2,dots:et.map(J=>({x:J.px,y:J.y,r:J.r}))})});const V=[],U=b.spacing||v/Math.max(1,p-1);if(s.xMin!=null||s.xMax!=null)for(let $=0;$<p;$++)V.push(m+v*$/(p-1));else for(let $=m;$<=A+U*.5;$+=U)V.push(Math.abs($)<U*1e-9?0:$);return this._scatterAxis={mode:"1d",plotL:_,plotR:C,plotT:S,plotB:k,xMin:m,xMax:A,plotX:E,ticks:V,lanes:N,xTitle:s.xTitle,formatter:typeof s.xFormatter=="function"?s.xFormatter:null,gridlines:s.gridlines!==!1},O}_layoutScatter2D(t){const e=this.w,s=e.layout.gridWidth,i=e.layout.gridHeight,a=t.scatter||{},n=e.seriesData.unitData||[],r=X=>typeof X=="number"&&isFinite(X),o=X=>X&&typeof X=="object"?X.x:null,l=X=>X&&typeof X=="object"?X.y!=null?X.y:X.value:null,c=n.map((X,V)=>V).filter(X=>(n[X]||[]).some(V=>r(o(V))&&r(l(V))));let h=1/0,d=-1/0,f=1/0,u=-1/0;
1382n.forEach(X=>(X||[]).forEach(V=>{const U=o(V),$=l(V);r(U)&&r($)&&(U<h&&(h=U),U>d&&(d=U),$<f&&(f=$),$>u&&(u=$))})),h===1/0&&(h=0,d=1,f=0,u=1);const g=Math.max(2,Math.round(a.tickAmount>0?a.tickAmount:5)),p=Math.max(2,Math.round(a.yTickAmount>0?a.yTickAmount:5)),b=this._niceScale(a.xMin!=null?a.xMin:h,a.xMax!=null?a.xMax:d,g),m=this._niceScale(a.yMin!=null?a.yMin:f,a.yMax!=null?a.yMax:u,p),A=a.xMin!=null?a.xMin:b.min,v=a.xMax!=null?a.xMax:b.max,y=a.yMin!=null?a.yMin:m.min,w=a.yMax!=null?a.yMax:m.max,_=v-A||1,C=w-y||1,S=46+(a.yTitle?18:0),k=30+(a.xTitle?20:0),M=S,L=s-12,E=10,D=i-k,T=Math.max(4,L-M),F=Math.max(4,D-E),P=X=>M+(X-A)/_*T,Y=X=>D-(X-y)/C*F,z=this._scatterSizeStats(a,n),W=this._fixedRadius(t)||5;this._lastDotR=W;const O=[];c.forEach(X=>{const U=(n[X]||[]).map($=>{const q=o($),K=l($);return{x:P(r(q)?q:A),y:Y(r(K)?K:y),r:z?this._scatterRadius($,z,W):void 0}});O.push({i:X,cx:(M+L)/2,cy:(E+D)/2,outerR:F/2,dots:U})});const N=(X,V,U,$,q,K)=>{const Q=[];if(q)for(let et=0;et<K;et++)Q.push(X+U*et/(K-1));else{const et=$||U/Math.max(1,K-1);for(let J=X;J<=V+et*.5;J+=et)Q.push(Math.abs(J)<et*1e-9?0:J)}return Q};return this._scatterAxis={mode:"2d",plotL:M,plotR:L,plotT:E,plotB:D,plotX:P,plotY:Y,xTicks:N(A,v,_,b.spacing,a.xMin!=null||a.xMax!=null,g),yTicks:N(y,w,C,m.spacing,a.yMin!=null||a.yMax!=null,p),xTitle:a.xTitle,yTitle:a.yTitle,xFormatter:typeof a.xFormatter=="function"?a.xFormatter:null,yFormatter:typeof a.yFormatter=="function"?a.yFormatter:null,gridlines:a.gridlines!==!1},O}_scatterSizeStats(t,e){const s=t&&t.sizeRange;if(!Array.isArray(s)||s.length<2)return null;const i=Math.max(.5,+s[0]),a=Math.max(i,+s[1]),n=t.sizeField||"z";let r=1/0,o=-1/0;return e.forEach(l=>(l||[]).forEach(c=>{const h=c&&typeof c=="object"?c[n]:null;typeof h=="number"&&isFinite(h)&&(h<r&&(r=h),h>o&&(o=h))})),r===1/0?null:{zmin:r,zmax:o,rMin:i,rMax:a,field:n}}_scatterRadius(t,e,s){if(!e)return s;const i=t&&typeof t=="object"?t[e.field]:null;if(typeof i!="number"||!isFinite(i))return e.rMin;const a=e.zmax>e.zmin?(i-e.zmin)/(e.zmax-e.zmin):1,n=Math.max(0,Math.min(1,a)),r=e.rMin*e.rMin,o=e.rMax*e.rMax;return Math.sqrt(r+n*(o-r))}_beeswarm(t,e,s,i,a){const n=t.slice().sort((l,c)=>l.px-c.px),r=[],o=a??s;n.forEach(l=>{const c=l.r!=null?l.r:s;let h=0;for(let d=0;d<2e3;d++){const f=d===0?0:Math.ceil(d/2)*i*(d%2?1:-1),u=e+f;let g=!0;for(let p=r.length-1;p>=0;p--){const b=r[p],m=l.px-b.px;if(m>c+o)break;const A=c+b.r,v=u-b.y;if(m*m+v*v<A*A){g=!1;break}}if(g){h=f;break}}l.y=e+h,r.push({px:l.px,y:l.y,r:c})})}_niceScale(t,e,s){const i=t;let a=e;a>i||(a=i+1);const n=this._niceNum(a-i,!1),r=this._niceNum(n/Math.max(1,s-1),!0);return{min:Math.floor(i/r)*r,max:Math.ceil(a/r)*r,spacing:r}}_niceNum(t,e){const s=t>0?t:1,i=Math.floor(Math.log(s)/Math.LN10),a=s/Math.pow(10,i);let n;return e?n=a<1.5?1:a<3?2:a<7?5:10:n=a<=1?1:a<=2?2:a<=5?5:10,n*Math.pow(10,i)}_drawScatterAxes(t,e){const s=this.w;if(!H.isBrowser())return;const i=this._scatterAxis;if(!i)return;const a="http://www.w3.org/2000/svg",n=e.group({class:"apexcharts-unit-axis"}),r=s.config.grid&&s.config.grid.borderColor||"rgba(128,128,128,0.18)",o="rgba(128,128,128,0.5)",l=s.config.xaxis&&s.config.xaxis.labels&&s.config.xaxis.labels.style&&s.config.xaxis.labels.style.colors||"rgba(120,130,140,0.9)",c=(d,f,u,g,p)=>{const b=B.createElementNS(a,"line");b.setAttribute("x1",String(d)),b.setAttribute("y1",String(f)),b.setAttribute("x2",String(u)),b.setAttribute("y2",String(g)),b.setAttribute("stroke",p),b.setAttribute("shape-rendering","crispEdges"),n.node.appendChild(b)},h=(d,f,u,g,p,b,m,A)=>{const v=B.createElementNS(a,"text");v.setAttribute("class",A),v.setAttribute("x",String(f)),v.setAttribute("y",String(u)),v.setAttribute("text-anchor",g),v.setAttribute("dominant-baseline","middle"),v.setAttribute("font-size",`${b}px`),v.setAttribute("font-family",s.config.chart.fontFamily||"inherit"),v.setAttribute("font-weight",String(m)),v.setAttribute("fill",p),v.textContent=d,n.node.appendChild(v)};if(i.mode==="2d"){if(i.yTicks.forEach(d=>{const f=i.plotY(d);i.gridlines&&c(i.plotL,f,i.plotR,f,r);const u=i.yFormatter?String(i.yFormatter(d)):this._formatTick(d);h(u,i.plotL-8,f,"end",l,11,400,"apexcharts-unit-tick")}),i.xTicks.forEach(d=>{const f=i.plotX(d);i.gridlines&&c(f,i.plotT,f,i.plotB,r);const u=i.xFormatter?String(i.xFormatter(d)):this._formatTick(d);h(u,f,i.plotB+14,"middle",l,11,400,"apexcharts-unit-tick")}),c(i.plotL,i.plotB,i.plotR,i.plotB,o),c(i.plotL,i.plotT,i.plotL,i.plotB,o),i.xTitle&&h(String(i.xTitle),(i.plotL+i.plotR)/2,i.plotB+32,"middle",l,12,600,"apexcharts-unit-axis-title"),i.yTitle){const d=B.createElementNS(a,"text");d.setAttribute("class","apexcharts-unit-axis-title");const f=14,u=(i.plotT+i.plotB)/2;d.setAttribute("x",String(f)),d.setAttribute("y",String(u)),d.setAttribute("text-anchor","middle"),d.setAttribute("font-size","12px"),d.setAttribute("font-family",s.config.chart.fontFamily||"inherit"),d.setAttribute("font-weight","600"),d.setAttribute("fill",l),d.setAttribute("transform",`rotate(-90 ${f} ${u})`),d.textContent=String(i.yTitle),n.node.appendChild(d)}t.add(n);return}i.ticks.forEach(d=>{const f=i.plotX(d);i.gridlines&&c(f,i.plotT,f,i.plotB,r);const u=i.formatter?String(i.formatter(d)):this._formatTick(d);h(u,f,i.plotB+14,"middle",l,11,400,"apexcharts-unit-tick")}),c(i.plotL,i.plotB,i.plotR,i.plotB,o),i.xTitle&&h(String(i.xTitle),(i.plotL+i.plotR)/2,i.plotB+32,"middle",l,12,600,"apexcharts-unit-axis-title"),i.plotL>
138212&&i.lanes.forEach(d=>{const f=s.globals.colors[d.i]||s.globals.colors[0]||"#008FFB";h(d.name,i.plotL-8,d.cy,"end",f,12,600,"apexcharts-unit-lane-label")}),t.add(n)}_formatTick(t){if(!isFinite(t))return"";const e=Math.abs(t);return e>=1e6?`${+(t/1e6).toFixed(1)}M`:e>=1e4?`${+(t/1e3).toFixed(1)}k`:Number.isInteger(t)?String(t):String(+t.toFixed(2))}_largestRemainder(t,e){const s=t.reduce((c,h)=>c+h,0);if(s<=0||e<=0)return t.map(()=>0);const i=t.map(c=>c/s*e),a=i.map(c=>Math.floor(c)),n=a.reduce((c,h)=>c+h,0),r=Math.max(0,e-n),o=i.map((c,h)=>({i:h,frac:c-Math.floor(c)})).sort((c,h)=>h.frac-c.frac),l=a.slice();for(let c=0;c<r&&c<o.length;c++)l[o[c].i]++;return l}_spiral(t,e,s,i,a){const n=[];for(let r=0;r<s;r++){const o=a+r,l=i*Math.sqrt(o+.5),c=o*Xi;n.push({x:t+l*Math.cos(c),y:e+l*Math.sin(c)})}return n}_fixedRadius(t){return t.shape==="image"&&t.image?Math.max(t.image.width||20,t.image.height||20)/2:this._bubbleActive(t)&&typeof t.sizeByValue.maxRadius=="number"?t.sizeByValue.maxRadius>0?t.sizeByValue.maxRadius:null:typeof t.size=="number"&&t.size>0?t.size:null}_bubbleActive(t){const e=t.sizeByValue;return!!(e&&e.enabled&&t.shape!=="image"&&t.shape!=="square")}_unitValueOf(t){if(typeof t=="number")return t;if(t&&typeof t=="object"){const e=t.value!=null?t.value:t.y;return typeof e=="number"?e:null}return null}_radiusForValue(t,e){if(t==null||!isFinite(t))return e.minR;const s=e.max>e.min?(t-e.min)/(e.max-e.min):1,i=Math.max(0,Math.min(1,s));if(e.scale==="linear")return e.minR+i*(e.maxR-e.minR);const a=e.minR*e.minR,n=e.maxR*e.maxR;return Math.sqrt(a+i*(n-a))}_bubbleStats(t,e,s){if(!this._bubbleActive(e))return null;let i=1/0,a=-1/0;if(t.forEach(l=>{l&&l.forEach(c=>{const h=this._unitValueOf(c);h!=null&&isFinite(h)&&(h<i&&(i=h),h>a&&(a=h))})}),i===1/0||a<i)return null;const n=e.sizeByValue,r=s,o=Math.max(1,Math.min(r,typeof n.minRadius=="number"?n.minRadius:r*.35));return{min:i,max:a,minR:o,maxR:r,scale:n.scale==="linear"?"linear":"area"}}_resolveStep(t,e,s){const i=t.spacing>0?t.spacing:1,a=this._fixedRadius(t);return a?2*a*i:e/(Math.sqrt(Math.max(1,s))+.5)}_dotRadiusFromStep(t,e){const s=e.spacing>0?e.spacing:1,i=this._fixedRadius(e);return i||Math.max(1,t/(2*s))}_isCorner(t){return t.shape==="square"||t.shape==="image"}_halfExtent(t){if(t.shape==="image"&&t.image)return{hx:(t.image.width||20)/2,hy:(t.image.height||20)/2};const e=this._lastDotR;return{hx:e,hy:e}}_drawDot(t,e,s,i,a,n){const r=this.w,o=r.config.stroke.show?r.config.stroke.width:0,l=Array.isArray(r.globals.stroke.colors)&&r.globals.stroke.colors[a]||"none",c=typeof r.config.fill.opacity=="number"?r.config.fill.opacity:1;let h;if(e.shape==="image"&&e.image&&e.image.src){const d=e.image.width||20,f=e.image.height||20;h=r.dom.Paper.image(e.image.src),h.node.setAttribute("width",String(d)),h.node.setAttribute("height",String(f)),h.node.setAttribute("preserveAspectRatio","xMidYMid meet"),e.image.tint&&h.node.setAttribute("filter",`url(#${this._tintFilter(i)})`)}else if(e.shape==="square"){const d=s*2;h=t.drawRect(0,0,d,d,e.borderRadius||0,i,1,o,l),h.node.setAttribute("fill",i),c<1&&h.node.setAttribute("fill-opacity",String(c))}else h=t.drawCircle(s,{fill:i,"stroke-width":o,stroke:l}),h.node.setAttribute("fill",i),c<1&&h.node.setAttribute("fill-opacity",String(c));return h.node.classList.add("apexcharts-unit-area"),h.node.setAttribute("i",String(a)),h.node.setAttribute("j",String(n)),h}_tintFilter(t){const e=this.w,s="http://www.w3.org/2000/svg",i=String(t).replace(/[^a-zA-Z0-9]/g,""),a=`apexcharts-unit-tint-${e.globals.chartID}-${i}`,n=e.dom.Paper.node;if(n.querySelector(`#${a}`))return a;let r=n.querySelector("defs");r||(r=B.createElementNS(s,"defs"),n.insertBefore(r,n.firstChild));const o=B.createElementNS(s,"filter");o.setAttribute("id",a),o.setAttribute("x","0%"),o.setAttribute("y","0%"),o.setAttribute("width","100%"),o.setAttribute("height","100%");const l=B.createElementNS(s,"feFlood");l.setAttribute("flood-color",t),l.setAttribute("result","flood");const c=B.createElementNS(s,"feComposite");return c.setAttribute("in","flood"),c.setAttribute("in2","SourceAlpha"),c.setAttribute("operator","in"),o.appendChild(l),o.appendChild(c),r.appendChild(o),a}
1382_placeDot(t,e,s,i){if(this._isCorner(e)){const{hx:a,hy:n}=this._halfExtent(e);t.setAttribute("x",String(s-a)),t.setAttribute("y",String(i-n))}else t.setAttribute("cx",String(s)),t.setAttribute("cy",String(i))}_rgb(t){if(typeof t!="string")return null;let e=t.trim();if(e[0]==="#"){e.length===4&&(e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);const i=parseInt(e.slice(1,7),16);return isNaN(i)?null:[i>>16&255,i>>8&255,i&255]}const s=e.match(/rgba?\(([^)]+)\)/);if(s){const i=s[1].split(",").map(a=>parseFloat(a));if(i.length>=3&&i.every(a=>!isNaN(a)))return[i[0],i[1],i[2]]}return null}_shouldAnimate(){const t=this.w,e=t.config.chart.animations;return!(!H.isBrowser()||!e||e.enabled===!1||t.globals.shouldAnimate===!1||t.globals.resized&&!t.globals.dataChanged||e.respectReducedMotion&&Be())}_runGather(t){const e=this.w,s=e.config.plotOptions.unit,i=Math.max(1,e.config.chart.animations.speed||800),a=this._isCorner(s),{hx:n,hy:r}=this._halfExtent(s),o=Math.min(i*.6,450),l=t.length;for(let m=0;m<l;m++)t[m].delay=l>1?m/(l-1)*o:0;const c=a?"x":"cx",h=a?"y":"cy",d=a?n:0,f=a?r:0;if(a)for(let m=0;m<l;m++)t[m].node.setAttribute(c,String(t[m].cx0-d)),t[m].node.setAttribute(h,String(t[m].cy0-f));if(!a)for(let m=0;m<l;m++){const A=t[m];A.r0!=null&&A.r1!=null&&A.r0!==A.r1&&A.node.setAttribute("r",String(A.r0))}for(let m=0;m<l;m++){const A=t[m];A.fill0&&A.fill1&&A.fill0!==A.fill1&&(A._c0=this._rgb(A.fill0),A._c1=this._rgb(A.fill1))}const u=s.gather||{},g=u.easing==="outBack"?fl(typeof u.overshoot=="number"?u.overshoot:1.70158):u.easing==="inOutCubic"?ul:is;this.w.globals.unitGatherRAF!=null&&(B.cancelAnimationFrame(this.w.globals.unitGatherRAF),this.w.globals.unitGatherRAF=null);const p=performance.now(),b=m=>{if(this.w.globals.isDestroyed){this.w.globals.unitGatherRAF=null;return}let A=!0;for(let v=0;v<l;v++){const y=t[v],w=Math.max(0,Math.min(1,(m-p-y.delay)/i)),_=g(w),C=is(w),S=y.cx0+(y.x-y.cx0)*_,k=y.cy0+(y.y-y.cy0)
1382*_;if(y.node.setAttribute(c,String(S-d)),y.node.setAttribute(h,String(k-f)),y.isEnter&&(y.node.style.opacity=String(Math.min(1,w*2.5))),y._c0&&y._c1){const M=Math.round(y._c0[0]+(y._c1[0]-y._c0[0])*C),L=Math.round(y._c0[1]+(y._c1[1]-y._c0[1])*C),E=Math.round(y._c0[2]+(y._c1[2]-y._c0[2])*C);y.node.setAttribute("fill",`rgb(${M},${L},${E})`)}!a&&y.r0!=null&&y.r1!=null&&y.r0!==y.r1&&y.node.setAttribute("r",String(y.r0+(y.r1-y.r0)*C)),w<1&&(A=!1)}if(A){for(let v=0;v<l;v++){const y=t[v];y.node.style.opacity="",y._c1&&y.fill1&&y.node.setAttribute("fill",y.fill1),!a&&y.r0!=null&&y.r1!=null&&y.r0!==y.r1&&y.node.setAttribute("r",String(y.r1))}this.w.globals.unitGatherRAF=null}else this.w.globals.unitGatherRAF=B.requestAnimationFrame(b)};this.w.globals.unitGatherRAF=B.requestAnimationFrame(b)}_collectExits(t,e,s){const i=Math.max(0,s.maxUnits||5e3),a=[];for(const[n,r]of t)if(!e.has(n)&&(a.push(r),a.length>=i))break;return a}_runExits(t,e,s){const i=this.w,a=new I(i,this.ctx),n=this._lastDotR,r=i.layout.gridWidth/2,o=i.layout.gridHeight/2,l=s.layout==="grid"||s.layout==="scatter"||s.layout==="arc"?0:.35,c=[];if(e.forEach(y=>{const w=this._drawDot(a,s,n,y.fill,0,0);
1382w.node.classList.add("apexcharts-unit-exit"),this._placeDot(w.node,s,y.x,y.y),t.add(w),c.push({node:w.node,x0:y.x,y0:y.y})}),!this._shouldAnimate()){c.forEach(y=>y.node.remove());return}const h=Math.max(1,i.config.chart.animations.speed||800),d=this._isCorner(s),{hx:f,hy:u}=this._halfExtent(s),g=d?f:0,p=d?u:0,b=d?"x":"cx",m=d?"y":"cy";this.w.globals.unitExitRAF!=null&&(B.cancelAnimationFrame(this.w.globals.unitExitRAF),this.w.globals.unitExitRAF=null);const A=performance.now(),v=y=>{if(this.w.globals.isDestroyed){this.w.globals.unitExitRAF=null;return}const w=Math.max(0,Math.min(1,(y-A)/h)),_=is(w);for(let C=0;C<c.length;C++){const S=c[C];if(l){const k=S.x0+(r-S.x0)*_*l,M=S.y0+(o-S.y0)*_*l;S.node.setAttribute(b,String(k-g)),S.node.setAttribute(m,String(M-p))}S.node.style.opacity=String(1-_)}w<1?this.w.globals.unitExitRAF=B.requestAnimationFrame(v):(this.w.globals.unitExitRAF=null,t.node&&t.node.remove())};this.w.globals.unitExitRAF=B.requestAnimationFrame(v)}_drawClusterLabel(t,e,s,i,a,n){const r=this.w;if(!H.isBrowser())return;const o="http://www.w3.org/2000/svg",l=r.seriesData.seriesNames[e.i]||`series-${e.i+1}`,c=i>0?s/i*100:0,h=a.clusterLabels,d=parseFloat(h.fontSize)||13;let f;typeof h.formatter=="function"?f=h.formatter(l,{seriesIndex:e.i,value:s,percent:c,w:r}):f=`${l} (${c.toFixed(1)}%)`;const u=typeof f=="string"?f:String(f),g=B.createElementNS(o,"text");g.setAttribute("class","apexcharts-unit-label"),g.setAttribute("text-anchor","middle"),g.setAttribute("font-size",`${d}px`),g.setAttribute("font-family",h.fontFamily||r.config.chart.fontFamily||"inherit"),g.setAttribute("font-weight",String(h.fontWeight||600)),g.setAttribute("fill",h.color||n);const p=h.position==="bottom",b=e.outerR+d*.6+3+(h.offsetY||0),m=u.length*d*.55;if(!p&&!e.flat&&h.curved!==!1&&m<=Math.PI*b*.95){const v=e.cy,y=e.cx-b,w=e.cx+b,_=`M ${y} ${v} A ${b} ${b} 0 0 1 ${w} ${v}`,C=`apexcharts-unit-label-${r.globals.chartID}-${e.i}`,S=B.createElementNS(o,"path");S.setAttribute("id",C),S.setAttribute("d",_),S.setAttribute("fill","none"),S.setAttribute("stroke","none");const k=B.createElementNS(o,"textPath");k.setAttribute("href",`#${C}`),k.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",`#${C}`),k.setAttribute("startOffset","50%"),k.textContent=u,g.appendChild(k),t.node.appendChild(S)}else{g.setAttribute("x",String(e.cx));const v=p?e.cy+e.outerR+d+6+(h.offsetY||0):e.cy-e.outerR-6-(h.offsetY||0);g.setAttribute("y",String(v)),g.textContent=u}t.node.appendChild(g)}}const ke=Math.PI/180,Ii=180/Math.PI,as="http://www.w3.org/2000/svg",Kt="http://www.w3.org/1999/xhtml",he=(x,t,e)=>x+(t-x)*e;class pl{constructor(t,e){this.ctx=e,this.w=t;const s=t.config;this.cfg=s.plotOptions.sunburst,this.strokeWidth=s.stroke.show?s.stroke.width:0,this.strokeColor=Array.isArray(s.stroke.colors)?s.stroke.colors[0]:s.stroke.colors||"#fff",this.startAngle=this.cfg.startAngle,this.endAngle=this.cfg.endAngle,this.maxDepth=0,this.centerX=0,this.centerY=0,this.maxRadius=0,this.total=1,this._focusMaxDepth=0,this._focus=null,this._roots=[],this._nodesAll=[],this._innerR=()=>0,this._outerR=()=>0,this._tooltipEl=null,this._lblSeq=0,this._graphics=null,this._ringsG=null,this._labelsG=null}draw(t){const e=this.w,s=new I(this.w);this._graphics=s;const i=s.group({class:"apexcharts-sunburst"});if(e.globals.noData||!t||!t.length)return i;const a=e.layout.gridWidth,n=e.layout.gridHeight;if(this.centerX=a/2+(this.cfg.offsetX||0),this.centerY=n/2+(this.cfg.offsetY||0),this.maxRadius=Math.min(a,n)/2.05-this.strokeWidth-(e.config.chart.sparkline.enabled?0:e.config.chart.dropShadow.blur),this.maxRadius<5||(this._roots=this._buildHierarchy(),!this._roots.length))return i;this._roots.forEach(c=>this._fillValues(c)),this._validateStrict(),this._nodesAll=[];const r=e.globals.colors||[];this._roots.forEach((c,h)=>{this._colorPass(c,c.color||r[h%r.length]||"#008FFB")}),this.total=this._roots.reduce((c,h)=>c+Math.max(0,h.value),0)||1,this._ringsG=s.group({class:"apexcharts-sunburst-rings"}),this._labelsG=s.group({class:"apexcharts-sunburst-labels"}),i.add(this._ringsG),i.add(this._labelsG),this._focus=null,this._relayout(this._focus);const o=e.config.chart.animations;let l="none";return o.enabled&&(e.globals.dataChanged?o.dynamicAnimation.enabled&&(l="update"):e.globals.resized||(l="intro")),this._applyLayout(l),this._renderBreadcrumb(),i}_buildHierarchy(){const t=this.w.config.series,e=t&&t[0],s=e&&Array.isArray(e.data)?e.data:t;return Array.isArray(s)?s.map((i,a)=>this._toNode(i,a,null,"")):[]}_toNode(t,e,s,i,a=null){var n,r,o;const l=t&&typeof t=="object",c=l&&(r=(n=t.x)!=null?n:t.name)!=null?r:"",h=Number(l?(o=t.y)!=null?o:t.value:t),d={name:String(c),value:isNaN(h)?null:h,color:l&&t.color?t.color:void 0,_key:`${i}/${e}
1382:${c}`};if(s&&!d.color&&(d.color=s[e%s.length]),l&&Array.isArray(t.children)&&t.children.length)d.children=t.children.map((f,u)=>this._toNode(f,u,null,d._key,a));else if(l&&t.drilldown!=null){const f=a||new Set;if(!f.has(t.drilldown)){const u=this._drilldownById(t.drilldown);if(u&&Array.isArray(u.data)&&u.data.length){const g=new Set(f);g.add(t.drilldown);const p=Array.isArray(u.colors)?u.colors:null;d.children=u.data.map((b,m)=>this._toNode(b,m,p,d._key,g))}}}return d}_drilldownById(t){const e=this.w.config.drilldown;return(e&&Array.isArray(e.series)?e.series:[]).find(i=>i&&i.id===t)}_fillValues(t){t.children&&t.children.length&&(t.children.forEach(e=>this._fillValues(e)),(t.value==null||isNaN(t.value))&&(t.value=t.children.reduce((e,s)=>e+Math.max(0,s.value||0),0))),(t.value==null||isNaN(t.value))&&(t.value=0)}_validateStrict(){if(this.cfg.partition!=="strict")return;let t=!1;const e=s=>{if(s.children&&s.children.length){const i=s.children.reduce((a,n)=>a+Math.max(0,n.value||0),0);!t&&s.value!=null&&Math.abs(i-s.value)>.5&&(console.warn(`ApexCharts sunburst: partition 'strict' but "${s.name}" (${s.value}) != sum of its children (${i}). Angles are normalized to fill the wedge.`),t=!0),s.children.forEach(e)}};this._roots.forEach(e)}_colorPass(t,e){t._color=t.color||e,this._nodesAll.push(t),t.children&&t.children.forEach(s=>this._colorPass(s,s.color||this._lighten(t._color,this.cfg.tint)))}_relayout(t){if(this._nodesAll.forEach(n=>{n._show=!1}),this._focusMaxDepth=0,t)this._placeVis(t,0,this.startAngle,this.endAngle,t._parent);else{const n=this._roots.reduce((o,l)=>o+Math.max(0,l.value),0)||1;let r=this.startAngle;this._roots.forEach(o=>{const l=(this.endAngle-this.startAngle)*Math.max(0,o.value)/n;this._placeVis(o,0,r,r+l,null),r+=l})}const e=this._parseSize(this.cfg.innerSize,this.maxRadius),s=this._focusMaxDepth+1,i=(this.maxRadius-e)/s,a=s>1?1:0;this._innerR=n=>e+n*i+(n>0?a/2:0),this._outerR=n=>e+(n+1)*i-a/2,this._nodesAll.forEach(n=>{n._show&&(n._iR=this._innerR(n._vDepth),n._oR=n._leaf&&this.cfg.leaf==="extend"&&n._vDepth<this._focusMaxDepth?this.maxRadius:this._outerR(n._vDepth))})}_placeVis(t,e,s,i,a){if(t._show=!0,t._vDepth=e,t._a0=s,t._a1=i,t._parent=a,t._leaf=!(t.children&&t.children.length),e>this._focusMaxDepth&&(this._focusMaxDepth=e),!t._leaf){const n=t.children.reduce((o,l)=>o+Math.max(0,l.value),0)||1;let r=s;t.children.forEach(o=>{const l=(i-s)*Math.max(0,o.value)/n;this._placeVis(o,e+1,r,r+l,t),r+=l})}}_applyLayout(t){const s=this.w.config.chart.animations,i=s.enabled?t==="none"?0:t==="update"?s.dynamicAnimation.speed||350:s.speed||500:0,a=t==="update"?this.ctx._sunburstPrevGeoms:null;this._nodesAll.forEach(r=>{if(r._show){const o={a0:r._a0,a1:r._a1,iR:r._iR,oR:r._oR};if(r._el||(r._el=this._createArcEl(r)),t==="intro"&&i>0)this._sweepArc(r,o,i);else{let l,c=!1;if(r._cur)l=r._cur;else if(a&&a.get(r._key))l=a.get(r._key);else{const h=(o.a0+o.a1)/2;l={a0:h,a1:h,iR:o.iR,oR:o.iR},c=!0}this._animateArc(r,l,o,i,!1,c)}r._cur=o}else if(r._el&&r._cur){const o=(r._cur.a0+r._cur.a1)/2,l={a0:o,a1:o,iR:r._cur.iR,oR:r._cur.iR};this._animateArc(r,r._cur,l,i,!0,!1),r._cur=null}});const n=new Map;this._nodesAll.forEach(r=>{r._show&&n.set(r._key,{a0:r._a0,a1:r._a1,iR:r._iR,oR:r._oR})}),this.ctx._sunburstPrevGeoms=n,this._renderLabels(i)}_sweepArc(t,e,s){const i=t._el,a=this.cfg.borderRadius,n=this.startAngle,r=this.endAngle;i.node.style.display="",i.attr({d:"",opacity:1}),i.animate(s).during(o=>{const l=n+(r-n)*o;if(l<=e.a0+.01){i.attr({d:""});return}i.attr({d:this._arcPath(e.iR,e.oR,e.a0,Math.min(e.a1,l),a)})})}_createArcEl(t){const e=this._graphics.drawPath({d:"",fill:t._color,stroke:this.strokeColor,strokeWidth:this.strokeWidth,fillOpacity:1,classes:"apexcharts-sunburst-arc"}),s=e.node;return s.setAttribute("data:name",t.name),s.setAttribute("data:value",String(t.value)),this._attachTooltip(s,t),H.isBrowser()&&(s.addEventListener("click",()=>this._zoomTo(t)),s.style.cursor="pointer"),this._ringsG.add(e),e}_animateArc(t,e,s,i,a,n){const r=t._el,o=this.cfg.borderRadius;if(r.attr({fill:t._color}),i===0){r.attr({d:this._arcPath(s.iR,s.oR,s.a0,s.a1,o),opacity:a?0:1}),r.node.style.display=a?"none":"";return}r.node.style.display="";const l=a?Number(r.attr("opacity"))||1:n?0:1,c=a?0:1;r.attr({opacity:l}),r.animate(i).during(h=>{const d=he(e.a0,s.a0,h),f=he(e.a1,s.a1,h),u=he(e.iR,s.iR,h),g=he(e.oR,s.oR,h);r.attr({d:this._arcPath(u,g,d,f,o),opacity:he(l,c,h)})}).after(()=>{a&&(r.node.style.display="none")})}_renderLabels(t){const e=this._labelsG;for(;
1382e.node.firstChild;)e.node.removeChild(e.node.firstChild);this.cfg.dataLabels.show&&(this._nodesAll.forEach(s=>{s._show&&(s._a1-s._a0<this.cfg.dataLabels.minAngleToShow||this._renderCurvedLabel(s))}),t>0?(e.attr({opacity:0}),e.animate(250,t).attr({opacity:1})):e.attr({opacity:1}))}_renderCurvedLabel(t){if(!H.isBrowser())return;const e=this.cfg.dataLabels.style,s=this.w,i=(t._iR+t._oR)/2,a=(t._a0+t._a1)/2,n=a>90&&a<270,r=Math.min(i>0?4/i*Ii:0,(t._a1-t._a0)/2),o=n?t._a1-r:t._a0+r,l=n?t._a0+r:t._a1-r,c=this._ptAt(i,o),h=this._ptAt(i,l),d=Math.abs(l-o)>180?1:0,f=n?0:1,u=`apx-sb-lbl-${s.globals.cuid}-${this._lblSeq++}`,g=B.createElementNS(as,"path");g.setAttribute("id",u),g.setAttribute("d",`M ${c.x} ${c.y} A ${i} ${i} 0 ${d} ${f} ${h.x} ${h.y}`),g.setAttribute("fill","none"),g.setAttribute("stroke","none");const p=e.colors,b=(Array.isArray(p)?p[0]:p)||"#fff",m=B.createElementNS(as,"text");m.setAttribute("font-size",e.fontSize||"12px"),e.fontFamily&&m.setAttribute("font-family",e.fontFamily),m.setAttribute("font-weight",String(e.fontWeight||400)),m.setAttribute("fill",b),m.setAttribute("dominant-baseline","central"),m.style.pointerEvents="none";const A=B.createElementNS(as,"textPath");A.setAttribute("href","#"+u),A.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#"+u),A.setAttribute("startOffset","50%"),A.setAttribute("text-anchor","middle"),A.textContent=this._truncate(t.name,i,t._a1-t._a0,e.fontSize),m.appendChild(A),this._labelsG.node.appendChild(g),this._labelsG.node.appendChild(m)}_truncate(t,e,s,i){const a=e*s*ke-8,n=(parseFloat(i)||12)*.58,r=Math.floor(a/n);return r>=t.length?t:r<=1?"":t.slice(0,Math.max(1,r-1))+"…"}_zoomTo(t){if(this.cfg.zoomOnClick===!1)return;const e=t===this._focus?t._parent||null:t;e!==this._focus&&(this._focus=e&&!(e.children&&e.children.length)?e._parent||null:e,this._relayout(this._focus),this._applyLayout("zoom"),this._renderBreadcrumb())}_focusChain(){const t=[];let e=this._focus;for(;e;)t.unshift(e),e=e._parent;return t}_renderBreadcrumb(){if(!H.isBrowser())return;const e=this.w.dom.elWrap;if(!e)return;const s=e.querySelector(".apexcharts-breadcrumb");if(s&&s.parentNode&&s.parentNode.removeChild(s),!this._focus)return;const i=B.createElementNS(Kt,"nav");i.setAttribute("class","apexcharts-breadcrumb"),i.setAttribute("aria-label","Sunburst breadcrumb"),i.style.position="absolute",i.style.top="0px",i.style.left="0px";const a=[{name:"All",node:null}].concat(this._focusChain().map(n=>({name:n.name,node:n})));a.forEach((n,r)=>{if(r>0){const l=B.createElementNS(Kt,"span");l.setAttribute("class","apexcharts-breadcrumb-separator"),l.textContent=" / ",i.appendChild(l)}if(r===a.length-1){const l=B.createElementNS(Kt,"span");l.setAttribute("class","apexcharts-breadcrumb-item apexcharts-breadcrumb-current"),l.textContent=n.name,i.appendChild(l)}else{const l=B.createElementNS(Kt,"button");if(l.setAttribute("type","button"),l.setAttribute("class","apexcharts-breadcrumb-item"),r===0){const h=B.createElementNS(Kt,"span");h.setAttribute("class","apexcharts-breadcrumb-arrow"),h.textContent="←",l.appendChild(h)}const c=B.createElementNS(Kt,"span");c.setAttribute("class","apexcharts-breadcrumb-label"),c.textContent=n.name,l.appendChild(c),l.addEventListener("click",()=>{this._focus=n.node,this._relayout(this._focus),this._applyLayout("zoom"),this._renderBreadcrumb()}),i.appendChild(l)}}),e.appendChild(i),this._avoidChromeOverlap(i)}_avoidChromeOverlap(t){const e=this.w,s=[".apexcharts-title-text",".apexcharts-subtitle-text"].map(a=>e.dom.baseEl.querySelector(a)).filter(a=>a!==null);if(!s.length)return;const i=e.dom.elWrap.getBoundingClientRect().top;for(let a=0;a<s.length+1;a++){const n=t.getBoundingClientRect(),r=s.find(o=>{const l=o.getBoundingClientRect();return n.left<l.right&&n.right>l.left&&n.top<l.bottom&&n.bottom>l.top});if(!r)break;t.style.top=`${r.getBoundingClientRect().bottom-i+4}px`}}_ptAt(t,e){return{x:this.centerX+t*Math.cos((e-90)*ke),y:this.centerY+t*Math.sin((e-90)*ke)}}_arcPath(t,e,s,i,a){if(e<=t+.01)return"";let n=i-s;const r=this.cfg.spacing;if(r>0&&n>0&&e>0){const d=r/e*Ii,f=Math.min(d/2,Math.max(0,n/2-.25));s+=f,i-=f,n=i-s}if(n<=0)return"";const o=n*ke,l=this.centerX,c=this.centerY;let h=a;return h=Math.min(h,o*t/2,o*e/2,(e-t)/2),h>.5?Sa({cx:l,cy:c,rIn:t,rOut:e,a0:s,a1:i,r:h,spanDeg:n}):al({cx:l,cy:c,rIn:t,rOut:e,a0:s,a1:i,spanDeg:n})}_tip(){return this._tooltipEl||(this._tooltipEl=this.w.dom.baseEl.querySelector(".apexcharts-tooltip")),this._tooltipEl}_attachTooltip(t,e){!this.w.config.tooltip.enabled||!H.isBrowser()||(t.addEventListener("mouseenter",s=>this._showTooltip(s,e)),t.addEventListener("mousemove",s=>this._positionTooltip(s)),t.addEventListener("mouseleave",()=>this._hideTooltip()))}_showTooltip(t,e){const s=this._tip();if(!s)return;const i=this.w,a=(e.value/this.total*100).toFixed(1),n=e._parent?e._parent.value:this.total,r=n>0?(e.value/n*100).toFixed(1):a,o=i.config.tooltip.fillSeriesColor?`background-color:${e._color};`:"";s.innerHTML=`<div class="apexcharts-tooltip-series-group apexcharts-active" style="display:flex;${o}"><span class="apexcharts-tooltip-marker" style="background-color:${e._color}"></span><div class="apexcharts-tooltip-text"><div class="apexcharts-tooltip-y-group"><span class="apexcharts-tooltip-text-y-label">${e.name}: </span><span class="apexcharts-tooltip-text-y-value">${e.value} (${r}% of parent, ${a}% of total)</span></div></div></div>`,s.classList.add("apexcharts-active"),s.style.opacity="1",this._positionTooltip(t)}_positionTooltip(t){const e=this._tip();if(!e)return;const s=this.w.dom.elWrap.getBoundingClientRect(),i=e.offsetWidth,a=e.offsetHeight,n=12;let r=t.clientX-s.left+n;r+i>s.width&&(r=t.clientX-s.left-i-n),r=Math.max(0,Math.min(r,s.width-i));let o=t.clientY-s.top+n;o+a>s.height&&(o=t.clientY-s.top-a-n),o=Math.max(0,Math.min(o,s.height-a)),e.style.left=r+"px",e.style.top=o+"px"}_hideTooltip(){const t=this._tip();t&&(t.classList.remove("apexcharts-active"),t.style.opacity="0")}_parseSize(t,e){if(typeof t=="number")return t;const s=String(t).trim();if(s.endsWith("%"))return parseFloat(s)/100*e;const i=parseFloat(s);return isNaN(i)?.15*e:i}_lighten(t,e){if(typeof t!="string"||t[0]!=="#")return t;let s=t.slice(1);if(s.length===3&&(s=s.split("").map(o=>o+o).join("")),s.length!==6)return t;const i=parseInt(s,16);if(isNaN(i))return t;let a=i>>16&255,n=i>>8&255,r=i&255;return a=Math.round(a+(255-a)*e),n=Math.round(n+(255-n)*e),r=Math.round(r+(255-r)*e),"#"+((1<<24)+(a<<16)+(n<<8)+r).toString(16).slice(1)}}lt.use({line:ce,area:ce,scatter:ce,bubble:ce,rangeArea:ce,bar:Ct,column:Ct,barStacked:Uo,rangeBar:ol,candlestick:Di,boxPlot:Di,violin:Qo,pie:Le,donut:Le,polarArea:Le,radialBar:rl,radar:nl,heatmap:el,treemap:dl,unit:gl,sunburst:pl});export{lt as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.